OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
2
3         * jcf-dump.c (version): Update copyright notice dates.
4
5 2011-12-03  Matthias Klose  <doko@ubuntu.com>
6
7         * expr.c (SPECIAL_WIDE): Fix typo in message.
8
9 2011-11-23  Jeffrey A Law  (law@cygnus.com)
10
11         * lang.c (java_init_options_struct): Disable optimizations
12         which assume a NULL pointer dereference will cause a fault.
13
14 2011-11-07  Richard Henderson  <rth@redhat.com>
15
16         * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
17         (compareAndSwapLong_builtin): Likewise.
18         (compareAndSwapObject_builtin): Likewise.
19         (VMSupportsCS8_builtin): Likewise.
20
21 2011-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22
23         * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
24
25 2011-10-15  Tom Tromey  <tromey@redhat.com>
26             Dodji Seketeli  <dodji@redhat.com>
27
28         * jcf-parse.c (set_source_filename): Adjust to the new map API.
29
30 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
31
32         * class.c (build_static_field_ref): Delete old interface with two
33         parallel arrays to hold standard builtin declarations, and replace
34         it with a function based interface that can support creating
35         builtins on the fly in the future.  Change all uses, and poison
36         the old names.  Make sure 0 is not a legitimate builtin index.
37         * decl.c (java_init_decl_processing): Ditto.
38         * except.c (compareAndSwapLong_builtin): Ditto.
39         (compareAndSwapObject_builtin): Ditto.
40         (putVolatile_builtin): Ditto.
41         (define_builtin): Ditto.
42         (check_for_builtin): Ditto.
43         * expr.c (rewrite_arglist_getcaller): Ditto.
44         (expand_java_field_op): Ditto.
45
46 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
47
48         * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
49         New.
50         (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
51         rules.
52
53 2011-08-18  Peter Collingbourne  <peter@pcc.me.uk>
54
55         * expr.c (expand_invoke) Use the type of the method rewrite
56         target.
57
58 2011-08-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
59
60         * jcf-dump.c (print_constant): Cast first frexp arg.
61
62 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
63
64         * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
65
66 2011-07-19  Richard Guenther  <rguenther@suse.de>
67
68         * builtins.c (static): Use fold_build_pointer_plus.
69         * class.c (make_class_data): Likewise.
70         (build_symbol_entry): Likewise.
71         * except.c (build_exception_object_ref): Likewise.
72         * expr.c (build_java_arrayaccess): Likewise.
73         (build_field_ref): Likewise.
74         (build_known_method_ref): Likewise.
75         (build_invokevirtual): Likewise.
76
77 2011-07-06  Richard Guenther  <rguenther@suse.de>
78
79         * decl.c (java_init_decl_processing):
80         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
81
82 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
83
84         * builtins.c: Add sync_ or SYNC__ to builtin names.
85         * expr.c: Add sync_ or SYNC__ to builtin names.
86
87 2011-06-07  Richard Guenther  <rguenther@suse.de>
88
89         * decl.c (java_init_decl_processing): Call build_common_nodes,
90         build_common_nodes_2 at the beginning.  Remove then duplicate
91         initializations.
92
93 2011-06-07  Richard Guenther  <rguenther@suse.de>
94
95         * decl.c (java_init_decl_processing): Properly initialize
96         size_type_node.
97
98 2011-05-30  Joern Rennecke  <joern.rennecke@embecosm.com>
99
100         PR middle-end/46500
101         * expr.c: Include "tm.h" .
102
103 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
104
105         * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
106         * expr.c (build_jni_stub): Likewise.
107
108 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
109
110         * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
111         of prefix.o.
112
113 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
114
115         * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
116         version.o.
117         (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
118         (JVGENMAIN_OBJS): Remove errors.o and intl.o.
119         (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
120         * jcf-dump.c: Include diagnostic.h.
121         (main): Initialize diagnostics.
122         * jvgenmain.c: Include diagnostic.h.
123         (main): Initialize diagnostics.
124
125 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
126
127         * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
128
129 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
130
131         * java-tree.h (global_bindings_p): Adjust prototype.
132         * decl.c (global_bindings_p): Return bool.
133
134 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
135
136         * expr.c (expand_java_switch): Call build_case_label.
137         (expand_java_add_case): Likewise.
138
139 2011-04-29  Richard Guenther  <rguenther@suse.de>
140
141         PR middle-end/48819
142         * constants.c (build_constants_constructor): Use ptr_type_node for
143         temp.
144
145 2011-04-20  Jim Meyering  <meyering@redhat.com>
146
147         * jcf-parse.c (java_parse_file): Remove useless if-before-free.
148
149 2011-04-18  Jim Meyering  <meyering@redhat.com>
150
151         * jcf-parse.c: Fix typo in comment.
152
153 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
154
155         * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
156
157 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
158
159         * java-tree.h (union lang_tree_node): Check for TS_COMMON before
160         calling TREE_CHAIN.
161
162 2011-04-11  Martin Jambor  <mjambor@suse.cz>
163
164         * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
165         cgraph_node and handle returned NULL.
166
167 2011-03-25  Kai Tietz  <ktietz@redhat.com>
168
169         * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
170         instead of strcmp.
171         (set_source_filename): Likewise.
172         * win32-host.c (jcf_open_exact_case): Likewise.
173
174 2011-03-21  Kai Tietz  <ktietz@redhat.com>
175
176         PR target/12171
177         * lang.c (java_attribute_table): Adjust table.
178
179 2011-02-13  Joseph Myers  <joseph@codesourcery.com>
180
181         * jvspec.c (jvgenmain_spec): Remove %{a*}.
182
183 2011-01-21  Kai Tietz  <kai.tietz@onevision.com>
184
185         PR bootstrap/47215
186         * decl.c (java_init_decl_processing): Remove
187         va_list_type_node related type initializations.
188
189 2011-01-11  Kai Tietz  <kai.tietz@onevision.com>
190
191         PR bootstrap/47215
192         * decl.c (java_init_decl_processing): Initialize
193         long_integer_type_node.
194
195 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
196
197         PR bootstrap/47215
198         * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
199
200 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
201
202         * decl.c (java_init_decl_processing): Setup va_list_type_node.
203
204 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
205
206         * jcf-dump.c (version): Update copyright notice dates.
207
208 2010-12-15  Dave Korn  <dave.korn.cygwin@gmail.com>
209
210         * decl.c (java_init_decl_processing): Initialise integer_three_node.
211         * lang.c (put_decl_node): Handle nested function decls.
212
213 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
214
215         * jcf-parse.c: Don't include assert.h.
216         (java_parse_file): Use gcc_assert.
217
218 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
219
220         * lang.opt (static-libgcj): New option.
221
222 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
223
224         * jcf-parse.c: Don't include toplev.h.
225         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
226
227 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
228
229         * boehm.c: Don't include toplev.h.
230         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
231
232 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
233
234         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
235         verify-glue.c: Don't include toplev.h.
236         * Make-lang.in: Dependencies for above files changed to remove
237         toplev.h.
238
239 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
240
241         * boehm.c: Include "config.h" instead of <config.h>.
242         * builtins.c: Don't include <stdarg.h>.
243         * class.c: Don't include "stdio.h".
244         (O_BINARY): Don't define here.
245         * jcf-depend.c: Don't include <assert.h>.
246         (jcf_dependency_set_dep_file, jcf_dependency_init,
247         jcf_dependency_write): Use gcc_assert.
248         * jcf-io.c (O_BINARY): Don't define here.
249         * jcf-path.c: Don't include "tm.h".
250         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
251         * resource.c: Don't include "stdio.h".
252         (O_BINARY): Don't define here.
253         * verify-impl.c: Don't include <stdio.h>.
254
255 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
256
257         * jcf-parse.c (java_parse_file): Take no arguments.
258         * java-tree.h (java_parse_file): Update prototype.
259
260 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
261             Andrew Haley  <aph@redhat.com>
262
263         PR java/46386
264         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
265
266 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
267
268         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
269         * lang.c (java_handle_option): Take location_t parameter.
270
271 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
272
273         * expr.c (expand_java_field_op): Use %' in diagnostic.
274         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
275         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
276         * lang.c (java_post_options): Use %' in diagnostics.
277
278 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
279
280         PR middle-end/46314
281         * class.c: Include target.h.
282         (make_local_function_alias):
283         Use targetm.asm_out.generate_internal_label.
284         * expr.c (lookup_label, generate_name): Likewise.
285
286 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
287
288         PR bootstrap/44335
289         * jfc-parse.c (target.h): Include.
290         (handle_constant): Use targetm.words_big_endian and
291         targetm.float_words_big_endian.
292         (get_constant): Use targetm.float_words_big_endian.
293
294 2010-10-13  Richard Henderson  <rth@redhat.com>
295
296         * lang.c (java_eh_personality): Update call to
297         build_personality_function.
298
299 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
300
301         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
302         options.h.
303
304 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
305
306         * decl.c (java_init_decl_processing): Use build_function_type_list
307         instead of build_function_type.
308         * jcf-parse.c (java_emit_static_constructor): Likewise.
309         * builtins.c (initialize_builtins): Likewise.
310
311 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
312
313         * lang.c (java_init_options_struct): New.  Split out from
314         java_init_options.
315         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
316
317 2010-10-04  Andi Kleen <ak@linux.intel.com>
318
319         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
320         Add + to build rule.
321
322 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
323
324         * lang.opt: Don't use VarExists.
325
326 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
327
328         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
329         flag_force_classes_archive_check, flag_redundant, flag_newer,
330         flag_use_divide_subroutine, flag_use_atomic_builtins,
331         flag_use_boehm_gc, flag_hash_synchronization,
332         flag_check_references, flag_optimize_sci, flag_indirect_classes,
333         flag_indirect_dispatch, flag_store_check,
334         flag_reduced_reflection): Remove.
335         * jcf-dump.c (flag_newer): Remove.
336         * jcf.h (quiet_flag): Remove.
337         * parse.h (quiet_flag): Remove.
338
339 2010-09-28  Richard Henderson  <rth@redhat.com>
340
341         * lang.c: Include "target.h".
342         (java_eh_personality): Use targetm.except_unwind_info.
343         * Make-lang.in (lang.o): Update deps.
344
345 2010-09-27  Andrew Haley  <aph@redhat.com>
346
347         PR java/45773
348         * jvgenmain.c (main): Fix arg processing.
349
350 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
351
352         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
353         OPT_fhelp.
354         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
355         -dependencies, -encoding, -extdirs, -include-directory,
356         -include-directory=, -output-class-directory,
357         -output-class-directory=, -resource, -resource=,
358         -user-dependencies): New.
359
360 2010-09-16  Richard Guenther  <rguenther@suse.de>
361
362         * jcf-parse.c (current_file_list): Remove.
363         (java_parse_file): Use build_translation_unit_decl.  Adjust.
364
365 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
366
367         * lang.opt (d): New.
368
369 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
370
371         PR java/45504
372         * jvgenmain.c (main): Check "-D XXX=YYY".
373
374 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
375
376         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
377
378 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
379
380         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
381         fCLASSPATH=): Mark as Java options and as aliases.
382         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
383         (lang_specific_driver): Don't handle options marked as aliases.
384         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
385
386 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
387
388         * Make-lang.in (jvspec.o): Update dependencies.
389         * jvspec.c: Include opts.h.
390         (PARAM_ARG): Remove.
391         (find_spec_file): Do not add leading -specs=.
392         (lang_specific_driver): Use cl_decoded_option structures.
393         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
394         extdirs, fmain=, s-bc-abi): New options.
395
396 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
397
398         * class.c: Use FOR_EACH_VEC_ELT.
399         * expr.c: Likewise.
400         * jcf-parse.c: Likewise.
401         * resource.c: Likewise.
402
403 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
404
405         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
406
407 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
408
409         * class.c (build_utf8_ref): Fix code formatting from previous commit.
410
411 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
412
413         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
414
415 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
416
417         * lang.c (java_handle_option): Update prototype and return value
418         type.
419
420 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
421
422         * lang.c (java_option_lang_mask): New.
423         (java_init_options): Update prototype.
424         (LANG_HOOKS_OPTION_LANG_MASK): Define.
425
426 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
427
428         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
429         * boehm.c: Likewise.
430         * class.c: Likewise.
431         * decl.c: Likewise.
432         * expr.c: Likewise.
433         * jcf-parse.c: Likewise.
434         * typeck.c: Likewise.
435         * verify-glue.c: Likewise.
436
437 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
438
439         * boehm.c: Include diagnostic-core.h in every file that includes
440         toplev.h.
441         * class.c: Likewise.
442         * constants.c: Likewise.
443         * decl.c: Likewise.
444         * except.c: Likewise.
445         * expr.c: Likewise.
446         * jcf-parse.c: Likewise.
447         * mangle.c: Likewise.
448         * mangle_name.c: Likewise.
449         * resource.c: Likewise.
450         * typeck.c: Likewise.
451         * verify-glue.c: Likewise.
452
453 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
454
455         PR bootstrap/44825
456         * class.c (make_class_data): Cast result of VEC_length calls to int.
457
458 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
459
460         * constants.c (build_constants_constructor): Use build_constructor
461         instead of build_constructor_from_list.
462         * class.c (make_method_value): Likewise.
463         (get_dispatch_table): Likewise.
464         (make_class_data): Likewise.
465         (emit_indirect_register_classes): Likewise.
466         (emit_symbol_table): Likewise.
467         (add_assertion_table_entry): Likewise.
468         (emit_assertion_table): Likewise.
469         (make_field_value): Use build_constructor_single instead of
470         build_constructor_from_list.
471
472 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
473
474         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
475         VEC.
476         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
477         instead of tree_cons.
478         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
479         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
480
481 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
482
483         * lang.c: Do not include except.h
484         * except.c: Likewise.
485         (doing_eh): New, moved from except.c (in gcc/) but removed the
486         do_warning flag.
487         (maybe_start_try): Update doing_eh call.
488         * Make-lang.in: Update dependencies.
489
490 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
491
492         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
493         of build_int_cst_wide.
494         * boehm.c (set_bit): Remove.
495         (mark_reference_fields): Use double_int type for 'mask' argument.
496         Use double_int_setbit instead of set_bit.
497         (get_boehm_type_descriptor): Use double_int_setbit instead of
498         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
499
500 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
501
502         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
503
504 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
505
506         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
507
508         * jcf-parse.c (java_parse_file): Likewise.
509         (process_zip_dir): Likewise.
510
511         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
512         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
513
514         * expr.c (add_type_assertion): Likewise.
515
516         * decl.c (make_binding_level): Likewise.
517         (java_dup_lang_specific_decl): Likewise.
518
519         * constants.c (set_constant_entry): Likewise.
520         (cpool_for_class): Likewise.
521
522         * class.c (add_method_1): Likewise.
523         (java_treetreehash_new): Likewise.
524
525         * java-tree.h (struct lang_type): Add variable_size GTY option.
526         (struct lang_decl): Likewise.
527
528         * jch.h (struct cpool_entry): Likewise.
529
530         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
531
532         * except.c (prepare_eh_table_type): Update
533         java_treetreehash_create call.
534
535         * class.c (add_method_1): Update java_treetreehash_create call.
536         (java_treetreehash_create): Remove parameter gc.  Use
537         htab_create_ggc.
538
539 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
540
541         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
542         diagnostics.
543
544 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
545
546         * except.c: Include tm.h.
547
548 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
549
550         * jvspec.c (lang_specific_driver): Use fatal_error instead of
551         fatal.  Use warning instead of error for warnings.
552
553 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
554
555         * expr.c (get_symbol_table_index): Add spaces in expression.
556
557 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
558
559         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
560         (struct lang_type): Change type of otable_methods, atable_methods, and
561         itable_methods to VECs.  Fix comment for atable_methods.
562         (emit_symbol_table): Take a VEC instead of a tree.
563         (get_symbol_table_index): Take a VEC * instead of a tree *.
564         * class.c (add_table_and_syms): Take a VEC instead of a tree.
565         (emit_symbol_table): Update for changed parameter type.
566         * expr.c (get_symbol_table_index): Likewise.
567
568 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
569
570         * buildings.c: Pretend to be a backend file by undefining
571         IN_GCC_FRONTEND (still need rtl.h here).
572
573 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
574
575         * java-tree.h (struct lang_decl_func): Change type of throws_list
576         field to a VEC.
577         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
578         of DECL_FUNCTION_THROWS.
579         * class.c (make_method_value): Likewise.
580
581 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
582
583         * class.c (utf8_decl_list): Delete.
584         (build_utf8_ref): Remove references to it.
585         * java-tree.h (all_class_list): Delete.
586         (predef_filenames): Delete.
587         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
588         Delete.
589         * jcf-parse.c (parse_roots): Decrease size to 2.
590         (current_file_list): Convert to a VEC.
591         (all_class_list): Declare.
592         (jcf_parse): Adjust for new type of all_class_list.
593         (java_layout_seen_class_methods): Likewise.
594         (predefined_filenames): Declare.
595         (add_predefined_file): Use it.
596         (predefined_filename_p): Likewise.
597         (java_parse_file): Adjust for new type of current_file_list.                                                                                                                                                     *
598
599 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
600
601         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
602         for interfaces.
603
604         PR debug/43260
605         * java-tree.h (pending_static_fields): New extern declaration.
606         (java_write_globals): New prototype.
607         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
608         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
609         of a static field push it into pending_static_fields vector.
610         * class.c (pending_static_fields): New variable.
611         (add_field): If static field is not DECL_EXTERNAL, push it into
612         pending_static_fields vector.
613         (java_write_globals): New function.
614
615 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
616
617         * expr.c (quick_stack): Change type to a VEC.  Update comment.
618         (tree_list_free_list): Delete.
619         (flush_quick_stack): Update for quick_stack type change.
620         (push_value): Likewise.
621         (pop_value): Likewise.
622
623 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
624
625         * java-gimplify.c: Do not include tm.h, toplev.h.
626         * typeck.c: Do not include tm.h.
627         * mangle_name.c: Do not include tm.h.
628         * jcf-dump.c: Do not include tm.h, ggc.h.
629         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
630         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
631         and timevar.h.
632         * jcf-parse.c: Do not include tm.h and tm_p.h.
633         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
634         target.h, and expr.h.
635         * except.c: Do not include tm.h, rtl.h, function.h.
636         * builtins.c: Do not include convert.h.  Explain why RTL headers
637         have to be included here.
638         * verify-glue.c: Do not include tm.h.
639         * jcf-depend.c: Do not include tm.h.
640         * jcf-reader.c: Include ggc.h.
641         * jcf-io.c: Do not include tm.h, toplev.h.
642         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
643         gimple.h.
644         * lang.c: Do not include rtl.h, expr.h.
645         * Make-lang.in: Update dependencies.
646
647 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
648
649         * jcf-parse.c: Include bitmap.h.
650         * Make-lang.in: Update dependencies.
651
652 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
653
654         PR debug/43521
655         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
656         PARM_DECL.
657
658 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
659
660         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
661         build_int_cst_wide_type.
662
663 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
664
665         * expr.c (pop_arguments): Fix use of undeclared variable.
666
667 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
668
669         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
670         build_call_list.
671         (pop_arguments): Return a VEC instead of a tree.  Take a method type
672         rather than a list of argument types.
673         (rewrite_rule): Change signature. of rewrite_arglist member.
674         (rewrite_arglist_getcaller): Update signature.
675         (rewrite_arglist_getclass): Likewise.
676         (maybe_rewrite_invocation): Update for rewrite_arglist change.
677         (build_known_method_ref): Take a VEC instead of a tree.
678         (invoke_build_dtable): Likewise.
679         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
680         instead of build_call_list.
681         (build_jni_stub): Use build_call_vec instead of build_call_list.
682         * java-tree.h (maybe_rewrite_invocation): Update declaration.
683         (build_known_method_ref): Likewise.
684         (invoke_build_dtable): Likewise.
685
686 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
687
688         PR 44103
689         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
690         vector.  Move call to build_constructor...
691         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
692         TREE_CONSTANT on the constructor.
693         (PUSH_SUPER_VALUE): Change first argument to a vector.
694         (PUSH_FIELD_VALUE): Likewise.
695         * resource.c (compile_resource_data): Update calls to above macros.
696         * constants.c (build_constants_constructor): Likewise.
697         * class.c (build_utf8_ref): Likewise.
698         (make_field_value): Likewise.
699         (make_method_value): Likewise.
700         (add_table_and_syms): New function.
701         (make_class_data): Call it.  Update calls to above macros.
702         (build_symbol_table_entry): New function.
703         (build_symbol_entry): Call it.  Update calls to above macros.
704         (emit_symbol_table): Likewise.
705         (make_catch_class_record): Update calls to above macros.
706         (build_assertion_table_entry): New function.
707         (add_assertion_table_entry): Call it.
708         (emit_assertion_table): Likewise.
709
710 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
711
712         PR 40989
713         * lang.c (java_handle_option): Add argument kind.
714
715 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
716
717         * decl.c (java_init_decl_processing): Remove argument in call to
718         initialize_sizetypes
719
720 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
721
722         * exception.cc (_Jv_Throw): Avoid set but not used warning.
723         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
724         sizeof to avoid set but not used warnings.
725
726 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
727
728         * lang.c (java_post_options): Constify variable "dot".
729
730         * jcf-parse.c (set_source_filename): Constify variable "dot".
731         (load_class): Constify variable "separator".
732         Use get_identifier_with_length.
733
734         * jvspec.c (lang_specific_driver): Constify two variables named "p".
735
736 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
737
738         * jcf-dump.c (version): Update copyright notice dates.
739
740 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
741
742         * jvspec.c (lang_specific_driver): Remove unused
743         saw_verbose_flag variable.
744         * jcf-dump.c (main): Remove unused general_purpose_bits
745         variable.
746         * builtins.c (initialize_builtins): Remove unused float_ftype_float
747         variable.
748         * expr.c (java_stack_pop): Remove unused val variable.
749         (build_jni_stub): Remove unused res_type variable.
750         * verify-impl.c (check_field_constant): Remove unused len variable.
751
752 2009-10-20  Joel Dice <dicej@mailsnare.net>
753
754         PR java/28474
755         * mangle_name.c (append_unicode_mangled_name): Fix mangling
756         of names with multiple underscores and "U".
757         (unicode_mangling_length): Likewise.
758
759 2009-10-03  Simon Baldwin  <simonb@google.com>
760
761         * config-lang.in (lang_dirs): Remove zlib.
762
763 2009-09-28  Richard Henderson  <rth@redhat.com>
764
765         * builtins.c (initialize_builtins): Update call to
766         build_common_builtin_nodes.
767         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
768
769 2009-09-14  Richard Henderson  <rth@redhat.com>
770
771         * builtins.c (initialize_builtins): Update call to
772         build_common_builtin_nodes.
773         * decl.c (java_init_decl_processing): Don't call
774         default_init_unwind_resume_libfunc.
775         * except.c: Include tree-iterator.h.
776         (build_exception_object_var): New.
777         (build_exception_object_ref): Use it.
778         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
779         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
780         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
781
782 2009-09-13  Richard Guenther  <rguenther@suse.de>
783         Rafael Avila de Espindola  <espindola@google.com>
784
785         * decl.c (do_nothing): Remove.
786         (java_init_decl_processing): Do not set lang_eh_runtime_type.
787         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
788         * lang.c (java_eh_personality): New.
789         (java_eh_personality_decl): Likewise.
790         (LANG_HOOKS_EH_PERSONALITY): Define.
791
792 2009-09-03  Diego Novillo  <dnovillo@google.com>
793
794         * lang.c (lang_hooks): Remove const qualifier.
795
796 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
797
798         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
799         type.
800
801 2009-09-01  Richard Guenther  <rguenther@suse.de>
802
803         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
804         * java-tree.h (java_mark_addressable): Likewise.
805         * typeck.c (java_mark_addressable): Likewise.
806
807 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
808
809         * Make-lang.in (java.install-pdf): Install gcj.pdf in
810         $(pdfdir)/gcc, alongside the other manuals.
811
812 2009-08-12  Andrew Haley  <aph@redhat.com>
813
814         * builtins.c (compareAndSwapInt_builtin): Use
815         flag_use_atomic_builtins.
816         (compareAndSwapLong_builtin): Likewise.
817         (compareAndSwapObject_builtin): Likewise.
818         * jvspec.c: Add flag_use_atomic_builtins.
819         * gcj.texi: Likewise.
820         * java-tree.h: Likewise.
821         * lang.opt: Likewise.
822
823 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
824
825         PR debug/40990
826         * lang.c (put_decl_node): Outputs different level of information
827         depending on the verbosity level.
828
829 2009-07-31  Andrew Haley  <aph@redhat.com>
830
831         PR java/40867
832         * decl.c (java_replace_references): Set EXPR_LOCATION on all
833         generated expressions.
834         (binding_level.loc): new field.
835         (clear_binding_level): Initialize loc.
836         (set_input_location): New function.
837         (pushlevel): Set new binding_level.loc.
838         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
839         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
840         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
841
842 2009-07-17  Richard Guenther  <rguenther@suse.de>
843
844         PR c/40401
845         * java-gimplify.c (java_genericize): Do not gimplify here.
846         But replace all local references.
847         (java_gimplify_expr): Do not replace local references here.
848         (java_gimplify_modify_expr): Likewise.
849         * jcf-parse.c (java_parse_file): Do not finalize the CU or
850         optimize the cgraph here.
851         * decl.c (java_replace_reference): Make static.
852         (java_replace_references): New function.
853         (end_java_method): Clear base_decl_map.
854         * java-tree.h (java_replace_references): Declare.
855         (java_replace_reference): Remove.
856
857 2009-07-14  Taras Glek  <tglek@mozilla.com>
858             Rafael Espindola  <espindola@google.com>
859
860         * Make-lang.in (java.install-plugin): New target for
861         installing plugin headers.
862
863 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
864
865         * class.c: Replace %J by an explicit location. Update all calls.
866         
867 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
868
869         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
870
871 2009-06-29  Andrew Haley  <aph@redhat.com>
872
873         PR java/40590
874         * java-tree.h (cxx_keyword_p): New declaration.
875         * mangle_name.c (utf8_cmp): Move here from mangle.c.
876         (cxx_keywords): Likewise.
877         (cxx_keyword_p): Likewise.
878         (MANGLE_CXX_KEYWORDS): New macro.
879         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
880         (append_gpp_mangled_name): Likewise.
881         * mangle.c: Move code to mangle_name.c. 
882         (mangle_member_name): Don't call cxx_keyword_p.
883
884 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
885
886         * java-gimplify.c (java_gimplify_block): New argument to
887         build_empty_stmt.
888         * expr.c (force_evaluation_order): Same.
889         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
890         * class.c: Same.
891         * decl.c: Same.
892         * jcf-parse.c: Same.
893         * constants.c: Same.
894         * resource.c: Same.
895         * except.c: Same.
896         * builtins.c: Same.
897         * expr.c: Same.
898         * java-tree.h (PUSH_FIELD): Add location field.
899         
900 2009-06-09  Ian Lance Taylor  <iant@google.com>
901
902         * verify.h: Remove extern "C".
903
904 2009-06-07  Ian Lance Taylor  <iant@google.com>
905
906         * jcf-parse.c (handle_constant): Change local variable 'kind' to
907         unsigned int.
908
909 2009-06-01  Ian Lance Taylor  <iant@google.com>
910
911         * jcf-io.c (find_class): Use CONST_CAST.
912
913 2009-05-27  Ian Lance Taylor  <iant@google.com>
914
915         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
916         $(LINKER).
917         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
918
919 2009-05-26  Ian Lance Taylor  <iant@google.com>
920
921         * Make-lang.in (jvspec.o): Use $(COMPILER).
922         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
923         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
924
925 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
926
927         * Make-lang.in (GCJ): Renamed to...
928         (XGCJ): ... this.
929
930 2009-04-27  Ian Lance Taylor  <iant@google.com>
931
932         * builtins.c (java_builtins): Add casts to enum type.
933         * verify-impl.c (check_class_constant): Add cast to enum type.
934         (check_constant, check_wide_constant): Likewise.
935
936 2009-04-27  Richard Guenther  <rguenther@suse.de>
937
938         PR java/38374
939         * constants.c (build_constants_constructor): Retain the old
940         pointer type as valid TYPE_POINTER_TO after patching the
941         type of the constant pool decl.
942
943 2009-04-24  Ian Lance Taylor  <iant@google.com>
944
945         * jcf-parse.c (handle_constant): Add cast to enum type.
946
947 2009-04-21  Taras Glek <tglek@mozilla.com>
948
949         * builtins.c: Update GTY annotations to new syntax
950         * decl.c: Likewise
951         * java-tree.h: Likewise
952         * jcf.h: Likewise
953         * lang.c: Likewise
954
955 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
956
957         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
958         license notices.
959
960 2009-04-18  Ian Lance Taylor  <iant@google.com>
961
962         * verify-impl.c (verify_instructions_0): Add cast to enum type.
963
964 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
965
966         * builtins.c (compareAndSwapLong_builtin,
967         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
968         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
969
970 2009-03-31  Richard Guenther  <rguenther@suse.de>
971
972         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
973         the first operand of binary and comaprison expressions.
974
975 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
976
977         PR rtl-optimization/323
978         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
979         Give an error for -fexcess-precision=standard for processors where
980         the option is significant.
981
982 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
983
984         * lang.opt: Unify help text for -Wdeprecated.
985
986 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
987
988         * jcf-dump.c (version): Update copyright notice dates.
989
990 2009-01-16  Richard Guenther  <rguenther@suse.de>
991
992         PR tree-optimization/38835
993         PR middle-end/36227
994         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
995
996 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
997
998         PR bootstrap/38262
999         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1000
1001 2008-11-04  Andrew Haley  <aph@redhat.com>
1002
1003         PR java/37068
1004         * jcf-parse.c (java_emit_static_constructor): Don't call
1005         cgraph_build_static_cdtor.  Rewrite.
1006
1007 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
1008
1009         * Make-lang.in (check-java-subtargets): New target.
1010
1011 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
1012
1013         PR target/35483
1014         * Make-lang.in (class.o): Depend on $(TM_P_H).
1015         (expr.o): Same.
1016         * class.c: Include tm_p.h.
1017         * expr.c: Include tm_p.h.
1018
1019 2008-10-14  Andrew Haley  <aph@redhat.com>
1020
1021         * constants.c (build_constant_data_ref): Make sure we only build
1022         one copy of the decl for the constant pool.
1023
1024 2008-09-22  Andrew Haley  <aph@redhat.com>
1025
1026         * expr.c (rules): Add new rule for
1027         gnu.java.lang.VMCPStringBuilder.toString.
1028         (rewrite_rule.new_classname): New field.
1029         (maybe_rewrite_invocation): Use new_classname field instead of
1030         DECL_CONTEXT (*method_p).
1031         Allow rewrite_arglist to be NULL.
1032
1033 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1034
1035         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1036         (java_get_callee_fndecl): Kill.
1037
1038 2008-09-17  Jan Hubicka  <jh@suse.cz>
1039
1040         PR c++/18071
1041         * class.c (add_method_1): Do not initialize DECL_INLINE.
1042         (make_local_function_alias): Likewise.
1043         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1044         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1045
1046 2008-09-09  Richard Guenther  <rguenther@suse.de>
1047
1048         * decl.c (build_result_decl): Remove no longer applicable
1049         promotion.
1050
1051 2008-09-05  David Daney  <ddaney@avtrex.com>
1052
1053         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1054
1055 2008-08-21  David Daney  <ddaney@avtrex.com>
1056
1057         * class.c (make_class_data): Don't add field_index when
1058         flag_reduced_reflection set.
1059
1060 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
1061
1062         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1063
1064 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1065
1066         PR 28875
1067         * lang.c (java_handle_option): Replace set_Wunused with
1068         warn_unused.
1069
1070 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1071
1072         * gcj.texi: Update copyright years.  Do not list GPL as
1073         Invariant Section.
1074
1075 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
1076
1077         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1078         from ctype's sizes.
1079
1080         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1081         alignment.
1082
1083 2008-07-29  Jan Hubicka  <jh@suse.cz>
1084
1085         * lang.c (java_post_options): Remove handling of flag_no_inline.
1086
1087 2008-07-28  Richard Guenther  <rguenther@suse.de>
1088
1089         Merge from gimple-tuples-branch.
1090
1091         2008-07-18  Richard Guenther  <rguenther@suse.de>
1092
1093         * expr.c: Include tree-iterator.h.
1094         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1095
1096         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1097
1098         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1099         * expr.c: Same.
1100
1101         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
1102
1103         * java-gimplify.c (java_gimplify_expr): Same.
1104         (java_gimplify_modify_expr): Same.
1105         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1106
1107         2008-05-02  Diego Novillo  <dnovillo@google.com>
1108
1109         * expr.c (build_java_throw_out_of_bounds_exception): Fix
1110         mixed declarations and code.
1111
1112         2008-05-02  Doug Kwan  <dougkwan@google.com>
1113         
1114         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1115         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1116
1117         2008-02-19  Diego Novillo  <dnovillo@google.com>
1118
1119         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1120
1121         * java-gimplify.c (java_gimplify_self_mod_expr): Change
1122         gimple_seq arguments to gimple_seq *.  Update all users.
1123
1124         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
1125
1126         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1127         sequences.
1128         (java_gimplify_self_mod_expr): Same.                                    
1129         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
1130         sequences.
1131
1132 2008-07-24  Jan Hubicka  <jh@suse.cz>
1133
1134         * java/decl.c: Include cgraph.h
1135         (end_java_method): Remove non-unit-at-a-time code.
1136         (java_mark_decl_local): Likewise; sanity check that we don't touch
1137         finalized nodes.
1138
1139 2008-07-15  Jan Hubicka  <jh@suse.cz>
1140
1141         * lang.c (java_init_options): Enable unit-at-a-time by default.
1142
1143 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1144
1145         * Make-lang.in (jvspec.o): Fix dependencies.
1146
1147 2008-07-06  Tom Tromey  <tromey@redhat.com>
1148
1149         * Make-lang.in (java/parse.o-warn): Remove.
1150         (java/jcf-io.o-warn): Remove.
1151
1152 2008-07-05  Tom Tromey  <tromey@redhat.com>
1153
1154         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
1155         (compare_path): Remove.
1156         (java_or_class_file): Likewise.
1157         (memoized_dirlist_entry): Likewise.
1158         (memoized_dirlist_hash): Likewise.
1159         (memoized_dirlist_lookup_eq): Likewise.
1160         (memoized_dirlists): Likewise.
1161         (caching_stat): Likewise.
1162         (find_class): Use stat.
1163         * jcf.h (JCF_USE_SCANDIR): Remove.
1164
1165 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
1166
1167         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1168         doc/rebuild-gcj-db.1
1169         (java.uninstall): Likewise.
1170         (java.maintainer-clean): Likewise.
1171         (aot-compile.pod): New rule.
1172         (rebuild-gcj-db.pod): New rule.
1173         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1174         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1175
1176 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1177
1178         * Make-lang.in (java/jcf-io.o-warn): New.
1179
1180 2008-06-24  Tom Tromey  <tromey@redhat.com>
1181
1182         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1183         * expr.c (add_type_assertion): Rename argument.
1184         (build_java_arrayaccess): Don't name variable 'throw'.
1185         (ARRAY_NEW_MULTI): Don't name variable 'class'.
1186         * jcf-io.c (find_class): Don't name variable 'class'.
1187         * mangle.c (compression_table_add): Don't name variable 'new'.
1188         * constants.c (cpool_for_class): Rename argument.
1189         (alloc_constant_fieldref): Likewise.
1190         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1191         'class'.
1192         (read_class): Likewise.
1193         (parse_zip_file_entries): Likewise.
1194         (process_zip_dir): Likewise.
1195         * decl.c (java_mark_class_local): Rename argument.
1196         * class.c (GEN_TABLE): Use type_name, not typename.
1197         (gen_indirect_dispatch_tables): Likewise.
1198         (add_field): Rename argument.
1199         (is_compiled_class): Likewise.
1200         (safe_layout_class): Likewise.
1201         (emit_assertion_table): Likewise.
1202         * typeck.c (has_method): Rename argument.
1203
1204 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1205
1206         * class.c (ident_subst, mangled_classname, unmangle_classname,
1207         gen_indirect_dispatch_tables, add_method_1,
1208         build_fieldref_cache_entry, make_local_function_alias,
1209         layout_class, java_treetreehash_find, java_treetreehash_new,
1210         split_qualified_name): Fix for -Wc++-compat.
1211         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1212         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1213         start_java_method): Likewise.
1214         * except.c (prepare_eh_table_type): Likewise.
1215         * expr.c (type_assertion_hash, note_instructions): Likewise.
1216         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1217         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1218         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1219         Likewise.
1220         * jcf-parse.c (reverse, java_read_sourcefilenames,
1221         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1222         process_zip_dir): Likewise.
1223         * jcf-path.c (add_entry, add_path, jcf_path_init,
1224         jcf_path_extdirs_arg): Likewise.
1225         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1226         * jvgenmain.c (do_mangle_classname): Likewise.
1227         * lang.c (put_decl_string): Likewise.
1228         * verify-impl.c (make_state_copy, make_state, add_new_state):
1229         Likewise.
1230
1231 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1232
1233         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1234
1235 2008-06-14  Tom Tromey  <tromey@redhat.com>
1236
1237         PR java/36247:
1238         * class.c (build_class_ref): Initialize this_classdollar when
1239         needed.
1240
1241 2008-05-23  Andrew Haley  <aph@redhat.com>
1242
1243         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1244         pathname of source file.
1245
1246 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1247
1248         * jcf-dump.c (print_constant): Use
1249         HOST_LONG_LONG_FORMAT.
1250
1251 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1252
1253         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1254         DECL_PURE_P.
1255
1256 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1257
1258         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1259         (build_classdollar_field): Don't set TREE_INVARIANT.
1260         (get_dispatch_table): Don't set TREE_INVARIANT.
1261         (make_class_data): Don't set TREE_INVARIANT.
1262         (build_symbol_entry): Don't set TREE_INVARIANT.
1263         (emit_symbol_table): Don't set TREE_INVARIANT.
1264         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1265         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1266         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1267         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1268
1269 2008-04-03  Tom Tromey  <tromey@redhat.com>
1270
1271         * Make-lang.in (java_OBJS): New variable.
1272
1273 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1274
1275         * java-tree.h (insert_block): Kill.
1276         * decl.c (insert_block): Kill.
1277                 
1278 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1279
1280         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1281         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1282         gpl.texi.
1283
1284 2008-03-27  Tom Tromey  <tromey@redhat.com>
1285
1286         * Make-lang.in: Revert automatic dependency patch.
1287
1288 2008-03-25  Tom Tromey  <tromey@redhat.com>
1289
1290         * Make-lang.in: Removed most explicit .o targets.
1291         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1292         ($(GCJ)$(exeext)): Update.
1293         (JAVA_OBJS): New variable.
1294         (JCFDUMP_OBJS): Reformat.
1295         (java_OBJS): New variable.
1296         (java/jvspec.o-warn): Update.
1297         (java/parse.o-warn): Remove.
1298         (JAVA_TREE_H): Remove.
1299         (java/jcf-io.o): Reduce to variable setting.
1300         (ALL_CPPFLAGS): Likewise.
1301
1302 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1303
1304         * mangle.c (java_mangle_decl): Remove dead check.
1305
1306 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1307
1308         * jcf-parse.c (java_parse_file): Assert binding levels are
1309         left in order.
1310         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1311         Delete.
1312
1313 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1314
1315         * jcf-dump.c (version): Update copyright notice dates.
1316
1317 2008-02-29  Tom Tromey  <tromey@redhat.com>
1318
1319         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1320         method.
1321         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1322
1323 2008-02-26  Tom Tromey  <tromey@redhat.com>
1324
1325         * lang.c (java_post_options): Remove conditional.
1326         * expr.c (expand_byte_code): Remove old location code.
1327         * jcf-parse.c (set_source_filename): Remove old location code.
1328         (give_name_to_class): Likewise.
1329         (jcf_parse): Likewise.
1330         (duplicate_class_warning): Likewise.
1331         (parse_class_file): Likewise.
1332         (java_parse_file): Likewise.
1333         * decl.c (finish_method): Remove old location code.
1334         * class.c (push_class): Remove old location code.
1335
1336 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1337
1338         PR other/35107
1339         * Make-lang.in (jc1): Add $(GMPLIBS).
1340
1341 2008-01-23  David Daney  <ddaney@avtrex.com>
1342
1343         * class.c (hide)  Rename to...
1344         (java_hide_decl) ... this throughout, and make public.
1345         * resource.c (Jr_count): Remove.
1346         (compile_resource_data): Call java_mangle_resource_name to generate
1347         decl name.  Make resource decl public and hidden.
1348         * mangle.c (java_mangle_resource_name): New function.
1349         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1350         functions.
1351
1352 2008-01-04  Andrew Haley  <aph@redhat.com>
1353
1354         PR java/17779
1355         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1356         C90.
1357
1358 2008-01-03  Andrew Haley  <aph@redhat.com>
1359
1360         PR java/17779
1361         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1362         we're about to re-layout the type.
1363
1364 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1365
1366         * lang.c (java_classify_record): Don't return
1367         RECORD_IS_INTERFACE for now.
1368
1369 2007-12-18  Andrew Haley  <aph@redhat.com>
1370
1371         PR java/27643
1372         * jcf-parse.c (java_parse_file): Remove call to
1373         java_mark_class_local.
1374         (parse_class_file): Reinstate call to java_mark_class_local here.
1375         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1376         already set, call java_mangle_decl() and make_decl_rtl() to
1377         rewrite its name as a hidden alias.
1378
1379 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1380
1381         PR debug/7081
1382         * lang.c (java_classify_record): New.
1383         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1384
1385 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1386
1387         PR 34081/C++
1388         * decl.c (finish_method): Pass 'false' for the new
1389         allocate_struct_function parameter.
1390
1391 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1392
1393         * expr.c (build_jni_stub): Use the computed jni func type for
1394         variable meth.
1395
1396 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1397
1398         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1399
1400 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1401
1402         * expr.c (type_assertion_hash): Hash type uids rather than
1403         tree pointers.
1404
1405 2007-11-17  David Daney  <ddaney@avtrex.com>
1406             Andrew Haley  <aph@redhat.com>
1407
1408         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1409         insead of BITS_PER_WORD in big-endian work around.
1410
1411 2007-11-07  Tom Tromey  <tromey@redhat.com>
1412
1413         PR java/34019:
1414         * gcj.texi (Input Options): Add missing noun.
1415
1416 2007-11-02  Tom Tromey  <tromey@redhat.com>
1417
1418         PR java/33765:
1419         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1420         * zipfile.h (ZIPEMPTYMAGIC): New define.
1421
1422 2007-11-01  Tom Tromey  <tromey@redhat.com>
1423
1424         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1425         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1426         (java/jcf-io.o): Depend on zipfile.h.
1427
1428 2007-10-17  Richard Guenther  <rguenther@suse.de>
1429
1430         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1431         dependencies.
1432
1433 2007-10-03  Andrew Haley  <aph@redhat.com>
1434
1435         PR java/33639
1436         * class.c (mangled_classname): Detect and replace illegal
1437         characters in assembly language symbols.
1438         (gen_indirect_dispatch_tables): Call mangled_classname() on
1439         the type.
1440
1441 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1442
1443         * lang.c (java_print_error_function): Add third argument.
1444
1445 2007-09-15  Tom Tromey  <tromey@redhat.com>
1446
1447         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1448         Remove.
1449         <init_final>: Likewise.
1450         * lang.c (java_dump_tree): Update.
1451         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1452
1453 2007-09-11  Jan Hubicka <jh@suse.cz>
1454
1455         * decl.c (java_expand_body): Kill.
1456         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1457
1458 2007-09-06  Tom Tromey  <tromey@redhat.com>
1459
1460         * jcf-parse.c (parse_class_file): Re-enter the current file.
1461
1462 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1463
1464         * boehm.c (mark_reference_fields): Move misaligned pointer check
1465         after JREFERENCE_TYPE_P test
1466
1467 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1468
1469         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1470         if pointer is misaligned.
1471
1472 2007-09-06  Tom Tromey  <tromey@redhat.com>
1473
1474         * lang.c (java_post_options): Update.
1475         * jcf-parse.c (set_source_filename): Update.
1476         (give_name_to_class): Update.
1477         (jcf_parse): Update.
1478         (duplicate_class_warning): Update.
1479         (parse_class_file): Update.
1480         (java_parse_file): Update.
1481         * expr.c (expand_byte_code): Update.
1482
1483 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1484
1485         * decl.c (finish_method): Use set_cfun.
1486
1487 2007-09-04  Andrew Haley  <aph@redhat.com>
1488
1489         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1490         when using the ARM EABI.
1491
1492 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1493
1494         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1495
1496 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1497
1498         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1499         CONST_CAST.
1500         * jcf.h (JCF_FINISH): Likewise.
1501
1502 2007-08-28  Tom Tromey  <tromey@redhat.com>
1503
1504         * Make-lang.in (java.tags): Don't tag '*.y' files.
1505
1506 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1507
1508         * lang.c (java_decl_ok_for_sibcall): Likewise.
1509
1510 2007-08-21  Paul Brook  <paul@codesourcery.com>
1511             Nathan Sidwell  <nathan@codesourcery.com>
1512             Mark Mitchell  <mark@codesourcery.com>
1513             Joseph Myers  <joseph@codesourcery.com>
1514
1515         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1516         date.
1517
1518 2007-08-20  Richard Guenther  <rguenther@suse.de>
1519
1520         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1521         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1522
1523 2007-08-17  Tom Tromey  <tromey@redhat.com>
1524
1525         * typeck.c (find_method_in_interfaces): Update.
1526         * jcf-parse.c (load_class): Update.
1527         * java-gimplify.c (java_gimplify_component_ref): Removed.
1528         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1529         arguments.
1530         (java_gimplify_expr): Update.
1531         * decl.c (java_init_decl_processing): Update.
1532         * class.c (set_constant_value): Update.
1533         (make_class_data): Update.
1534         (finish_class): Update.
1535         (build_static_field_ref): Update.
1536         (is_compiled_class): Update.
1537         (maybe_layout_super_class): Update.
1538         (layout_class): Update.
1539         (layout_class_method): Update.
1540         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1541         (lang_decl_var) <am, final_iud, cif>: Removed fields.
1542         (lang_decl_func) <init_calls_this>: Removed field.
1543         (lang_type) <dot_class, verify_method>: Removed fields.
1544         (FIELD_NESTED_ACCESS): Removed.
1545         (FIELD_NESTED_ACCESS_P): Removed.
1546         (DECL_FIELD_FINAL_IUD): Removed.
1547         (DECL_LOCAL_FINAL_IUD): Removed
1548         (LOCAL_FINAL_P): Removed.
1549         (FINAL_VARIABLE_P): Removed.
1550         (CLASS_FINAL_VARIABLE_P): Removed.
1551         (DECL_BIT_INDEX): Removed.
1552         (DECL_INIT_CALLS_THIS): Removed.
1553         (FIELD_LOCAL_ALIAS): Removed.
1554         (FIELD_LOCAL_ALIAS_USED): Removed.
1555         (FIELD_THISN): Removed.
1556         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1557         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1558         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1559         (TYPE_DOT_CLASS): Removed.
1560         (TYPE_VERIFY_METHOD): Removed.
1561         (ID_CLASSDOLLAR_P): Removed.
1562         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1563         Removed.
1564         (classdollar_identifier_node): Removed.
1565         (TYPE_UNKNOWN): Removed.
1566         (CLASS_FROM_SOURCE_P): Removed.
1567         * expr.c (build_jni_stub): Update.
1568         (force_evaluation_order): Update.
1569         (build_java_empty_stmt): Update.
1570         (build_class_init): Update.
1571         (java_stack_swap): Update.
1572         (build_jni_stub): Update.
1573
1574 2007-08-17  Tom Tromey  <tromey@redhat.com>
1575
1576         * java-tree.h (LABEL_TYPE_STATE): Removed.
1577         (load_type_state): Removed.
1578         (LABEL_PC): Removed.
1579         (LABEL_VERIFIED): Removed.
1580         (type_states): Declare.
1581         * expr.c (type_states): New global.
1582         (load_type_state): Now static.  Use type_states.  Changed
1583         argument.
1584         (lookup_label): Don't set LABEL_PC.
1585         (expand_byte_code): Don't use LABEL_VERIFIED.
1586         (note_instructions): Initialize type_states.
1587         * verify-glue.c (vfy_note_stack_depth): Rewrote.
1588         (vfy_note_stack_type): Use type_states.
1589         (vfy_note_local_type): Likewise.
1590
1591 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1592
1593         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1594         * jcf.h (JCF_FINISH): Likewise.
1595
1596 2007-07-31  Nick Clifton  <nickc@redhat.com>
1597
1598         * java-gimplify.c: Change copyright header to refer to version 3
1599         of the GNU General Public License and to point readers at the
1600         COPYING3 file and the FSF's license web page.
1601         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1602         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1603         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1604         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1605         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1606         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1607         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1608
1609 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1610
1611         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1612
1613 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1614
1615         * lang.c (java_get_callee_fndecl): Constify.
1616
1617 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1618
1619         * mangle.c (set_type_package_list): Constify.
1620         * verify-glue.c (vfy_make_string): Delete.
1621         * verify.h (vfy_make_string): Likewise.
1622
1623 2007-07-26  Tom Tromey  <tromey@redhat.com>
1624
1625         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1626         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1627         EXIT_BLOCK_LABELED_BLOCK): Likewise.
1628         * lang.c (java_tree_inlining_walk_subtrees): Update.
1629         (java_dump_tree): Likewise.
1630         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1631         Remove.
1632         * decl.c (push_labeled_block, pop_labeled_block): Remove.
1633         * java-gimplify.c (java_gimplify_labeled_block_expr,
1634         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1635         (java_gimplify_expr): Update.
1636
1637 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1638
1639         * class.c (java_treetreehash_hash, java_treetreehash_compare):
1640         Constify. 
1641         * expr.c (type_assertion_eq): Likewise.
1642         * jcf-io.c (compare_path): Likewise.
1643         * jcf-parse.c (cmpstringp): Likewise.
1644         * verify-impl.c (get_one_type, compute_argument_types,
1645         compute_return_type): Likewise. 
1646
1647 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1648
1649         PR target/32462
1650         PR libgcj/32465
1651         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1652
1653 2007-07-12  Richard Guenther  <rguenther@suse.de>
1654
1655         * expr.c (expand_java_return): RETURN_EXPR has void type.
1656         (build_jni_stub): Likewise.  Use a comparison against zero
1657         for null-pointer test in COND_EXPR.
1658         (build_field_ref): Build POINTER_PLUS_EXPR with correct
1659         type.  Convert result instead.
1660         (build_invokevirtual): Likewise.
1661
1662 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1663
1664         PR 32617
1665         * lang.c (java_init): Remove setting of force_align_functions_log.
1666         * class.c (add_method_1): Set DECL_ALIGN of non-static method
1667         to cope with ptrmemfunc_vbit_in_pfn.
1668
1669 2007-07-03  David Daney  <ddaney@avtrex.com>
1670
1671         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
1672         include path.
1673         (doc/gcj.dvi): Same.
1674         (doc/gcj.pdf): Same.
1675         (java/index.html): Same.
1676
1677 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
1678
1679         * class.c (make_class_data): Build the index in sizetype.
1680         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1681         adding to a pointer type.
1682         (build_symbol_entry): Likewise.
1683         * expr.c (build_java_arrayaccess): Likewise.
1684         (build_field_ref): Likewise.
1685         (build_known_method_ref): Likewise.
1686         (build_invokevirtual): Likewise.
1687         * except.c (build_exception_object_ref): Do a
1688         NEGATIVE and then a POINTER_PLUS_EXPR instead
1689         of a MINUS_EXPR.
1690
1691 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
1692
1693         * typeck.c (java_signed_type): Remove.
1694         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1695         * java-tree.h (java_signed_type): Remove.
1696
1697 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1698
1699         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1700         (print_constant): Likewise.
1701
1702 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
1703
1704         * expr.c (build_java_binop): Use unsigned_type_for instead of
1705         java_unsigned_type.
1706         * java-tree.h (java_unsigned_type): Remove.
1707         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1708         * typeck.c (java_unsigned_type): Remove.
1709
1710 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1711
1712         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1713         instead of checking GIMPLE_STMT_P in chain_next.
1714
1715 2007-04-06  Colin Walters  <walters@redhat.com>
1716
1717         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1718         * jcf-io.c (open_class): Copy 'filename'.
1719
1720 2007-04-03  Andrew Haley  <aph@redhat.com>
1721
1722         * jvgenmain.c (main): Change main to use class$, not class$$.
1723         (do_mangle_classname): Likewise.
1724         * class.c (hide): New function.
1725         (add_field): Hide everything that shouldn't be visible outside a
1726         DSO.
1727         (build_static_class_ref): Likewise.
1728         (build_classdollar_field): Likewise.
1729         (make_class_data): Likewise.
1730         (layout_class_method): Likewise.
1731         * expr.c (special_method_p): New function.
1732
1733         * class.c (push_class): Don't bogusly guess the source filename.
1734         * jcf-parse.c (give_name_to_class): Don't set input_location from
1735         DECL_ARTIFICIAL decls.
1736
1737 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1738
1739         * typeck.c (java_signed_or_unsigned_type): Removed.
1740         (java_signed_type): use get_signed_or_unsigned_type instead of
1741         java_signed_or_unsigned_type.
1742         (java_unsigned_type): Ditto.
1743         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1744         * java-tree.h (java_signed_or_unsigned_type): Removed.
1745
1746 2007-03-26  Tom Tromey  <tromey@redhat.com>
1747
1748         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1749         (java.maintainer-clean): Likewise.
1750         (java.install-man): Likewise.
1751         (.INTERMEDIATE): Removed grmiregistry.pod.
1752         (grmiregistry.pod): Removed.
1753         * gcj.texi (Invoking gcjh): Removed.
1754         (Invoking gjnih): Likewise.
1755         (Invoking grmiregistry): Likewise.
1756         (direntry): Updated.
1757         (Top): Likewise.
1758         (which-gcj): Removed.
1759
1760 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1761
1762         * Make-lang.in: Add install-pdf target as copied from
1763         automake v1.10 rules.
1764
1765 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1766
1767         * gcj.texi: Standardize title page.
1768
1769 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1770
1771         * class.c: Fix a comment typo.
1772
1773 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1774             Brooks Moses  <brooks.moses@codesourcery.com>
1775             Lee Millward  <lee.millward@codesourcery.com>
1776
1777         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1778         of build3.
1779         (BUILD_MONITOR_EXIT): Likewise.
1780
1781         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1782         (java_gimplify_modify_expr): Likewise.
1783
1784         * class.c (cache_this_class_ref): Use build_call_expr.
1785         (build_static_field_ref): Likewise.
1786         (emit_indirect_register_classes): Likewise.
1787         (emit_register_classes): Likewise.
1788
1789         * resource.c (write_resource_constructor): Use build_call_expr.
1790
1791         * builtins.c (builtin_creator_function): Change interpretation of
1792         the second parameter to be the whole CALL_EXPR instead of the arglist.
1793         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1794         (min_builtin): Likewise.
1795         (abs_builtin): Likewise.
1796         (java_build_function_call_expr): Likewise.
1797         (convert_real): Likewise.
1798         (UNMARSHAL3): Likewise.
1799         (UNMARSHAL4): Likewise.
1800         (UNMARSHAL5): Likewise.
1801         (build_arglist_for_builtin): Delete.  Fix callers to use
1802         build_call_expr instead.
1803         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1804         accessors.
1805         (compareAndSwapInt_builtin): Likewise.
1806         (compareAndSwapLong_builtin): Likewise.
1807         (compareAndSwapObject_builtin): Likewise.
1808         (putVolatile_builtin): Likewise.
1809         (getVolatile_builtin): Likewise.
1810         (VMSupportsCS8_builtin): Likewise.
1811         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1812         instead of arglist.
1813
1814         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1815         (build_java_throw_out_of_bounds_exception): Likewise.
1816         (java_check_reference): Likewise.
1817         (build_java_arraystore_check): Likewise.
1818         (build_newarray): Likewise.
1819         (build_anewarray): Likewise.
1820         (expand_java_multinewarray): Use build_call_list instead of build3.
1821         (build_java_monitor): Use build_call_nary instead of build3.
1822         (java_create_object): Likewise.
1823         (expand_java_NEW): Likewise.
1824         (build_instanceof): Likewise.
1825         (expand_java_CHECKCAST): Likewise.
1826         (build_java_soft_divmod): Likewise.
1827         (build_java_binop): Likewise.
1828         (build_field_ref): Likewise.
1829         (build_class_init): Likewise.
1830         (rewrite_arglist_getcaller): Use build_call_expr.
1831         (build_invokeinterface):  Use build_call_nary instead of build3.
1832         (expand_invoke): Use build_call_list instead of build3.
1833         (build_jni_stub): Use build_call_nary, build_call_list, or
1834         build_call_expr instead of build3.
1835         (expand_java_field_op): Use build_call_expr instead of build3.
1836         (force_evaluation_order): Use new CALL_EXPR accessors.
1837
1838         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1839
1840 2007-02-15  David Daney  <ddaney@avtrex.com>
1841
1842         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1843         (java.maintainer-clean):Add gc-analyze.1.
1844         (.INTERMEDIATE): Add gc-analyze.pod.
1845         (gc-analyze.pod): New rule.
1846         (java.install-man): Install gc-analyze.1
1847         * gcj.texi: Add new section for the gc-analyze program.
1848
1849 2007-02-07  Andrew Haley  <aph@redhat.com>
1850
1851         * class.c (uncache_this_class_ref): New.
1852         * expr.c (build_jni_stub): Initialize the class.
1853         (expand_byte_code): Call uncache_this_class_ref after generating
1854         code.
1855
1856 2007-02-06  Tom Tromey  <tromey@redhat.com>
1857
1858         PR java/30714:
1859         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1860
1861 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1862
1863         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1864
1865 2007-02-02  Andrew Haley  <aph@redhat.com>
1866
1867         * expr.c (expand_byte_code): Call cache_this_class_ref() and
1868         cache_cpool_data_ref().
1869         Set TYPE_CPOOL_DATA_REF.
1870         (cache_cpool_data_ref): New function.
1871         * constants.c (build_ref_from_constant_pool): Remove special-case
1872         code for flag_indirect_classes.
1873         (build_constant_data_ref): Move special-case code for
1874         flag_indirect_classes here from build_ref_from_constant_pool.
1875         * decl.c (finish_method): Move class initialization from here to
1876         cache_this_class_ref.
1877         * class.c (cache_this_class_ref): New function.
1878         (build_class_ref): Use this_classdollar for the ouput class.
1879
1880 2007-02-02  David Daney  <ddaney@avtrex.com>
1881
1882         * class.c (is_compiled_class): Move check to avoid reloading
1883         current class.
1884         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1885         already set.
1886
1887 2007-02-01  Andrew Haley  <aph@redhat.com>
1888
1889         PR java/30641
1890         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1891
1892 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1893
1894         * class.c, jcf-parse.c: Fix comment typos.
1895
1896 2007-01-30  Tom Tromey  <tromey@redhat.com>
1897
1898         * gcj.texi (Strings): Fix documentation for JvNewString.
1899
1900 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1901
1902         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1903         typos.
1904
1905 2007-01-30  Ben Elliston  <bje@au.ibm.com>
1906
1907         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1908
1909 2007-01-29  Tom Tromey  <tromey@redhat.com>
1910
1911         PR java/30607:
1912         * jvspec.c (lang_specific_driver): Handle separate -I argument.
1913         * lang.opt (-I): Add 'Separate'.
1914
1915 2007-01-29  Andrew Haley  <aph@redhat.com>
1916
1917         * class.c (add_method_1): Mark fndecl as external unless we are
1918         compiling it into this object file.
1919
1920 2007-01-24  Andrew Haley  <aph@redhat.com>
1921
1922         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1923         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1924
1925 2007-01-22  Andrew Haley  <aph@redhat.com>
1926
1927         * builtins.c (VMSupportsCS8_builtin): New function.
1928
1929 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1930
1931         PR java/30454
1932         * jcf-io.c (opendir_in_zip): Close the file
1933         and free zipf before returning after an error.
1934
1935 2007-01-16  Tom Tromey  <tromey@redhat.com>
1936
1937         * java-tree.def: Added copyright header.
1938
1939 2007-01-15  Tom Tromey  <tromey@redhat.com>
1940
1941         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1942         case.
1943         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1944         Removed case.
1945         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1946         (EXPR_WFL_NODE): Likewise.
1947         (EXPR_WFL_LINECOL): Likewise.
1948         (EXPR_WFL_FILENAME): Likewise.
1949         (EXPR_WFL_LINENO): Likewise.
1950         (build_expr_wfl, expr_add_location): Don't declare.
1951         (build_unknown_wfl): Removed.
1952         (EXPR_WFL_FILENAME_NODE): Removed.
1953         (EXPR_WFL_COLNO): Removed.
1954         (EXPR_WFL_SET_LINECOL): Removed.
1955         (DECL_FUNCTION_WFL): Removed.
1956         (DECL_FIELD_FINAL_WFL): Removed.
1957         (struct lang_decl_func) <wfl>: Removed field.
1958         <called_constructor>: Likewise.
1959         <inner_access>: Likewise.
1960         (struct lang_decl_var) <wfl>: Removed field.
1961         (DECL_CONSTRUCTOR_CALLS): Removed.
1962         (DECL_FUNCTION_ACCESS_DECL): Likewise.
1963         (DECL_FUNCTION_INNER_ACCESS): Likewise.
1964         (DECL_SPECIFIC_COUNT): Likewise.
1965         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1966         * expr.c (build_expr_wfl): Removed.
1967         (expr_add_location): Likewise.
1968
1969 2007-01-12  Tom Tromey  <tromey@redhat.com>
1970
1971         * jcf-dump.c (main): Updated call to find_class.
1972         * lang.c (java_init): Removed dead code.
1973         * jcf-parse.c (read_class): Don't use java_source field.  Removed
1974         dead code.
1975         (parse_zip_file_entries): Don't use java_source field.
1976         (process_zip_dir): Likewise.
1977         (jcf_parse): Removed dead code.
1978         (java_parse_file): Likewise.
1979         (read_class): Updated call to find_class.
1980         * jcf-io.c (find_class): Don't use java_source field.  Removed
1981         'source_ok' argument, .java logic.
1982         * jcf.h (JCF) <java_source>: Removed field.
1983         (JCF_ZERO): Updated.    (find_class): Updated.
1984         * decl.c: Removed dead code.
1985         * class.c: Removed dead code.
1986
1987 2007-01-11  Tom Tromey  <tromey@redhat.com>
1988
1989         * typeck.c (convert): Don't use flag_emit_class_files.
1990         * lang.c (java_post_options): Don't use flag_emit_class_files.
1991         (java_handle_option): Don't use flag_extraneous_semicolon or
1992         flag_redundant.
1993         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1994         flag_emit_class_files.
1995         (load_class): Likewise.
1996         * java-tree.h (flag_emit_class_files): Don't declare.
1997         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1998         (flag_extraneous_semicolon): Don't declare.
1999         (flag_not_overriding): Likewise.
2000         (flag_static_local_jdk1_1): Likewise.
2001         (flag_redundant): Likewise.
2002         * expr.c (build_newarray): Don't use flag_emit_class_files.
2003         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2004         flag_emit_class_files.
2005         (build_class_ref): Likewise.
2006         * builtins.c (check_for_builtin): Don't use
2007         flag_emit_class_files.
2008
2009 2007-01-10  Tom Tromey  <tromey@redhat.com>
2010
2011         * lang.c (java_can_use_bit_fields_p): Removed.
2012         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2013
2014 2007-01-09  Andrew Haley  <aph@redhat.com>
2015
2016         * expr.c (build_java_arrayaccess): Rewrite to generate array
2017         access in canonical form.
2018         (expand_java_arraystore): Use build_fold_addr_expr() on address of
2019         array access.
2020
2021 2007-01-03  Andrew Haley  <aph@redhat.com>
2022
2023         PR java/28754
2024         * expr.c (expand_java_field_op): If we're initializing a field's
2025         declaring interface we should not also initialize the class
2026         context in which it was referenced.
2027
2028 2007-01-02  Tom Tromey  <tromey@redhat.com>
2029
2030         * java-tree.h (compiling_from_source, current_encoding,
2031         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2032         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2033         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2034         JTI_WFL_OPERATOR): Removed
2035         (finit_identifier_node, instinit_identifier_node,
2036         length_identifier_node, super_identifier_node,
2037         continue_identifier_node, access0_identifier_node, wfl_operator):
2038         Removed.
2039         (cyclic_inheritance_report,
2040         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2041         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2042         DECL_FIXED_CONSTRUCTOR_P): Removed.
2043         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2044         Removed.
2045         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2046         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2047         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2048         import_list, import_demand_list>: Removed.
2049         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2050         cxx_keyword_p): Removed.
2051         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2052         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2053         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2054         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2055         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2056         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2057         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2058         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2059         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2060         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2061         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2062         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2063         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2064         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2065         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2066         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2067         java_parse_abort_on_error, extract_field_decl): Removed.
2068         (finput): Declare.
2069         * lang.c: (compiling_from_source, current_encoding): Removed.
2070         (java_handle_option): Ignore -fencoding.
2071         * parse.h: Don't include lex.h.
2072         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2073         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2074         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2075         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2076         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2077         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2078         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2079         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2080         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2081         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2082         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2083         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2084         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2085         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2086         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2087         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2088         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2089         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2090         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2091         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2092         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2093         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2094         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2095         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2096         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2097         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2098         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2099         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2100         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2101         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2102         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2103         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2104         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2105         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2106         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2107         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2108         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2109         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2110         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2111         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2112         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2113         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2114         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2115         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2116         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2117         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2118         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2119         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2120         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2121         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2122         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2123         SET_CPC_STATIC_INITIALIZER_STMT,
2124         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2125         java_complete_class, java_check_circular_reference,
2126         java_fix_constructors, java_layout_classes, java_reorder_fields,
2127         java_method_add_stmt, java_get_line_col, reset_report,
2128         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2129         java_finish_classes, ctxp, ctxp_for_generation,
2130         ctxp_for_generation_last): Removed.
2131         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2132         * mangle.c (utf8_cmp): New function.
2133         (cxx_keywords): New global.
2134         (cxx_keyword_p): New function.
2135         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2136         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2137         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2138         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2139         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2140         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2141         * Make-lang.in (java.srcextra): Do nothing.
2142         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2143         (JAVA_OBJS): Don't mention deleted files.
2144         (java.mostlyclean): Likewise.
2145         (java.clean): Likewise.
2146         (JAVA_LEX_C): Removed.
2147         (buffer.o, check-init.o, parse.o): Remove unused targets.
2148         (typeck.o): Updated.
2149         * jcf-parse.c (read_class): Comment out unused code.
2150         (java_layout_seen_class_methods): New function.
2151         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2152         Removed.
2153         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
2154         (init_jcf_parse): Removed.
2155         * config-lang.in (gtfiles): Remove deleted files.
2156         * decl.c (java_init_decl_processing): Don't initialize
2157         finit_identifier_node, instinit_identifier_node,
2158         length_identifier_node, super_identifier_node,
2159         continue_identifier_node, access0_identifier_node.  Don't call
2160         init_jcf_parse.
2161         * class.c (cyclic_inheritance_report): New global.
2162         (add_method_1): Don't use
2163         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2164         (maybe_layout_super_class): Comment out code.
2165         (safe_layout_class): New function.
2166         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2167         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2168         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2169         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2170         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2171         (java_gimplify_case_expr): Removed.
2172         (java_gimplify_default_expr): Likewise.
2173         (java_gimplify_new_array_init): Likewise.
2174         * parse.y: Removed.
2175         * keyword.gperf, keyword.h: Removed.
2176         * chartables.h: Removed.
2177         * check-init.c: Removed.
2178         * buffer.c, buffer.h: Removed.
2179         * convert.h: Removed.
2180         * gen-table.pl: Removed.
2181         * lex.c, lex.h: Removed.
2182
2183 2007-01-02  Andrew Haley  <aph@redhat.com>
2184
2185         * expr.c (expand_java_arraystore): Make sure we perform a bounds
2186         check at runtime before we perform a type check.
2187
2188 2006-12-19  Andrew Haley  <aph@redhat.com>
2189
2190         * decl.c: Bump minor BC ABI version.
2191
2192 2006-12-13  Gary Benson  <gbenson@redhat.com>
2193
2194         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2195
2196 2006-12-12  Tom Tromey  <tromey@redhat.com>
2197
2198         * lang-specs.h: Pass -M options to jc1.
2199         * jcf-depend.c (jcf_dependency_add_file): Don't emit
2200         dependencies.
2201
2202 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
2203
2204         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2205
2206 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
2207
2208         * lang-specs.h: Pass '%U'-based options as separate arguments.
2209
2210 2006-12-05  Tom Tromey  <tromey@redhat.com>
2211
2212         PR java/29495:
2213         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2214         classes as well.
2215         * class.c (add_field): Handle ACC_SYNTHETIC.
2216         (add_method_1): Likewise.  Handle bridge and varargs.
2217         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2218         annotation.
2219         (set_class_decl_access_flags): Handle synthetic and annotation.
2220         * java-tree.h (METHOD_BRIDGE): New macro.
2221         (METHOD_VARARGS): Likewise.
2222         (TYPE_SYNTHETIC): Likewise.
2223         (TYPE_ANNOTATION): Likewise.
2224         (lang_type): New fields 'synthetic' and 'annotation'.
2225         (lang_decl_func): New fields 'varargs' and 'bridge'.
2226
2227 2006-12-04  Andrew Haley  <aph@redhat.com>
2228
2229         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2230         there's no map.
2231
2232 2006-11-29  Gary Benson  <gbenson@redhat.com>
2233
2234         * expr.c (rewrite_arglist_getcaller): Reorder.
2235
2236 2006-11-29  Andrew Haley  <aph@redhat.com>
2237
2238         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2239         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2240
2241 2006-11-23  Andrew Haley  <aph@redhat.com>
2242
2243         * expr.c (rewrite_arglist_getcaller): New.
2244         (rewrite_arglist_getclass): Fix indentation.
2245         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
2246         gnu.classpath.VMStackWalker.getCallingClassLoader().
2247         * builtins.c (initialize_builtins): Remove duplicate def'n of
2248         __sync_synchronize.
2249         Add __builtin_return_address.
2250
2251 2006-11-22  Andrew Haley  <aph@redhat.com>
2252
2253         * jcf-reader.c (get_attribute): Mark attr_type unused.
2254
2255         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2256
2257 2007-01-08  Richard Guenther  <rguenther@suse.de>
2258
2259         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2260         * jcf-parse.c (get_constant): Likewise.
2261
2262 2006-11-12  Jan Hubicka  <jh@suse.cz>
2263
2264         * resource.c (compile_resource_data): Update for new varpool names.
2265         * java/class.c (build_utf8_ref): Likewise.
2266
2267 2006-11-12  David Daney  <ddaney@avtrex.com>
2268
2269         PR java/29805
2270         * typeck.c (build_java_array_type): Increase buffer sizes.
2271
2272 2006-11-11  Richard Guenther  <rguenther@suse.de>
2273
2274         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2275         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2276
2277 2006-11-06  Andrew Haley  <aph@redhat.com>
2278
2279         * java-tree.h (CONSTANT_LazyFlag): New.
2280         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2281         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2282         reflection_data.
2283         (handle_constant): Return 0 for dummy cpool entries.
2284         Handle constants of kind Class.
2285         Handle constants of kind NameAndType.
2286         (handle_enclosingmethod_attribute): New.
2287         (handle_signature_attribute): New.
2288         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2289         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2290         (handle_constant): Use unmangle_classname()rather than calling
2291         identifier_subst() directly.
2292
2293 2006-11-02  Andrew Haley  <aph@redhat.com>
2294
2295         * java-tree.h (FIELD_ENUM): New.
2296         (lang_decl_var.field_enum): New.
2297         (lang_type.enum_class): New.
2298         (CLASS_ENUM): New.
2299         * class.c (set_class_decl_access_flags): Handle enum types.
2300         (add_field): Handle enum fields.
2301         (get_access_flags_from_decl): Likewise.
2302
2303         * class.c (make_class_data): Put reflection_data into rodata.
2304
2305 2006-11-01  Andrew Haley  <aph@redhat.com>
2306
2307         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2308         (jcf_parse): Write end marker to annotation_data.
2309         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2310         (annotation_grow, annotation_rewrite_byte) 
2311         (annotation_rewrite_short, annotation_rewrite_int) 
2312         (annotation_read_short, annotation_write_byte) 
2313         (annotation_write_short, annotation_write_int) 
2314         (handle_long_constant, handle_constant, handle_element_value) 
2315         (handle_annotation, handle_annotations) 
2316         (handle_annotation_attribute, rewrite_reflection_indexes) 
2317         (handle_member_annotations, handle_parameter_annotations) 
2318         (handle_default_annotation): New functions.
2319         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
2320         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
2321         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2322         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2323         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2324         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
2325         (TYPE_REFLECTION_DATA): New.
2326         (TYPE_REFLECTION_DATASIZE): New.
2327         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2328         an enum.
2329         * jcf-reader.c (get_attribute): Pass field/method index and
2330         attribute type to get_attribute().
2331         * constants.c (find_class_or_string_constant): Make nonstatic.
2332         (cpool_for_class): Likewise.
2333         (build_constants_constructor): Separate string and scalar types.
2334         * class.c (make_class_data): Generate field_indexes permutation.
2335         Pass it to rewrite_reflection_indexes().
2336         (make_class_data): Generate constructor for reflection_data field.
2337
2338 2006-10-20  Tom Tromey  <tromey@redhat.com>
2339
2340         * gcj.texi (Top): Don't mention jv-scan.
2341         (Invoking gcj): Likewise.
2342         (Invoking gcjh): Likewise.
2343         (Invoking gjnih): Likewise.
2344         (Invoking gij): Likewise.
2345         (Invoking gcj-dbtool): Likewise.
2346         (Invoking jv-scan): Removed.
2347         * parse-scan.y: Removed.
2348         * jv-scan.c: Removed.
2349         * config-lang.in (stagestuff): Don't mention jv-scan.
2350         * Make-lang.in (java): Removed jv-scan.
2351         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2352         (JVSCAN_OBJS): Removed.
2353         (jv-scan$(exeext)): Likewise.
2354         (JAVA_MANFILES): Removed jv-scan.1.
2355         (java.uninstall): Don't mention jv-scan.
2356         (java.mostlyclean): Likewise.
2357         (java.maintainer-clean): Likewise.
2358         (.INTERMEDIATE): Likewise.
2359         (java/jv-scan.o): Removed.
2360         (jv-scan.pod): Likewise.
2361         (java.srcextra): Don't mention parse-scan.c.
2362         (java.mostlyclean): Likewise.
2363         (java/parse-scan.c): Removed.
2364         (java/parse-scan.o-warn): Removed.
2365         (java/parse-scan.o): Removed.
2366
2367 2006-10-20  Tom Tromey  <tromey@redhat.com>
2368
2369         * lang.c (java_handle_option): Don't use
2370         jcf_write_base_directory.
2371         * jcf.h (jcf_write_base_directory): Removed.
2372         * parse.y (java_expand_classes): Don't call write_classfile.
2373         * config-lang.in (gtfiles): Removed jcf-write.c.
2374         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2375         (java/jcf-write.o): Removed.
2376         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2377         * java-tree.h (write_classfile): Removed declaration.
2378         * jcf-write.c: Removed.
2379
2380 2006-10-20  Tom Tromey  <tromey@redhat.com>
2381
2382         * Make-lang.in (java): Removed gjnih, gcjh.
2383         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2384         (GCJH_OBJS): Removed.
2385         (GJNIH_OBJS): Likewise.
2386         (gjnih$(exeext)): Likewise.
2387         (gcjh$(exeext)): Likewise.
2388         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2389         (java.install-common): Don't special case gcjh.
2390         (java.uninstall): Don't mention gcjh, gjnih.
2391         (java.mostlyclean): Likewise.
2392         (java.maintainer-clean): Likewise.
2393         (.INTERMEDIATE): Likewise.
2394         (gcjh.pod): Removed.
2395         (gjnih.pod): Likewise.
2396         (GCJH_TARGET_INSTALL_NAME): Removed.
2397         (java/gjavah-jni.o): Removed.
2398         (java/gjavah.o): Likewise.
2399         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2400         * gjavah.c: Removed.
2401
2402 2006-10-17  Tom Tromey  <tromey@redhat.com>
2403
2404         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2405         "string" case.
2406
2407 2006-10-17  Tom Tromey  <tromey@redhat.com>
2408
2409         * jvgenmain.c (main): Handle -findirect-dispatch.
2410         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2411         jvgenmain.
2412
2413 2006-10-06  Andrew Haley  <aph@redhat.com>
2414
2415         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2416         have a compare_and_swap builtin.
2417         (compareAndSwapLong_builtin): Likewise.
2418         (compareAndSwapObject_builtin): Likewise.
2419
2420 2006-10-04  Andrew Haley  <aph@redhat.com>
2421
2422         * builtins.c (java_builtins): Add compareAndSwapInt,
2423         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2424         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2425         putObjectVolatile, getObjectVolatile, getIntVolatile,
2426         getLongVolatile, getLong.
2427         (UNMARSHAL3): New macro.
2428         (UNMARSHAL4): Likewise.
2429         (UNMARSHAL5): Likewise.
2430         (build_arglist_for_builtin): New function.
2431         (build_addr_sum, build_check_this): New functions.
2432         (putObject_builtin. compareAndSwapInt_builtin,
2433         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2434         putVolatile_builtin, getVolatile_builtin): New builtins.
2435
2436 2006-06-08  Andrew Haley  <aph@redhat.com>
2437  
2438         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2439         get_symbol_table_index().
2440         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2441         private method.
2442         (build_known_method_ref): New arg: special.  Pass it to
2443         get_symbol_table_index.
2444         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2445         the method list.
2446         (build_invokevirtual): New arg: special.  Pass it to
2447         get_symbol_table_index.
2448         (expand_invoke): New variable: special.
2449         Pass it to maybe_rewrite_invocation().
2450         Pass it to build_known_method_ref().
2451         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2452         build the symbol table conbstructor.
2453         (emit_symbol_table): Extract SPECIAL from the method list and pass
2454         it to build_symbol_entry().
2455         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2456         special accordingly.
2457  
2458 2006-09-08  Andrew Haley  <aph@redhat.com>
2459
2460         * class.c (layout_class_method): Use build_java_signature, not
2461         build_java_argument_signature.  Use lookup_java_method, not
2462         lookup_argument_method.
2463
2464 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2465             Bryce McKinlay  <bryce@mckinlay.net.nz>
2466
2467         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2468
2469 2006-07-18  Tom Tromey  <tromey@redhat.com>
2470
2471         * lang.opt: Added missing -W options.
2472
2473 2006-07-12  Tom Tromey  <tromey@redhat.com>
2474
2475         PR java/28329:
2476         * lang-specs.h: Pass '%U'-based options as separate arguments.
2477         Use -faux-classpath.
2478         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2479         * lang.opt (faux-classpath): New option.
2480
2481 2006-07-07  Tom Tromey  <tromey@redhat.com>
2482
2483         * class.c (make_class_data): Set value for reflection_data field.
2484         * decl.c (java_init_decl_processing): Add reflection_data field.
2485
2486 2006-07-07  Tom Tromey  <tromey@redhat.com>
2487
2488         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2489         earlier.
2490         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2491
2492 2006-07-07  Andrew Haley  <aph@redhat.com>
2493
2494         * jcf-parse.c (set_source_filename): Don't check for
2495         CLASS_FROM_CURRENTLY_COMPILED_P.
2496         Remove // comments.
2497
2498 2006-07-07  Andrew Haley  <aph@redhat.com>
2499
2500         * java-tree.h (java_read_sourcefilenames): Declare.
2501         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2502         * lang.opt (fsource-filename): New opt.
2503         * lang-specs.h: Add -fsource-filename.
2504         * jcf-parse.c (num_files, filenames): New variables.
2505         (reverse, cmpstringp, java_read_sourcefilenames,
2506         find_sourcefile): New.
2507         (set_source_filename): Call find_sourcefile to find the real name
2508         of a source file.
2509
2510 2006-06-27  Tom Tromey  <tromey@redhat.com>
2511
2512         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2513         Signature, LocalVariableTypeTable, annotation attributes.
2514         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2515         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2516         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2517         (HANDLE_METHOD): Likewise.
2518         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2519         (print_annotation): New function.
2520         (print_element_value): Likewise.
2521         (indent): Likewise.
2522         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2523         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2524         (print_parameter_annotations): New function.
2525         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2526         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2527         Likewise.
2528         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2529         (print_annotations): New function.
2530
2531 2006-06-23  Tom Tromey  <tromey@redhat.com>
2532
2533         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
2534         emitting class files, always use 1.5.
2535         * gcj.texi (Input Options): Document -fsource.
2536         (Code Generation): Document -ftarget.
2537
2538 2006-06-21  Tom Tromey  <tromey@redhat.com>
2539
2540         PR java/28089:
2541         * expr.c (expand_java_field_op): Initialize field's declaring
2542         class.
2543
2544 2006-06-20  Tom Tromey  <tromey@redhat.com>
2545
2546         * expr.c (push_value): Always flush quick stack.
2547
2548 2006-06-19  Tom Tromey  <tromey@redhat.com>
2549
2550         * expr.c (push_value): Also flush quick stack if value is a
2551         component_ref.
2552
2553 2006-06-19  Tom Tromey  <tromey@redhat.com>
2554
2555         * expr.c (push_value): Flush quick stack if value has side
2556         effects.
2557
2558 2006-06-13  Tom Tromey  <tromey@redhat.com>
2559
2560         * class.c (is_compiled_class): Explicitly check for current
2561         class.
2562
2563 2006-06-09  Tom Tromey  <tromey@redhat.com>
2564
2565         * gjavah.c (decompile_method): Don't decompile a static field
2566         accessor method.
2567
2568 2006-06-06  Tom Tromey  <tromey@redhat.com>
2569
2570         * lang-specs.h <jc1>: Add .jar file to command line if
2571         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
2572
2573 2006-06-05  Tom Tromey  <tromey@redhat.com>
2574
2575         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2576         synthetic, enum, annotation.
2577         * jcf.h (ACC_BRIDGE): New macro.
2578         (ACC_VARARGS): Likewise.
2579         (ACC_SYNTHETIC): Likewise.
2580         (ACC_ENUM): Likewise.
2581         (ACC_ANNOTATION): Likewise.
2582
2583 2006-06-04  Tom Tromey  <tromey@redhat.com>
2584
2585         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2586         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2587         and -ftarget.
2588         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
2589         when needed.  Handle classpath-setting.
2590         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2591         * lang-specs.h: Rewrote.
2592
2593 2006-06-04  Tom Tromey  <tromey@redhat.com>
2594
2595         * jcf-io.c (find_class): Set source_ok to 0.
2596         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2597         (parse_class_file): Don't call java_mark_class_local.
2598         (java_parse_file): Skip .java files.  Call java_mark_class_local
2599         before lowering any code.
2600         (parse_zip_file_entries): Don't call duplicate_class_warning
2601         here.
2602         (process_zip_dir): ... call it here.
2603         * class.c (add_field): Don't mark field external if it is being
2604         compiled into this object.
2605         (make_class_data): Handle situation where class_dtable_decl is
2606         created before Class is compiled.
2607         (is_compiled_class): Don't assume files in zip are compiled into
2608         this object.
2609         (layout_class_method): Don't mark method external if it is being
2610         compiled into this object.
2611
2612 2006-06-04  Tom Tromey  <tromey@redhat.com>
2613
2614         * jcf-path.c (jcf_path_compute): New function.
2615         * jcf.h (jcf_path_compute): Declare.
2616
2617 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2618
2619         * decl.c: Include langhooks.h.
2620         (builtin_function): Remove.
2621         (java_init_decl_processing): Replace calls to builtin_function
2622         with add_builtin_function.
2623         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2624         (java/decl.o): Depend on langhooks.h.
2625         * java-tree.h (builtin_function): Remove.
2626
2627 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2628
2629         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2630
2631 2006-09-12  Tom Tromey  <tromey@redhat.com>
2632
2633         * expr.c (push_value): Always flush quick stack.
2634
2635 2006-09-12  Tom Tromey  <tromey@redhat.com>
2636
2637         PR java/29013:
2638         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2639         the push of the called method's return result.
2640
2641 2006-09-12  Tom Tromey  <tromey@redhat.com>
2642
2643         * jvspec.c (lang_specific_driver): Read spec file even if
2644         -fsyntax-only.
2645
2646 2006-09-12  Tom Tromey  <tromey@redhat.com>
2647
2648         PR java/28754:
2649         * expr.c (expand_java_field_op): Initialize field's declaring
2650         interface if necessary.
2651
2652 2006-09-12  Tom Tromey  <tromey@redhat.com>
2653
2654         PR java/28892:
2655         * expr.c (expand_java_field_op): No error for assignments not in
2656         class initializer or constructor.
2657
2658 2006-08-22  Andrew Haley  <aph@redhat.com>
2659
2660         * decl.c (java_add_stmt): Give the statement list a type.
2661
2662 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2663             Bryce McKinlay  <bryce@mckinlay.net.nz>
2664
2665         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2666
2667 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
2668
2669         PR java/8923
2670         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2671         or '--' is used with a constant operand.
2672         (java_complete_lhs): When processing a '++' or '--' expression,
2673         don't call java_complete_tree but java_complete_lhs, so that a
2674         static final variable operand is never replaced by its value. This
2675         avoids an ICE later on.
2676         (patch_unaryop): Fixed typo in comment.
2677
2678 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2679
2680         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2681
2682 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2683
2684         * builtins.c (check_for_builtin): If a builtin could result in a
2685         direct call being generated, don't use it if flag_indirect_dispatch
2686         is set.
2687
2688 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2689
2690         * gcj.texi (Invocation): Corrections for Invocation API example.
2691
2692 2006-07-04  Andrew Haley  <aph@redhat.com>
2693
2694         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2695         entry.
2696
2697 2006-06-21  Andrew Haley  <aph@redhat.com>
2698
2699         * java-tree.h (update_aliases): Remove
2700         * expr.c (expand_iinc): Remove call to update_aliases().
2701         (STORE_INTERNAL): Likewise.
2702         * decl.c (update_aliases, initialize_local_variable) 
2703         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2704
2705 2006-06-19  Andrew Haley  <aph@redhat.com>
2706
2707         PR java/1305
2708         PR java/27908
2709         * expr.c (java_modify_addr_for_volatile): New function.
2710         (expand_java_field_op): Handle volatile fields.
2711         * java-gimplify.c (java_gimplify_component_ref): Call
2712         java_modify_addr_for_volatile to give the field_ref the correct
2713         volatile type.
2714         (java_gimplify_modify_expr): Likewise.
2715         * java-tree.h (java_modify_addr_for_volatile): New decl.
2716
2717 2006-06-17  Karl Berry  <karl@gnu.org>
2718
2719         * gcj.texi (@dircategory): Use "Software development" instead
2720         of "Programming", following the Free Software Directory.
2721
2722 2006-06-16  Andrew Haley  <aph@redhat.com>
2723
2724         * class.c (make_class_data): When using flag_indirect_classes,
2725         don't initialize the vtable of Class instances.
2726
2727 2006-06-09  Andrew Haley  <aph@redhat.com>
2728
2729         PR java/1305
2730         PR java/27908
2731         * builtins.c (initialize_builtins): Add __sync_synchronize().
2732         * class.c (add_field): Mark volatile fields.
2733         * java-gimplify.c (java_gimplify_expr): Call new functions to
2734         handle self-modifying exprs and COMPONENT_REFs.
2735         (java_gimplify_component_ref): New.
2736         (java_gimplify_modify_expr): Add handling for volatiles.
2737
2738 2006-06-08  Tom Tromey  <tromey@redhat.com>
2739
2740         * gcj.texi (libgcj Runtime Properties): Document
2741         gnu.gcj.user.realname.
2742
2743 2006-06-08  Andrew Haley  <aph@redhat.com>
2744
2745         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2746         get_symbol_table_index().
2747         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2748         private method.
2749         (build_known_method_ref): New arg: special.  Pass it to
2750         get_symbol_table_index.
2751         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2752         the method list.
2753         (build_invokevirtual): New arg: special.  Pass it to
2754         get_symbol_table_index.
2755         (expand_invoke): New variable: special.
2756         Pass it to maybe_rewrite_invocation().
2757         Pass it to build_known_method_ref().
2758         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2759         build the symbol table conbstructor.
2760         (emit_symbol_table): Extract SPECIAL from the method list and pass
2761         it to build_symbol_entry().
2762         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2763         special accordingly.
2764
2765 2006-06-06  David Daney  <ddaney@avtrex.com>
2766
2767         * gcj.texi (libgcj Runtime Properties): Document
2768         gnu.gcj.runtime.NameFinder.show_raw and
2769         gnu.gcj.runtime.NameFinder.remove_unknown.
2770
2771 2006-06-06  Tom Tromey  <tromey@redhat.com>
2772
2773         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2774         synthetic, enum, annotation.
2775         * jcf.h (ACC_BRIDGE): New macro.
2776         (ACC_VARARGS): Likewise.
2777         (ACC_SYNTHETIC): Likewise.
2778         (ACC_ENUM): Likewise.
2779         (ACC_ANNOTATION): Likewise.
2780
2781 2006-06-06  Mike Stump  <mrs@apple.com>
2782
2783         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2784         installing during build.
2785
2786 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2787
2788         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2789         classname-to-library resolution mechanism.
2790         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2791         mechanism deprecated.
2792         (libgcj Runtime Properties): Document
2793         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2794
2795 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2796
2797         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2798         bit wide type.
2799         (jword): Define to uint64 on 64-bit arches.
2800         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2801
2802 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2803
2804         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2805         typos.
2806
2807 2006-05-26  Tom Tromey  <tromey@redhat.com>
2808
2809         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2810         * verify-glue.c (vfy_class_type): New function.
2811         * verify-impl.c (check_constant): Allow 'ldc class'.
2812         * verify.h (vfy_class_type): Declare.
2813
2814 2006-05-25  Andrew Haley  <aph@redhat.com>
2815
2816         PR java/27756
2817         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2818         update all lifetimes, not just the first one.
2819
2820 2006-05-24  Tom Tromey  <tromey@redhat.com>
2821
2822         * java-tree.h: Fixed flag documentation.
2823
2824 2006-05-24  Tom Tromey  <tromey@redhat.com>
2825
2826         PR libgcj/27729:
2827         * jcf.h (ACC_INVISIBLE): Changed value.
2828
2829 2006-05-24  Andrew Haley  <aph@redhat.com>
2830
2831         PR java/27754
2832         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2833         COMPOUND_EXPR.
2834
2835 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2836
2837         * lang.opt (femit-class-file): Remove VarExists.
2838
2839 2006-05-16  Tom Tromey  <tromey@redhat.com>
2840
2841         * verify-impl.c (verify_instructions_0) <op_return>: Special case
2842         for Object.<init>.
2843
2844 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2845
2846         PR driver/26885
2847         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2848         $(GCC_OBJS).
2849
2850 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2851
2852         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2853         (java/expr.o): Replace target.h with $(TARGET_H).
2854         (java/parse.o): Likewise.
2855
2856 2006-05-10  Andrew Haley  <aph@redhat.com>
2857
2858         * class.c (emit_indirect_register_classes): Fix comment.
2859
2860 2006-05-04  Tom Tromey  <tromey@redhat.com>
2861
2862         * java-tree.h (uses_jv_markobj_p): Declare.
2863         * class.c (uses_jv_markobj_p): Removed.
2864         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2865         (get_boehm_type_descriptor): Use it.
2866         (uses_jv_markobj_p): Moved from class.c.  Return bool.
2867
2868 2006-05-04  Tom Tromey  <tromey@redhat.com>
2869
2870         * java-tree.def (THIS_EXPR): Now a tcc_expression.
2871
2872 2006-05-04  Andrew Haley  <aph@redhat.com>
2873
2874         * class.c (make_field_value): Always build_address_of fdecl if
2875         there is an initializer.
2876
2877 2006-05-03  Andrew Haley  <aph@redhat.com>
2878
2879         PR libgcj/27352
2880         * expr.c (maybe_rewrite_invocation): New function.
2881         (rewrite_arglist_getclass): Likewise.
2882         (rules): New.
2883         (expand_invoke): Call maybe_rewrite_invocation.
2884         * parse.y (patch_invoke): Likewise.
2885         * java-tree.h: (maybe_rewrite_invocation): New function.
2886
2887 2006-04-21  Andrew Haley  <aph@redhat.com>
2888
2889         * lang.c (java_init): Handle flag_indirect_classes.
2890         * jvgenmain.c: Use "class$$" instead of "class$".
2891         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2892         DECLs.
2893         (mangle_class_field): Special case "class$$" as well as "class$".
2894         * constants.c (build_ref_from_constant_pool): If
2895         flag_indirect_classes, generate a ref into the heap.
2896         * decl.c (constants_field_decl_node,
2897         constants_data_field_decl_node): New.
2898         * class.c (build_static_class_ref): New.
2899         (build_classdollar_field): Factor out from build_class_ref().
2900         (make_field_value): Handle static fields in heap.
2901         (make_class_data): Make sure we get a static ref to class.
2902         Make class initializer const if flag_indirect_classes.
2903         (register_class): Build a class_ref for initialization if
2904         flag_indirect_classes.
2905         (emit_indirect_register_classes): New.
2906
2907 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2908
2909         * expr.c, gjavah.c: Fix comment typos.
2910
2911 2006-04-03  Andrew Haley  <aph@redhat.com>
2912
2913         PR java/26858
2914         * expr.c (build_field_ref): Don't check the field offset if
2915         flag_syntax_only.
2916
2917 2006-03-30  Andrew Haley  <aph@redhat.com>
2918
2919         PR java/26858
2920         * lang.c (java_attribute_table): New.
2921         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2922         * expr.c (build_field_ref): Add a null pointer check for all
2923         fields of offset > 4k.  Don't do so for accesses via the this
2924         pointer, which we know can never be null.
2925         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2926         methods nonnull.
2927
2928 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
2929
2930         * Make-lang.in: Rename docdir to gcc_docdir.
2931
2932 2006-03-30  Tom Tromey  <tromey@redhat.com>
2933
2934         PR java/26042:
2935         * parse.y (java_reorder_fields): Reset superclass field's size as
2936         well.
2937
2938 2006-03-28  Tom Tromey  <tromey@redhat.com>
2939
2940         PR java/26390:
2941         * parse.y (find_most_specific_methods_list): Added 'class'
2942         argument.
2943         (lookup_method_invoke): Updated.
2944
2945 2006-03-15  Tom Tromey  <tromey@redhat.com>
2946
2947         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2948         non-static method calls.
2949
2950 2006-03-15  David Daney  <ddaney@avtrex.com>
2951
2952         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2953         declaration.
2954
2955 2006-03-15  David Daney  <ddaney@avtrex.com>
2956
2957         * lang.opt (-freduced-reflection): New option.
2958         * lang.c (java_post_options): Generate an error if
2959         -freduced-reflection used with -fjni or -findirect-dispatch.
2960         * java-tree.h (flag_reduced_reflection): Declare new variable.
2961         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2962         if bitmap overflows and flag_reduced_reflection set.
2963         * class.c (uses_jv_markobj_p): New function.
2964         (make_class_data): Moved generation of vtable to before
2965         reflection data, generate less reflection data if
2966         flag_reduced_reflection set.
2967         * gcj.texi: Document -freduced-reflection.
2968
2969 2006-03-15  Tom Tromey  <tromey@redhat.com>
2970
2971         PR java/26638:
2972         * class.c (get_interface_method_index): Don't put <clinit> into
2973         interface table.
2974
2975 2006-03-15  Tom Tromey  <tromey@redhat.com>
2976
2977         * parse.y (analyze_clinit_body): Ignore empty statements.
2978
2979 2006-03-08  David Daney  <ddaney@avtrex.com>
2980
2981         * gcj.texi: Document -static-libgcj option.
2982
2983 2006-02-20  Andrew Haley  <aph@redhat.com>
2984
2985         * jcf-parse.c (parse_class_file): Set input_location from
2986         current_class.
2987
2988 2006-02-15  Andrew Haley  <aph@redhat.com>
2989
2990         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2991         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2992         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2993
2994 2006-02-09  Andrew Haley  <aph@redhat.com>
2995
2996         PR java/26192
2997         * expr.c (expand_invoke): Allow methods in arrays to be resolved
2998         in their superclass.
2999
3000         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3001         array types.
3002         
3003 2006-02-08  Tom Tromey  <tromey@redhat.com>
3004
3005         PR java/22578:
3006         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3007         * builtins.c (convert_real): New function.
3008         (java_builtins): Handle Float.intBitsToFloat,
3009         Float.floatToRawIntBits, Double.longBitsToDouble,
3010         Double.doubleToRawLongBits.
3011
3012 2006-02-07  Andrew Haley  <aph@redhat.com>
3013
3014         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
3015         class other than the one in which we expected to find it, ignore
3016         the result.
3017
3018         PR java/25535
3019         * constants.c (build_constants_constructor): move initializer into
3020         first halfword on a 64-bit big-endian machine.
3021
3022 2006-02-04  Tom Tromey  <tromey@redhat.com>
3023
3024         PR java/25676:
3025         * builtins.c (max_builtin): Skip floating point 'max'.
3026         (min_builtin): Skip floating point 'min'.
3027         (check_for_builtin): Never return NULL_TREE.
3028
3029 2006-02-04  Tom Tromey  <tromey@redhat.com>
3030
3031         PR java/26097:
3032         * expr.c (push_type): Avoid side effect in gcc_assert.
3033
3034 2006-02-04  Roger Sayle  <roger@eyesopen.com>
3035
3036         * decl.c (java_init_decl_processing): Create char_type_node as a
3037         regular INTEGER_TYPE node.
3038         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3039         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3040         test for char_type_node and promoted_char_type_node as special
3041         instances of INTEGER_TYPE tree codes.
3042         (promote_type,build_java_signature): Likewise.
3043         * jcf-write.c (adjust_typed_op): Likewise.
3044         * mangle.c (mangle_type): Likewise.
3045         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3046         * parse.h (JINTEGRAL_TYPE_P): Likewise.
3047
3048 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
3049
3050         * expr.c (java_stack_swap): Revert gcc_assert patch.
3051
3052 2006-02-03  Ben Elliston  <bje@au.ibm.com>
3053
3054         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3055         * typeck.c: Likewise.
3056         * verify-impl.c: Likewise.
3057         * class.c: Likewise.
3058         * decl.c: Likewise.
3059         * jcf-parse.c: Likewise.
3060         * constants.c: Likewise.
3061         * check-init.c: Likewise.
3062         * jcf-write.c: Likewise.
3063         * verify-glue.c: Likewise.
3064         * mangle.c: Likewise.
3065         * expr.c: Likewise.
3066         * lang.c: Likewise.
3067         * boehm.c: Likewise.
3068
3069 2006-02-01  Jan Hubicka  <jh@suse.cz>
3070
3071         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3072         * lang.c (java_init_options): Set no_unit_at_a_time_default.
3073
3074 2006-01-30  Andrew Haley  <aph@redhat.com>
3075
3076         PR java/21428
3077         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3078
3079 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
3080
3081         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3082         Update copyright notice dates.
3083
3084 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3085
3086         * jvspec.c (lang_specific_spec_functions): Remove.
3087
3088 2006-01-06  Tom Tromey  <tromey@redhat.com>
3089
3090         * gcj.texi (Arrays): Added more documentation for
3091         JvNewObjectArray.
3092         (Primitive types): Correct information about primitive classes.
3093         (Reference types): New node.
3094         (Index): New node.
3095
3096 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
3097
3098         * jcf-parse.c (set_source_filename): Set the decl source location
3099         even when returning early.
3100
3101 2005-12-15  Tom Tromey  <tromey@redhat.com>
3102             Andrew Haley  <aph@redhat.com>
3103
3104         PR java/25429
3105         * parse.y (resolve_expression_name): Don't generate accessor
3106         methods for constant fields.
3107
3108 2005-12-13  Andrew Haley  <aph@redhat.com>
3109
3110         PR java/25366
3111         PR java/25368
3112         * class.c (maybe_layout_super_class): Update current_class before
3113         calling do_resolve_class.
3114
3115 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
3116
3117         PR java/25330
3118         * jcf-write.c (write_classfile): Use PID in temporary class
3119         file. Save/restore errno when reporting error.
3120
3121 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
3122
3123         PR java/9861
3124         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3125         to bare_function_type and including the return type
3126         * builtins.c (initialize_builtins) : Change builtin mangled name
3127         constants to conform to new mangling scheme
3128
3129 2005-12-08  Andrew Haley  <aph@redhat.com>
3130
3131         PR libgcj/25265
3132         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3133         (soft_abstractmethod_node): New.
3134         * expr.c (build_field_ref): Add in-line check for missing field.
3135         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3136
3137 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3138
3139         * Make-lang.in (java.all.build, java.install-normal): Remove.
3140
3141 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3142
3143         * Make-lang.in: Remove all dependencies on s-gtype, except for
3144         gt-java-parse.h.
3145
3146 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
3147
3148         * class.c (build_utf8_ref, emit_register_classes): Use
3149         switch_to_section and get_section.
3150
3151 2005-12-06  Tom Tromey  <tromey@redhat.com>
3152
3153         PR java/25283:
3154         * parse.y (patch_new_array_init): Revert previous patch.
3155         (lookup_method_invoke): Use size-less array type when creating an
3156         anonymous constructor.
3157
3158 2005-12-05  Tom Tromey  <tromey@redhat.com>
3159
3160         * parse.y (patch_new_array_init): Don't set length on array.
3161
3162 2005-12-02  Richard Guenther  <rguenther@suse.de>
3163
3164         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3165         buildN instead of build.
3166         * class.c (finish_class): Likewise.
3167         * expr.c (java_create_object): Likewise.
3168
3169 2005-11-28  Tom Tromey  <tromey@redhat.com>
3170
3171         PR java/18278:
3172         * expr.c (build_jni_stub): Unwrap the return value.
3173         * java-tree.h (soft_unwrapjni_node): New define.
3174         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3175         * decl.c (java_init_decl_processing): Initialize
3176         soft_unwrapjni_node.
3177
3178 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
3179
3180         * gcj.texi (gij options): Add -Xss documentation.
3181
3182 2005-11-08  Wil Mahan  <wmahan@gmail.com>
3183
3184         PR java/23617
3185         * zextract.c (read_zip_archive): Fix out of memory error when
3186         reading jar files with zip-style comments.
3187
3188 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
3189
3190         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3191         formats.
3192         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3193
3194 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3195             Wil Mahan <wmahan@gmail.com>
3196
3197         PR java/23620
3198         * class.c (make_class): Create empty binfo here.
3199         (set_super_info): Only create binfo if we have superclasses.
3200
3201 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
3202
3203         PR java/24127
3204         * parse.y (method_header): Make the result of the rule a NULL_TREE
3205         when a parsing error occurs.
3206
3207 2005-09-29  Tom Tromey  <tromey@redhat.com>
3208
3209         PR java/24120:
3210         * jcf-io.c (memoized_dirlist_hash): New function.
3211         (caching_stat): Use it.
3212
3213 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3214
3215         PR java/21418
3216         * class.c (inherits_from_p): Try to lay out super class
3217         if it is not already laid out.
3218         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3219         is a NULL_TREE.
3220
3221 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3222
3223         * builtins.c (max_builtin, min_builtin, abs_builtin,
3224         java_build_function_call_expr): Use fold_buildN.
3225         * class.c (layout_class_method): Likewise.
3226         * expr.c (java_truthvalue_conversion, build_java_jsr,
3227         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3228         build_java_binop, build_field_ref, expand_compare,
3229         build_known_method_ref, build_invokevirtual,
3230         process_jvm_instruction): Likewise.
3231         * parse.y (patch_binop, patch_exit_expr): Likewise.
3232         * typeck.c (convert_ieee_real_to_integer): Likewise.
3233         (convert): Don't call fold after convert_ieee_real_to_integer.
3234
3235 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3236
3237         PR java/23891
3238         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3239         the newly created type. Set import lists here, not in create_class.
3240         (jdep_resolve_class): Set current_class.
3241         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
3242         the current package context, not ctxp->package.
3243         (cicp_cache): Removed.
3244         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3245         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3246         * java-tree.h (TYPE_PACKAGE): New macro.
3247         (struct lang_type): New member 'package'.
3248
3249 2005-09-09  Andrew Haley  <aph@redhat.com>
3250
3251         PR libgcj/23182 
3252         * expr.c (pop_type_0): If the expected type is object or ptr
3253         (i.e. void*), return the type of the object we just popped from
3254         the stack.
3255
3256 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3257
3258         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3259         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3260
3261 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3262
3263         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3264         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3265         typos.  Follow spelling conventions.
3266
3267 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3268
3269         PR java/23431
3270         * typeck.c (lookup_do): Look up interfaces for the original class,
3271         not the base class.
3272         * parse.y (java_check_regular_methods): Fix diagnostic message for
3273         more restrictive overriding of a method from an interface.
3274
3275 2005-08-16  Tom Tromey  <tromey@redhat.com>
3276
3277         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3278         class' initial state.
3279
3280 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3281
3282         PR java/22113
3283         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3284         `literal_token' for large numeric input tokens.
3285
3286 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3287
3288         PR java/19870
3289         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3290         and expand to handle method accesses across nested classes.
3291         (build_outer_method_access_method): Rename to
3292         build_nested_method_access_method.  Minor adjustments to comments.
3293         (resolve_expression_name): Use the newly-renamed
3294         nested_member_access_p method.
3295         (resolve_qualified_expression_name): Likewise.
3296         (patch_method_invocation): Also consider static methods for access
3297         method generation.  Minor adjustments to comments.
3298         (maybe_use_access_method): Use the more general
3299         nested_memeber_access_p to determine access across nested class
3300         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3301
3302 2005-08-15  Tom Tromey  <tromey@redhat.com>
3303
3304         PR java/23300.
3305         * expr.c (build_field_ref): Don't generate otable reference when
3306         DECL_FIELD_OFFSET is 0.
3307         * class.c (maybe_layout_super_class): Pass outer class to
3308         do_resolve_class.
3309
3310 2005-08-15  Tom Tromey  <tromey@redhat.com>
3311
3312         * java-tree.h (LABEL_IN_SUBR): Removed.
3313         (LABEL_IN_SUBR): Likewise.
3314         (LABEL_IS_SUBR_START): Likewise.
3315         (LABEL_SUBR_START): Likewise.
3316         (LABEL_SUBR_CONTEXT): Likewise.
3317         (LABEL_CHANGED): Likewise.
3318         (LABEL_RETURN_LABEL): Likewise.
3319         (LABEL_RETURN_TYPE_STATE): Likewise.
3320         (LABEL_RETURN_LABELS): Likewise.
3321         (RETURN_MAP_ADJUSTED): Likewise.
3322         (LABEL_PENDING_CHAIN): Likewise.
3323
3324 2005-08-15  Tom Tromey  <tromey@redhat.com>
3325
3326         * Make-lang.in (JAVA_OBJS): Removed verify.o
3327         (java/verify.o): Removed.
3328         * verify.c: Removed.
3329         * lang.c (flag_new_verifier): Removed.
3330         (java_post_options): Updated.
3331         * java-tree.h (flag_new_verifier): Removed.
3332         (verify_jvm_instructions): Removed.
3333         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3334         (build_java_check_indexed_type): Likewise.
3335         (expand_java_arraystore): Likewise.
3336         (expand_java_arrayload): Likewise.
3337         (pop_arguments): Likewise.
3338         (expand_byte_code): Likewise.
3339         (process_jvm_instruction): Likewise.
3340
3341 2005-08-10  Andrew Haley  <aph@redhat.com>
3342
3343         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3344         type mismatches to make legal GIMPLE.
3345
3346 2005-08-10  Robin Green <greenrd@greenrd.org>
3347
3348         PR java/23230:
3349         * parse.y (maybe_use_access_method): Generalize check from
3350         java.lang.Object to any superclass of current_class
3351
3352 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3353
3354         * class.c (build_class_ref): Wrap the primary class type in a
3355         NOP_EXPR.
3356         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3357         primary class type from the NOP_EXPR in which it was placed.
3358
3359 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3360
3361         * expr.c (expand_load_internal): Fix missing parens in
3362         predicate.
3363
3364 2005-07-28  Andrew Haley  <aph@redhat.com>
3365
3366         * expr.c (expand_load_internal): Convert to destination type.
3367
3368 2005-07-22  Manfred Hollstein  <mh@suse.com>
3369
3370         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3371         (check_constant): Likewise.
3372         (check_wide_constant): Likewise.
3373
3374 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3375
3376         Make CONSTRUCTOR use VEC to store initializers.
3377         * check-init.c (check_init): Update to cope with VEC in
3378         CONSTRUCTOR_ELTS.
3379         * class.c (make_field_value, make_method_value, get_dispatch_table,
3380         make_class_data, emit_symbol_table, emit_catch_table,
3381         emit_assertion_table): Use build_constructor_from_list instead of
3382         build_constructor.
3383         * constants.c (build_constants_constructor): Likewise.
3384         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3385         VEC in CONSTRUCTOR_ELTS.
3386         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3387         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3388         of a TREE_LIST.
3389         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3390         CONSTRUCTOR_ELTS.
3391         * parse.y (build_new_array_init): Use build_constructor_from_list
3392         instead of build_constructor.
3393         (patch_new_array_init): Update to cope with VEC in
3394         CONSTRUCTOR_ELTS.
3395         (array_constructor_check_entry): Likewise.
3396
3397 2005-07-12  Tom Tromey  <tromey@redhat.com>
3398
3399         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3400         command line.
3401
3402 2005-07-12  Tom Tromey  <tromey@redhat.com>
3403
3404         PR java/19674:
3405         * parse-scan.y (interface_member_declaration): Added
3406         empty_statement.
3407
3408 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3409         
3410         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3411         (LABEL_PENDING_CHAIN): Ditto.
3412         (LABEL_PC): Ditto.
3413         (DECL_BIT_INDEX): Ditto.        
3414
3415 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3416
3417         PR java/18119
3418         * parse.y (inner_class_accessible): New function. Logic moved from
3419         check_inner_class_access.
3420         (check_inner_class_access): Use inner_class_accessible.
3421         (resolve_inner_class): Simplify arguments. Create circularity hash
3422         here. Keep looking for classes if we found one that was inaccessible. 
3423         Return the inaccessible class only if there is no other match.
3424         (do_resolve_class): Update for new resolve_inner_class arguments.
3425         Don't create circularity_hash here.
3426
3427 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3428
3429         PR java/21045
3430         * parse.y (add_exception_to_throws): New function.
3431         (purge_unchecked_exceptions): Removed.
3432         (get_constructor_super): Renamed from verify_constructor_super. Now
3433         returns the super constructor after verification.
3434         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3435         or save/restore the exception list.
3436         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3437         class initializers and constructors to the throws clause of the method. 
3438
3439 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3440
3441         PR java/19674
3442         * parse.y (interface_member_declaration): Allow empty statements in
3443         interface declarations.
3444
3445 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3446
3447         * Makefile.in (parse.o): Adjust dependencies.
3448         * parse.y: Include tree-dump.h.
3449
3450 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3451
3452         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3453         flag for quoting.
3454
3455 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3456
3457         * parse.y (issue_warning_error_from_context): Call
3458         pp_output_formatted_text to be able to get the buffer.
3459
3460 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3461
3462         * parse.y (issue_warning_error_from_context): Update for the
3463         renaming of pp_format_text to pp_format.
3464
3465 2005-06-28  Paul Brook  <paul@codesourcery.com>
3466
3467         * decl.c (java_init_decl_processing): Call
3468         default_init_unwind_resume_libfunc.
3469
3470 2005-06-27  Tom Tromey  <tromey@redhat.com>
3471
3472         PR java/21540, PR java/13788:
3473         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3474         fold_constant_for_init.
3475         (patch_binop): Added 'folding' argument.  Updated all callers.
3476         (patch_unaryop) <NOP_EXPR>: New case.
3477         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3478         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3479
3480 2005-06-25  Jan Hubicka  <jh@suse.cz>
3481
3482         * builtins.c (define_builtin): Accept new flags parameter.
3483         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3484
3485 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3486
3487         * all files: Update FSF address in copyright headers.
3488
3489 2005-06-24  Tom Tromey  <tromey@redhat.com>
3490
3491         * verify-impl.c (verify_instructions_0): Correctly handle
3492         situation where PC falls off end.
3493
3494 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3495
3496         PR java/20697
3497         * parse.y (find_most_specific_methods_list): Remove special case for
3498         inner classes.
3499
3500 2005-06-15  Tom Tromey  <tromey@redhat.com>
3501
3502         PR libgcj/21906:
3503         * class.c (make_method_value): Use soft_abstractmethod_node for
3504         abstract method.
3505         * java-tree.h (soft_abstractmethod_node): New define.
3506         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3507         * decl.c (java_init_decl_processing): Initialize
3508         soft_abstractmethod_node.
3509
3510 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3511
3512         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3513
3514 2005-06-13  Per Bothner  <per@bothner.com>
3515
3516         * expr.c (int highest_label_pc_this_method,
3517         start_label_pc_this_method): New globals.
3518         (lookup_label): Add start_label_pc_this_method to pc for label, and
3519         update highest_label_pc_this_method.  This prevents conflicts between
3520         labels from different methods.
3521         * java-tree.h: Declare new globals.
3522         * jcf-parse.c (parse_class_file): If needed bump
3523         start_label_pc_this_method and reset highest_label_pc_this_method.
3524
3525 2005-06-13  Tom Tromey  <tromey@redhat.com>
3526
3527         PR java/21844:
3528         * parse.y (nested_field_access_p): Handle case where outer field
3529         is inherited by enclosing class.
3530
3531 2005-06-12  Per Bothner  <per@bothner.com>
3532
3533         * class.c (inherits_from_p): Do load_class if needed.
3534
3535 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3536
3537         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3538         * java-tree.h (parse_error_context): Move...
3539         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3540         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3541         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3542
3543 2005-06-08  Roger Sayle  <roger@eyesopen.com>
3544
3545         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3546
3547 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3548
3549         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3550         msgid for argument name.
3551         * gjavah.c (error): Likewise.
3552         * java-tree.h (parse_error_context): Likewise.
3553         * parse.y (parse_error_context, parse_warning_context,
3554         issue_warning_error_from_context): Likewise.
3555
3556 2005-06-01  Tom Tromey  <tromey@redhat.com>
3557
3558         PR java/21722:
3559         * class.c (build_static_field_ref): Don't fold constant fields if
3560         current class is from a .class file and we're using indirect
3561         dispatch.
3562
3563 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3564
3565         * java/verify-glue.c: Don't include errors.h and include toplev.h.
3566         * java/Make-lang.in: Updates dependencies.
3567
3568 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
3569
3570         PR java/19870.
3571         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3572         NESTED_FIELD_ACCESS_IDENTIFIER_P.
3573         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3574         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3575         * jcf-write.c (generate_classfile): Use
3576         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3577         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3578         * parse.y (build_outer_field_access): Rename to
3579         build_nested_field_access. Support static fields and outer-to-inner
3580         class accesses.
3581         (outer_field_access_p): Rename to nested_field_access_p. Support
3582         static fields and generalise to outer-to-inner class and sibling
3583         inner class accesses.
3584         (outer_field_expanded_access_p): Rename to
3585         nested_field_expanded_access_p and support static fields.
3586         (outer_field_access_fix): Rename to nested_field_access_fix and
3587         support static fields.
3588         (build_outer_field_access_expr): Rename to
3589         build_nested_field_access_expr and support static fields.
3590         (build_outer_field_access_methods): Rename to
3591         build_nested_field_access_methods and support static fields. For
3592         static fields, generate accessors without class instance parameters.
3593         (build_outer_field_access_method): Rename to
3594         build_nested_field_access_method and support static fields.
3595         (build_outer_method_access_method): Use
3596         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3597         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3598         (resolve_expression_name): Consider static field accesses across
3599         nested classes.
3600         (resolve_qualified_expression_name): Likewise.
3601         (java_complete_lhs): Use nested_field_access_fix instead of
3602         outer_field_access_fix.
3603         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3604         Use nested_field_expanded_access_p instead of
3605         outer_field_expanded_access_p. Use nested_field_access_fix instead
3606         of outer_field_access_fix.
3607         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3608         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3609
3610 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3611
3612         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
3613         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3614         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3615         MINOR_BINARYCOMPAT_ABI_VERSION): New.
3616         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3617         (parse_version): Calculate version ID using new method. Use bit-flags
3618         for flag_indirect_dispatch and flag_bootstrap_classes.
3619
3620 2005-05-25  Richard Henderson  <rth@redhat.com>
3621
3622         PR libgcj/21692
3623         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3624         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3625         DECL_CONTEXT; avoid pushdecl_top_level.
3626         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3627         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3628         (layout_class_method): Likewise.
3629         * decl.c (java_mark_cni_decl_local): New.
3630         (java_mark_class_local): Use it.
3631         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3632         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3633         (struct lang_decl_func): Add local_cni;
3634         (struct lang_decl_var): Add class_field, vtable.
3635         (java_mangle_decl): Declare.
3636         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3637         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3638         (mangle_obstack_1): New.
3639         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
3640         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
3641         lhd_set_decl_assembler_name for things that don't need mangling.
3642         (mangle_class_field): Rename from java_mangle_class_field, make
3643         static, don't call init_mangling or finish_mangling.
3644         (mangle_vtable): Similarly.
3645         (mangle_local_cni_method_decl): New.
3646         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
3647         gcc_assert, and MANGLE_RAW_STRING.
3648         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3649
3650 2005-05-25  DJ Delorie  <dj@redhat.com>
3651
3652         * class.c (set_constant_value): Move warning control from if() to
3653         warning(OPT_*).
3654
3655 2005-05-24  Richard Henderson  <rth@redhat.com>
3656
3657         * builtins.c (define_builtin): Don't call make_decl_rtl.
3658         * constants.c (build_constant_data_ref): Likewise.
3659         * class.c (build_utf8_ref): Likewise.
3660         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3661         (get_dispatch_table, layout_class_method): Likewise.
3662         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3663         by hand.
3664         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3665         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3666         to determine if we need a non-zero address.
3667         * decl.c (builtin_function): Don't call make_decl_rtl.
3668         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3669         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3670         * resource.c (compile_resource_data): Likewise.
3671         * parse.y (resolve_field_access): Re-word comment to avoid
3672         building DECL_RTL.
3673
3674 2005-05-24  Richard Henderson  <rth@redhat.com>
3675
3676         * class.c (registered_class): Take it out of class_roots; turn into
3677         a vec of trees.
3678         (register_class): Make static.  Don't duplicate decl node.  Use
3679         VEC_safe_push.
3680         (emit_register_classes): Use VEC_iterate.  Use output_constant
3681         instead of assemble_integer.  Don't call mark_decl_referenced
3682         directly.
3683         * java-tree.h (register_class): Remove decl.
3684
3685 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
3686
3687         PR java/17845
3688
3689         * parse.y (register_package, package_list): Remove.
3690         (package_declaration): Do not call register_package.
3691         (do_resolve_class): Do not use package_list.
3692
3693 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
3694
3695         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3696         unused variable.
3697
3698 2005-05-15  Tom Tromey  <tromey@redhat.com>
3699
3700         PR java/21519:
3701         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3702         NOTE_PUSH.
3703
3704 2005-05-12  Aaron Luchko <aluchko@redhat.com>
3705
3706         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3707
3708 2005-05-11  Tom Tromey  <tromey@redhat.com>
3709
3710         * gcj.texi (Code Generation): Document -fbootstrap-classes.
3711         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3712         (parse_version): Use it.
3713         * lang.opt (-fbootstrap-classes): New option.
3714
3715 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
3716
3717         PR java/21436
3718         * class.c (maybe_layout_super_class): Look for imports in this_class.
3719         * parse.h (ctxp_for_generation_last): New.
3720         (do_resolve_class): Add a parameter.
3721         * parse.y (ctxp_for_generation_last): New.
3722         (java_pop_parser_context): Add at end of list.
3723         (find_in_imports, find_in_imports_on_demand): Look in ctxp
3724         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3725         the given type are NULL.
3726         (do_resolve_class): Look into the imports of the new second parameter.
3727         Adjust recursive calls.
3728         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3729         calls to do_resolve_class.
3730         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3731         (java_complete_class): Do not do that here.
3732
3733 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3734
3735         PR java/20309
3736         * Make-lang.in (java): Add gjnih.
3737         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3738         (GJNIH_OBJS): New variable.
3739         (gjnih$(exeext)): New target.
3740         (JAVA_MANFILES): Add gjnih.1.
3741         (java.uninstall): Add gjnih.1.
3742         (java.mostlyclean): Add gjnih.
3743         (java.maintainer-clean): Add gjnih.1.
3744         (java/gjavah-jni.o): New target.
3745         (.INTERMEDIATE): Add gjnih.pod.
3746         (gjnih.pod): New target.
3747         * config-lang.in (stagestuff): Add gjnih.
3748         * gcj.texi (Top): Add gjnih node.
3749         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3750         -bootclasspath options.
3751         (Invoking gjnih): New node.
3752         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3753         (TOOLNAME): New macro.
3754         (error): Replace hard-coded gcjh with TOOLNAME.
3755         (process_file): Likewise.
3756         (usage): Likewise.
3757         (version): Likewise.
3758         (help): Likewise.  Add help output for -force, -old, -trace and -J
3759         options.
3760         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3761         (options): Add force, old, trace and J fields.
3762         (main): Handle -force, -old, -trace and -J options.
3763
3764 2005-05-03  Tom Tromey  <tromey@redhat.com>
3765
3766         PR java/21245:
3767         * gjavah.c (main): Unlink output file on error.
3768
3769 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3770
3771         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3772         copyright.
3773
3774 2005-04-29  Tom Tromey  <tromey@redhat.com>
3775
3776         * expr.c (build_jni_stub): Updated for change to build_block.
3777
3778 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3779
3780         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3781
3782 2005-04-28  Andrew Haley  <aph@redhat.com>
3783
3784         PR java/19285
3785         * java-tree.h (soft_resolvepoolentry_node): New.
3786         (alloc_constant_fieldref): Declare.
3787         * expr.c (expand_java_field_op): Don't call class_init for
3788         accesses to static fields with indirect dispatch.
3789         * builtins.c (initialize_builtins): Add "__builtin_expect".
3790         * decl.c (soft_resolvepoolentry_node): New variable.
3791         (java_init_decl_processing): Create a decl for
3792         "_Jv_ResolvePoolEntry".
3793         * class.c (build_fieldref_cache_entry): New function.
3794         (build_static_field_ref): Rewrite for indirect dispatch.
3795         * constants.c (find_name_and_type_constant_tree): New function.
3796         (alloc_constant_fieldref): Likewise.
3797         (build_constants_constructor): Handle CONSTANT_Fieldref and
3798         CONSTANT_NameAndType.
3799
3800         PR java/21115
3801         * expr.c (force_evaluation_order): Convert outgoing args smaller
3802         than integer.
3803
3804 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3805
3806         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3807         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
3808         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3809
3810 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3811
3812         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3813         to `unlock_stream' with `unlock_std_streams'.
3814
3815 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3816
3817         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3818         instead of just expr.h.
3819
3820 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3821
3822         * gjavah.c (main): Unlock the stdio streams.
3823         * jcf-dump.c (main): Likewise.
3824         * jv-scan.c (main): Likewise.
3825         * jvgenmain.c (main): Likewise.
3826
3827 2005-04-23  DJ Delorie  <dj@redhat.com>
3828
3829         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3830         parse.y: Adjust warning() callers.
3831
3832 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
3833
3834         * gcj.texi (Object fields): Change "Integer" to "Int" in example
3835         contructor.
3836
3837 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3838
3839         * gcj.texi: Fix typos and bogus example.
3840
3841 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
3842
3843         * except.c: Fix a comment typo.
3844
3845 2005-04-19  Julian Brown  <julian@codesourcery.com>
3846
3847         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3848         indirect dispatch with PIC.
3849
3850 2005-04-18  Andrew Haley  <aph@redhat.com>
3851
3852         * java-except.h (struct eh_range.handler): Remove unused field.
3853         (handle_nested_ranges): Remove function declaration.
3854         (sanity_check_exception_range): Add function declaration.       
3855         * verify.c (verify_jvm_instructions): Remove call to
3856         handle_nested_ranges.
3857         * verify-glue.c (verify_jvm_instructions_new): Call
3858         sanity_check_exception_range.
3859         * except.c (link_handler, eh_range_freelist, link_handler,
3860         handle_nested_ranges): Remove.
3861         (add_handler): Rewrite.
3862         (sanity_check_exception_range): New function.
3863         (print_ranges): New function.
3864
3865 2005-04-13  Julian Brown  <julian@codesourcery.com>
3866
3867         * decl.c (finish_method): Give methods once-only linkage.
3868
3869 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
3870
3871         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3872
3873 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3874
3875         * java-tree.h: Don't use PARAMS().
3876
3877 2005-04-07  Per Bothner  <per@bothner.com>
3878
3879         * class.c (push_class): By default, suppress debug output.
3880         (finish_class): Enable debug output for classes we're emitting.
3881
3882 2005-04-07  Andrew Haley  <aph@redhat.com>
3883
3884         * gcj.texi: Correct gcj-dbtool instructions.
3885
3886 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
3887
3888         * gcj.texi: Fix a typo.
3889         * lang.c: Fix a comment typo.
3890
3891 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
3892
3893         * gcj.texi (Invoking gij): Add descriptions of new -X options.
3894         Mention recognized-and-ignored compatibility options.
3895         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3896         JvFree.
3897         (About CNI): Add Memory allocation section.
3898
3899 2005-04-01  Tom Tromey  <tromey@redhat.com>
3900
3901         * decl.c (java_init_decl_processing): Fix types of
3902         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3903         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3904         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3905
3906 2005-03-31  Jan Hubicka  <jh@suse.cz>
3907
3908         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3909         * class.c: Include cgraph.h
3910         (make_local_functoin_alias): Mark aslias as needed.
3911         * resource.c: Include cgraph.h
3912         (compile_resource_data): Go via cgraph interface.
3913
3914 2005-03-30  Ian Lance Taylor  <ian@airs.com>
3915
3916         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3917
3918 2005-03-30  Tom Tromey  <tromey@redhat.com>
3919
3920         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3921         inner_class_info_index==0 or outer_class_info_index==0.
3922
3923 2005-03-29  Tom Tromey  <tromey@redhat.com>
3924
3925         * gcj.texi (libgcj Runtime Properties): Document
3926         gnu.gcj.runtime.endorsed.dirs.
3927
3928 2005-03-24  Anthony Green  <green@redhat.com>
3929
3930         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3931         'gcj-dbtool -p'.
3932
3933 2005-03-23  Tom Tromey  <tromey@redhat.com>
3934
3935         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3936         (parse_version): Use it.
3937
3938 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3939
3940         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3941
3942 2005-03-18  Andrew Haley  <aph@redhat.com>
3943
3944         PR java/20522
3945         * decl.c (update_aliases): Don't update variables that are about
3946         to die.
3947         (maybe_poplevels): Add comment.
3948
3949 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
3950
3951         PR java/20502
3952         * jcf-parse.c (duplicate_class_warning): New function.
3953         (java_parse_file): Call duplicate_class_warning if 
3954         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3955         (parse_zip_file_entries): Likewise. Also set
3956         CLASS_FROM_CURRENTLY_COMPILED_P.
3957
3958 2005-03-16  Andrew Haley  <aph@redhat.com>
3959
3960         * expr.c (expand_java_arrayload): Don't generate a
3961         NullPointerException based on the type of the node.
3962         (build_java_array_length_access): Likewise.
3963
3964 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
3965
3966         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3967
3968 2005-03-11  Tom Tromey  <tromey@redhat.com>
3969
3970         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3971         (libgcj Runtime Properties): Document the default .db.
3972
3973 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3974
3975         PR java/20312
3976         * parse.y (checks_throws_clauses): Check exceptions list even when
3977         the base class does not come from a source file being compiled.
3978         (java_complete_lhs): Remove unused variable 'wfl'.
3979
3980 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
3981
3982         PR java/20338
3983         * decl.c (finish_method): Emit _Jv_InitClass for private static
3984         methods inside inner classes as well.
3985
3986 2005-03-08  Julian Brown  <julian@codesourcery.com>
3987         * Revert patch from 2005-03-08 for causing bootstrap failure on
3988         ppc-darwin.
3989
3990 2005-03-08  Julian Brown  <julian@codesourcery.com>
3991
3992         * decl.c (finish_method): Give methods once-only linkage.
3993
3994 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3995
3996         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3997
3998 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
3999
4000         * verify-glue.c (vfy_is_assignable_from): Perform static check using
4001         can_widen_reference_to if the C++ ABI is in use.
4002         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4003         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4004         type_isresolved, init_state, set_pc, state_get_pc,
4005         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4006         (verify_fail): Report the current PC from the verifier context.
4007         (free_state): Remove #if 0 block to enable this function.
4008         (free_verifier_context): Call free_state on state_list iterator
4009         values before freeing them.
4010         * expr.c (pop_type_0): Pop correct type for error message when stack
4011         contains a multi-word type.
4012
4013 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
4014
4015         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4016         for known NULL array length access.
4017
4018 2005-03-07  Tom Tromey  <tromey@redhat.com>
4019
4020         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4021
4022 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
4023
4024         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4025         typeck.c: Update copyright.
4026
4027 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
4028
4029         Remove xref code.
4030         * xref.c, xref.h: Remove file.
4031         * Make-lang.in (java/xref.o): Remove.
4032         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4033         * lang.c (flag_emit_xref): Remove definition.
4034         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4035         * typeck.c (convert): Remove use of do_not_fold.
4036         * parse.y (do_not_fold): Remove definition.
4037         (parser grammar): Remove xref code.
4038         (maybe_create_class_interface_decl, create_class): Likewise.
4039         (register_fields, method_header, finish_method_declaration): Likewise.
4040         (declare_local_variables, source_end_java_method): Likewise.
4041         (java_complete_expand_classes): Do not set do_not_fold.
4042         (java_complete_expand_method): Remove xref code.
4043         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4044         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4045         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4046         (patch_synchronized_statement, patch_throw_statement): Likewise.
4047         (maybe_build_class_init_for_field): Likewise.
4048
4049 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
4050
4051         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4052         instead of IS_NON_TYPE_CODE_CLASS.
4053
4054 2005-03-04  Andrew Haley  <aph@redhat.com>
4055
4056         PR java/18362
4057         * class.c (set_method_index): Don't set method_index if it is
4058         NULL_TREE.
4059         (layout_class_method): Don't complain about "non-static method foo
4060         overrides static method" in the case of indirect dispatch.
4061
4062 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4063
4064         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4065         warning.
4066         * Make-lang.in: Don't elide warnings in jcf-io.c.
4067
4068 2005-03-01  Per Bothner  <per@bothner.com>
4069
4070         PR java/8608
4071         * check-init.c (wfl): Remove static.
4072         (final_assign_error, check_init): Replace calls to parse_error_context
4073         by plain error.
4074         (check_init): Save, set, and restore input_location for each exp.
4075
4076 2005-03-01  Per Bothner  <per@bothner.com>
4077
4078         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4079         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4080         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4081
4082 2005-03-01  Per Bothner  <per@bothner.com>
4083
4084         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4085
4086 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4087
4088         PR libgcj/16923
4089         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4090         JvVMOption.
4091
4092 2005-02-22  Tom Tromey  <tromey@redhat.com>
4093
4094         PR java/20056:
4095         * verify-impl.c (EITHER): New define.
4096         (types_compatible): Handle it.
4097         (check_field_constant): Use it.
4098
4099 2005-02-18  Tom Tromey  <tromey@redhat.com>
4100
4101         PR java/20056:
4102         * verify-impl.c (types_equal): Fixed test.
4103
4104         PR java/20056:
4105         * verify-glue.c (vfy_class_has_field): New function.
4106         * verify.h (vfy_class_has_field): Declare.
4107         * verify-impl.c (check_field_constant): Added 'putfield'
4108         argument.
4109         (verify_instructions_0): Updated.
4110         (types_equal): New function.
4111
4112 2005-02-14  Tom Tromey  <tromey@redhat.com>
4113
4114         PR java/19921:
4115         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4116         stack effect of multianewarray.
4117
4118 2005-02-14  Andrew Haley  <aph@redhat.com>
4119
4120         PR java/19907
4121         * expr.c (expand_byte_code): Call promote_arguments().
4122         (promote_arguments): New function.
4123         * decl.c (check_local_unnamed_variable): Remove special case for
4124         new verifier.
4125         (find_local_variable): Promote all boolean types to int
4126         when searching for local variable decls.
4127
4128 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
4129
4130         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4131         parse-scan.y: Update copyright.
4132
4133 2005-02-11  Per Bothner  <per@bothner.com>
4134
4135         PR java/15543
4136         * parse-scan.y (input_location): Remove variable.
4137         (main_input_filename): New - replaces input_filename, which isn't
4138         settable if USE_MAPPED_LOCATION.
4139         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4140         so we don't reference input_location or wfl_operator in that case.
4141         * jv-scan.c (expand_location): Remove - no longer used.
4142         (main): Set main_input_filename rather than input_filename.
4143
4144 2005-02-09  Richard Henderson  <rth@redhat.com>
4145
4146         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4147         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4148
4149 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
4150
4151         * expr.c (add_type_assertion): Use the proper enumeration type,
4152         since this is what htab_find_slot() is expecting.
4153
4154 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
4155
4156         * gcj.texi: Update copyright dates.
4157
4158 2005-02-02  Tom Tromey  <tromey@redhat.com>
4159
4160         * gcj.texi (libgcj Runtime Properties): Default library_control
4161         to 'cache'.
4162
4163 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
4164
4165         PR java/15543
4166         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4167         (modifiers) when square brackets are present in a declaration for
4168         a final paramter.
4169         * jv-scan.c (main): Set input_filename and input_line.
4170
4171 2005-02-01  Tom Tromey  <tromey@redhat.com>
4172
4173         PR java/19742:
4174         * gjavah.c (get_field_name): Don't override name for JNI header.
4175
4176 2005-02-01  Roger Sayle  <roger@eyesopen.com>
4177
4178         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4179         of unsigned types using iushr and lushr JVM bytecodes.
4180
4181 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4182
4183         PR java/19738
4184         * gjavah.c (jni_print_float): Do not emit floating-point
4185         initialiser for a static final field.
4186         (jni_print_double): Likewise.
4187
4188 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
4189
4190         Revert:
4191         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4192         * gjavah.c (print_field_info): Mark static data members of
4193         floating-point type with "__extension__".
4194
4195 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4196
4197         * gjavah.c (print_field_info): Mark static data members of
4198         floating-point type with "__extension__".
4199
4200 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4201
4202         PR java/9157
4203         * parse.y (build_string_concatenation): Remove redundant if.
4204         (patch_conditional_expr): Attempt to patch_string() the condition
4205         of a ?: as well, in addition to its other operands.
4206
4207 2005-01-25  Tom Tromey  <tromey@redhat.com>
4208
4209         * Make-lang.in (java/java-tree-inline.o): Removed.
4210
4211 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4212
4213         PR java/19070
4214         * parse.y (patch_binop): Allow comparisons against NULL only
4215         if the other operand is of a reference type.
4216
4217 2005-01-24  Tom Tromey  <tromey@redhat.com>
4218
4219         * java-tree.h (gcj_abi_version): Declare.
4220         * class.c (make_class_data): Push gcj_abi_version into "next"
4221         field.  Renamed field.
4222         * decl.c (gcj_abi_version): New global.
4223         (parse_version): New function.
4224         (java_init_decl_processing): Call it.  Renamed 'next' field.
4225         Include version.h.
4226         (GCJ_BINARYCOMPAT_ADDITION): New define.
4227
4228 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4229
4230         PR java/19295
4231         * jcf-write.c (generate_bytecode_insns): Conversions between
4232         integer types of the same precision shouldn't generate widening
4233         or narrowing conversion bytecodes.
4234
4235 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4236
4237         * java-except.h, java-tree.h: Remove unused prototypes.
4238
4239 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4240
4241         PR java/18091:
4242         * jcf-write.c (perform_relocations): Don't call memcpy if source
4243         and destination are the same.
4244
4245 2005-01-17  Tom Tromey  <tromey@redhat.com>
4246
4247         * verify-impl.c (get_short): Sign extend.
4248         (get_int): Likewise.
4249
4250 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4251
4252         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4253         with TYPE_SIZE.
4254
4255 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4256
4257         * verify.c: Revert to the version before the BC-ABI merge.
4258
4259 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4260
4261         PR java/19277
4262         * check-init.c (check_init): Take care of references that do not
4263         have an explicit final variable declaration (e.g. array length
4264         access) for pre/post in/de-crement operators.
4265
4266 2005-01-08  Mark Wielaard  <mark@klomp.org>
4267
4268         * parse.y (process_imports): Allocate (and free) original_name only
4269         when not already defined.
4270         * jcf-parse.c (read_class): Free results of find_class() and
4271         lrealpath().
4272         (java_parse_file): Keep pointer to head of file_list and free when
4273         done. Free result of lrealpath().
4274
4275 2005-01-05  Tom Tromey  <tromey@redhat.com>
4276
4277         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4278
4279 2004-12-20  Andrew Haley  <aph@redhat.com>
4280
4281         * typeck.c: Use fold_convert for ints and booleans.
4282
4283 2004-12-17  Andrew Haley  <aph@redhat.com>
4284
4285         PR java/18931
4286         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4287         BOOLEAN_TYPE or CHAR_TYPE.
4288         (convert_to_boolean, convert_to_char) : Remove.
4289         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4290         * expr.c (expand_load_internal): Do type conversion if type is not
4291         as required.
4292
4293 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4294
4295         PR target/18459
4296         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4297         Update comment.
4298
4299 2004-12-07  Andrew Haley  <aph@redhat.com>
4300
4301         PR java/18811:
4302         * jcf-parse.c (load_class): Remove sanity test for missing inner
4303         class file.
4304
4305 2004-12-06  Tom Tromey  <tromey@redhat.com>
4306
4307         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4308         (java.uninstall): Likewise.
4309         (java.maintainer-clean): Likewise.
4310         (.INTERMEDIATE): Likewise.
4311         (java.install-man): Likewise.
4312         (gcj-dbtool.pod): New target.
4313         * gcj.texi (Code Generation): Document -findirect-dispatch.
4314         (libgcj Runtime Properties): Document
4315         gnu.gcj.precompiled.db.path.
4316         (Top): Link to "Invoking gcj-dbtool".
4317
4318 2004-12-06  Tom Tromey  <tromey@redhat.com>
4319
4320         PR java/14853:
4321         * java-tree.h (extract_field_decl): Declare.
4322         * parse.y (extract_field_decl): Renamed from
4323         strip_out_static_field_access_decl.  No longer static.
4324         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4325
4326 2004-12-03  Tom Tromey  <tromey@redhat.com>
4327
4328         * lang.c (flag_new_verifier): Define.
4329         (java_post_options): Set flag_new_verifier if indirect dispatch
4330         is being used.
4331         * lang.opt (fnew-verifier): Removed.
4332
4333 2004-12-03  Tom Tromey  <tromey@redhat.com>
4334
4335         PR bootstrap/14614:
4336         * Make-lang.in (java.install-common): Only install transformed
4337         gcjh if gcj-cross exists.
4338
4339 2004-12-03  Andrew Haley  <aph@redhat.com>
4340
4341         PR java/18812
4342         * except.c (link_handler): Patch 'outer' field of siblings of the
4343         range we're demoting.
4344
4345 2004-12-03  Andrew Haley  <aph@redhat.com>
4346
4347         PR java/18697
4348         * class.c (layout_class_method): Don't fail to override a method
4349         simply because it has DECL_ARTIFICIAL set.
4350
4351 2004-12-02  Tom Tromey  <tromey@redhat.com>
4352
4353         PR java/16675:
4354         * parse.y (craft_constructor): Special case null_pointer_node.
4355
4356 2004-12-02  Tom Tromey  <tromey@redhat.com>
4357
4358         PR java/18741:
4359         * java-gimplify.c (java_gimplify_expr): Don't call
4360         SET_EXPR_LOCATION unless wrapped tree is an expression.
4361
4362 2004-11-27  Per Bothner  <per@bothner.com>
4363
4364         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4365         Fix fencepost error in 'i', which got executed one too many times.
4366         Also, fold memcpy into explicit loop, as originally intended.
4367         Also, free temporary 'buf' which otherwise leaks.
4368
4369 2004-11-27  Per Bothner  <per@bothner.com>
4370
4371         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4372         local static variables if not USE_MAPPED_LOCATION.
4373
4374 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4375
4376         * class.c, decl.c, expr.c: Fix comment typos.
4377
4378 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4379
4380         PR java/18305
4381         * decl.c (end_java_method): Call
4382         attach_init_test_initialization_flags on all the init_decls.
4383         * parse.y (attach_init_test_initialization_flags): Move to ...
4384         * expr.c (attach_init_test_initialization_flags): here and
4385         support BIND_EXPR also.
4386         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4387         * jcf-parse.c (parse_class_file): Don't disable class init
4388         optimization.
4389
4390 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4391
4392         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4393         in diagnostics.
4394
4395 2004-11-24  Richard Henderson  <rth@redhat.com>
4396
4397         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4398         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4399
4400 2004-11-24  Tom Tromey  <tromey@redhat.com>
4401
4402         * verify.c (defer_merging): Don't use C++-style comment.
4403         * verify.h (java_opcode): Added java_opcode_end.
4404         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4405
4406         * verify-impl.c (vfy_push_type): Removed bogus "return".
4407         (initialize_stack): Use vfy_alloc and vfy_free.
4408         (verify_instructions_0): Likewise.
4409
4410         * Merged gcj-abi-2-dev-branch to trunk.
4411
4412 2004-11-24  Andrew Haley  <aph@redhat.com>
4413
4414         * jcf-parse.c (parse_class_file): Set file_start_location.
4415
4416 2004-11-10  Tom Tromey  <tromey@redhat.com>
4417
4418         * class.c (make_field_value): Don't call build_static_field_ref.
4419         (build_static_field_ref): Don't emit direct references when using
4420         indirect dispatch.
4421
4422         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4423         -verbose:class into man page synopsis.
4424
4425 2004-11-09  Tom Tromey  <tromey@redhat.com>
4426
4427         * expr.c (build_java_arraystore_check): Still generate check if
4428         element type is itself an array.
4429
4430 2004-11-08  Tom Tromey  <tromey@redhat.com>
4431
4432         * java-tree.h (soft_check_assignment_node): Removed.
4433         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4434         * decl.c (java_init_decl_processing): Don't initialize
4435         soft_check_assignment_node.
4436
4437 2004-11-05  Tom Tromey  <tromey@redhat.com>
4438
4439         * class.c (layout_class_methods): Don't add Miranda methods when
4440         using indirect dispatch.
4441
4442 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4443
4444         * class.c (make_class_data): Call emit_assertion_table to set the
4445         'assertion_table' field.
4446         (build_signature_for_libgcj): Move here from expr.c.
4447         (add_assertion_table_entry): New function. Callback for assertion
4448         hashtable traversal.
4449         (emit_assertion_table): New. Take class argument, and generate
4450         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4451         * decl.c (init_decl_processing): Define assertion_entry_type record.
4452         Push 'assertion_table' class field instead of 'verify'.
4453         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4454         (type_assertion_hash): Include 'assertion_code' in hash.
4455         (add_type_assertion): Rewritten. Take class and assertion_code
4456         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4457         (can_widen_reference_to): Use new add_type_assertion() arguments.
4458         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4459         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4460         (verify_identifier_node): Removed.
4461         (assertion_entry_type, assertion_table_type): New.
4462         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4463         assertion code definitions.
4464         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4465         'target_type' to 'op1' and 'op2'.
4466         (add_type_assertion): Declare.
4467         (lang_printable_name_wls): Remove unused definition.
4468         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4469         to emit runtime assertion.
4470         (vfy_note_stack_type): Clean up non-C90 declarations.
4471         (vfy_note_local_type): Likewise.
4472         * verify.h (vfy_is_assignable_from): Declare.
4473         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4474         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4475         instead of is_assignable_from_slow().
4476         (types_compatible): Reinstate ref_compatible() call.
4477
4478 2004-11-04  Tom Tromey  <tromey@redhat.com>
4479
4480         * class.c (build_static_field_ref): Reverted previous patch.
4481
4482         * class.c (build_static_field_ref): Don't emit direct references
4483         when using indirect dispatch.
4484
4485 2004-11-03  Tom Tromey  <tromey@redhat.com>
4486
4487         * expr.c (expand_java_arrayload): Set lhs_type_node.
4488         (expand_java_arraystore): Set rhs_type_node.
4489
4490 2004-11-02  Tom Tromey  <tromey@redhat.com>
4491
4492         * jcf-parse.c (compute_class_name): Use filename length from zip
4493         directory, not strlen.
4494
4495         * expr.c (expand_invoke): Mark new interface methods as abstract.
4496
4497 2004-11-01  Tom Tromey  <tromey@redhat.com>
4498
4499         * verify-impl.c (push_jump): Removed check for uninitialized
4500         objects.
4501         (push_exception_jump): Likewise.
4502         (handle_ret_insn): Likewise.
4503         (handle_jsr_insn): Likewise.
4504         (state_check_no_uninitialized_objects): Removed.
4505
4506         * decl.c (check_local_unnamed_variable): Recognize
4507         promoted-to-int parameters when using the new verifier.
4508         * expr.c (expand_java_arraystore): Explicitly request array type
4509         when using new verifier.
4510         (expand_java_arrayload): Likewise.
4511         (invoke_build_dtable): Don't pass object_type_node as
4512         expression argument to build_java_indirect_ref.
4513         (build_java_check_indexed_type): Do nothing.
4514         (build_java_arraystore_check): Handle case where array doesn't
4515         have array type.
4516         (build_java_array_length_access): Likewise.
4517         (expand_invoke): Handle case where interface overrides a method
4518         from Object.
4519         (pop_type_0): Always succeed for reference types.
4520         (process_jvm_instruction): Don't pop a value in a dead
4521         exception handler.
4522         (pop_arguments): Convert arguments to correct types.
4523
4524 2004-10-29  Andrew Haley  <aph@redhat.com>
4525
4526         * jcf-parse.c (give_name_to_class): Remove line that was
4527         incorrectly merged.
4528
4529 2004-10-29  Andrew Haley  <aph@redhat.com>
4530
4531         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4532
4533 2004-10-20  Andrew Haley  <aph@redhat.com>
4534
4535         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4536
4537 2004-10-26  Tom Tromey  <tromey@redhat.com>
4538
4539         * verify.h (vfy_notify_verified): Removed.
4540         * verify-glue.c (vfy_notify_verified): Removed.
4541
4542 2004-10-26  Tom Tromey  <tromey@redhat.com>
4543
4544         * verify-impl.c (debug_print_state): Declare `i' before code.
4545         (merge_types): Modify `t' when it is null_type.
4546
4547 2004-10-26  Tom Tromey  <tromey@redhat.com>
4548
4549         * verify-impl.c (type_print): Renamed from print.  Now static and
4550         takes an argument.
4551         (debug_print_state): Use type_print.
4552
4553 2004-10-25  Tom Tromey  <tromey@redhat.com>
4554
4555         * expr.c (build_invokeinterface): Compute correct offset for
4556         index into interface methods.
4557
4558 2004-10-20  Tom Tromey  <tromey@redhat.com>
4559
4560         * java-tree.h (verify_jvm_instructions_new): Declare.
4561
4562         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4563         command line.
4564
4565         * verify-impl.c (verify_instructions): Correctly handle wide
4566         types on the stack.
4567         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4568         (vfy_get_component_type): Strip pointer types.
4569         (vfy_find_class): Use get_type_from_signature.  Strip pointer
4570         types.
4571         Include java-except.h.
4572
4573 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
4574
4575         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4576         vfy_push_type_t, set_variable, add_new_state, merge_into,
4577         handle_jsr_insn, branch_prepass, check_class_constant,
4578         check_wide_constant, get_one_type, compute_static_types,
4579         verify_instructions_0): Clean up C99 declarations after statements.
4580
4581 2004-10-20  Tom Tromey  <tromey@redhat.com>
4582
4583         * verify-impl.c (merge_refs): Compare reference against iterator,
4584         not ref2.
4585
4586         * verify-glue.c (vfy_tag): Mask off resolved flag.
4587
4588 2004-10-19  Tom Tromey  <tromey@redhat.com>
4589
4590         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4591         (init_state_with_stack): Initialize `this_type' in state.
4592         (verify_method): Use debug_print.
4593         * verify-glue.c (vfy_is_primitive): Removed debugging print.
4594         (vfy_note_stack_depth): Reverted last patch.
4595         (vfy_note_stack_type): Note pointer to Object, not Object.
4596         (vfy_note_local_type): Likewise.
4597
4598         * verify.h (vfy_note_instruction_seen): Declare.
4599         * verify-glue.c (verify_jvm_instructions_new): Set
4600         BCODE_EXCEPTION_TARGET on target instruction.
4601         (vfy_note_instruction_seen): New function.
4602         * verify-impl.c (FLAG_INSN_SEEN): New define.
4603         (verify_instructions_0): Set flag on instruction.  Save state for
4604         PC=0 later.
4605         (verify_instructions): Call vfy_note_instruction_seen.
4606
4607         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4608         (verify_jvm_instructions_new): Call method_init_exceptions,
4609         add_handler, and handle_nested_ranges.
4610         * verify-impl.c (verify_method): Return 1 on success.
4611         (verify_instructions_0): Save the state at PC=0.
4612
4613         * verify-impl.c (init_type_from_class): Set is_resolved and
4614         ref_next on new ref_intersection.
4615         (init_type_from_string): Likewise.
4616
4617 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
4618
4619         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4620         if flag_new_verifier is set.
4621         * java-tree.h (flag_new_verifier): Declare.
4622         * lang.opt (fnew-verifier): New option.
4623         * verify-impl.c: Work around namespace pollution by undef'ing
4624         'current_class'.
4625         (struct verifier_context): Make 'bytecode' const.
4626         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4627         (types_compatible): For the BC-ABI, always consider reference types
4628         compatible.
4629         (check_class_constant): Use vfr->current_class.
4630         (check_constant): Likewise.
4631         (check_wide_constant): Likewise.
4632         (check_field_constant): Check for 'L' at start of type name.
4633         (get_one_type): Return pointer instead of type. Set type result in
4634         caller via passed type pointer.
4635         (compute_argument_types): Update to use new get_one_type arguments.
4636         (compute_return_type): Likewise.
4637         (make_verifier_context): New. Allocate and initialize 'vfr'.
4638         (free_verifier_context): New. Free 'vfr' and its contents.
4639         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4640         and free_verifier_context.
4641
4642 2004-10-15  Tom Tromey  <tromey@redhat.com>
4643
4644         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4645         * verify.h (vfy_fail): Fixed formatting.
4646
4647         * verify-impl.c (vfr): Fixed comment formatting.
4648         (collapse_type): New function.
4649         (verify_instructions): Notify compiler about type map.
4650         * verify.h (vfy_note_stack_depth): Updated.
4651         (vfy_note_stack_type): Likewise.
4652         (vfy_note_local_type): Likewise.
4653         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4654         Declare.
4655         * verify-glue.c (vfy_note_stack_depth): Correctly size type
4656         state.  Added `method' argument.
4657         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
4658         argument.
4659         (vfy_note_local_type): New function.
4660         (vfy_unsuitable_type): Likewise.
4661         (vfy_return_address_type): Likewise.
4662         (vfy_null_type): Likewise.
4663
4664         * verify.h (VFY_IN_GCC): Removed.
4665         (VFY_WANT_TYPEMAP): Removed.
4666         * verify-impl.c (verify_instructions_0): Removed useless "\".
4667         (struct state) <next>: Uncomment.
4668
4669 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
4670
4671         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4672         C-style.
4673
4674 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4675
4676         * Make-lang.in (verify.o): Re-enabled this target.
4677         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4678         (vfy_get_interface): Likewise.
4679         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4680         * verify.h (verify_jvm_instructions_new): Declare.
4681         * verify-impl.c (free_state): Temporarily comment out unused
4682         function.
4683
4684 2004-10-06  Tom Tromey  <tromey@redhat.com>
4685
4686         * java-tree.h (JV_STATE_READ): New enum value.
4687
4688 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4689
4690         * verify.h: New file.
4691
4692 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
4693
4694         * verify-impl.c, verify-glue.c, verify.h: New files.
4695         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4696
4697 2004-09-24  Andrew Haley  <aph@redhat.com>
4698
4699         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4700         for a slot if it's of pointer type.
4701
4702 2004-09-14  Tom Tromey  <tromey@redhat.com>
4703
4704         * class.c (make_class_data): Correctly initialize "state" field.
4705         Initialize "engine" field.
4706         * decl.c (java_init_decl_processing): Add "engine" field.
4707
4708 2004-09-10  Andrew Haley  <aph@redhat.com>
4709
4710         PR java/12760
4711         * expr.c (build_invokeinterface): Use fast method for interface
4712         dispatch.
4713         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4714         JTI_ITABLE_PTR_TYPE.
4715         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
4716         (emit_symbol_table): Add new arg, element_size.
4717         * decl.c (java_init_decl_processing): Initialize Class.itable.
4718         * class.c (GEN_TABLE): New macro.
4719         (gen_indirect_dispatch_tables): Use it.  Add itable.
4720         (make_class_data): Add new arg for emit_symbol_table().
4721         Emit itable.
4722         (add_miranda_methods): Make sure search_class has been parsed.
4723         (emit_symbol_table): Add new arg, element_size.
4724
4725 2004-09-06  Andrew Haley  <aph@redhat.com>
4726
4727         * verify.c (merge_types): Return Object for all merges of
4728         interfaces.
4729         * expr.c (add_type_assertion): Don't generate assertions when
4730         source type is array of Object.
4731
4732 2004-09-03  Andrew Haley  <aph@redhat.com>
4733
4734         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4735
4736         * lang.c (java_post_options): Force flag_verify_invocations if
4737         we're not using indirect dispatch.
4738
4739         * expr.c (pop_type_0): Move test for interfaces before call to
4740         can_widen_reference_to().
4741         (build_signature_for_libgcj): Remove generation of canonical array
4742         type.
4743         (add_type_assertion): Canonicalize both arrays.
4744         Don't assert that type X can be assigned to Object.
4745         Don't assert that type X an be assigned to type X.
4746         Don't assert that Object can be assigned to type X.
4747         (can_widen_reference_to): Warn whenever we generate an assertion.
4748         (process_jvm_instruction): Use throwable_type_node for the type of
4749         an exception class.
4750
4751 2004-09-01  Andrew Haley  <aph@redhat.com>
4752
4753         * decl.c (java_init_decl_processing): Change
4754         verify_identifier_node to "__verify".
4755         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4756         * java-tree.h (verify_identifier_node): Change to "__verify".
4757
4758         * expr.c (build_signature_for_libgcj): New function.
4759         (add_type_assertion): Use it to construct signatures for
4760         source_type and target_type.
4761
4762 2004-08-27  Andrew Haley  <aph@redhat.com>
4763
4764         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4765         (verify_identifier_node): New.
4766         (TYPE_VERIFY_METHOD): New.
4767         (struct type_assertion): New type.
4768         * expr.c (type_assertion_eq): New function.
4769         (type_assertion_hash): New function.
4770         (add_type_assertion): New function.
4771         (can_widen_reference_to): Call add_type_assertion().
4772         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4773         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4774         (finish_class): Output TYPE_VERIFY_METHOD (type).
4775
4776         * decl.c (end_java_method): Nullify unused fields.
4777
4778 2004-08-17  Andrew Haley  <aph@redhat.com>
4779
4780         * verify.c (defer_merging): Quieten.
4781         * jcf-parse.c (load_class): Only try to open a class file if it's
4782         java.lang.Object or if it's part of the current compilation.
4783         Check that the class we just tried to load is the class we just
4784         loaded.  Quieten.
4785         (java_parse_file): Set flag_verify_invocations off if we're
4786         compiling from .class.
4787         (parse_zip_file_entries): Abort if we try to read a dummy class.
4788         * expr.c (can_widen_reference_to): Quieten.
4789         (build_invokevirtual): Abort if we try to invokevirtual an
4790         interface.
4791         (expand_invoke): Don't build a non-interface call to an interface.
4792         (build_instanceof): Don't do premature optimization if
4793         flag_verify_invocations is not set.
4794         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4795         from superclass.
4796         (build_static_field_ref): Add correct type conversion for
4797         field_address.
4798         (add_miranda_methods): Disable generation of Miranda methods for
4799         dummy classes.
4800         (layout_class_method): Don't complain about non-static method
4801         overrides static method with dummy classes.
4802
4803 2004-08-13  Tom Tromey  <tromey@redhat.com>
4804
4805         * class.c (build_static_field_ref): Re-enable atable lookups for
4806         static fields.
4807
4808         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4809
4810 2004-08-11  Tom Tromey  <tromey@redhat.com>
4811
4812         * gcj.texi (libgcj Runtime Properties): Document new properties.
4813
4814 2004-08-06  Andrew Haley  <aph@redhat.com>
4815
4816         * jcf-parse.c (load_class): Check that we really have loaded the
4817         class we're looking for.
4818
4819 2004-07-19  Andrew Haley  <aph@redhat.com>
4820
4821         * verify.c (verify_jvm_instructions): Comment change only.
4822
4823         * typeck.c (build_java_array_type): Add size field to array name.
4824
4825         * java-tree.h (LOCAL_SLOT_P): New.
4826         (update_aliases): Add PC argument.
4827         (pushdecl_function_level): New function.
4828
4829         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4830         MODIFY_EXPR, and SAVE_EXPR.
4831         (java_gimplify_modify_expr): New function.
4832
4833         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4834         (expand_iinc): Pass PC to update_aliases().
4835         (STORE_INTERNAL): Likewise.
4836         (process_jvm_instruction): Likewise.
4837
4838         * decl.c (base_decl_map): New variable.
4839         (uniq): New variable.
4840         (update_aliases): Rewrite with more thorough checking.
4841         (debug_variable_p): New function.
4842         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4843         (check_local_named_variable): Delete whole function.
4844         (initialize_local_variable): New function.
4845         (check_local_unnamed_variable): Add checks and comments.
4846         (find_local_variable): Rewrite.
4847         (java_replace_reference): New function.
4848         (function_binding_level): New variable.
4849         (pushdecl_function_level): New function.
4850         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4851         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4852         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4853         function_binding_level.
4854         (end_java_method): Null unused fields to save memory.
4855
4856 2004-06-29  Andrew Haley  <aph@redhat.com>
4857
4858         * except.c (expand_start_java_handler): Push a new binding level.
4859         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4860         register_exception_range() to register where we'll do it.
4861         (expand_end_java_handler): Remove old bogus code.  Replace with
4862         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4863         the top of the expression we're curently building.
4864         (maybe_end_try): Delete.
4865         * decl.c (binding_level.exception_range): New field.
4866         (clear_binding_level): Add field exception_range.  Reformat.
4867         (poplevel): Call expand_end_java_handler().
4868         (poplevel): Call java_add_stmt only if functionbody is false.
4869         (maybe_poplevels): Don't call maybe_end_try() from here.
4870         (end_java_method): Clear no longer used trees in function decl.
4871         (register_exception_range): New function.
4872         * java-tree.h (register_exception_range, struct eh_range): Declare.
4873
4874 2004-06-22  Andrew Haley  <aph@redhat.com>
4875
4876         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4877         the otable.
4878         * check-init.c (get_variable_decl): Teach check-init about
4879         FIELD_DECLs addressed via the otable.
4880         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4881         CLASS_PARSED_P.
4882
4883 2004-05-28  Andrew Haley  <aph@redhat.com>
4884
4885         * jcf-parse.c (load_class): Don't try to read a class that we've
4886         already read.
4887
4888         * expr.c (build_invokeinterface): Use the old-fashioned way of
4889         doing indirect dispatch: look up interfaces by name.
4890         * java-tree.h (enum java_tree_index): Add
4891         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4892         * decl.c (java_init_decl_processing): Add
4893         soft_lookupinterfacemethodbyname_node.
4894
4895         * gjavah.c (print_method_info): Final methods have vtable entries,
4896         so gjavah needs to output them.
4897         * class.c (layout_class_method): Generate vtable entries for final
4898         methods.
4899         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4900         dispatch, even if a method is final.
4901
4902 2004-05-25  Andrew Haley  <aph@redhat.com>
4903
4904         * class.c (build_symbol_entry): Convert the names of constructors
4905         to init_identifier_node when generating an entry for the indirect
4906         dispatch table.
4907
4908         * expr.c (build_known_method_ref): Generate indirect calls for
4909         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4910
4911 2004-05-24  Andrew Haley  <aph@redhat.com>
4912
4913         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4914         atable element is of the right type.
4915
4916         * class.c (build_static_field_ref): Cast pointer to correct type
4917         for field.
4918
4919 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4920
4921         * Merged with HEAD as of 20040514. Diff against
4922         gcj-abi-2-merge-20040514.
4923
4924 2004-04-16  Andrew Haley  <aph@redhat.com>
4925
4926         * verify.c (check_pending_block): Disable subroutine checks.
4927         (defer_merging): New function.
4928         (merge_types): If types are dummy, use defer_merging to combine them.
4929         (verify_jvm_instructions): If invocation is invokeinterface and
4930         target is dummy, assume target really is an interface.
4931
4932         * parse.y (patch_invoke): Break out call to java_create_object.
4933
4934         * lang.c (flag_verify_invocations): New.
4935
4936         * jcf-parse.c (load_class): If we've already failed to load a
4937         class, don't try again.
4938         (load_class): If we can't find a .class file, don't fail, but emit
4939         a warning.
4940         (parse_class_file): Don't act on dummy methods.
4941
4942         * java-tree.h (flag_verify_invocations): New.
4943         (TYPE_DUMMY): New.
4944         (lang_type.dummy_class): New field.
4945         (java_create_object): New function.
4946         (METHOD_DUMMY): New.
4947
4948         * expr.c (build_field_ref): Widen field offset.
4949         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4950         that each of its elements is compatible with the one we're
4951         popping.
4952         (pop_type_0): Issue a warning to say that we need to generate a
4953         runtime check.
4954         (java_create_object): New function.
4955         (build_field_ref): Only generate hard refs if we're not using
4956         indirect dispatch.
4957         (expand_java_field_op): If we're using !verify_invocations and we
4958         see a missing field, generate a decl for it.
4959
4960         (expand_invoke): If a class doesn't have the method we seek and
4961         we're using !flag_verify_invocations, generate a decl for the
4962         method now.
4963
4964         (build_known_method_ref): Always use indirect dispatch via the
4965         atable for static methods.
4966
4967         (expand_java_NEW): Break out object creation into new function,
4968         java_create_object.
4969
4970         (can_widen_reference_to): Issue a warning to say that we need to
4971         generate a runtime check.
4972
4973         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4974         (make_method_value): Also use index for interfaces.
4975         (make_class_data): Skip dummy field for inherited data.
4976         Don't build method array for dummy methods.
4977         Set size_in_byte to -1 when using inirect dispatch
4978         Don't build a hard class ref if we don't have a hard ref to our
4979         superclass, or if we're using inirect dispatch.
4980         Null out dispatch tables.
4981
4982         (layout_class_method): Don't complain about non-static method
4983         overrides static method is method is artificial.
4984
4985         (build_static_field_ref): Disable atable references to static
4986         fields for the time being.
4987
4988         (layout_class_methods): Check for CLASS_INTERFACE as
4989         well as CLASS_ABSTRACT.
4990
4991 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4992
4993         * class.c (make_class_data): Don't check flag_inline_functions.
4994         * lang.c (flag_really_inline): Remove unused flag.
4995         (java_handle_option): Don't set it here.  Remove special handling
4996         of flag_inline_functions for Java.
4997         (java_init): Don't set flag_inline_trees here.  Already done...
4998         (java_post_options): ...here.  Don't clear flag_inline_functions.
4999
5000 2004-11-24  Steven Bosscher  <stevenb@suse.de>
5001
5002         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5003         (java_gimplify_exit_block_expr): New function.
5004         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5005         LABELED_BLOCK_EXPR.
5006         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5007         (EXIT_BLOCK_EXPR): Likewise.
5008         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5009         (LABELED_BLOCK_BODY): Likewise.
5010         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5011         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5012         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
5013         TREE_OPERAND.
5014         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5015         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5016         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
5017         second operand of EXIT_BLOCK_EXPR.
5018         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5019         TREE_OPERAND.
5020         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5021
5022 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5023
5024         * xref.h (xref_flag_value): Remove.
5025         (xref_set_data, xref_get_data): Likewise.
5026         (xref_set_current_fp): Likewise.
5027         (XREF_NONE): Likewise.
5028         (XREF_GET_DATA): Likewise.
5029         * xref.c (xref_flag_value): Remove.
5030         (xref_set_data, xref_get_data): Likewise.
5031         (xref_set_current_fp): Likewise.
5032
5033 2004-11-23  Ben Elliston  <bje@au.ibm.com>
5034
5035         * gjavah.c (output_directory): Make static.
5036         (temp_directory): Likewise.
5037
5038 2004-11-15  Tom Tromey  <tromey@redhat.com>
5039
5040         * decl.c (instn_ptr_type_node): Removed.
5041         (lineNumbers_ptr_type_node): Removed.
5042         (jint_type): Removed.
5043         (jint_ptr_type): Removed.
5044
5045 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
5046
5047         PR java/15576
5048         * check-init.c (check_init): Ignore DECL_EXPR.
5049         * expr.c (always_initialize_class_p): Reenable.
5050         (build_class_init): Use a variable to store the decl.  Also use
5051         boolean_false_node instead of integer_zero_node.
5052         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5053         to the block.
5054
5055 2004-11-08  Tom Tromey  <tromey@redhat.com>
5056
5057         PR java/16843:
5058         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5059         generating a JNI header.
5060         (print_field_info): Handle JNI headers.
5061         (jni_print_float): Likewise.
5062         (jni_print_double): Likewise.
5063
5064 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
5065
5066         * decl.c (end_java_method): Remove duplicated code.
5067
5068 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
5069             Gerald Pfeifer  <gerald@pfeifer.com>
5070
5071         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5072         as well.
5073
5074 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
5075
5076         PR java/17265
5077         * class.c: Reinstate 2004-08-18 patch.
5078         (make_local_function_alias): Don't create an alias for extern (native)
5079         functions.
5080
5081 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
5082
5083         PR java/17265
5084         * class.c (make_local_function_alias): Revert 2004-08-18 change.
5085         (make_method_value): Likewise.
5086
5087 2004-10-21  Andrew Haley  <aph@redhat.com>
5088
5089         PR java/18091:
5090         * jcf-parse.c (set_source_filename): Add code to build new sfname.
5091
5092 2004-10-20  Andrew Haley  <aph@redhat.com>
5093
5094         * decl.c (end_java_method): Don't expand if flag_syntax_only.
5095         Remove duplicated code block.
5096
5097 2004-10-18  Steven Bosscher  <stevenb@suse.de>
5098
5099         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5100         New rules to work around old Bison warnings.
5101
5102 2004-10-17  Steven Bosscher  <stevenb@suse.de>
5103
5104         * class.c (ident_subst): Always alloca buffer.
5105         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5106         opcode after including javaop.def.
5107         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5108         conditional expression that exits, to avoid warnings.
5109         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5110         a user of an extension.
5111         * win32-host.c: Move check down to have non-empty file when
5112         WIN32 is not defined.
5113
5114         * Make-lang.in (java-warn): Add STRICT_WARN.
5115         (java/jcf-io.o-warn): Don't have Werror for this file.
5116         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5117
5118 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
5119
5120         * expr.c (expr_add_location): Move declaration to before all
5121         statements.
5122         * parse.y (java_expand_classes): Ditto.
5123         * lex.c (java_peek_unicode): Ditto.
5124
5125 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5126
5127         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5128         if possible, else convert `foo' to 'foo'.
5129         * class.c: Likewise.
5130         * decl.c: Likewise.
5131         * expr.c: Likewise.
5132         * jcf-io.c: Likewise.
5133         * jcf-parse.c: Likewise.
5134         * lang.c: Likewise.
5135         * lex.c: Likewise.
5136         * parse.h: Likewise.
5137
5138 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
5139
5140         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5141         rename parameter 'msg' to 'msgid' in function declaration.
5142         (issue_warning_error_from_context): Likewise.
5143         (yyerror): Rename parameter 'msg' to 'msgid'.
5144         (all over): Use new quoting style for diagnostics.
5145
5146 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
5147
5148         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5149         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5150         Update copyright.
5151
5152 2004-10-14  Matt Austern  <austern@apple.com>
5153
5154         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5155         pointer_set_t* now.
5156
5157 2004-10-13  Tom Tromey  <tromey@redhat.com>
5158
5159         PR java/15578:
5160         * lang.opt (--extdirs): Document.
5161         * jvspec.c (lang_specific_driver): Recognize -encoding and
5162         -extdirs.
5163
5164 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
5165
5166         * parse.y (issue_warning_error_from_context): Use va_list *
5167         instead of va_list parameter.
5168         (parse_error_context): Update call.
5169         (parse_warning_context): Likewise.
5170
5171 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
5172
5173         * parse.y, parse-scan.y: Add list of diagnostic messages to
5174         insulate translation template from version of yacc/bison used
5175         to compile the grammar.
5176
5177 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
5178
5179         Prepare for %q, %< and %> in diagnostic message strings.
5180         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5181         Name second parameter 'msgid'.
5182         * parse.y: Additionally include pretty-print.h and diagnostic.h.
5183         (issue_warning_error_from_context): Use pretty-printer functions
5184         instead of vsprintf for constructing formatted messages. Rename
5185         parameter 'msg' to 'msgid'.
5186         (parse_error_context): Rename parameter 'msg' to 'msgid'.
5187         (parse_warning_context): Likewise.
5188
5189 2004-10-05  Andrew Haley  <aph@redhat.com>
5190
5191         PR java/17779
5192         * jcf-parse.c (parse_zip_file_entries): If a class has a
5193         superclass and a TYPE_SIZE of zero, lay it out.
5194
5195 2004-09-30  Andrew Haley  <aph@redhat.com>
5196
5197         PR java/17733
5198         * jcf-parse.c (compute_class_name): Rewrite.
5199
5200 2004-10-01  Jan Hubicka  <jh@suse.cz>
5201
5202         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5203
5204 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5205
5206         * lex.c: Fix a comment typo.
5207
5208 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5209
5210         * java-tree.h: Fix a comment typo.
5211
5212 2004-09-30  Per Bothner  <per@bothner.com>
5213
5214         Simplify lexer.  Implement --enable-mapped-location support.
5215         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5216         (parse_source_file_1): Pass filename as extra parameter, so we can call
5217         linemap_add and set input_location here, rather than in both callers.
5218         (read_class): Pass copied filename to parse_source_file_1.
5219         Don't initialize wfl_operator - only needed for source compilation.
5220         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5221         * lex.h:  Remove a bunch of debugging macros.
5222         * lex.h (struct_java_line, struct java_error):  Remove types.
5223         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5224         (struct java_lc_s):  Remove prev_col field.
5225         (struct java_lexer):  New fields next_unicode, next_columns, and
5226         avail_unicode.  New position field, and maybe token_start field.
5227         Don't need hit_eof field - use next_unicode == -1 instead.
5228         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5229         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5230         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5231         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5232         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5233         (struct parser_ctxt):  New file_start_location field.
5234         Remove p_line, c_line fields since we no longer save lines.
5235         Remove elc, lineno, and current_jcf fields - no longer used.
5236         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5237         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5238         source_location and is probably not needed anymore anyway.
5239         Use new expr_add_Location function.
5240         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5241         (java_pop_parser_context):  Minor cleanup.
5242         (java_parser_context_save_global, java_parser_context_restore_global,
5243         java_pop_parser_context):  Save/restore input_location as a unit.
5244         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5245         a source_location instead of a wfl context node.
5246         (check_class_interface_creation):  input_filename is not addressable.
5247         (create_artificial_method):  Calling java_parser_context_save_global
5248         and java_parser_context_restore_global is overkill.  Instead,
5249         temporarily set input_location from class decl.
5250         (java_layout_seen_class_methods): Set input_location from method decl.
5251         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5252         (finish_loop_body):  Likewise.
5253         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5254         (java_sprint_unicode):  Take a character, not index in line.
5255         (java_sneak_uncode):  Replaced by java_peek_unicode.
5256         (java_unget_unicode):  No longer used.
5257         (java_allocate_new_line. java_store_unicode):  Removed, since we
5258         no longer remember "lines".
5259         (java_new_lexer):  Update for new data structures.
5260         (java_read_char):  Move unget_value checking to java_read_unicode.
5261         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5262         efficient functions that are used directly when lexing.
5263         (java_read_unicode_collapsing_terminators):  No longer needed.
5264         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5265         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5266         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5267         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5268         combine switch branches, and test for common token kinds earlier.
5269         (java_lex_error):  Rewrite.
5270         * jv-scan.c (expand_location): New function, copied from tree.c.
5271         (main): Set ctxp->filename instead of setting input_filename directly.
5272
5273 2004-09-30  Per Bothner  <per@bothner.com>
5274
5275         More cleanup for --enable-mapped-location.
5276         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5277         input_location here.  Instead do it in give_name_to_class.
5278         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5279         * expr.c (expand_byte_code): Call linemap_line_start.
5280         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5281         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5282         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5283         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5284         to USE_MAPPED_LOCATION case.
5285
5286         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5287         * jcf-parse.c (java_parse_file): Don't set input_filename.
5288         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5289         Create a list of TRANSLATION_UNIT_DECL.
5290         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5291         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5292         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5293         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5294         (file_start_location):  New static.
5295         (set_source_filename):  Avoid extra access to input_filename macro.
5296         Concatenate new name with class's package prefix.
5297         (set_source_filename, give_name_to_class): Update.
5298         (give_name_to_class):  Set class's "line 0" input_location here.
5299         (parse_class_file):  Set input_location as a unit.
5300
5301         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5302
5303 2004-09-29  Per Bothner  <per@bothner.com>
5304
5305         * java-tree.h:  Redefine some macros and add some declaration
5306         to handle the USE_MAPPED_LOCATION case.
5307         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5308         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5309         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5310         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5311
5312         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5313         * decl.c (finish_method, java_add_stmt): Likewise.
5314         * java-gimplify.c (java-gimplify.c):  Likewise.
5315         * jcf-write.c (generate_bytecode_insns):  Likewise.
5316         * lang.c (java_post_options): Likewise - call linemap_add.
5317
5318 2004-09-29  Andrew Haley  <aph@redhat.com>
5319
5320         PR java/17007
5321         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5322         result of TRUNC_MOD_EXPR.
5323         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5324         * decl.c (java_init_decl_processing): Mark
5325         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5326
5327 2004-09-28  Tom Tromey  <tromey@redhat.com>
5328
5329         PR java/15710:
5330         * class.c (add_miranda_methods): Load superinterface if not
5331         already loaded.
5332
5333 2004-09-28  Andrew Haley  <aph@redhat.com>
5334
5335         PR java/17586
5336         * jcf-parse.c (load_class): Don't try to read a class that we've
5337         already read.
5338
5339 2004-09-28  Andrew Haley  <aph@redhat.com>
5340
5341         * jcf-parse.c (load_class): Back out previous broken patch.
5342
5343 2004-09-28  Andrew Haley  <aph@redhat.com>
5344
5345         PR java/17586
5346         * jcf-parse.c (load_class): Don't try to read a class that we've
5347         already read.
5348         Check that we really did read the right class.
5349
5350 2004-09-25  Tom Tromey  <tromey@redhat.com>
5351
5352         PR java/17500:
5353         * parse.y (create_artificial_method): Use add_method_1.
5354
5355 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5356
5357         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5358         comment typos.
5359         * gcj.texi: Fix typos.
5360
5361 2004-09-24  Tom Tromey  <tromey@redhat.com>
5362
5363         PR java/15656:
5364         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5365         in error parts of rule.
5366         (unary_expression): Don't call error_if_numeric_overflow when $1
5367         is NULL.
5368
5369 2004-09-24  Tom Tromey  <tromey@redhat.com>
5370
5371         PR java/16789:
5372         * parse.y (resolve_qualified_expression_name): Set
5373         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5374         * expr.c (force_evaluation_order): Check for empty argument list
5375         after stripping COMPOUND_EXPR.
5376
5377 2004-09-23  Andrew Haley  <aph@redhat.com>
5378
5379         PR java/16927:
5380         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5381         COND_EXPRs.
5382
5383 2004-09-23  Tom Tromey  <tromey@redhat.com>
5384
5385         PR java/17329:
5386         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5387         where operand is null.
5388
5389 2004-09-23  Tom Tromey  <tromey@redhat.com>
5390
5391         PR java/17380:
5392         * parse.y (not_accessible_p): Allow access to protected members
5393         even when class is not static.
5394
5395 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5396
5397         * Make-lang.in: Revert the gcc-none.o change.
5398
5399 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5400
5401         * parse.y (patch_anonymous_class): VEC_space returns true if there
5402         is space.
5403
5404 2004-09-21  Matt Austern  <austern@apple.com>
5405
5406         Fix bootstrap.
5407         * gjavah.c (free_method_name_list): Fix function definition so
5408         it's a proper C prototype.
5409
5410 2004-09-21  Tom Tromey  <tromey@redhat.com>
5411
5412         PR java/17575:
5413         * gjavah.c (free_method_name_list): New method.
5414         (main): Call it.
5415
5416 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5417             Zack Weinberg  <zack@codesourcery.com>
5418
5419         * java-tree.def: Use tree_code_class enumeration constants
5420         instead of code letters.
5421         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5422         new tree-class enumeration constants.
5423
5424 2004-09-13  Tom Tromey  <tromey@redhat.com>
5425
5426         PR java/17216:
5427         * class.c (layout_class_method): Put synthetic methods into the
5428         vtable.
5429
5430 2004-09-11  Andrew Pinski  <apinski@apple.com>
5431
5432         * Make-lang.in (java/ggc-none.c): Change dependency
5433         for ggc.h into $(GGC_H).
5434
5435 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5436
5437         * Make-lang.in (java/win32-host.o): Add dependency on
5438         coretypes.h.
5439         * win32-host.c: Add includes for coretypes.h, jcf.h
5440
5441 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5442
5443         * Make-lang.in (GCJH_OBJS): Change dependency from
5444         ggc-none.o to java/ggc-none.o
5445         (JCFDUMP_OBJS): Likewise.
5446         (java/ggc-none.o): New target.
5447
5448 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5449
5450         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5451         * class.c (build_utf8_ref, build_static_field_ref,
5452         make_field_value, make_method_value, get_dispatch_table,
5453         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5454         * constants.c (get_tag_node, build_ref_from_constant_pool,
5455         build_constants_constructor): Likewise.
5456         * decl.c (java_init_decl_processing): Likewise.
5457         * expr.c (build_java_array_length_access, build_newarray,
5458         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5459         build_java_binop, build_field_ref, expand_java_add_case,
5460         expand_java_call, build_known_method_ref, build_invokevirtual,
5461         build_invokeinterface, build_jni_stub): Likewise.
5462         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5463         * jcf-parse.c (get_constant): Likewise.
5464         * lex.c (do_java_lex): Likewise.
5465         * parse.y (patch_binop, patch_unaryop, patch_cast,
5466         build_newarray_node, patch_newarray): Likewise.
5467         * resource.c (compile_resource_data): Likewise.
5468         * typeck.c (build_prim_array_type): Likewise.
5469
5470 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5471
5472         * decl.c (java_init_decl_processing): Adjust
5473         initialize_sizetypes call.
5474
5475 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5476
5477         * jv-scan.c (fancy_abort): Add.
5478
5479 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5480
5481         * expr.c (build_java_arrayaccess): Use convert to change
5482         len's type.
5483
5484 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5485
5486         * class.c (make_local_function_alias): Allocate extra space for 'L'
5487         in name buffer. Reported by Thomas Neumann.
5488
5489 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5490
5491         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5492         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5493         * lex.c (do_java_lex): Adjust.
5494         (error_if_numeric_overflow): Likewise.
5495
5496 2004-08-18  Andrew Pinski  <apinski@apple.com>
5497
5498         * class.c (make_local_function_alias): Only make a new decl if we
5499         support alias attribute on all decls.
5500
5501 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5502
5503         * class.c (make_local_function_alias): New function. Create local
5504         alias for public method DECL.
5505         (make_method_value): Use make_local_function_alias.
5506         * parse.y (craft_constructor): Don't special-case anonymous classes.
5507         Always set ctor_name to init_identifier_node.
5508         (lookup_method_invoke): Call layout_class_method when creating
5509         anonymous class constructor.
5510
5511 2004-08-18  Richard Henderson  <rth@redhat.com>
5512
5513         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5514         default case.  Treat '<' similarly.  Update for
5515         is_gimple_formal_tmp_var name change.
5516
5517 2004-08-17  Andrew Haley  <aph@redhat.com>
5518
5519         * lang.c (lang_printable_name): Obey verbose flag.
5520         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5521         lang_printable_name().
5522         (verify_constructor_circularity, get_printable_method_name,
5523         check_abstract_method_definitions, java_check_regular_methods,
5524         java_check_abstract_methods, check_inner_class_access,
5525         fix_constructors, patch_method_invocation, patch_return):
5526         Likewise.
5527         * expr.c (pop_type_0): Likewise.
5528
5529         * java-tree.h (lang_printable_name_wls): Delete.
5530
5531 2004-08-16  Tom Tromey  <tromey@redhat.com>
5532
5533         PR java/8473:
5534         * parse.y (primary): Changed for initialized and uninitialized
5535         array creations.
5536         (array_access): Handle array_creation_initialized.
5537         (array_creation_expression): Split into
5538         array_creation_initialized and array_creation_uninitialized.
5539
5540 2004-08-16  Andrew Haley  <aph@redhat.com>
5541
5542         * jcf-write.c (find_constant_index): Canonicalize NaNs when
5543         generating bytecode.
5544
5545 2004-08-16  Elliot Lee <sopwith@redhat.com>
5546
5547         PR java/9677
5548         * jcf-parse.c (java_parse_file): Handle filenames with embedded
5549         spaces, and quoted filelists.
5550
5551 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5552
5553         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5554         * class.c (build_utf8_ref, build_static_field_ref,
5555         make_field_value, make_method_value, get_dispatch_table,
5556         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5557         * constants.c (get_tag_node,  build_ref_from_constant_pool,
5558         build_constants_constructor): Likewise.
5559         * decl.c (java_init_decl_processing): Likewise.
5560         * expr.c (build_java_array_length_access, build_newarray,
5561         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5562         build_java_binop, build_field_ref, expand_java_add_case,
5563         expand_java_call, build_known_method_ref, build_invokevirtual,
5564         build_invokeinterface, build_jni_stub): Likewise.
5565         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5566         * jcf-parse.c (get_constant): Likewise.
5567         * lex.c (do_java_lex): Likewise.
5568         * parse.y (patch_binop, patch_unaryop, patch_cast,
5569         build_null_of_type, patch_newarray): Likewise.
5570         * resource.c (compile_resource_data): Likewise.
5571         * typeck.c (build_prim_array_type): Likewise.
5572
5573 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
5574
5575         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5576         Don't create BLOCK here or call java_gimplify_block.
5577
5578 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5579
5580         * java-tree.h (flag_deprecated): Removed.
5581         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5582         * parse.y (check_deprecation): Check warn_deprecated instead of
5583         flag_deprecated.
5584
5585 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
5586
5587         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5588         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5589         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5590         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5591         flag_force_classes_archive_check, flag_optimize_sci,
5592         flag_indirect_dispatch): Remove explicit declarations.
5593         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
5594         final comment.
5595
5596 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
5597
5598         PR bootstrap/14893
5599         * Make-lang.in (java.install-man): Install from either build
5600         tree or source tree, whichever has the file first.
5601
5602 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
5603
5604         * jcf-parse.c (get_constant): Adjust force_fit_type call.
5605         * lex.h (SET_LVAL_NODE_TYPE): Remove.
5606         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5607         (do_java_lex): Likewise. Adjust force_fit_type call.
5608
5609 2004-08-04  Roger Sayle  <roger@eyesopen.com>
5610             Andrew Haley  <aph@redhat.com>
5611
5612         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5613         checking trees as they're being built.
5614         (convert): Call convert_ieee_real_to_integer if we're
5615         converting a constant, even if we're writing a class file.
5616
5617 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
5618
5619         PR java/16701
5620         * parse.y (fold_constant_for_init): Call resolve_field_access with
5621         correct current_class context.
5622
5623 2004-08-01  Roger Sayle  <roger@eyesopen.com>
5624
5625         * decl.c (update_aliases, initialize_local_variable): Replace calls
5626         to build with calls to buildN.
5627         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5628         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5629         * parse.h (BUILD_THROW): Likewise.
5630         * parse.y (switch_expression, synchronized_statement,
5631         catch_clause_parameter, array_creation_expression,
5632         conditional_expression, make_qualified_name,
5633         resolve_qualified_expression_name, patch_method_invocation,
5634         patch_invoke, build_method_invocation, build_new_invocation,
5635         build_assignment, patch_assignment, build_binop, patch_binop,
5636         build_string_concatenation, build_incdec, patch_unaryop,
5637         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5638         patch_return, build_if_else_statement, build_labeled_block,
5639         build_new_loop, build_loop_body, build_bc_statement,
5640         build_assertion, encapsulate_with_try_catch, build_try_statement,
5641         build_try_finally_statement, patch_synchronized_statement,
5642         emit_test_initialization): Likewise, replace build with buildN.
5643
5644 2004-07-28  Eric Christopher  <echristo@redhat.com>
5645
5646         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5647         (java_unsafe_for_reeval): Ditto.
5648
5649 2004-07-26    <hp@bitrange.com>
5650
5651         * parse.y (build_super_invocation): Adjust declaration order to
5652         avoid declaration after statement.
5653
5654 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
5655
5656         * decl.c: Rename all identifiers named `class' to `cl'.
5657
5658 2004-07-25  Richard Henderson  <rth@redhat.com>
5659
5660         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5661
5662 2004-07-23  Mike Stump  <mrs@apple.com>
5663
5664         * boehm.c (set_bit): Improve type safety wrt unsignedness.
5665         * gjavah.c (throwable_p, decode_signature_piece,
5666         print_full_cxx_name, print_include, add_namelet, add_class_decl,
5667         process_file): Likewise.
5668         * jcf-dump.c (main): Likewise.
5669         * jcf-io.c (read_zip_member): Likewise.
5670         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5671         give_name_to_class, get_class_constant): Likewise.
5672         * jcf-write.c (find_constant_wide, push_long_const,
5673         generate_classfile): Likewise.
5674         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5675         * parse.y (read_import_dir): Likewise.
5676         * typeck.c (parse_signature_type): Likewise.
5677         * verify.c (verify_jvm_instructions): Likewise.
5678         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5679
5680 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
5681
5682         * Make-lang.in: Replace rmic and rmiregistry references with
5683         grmic and grmiregistry.
5684         * gcj.texi: Likewise.
5685
5686 2004-07-20  Andrew Haley  <aph@redhat.com>
5687
5688         PR java/16431.
5689         * verify.c (verify_jvm_instructions): Comment change only.
5690
5691         * typeck.c (build_java_array_type): Add size field to array name.
5692
5693         * java-tree.h (LOCAL_SLOT_P): New.
5694         (update_aliases): Add PC argument.
5695         (pushdecl_function_level): New function.
5696
5697         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5698         MODIFY_EXPR, and SAVE_EXPR.
5699         (java_gimplify_modify_expr): New function.
5700
5701         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5702         (expand_iinc): Pass PC to update_aliases().
5703         (STORE_INTERNAL): Likewise.
5704         (process_jvm_instruction): Likewise.
5705
5706         * decl.c (base_decl_map): New variable.
5707         (uniq): New variable.
5708         (update_aliases): Rewrite with more thorough checking.
5709         (debug_variable_p): New function.
5710         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5711         (check_local_named_variable): Delete whole function.
5712         (initialize_local_variable): New function.
5713         (check_local_unnamed_variable): Add checks and comments.
5714         (find_local_variable): Rewrite.
5715         (java_replace_reference): New function.
5716         (function_binding_level): New variable.
5717         (pushdecl_function_level): New function.
5718         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5719         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5720         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5721         function_binding_level.
5722         (end_java_method): Null unused fields to save memory.
5723
5724 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5725
5726         * class.c (add_interface_do): Remove.
5727         (set_super_info, interface_of_p, maybe_add_interface,
5728         add_interface, make_class_data, layout_class,
5729         add_miranda_methods): Adjust BINFO accessors and addition.
5730         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5731         accessors.
5732         * jcf-write.c (generate_classfile): Likewise.
5733         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5734         check_circular_reference, java_complete_class,
5735         check_abstract_method_definitions,
5736         java_check_abstract_method_definitions,
5737         check_interface_throws_clauses, java_check_abstract_methods,
5738         lookup_java_interface_method2,
5739         find_applicable_accessible_methods_list): Adjust BINFO accessors
5740         and addition.
5741         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5742
5743 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5744
5745         * builtins.c (max_builtin, min_builtin,
5746         java_build_function_call_expr): Replace calls to build with buildN.
5747         * class.c (build_class_ref, build_static_field_ref,
5748         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5749         * constants.c (build_ref_from_constant_pool): Likewise.
5750         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5751         add_stmt_to_compound): Likewise.
5752         * except.c (build_exception_object_ref, expand_end_java_handler):
5753         Likewise.
5754         * java-gimplify.c (java_gimplify_case_expr,
5755         java_gimplify_default_expr, java_gimplify_block,
5756         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5757         * jcf-write.c (generate_bytecode_insns): Likewise.
5758         * typeck.c (convert_ieee_real_to_integer): Likewise.
5759
5760 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5761
5762         * java-tree.h (builtin_function): Declare.
5763
5764 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5765
5766         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5767         abuse restore_line_number_status.
5768
5769 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5770
5771         g++/15861
5772         * jcf-parse.c (java_emit_static_constructor): Specify default
5773         priority.
5774
5775 2004-07-13  Per Bothner  <per@bothner.com>
5776
5777         * java-tree.h (all_class_filename):  Remove useless macro.
5778         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5779         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5780         * parse.y (java_parser_context_restore_global):  Replace
5781         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5782         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5783
5784 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5785
5786         PR java/16474
5787         gjavah.c (print_field_info): Emit constant only if field is static.
5788
5789 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5790
5791         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5792         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5793         build_java_ret, build_java_throw_out_of_bounds_exception,
5794         build_java_array_length_access, java_check_reference,
5795         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5796         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5797         expand_java_arrayload, build_java_monitor, expand_java_return,
5798         expand_load_internal, expand_java_NEW, build_get_class,
5799         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5800         build_java_soft_divmod, build_java_binop, build_field_ref,
5801         expand_compare, expand_java_goto, expand_java_switch,
5802         expand_java_add_case, build_class_init, build_known_method_ref,
5803         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5804         expand_invoke, build_jni_stub, expand_java_field_op,
5805         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5806         force_evaluation_order, emit_init_test_initialization): Convert
5807         calls to "build" into calls to the prefered "buildN" functions.
5808
5809 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5810
5811         * java-tree.h (set_block): Remove.
5812         * lang.c (java_clear_binding_stack): New.
5813         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5814         * decl.c (struct binding_level): Remove this_block.
5815         (clear_binding_level): Likewise.
5816         (poplevel): Don't handle this_block.
5817         (set_block): Remove.
5818
5819 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5820
5821         * class.c (common_enclosing_context_p): Remove statement with no
5822         side-effects.
5823
5824 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5825
5826         PR java/8618
5827         * parse.y (create_anonymous_class): Remove 'location' argument. Use
5828         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5829         (craft_constructor): Inherit access flags for implicit constructor
5830         from the enclosing class.
5831         (create_class): Fix comment typo.
5832         (resolve_qualified_expression_name): Pass type of qualifier to
5833         not_accessible_p, not the type in which target field was found.
5834         (not_accessible_p): Handle inner classes. Expand protected
5835         qualifier-subtype check to enclosing instances, but don't apply this
5836         check to static members. Allow protected access to inner classes
5837         of a subtype. Allow private access within common enclosing context.
5838         (build_super_invocation): Get WFL line number info from current
5839         class decl.
5840         (build_incomplete_class_ref): Update for new create_anonymous_class
5841         signature.
5842         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5843         common_enclosing_instance_p.
5844         * class.c (common_enclosing_context_p): New. Determine if types
5845         share a common enclosing context, even across static contexts.
5846         (common_enclosing_instance_p): Renamed from
5847         common_enclosing_context_p. Determines if types share a common
5848         non-static enclosing instance.
5849         * java-tree.h (common_enclosing_instance_p): Declare.
5850         * jcf-write.c (get_method_access_flags): New. Surpress private flag
5851         for inner class constructors.
5852         (generate_classfile): Use get_method_access_flags.
5853
5854 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5855
5856         * class.c (interface_of_p): Check for null TYPE_BINFO.
5857
5858 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
5859
5860         * class.c (make_class): Do not create binfo here.
5861         (set_super_info): Create it here.
5862         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5863
5864 2004-07-08  Richard Henderson  <rth@redhat.com>
5865
5866         * expr.c (case_identity, get_primitive_array_vtable,
5867         java_expand_expr, emit_init_test_initialization): Remove.
5868         * java-tree.h (java_expand_expr): Remove.
5869         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5870
5871 2004-07-07  Per Bothner  <per@bothner.com>
5872
5873         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
5874         get internal error due to mismatched types.
5875
5876         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
5877
5878         * gcj.texi (Linking):   New node.  Document -lgij usage.
5879
5880 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5881
5882         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5883         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5884         * java/class.c (set_super_info, class_depth, interface_of_p,
5885         maybe_add_interface, add_interface, make_class_data,
5886         layout_class, add_miranda_methods): Adjust BINFO macros.
5887         * expr.c (can_widen_reference_to, lookup_field): Likewise.
5888         * jcf-write.c (generate_classfile): Likewise.
5889         * parse.y (patch_anonymous_class,
5890         check_inner_circular_reference, check_circular_reference,
5891         java_complete_class, check_abstract_method_definitions,
5892         java_check_abstract_method_definitions,
5893         check_interface_throws_clauses, java_check_abstract_methods,
5894         lookup_java_interface_method2,
5895         find_applicable_accessible_methods_list): Likewise.
5896         * typeck.c (find_method_in_interface): Likewise.
5897         * verify.c (merge_types): Likewise.
5898
5899 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5900
5901         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5902         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5903
5904 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5905
5906         * class.c (make_class): Use make_tree_binfo.
5907         (set_super_info, add_interface_do): Likewise.
5908         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5909
5910 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5911
5912         * verify.c: Correct array element access formatting thinko.
5913
5914 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5915
5916         * verify.c: Insert a short blurb at the start referring to the JVMS.
5917         (merge_type_state): Remove redundant nested if statement.
5918         (verify_jvm_instructions): Ensure current_subr is initialised to
5919         NULL_TREE.
5920         Minor formatting fixes all over the place.
5921
5922 2004-07-02  Richard Henderson  <rth@redhat.com>
5923
5924         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5925
5926 2004-07-01  Richard Henderson  <rth@redhat.com>
5927
5928         * class.c (registerClass_libfunc): Remove.
5929         (init_class_processing): Don't set it.
5930         (emit_register_classes): Take list_p parameter.  Fill it in
5931         with _Jv_RegisterClass calls.
5932         * decl.c (java_init_decl_processing): Don't call
5933         init_resource_processing.
5934         * jcf-parse.c (java_emit_static_constructor): New.
5935         (java_parse_file): Call it.
5936         * resource.c (registerResource_libfunc): Remove.
5937         (init_resource_processing): Remove.
5938         (write_resource_constructor): Take list_p parameter.  Fill it in
5939         with _Jv_RegisterResource calls.
5940         * java-tree.h: Update prototypes.
5941
5942 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
5943
5944         PR java/1262
5945         * class.c (layout_class_method): Do not override package-private
5946         method if its in a different package.
5947         (split_qualified_name): Move here from parse.y. Rename from
5948         breakdown_qualified. Add comment.
5949         (in_same_package): Move here from parse.y. Add comment.
5950         * java-tree.h (break_down_qualified, in_same_package): Declare.
5951         (in_same_package): Likewise.
5952         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5953         Callers updated.
5954
5955 2004-06-29  Andrew Haley  <aph@redhat.com>
5956
5957         * except.c (expand_start_java_handler): Push a new binding level.
5958         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5959         register_exception_range() to register where we'll do it.
5960         (expand_end_java_handler): Remove old bogus code.  Replace with
5961         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5962         the top of the expression we're curently building.
5963         (maybe_end_try): Delete.
5964         * decl.c (binding_level.exception_range): New field.
5965         (clear_binding_level): Add field exception_range.  Reformat.
5966         (poplevel): Call expand_end_java_handler().
5967         (poplevel): Call java_add_stmt only if functionbody is false.
5968         (maybe_poplevels): Don't call maybe_end_try() from here.
5969         (end_java_method): Clear no longer used trees in function decl.
5970         (register_exception_range): New function.
5971         * java-tree.h (register_exception_range, struct eh_range): Declare.
5972
5973 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
5974
5975         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5976
5977 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
5978
5979         Formatting fixes.
5980         * expr.c (class_has_finalize_method): Fix method name indentation.
5981         (expand_java_call): Remove K&R style parameter declaration.
5982         (expand_invoke): Fix statement indentation.
5983         (expand_java_field_op): Likewise.
5984         * parse-scan.y: Fix typo.
5985         (reset_report): Fix method name indentation.
5986         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5987         line. Fix typos.
5988         * verify.c (verify_jvm_instructions): Document parameters, insert
5989         page break.
5990         * lang.c (lang_init_source): Fix method name indentation.
5991         * class.c (common_enclosing_context_p): Likewise.
5992         (emit_symbol_table): Fix parameter list indentation.
5993         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5994         parameter declaration.
5995         * constants.c: Fix copyright notice indentation.
5996         * typeck.c (find_method_in_superclasses): Fix parameter list
5997         indentation.
5998         (find_method_in_interfaces): Likewise.
5999         * zextract.c (makelong): Fix method name indentation.
6000
6001 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6002
6003         PR java/15715.
6004         * parse.y (create_interface): Set correct access modifiers for
6005         interfaces.
6006         * jcf-write.c (get_classfile_modifiers): New function.
6007         (generate_classfile): Use get_classfile_modifiers, not
6008         get_access_flags.
6009
6010 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6011
6012         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6013         dependency to current parser context, not NULL_TREE, for top-level
6014         classes.
6015         (jdep_resolve_class): Enable member access check for all inner
6016         class dependencies.
6017
6018 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6019
6020         * parse.y (qualify_and_find): Pass type decl, not identifier, to
6021         load_class.
6022
6023 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6024
6025         PR java/15734
6026         * expr.c (expand_java_field_op): Ensure that target class for static
6027         field access has been loaded.
6028
6029 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
6030             Ranjit Mathew  <rmathew@hotmail.com>
6031
6032         PR java/1207, java/16178
6033         * jcf-parse.c (load_class): Return immediately if passed a type decl
6034         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6035         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6036         before calling load_class.
6037         (qualify_and_find): Likewise.
6038         (find_in_imports_on_demand): Likewise.
6039         (find_applicable_accessible_methods_list): Likewise.
6040
6041 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
6042
6043         * parse.y (java_layout_seen_class_methods): Don't call load_class
6044         on class defined by source parser.
6045
6046 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
6047
6048         * parse.y (set_nested_class_simple_name_value): Removed.
6049         (java_complete_expand_class): Remove calls to
6050         set_nested_class_simple_name_value.
6051
6052 2004-06-22  Andrew Haley  <aph@redhat.com>
6053             Ranjit Mathew  <rmathew@hotmail.com>
6054
6055         Fixes PR java/16113.
6056         * decl.c (force_poplevels): Remove call to expand_end_bindings.
6057
6058 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
6059
6060         * parse.y (create_class): Correct diagnostic message about
6061         java.lang.Object extending anything else.
6062
6063 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6064
6065         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6066         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6067         * constants.c (build_ref_from_constant_pool): Likewise.
6068         * expr.c (build_java_array_length_access): Likewise.
6069         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6070         (invoke_build_dtable, build_invokevirtual): Likewise.
6071         (build_invokeinterface, java_expand_expr): Likewise.
6072         (emit_init_test_initialization): Likewise.
6073         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6074         * parse.y (make_qualifed_name, build_array_ref): Likewise.
6075
6076 2004-06-21  Andrew Haley  <aph@redhat.com>
6077
6078         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6079         block.
6080
6081 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
6082
6083         * jcf.h (struct JCF): Change java_source, right_zip and finished
6084         to unsigned int.
6085         * lex.h (struct java_lexer): Change hit_eof, read_anything,
6086         byte_swap and use_fallback to unsigned int.
6087         * parse.h (struct _jdep): Change flag0 to unsigned int.
6088
6089 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
6090
6091         Fixes PR java/13948
6092         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6093         before trying to lay out its methods.
6094         * jcf-parse.c (read_class): Track parsed files using canonical paths
6095         obtained via lrealpath from libiberty.
6096         (java_parse_file): Likewise.
6097         (parse_source_file_1): Rename formal parameter to reflect its
6098         modified purpose. Minor formatting fix.
6099
6100 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6101
6102         * class.c (emit_register_classes): Make the function uninlinable,
6103         do not set current_function_cannot_inline.
6104         * resource.c (write_resource_constructor): Do not reset
6105         flag_inline_functions around rest_of_compilation.
6106
6107 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
6108
6109         PR java/15769
6110         * expr.c (java_truthvalue_conversion): Handle
6111         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6112         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6113         i.e. return the expression.
6114
6115 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
6116
6117         * gjavah.c: Include version.h
6118
6119 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
6120
6121         * jcf-write.c (generate_bytecode_conditional): Correct handling
6122         of unordered conditionals. Add comment.
6123
6124 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
6125             Per Bothner  <per@bothner.com>
6126
6127         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6128         local variable was initialised upon declaration.
6129         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6130         variable was final and initialised upon declaration.
6131         * check-init.c (check_final_reassigned): Give error only if a blank
6132         final is not definitely unassigned or if an initialised final is
6133         reassigned.
6134         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6135         assignment expressions. Remove case MODIFY_EXPR, label do_default.
6136         (check_init): Perform initialised-variable-removing-optimisation
6137         only on non-final local variables.
6138
6139 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6140
6141         * jcf-write.c (generate_bytecode_conditional): Handle binops
6142         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6143         and LTGT_EXPR.
6144         (generate_bytecode_insns): Likewise.
6145
6146 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6147
6148         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6149         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6150
6151 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6152
6153         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6154         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6155
6156 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6157
6158         * decl.c (struct binding_level): Add GTY marker. Compile
6159         binding_depth unconditionally.
6160         (current_binding_level, free_binding_level, global_binding_level):
6161         Likewise.
6162         (clear_binding_level): Unconditionally set binding_depth.
6163         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6164
6165 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6166
6167         * lex.c (java_new_lexer): Set 'encoding'.
6168         (java_read_char): Improve error message for unrecognized characters.
6169         * lex.h (struct java_lexer): New field 'encoding'.
6170
6171 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6172
6173         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6174
6175 2004-05-21  Mark Wielaard  <mark@klomp.org>
6176
6177         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6178         extern.
6179
6180 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
6181
6182         * typeck.c: Remove non-printable character 160.
6183
6184 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
6185
6186         * check-init.c: Correct minor typos.
6187
6188 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6189
6190         * Make-lang.in, expr.c, java-gimplify.c: Rename
6191         tree-simple.[ch] to tree-gimple.[ch].
6192
6193 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
6194
6195         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6196
6197 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6198
6199         Merge from tree-ssa-20020619-branch.  See
6200         ChangeLog.tree-ssa for details.
6201
6202         * Make-lang.in, builtins.c, check-init.c, class.c,
6203         constants.c, decl.c, except.c, expr.c, java-except.h,
6204         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6205         lang.c, lang.opt, parse.y, resource.c: Merged.
6206         * java-gimplify.c: New file.
6207
6208 2004-05-10  Andrew Haley  <aph@redhat.com>
6209
6210         * parse.y (create_class): Set TYPE_VFIELD.
6211         * decl.c (java_init_decl_processing): Likewise.
6212
6213         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6214         * class.c (make_method_value): Replace DECL_VINDEX with call to
6215         get_method_index().
6216         (get_dispatch_vector): Likewise.
6217         (layout_class_method): Likewise.
6218         Replace set of DECL_VINDEX with call to set_method_index().
6219         (set_method_index): New function.
6220         (get_method_index): New function.
6221         * java-tree.h (set_method_index): New function decl.
6222         (get_method_index): New function decl.
6223
6224 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6225
6226         * parse.y (check_pkg_class_access): Add new argument
6227         and use it when cl is NULL to call lookup_cl on it.
6228         (parser_check_super_interface): Do not call lookup_cl.
6229         Pass this_decl to check_pkg_class_access and NULL
6230         instead of lookup_cl.
6231         (parser_check_super): Update for change in
6232         check_pkg_class_access.
6233         (do_resolve_class): Likewise.
6234         (process_imports): Likewise.
6235         (find_in_imports_on_demand): Likewise.
6236         (resolve_qualified_expression_name): Likewise.
6237
6238 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6239
6240         Fixes PR java/9685, PR java/15073
6241         * parse.y (accessibility_string): New method.
6242         (not_accessible_field_error): Use accessibility_string()
6243         instead of java_accstring_lookup().
6244         (resolve_qualified_expression_name): Check with
6245         check_pkg_class_access() before allowing access using
6246         qualified names.
6247         Fix comment typo.
6248         Use check_pkg_class_access() instead of not_accessible_p()
6249         for unqualified types.
6250         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6251         REFERENCE for package-private access checking.
6252         (patch_method_invocation): Use accessibility_string() instead
6253         of java_accstring_lookup().
6254
6255 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6256
6257         Fixes PR java/15133
6258         * gjavah.c (struct method_name): Add member is_native.
6259         (overloaded_jni_method_exists_p): Match candidate method only if
6260         it is native.
6261         (print_method_info): Initialise is_native flag from the method's
6262         access flags.
6263
6264 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6265
6266         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6267         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6268
6269 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6270
6271         * resource.c (write_resource_constructor): Guard call to possibly
6272         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6273
6274 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6275
6276         * class.c (make_class_data): Add new field aux_info.
6277         * decl.c (java_init_decl_processing): Push type and decl for
6278         `aux_info'.
6279
6280 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6281
6282         * expr.c (expand_java_NEW): Don't use size argument for
6283         _Jv_AllocObject calls.
6284         * parse.y (patch_invoke): Likewise.
6285
6286 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6287
6288         * expr.c (build_invokeinterface): Remove unused variables to
6289         fix warnings.
6290
6291 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6292
6293         * class.c (get_interface_method_index): New function. Return dispatch
6294         index for interface method.
6295         (make_method_value): For interface methods, set index field to
6296         iface dispatch index, not DECL_VINDEX.
6297         * expr.c (build_invokeinterface): Use get_interface_method_index.
6298
6299 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6300
6301         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6302
6303 2004-03-31  Andrew Haley  <aph@redhat.com>
6304
6305         PR java/14104
6306         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6307
6308 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6309
6310         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6311         form of GTY markers.
6312
6313 2004-03-25  Marcus Meissner  <meissner@suse.de>
6314
6315         PR java/14689:
6316         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6317
6318 2004-03-23  Tom Tromey  <tromey@redhat.com>
6319
6320         PR java/14315:
6321         * jcf-write.c (make_class_file_name): Don't report if mkdir
6322         failed with EEXIST.
6323
6324 2004-03-23  Tom Tromey  <tromey@redhat.com>
6325
6326         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6327
6328 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6329
6330         * class.c, gjavah.c, lang.c: Fix comment typos.
6331         * gcj.texi: Fix typos.
6332
6333 2004-03-19  Per Bothner  <per@bothner.com>
6334
6335         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6336
6337         * class.c (assume_compiled_node_struct):  Rename type to
6338         class_flag_node_struct, as it is now also used for enable_assertions.
6339         Rename assume_compiled_node typedef.  Rename excludep field to value.
6340         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6341         Minor optimization - avoid needless strlen.
6342         (add_assume_compiled):  Some tweaking and optimization.
6343         Rename and generalize to add_class_flag takem an extra parameter.
6344         (add_assume_compled):  New just calls add_class_flag.
6345         (add_enable_assert, enable_assertions):  New functions.
6346         (enable_assert_tree):  New static.
6347         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6348         * lang.opt (fenable-assertions, fenable-assertions=,
6349         fdisable-assertions, fdisable-assertions=):  New options.
6350         * lang.c (java_handle_option):  Handle new options.
6351         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6352         class in an interface - create helper class nested in outer interface.
6353         (build_assertion):  Short-circuit if enable_assertions is false.
6354
6355 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6356
6357         * java-tree.h: Changes throughout to add checking to macros
6358         and numerous whitespace changes.
6359         (VAR_OR_FIELD_CHECK): New macro.
6360         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6361         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6362
6363 2004-03-16  Per Bothner  <per@bothner.com>
6364
6365         * jcf-jump.c (options):  New --print-constants option.
6366         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6367
6368         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6369         (print_constant_terse_with_index):  New helper function.
6370         (various places):  Check flag_print_constant_pool where missing.
6371         (main):  If verbose set flag_print_constant_pool.
6372         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6373
6374 2004-03-15  Andrew Haley  <aph@redhat.com>
6375
6376         PR java/14581
6377         * parse.y (java_complete_lhs): Check that final variable has an
6378         initializer.
6379
6380 2004-03-12  Andrew Haley  <aph@redhat.com>
6381
6382         PR java/14551
6383         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6384         conversion.
6385
6386 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6387
6388         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6389         is NULL.
6390
6391 2004-02-27  Per Bothner  <per@bothner.com>
6392
6393         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6394         suggestion:  Use build_incomplete_class_ref.
6395         This fixes PR java/13508, java/11714.
6396
6397 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6398
6399         * java/parse.h: Update copyright.
6400
6401 2004-02-26  Andrew Haley  <aph@redhat.com>
6402
6403         PR java/14231:
6404         * parse.y (check_interface_throws_clauses): Check for
6405         !METHOD_INVISIBLE (iface_method).
6406         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6407         well as CLASS_ABSTRACT.
6408
6409 2004-02-25  Per Bothner  <per@bothner.com>
6410
6411         * parse.y (build_assertion):  If we're in an inner class, create the
6412         class$ helper routine in the outer class.
6413
6414 2004-02-19  Richard Henderson  <rth@redhat.com>
6415
6416         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6417
6418 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6419
6420         * Make-lang.in (java.install-man): Add extra dependencies.
6421
6422 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6423
6424         * Make-lang.in: Install man pages under the same names
6425         (possibly transformed) as the program they document.
6426
6427 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6428
6429         * gjavah.c: Include "intl.h".
6430         (error): New function.
6431         (main): Call gcc_init_libintl.
6432         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6433         print_stub_or_jni, process_file, main): Use error rather than
6434         fprintf.
6435         (print_method_info, usage, help, version, main): Mark strings for
6436         translation with _.  Avoid splitting up sentences.  Send
6437         information messages to stdout.
6438         * jcf-dump.c: Include "intl.h".
6439         (main): Call gcc_init_libintl.
6440         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6441         Mark error, usage and version messages for translation with _.
6442         Avoid splitting up sentences.
6443         * jv-scan.c: Include "intl.h".
6444         (fatal_error, warning): Change parameter s to msgid.  Translate
6445         messages.
6446         (main): Call gcc_init_libintl.
6447         (usage, help, version): Mark error, usage and version messages for
6448         translation with _.  Avoid splitting up sentences.
6449         * jvgenmain.c: Include "intl.h".
6450         (main): Call gcc_init_libintl.
6451         (usage, main): Mark error messages for translation with _.
6452         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6453         JVGENMAIN_OBJS): Add intl.o.
6454         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6455         java/jvgenmain.o): Update dependencies.
6456
6457 2004-02-08  Per Bothner  <per@bothner.com>
6458
6459         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6460         class don't use not_accessible_field_error, which can get confused.
6461
6462 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6463
6464         Make-lang.in (po-generated):  Delete.
6465
6466 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6467
6468         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6469         Depend on target.h.
6470         * decl.c: Include target.h.
6471         (start_java_method): Replace PROMOTE_PROTOTYPES with
6472         targetm.calls.promote_prototypes.
6473         * expr.c: Include target.h.
6474         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6475         targetm.calls.promote_prototypes.
6476         * parse.y: Include target.h.
6477         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6478         with targetm.calls.promote_prototypes.
6479
6480 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6481
6482         * typeck.c: Update copyright.
6483
6484 2004-02-02  Tom Tromey  <tromey@redhat.com>
6485
6486         * decl.c (java_init_decl_processing): Remove duplicate
6487         gnu/gcj/RawData.
6488
6489 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6490
6491         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6492
6493 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6494
6495         * expr.c (build_field_ref): Move variable
6496         definition up.
6497
6498 2004-01-28  Andrew Haley  <aph@redhat.com>
6499
6500         * expr.c (build_field_ref): Widen field offset.
6501
6502 2004-01-27  Andrew Haley  <aph@redhat.com>
6503
6504         java/13273
6505         * parse.y (check_interface_throws_clauses): Make sure class_decl
6506         has been loaded.
6507
6508 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6509
6510         PR java/13733
6511         * parse.y (patch_assignment): Don't modify lhs_type for
6512         reference assignments.
6513
6514 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6515
6516         * Make-lang.in: Replace $(docdir) with doc.
6517         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6518         (java.install-man): Revamp rule.
6519
6520 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6521
6522         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6523         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6524         instead of deferred backquote.
6525
6526 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6527
6528         * typeck.c (find_method_in_interfaces): Move variable
6529         definition up.
6530
6531 2004-01-16  Andrew Haley  <aph@redhat.com>
6532
6533         PR java/13273:
6534         * typeck.c (shallow_find_method): New.
6535         (find_method_in_superclasses): New.
6536         (find_method_in_interfaces): New.
6537         (lookup_do): Rewrite.
6538         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6539
6540         * jcf-parse.c (read_class): Save and restore output_class.
6541         * decl.c (java_expand_body): Set output_class from fndecl.
6542
6543 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
6544
6545         * class.c (gen_indirect_dispatch_tables): Fix string length
6546         calculations.
6547
6548 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6549
6550         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6551         (java.srcextra): Copy above back to source directory if requested.
6552         (po-generated): Delete reference to $(parsedir).
6553         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6554         Use implicit rule.
6555
6556 2004-01-14  Jan Hubicka  <jh@suse.cz>
6557
6558         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6559         estimation.
6560
6561 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6562
6563         * java-tree.h (java_expand_expr): Change prototype.
6564         * expr.c (java_expand_expr): Add alt_rtl parameter.
6565
6566 2004-01-09  Andrew Haley  <aph@redhat.com>
6567
6568         PR java/12755:
6569         * parse.y (java_fix_constructors):  Set output_class.
6570         (java_reorder_fields): Likewise.
6571         (java_layout_classes): Likewise.
6572         (java_expand_classes): Generate indirect dispatch tables.
6573         (java_expand_classes): Set output_class.
6574         (java_finish_classes): Likewise.
6575         * lang.c (java_init): Turn on always_initialize_class_p if we're
6576         using indirect dis[atch.
6577         (java_decl_ok_for_sibcall): Use output_class, not current_class.
6578         (java_get_callee_fndecl): Use class local atable.
6579         * jcf-parse.c
6580         (always_initialize_class_p): Decl moved to java-tree.h.
6581         (HANDLE_CLASS_INFO): Set output_class.
6582         (read_class): Likewise.
6583         (parse_class_file): Call gen_indirect_dispatch_tables.
6584         (parse_zip_file_entries): Set output_class.
6585         (java_parse_file): Set output_class.  Don't emit symbol tables.
6586         * java-tree.h (output_class): New.
6587         Remove global declarations for otable, atable, and ctable.
6588         (always_initialize_class_p): moved here from decl.c.
6589         (DECL_OWNER): New.
6590         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6591         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6592         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6593         (struct lang_type): Add otable_methods, otable_decl,
6594         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6595         ctable_decl, catch_classes, type_to_runtime_map.
6596         * expr.c (build_field_ref): Make otable, atable, and ctable class
6597         local rather than global.
6598         (build_known_method_ref): Likewise.
6599         (build_invokeinterface): Likewise.
6600         (java_expand_expr): Pass runtime type (rather than actual type) to
6601         expand_start_catch.
6602         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6603         this class.  Look up each class in that map to delete duplicates.
6604         (expand_end_java_handler): Pass runtime type (rather than actual
6605         type) to expand_start_catch.
6606         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6607         (do_nothing): New.
6608         (java_init_decl_processing): Rearrange things.  Remove global
6609         declarations of otable, atable, and ctable.
6610         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6611         (java_expand_body): Set output_class.
6612         * constants.c (build_constant_data_ref): Use output_class, not
6613         current_class.
6614         (alloc_name_constant): Likewise.
6615         * class.c (gen_indirect_dispatch_tables): New.
6616         (build_class_ref): Generate hard reference to superclass, even if
6617         using indirect dispatch.
6618         (build_static_field_ref): Use class local atable.
6619         (make_class_data): Generate hard reference to superclass, even if
6620         using indirect dispatch.
6621         Generate symbolic references to interfaces when using indirect
6622         dispatch.
6623         (make_class_data): Emit otable, atable, and ctable.
6624         Make otable, atable, and ctable class local rather than global.
6625         (emit_catch_table): Make otable, atable, and ctable class local
6626         rather than global.
6627
6628 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
6629
6630         * parse.y (catch_clause_parameter): Fix typo.
6631
6632         PR java/13404
6633         * parse.y: (catch_clause_parameter): Return early if $3, aka
6634         formal_parameter, is null.
6635
6636 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6637
6638         * class.c: Remove uses of "register" specifier in
6639         declarations of arguments and local variables.
6640         * decl.c: Likewise.
6641         * expr.c: Likewise.
6642         * gjavah.c: Likewise.
6643         * jcf-dump.c: Likewise.
6644         * jcf-io.c: Likewise.
6645         * jcf-parse.c: Likewise.
6646         * jcf-write.c: Likewise.
6647         * keyword.h: Likewise.
6648         * parse.y: Likewise.
6649         * typeck.c: Likewise.
6650         * verify.c: Likewise.
6651
6652 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
6653
6654         * Make-lang.in (GCJ_CROSS_NAME): Delete.
6655         (java.install_common, java.install-man): Adjust for above.
6656         (java.uninstall): Likewise.
6657
6658 2003-12-03  Michael Koch  <konqueror@gmx.de>
6659
6660         * class.c (make_class_data):
6661         Push field value to 'hack_signers' instead of 'signers'.
6662         * decl.c (java_init_decl_processing):
6663         Push field 'hack_signers' instead of 'signers'.
6664
6665 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
6666
6667         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6668         including iconv.h.
6669
6670 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
6671
6672         PR java/12374:
6673         * parse.y (qualify_ambiguous_name): Remove lots of broken
6674         field access processing - there's no need to do that here,
6675         because we have resolve_field_access.  Remove
6676         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6677         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6678         used.
6679
6680 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
6681
6682         Fix PR java/13237
6683         * parse.y (java_complete_lhs): Save location prior to patching
6684         CALL_EXPR.
6685
6686 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
6687
6688         PR java/12548
6689         * resource.c (write_resource_constructor): Append
6690         "_resource" to constructor identifier name.
6691
6692 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
6693
6694         Fix PR java/13183.
6695         * constants.c (cpool_for_class): New function.
6696         (outgoing_cpool): Remove global variable.
6697         (alloc_name_constant): Use cpool_for_class.
6698         (build_constants_constructor): Likewise.
6699         * decl.c (java_expand_body): Set current_class.
6700         * java-tree.h (outgoing_cpool) Remove declaration.
6701         (init_outgoing_cpool): Likewise.
6702         * jcf-parse.c (init_outgoing_cpool): Remove function.
6703         (parse_class_file): Don't call init_outgoing_cpool.
6704         * parse.y (java_complete_expand_methods): Don't call
6705         init_outgoing_cpool.  Don't save outgoing_cpool.
6706         (java_expand_classes): Don't restore outgoing_cpool.
6707         (java_finish_classes): Likewise.
6708
6709 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
6710
6711         * Make-lang.in: (java.install-common) Add
6712         symlink for $(target_noncanonical)-gcjh for
6713         native builds.
6714
6715 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6716
6717         * Make-lang.in (java.extraclean): Delete.
6718
6719 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6720
6721         * Make-lang.in (check-java): Add.
6722
6723 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
6724
6725         Fix PR java/13024.
6726         * except.c (prepare_eh_table_type): Allocate variable-sized
6727         buffer `buf' with alloca.
6728
6729 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6730
6731         Fix PR java/12857.
6732
6733         decl.c (java_init_decl_processing): Don't initialize
6734         class_not_found_type_node, no_class_def_found_type_node.
6735
6736         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6737         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6738         (class_not_found_type_node, no_class_def_found_type_node):
6739         Don't define.
6740
6741         parse.y (build_dot_class_method_invocation): Add this_class
6742         argument.  Qualify method invocations to a different class.
6743         (create_new_parser_context): Initialize saved_data_ctx to 0.
6744         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6745         (build_dot_class_method): Don't load classes.  Register
6746         incomplete types.
6747         (build_incomplete_class_ref): Special cases for interfaces
6748         and inner classes.  Move build_dot_class_method call to here...
6749         (patch_incomplete_class_ref): ...from here.  Pass current_class
6750         to build_dot_class_method_invocation.
6751         (build_assertion): Pass class_type to
6752         build_dot_class_method_invocation.
6753         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6754
6755 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6756
6757         Fix PR java/12739.
6758         * java-tree.h (BLOCK_EMPTY_P): Define.
6759         * parse.y (java_complete_lhs): Check for empty blocks
6760         in TRY_FINALLY_EXPR case.
6761
6762 2003-11-17  Andrew Haley  <aph@redhat.com>
6763
6764         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6765         (struct lang_decl_var:freed): New variable.
6766         * decl.c (poplevel): Mark local vars that have gone out of scope.
6767         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6768         scope.
6769
6770 2003-11-16  Jason Merrill  <jason@redhat.com>
6771
6772         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6773         and TAGS files that include them for each front end.
6774
6775 2003-11-15  Tom Tromey  <tromey@redhat.com>
6776
6777         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6778
6779 2003-11-12  Jason Merrill  <jason@redhat.com>
6780
6781         PR optimization/12547
6782         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6783         BLOCK_EXPR_BODY directly.
6784
6785 2003-11-12  Andrew Haley  <aph@redhat.com>
6786
6787         PR java/11045
6788         * parse.y (fold_constant_for_init): Check that we really do have a
6789         constant.
6790
6791         PR java/11533
6792         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6793         init_test_decls being inlined.
6794
6795         PR java/12890:
6796         * parse.y (do_resolve_class): Check return value from
6797         breakdown_qualified().
6798
6799 2003-11-11  Tom Tromey  <tromey@redhat.com>
6800
6801         PR java/12915:
6802         * parse.y (merge_string_cste): Handle case where we have a
6803         pointer that happens to be zero, not null_pointer_node.
6804
6805 2003-11-10  Tom Tromey  <tromey@redhat.com>
6806
6807         * jcf-parse.c (classify_zip_file): Correctly compare
6808         filename_length against length of manifest file's name.
6809
6810 2003-11-08  Tom Tromey  <tromey@redhat.com>
6811
6812         PR java/12894:
6813         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6814
6815 2003-11-06  Andrew Haley  <aph@redhat.com>
6816
6817         * expr.c (java_stack_swap): Make sure destination stack slots are
6818         of the correct type.
6819
6820 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6821
6822         * Make-lang.in (dvi): Move targets to $(docobjdir).
6823         (gcj.dvi): Simplify rule and adjust target.
6824         (gcj.info): Simplify rule.
6825         (gcj.pod): New intermediate rule.
6826         (gcjh.pod): Likewise.
6827         (jv-scan.pod): Likewise.
6828         (jcf-dump.pod): Likewise.
6829         (gij.pod): Likewise.
6830         (jv-convert.pod): Likewise.
6831         (rmic.pod): Likewise.
6832         (rmiregistry.pod): Likewise.
6833         (gcj.1): Delete.
6834         (gcjh.1): Delete.
6835         (jv-scan.1): Delete.
6836         (jcf-dump.1): Delete.
6837         (gij.1): Delete.
6838         (jv-convert.1): Delete.
6839         (rmic.1): Delete.
6840         (rmiregistry.1): Delete.
6841
6842 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
6843
6844         Fixes PR java/12866.
6845         * parse.y (resolve_qualified_expression_name): Move test
6846         for outer field access methods from here...
6847         (check_thrown_exceptions) ...to here.
6848
6849 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
6850
6851         * .cvsignore: Delete.
6852
6853 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
6854
6855         * verify.c (verify_jvm_instructions): Don't warn about legal
6856         eh binding regions generated for example by jdk 1.4.1.
6857
6858 2003-10-24  David S. Miller  <davem@redhat.com>
6859
6860         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6861
6862 2003-10-22  Andrew Haley  <aph@redhat.com>
6863
6864         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6865         (java_get_callee_fndecl): New.
6866
6867         * jcf-parse.c (java_parse_file): Call emit_catch_table().
6868
6869         * java-tree.h (ctable_decl): New.
6870         (catch_classes):  New.
6871         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6872
6873         * decl.c (java_init_decl_processing): Add catch_class_type.
6874         Add ctable_decl.
6875         Add catch_classes field.
6876
6877         * class.c (build_indirect_class_ref): Break out from
6878         build_class_ref.
6879         (make_field_value): Check flag_indirect_dispatch.
6880         (make_class_data): Ditto.
6881         Tidy uses of PUSH_FIELD_VALUE.
6882         Add field catch_classes.
6883         (make_catch_class_record): New.
6884
6885         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6886
6887 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6888
6889         * jcf-write.c: Follow spelling conventions.
6890         * parse.y: Likewise.
6891
6892 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6893
6894         * ChangeLog: Fix typos.
6895         * expr.c: Fix comment typos.
6896         * jcf-write.c: Likewise.
6897         * lang.c: Likewise.
6898         * lex.c: Likewise.
6899         * mangle.c: Likewise.
6900         * parse-scan.y: Likewise.
6901         * parse.y: Likewise.
6902
6903 2003-10-22  Tom Tromey  <tromey@redhat.com>
6904
6905         * expr.c (expand_byte_code): Only warn about dead bytecode when
6906         extra_warnings is set.
6907
6908 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
6909
6910         Fix for PR java/12586.
6911         * mangle.c (find_compression_record_match): Don't iterate through
6912         package namespace elements unless they all match compression_table
6913         entries.
6914
6915 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
6916
6917         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6918         (generate-manpages): Likewise.
6919         (java.maintainer-clean): Likewise.
6920         (gcj.info): Likewise.
6921         (gcj.1): Likewise.
6922         (gcjh.1): Likewise.
6923         (jv-scan.1): Likewise.
6924         (jcf-dump.1): Likewise.
6925         (gij.1): Likewise.
6926         (jv-convert.1): Likewise.
6927         (rmic.1): Likewise.
6928         (rmiregistry.1): Likewise.
6929         (java.install-man): Likewise.
6930         (parse-scan.o): Move and define complete compile line.
6931         (parse.o): Likewise.
6932         (jcf-tree-inline.o): Move.
6933
6934 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
6935
6936         * Make-lang.in (info): Update dependencies.
6937         (java.install-info): Remove.
6938         ($(srcdir)/java/gcj.info): Replace with ...
6939         ($(docobjdir)/gcj.info): ... this.
6940
6941 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
6942
6943         * Make-lang.in: Replace uses of $(target_alias) with
6944         $(target_noncanonical).
6945
6946 2003-10-09  Tom Tromey  <tromey@redhat.com>
6947
6948         * decl.c (java_init_decl_processing): Declare signers field.
6949         * class.c (make_class_data): Set signers field.
6950
6951 2003-10-09  Jason Merrill  <jason@redhat.com>
6952
6953         * parse.y (patch_assignment): Use make_node to create a BLOCK.
6954         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6955         POINTER_TYPE.
6956
6957 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
6958
6959         * Make-lang.in (java.info): Replace with ...
6960         (info): ... this.
6961         (java.dvi): Replace with ...
6962         (dvi): ... this.
6963         (java.generated-manpages): Replace with ...
6964
6965 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
6966
6967         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6968
6969 2003-10-01  Andrew Haley  <aph@redhat.com>
6970
6971         * jcf-parse.c (java_parse_file): Write otable and atable.
6972         * java-tree.h (atable_methods): New.
6973         (atable_decl): New.
6974         (atable_syms_decl): New.
6975         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6976         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6977         (symbol_*type): Rename method_symbol* to symbol*type.
6978         (emit_offset_symbol_table): Delete.
6979         (emit_symbol_table): New.
6980         (get_symbol_table_index): New.
6981         (atable_type): New.
6982         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6983         (build_known_method_ref): Likewise.
6984         (get_symbol_table_index): Rename from get_offset_table_index.
6985         Parameterize to allow re-use by differing types of symbol table.
6986         (build_invokevirtual): Pass table to get_offset_table_index.
6987         * decl.c (java_init_decl_processing): Push types and decls for
6988         atable and atable_syyms.
6989         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6990         (make_class_data): Add new fields atable and atable_syms.
6991         (emit_symbol_table): Rename from emit_offset_symbol_table.
6992         Parameterize to allow re-use by different types of symbol table.
6993         (build_symbol_entry): Renamed from build_method_symbols_entry.
6994
6995 2003-09-30  Roger Sayle  <roger@eyesopen.com>
6996
6997         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6998         semantics for SAVE_EXPR, by caching the result in a temporary.
6999
7000 2003-09-28  Richard Henderson  <rth@redhat.com>
7001
7002         * check-init.c (check_init): Save and restore input_location
7003         instead of file and line separately.
7004         * decl.c (java_expand_body): Likewise.
7005         * jcf-write.c (generate_bytecode_insns): Likewise.
7006         * parse.y (safe_layout_class): Likewise.
7007         * jcf-parse.c (read_class, parse_class_file): Likewise.
7008         (java_parse_file): Use %H for warning locator.
7009
7010 2003-09-28  Roger Sayle  <roger@eyesopen.com>
7011
7012         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7013         with void-type branches instead of using a COMPOUND_EXPR.
7014
7015 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
7016
7017         * decl.c (java_optimize_inline, dump_function): Remove.
7018         * java-tree.h (java_optimize_inline): Remove declaration.
7019         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7020         * parse.y (source_end_java_method, java_expand_classes):
7021         Likewise.  Remove dead code.
7022
7023 2003-09-27  Roger Sayle  <roger@eyesopen.com>
7024
7025         * lang.c (java_init_options): Set flag_evaluation_order.
7026         * expr.c (force_evaluation_order): Don't attempt to force
7027         evaluation order of binary operations using save_expr.
7028         * parse.y (java_complete_lhs): No longer need to call
7029         force_evaluation_order when constructing binary operators.
7030
7031 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7032             Bryce McKinlay  <bryce@mckinlay.net.nz>
7033
7034         PR java/1333:
7035         * parse.y (not_accessible_field_error): New function.
7036         (resolve_expression_name): Check field access permissions.
7037         (resolve_qualified_expression_name): Use
7038         not_accessible_field_error.
7039         (resolve_qualified_expression_name): Likewise.
7040
7041 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7042
7043         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7044
7045 2003-09-23  Roger Sayle  <roger@eyesopen.com>
7046
7047         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7048         with equal operands without side-effects.
7049
7050 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
7051
7052         * decl.c (java_init_decl_processing): Don't emit otable decls
7053         if flag_indirect_dispatch is not set.
7054
7055 2003-09-21  Richard Henderson  <rth@redhat.com>
7056
7057         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7058         resource.c: Revert.
7059
7060 2003-09-21  Richard Henderson  <rth@redhat.com>
7061
7062         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7063         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7064
7065 2003-09-20  Richard Henderson  <rth@redhat.com>
7066
7067         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7068
7069 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7070
7071         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7072         * check-init.c (check_init): Likewise.
7073
7074 2003-09-18  Roger Sayle  <roger@eyesopen.com>
7075
7076         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7077
7078 2003-09-16  Andrew Haley  <aph@redhat.com>
7079
7080         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7081
7082 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
7083
7084         Fixes PR java/9577
7085         * mangle.c (find_compression_record_match): Skip
7086         over a "6JArray" (the array template mangled string)
7087         IDENTIFIER_NODE.
7088         (mangle_array_type): Correct minor typo.
7089         (atms): Move definition to the beginning.
7090
7091 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
7092
7093         * class.c (add_miranda_methods): Ensure super-interfaces are laid
7094         out. Fix for PR java/12254.
7095
7096 2003-09-11  Richard Henderson  <rth@redhat.com>
7097
7098         * parse.y (source_end_java_method): Update for new
7099         cgraph_finalize_function argument.
7100
7101 2003-09-09  Richard Henderson  <rth@redhat.com>
7102
7103         * parse.y (source_end_java_method): Update call to
7104         cgraph_finalize_function.
7105
7106 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
7107
7108         * decl.c (java_expand_body): New function.
7109         * expr.c (build_class_init): Set DECL_IGNORED_P.
7110         * java-tree.h (start_complete_expand_method,
7111         java_expand_body): Declare.
7112         * jcf-parse.c (cgraph.h): Include.
7113         (java_parse_file): Handle flag_unit_at_a_time.
7114         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7115         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7116         (java_estimate_num_insns): Use walk_tree_without_duplicates.
7117         (java_start_inlining): New function.
7118         * parse.h (java_finish_classes): Declare.
7119         * parse.y: Include cgraph.h.
7120         (block): Don't special-case empty block production.
7121         (craft_constructor): Set DECL_INLINE.
7122         (source_end_java_method): Handle flag_unit_at_a_time.
7123         Replace inline code with call to java_expand_body.
7124         (start_complete_expand_method): Remove static modifier.
7125         (java_expand_method_bodies): Patch function tree for
7126         class initialization and/or synchronization as needed.
7127         Don't begin RTL expansion yet.
7128         (java_expand_classes): Check flag_unit_at_a_time before
7129         calling finish_class.
7130         (java_finish_classes): New function.
7131         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7132         (patch_assignment): Set DECL_CONTEXT on temporary variable.
7133         (emit_test_initialization): Set DECL_IGNORED_P.
7134
7135 2003-09-03  Roger Sayle  <roger@eyesopen.com>
7136
7137         * builtins.c (enum builtin_type): Delete unused enumeration.
7138         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7139
7140 2003-08-28  Tom Tromey  <tromey@redhat.com>
7141
7142         * gcj.texi (Extensions): Document gcjlib URLs.
7143
7144 2003-08-20  Tom Tromey  <tromey@redhat.com>
7145
7146         * gcj.texi (Extensions): Added xref.
7147         (libgcj Runtime Properties): Document
7148         gnu.gcj.runtime.VMClassLoader.library_control.
7149
7150 2003-08-20  Andrew Haley  <aph@redhat.com>
7151
7152         * except.c (prepare_eh_table_type): Use new encoding for exception
7153         handlers when using -fno-assume-compiled.
7154
7155 2003-08-13  Tom Tromey  <tromey@redhat.com>
7156
7157         * gcj.texi (Invoking gij): Document -X and -?.
7158
7159 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
7160
7161         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7162         GCJH_OBJS, JCFDUMP_OBJS
7163         * win32-host.c: Removed the unnecessary and broken dependency
7164         on jcf.h
7165
7166 2003-08-11  Tom Tromey  <tromey@redhat.com>
7167
7168         * parse.y (java_check_regular_methods): Typo fixes.  Call
7169         check_interface_throws_clauses.  Use
7170         check_concrete_throws_clauses.
7171         (check_interface_throws_clauses): New function.
7172         (check_concrete_throws_clauses): New function.
7173         (hack_is_accessible_p): New function.
7174         (find_most_specific_methods_list): Added FIXME.
7175         * typeck.c (lookup_do): Use `flags' argument to decide what to
7176         do.  Reimplemented.
7177         (lookup_argument_method_generic): New function.
7178         (lookup_argument_method2): Removed.
7179         * jcf.h (ACC_INVISIBLE): New define.
7180         * jcf-write.c (generate_classfile): Skip invisible methods.
7181         * class.c (add_miranda_methods): New function.
7182         (layout_class_methods): Use it.
7183         (get_access_flags_from_decl): Use ACC_INVISIBLE.
7184         * java-tree.h (METHOD_INVISIBLE): New define.
7185         (lang_decl_func) [invisible]: New field.
7186         (lookup_argument_method_generic): Declare.
7187         (SEARCH_INTERFACE): New define.
7188         (SEARCH_SUPER): Likewise.
7189         (SEARCH_ONLY_INTERFACE): Likewise.
7190         (SEARCH_VISIBLE): Likewise.
7191         (lookup_argument_method2): Removed declaration.
7192
7193 2003-08-05  Tom Tromey  <tromey@redhat.com>
7194
7195         Fix for PR java/11600:
7196         * parse.y (java_complete_lhs): See whether we're calling a method
7197         on an array.
7198         (check_thrown_exceptions): Added `is_array_call' argument;
7199         fixed `clone' checking; updated all callers.
7200
7201 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
7202
7203         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7204
7205 2003-08-03  Tom Tromey  <tromey@redhat.com>
7206
7207         * java-tree.h (METHOD_TRANSIENT): Removed.
7208         * decl.c (pushdecl): Removed some dead code.
7209         * class.c (get_access_flags_from_decl): Can't have transient
7210         method.
7211         (add_method_1): Can't have a transient method.
7212
7213 2003-07-28  Andreas Jaeger  <aj@suse.de>
7214
7215         * jvspec.c: Convert to ISO C90 prototypes.
7216
7217 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7218
7219         * decl.c (force_poplevels): Fix warning call.
7220
7221 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7222
7223         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7224         (expand_java_field_op): Likewise.
7225         * class.c (layout_class_method): Likewise
7226         (emit_register_classes): Likewise.
7227         * decl.c (pushdecl): Likewise.
7228         (poplevel): Likewise.
7229         (force_poplevels): Likewise.
7230         (give_name_to_locals): Likewise.
7231         * check-init.c (check_for_initialization): Likewise.
7232
7233 2003-07-24  Jason Merrill  <jason@redhat.com>
7234
7235         * java-tree.h: Move boolean_type_node et al to the back end.
7236
7237 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7238
7239         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7240         casts.
7241
7242 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7243
7244         * lang.opt: Don't show -MD_ and -MDD_.
7245
7246 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7247
7248         * lang-options.h: Remove.
7249         * lang.opt: Add help text.
7250
7251 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7252
7253         * expr.c: Remove the last argument to expand_assignment().
7254
7255 2003-07-09  Jan Hubicka  <jh@suse.cz>
7256
7257         * java-tree.h (DECL_NUM_STMTS): Rename to...
7258         (DECL_ESTIMATED_INSNS): ... this.
7259         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7260         New static functions.
7261         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7262         * parser.y (add_stmt_to_compound): Do not account statements.
7263
7264 2003-07-08  Mark Wielaard  <mark@klomp.org>
7265
7266         * gcj.texi: CNI now expands to Compiled Native Interface.
7267
7268 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7269
7270         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7271
7272 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7273
7274         * expr.c (expand_byte_code): Adjist emit_line_note call.
7275
7276 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7277
7278         * lang.c (java_handle_option): Don't handle filenames.
7279
7280 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7281
7282         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7283         DIR_SEPARATOR.
7284         Use FILENAME_CMP.
7285         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7286         * jcf.h: Delete COMPARE_FILENAMES definition.
7287
7288 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7289
7290         * lang.c (java_init_options): Update prototype.
7291
7292 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7293
7294         * decl.c (poplevel): Adjust define_label call.
7295
7296 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7297
7298         * gjavah.c (flag_jni): Make non-static.
7299         * parse-scan.y (ctxp): Make non-static.
7300
7301         * class.c (build_method_symbols_entry)
7302         * expr.c (get_offset_table_index)
7303         * jcf-parse.c (jcf_parse):
7304         Mark the definition static, matching the forward declaration.
7305
7306 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7307
7308         * lang.c (java_handle_option): Don't check for missing arguments.
7309
7310 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7311
7312         * class.c (push_class): Use a location_t to save place.
7313         (emit_register_classes): Set input_location. Adjust
7314         expand_function_end call.
7315         * resource.c (write_resource_constructor): Likewise.
7316         * decl.c (end_java_method): Adjust expand_function_end call.
7317         * parse.y (source_end_java_method): Likewise.
7318
7319 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7320
7321         * lang.c (java_handle_option): Likewise.
7322
7323 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7324
7325         * lang.c (java_handle_option): Special-casing of optional
7326         joined arguments no longer needed.
7327         * lang.opt: Update switches that take optional argument.
7328
7329 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7330
7331         * lang.opt: Declare Java.
7332         * lang.c (java_init_options): Update.
7333
7334 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7335
7336         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7337
7338 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7339
7340         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7341         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7342         * lang.opt: -MD and -MMD have an underscore.
7343
7344 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7345
7346         * class.c (emit_register_classes): Adjust init_function_start
7347         call.
7348         * decl.c (complete_start_java_method): Likewise.
7349         * resource.c (write_resource_constructor): Likewise.
7350
7351 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7352
7353         * Make-lang.in: Update to use options.c and options.h.
7354         * lang.c: Include options.h not j-options.h.
7355         (java_handle_option): Abort on unrecognized option.
7356         (java_init_options): Request Java switches.
7357
7358 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7359
7360         * Make-lang.in: Handle mostlyclean.
7361
7362 2003-06-11  Tom Tromey  <tromey@redhat.com>
7363
7364         * lang.c (java_handle_option): Update dependency_tracking for
7365         OPT_MF case.
7366
7367         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7368         empty argument.
7369
7370 2003-06-10  Andrew Haley  <aph@redhat.com>
7371
7372         * resource.c (write_resource_constructor): Use expand_expr to
7373         generate the address of the label attached to a resource.
7374         * Make-lang.in (java/resource.o): Add expr.h
7375
7376 2003-06-10  Andrew Haley  <aph@redhat.com>
7377
7378         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7379         (java_decl_ok_for_sibcall): New.
7380
7381 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7382
7383         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7384         (java/j-options.c, java/j-options.h): New.
7385         * java-tree.h (resource_name, compile_resource_file,
7386         compile_resource_data): Constify.
7387         * jcf-write.c (jcf_write_base_directory): Similarly.
7388         * jcf.h (jcf_write_base_directory): Similarly.
7389         * lang.c: Include j-options.h.
7390         (cl_options_count, cl_options, string_option, java_decode_option,
7391         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7392         process_option_with_no): Remove.
7393         (resource_name): Constify.
7394         (LANG_HOOKS_HANDLE_OPTION): Override.
7395         (java_handle_option): New.
7396         (java_init): Don't call jcf_path_init.
7397         (java_init_options): Call jcf_path_init.
7398         * lang.opt: New.
7399         * resource.c (compile_resource_data, compile_resource_file): Constify.
7400
7401 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7402
7403         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7404         (struct lang_decl_func): Add last_line field.
7405         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7406         DECL_SOURCE_LINE_LAST): Remove.
7407         * parse.y (missing_return_error, finish_method_declaration,
7408         lookup_cl, start_artificial_method_body, source_end_java_method,
7409         start_complete_expand_method): Adjust.
7410
7411 2003-06-08  Tom Tromey  <tromey@redhat.com>
7412
7413         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7414         fno-assume-compiled.
7415
7416 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7417
7418         * builtins.c (define_builtin_type, builtin_types): Delete.
7419         (define_builtin): Rewritten to take just the built-in code,
7420         the function's name, type and fallback library function name.
7421         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7422         (initialize_builtins): Overhaul to define the GCC builtins
7423         used by gcj manually, providing the Java run-time's
7424         implementations as the fallback library function.
7425
7426 2003-06-08  Anthony Green  <green@redhat.com>
7427
7428         * parse.y (patch_cast): Fix conversions from floating-point to
7429         integral types.
7430
7431 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7432
7433         * Make-lang.in: Update.
7434         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7435
7436 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7437
7438         * lang.c (java_init_options): Update.
7439
7440 2003-06-05  Jan Hubicka  <jh@suse.cz>
7441
7442         * Make-lang.in:  Add support for stageprofile and stagefeedback
7443
7444 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7445
7446         * lang.c (java_init_options): Prescribe wrap-around two's
7447         complement arithmetic overflow by setting flag_wrapv.
7448
7449 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7450
7451         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7452         (builtin_record): Add an additional builtin_code field to
7453         record which GCC built-in corresponds to the Java function.
7454         (java_builtins):  Add new entries for atan, atan2, exp, log,
7455         pow and tan.
7456         (max_builtin, min_builtin, abs_builtin): Perform constant
7457         folding on the resulting tree.
7458         (java_build_function_call_expr): Likewise, perform constant
7459         folding on the resulting tree.
7460         (initialize_builtins): The NULL creators are now allowed in
7461         the java_builtins table, which is now terminated by an entry
7462         with builtin_code == END_BUILTINS.
7463         (check_for_builtin): Likewise.  If the matching creator is
7464         NULL, construct the call using java_build_function_call_expr
7465         directly with the decl for the corresponding builtin_code.
7466
7467 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7468
7469         * win32-host.c: Normalize copyright boilerplate.
7470
7471 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7472
7473         * parse.y (print_int_node): Use string concatentation on
7474         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7475         function calls into one.
7476
7477 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7478
7479         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7480         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7481         all the affected error messages.
7482
7483 2003-05-13  Richard Henderson  <rth@redhat.com>
7484
7485         * class.c (layout_class_method): Set DECL_EXTERNAL.
7486         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7487         * java-tree.h (java_mark_class_local): Declare.
7488         * jcf-parse.c (parse_class_file): Use it.
7489         * parse.y (java_expand_classes): Likewise.
7490
7491 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7492
7493         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7494         * lex.h: #include input.h.
7495         * jv-scan.c (input_filename): Remove.
7496
7497 2003-05-02  Tom Tromey  <tromey@redhat.com>
7498
7499         PR java/10491:
7500         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7501         (handle_inner_classes): New function.
7502
7503 2003-05-01  Tom Tromey  <tromey@redhat.com>
7504
7505         PR java/10459:
7506         * parse.y (finish_for_loop): Do nothing if update expression is a
7507         EXPR_WFL_NODE wrapping nothing.
7508         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7509
7510 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7511
7512         * lex.h (input_lineno): Remove declaration.
7513         * parse-scan.y: #include input.h.
7514         (input_filename): Remove declaration.
7515         (input_location): Add definition.
7516         (input_line): Remove definition.
7517
7518 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7519
7520         * lex.h (lineno): Rename to ...
7521         (input_line): ... here
7522         * parse-scan.y (lineno): Rename to ...
7523         (input_line): ... here.
7524         (reset_report): Rename lineno to input_line.
7525         * check-init.c (check_init): Likewise.
7526         * class.c (push_class): Likewise.
7527         * decl.c (complete_start_java_method, end_java_method): Likewise.
7528         * expr.c (expand_byte_code): Likewise.
7529         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7530         * jcf-write.c (generate_bytecode_insns): Likewise.
7531         * lex.c (java_init_lex, java_allocate_new_line,
7532         do_java_lex): Likewise.
7533         * parse.h (YYNOT_TWICE): Likewise.
7534         * parse.y (empty_statement, expression_statement,
7535         java_pop_parser_context, java_parser_context_save_global,
7536         yyerror, register_fields, method_header, safe_layout_class,
7537         find_in_imports_on_demand, create_artificial_method,
7538         source_end_java_method, start_complete_expand_method,
7539         build_thisn_assign, java_complete_lhs,
7540         maybe_absorb_scoping_block): Likewise.
7541
7542 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
7543
7544         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7545         '/' when computing java source filename
7546
7547 2003-04-13  Tom Tromey  <tromey@redhat.com>
7548
7549         * gjavah.c (print_c_decl): Indentation fix.
7550
7551 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
7552
7553         * class.c (make_field_value, make_method_value, get_dispatch_table)
7554         (make_class_data, emit_offset_symbol_table)
7555         * constants.c (build_constants_constructor)
7556         * java-tree.h (START_RECORD_CONSTRUCTOR)
7557         * parse.y (maybe_build_array_element_wfl):
7558         Use build_constructor.
7559
7560 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
7561
7562         PR java/10253:
7563         * parse.y (string_convert_int_cst): Always use at least one digit
7564         in string conversion. Remove ASCII dependence.
7565         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7566
7567 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
7568
7569         * Make-lang.in: added win32-host.c
7570         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7571         resolves to open() on non-Win32 platforms and
7572         Win32-specific jcf_open_exact_case() on Win32
7573         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7574         when trying .java and .class files
7575         * win32-host.c: added to repository. Defines
7576         Win32-specific jcf_open_exact_case()
7577
7578 2003-04-10  Andrew Haley  <aph@redhat.com>
7579
7580         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7581         (maybe_free_localvar): Renamed from localvar_free.
7582         Add new arg, really.
7583         (generate_bytecode_insns): Set new variable, jsrs.
7584         Only free local vars if no jsr insns have been emittted.
7585         Call maybe_free_localvar, not localvar_free.
7586
7587 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
7588
7589         * gcj.texi: Remove @ at start of file.
7590
7591 2003-03-25  Tom Tromey  <tromey@redhat.com>
7592
7593         * parse.y (create_interface): Call CHECK_DEPRECATED.
7594
7595 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
7596
7597         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7598
7599 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
7600
7601         * javaop.h (jfloat, jdouble): Make them structures mirroring
7602         the bit fields of IEEE float and double respectively.
7603         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7604         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7605         (union Word, union DWord): Delete.
7606         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7607
7608         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7609         D_NAN_MASK): Delete.
7610         (jni_print_float, jni_print_double): New.  Generate
7611         hexadecimal floating constants.
7612         (print_field_info): Use jni_print_float/double.
7613
7614         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
7615         finite floating point numbers for output; special case
7616         non-finite floats.
7617
7618 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
7619
7620         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7621         Replace 0 and 1 with true and false in return statements.
7622
7623 2003-03-19  Tom Tromey  <tromey@redhat.com>
7624
7625         * lex.c (do_java_lex): Renamed from java_lex.
7626         (java_lex): New function.
7627         Include timevar.h.
7628
7629 2003-03-13  Tom Tromey  <tromey@redhat.com>
7630
7631         * parse.y (resolve_inner_class): Error if qualifier is a primitive
7632         type.
7633
7634 2003-03-04  Andrew Haley  <aph@redhat.com>
7635
7636         * gjavah.c (is_first_data_member): New global variable.
7637         (print_c_decl): If it's the first data member, align it as the
7638         superclass.
7639         (process_file): Set is_first_data_member.
7640
7641 2003-03-11  Tom Tromey  <tromey@redhat.com>
7642
7643         * parse.y (resolve_field_access): Initialize class if field is
7644         found in another static field.
7645         * expr.c (build_class_init): Don't optimize out initialization of
7646         implemented interface.
7647
7648 2003-03-11  Andrew Haley  <aph@redhat.com>
7649
7650         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7651         warning.
7652
7653 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
7654
7655         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7656         and DIR_SEPARATOR_2 for a target.
7657         Correct minor typos.
7658
7659         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7660         and DIR_SEPARATOR_2 for a target into account.
7661
7662 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
7663
7664         * lang.c (java_init): Update prototype, move code to java_post_options.
7665         (java_post_options): Similarly.
7666
7667 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
7668
7669         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7670         compare file name components depending on the case-sensitivity
7671         or otherwise of the host file system.
7672
7673         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7674         "strcmp" to compare file name components.
7675         Use IS_DIR_SEPARATOR instead of comparing directly against
7676         DIR_SEPARATOR.
7677         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7678         comparing directly against DIR_SEPARATOR.
7679
7680 2003-03-04  Tom Tromey  <tromey@redhat.com>
7681
7682         * Make-lang.in (java.tags): New target.
7683
7684 2003-03-01  Roger Sayle  <roger@eyesopen.com>
7685
7686         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7687         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7688
7689 2003-03-01  Tom Tromey  <tromey@redhat.com>
7690
7691         * parse.y (jdep_resolve_class): Only check deprecation if we found
7692         a decl.
7693
7694 2003-02-28  Tom Tromey  <tromey@redhat.com>
7695
7696         PR java/9695:
7697         * class.c (maybe_layout_super_class): Always pass a WFL to
7698         do_resolve_class.
7699         * parse.y (do_resolve_class): Updated comment to explain
7700         parameters.
7701
7702 2003-02-26  Tom Tromey  <tromey@redhat.com>
7703
7704         * jcf-write.c (generate_classfile): Check whether class is
7705         deprecated before writing attribute count.
7706
7707 2003-02-25  Roger Sayle  <roger@eyesopen.com>
7708
7709         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7710         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7711
7712 2003-02-23  Tom Tromey  <tromey@redhat.com>
7713
7714         * lang-options.h: Added -Wdeprecated.
7715         * gcj.texi (Warnings): Document -Wdeprecated.
7716         * java-tree.h (flag_deprecated): Declare.
7717         * lang.c (lang_W_options): Added deprecated.
7718         (flag_deprecated): New global.
7719         * chartables.h: Rebuilt.
7720         * gen-table.pl (process_one): Look at whitespace.
7721         (print_tables): Define LETTER_SPACE, LETTER_MASK.
7722         * parse.h (CLEAR_DEPRECATED): New macro.
7723         (CHECK_DEPRECATED_NO_RESET): New macro.
7724         * jcf-parse.c (handle_deprecated): New function.
7725         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7726         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7727         * parse.y (resolve_type_during_patch): Check deprecation.
7728         (jdep_resolve_class): Likewise.
7729         (process_imports): Likewise.
7730         (resolve_expression_name): Likewise.
7731         (check_deprecation): Strip arrays from decl.  Check
7732         flag_deprecated.
7733         (patch_method_invocation): Also check the particular constructor
7734         for deprecation.
7735         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7736         * jcf-write.c (append_deprecated_attribute): New function.
7737         (generate_classfile): Generate deprecated attribute when
7738         appropriate.
7739         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7740         (java_lex) [case '*']: Simplify logic.
7741         (java_start_char_p): Use LETTER_MASK.
7742         (java_part_char_p): Likewise.
7743         (java_space_char_p): New function.
7744
7745 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7746
7747         Change base class access representation.
7748         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7749         (add_interface_do): Likewise.
7750
7751 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7752
7753         * decl.c (java_init_decl_processing): Change
7754         soft_lookupjnimethod_node to reflect the change in
7755         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7756         * expr.c (build_jni_stub): Calculate and pass the size
7757         on the stack of the arguments to a JNI function. Use
7758         new target macro MODIFY_JNI_METHOD_CALL to allow a
7759         target to modify the call to a JNI method.
7760
7761 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7762
7763         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7764         instead of basename to avoid compiler warnings on Tru64.
7765
7766 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7767
7768         * gcj.texi: Update to GFDL 1.2.
7769
7770 2003-01-31  Andrew Haley  <aph@redhat.com>
7771
7772         * parse.y (java_expand_classes): Scan the whole class list looking
7773         for access methods that haven't yet been expanded.
7774
7775 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7776
7777         Fix for java/4269:
7778
7779         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7780         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7781         * jcf-parse.c: Likewise.
7782
7783 2003-01-31  Mark Wielaard  <mark@klomp.org>
7784
7785         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7786
7787 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7788
7789         * class.c (make_class): Use BINFO_ELTS.
7790         (set_super_info): Likewse.
7791         (add_interface_do): Likewise.
7792
7793 2003-01-30  Tom Tromey  <tromey@redhat.com>
7794
7795         * jcf-parse.c (read_class): Update identifier's class value if it
7796         changed during parsing.
7797
7798 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7799
7800         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7801         Propagate change to all other rules as required.
7802         (java/parse-scan.o): Add explicit dependency on
7803         $(parsedir)/java/parse-scan.c .
7804
7805 2003-01-29  Tom Tromey  <tromey@redhat.com>
7806
7807         * parse.y (patch_assignment): Only transform the rhs of an
7808         assignment when compiling to native.
7809
7810 2003-01-28  Tom Tromey  <tromey@redhat.com>
7811
7812         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7813
7814 2003-01-28  Tom Tromey  <tromey@redhat.com>
7815
7816         * lex.c (java_lex): Don't include UEOF as part of token.
7817         (java_read_unicode): Error if \u sequence prematurely terminated.
7818
7819 2003-01-27  Tom Tromey  <tromey@redhat.com>
7820
7821         * parse.y (java_check_regular_methods): Check for construct after
7822         checking types in throws clause.
7823
7824 2003-01-24  Tom Tromey  <tromey@redhat.com>
7825
7826         * class.c (build_static_field_ref): Only a String or numeric field
7827         can fold to a constant.
7828
7829 2003-01-23  Tom Tromey  <tromey@redhat.com>
7830
7831         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7832         file name in resource buffer.
7833
7834 2003-01-23  Tom Tromey  <tromey@redhat.com>
7835
7836         * expr.c (build_known_method_ref): Use method's context to find
7837         method table index.
7838
7839 2003-01-23  Tom Tromey  <tromey@redhat.com>
7840
7841         * constants.c (set_constant_entry): Allocated cleared memory.
7842
7843 2003-01-22  Tom Tromey  <tromey@redhat.com>
7844
7845         * java-tree.h: Don't use PARAMS.
7846         * resource.c: Add prototypes for all functions.
7847         (write_resource_constructor): Use `const char *' to avoid
7848         warning.
7849
7850 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
7851
7852         * jcf-parse.c (process_zip_dir): Remove unused variable.
7853
7854 2003-01-22  Tom Tromey  <tromey@redhat.com>
7855
7856         * expr.c (build_invokeinterface): Abort if method's context is not
7857         an interface.
7858
7859 2003-01-22  Tom Tromey  <tromey@redhat.com>
7860
7861         * gcj.texi (Input and output files): Mention non-class entries.
7862         * decl.c (java_init_decl_processing): Call
7863         init_resource_processing.
7864         * java-tree.h (compile_resource_data, write_resource_constructor,
7865         compile_resource_file, init_resource_processing): Declare.
7866         * config-lang.in (gtfiles): Added resource.c.
7867         * Make-lang.in (gt-java-resource.h): New target.
7868         (JAVA_OBJS): Added resource.o.
7869         (java/resource.o): New target.
7870         * resource.c: New file.
7871         * class.c (compile_resource_file): Moved to resource.c.
7872         (registerResource_libfunc): Likewise.
7873         (utf8_decl_list): Mark with GTY; now static.
7874         * jcf-parse.c (classify_zip_file): New function.
7875         (parse_zip_file_entries): Use it; compile .properties files.
7876         (process_zip_dir): Use classify_zip_file and compute_class_name.
7877         Don't write class name into zip directory.
7878         (java_parse_file): Call write_resource_constructor.
7879         (compute_class_name): New function.
7880         * jcf-io.c (read_zip_member): Reindented.
7881
7882 2003-01-21  Tom Tromey  <tromey@redhat.com>
7883
7884         * class.c (supers_all_compiled): New function.
7885         (make_class_data): Use it.
7886
7887 2003-01-21  Tom Tromey  <tromey@redhat.com>
7888
7889         * parse.y (method_header): Native method can't be strictfp.
7890         No method can be transient or volatile.
7891
7892 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7893
7894         Make-lang.in (jvspec.o-warn): Add -Wno-error.
7895
7896 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
7897
7898         * check-init.c: Fix comment typos.
7899         * class.c: Likewise.
7900         * constants.c: Likewise.
7901         * decl.c: Likewise.
7902         * except.c: Likewise.
7903         * expr.c: Likewise.
7904         * java-except.h: Likewise.
7905         * java-tree.h: Likewise.
7906         * javaop.h: Likewise.
7907         * jcf-dump.c: Likewise.
7908         * jcf-io.c: Likewise.
7909         * jcf-parse.c: Likewise.
7910         * jcf-write.c: Likewise.
7911         * lang.c: Likewise.
7912         * mangle.c: Likewise.
7913         * typeck.c: Likewise.
7914         * verify.c: Likewise.
7915
7916 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7917
7918         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7919         * jcf-write.c: Include "tm_p.h".
7920
7921 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7922
7923         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7924
7925 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7926
7927         * builtins.c (java_build_function_call_expr): Renamed from
7928         build_function_call_expr.  All callers changed.
7929
7930         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7931         * jcf-parse.c: Include tm_p.h.
7932
7933         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7934         warning.
7935
7936 2003-01-14  Tom Tromey  <tromey@redhat.com>
7937
7938         * class.c (make_class_data): Check that super is compiled before
7939         building class reference to it.
7940
7941 2003-01-14  Andrew Haley  <aph@redhat.com>
7942
7943         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7944         varargs function -- correct.
7945
7946 2003-01-14  Andrew Haley  <aph@redhat.com>
7947
7948         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7949
7950 2003-01-14  Andrew Haley  <aph@redhat.com>
7951
7952         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7953         varargs function -- correct.
7954
7955         * parse.y (patch_assignment): Copy the rhs of an assignment into a
7956         temporary if the RHS is a reference.
7957
7958 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7959
7960         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7961         * keyword.h: Regenerated.
7962
7963         * All Files: Convert to ISO C style function definitions.
7964
7965 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7966
7967         * parse.y (check_pkg_class_access): ANSIfy definition.
7968
7969 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7970
7971         * decl.c, parse-scan.y, parse.y: Don't cast return value of
7972         xmalloc et al.
7973
7974         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7975
7976 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
7977
7978         Merge from pch-branch:
7979
7980         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
7981
7982         * Make-lang.in (java/gjavah.o): Update dependencies.
7983         * gjavah.c: Include ggc.h.
7984
7985         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
7986
7987         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7988         (JCFDUMP_OBJS): Add ggc-none.o.
7989         (java/jcf-dump.o): Depend on GGC_H.
7990         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7991         CPool substructures.
7992         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7993         * jcf-dump.c: Include ggc.h.
7994
7995         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7996
7997         * jcf.h (union cpool_entry): New.
7998         (struct CPool): Use gengtype to mark.  Change field 'data' to be
7999         an array of unions.
8000         (struct JCF): Use gengtype to mark.
8001         (CPOOL_UINT): Update for new cpool_entry type.
8002         (CPOOL_USHORT1): Likewise.
8003         (CPOOL_USHORT2): Likewise.
8004         (CPOOL_FINISH): Use GC to free cpool subfields.
8005         * parse.h (struct parser_ctxt): Mark field current_jcf.
8006         * lex.c (java_init_lex): Use GC to allocate struct JCF.
8007         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8008         (main_jcf): Use gengtype to mark.
8009         (ggc_mark_jcf): Delete.
8010         (get_constant): Update for new cpool_entry type.
8011         (give_name_to_class): Likewise.
8012         (get_class_constant): Likewise.
8013         (init_outgoing_cpool): Use GGC to allocate struct CPool.
8014         (java_parse_file): Use GGC to allocate struct JCF.
8015         (init_jcf_parse): Don't call ggc_add_root.
8016         * jcf-reader.c (jcf_parse_constant_pool): Update for new
8017         cpool_entry type.
8018         * java-tree.h (current_jcf): Use gengtype to mark.
8019         (CPOOL_UTF): Update for new cpool_entry type.
8020         (outgoing_cpool): Use gengtype to mark.
8021         (struct lang_type): GC struct JCF and struct CPool.
8022         * config-lang.in (gtfiles): Add jcf.h.
8023         * constants.c (find_tree_constant): New.
8024         (set_constant_entry): Allocate cpool subfields using GGC.  Update
8025         for new cpool_entry type.
8026         (find_constant1): Update for new cpool_entry type.
8027         (find_constant2): Likewise.
8028         (find_utf8_constant): Use find_tree_constant.
8029         (find_class_or_string_constant): Remove unnecessary cast to jword.
8030         Update for new cpool_entry type.
8031         (count_constant_pool_bytes): Update for new cpool_entry type.
8032         (write_constant_pool): Likewise.
8033         (alloc_name_constant): Use find_tree_constant.
8034         (build_constants_constructor): Update for new cpool_entry type.
8035
8036         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
8037
8038         * parse.y (mark_parser_ctxt): Delete.
8039         (goal): Don't use ggc_add_root.
8040         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8041         (java_pop_parser_context): Let GC free parser_ctxt.
8042         (java_parser_context_resume): Likewise.
8043         * parse.h (struct parser_ctxt): Use gengtype to mark.
8044         (ctxp): Likewise.
8045         (ctxp_for_generation): Likewise.
8046         * lex.h (struct java_lc_s): Mark for gengtype.
8047         (java_lexer): Rearrange for gengtype.
8048         * config-lang.in (gtfiles): Add lex.h, parse.h.
8049
8050 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8051
8052         * All Files: Remove PARAMS macro.
8053
8054         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8055         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8056         `__STDC__' macros.
8057
8058         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8059         VA_CLOSE.
8060
8061 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
8062
8063         * Make-lang.in (java.install-common, java.uninstall,
8064         java.install-info, java.install-man): Prepend $(DESTDIR)
8065         to destination paths in all (un)installation commands.
8066         (java.install-common): Rewrite $(LN) command to support
8067         DESTDIR with "ln" as well as with "ln -s".
8068
8069 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
8070
8071         * java-tree.h: Protect against multiple inclusion.
8072
8073 2003-01-07  Tom Tromey  <tromey@redhat.com>
8074
8075         * class.c (add_assume_compiled): Don't adjust parent if we're
8076         already at the root of tree.
8077
8078 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8079
8080         * lang.c (dump_compound_expr): Prototype.
8081
8082 2003-01-03  Tom Tromey  <tromey@redhat.com>
8083
8084         Fix for PR java/8712:
8085         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8086         when simply checking against `null'.
8087
8088 2003-01-03  Tom Tromey  <tromey@redhat.com>
8089
8090         * gcj.texi (Standard Properties): Document http.proxyHost and
8091         http.proxyPort.
8092
8093         * gcj.texi (GNU Classpath Properties): Document new properties.
8094
8095 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
8096
8097         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8098         java/lang-options.h, java/mangle.c, java/mangle_name.c,
8099         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8100
8101 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
8102
8103         * Make-lang.in, boehm.c, buffer.c,
8104           buffer.h, builtins.c, class.c,
8105           config-lang.in, constants.c,
8106           convert.h, decl.c, except.c,
8107           expr.c, java-except.h,
8108           java-tree.h, javaop.def,
8109           jcf-parse.c, jcf-write.c,
8110           jv-scan.c, jvgenmain.c,
8111           jvspec.c, keyword.gperf,
8112           keyword.h, lang-options.h,
8113           lang-specs.h, lang.c, lex.c,
8114           lex.h, mangle.c, mangle_name.c,
8115           parse-scan.y, parse.h, parse.y,
8116           typeck.c, verify.c, xref.c,
8117           xref.h: Replace "GNU CC" with
8118           "GCC" in the copyright header.
8119
8120         * check-init.c, gjavah.c, javaop.h,
8121           jcf-depend.c, jcf-dump.c, jcf-io.c,
8122           jcf-path.c, jcf-reader.c, jcf.h,
8123           zextract.c, zipfile.h: These files are
8124           "part of GCC". Also say "GCC" not "GNU CC".
8125
8126 2002-12-30  DJ Delorie  <dj@redhat.com>
8127
8128         * Make-lang.in: Protect against texi2pod/pod2man failing.
8129
8130 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
8131
8132         * gcj.texi: Use @copying.
8133
8134 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
8135
8136         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8137         print_cxx_classname.
8138         (print_cxx_classname): Add add_scope parameter.
8139         (print_class_decls): Do not emit a semicolon after the extern
8140         "Java" block.
8141         (process_file): Adjust calls to print_cxx_classname.
8142
8143 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8144
8145         * gcj.texi: Include Cover Texts in man page.
8146
8147 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
8148
8149         * class.c (build_static_field_ref): Check FIELD_FINAL.
8150
8151         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8152         instead of current_constant_pool_data_ref.
8153         * java-tree.h (current_constant_pool_data_ref): Undefine.
8154         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8155         * jcf-parse.c (init_outgoing_cpool): Don't initialize
8156         current_constant_pool_data_ref.
8157
8158         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8159         not build_internal_class_name.
8160
8161         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8162         Use it when class ref isn't certain to be compiled.
8163
8164 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8165
8166         * gcj.texi: Include gcc-common.texi.
8167         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8168         $(srcdir)/doc/include/gcc-common.texi.
8169
8170 2002-12-22  Anthony Green  <green@redhat.com>
8171
8172         * gcj.texi (Limitations): Add note about org.xml.sax and
8173         org.w3c.dom.
8174
8175 2002-12-20  Tom Tromey  <tromey@redhat.com>
8176
8177         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8178         where minimum case value is Integer.MIN_VALUE.
8179         Fixes PR java/8955.
8180
8181 2002-12-18  Andrew Haley  <aph@redhat.com>
8182
8183         * parse.y (patch_invoke): Force evaluation order when `check' is
8184         set.  For PR libgcj/8945.
8185
8186 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
8187
8188         * gcj.texi: Change version number to 3.4.
8189
8190 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
8191         Andrew Haley <aph@redhat.com>
8192
8193         * parse.y (source_end_java_method): Remove custom encoding of line
8194         numbers for a function decl before passing it to the back end.
8195
8196 2002-12-03  Andrew Haley  <aph@redhat.com>
8197
8198         * class.c (make_class_data): New field, "chain".
8199         * decl.c (java_init_decl_processing): Likewise.
8200
8201 2002-12-02  Tom Tromey  <tromey@redhat.com>
8202
8203         For PR java/8740:
8204         * parse.y (do_resolve_class): Handle qualified name via
8205         recursion.
8206
8207 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
8208
8209         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8210         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8211         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8212         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8213         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8214         Include coretypes.h and tm.h.
8215         * Make-lang.in: Update dependencies.
8216
8217 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8218
8219         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8220
8221 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8222
8223         * jcf-reader.c: Don't expand JCF_readu4 inside the
8224         expansion of JCF_SKIP.
8225
8226 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8227
8228         * jcf-reader.c: Don't expand JCF_readu4 inside the
8229         expansion of JCF_SKIP.
8230
8231 2002-11-22  Tom Tromey  <tromey@redhat.com>
8232
8233         * parse.y (patch_binop): Cast right hand side of shift expression
8234         to `int'.  Fixes PR java/8676.
8235
8236 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8237             Andrew Haley <aph@redhat.com>
8238
8239         * gcc/java/jcf-write.c (write_classfile): Remove target
8240         class file, if it exists, before renaming the temporary
8241         class file to it.
8242
8243 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8244
8245         * jvspec.c (lang_specific_spec_functions): New.
8246
8247 2002-11-18  Tom Tromey  <tromey@redhat.com>
8248
8249         Fix for PR java/7912:
8250         * expr.c (can_widen_reference_to): Allow cast of array to
8251         Cloneable or Serializable.
8252         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8253         (java_io_serializable_identifier_node): Likewise.
8254         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8255         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8256         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8257         java_io_serializable.
8258         * decl.c (java_init_decl_processing): Initialize
8259         java_lang_cloneable_identifier_node and
8260         java_io_serializable_identifier_node.
8261         (java_lang_cloneable_identifier_node): New global.
8262         (java_io_serializable_identifier_node): Likewise.
8263
8264 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8265
8266         * buffer.c: Remove unnecessary casts.
8267         * check-init.c: Likewise.
8268         * class.c: Likewise.
8269         * constants.c: Likewise.
8270         * decl.c: Likewise.
8271         * except.c: Likewise.
8272         * gjavah.c: Likewise.
8273         * jcf-io.c: Likewise.
8274         * jcf-parse.c: Likewise.
8275         * jcf-path.c: Likewise.
8276         * jvspec.c: Likewise.
8277         * lang.c: Likewise.
8278         * lex.c: Likewise.
8279         * verify.c: Likewise.
8280
8281 2002-11-06  Tom Tromey  <tromey@redhat.com>
8282
8283         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8284         a JNI header.
8285
8286 2002-11-05  Tom Tromey  <tromey@redhat.com>
8287
8288         Fix for PR java/6388.
8289         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8290         * java-tree.h (enum java_tree_index): New values
8291         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8292         (decimal_int_max, decimal_long_max): New defines.
8293         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8294         (error_if_numeric_overflow): Rewrote range checking.
8295         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8296         decimal_long_max.
8297
8298 2002-11-02  Tom Tromey  <tromey@redhat.com>
8299
8300         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8301
8302         * class.c (make_method_value): Put class name, not signature, into
8303         `throws' field.  For PR java/8415.
8304
8305 2002-10-24  Tom Tromey  <tromey@redhat.com>
8306
8307         * gcj.texi (Invoking gij): Document --showversion.
8308         (Standard Properties): java.library.path now set.
8309
8310 2002-10-23  Tom Tromey  <tromey@redhat.com>
8311
8312         * gjavah.c (decode_signature_piece): In JNI mode, print
8313         `jobjectArray' when array depth is nonzero.
8314         Fixes PR java/8296.
8315
8316 2002-10-15  Andrew Haley  <aph@redhat.com>
8317
8318         * parse.y (patch_invoke): Call force_evaluation_order on a static
8319         arg list.
8320         (resolve_qualified_expression_name): Call force_evaluation_order
8321         on a arg list that is part of a Qualified Expression Name.
8322
8323         * lang.c (dump_compound_expr): New.
8324         (java_dump_tree): New.
8325
8326 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8327
8328         * gcj.texi: Added item describing the GCJ runtime property
8329         "gnu.gcj.progname".
8330
8331 2002-10-15  Richard Henderson  <rth@redhat.com>
8332
8333         * jcf-parse.c (get_constant): Fix type warning.
8334
8335 2002-10-15  Andrew Haley  <aph@redhat.com>
8336
8337         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8338         (java_inlining_map_static_initializers): Declare.
8339
8340 2002-10-14  Andrew Haley  <aph@redhat.com>
8341
8342         * tree-inline.c (remap_block): All local class initialization
8343         flags go in the outermost scope.
8344         (expand_call_inline): Call java_inlining_map_static_initializers.
8345         (expand_call_inline): Call java_inlining_merge_static_initializers.
8346         * java/lang.c (merge_init_test_initialization): New.
8347         (java_inlining_merge_static_initializers): New.
8348         (inline_init_test_initialization): New.
8349         (java_inlining_map_static_initializers): New.
8350
8351 2002-10-11  Mark Wielaard  <mark@klomp.org>
8352
8353         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8354
8355 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8356
8357         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8358
8359 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8360
8361         * parse.y (merge_string_cste): Add parentheses around & within |.
8362
8363 2002-10-08  Tom Tromey  <tromey@redhat.com>
8364
8365         * parse.y (variable_declarator_id): Simplify error path for
8366         array declarator error.  For PR java/8003.
8367
8368 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8369
8370         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8371         bug_report_url.
8372
8373 2002-10-08  Andrew Haley  <aph@redhat.com>
8374
8375         * parse.y (attach_init_test_initialization_flags): Check for
8376         error_mark_node.
8377
8378 2002-10-07  Anthony Green  <green@redhat.com>
8379
8380         * parse.y (merge_string_cste): Fix bug in string concatenation.
8381
8382 2002-10-03  Michael Koch  <konqueror@gmx.de>
8383
8384         * gcj.texi (Standard properties):
8385         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8386
8387 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8388
8389         PR optimization/6627
8390         * lang.c (java_init): If storing the vbit in function
8391         pointers, ensure that force_align_functions_log is atleast
8392         one to aid compatability with g++ vtables.
8393
8394 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8395
8396         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8397         foul of type-based aliasing.
8398
8399 2002-09-30  Anthony Green  <green@redhat.com>
8400
8401         * gcj.texi (Invoking jv-scan): Fix texinfo.
8402
8403 2002-09-28  Anthony Green  <green@redhat.com>
8404
8405         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8406         (Code Generation): Add -fno-assert documentation.
8407         * jv-scan.c (flag_assert): New global.
8408         (options): Add assert option.
8409         (help): Add --no-assert documentation.
8410         * parse-scan.y (flag_assert): New global.
8411         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8412         (flag_assert): New global.
8413         * java-tree.h (flag_assert): New global.
8414         * lex.c (java_lex): Obey flag_assert.
8415         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8416         calling cc1.
8417
8418 2002-09-26  Andrew Haley  <aph@redhat.com>
8419
8420         * expr.c (build_java_array_length_access): Check for null pointer.
8421         * expr.c (expand_java_arrayload): Likewise.
8422
8423 2002-09-21  Richard Henderson  <rth@redhat.com>
8424
8425         * jcf-parse.c (get_constant): Decode from IEEE no matter
8426         what the target format.
8427
8428 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8429
8430         * ChangeLog: Follow spelling conventions.
8431         * class.c: Likewise.
8432         * decl.c: Likewise.
8433         * expr.c: Likewise.
8434         * gjavah.c: Likewise.
8435         * java-tree.h: Likewise.
8436         * jcf-dump.c: Likewise.
8437         * jcf-parse.c: Likewise.
8438         * jvspec.c: Likewise.
8439         * lang.c: Likewise.
8440         * mangle.c: Likewise.
8441         * parse.y: Likewise.
8442
8443 2002-09-17  Tom Tromey  <tromey@redhat.com>
8444
8445         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8446         where \r appears at EOF.  Fixes PR java/7950.
8447
8448 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8449
8450         * jvspec.c (lang_specific_driver): Remove unused variable.
8451
8452 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8453
8454         * java-tree.h (union lang_tree_node): Add chain_next option.
8455
8456 2002-09-16  Richard Henderson  <rth@redhat.com>
8457
8458         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8459         use new real.h interface.
8460         * jcf-write.c (find_constant_index): Use new real.h interface.
8461         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8462
8463 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8464
8465         * lang.c: Follow spelling conventions.
8466
8467 2002-09-11  Per Bothner  <per@bothner.com>
8468
8469         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8470         constant to the type of the field.
8471         (java_complete_tree):  Remove now-redundant code.
8472
8473         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8474
8475 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8476
8477         For PR java/5794:
8478         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8479         return label if a ret instruction for the jsr has been reached.
8480
8481 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8482
8483         * parse.y (DIR_SEPARATOR): Don't define.
8484         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8485
8486 2002-08-28  Andrew Haley  <aph@redhat.com>
8487
8488         * verify.c (verify_jvm_instructions): Allow exception handler
8489         inside code that is being protected, but generate a warning.
8490         * except.c (link_handler): Initialize `expanded' in new eh_range.
8491         (binding_depth, is_class_level, current_pc): Declare extern.
8492
8493 2002-09-01  Mark Wielaard <mark@klomp.org>
8494
8495         * gcj.texi: Add chapter about system properties.
8496         Fixed some typos.
8497
8498 2002-08-26  Tom Tromey  <tromey@redhat.com>
8499
8500         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8501         conversion if RHS_TYPE is byte, short, or char.
8502
8503 2002-08-22  Tom Tromey  <tromey@redhat.com>
8504
8505         * gcj.texi (Invoking gij): Document -cp and -classpath.
8506
8507 2002-08-21  Tom Tromey  <tromey@redhat.com>
8508
8509         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8510         $(prefix)/share.  For PR libgcj/7633.
8511
8512         For PR java/6005 and PR java/7611:
8513         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8514         (java_can_use_bit_fields_p): New function.
8515
8516 2002-08-16  Tom Tromey  <tromey@redhat.com>
8517
8518         * gcj.texi (Class Initialization): Mention class initialization of
8519         arrays.
8520
8521 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8522
8523         * Make-lang.in (java-tree-inline.o): New.
8524         (JAVA_OBJS): Add java-tree-inline.o.
8525         * parse.y (source_end_java_method): Call java_optimize_inline.
8526         (java_expand_method_bodies): Save method's tree in
8527         DECL_SAVED_TREE.
8528         (add_stmt_to_compound): Keep track of the number of statments.
8529         * lang.c (java_init): Enable flag_inline_trees.
8530         (java_post_options): If flag_inline_functions is on, enable
8531         flag_inline_trees instread.
8532         (decl_constant_value): New.
8533         (java_tree_inlining_walk_subtrees): New.
8534         * java-tree.h (DECL_NUM_STMTS): New macro.
8535         (java_optimize_inline): Declare.
8536         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8537         Handle a LABEL_EXPR.
8538         * decl.c (build_result_decl): If we already have a DECL_RESULT
8539         don't make another.
8540         (dump_function): New.
8541         (java_optimize_inline): New.
8542         (dump_function): New.
8543
8544 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
8545
8546         For PR java/7483:
8547         * parse.y (build_assertion): Invert return from
8548         desiredAssertionStatus.
8549
8550 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8551
8552         * jcf-write.c (get_access_flags): Return correct access flags for
8553         private and protected inner classes.
8554
8555 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8556
8557         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8558
8559 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8560
8561         * mangle_name.c: Don't include obstack.h twice.
8562         * xref.c: Don't include obstack.h.
8563
8564 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8565
8566         * class.c: (permanent_obstack): Delete declaration.
8567         * constants.c: (permanent_obstack): Delete declaration.
8568         * except.c: (permanent_obstack): Delete declaration.
8569         * expr.c: (permanent_obstack): Delete declaration.
8570         * jcf-parse.c: (permanent_obstack): Delete declaration.
8571         (saveable_obstack): Delete declaration.
8572         * parse.h: (permanent_obstack): Delete declaration.
8573         * typeck.c: (permanent_obstack): Delete declaration.
8574
8575 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8576
8577         * gcj.texi (version-gcc): Increase to 3.3.
8578
8579 2002-07-22  Tom Tromey  <tromey@redhat.com>
8580
8581         * lex.c (java_lex): Check for `e' or `E' after 0.
8582
8583 2002-07-21  Richard Henderson  <rth@redhat.com>
8584
8585         * lang.c (java_unsafe_for_reeval): New.
8586         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8587
8588 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
8589
8590         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8591         (jcf_path_init): Use GET_ENVIRONMENT.
8592
8593 2002-07-10  Roger Sayle  <roger@eyesopen.com>
8594             Zack Weinberg <zack@codesourcery.com>
8595
8596         * builtins.c (initialize_builtins): Remove defines that
8597         handled C/C++ specific junk hereby removed from builtins.def.
8598
8599 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
8600
8601         * lang.c (java_post_options): Update prototype.
8602
8603 2002-07-05  Roger Sayle  <roger@eyesopen.com>
8604
8605         * builtins.c (initialize_builtins): Ignore the additional
8606         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
8607         the builtins.def file.
8608
8609 2002-07-01  Tom Tromey  <tromey@redhat.com>
8610
8611         For PR libgcj/7073:
8612         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8613         specially.
8614
8615 2002-07-01  Roger Sayle  <roger@eyesopen.com>
8616
8617         * java/decl.c (builtin_function): Accept additional parameter.
8618         (java_init_decl_processing): Pass an additional NULL_TREE
8619         argument to builtin_function.
8620
8621 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
8622
8623         * gcj.texi: Fixed gcj invocation example so that it compiles.
8624
8625 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8626
8627         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8628         * parse.y (mark_parser_ctxt): Likewise.
8629         (check_modifiers, declare_local_variables): Avoid incorrect
8630         hardcoded constant 10.
8631
8632         * lex.c (java_read_char): Avoid "comparison is always true"
8633         warning.
8634
8635 2002-06-25  Andreas Schwab  <schwab@suse.de>
8636
8637         * expr.c (JSR): Avoid undefined operation on PC.
8638
8639 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8640
8641         * decl.c (clear_binding_level): Const-ify.
8642
8643 2002-06-13  Akim Demaille  <akim@epita.fr>
8644
8645         * parse.y (class_declaration, interface_declaration): Make sure
8646         all their rules have an action, in order to avoid meaningless `$$
8647         = $1' and their type clashes.
8648
8649 2002-06-11  Tom Tromey  <tromey@redhat.com>
8650
8651         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8652         * parse-scan.y (statement_without_trailing_substatement): Added
8653         assert_statement.
8654         (assert_statement): New rule.
8655         * java-tree.h (struct lang_type) [assertions]: New field.
8656         (TYPE_USES_ASSERTIONS): New macro.
8657         (CLASS_USES_ASSERTIONS): Likewise.
8658         (FIELD_SYNTHETIC): New define.
8659         * lex.c (java_lval;): Added ASSERT_TK.
8660         * parse.y (ASSERT_TK): Added.
8661         (statement_without_trailing_substatement): Added assert_statement.
8662         (assert_statement): New rule.
8663         (build_assertion): New function.
8664         (maybe_generate_pre_expand_clinit): Create and initialize
8665         $assertionsDisabled.
8666         (lookup_package_type): Removed decl.
8667         * keyword.h: Rebuilt.
8668         * keyword.gperf (assert): New token.
8669
8670 2002-06-10  Akim Demaille  <akim@epita.fr>
8671
8672         * parse.y (interface_type_list, class_member_declaration)
8673         (unary_expression_not_plus_minus): Remove duplicate %type.
8674         Whitespace changes.
8675
8676 2002-06-09  Tom Tromey  <tromey@redhat.com>
8677
8678         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8679
8680         * parse.y (method_header): Give error message in all cases.
8681         Fixes PR java/6865.
8682
8683 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8684
8685         Don't use RTL inlining. Fix for PR java/6820.
8686         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8687         (flag_really_inline): New.
8688         (java_decode_option): Set flag_really_inline if -finline-functions
8689         is seen.
8690         (java_post_options): New function. Turn off inlining unless
8691         flag_really_inline is set.
8692
8693 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8694
8695         * gjavah.c (throwable_p): Accept argument as either a classname or
8696         signature fragment. Create null-terminated classname string for super
8697         when calling itself recursively.
8698         (decode_signature_piece): Skip first character from class name
8699         signature when calling throwable_p.
8700
8701 2002-06-08  H.J. Lu  (hjl@gnu.org)
8702
8703         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8704
8705 2002-06-04  Tom Tromey  <tromey@redhat.com>
8706
8707         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8708
8709 2002-06-04  Michael Koch  <konqueror@gmx.de>
8710
8711         * gcj.texi (Input Options): Fixed typo.
8712
8713 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
8714
8715         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8716         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8717         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8718         and all now-pointless local variables.  Rename other local
8719         variables to reflect their not being handles.
8720
8721         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8722         #if JCF_USE_STDIO blocks.
8723
8724         * parse.y: Add missing semicolon at end of rule.
8725
8726 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8727
8728         * check-init.c (attach_initialized_static_class): Delete, unused.
8729         * parse.y: Use htab_t instead of struct hashtable, update
8730         all uses.
8731         * java-tree.h: Include hashtab.h instead of hash.h.
8732         (struct lang_decl_func): Use htab_t, set up for gengtype.
8733         (struct init_test_hash_entry): Delete.
8734         (struct treetreehash_entry): New.
8735         (java_treetreehash_find): New
8736         (java_treetreehash_new): New prototype.
8737         (java_treetreehash_create): New prototype.
8738         (java_mark_tree): Delete prototype.
8739         (java_hash_hash_tree_node): Delete prototype.
8740         (java_hash_compare_tree_node): Delete prototype.
8741         (attach_initialized_static_class): Delete prototype.
8742         * expr.c (build_class_init): Update to use java_treetreehash
8743         functions.
8744         (java_expand_expr): Update to use htab_t.
8745         (emit_init_test_initialization): Likewise.
8746         * decl.c (java_mark_tree): Delete.
8747         * class.c (init_test_hash_newfunc): Delete.
8748         (java_hash_hash_tree_node): Delete.
8749         (java_hash_compare_tree_node): Delete.
8750         (add_method_1): Update to use java_treetreehash functions.
8751         (JAVA_TREEHASHHASH_H): New macro.
8752         (java_treetreehash_hash): New function.
8753         (java_treetreehash_compare): New function.
8754         (java_treetreehash_find): New function.
8755         (java_treetreehash_new): New function.
8756         (java_treetreehash_create): New function.
8757         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8758
8759         * Make-lang.in (java/parse.o): Depend on debug.h.
8760         * java-tree.h (struct lang_identifier): Use gengtype.
8761         (union lang_tree_node): New.
8762         (struct lang_decl_func): Use gengtype.
8763         (struct lang_decl_var): Likewise.
8764         (struct lang_decl): Likewise.
8765         * parse.y: Include debug.h.
8766         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8767
8768         * lang.c (struct language_function): New dummy structure.
8769
8770         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8771         descriminator for DECL_LANG_SPECIFIC.
8772         (struct lang_decl_func): Rename from struct lang_decl.
8773         (enum lang_decl_desc): New.
8774         (struct lang_decl): Make it a union.  Update all the accessor macros.
8775         (struct lang_type): Use gengtype.
8776         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8777         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8778         are now the same size.
8779         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8780         use discriminator to mark DECL_LANG_SPECIFIC.
8781
8782         * Make-lang.in (gt-java-builtins.h): New rule.
8783         (java/builtins.o): Add dependency on gt-<filename>.h.
8784         * builtins.c: Use gengtype for roots.
8785         (union string_or_tree): Use gengtype.
8786         (struct builtin_record): Use gengtype.
8787         * config-lang.in (gtfiles): Add builtins.c.
8788
8789         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8790         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8791         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8792         gt-java-parse.h, gtype-java.h): Add rules to generate.
8793         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8794         (class.o): Add dependency on gt-*.h.
8795         (constants.o): Likewise.
8796         (decl.o): Likewise.
8797         (expr.o): Likewise.
8798         (jcf-parse.o): Likewise.
8799         (jcf-write.o): Likewise.
8800         (lang.o): Likewise.
8801         * config-lang.in (gtfiles): New.
8802         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8803         * constants.c: Replace uses of ggc_add_* with GTY markers.
8804         Include gt-*.h.
8805         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8806         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8807         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8808         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8809         Include gt-*.h.
8810         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8811         Include gt-*.h.
8812         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8813         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8814         gt-*.h.
8815         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8816         Include gtype-java.h.
8817
8818 2002-06-02  Tom Tromey  <tromey@redhat.com>
8819
8820         Fix for PR java/5913:
8821         * parse.y (patch_binop): Call patch_string on op1.
8822
8823 2002-06-02  Tom Tromey  <tromey@redhat.com>
8824
8825         Fix for PR java/1343, PR java/6336:
8826         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8827         formatting.  Changed return type.
8828         (anonymous_class_counter): Moved to top of file.
8829         (maybe_make_nested_class_name): Append number to class name for
8830         function-local classes.
8831
8832 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8833
8834         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8835         * Make-lang.in: Update dependency lists.
8836
8837 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
8838
8839         * gjavah.c (throwable_p): Do not free the name of the class after
8840         passing it to find_class.
8841         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8842         * jcf-io.c (dirent.h): Include it.
8843         (fnmatch.h): Likewise.
8844         (compare_path): New function.
8845         (java_or_class_file): Likewise.
8846         (memoized_dirlist_entry): New type.
8847         (memoized_dirlist_lookup_eq): New function.
8848         (memoized_dirlists): New variable.
8849         (caching_stat): New function.
8850         (memoized_class_lookup_eq): New function.
8851         (memoized_class_lookups): Likewise.
8852         (find_class): Use memoized_class_lookups and caching_stat.
8853         * jcf.h (JCF_USE_SCANDIR): Define.
8854         * parse.y (java_expand_classes): Write the class files in reverse
8855         order.
8856
8857 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8858
8859         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8860
8861 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
8862
8863         * jcf-write.c (write_classfile): Unlink the temporary file if it
8864         cannot be renamed.  Use concat to build up the name of the
8865         temporary file.
8866
8867 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
8868
8869         * jcf-write.c (write_classfile): Write the file to a
8870         temporary file and then rename it.
8871
8872 2002-05-07  Tom Tromey  <tromey@redhat.com>
8873
8874         * gjavah.c (throwable_p): Use xstrdup, not strdup.
8875
8876         Fix for PR java/1200:
8877         * gjavah.c (throwable_p): New function.
8878         (decode_signature_piece): Use it.  A `WeakReference' isn't the
8879         same as a `jweak'.
8880         Include hashtab.h.
8881         (gcjh_streq): New function.
8882
8883 2002-05-07  Andreas Jaeger  <aj@suse.de>
8884
8885         * parse.y (finish_for_loop): Fix if statement.
8886
8887 2002-05-06  Tom Tromey  <tromey@redhat.com>
8888
8889         Fix for PR java/5941:
8890         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8891         loop update expression.
8892         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8893         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8894
8895 2002-05-04  Mark Wielaard  <mark@klomp.org>
8896
8897         For PR java/6519:
8898         * parse.y (build_string_concatenation): Return just op1 only when op2
8899         is null and op1 is a STRING_CST, otherwise always construct a
8900         StringBuffer.
8901
8902 2002-04-27  Tom Tromey  <tromey@redhat.com>
8903
8904         For PR java/6382:
8905         * parse.y (string_convert_int_cst): New function.
8906         (merge_string_cste): Use it.
8907
8908 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8909
8910         * java-tree.h (java_parse_file): Update.
8911         (java_set_yydebug): Remove.
8912         * jcf-parse.c (yydebug): Remove.
8913         (java_set_yydebug): Die.
8914         (java_parse_file): Update.
8915         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8916
8917 2002-04-24  Tom Tromey  <tromey@redhat.com>
8918
8919         For PR java/6425:
8920         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8921         EXPR_WFL_QUALIFICATION of qual_wfl.
8922
8923 2002-04-23  Per Bothner  <per@bothner.com>
8924
8925         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
8926         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
8927         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
8928
8929 2002-04-23  Tom Tromey  <tromey@redhat.com>
8930
8931         For PR java/6314:
8932         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
8933         recognize `-fcompile-resource='.
8934         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
8935         a bit.
8936
8937 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8938
8939         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8940         paths. Fixes PR java/2791.
8941
8942 2002-04-19  Andrew Haley  <aph@redhat.com>
8943
8944         * jcf-write.c (push_long_const): lo, hi: New variables.
8945         Use rshift_double to extract the high part of a 64-bit long.
8946         Use WORD_TO_INT to extract the low part.
8947
8948         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8949         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
8950         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8951
8952 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8953
8954         * typeck.c (incomplete_type_error): Remove.
8955
8956 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8957
8958         * class.c (make_class_data): Set DECL_ALIGN on static class data,
8959         for hash synchronization.
8960         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8961         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8962         class_type_node.
8963
8964 2002-04-16  Mark Wielaard  <mark@klomp.org>
8965
8966         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8967         negative zero.
8968
8969 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8970
8971         Fix for PR java/6294:
8972         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8973         interfaces.
8974
8975 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8976
8977         Fix for PR java/6085:
8978         * parse.y (patch_method_invocation): Always use build_access_to_thisn
8979         to get enclosing "this" argument for inner-class constructor
8980         invocation. Pass correct arguments to build_access_to_thisn.
8981
8982 2002-04-10  Andreas Jaeger  <aj@suse.de>
8983
8984         * gcj.texi (Input Options): Fix extdirs patch.
8985
8986 2002-04-10  Anthony Green  <green@redhat.com>
8987
8988         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8989
8990 2002-04-09  Anthony Green  <green@redhat.com>
8991
8992         * gcj.texi (Input Options): Add --extdirs documentation.
8993         * jcf-dump.c (OPT_extdirs): New macro.
8994         (options): Add extdirs option.
8995         (help): Describe --extdirs.
8996         (main): Handle OPT_extdirs.
8997         * gjavah.c (OPT_extdirs): New macro.
8998         (options): Add extdirs option.
8999         (help): Describe --extdirs.
9000         (main): Handle OPT_extdirs.
9001         * jcf-path.c (jcf_path_init): Add extdirs support.
9002         (jcf_path_extdirs_arg): New function.
9003         (extensions): New variable to hold extensions path entries.
9004         * jvspec.c: Remove -fextdirs= when compiling main().
9005         * lang.c (java_decode_option): Handle -fextdirs=.
9006         * jcf.h (jcf_path_extdirs_arg): Declare new function.
9007         * Make-lang.in: Compile jcf-path with version info for use in
9008         identifying the appropriate libgcj.jar.
9009
9010 2002-04-08  Tom Tromey  <tromey@redhat.com>
9011
9012         For PR libgcj/5303:
9013         * .cvsignore: Added rmic.1 and rmiregistry.1.
9014         * gcj.texi (Top): Link to new nodes.
9015         (Invoking rmic): New node.
9016         (Invoking rmiregistry): Likewise.
9017         * Make-lang.in (java.generated-manpages): Added rmic.1 and
9018         rmiregistry.1.
9019         (java.maintainer-clean): Likewise.
9020         ($(srcdir)/java/rmic.1): New target.
9021         ($(srcdir)/java/rmiregistry.1): Likewise.
9022         (java.install-man): Handle rmic.1 and rmiregistry.1.
9023
9024 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9025
9026         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9027         Add note about handling uncaught exceptions. Add an exception handler
9028         to example.
9029
9030 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9031
9032         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9033         after using it to patch CALL_EXPR.
9034
9035 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9036
9037         * gcj.texi (Invocation): Document CNI invocation API.
9038
9039 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9040
9041         * expr.c (truthvalue_conversion): Rename.  Update.
9042         (expand_compare): Update.
9043         * java-tree.h (java_truthvalue_conversion): New.
9044         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9045
9046 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9047
9048         * java-tree.h (java_mark_addressable): New.
9049         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9050         * typeck.c (mark_addressable): Rename, update.
9051
9052 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9053
9054         * expr.c (build_java_binop): Update.
9055         * java-tree.h (java_signed_type, java_unsigned_type,
9056         java_signed_or_unsigned_type): Update.
9057         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9058         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9059         * parse.y (patch_binop): Update.
9060         * typeck.c (signed_or_unsigned_type, unsigned_type,
9061         signed_type): Update.
9062
9063 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9064
9065         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9066         (java_dummy_print): Remove.
9067         (lang_print_error): Rename.  Exit early if inhibiting output.
9068         (inhibit_error_printing_function): New.
9069         (java_init): Don't set hook.
9070         (lang_init_source): Use new boolean.
9071
9072 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9073
9074         * parse.y (do_resolve_class): Fix infinite recursion.
9075
9076 2002-03-29  Tom Tromey  <tromey@redhat.com>
9077
9078         * parse.y (check_inner_circular_reference): Ignore incomplete
9079         types.
9080
9081 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9082
9083         * Make-lang.in (builtins.o): Update.
9084         * boehm.c (get_boehm_type_descriptor): Update.
9085         * builtins.c: Include langhooks.h.
9086         * decl.c (java_init_decl_processing): Update.
9087         * java-tree.h (java_type_for_mode, java_type_for_size): New.
9088         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9089         Redefine.
9090         * typeck.c (type_for_mode, type_for_size): Update.
9091
9092 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
9093
9094         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9095
9096 2002-03-28  Tom Tromey  <tromey@redhat.com>
9097
9098         * except.c (expand_end_java_handler): If the handler type is NULL,
9099         use java.lang.Throwable.  Fixes PR java/5986.
9100
9101 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9102
9103         Fix for PR java/4715:
9104         * jcf-parse.c (parse_source_file_3): New function.
9105         (read_class): Call it.
9106         (java_parse_file): Likewise.
9107
9108 2002-03-28  Jan Hubicka  <jh@suse.cz>
9109
9110         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9111
9112 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9113
9114         * parse.y (resolve_package): Initialize "decl".
9115         (lookup_package_type): Remove unused function.
9116
9117 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9118
9119         Fix for PR java/5993:
9120         * parse.y (resolve_package): Return the decl if resolution was
9121         successful. Don't special case "java.lang" and "java.lang.reflect"
9122         packages. Set type_name to the merged identifier.
9123         (resolved_qualified_expression_name): Print error using "name" if
9124         resolve_package returns NULL_TREE.
9125
9126 2002-03-27  Tom Tromey  <tromey@redhat.com>
9127
9128         * expr.c (expand_invoke): Don't generate null pointer check if
9129         we're calling <init>.
9130
9131 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9132
9133         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9134         fix prototype.
9135         * java-tree.h (java_lang_expand_expr): Similarly.
9136         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9137         (java_init): Don't set hook.
9138
9139 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9140
9141         Fix for PR java/5850:
9142         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9143         context if field was not found in the current scope.
9144         * expr.c (lookup_field): Don't look in enclosing contexts.
9145
9146 2002-03-26  Tom Tromey  <tromey@redhat.com>
9147
9148         Fix for PR java/5942:
9149         * parse.y (init_src_parse): Added sanity check.
9150         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9151         elements, not 11.
9152
9153 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9154
9155         * decl.c (lang_mark_tree): Rename java_mark_tree.
9156         * java-tree.h (java_mark_tree): New.
9157         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9158
9159 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
9160
9161         * lex.c: Change java_perform_atof to take normal parameters
9162         instead of a pointer to a parameter block.  Call it directly
9163         from java_lex.
9164
9165 2002-03-22  Mark Wielaard  <mark@klomp.org>
9166
9167         Fix for PR java/5368:
9168         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9169         when printing error message.
9170
9171 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9172
9173         * decl.c (maybe_build_cleanup): Remove.
9174
9175 2002-03-22  Tom Tromey  <tromey@redhat.com>
9176
9177         Andrew Haley  <aph@cambridge.redhat.com>
9178
9179         * expr.c (build_field_ref): Don't build a check if the field is a
9180         member of `this'.
9181
9182 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
9183
9184         Fix for PR java/6026:
9185         * lex.c (java_lex): Fix parsing of consecutive floats.
9186
9187 2002-03-21  Tom Tromey  <tromey@redhat.com>
9188
9189         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9190         class.
9191
9192 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9193
9194         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9195         insert_block, getdecls, kept_level_p, global_bindings_p): New.
9196
9197 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9198
9199         * gcj.texi: @code{gcj} becomes @command{gcj}.
9200         @code{gcc} becomes @command{gcc}.
9201         GcjRaw changed to gnu.gcc.RawData.
9202
9203 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9204
9205         * decl.c (start_java_method): Use new hook.
9206         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9207         (java_init): Remove old hook.
9208
9209 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9210
9211         * builtins.c (define_builtin): Do nothing if `type' is null.
9212         Fixes PR java/5876.
9213
9214 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9215
9216         * parse.y (parser_check_super_interface): Fix error message
9217         grammar/order.
9218
9219 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9220
9221         * jcf-parse.c (get_constant): Delete unused variables.
9222
9223 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9224
9225         * java-tree.h (java_parse_file): New.
9226         * jcf-parse.c (yyparse): Rename java_parse_file.
9227         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9228
9229 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9230
9231         * parse.y (craft_constructor): Return the constructor decl.
9232         (java_expand_classes): Update comments.
9233         (lookup_method_invoke): Call fix_constructors immediately for
9234         anonymous class. Fixes PR java/5935.
9235
9236 2002-03-15  Anthony Green  <green@redhat.com>
9237
9238         * jcf-parse.c (yyparse): Don't emit class registration
9239         constructor when compiling resource files.
9240
9241 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9242
9243         * lang.c (java_tree_code_type, java_tree_code_length,
9244         tree_code_name): Delete.
9245         (tree_code_type, tree_code_length, tree_code_name): Define.
9246         (java_init): Don't try to copy into the various tree_code
9247         arrays.
9248
9249 2002-03-12  Tom Tromey  <tromey@redhat.com>
9250
9251         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9252         UTF-8, not UCS-2.  Fixes PR java/5923.
9253
9254         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9255         a call_expr wrapped in a convert.  Fixes PR java/5848.
9256
9257 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9258
9259         * jcf-write.c (write_classfile): Improve error strings.
9260
9261 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9262
9263         * lex.c: Adjust comments to GNU standards.
9264
9265 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9266
9267         Fix for PR java/5902:
9268         * lex.c (java_lex): Fix parsing of literals.
9269
9270 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9271
9272         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9273         to prevent it getting evaluated twice in the store checking case.
9274         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9275         examining OBJECT.
9276
9277 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9278
9279         * decl.c (java_init_decl_processing): Make sure class_type_node
9280         alignment is not less than 64 bits if hash synchronization is enabled.
9281
9282 2002-03-08  Per Bothner  <per@bothner.com>
9283
9284         * parse.y (java_complete_lhs):  Check if patch_assignment
9285         returned an error-mark.
9286
9287         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9288
9289 2002-03-08  Per Bothner  <per@bothner.com>
9290
9291         Fix for PR java/5812.
9292         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9293         here instead of in JSR macro.  Likewise with load_type_state call.
9294         Do the latter on if the return_pc has been verified (the jsr returns).
9295         (JSR):  Now just call build_java_jsr.
9296
9297 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9298
9299         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9300         (java.install-common): Link native driver to
9301         JAVA_TARGET_INSTALL_NAME.
9302
9303 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9304
9305         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9306         * builtins.c(sin_builtin): Likewise
9307         * builtins.c(sqrt_builtin): Likewise
9308
9309 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9310
9311         * java/expr.c, java/jcf-parse.c, java/lex.c:
9312         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9313         REAL_ARITHMETIC blocks unconditional.  Delete some further
9314         #ifdef blocks predicated on REAL_ARITHMETIC.
9315
9316 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9317
9318         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9319         explicit sizeof/sizeof.
9320         * decl.c (java_init_decl_processing): Likewise.
9321         * jcf-parse.c (init_jcf_parse): Likewise.
9322         * parse.y (init_src_parse): Likewise.
9323
9324 2002-03-02  Per Bothner  <per@bothner.com>
9325
9326         Make --CLASSPATH by a synonym for --classpath and -classpath.
9327         Implement --bootclasspath.
9328         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9329         (classpath_l):  Remove.
9330         (jcf_path_CLASSPATH_arg):  Remove.
9331         (jcf_path_bootclasspath_arg):  New function.
9332         (jcf_path_seal):  Simplify accordingly.
9333
9334         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9335         (jcf_path_CLASSPATH):  Remove declaration.
9336         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9337         (lang_specific_driver):  Translate -bootclasspath.
9338         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9339         * lang.c (decode_lang_options):  Do jcf_path_init first.
9340         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9341         * gjavah.c:  Also handle --bootclasspath.
9342         Handle --CLASSPATH as a synonum for --classpath.
9343         * jcf-dump.c: Likewise.
9344
9345         "." is not part of system path, but is the default for --classpath.
9346         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9347         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9348
9349         * gcj.texi:  Document changes.
9350
9351 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9352
9353         * expr.c (build_java_arraystore_check): Fix formatting.
9354
9355 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9356
9357         Fix for PR java/5758, java/5632:
9358         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9359         inner-class separator too.
9360         * parse.y (do_resolve_class): New local `decl_result.'
9361         Progressively build a name for what can have been loaded.
9362
9363 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9364
9365         * expr.c (java_array_data_offset): Removed function.
9366         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9367         (build_java_array_length_access): Obtain "length" value using a
9368         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9369         (build_java_arrayaccess): Correct comment. Access "data" using a
9370         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9371         (build_java_arraystore_check): New function.
9372         (expand_java_arraystore): Use build_java_arraystore_check.
9373         * parse.y (patch_assignment): Simplify code to insert a store check
9374         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9375         * check-init.c (check_init): Update to reflect that an array length
9376         access is now a COMPONENT_REF.
9377         * gcj.texi (Code Generation): Improve documentation of
9378         -fno-bounds-check. Add documentation for -fno-store-check.
9379         * java-tree.h (flag_store_check): Declare.
9380         (build_java_arraystore_check): Declare.
9381         * lang.c (flag_store_check): Initialize to 1.
9382         (lang_f_options): Add store-check option.
9383         * jvspec.c: Don't pass store-check option to jvgenmain.
9384         * lang-options.h: Add help string for -fno-store-check.
9385
9386 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9387
9388         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9389         * java-tree.h (java_dup_lang_specific_decl): New.
9390         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9391
9392 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9393
9394         * builtins.c, decl.c: Delete traditional-mode-related code
9395         copied from the C front end but not used, or used only to
9396         permit the compiler to link.
9397
9398 2002-02-22  Tom Tromey  <tromey@redhat.com>
9399
9400         Fix for PR java/2369:
9401         * jvspec.c (verify_class_name): New function.
9402         (lang_specific_driver): Call it.
9403         (JAVA_START_CHAR_P): New macro.
9404         (JAVA_PART_CHAR_P): Likewise.
9405
9406 2002-02-22  Per Bothner  <per@bothner.com>
9407
9408         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9409         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9410         type_info pointer (currently unimplemented hence NULL) to vtable.
9411         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9412         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9413         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9414         (build_dtable_decl):  Add declarations for new fields.
9415
9416 2002-02-20  Per Bothner  <per@bothner.com>
9417
9418         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9419         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9420         don't need to set it on the COMPOUND_EXPR - the caller does that.
9421
9422 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9423
9424         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9425         `--CLASSPATH' becomes `--classpath.'
9426         * gjavah.c: Likewise.
9427         * jcf-dump.c: Likewise.
9428         * lang-options.h: Likewise.
9429         * lang.c: Likewise.
9430         * jcf-path.c: Updated comment.
9431         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9432         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9433         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9434         (jcf_path_CLASSPATH_arg): Ditto.
9435         (classpath_u): Updated leading comment.
9436
9437 2002-02-20  Per Bothner  <per@bothner.com>
9438
9439         * builtins.c (check_for_builtin):  New function.
9440         (build_call_or_builtin):  Remove.
9441         * java-tree.h:  Update accordingly.
9442         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9443         of build_call_or_builtin.
9444         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9445         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9446         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9447
9448 2002-02-17  Tom Tromey  <tromey@redhat.com>
9449
9450         * java-tree.h (TYPE_STRICTFP): New macro.
9451         (struct lang_type) [strictfp]: New field.
9452         (CLASS_STRICTFP): New macro.
9453         (METHOD_STRICTFP): New macro.
9454         (struct lang_decl) [strictfp]: New field.
9455         * parse.y (method_header): Disallow strictfp constructor or
9456         abstract method.
9457         (STRICT_TK): Move before MODIFIER_TK.
9458         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9459         (METHOD_MODIFIERS): Likewise.
9460         (INTERFACE_MODIFIERS): Likewise.
9461         * jcf-write.c (get_access_flags): Likewise.
9462         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9463         (add_method_1): Likewise.
9464         (get_access_flags_from_decl): Likewise.
9465         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9466         recognize strictfp flag.
9467         * jcf.h (ACC_STRICT): New define.
9468
9469 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9470
9471         * class.c(build_utf8_ref): Move declaration of decl_size
9472
9473 2002-02-07  Tom Tromey  <tromey@redhat.com>
9474
9475         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9476         path.
9477
9478 2002-02-04  Anthony Green  <green@redhat.com>
9479
9480         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9481         sections if available.
9482
9483 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9484
9485         * parse.y (java_expand_classes): Fix typo in static field loop.
9486
9487 2002-02-02  Richard Henderson  <rth@redhat.com>
9488
9489         * class.c (add_field): Mark static fields external.
9490         (build_class_ref): Remove redundant set.
9491         * parse.y (java_expand_classes): Mark static fields of classes
9492         to be compiled as local.
9493         * jcf-parse.c (parse_class_file): Likewise.
9494
9495 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9496
9497         * gcj.texi (About CNI): New node.
9498
9499 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9500
9501         PR java/5080
9502         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9503         setlocale() with LC_CTYPE as a parameter.
9504         * jv-scan.c: Same.
9505
9506 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9507
9508         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9509         Follow GNU Coding Standards for --version.
9510
9511 2002-01-28  Tom Tromey  <tromey@redhat.com>
9512
9513         * expr.c (build_jni_stub): Ensure storage for `meth' is
9514         generated.
9515         * parse.y (java_complete_expand_methods): Set
9516         current_function_decl before building JNI stub.
9517
9518 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9519
9520         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9521         BUILT_IN_SQRTF.
9522
9523 2002-01-22  Tom Tromey  <tromey@redhat.com>
9524
9525         * decl.c (java_init_decl_processing): Use add_predefined_file.
9526         Predefine RawData.java.
9527         (predef_filenames): Removed.
9528         (java_init_decl_processing): Don't register predef_filenames.
9529         * jcf-parse.c (add_predefined_file): New function.
9530         (predefined_filename_p): Rewrote.
9531         (predefined_filename_p): No longer static.
9532         * decl.c (java_init_decl_processing): Call initialize_builtins.
9533         * Make-lang.in (JAVA_OBJS): Added builtins.o.
9534         (java/builtins.o): New target.
9535         * builtins.c: New file.
9536         * parse.y (patch_invoke): Use build_call_or_builtin.
9537         * java-tree.h (build_call_or_builtin): Declare.
9538         (initialize_builtins): Declare.
9539         (java_set_exception_lang_code): Removed unused declaration.
9540         (PREDEF_FILENAMES_SIZE): Removed.
9541         (java_tree_index): Added JTI_PREDEF_FILENAMES.
9542         (predef_filenames): New define.
9543         (add_predefined_file): Declare.
9544         (predefined_filename_p): Declare.
9545         * expr.c (expand_invoke): Use build_call_or_builtin.
9546
9547 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9548
9549         * parse.y (patch_switch_statement): Fix format specifier.
9550
9551 2002-01-16  Tom Tromey  <tromey@redhat.com>
9552
9553         More for PR java/5365:
9554         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9555         default.
9556         (process_file): Generate include for
9557         java.lang.UnsupportedOperationExceptions.
9558
9559 2002-01-15  Andreas Jaeger  <aj@suse.de>
9560
9561         * .cvsignore: Add man pages.
9562
9563 2002-01-15  Tom Tromey  <tromey@redhat.com>
9564
9565         Fix for PR java/5365:
9566         * gjavah.c (process_file): Turn class name into a file name.
9567
9568 2002-01-14  Matthias Klose  <doko@debian.org>
9569
9570         * gcj.texi: Fix whitespace and formatting errors in the
9571         synopsis of the man pages. Update copyright.
9572
9573 2002-01-14  Tom Tromey  <tromey@redhat.com>
9574
9575         For PR libgcj/5303:
9576         * Make-lang.in (java.install-man): Handle jv-convert man page.
9577         (java.generated-manpages): Added jv-convert.1.
9578         (java.uninstall): Remove jv-convert.1.
9579         (java.maintainer-clean): Likewise.
9580         ($(srcdir)/java/jv-convert.1): New target.
9581         * gcj.texi (Top): Link to jv-convert node.
9582         (Individual utilities): Likewise.
9583         (Invoking jv-convert): New node.
9584
9585 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
9586             Martin Kahlert  <martin.kahlert@infineon.com>
9587
9588         * jcf-parse.c (get_constant): Don't swap lo/hi for big
9589         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9590
9591 2002-01-03  Graham Stott  <grahams@redhat.com>
9592
9593         * class.c (compile_resource_file): Update copyright date.
9594         Constify filename parameter.
9595         (java-tree.h): Update copyright date.
9596         (compile_resource_file): Constify filename parameter.
9597
9598 2002-01-03  Graham Stott  <grahams@redhat.com>
9599
9600         * gcc/jcf-parse.c: Update copyright date.
9601         (yyparse): Constify resource_filename.
9602
9603 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9604
9605         * parse.y (src_parse_roots): Don't needlessly zero init.
9606
9607 2001-12-31  Tom Tromey  <tromey@redhat.com>
9608
9609         * parse.y (dump_java_tree): New function.
9610         (source_end_java_method): Call it.
9611         (end_class_declaration): Likewise.
9612         * lang.c (java_decode_option): Call dump_switch_p.
9613
9614 2001-12-28  Tom Tromey  <tromey@redhat.com>
9615
9616         * gen-table.pl: Don't process characters after \uffff.  Added
9617         comment pointing to input file.
9618
9619 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9620
9621         * gen-table.pl: Const-ify output.  Document the location of a
9622         suitable unicode input file.
9623
9624         * chartables.h: Regenerate.
9625
9626 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9627
9628         * chartables.h: Const-ify.
9629         * gjavah.c (options): Likewise.
9630         * jcf-dump.c (options): Likewise.
9631         * jv-scan.c (options): Likewise.
9632         * lex.c (java_start_char_p, java_part_char_p): Likewise.
9633         * parse.y (binop_lookup): Likewise.
9634
9635 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9636
9637         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9638         the static arrays that are output.
9639         * jvspec.c (jvgenmain_spec): Make static.
9640         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9641         * keyword.h: Regenerate.
9642         * lang.c (string_option, process_option_with_no, lang_f_options,
9643         lang_W_options): Const-ify.
9644         * lex.c (java_lex): Likewise.
9645
9646 2001-12-21  Richard Henderson  <rth@redhat.com>
9647
9648         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9649         (get_boehm_type_descriptor): ... here.  Arrange for the
9650         TREE_TYPE to get set properly.
9651
9652 2001-12-21  Richard Henderson  <rth@redhat.com>
9653
9654         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9655         only if the target requires collect2.
9656
9657         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9658
9659 2001-12-20  Tom Tromey  <tromey@redhat.com>
9660
9661         For PR java/4509:
9662         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9663         CAN_COMPLETE_NORMALLY for the node.
9664         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9665         generate code for second branch if first branch can't complete
9666         normally.
9667         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9668         the loop head if the loop body can't complete normally.
9669
9670 2001-12-20  Tom Tromey  <tromey@redhat.com>
9671
9672         For PR java/4766:
9673         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9674         case where `finally' clause can't complete normally.
9675
9676 2001-12-20  Tom Tromey  <tromey@redhat.com>
9677
9678         Fixes PR java/5057:
9679         * parse.y (analyze_clinit_body): Added this_class parameter.
9680         Check for more cases where we must keep <clinit>.
9681         (maybe_yank_clinit): Cleaned up flow control.
9682
9683 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9684
9685         * decl.c (java_init_decl_processing): Don't initialize
9686         finit_leg_identifier_node.
9687         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9688         (finit_leg_identifier_node): Remove.
9689         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9690
9691 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9692
9693         * mangle.c (mangle_member_name): Don't special-case for
9694         NO_DOLLAR_IN_LABEL.
9695         * mangle_name.c (unicode_mangling_length): Likewise.
9696         (append_unicode_mangled_name): Likewise.
9697         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9698         code.
9699
9700 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9701
9702         * expr.c (build_java_array_length_access): Don't force null pointer
9703         check unless flag_check_references is set.
9704
9705 2001-12-20  Tom Tromey  <tromey@redhat.com>
9706
9707         Fix for PR java/3417:
9708         * parse.y (patch_assignment): Added special processing for
9709         `return'.
9710         (patch_return): Don't convert booleans to integers, and don't
9711         special-case `null'.
9712
9713 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9714
9715         * config-lang.in (diff_excludes): Remove.
9716
9717 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9718
9719         * gcj.texi: Update link to GCC manual.
9720
9721 2001-12-17  Tom Tromey  <tromey@redhat.com>
9722
9723         * parse.y (link_nested_class_to_enclosing): Removed useless
9724         statement.
9725
9726 2001-12-16  Tom Tromey  <tromey@redhat.com>
9727
9728         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9729         Fixes PR java/5088.
9730
9731 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9732
9733         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9734         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9735         spelling errors.
9736
9737 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9738
9739         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9740
9741 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9742
9743         * decl.c (java_init_decl_processing): Build otable_type correctly.
9744         otable_decl is an otable_type.
9745
9746 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9747
9748         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9749         otable_type, otable_ptr_type, method_symbol_type,
9750         method_symbols_array_type, method_symbols_array_ptr_type): New
9751         field/global tree definitions.
9752         (flag_indirect_dispatch): New flag.
9753         * decl.c (java_init_decl_processing): Initialize new otable and
9754         otable_syms type nodes and decls. Add new field "index" to
9755         method_type_node.
9756         * class.c (build_method_symbols_entry): New function.
9757         (make_method_value): Set "index" to to method's vtable index for
9758         virtual methods when indirect-dispatch is not used.
9759         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9760         and set vtable_method_count to -1. Set otable and otable_syms field
9761         if indirect-dispatch is used and there was something to put in them.
9762         (build_method_symbols_entry): New function.
9763         (emit_offset_symbol_table): New function.
9764         * expr.c (get_offset_table_index): New function.
9765         (build_invokevirtual): Build array reference to otable at the index
9766         returned by get_offset_table_index, and use the result as the vtable
9767         offset.
9768         (build_invokeinterface): Similar.
9769         * jcf-parse.c (yyparse): If indirect-dispatch, call
9770         emit_offset_symbol_table at the end of compilation, after all classes
9771         have been generated.
9772         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9773         * lang.c (flag_indirect_dispatch): Define.
9774         (lang_f_options): Add indirect-dispatch flag.
9775
9776 2001-12-14  Matthias Klose  <doko@debian.org>
9777
9778         * gcj.texi: Markup for man page generation. Document missing
9779         options printed by <tool> --help.
9780         Terminate description of gij's -ms option with a dot.
9781         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9782         (java.generated-manpages java.install-man, java.uninstall,
9783         java-maintainer-clean) Updated.
9784
9785 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9786
9787         * class.c (get_dispatch_table): Fix java vtable layout
9788         for TARGET_VTABLE_USES_DESCRIPTORS.
9789         * decl.c (java_init_decl_processing): Initialize
9790         alloc_no_finalizer_node, finalize_identifier_node.
9791         * expr.c (class_has_finalize_method): New function.
9792         (expand_java_NEW): Generate calls for finalizer-free allocation.
9793         (build_invokevirtual): Fix java vtable layout for
9794         TARGET_VTABLE_USES_DESCRIPTORS.
9795         * java-tree.h (enum java_tree_index): New entries:
9796         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9797         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9798         (class_has_finalize_method): declare.
9799         (HAS_FINALIZER_P): New macro.
9800         * parse.y (patch_invoke): Generate calls for finalizer-free
9801         allocation.
9802
9803 2001-12-12  Matthias Klose  <doko@debian.org>
9804
9805         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9806         whitespace at end of line.
9807
9808 2001-12-11  Tom Tromey  <tromey@redhat.com>
9809
9810         * lex.c (java_init_lex): Define wfl_to_string as
9811         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9812
9813 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9814
9815         * class.c (make_method_value): Use null_pointer_node to
9816         represent empty exception table.
9817
9818 2001-12-10  Tom Tromey  <tromey@redhat.com>
9819
9820         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9821
9822 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9823
9824         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9825
9826 2001-12-09  Per Bothner  <per@bothner.com>
9827
9828         * check-init.c (current_switch_has_default):  New static field.
9829         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
9830         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
9831         DEFAULT_EXPR seen, simulate a default alternative that copies state.
9832
9833 2001-12-09  Tom Tromey  <tromey@redhat.com>
9834
9835         * check-init.c (check_init): Don't allow pre- or post- increment
9836         or decrement of final variable.
9837         (final_assign_error): Minor error message rewording.
9838
9839 2001-12-08  Tom Tromey  <tromey@redhat.com>
9840
9841         * java-tree.h: Fixed typo.
9842
9843         * gjavah.c (decompile_method): Don't decompile to `return this'
9844         for static methods.
9845
9846         * gjavah.c (cxx_keywords): Re-sorted.
9847         * lex.c (cxx_keywords): Re-sorted.
9848
9849         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9850         else.
9851
9852         * gjavah.c (print_namelet): Clear subnamelets.
9853         (HANDLE_METHOD): Set `method_printed' earlier.
9854
9855 2001-12-07  Tom Tromey  <tromey@redhat.com>
9856
9857         * lang.c (lang_f_options): Added
9858         optimize-static-class-initialization.
9859         (java_decode_option): Removed special case.
9860
9861 2001-12-07  Per Bothner  <per@bothner.com>
9862
9863         * check-init.c (check_init):  Fix typo freeing memory twice.
9864
9865 2001-12-05  Per Bothner  <per@bothner.com>
9866
9867         Restore support for static class initialization optimization.
9868         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9869         * check-init.c (check_int):  At end of BLOCK handle initialization
9870         blocks, which used to be done in java_complete_expand_method but did
9871         not handle the case where check_for_initialization might allocate
9872         more than a word of bits.
9873         * decl.c (lang_make_tree):  The smic field is now a tree.
9874         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
9875         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
9876
9877         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
9878
9879         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9880         Change from a hash table to a list.
9881         (struct_lang_decl):  Change field 'smic' to match.
9882         * class.c (add_method_1):  Initialize
9883         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9884         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
9885         (java_expand_method_bodies): -here, since 'smic' is now a list.
9886         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
9887
9888         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
9889
9890         * class.c (java_hash_compare_tree_node):  Fix casts.
9891
9892 2001-12-04  Per Bothner  <per@bothner.com>
9893
9894         * check-init.c:   Handle definite unassignment to finals in addition
9895         to definite assignment.
9896         (loop_current_locals):  New field.
9897         (num_current_locals, int start_current_locals, num_current_words):
9898         Make static.
9899         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
9900         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9901         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
9902         (get_variable_decl, check_final_reassigned):  New functions.
9903         (check_init, check_bool_init):  Modify as needed for checking finals.
9904         (check_for_initialization):  Take extra parameter and return void.
9905         Do extra start-up logic to check final fields for assignment.
9906         * parse.y (check_static_final_variable_assignment_flag,
9907         reset_static_final_variable_assignment_flag, check_final_assignment,
9908         check_final_variable_local_assignment_flag,
9909         reset_final_variable_indirect_assignment_flag,
9910         reset_final_variable_global_assignment_flag):  Remove functions.
9911         (java_complete_expand_methods, outer_field_access_fix,
9912         patch_assignment): Remove no-longer used logic.
9913         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
9914         * parse.y (register_fields, java_complete_tree):  Update accordingly.
9915
9916         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
9917         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
9918         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
9919
9920         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
9921
9922         * java-tree.h (DECL FINAL):  New bit-field.
9923         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
9924         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
9925         (DECL_INIT_CALLS_THIS):  New macro.
9926         (struct lang_decl):  New bit-field init_calls_this.
9927         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9928         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9929         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
9930         use it for both local variables and final fields.
9931         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
9932         and local_final.
9933         (struct lang_type):  Remove hfv bit-field.
9934         (check_for_initialization):  Change to return void.
9935
9936         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
9937         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
9938         * check-init.c (final_assign_error):  New helper function.
9939         (check_final_reassigned, check_init):  Use it.
9940         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9941
9942         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
9943         bit-fields to unsigned.
9944
9945 2001-12-03  Per Bothner  <per@bothner.com>
9946
9947         * parse.y (patch_binop):  Minor constant folding.
9948
9949         * parse.y (build_current_thisn):  Shorter 'buffer'.
9950
9951 2001-12-03  Per Bothner  <per@bothner.com>
9952
9953         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
9954         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9955         * jcf-write.c (generate_bytecode_insns):  Remove support for
9956         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9957         * check-init.c (check_init):  Likewise.
9958
9959 2001-12-03  Per Bothner  <per@bothner.com>
9960
9961         * verify.c (subroutine_nesting):  New function.
9962         (verify_jvm_instructions):  Use it to fix logic for checking that
9963         we're done with the current subroutine.
9964
9965         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9966         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9967
9968 2001-12-03  Per Bothner  <per@bothner.com>
9969
9970         * jcf.h:  Fix obvious typo in comment.
9971         * typeck.c (build_null_signature):  Add comment.
9972
9973 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9974
9975         * expr.c: Remove leading capital from diagnostic messages, as
9976         per GNU coding standards.
9977         * jcf-io.c: Similarly.
9978         * jcf-parse.c: Similarly.
9979         * jv-scan.c: Similarly.
9980         * jvspec.c: Similarly.
9981         * mangle.c: Similarly.
9982
9983 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
9984             Alexandre Petit-Bianco  <apbianco@redhat.com>
9985
9986         * expr.c (build_java_arrayaccess): Call save_expr on array for
9987         correct evaluation order, modified comment, fixed indentation.
9988         * parse.y: (patch_assignment): Correctly extract the array base
9989         from the tree generate by build_java_arrayaccess, added comments.
9990         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9991         Fixes PR java/3096, PR java/3803, PR java/3965.
9992
9993 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9994
9995         * expr.c (expand_byte_code): Remove trailing periods from messages.
9996         * jcf-parse.c (load_class, jcf_parse): Similarly.
9997         * jcf-write.c (generate_classfile): Similarly.
9998         * lex.c (java_lex): Similarly.
9999
10000 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10001
10002         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10003
10004 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10005
10006         * Make-lang.in (java.generated-manpages): New dummy target.
10007
10008 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10009
10010         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10011         ASM_FINAL_SPEC.
10012         (lang_specific_pre_link): Use set_input to set input_filename.
10013         Append `main' here.
10014         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10015         (main): Fix definition.
10016         Strip `main' from classname.
10017         Fixes PR java/227.
10018
10019 2001-11-18  Roger Sayle <roger@eyesopen.com>
10020
10021         * parse.h (java_expand_switch): Remove old prototype.
10022
10023 2001-11-18  Tom Tromey  <tromey@redhat.com>
10024
10025         Fix for PR java/1401:
10026         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10027         arg0 is null.
10028         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10029         correctly.
10030
10031 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10032
10033         * lang.c (finish_parse): Rename to java_finish.
10034         (LANG_HOOKS_FINISH, java_finish): New.
10035
10036 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10037
10038         * decl.c (init_decl_processing): Rename java_init_decl_processing.
10039         * java-tree.h: New prototype.
10040         * lang.c (java_init): Update prototype.  Combine with old init_parse.
10041
10042 2001-11-13  Tom Tromey  <tromey@redhat.com>
10043
10044         * gjavah.c (method_signature): New global.
10045         (HANDLE_METHOD): Set it.
10046         (decompile_return_statement): New function.
10047         (decompile_method): Use it.
10048         (print_method_info): Removed `synth' argument.
10049
10050 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10051
10052         * java-tree.h (java_set_yydebug): New.
10053         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10054         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10055         (print_lang_decl, print_lang_type, print_lang_identifier,
10056         print_lang_statistics, lang_print_xnode): Remove.
10057
10058 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10059
10060         * jcf-parse.c (init_lex): Remove.
10061         * lang.c (language_string, lang_identify): Remove.
10062         (struct lang_hooks): Constify.
10063         (LANG_HOOKS_NAME): Override.
10064         (init_parse): Update.
10065
10066 2001-11-08  Andreas Franck  <afranck@gmx.de>
10067
10068         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10069         program_transform_name the way suggested by autoconf.
10070         (java.install-common): Also transform auxiliary program names with
10071         program_transform_name.
10072
10073 2001-11-08  Tom Tromey  <tromey@cygnus.com>
10074
10075         * parse.y (trap_overflow_corner_case): New rule.
10076         (unary_expression): Use it.
10077         * lex.c (java_init_lex): Don't set minus_seen.
10078         (yylex): Don't use minus_seen.  Communicate overflow to parser for
10079         it to handle.
10080         (error_if_numeric_overflow): New function.
10081         * parse.h (minus_seen): Removed field.
10082         (JAVA_RADIX10_FLAG): New define.
10083
10084 2001-11-07  Tom Tromey  <tromey@redhat.com>
10085
10086         Patch for PR java/1414:
10087         * parse.y (case_label_list): New global.
10088         (goal): Register case_label_list with GC.
10089         (java_complete_lhs): Save new case on case_label_list.
10090         (patch_switch_statement): Check for duplicate case labels.
10091
10092 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10093
10094         * parse.y (patch_assignment): Removed unused third argument.
10095         (java_complete_lhs): Removed unused third argument to patch_assignment.
10096
10097 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10098
10099         * lang.c: Include langhooks-def.h.
10100         * Make-lang.in: Update.
10101
10102 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10103
10104         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10105
10106 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10107
10108         * mangle.c (find_compression_record_match): Don't match compression
10109         records for package name elements unless they occur at the start of
10110         the name. Fix for PR java/4717.
10111
10112 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10113
10114         * expr.c (expand_java_field_op): Don't special-case references to
10115         java.lang.PRIMTYPE.TYPE.
10116         (build_primtype_type_ref): Removed.
10117         * java-tree.h (build_primtype_type_ref): Remove prototype.
10118         * parse.y (maybe_build_primttype_type_ref): Removed.
10119         (complete_function_arguments): Don't special-case references to
10120         java.lang.PRIMTYPE.TYPE.
10121         (patch_assignment): Likewise.
10122         (array_constructor_check_entry): Likewise.
10123
10124 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10125
10126         * mangle.c (static tree compression_table): Fixed leading comment.
10127         * parse.h (struct parser_ctxt): Fixed field comment.
10128         * parse.y (check_pkg_class_access): New prototype, fixed leading
10129         comment, new parameter used to emit error only if passed as true.
10130         (parse_check_super): Pass extra argument to check_pkg_class_access.
10131         (do_resolve_class): Likewise.
10132         (process_imports): Likewise.
10133         (read_import_dir): Fixed indentation.
10134         (find_in_imports_on_demand): New local class_type_name. Local
10135         node_to_use deleted. while loop changed into for loop. Report
10136         multiple definition only for accessible classes. Improved error
10137         message.
10138         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10139         assigned to parameter list, fixed indentation. while loop changed
10140         into for loop, restore TREE_CHAIN on local `tem' before the next
10141         iteration.
10142
10143 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10144
10145         * lang.c (lang_get_alias_set): Deleted.
10146
10147 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10148
10149         * gjavah.c (jni_print_char): Fix thinko in last change.
10150
10151         * gjavah.c (jni_print_char, decode_signature_piece): Use
10152         safe-ctype macros and/or fold extra calls into fewer ones.
10153         * lex.c (java_read_unicode, java_lex): Likewise.
10154         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10155         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10156         * mangle_name.c (append_unicode_mangled_name,
10157         unicode_mangling_length): Likewise.
10158
10159 2001-10-17  Richard Henderson  <rth@redhat.com>
10160
10161         * Make-lang.in (java/lang.o): Depend on langhooks.h.
10162
10163 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10164
10165         * lang.c (langhooks.h): Included.
10166         (LANG_HOOKS_INIT): Redefined.
10167         (LANG_HOOKS_INIT_OPTIONS): Likewise.
10168         (LANG_HOOKS_DECODE_OPTION): Likewise.
10169         (struct lang_hooks lang_hooks): New initialization.
10170
10171 2001-10-11  Per Bothner  <per@bothner.com>
10172
10173         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
10174         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10175         The former is simpler, and jcf-write.c handles it better.
10176         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
10177         or WITH_CLEANUP_EXPR.
10178         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
10179         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10180
10181         * parse.y (patch_if_else_statement):  If the condition is constant,
10182         optimize away the test.
10183
10184 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10185
10186         * parse.y (patch_cast): Call patch_string on the first operand of
10187         the incoming node, update it if necessary. Fixes PR java/4510.
10188
10189 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10190
10191         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10192         when name qualifier matches a package name.
10193
10194 2001-10-08  Tom Tromey  <tromey@redhat.com>
10195
10196         Fix for PR java/4489:
10197         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10198         force a new label when computing `body_block'.
10199
10200 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10201
10202         * jcf-io.c (format_uint): Const-ify.
10203         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10204         * lex.c (java_get_line_col): Likewise.
10205         * parse.y (build_incdec): Likewise.
10206
10207 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10208
10209         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10210         a NULL enclosing context if appropriate. Fixes PR java/4466.
10211
10212 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10213
10214         * parse.y (patch_assignment): Use lvalue's original TYPE when
10215         building the final COMPOUND_EXPR.
10216         (try_reference_assignconv): Fixed leading comment.
10217
10218 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10219
10220         * parse.y (check_final_variable_indirect_assignment): For
10221         COMPOUND_EXPR, return only if finals were found initialized
10222         properly, if not, keep on checking.
10223         (check_final_variable_global_assignment_flag): New local
10224         error_found, set when appropriate and used to decide whether to
10225         report uninitialized finals. Fixed typo in comment.
10226
10227 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10228
10229         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10230         last three initializations. Fixes PR java/4360.
10231
10232 2001-09-21  Richard Henderson  <rth@redhat.com>
10233
10234         * class.c (get_dispatch_table): Handle function descriptors.
10235         (build_dtable_decl): Likewise.
10236         * expr.c (build_invokevirtual): Likewise.
10237
10238 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10239
10240         * parse.y (patch_method_invocation): Build class initialization
10241         when static finals are used to qualify method invocation.
10242         Fixes PR java/4366.
10243
10244 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10245
10246         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10247         build_type_name_from_array_name.
10248         (STRING_STRIP_BRACKETS): New macro.
10249         * parse.y (build_type_name_from_array_name): New function.
10250         (array_creation_expression:): Accumulate []s instead of [s.
10251         (cast_expression:): Accumulate []s instead of [s after cast type
10252         name.
10253         (build_array_from_name): Local string deleted, use
10254         build_type_name_from_array_name.
10255         (build_unresolved_array_type): Accumulate []s instead of [s after
10256         type name.
10257         (register_fields): Fixed comment.
10258         (resolve_class): Local name, base deleted, new locals tname and
10259         array_dims. Use build_type_name_from_array_name. Use array_dims to
10260         build array type.
10261         (purify_type_name): Use STRING_STRIP_BRACKETS.
10262
10263 2001-09-18  Andreas Jaeger  <aj@suse.de>
10264
10265         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10266         * jv-scan.c: Likewise.
10267
10268 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10269
10270         * parse.y (patch_method_invocation): Inner class creation context
10271         check not enforced within constructors. Fixes PR java/1873.
10272
10273 2001-09-16  Tom Tromey  <tromey@redhat.com>
10274
10275         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10276         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10277
10278 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10279
10280         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10281         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10282         (struct lang_type): New fields import_list and import_demand_list.
10283         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10284         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10285         (do_resolve_class): New local saved_enclosing_type, initialized,
10286         passed as parameter to find_in_imports and find_in_imports_on_demand.
10287         (find_in_imports): Added paramater enclosing_type, use its
10288         TYPE_IMPORT_LIST when applicable.
10289         (find_in_imports_on_demand): Added parameter enclosing_type, use
10290         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10291         declaration and initialization.
10292         (fold_constant_for_init): Switch/restore current_class to the
10293         appropriate context.
10294
10295 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10296
10297         * verify.c (verify_jvm_instructions): Fix typo.
10298
10299 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10300
10301         * expr.c (expand_invoke): Const-ification.
10302         * parse.y (patch_method_invocation): Likewise.
10303
10304 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10305
10306         * gjavah.c (cxx_keywords): Const-ification.
10307         * keyword.gperf (java_keyword): Likewise.
10308         * lang.c (java_tree_code_name): Likewise.
10309         * lex.c (cxx_keywords): Likewise.
10310         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10311
10312 2001-09-11  Richard Henderson  <rth@redhat.com>
10313
10314         * parse.h (ctxp_for_generation): Mark extern.
10315
10316 2001-09-10  Richard Henderson  <rth@redhat.com>
10317
10318         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10319
10320 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10321
10322         * typeck.c (java_array_type_length, build_prim_array_type):
10323         Represent empty arrays by NULL index.
10324
10325 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10326
10327         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10328         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10329
10330 2001-09-06  Anthony Green  <green@redhat.com>
10331
10332         * class.c (O_BINARY): Define if necessary.
10333         (registerResource_libfunc): Declare.
10334         (init_class_processing): Initilize registerResource_libfunc.
10335         (compile_resource_file): New function.
10336         * java-tree.h (resource_name): Declare.
10337         (compile_resource_file): Declare.
10338         * jcf-parse.c (yyparse): Handle compiling java resource files.
10339         * lang.c (java_decode_option): Handle -fcompile-resource option.
10340         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10341         resource files.
10342         * gcj.texi (Code Generation): Add documentation for -R flag.
10343
10344 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10345
10346         * jcf-write.c (generate_classfile): Issue an error in case of
10347         field/initial value mismatch.
10348         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10349         being initialized and we're generating bytecode.
10350         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10351         set DECL_INITIAL properly when appropriate.
10352         Fixes PR java/4230
10353         Fixes PR java/4204
10354
10355 2001-09-01  Per Bothner  <per@bothner.com>
10356
10357         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10358         relevant.  All initializers except static final and constant require
10359         <clinit>, regardless of flag_emit_class_files.
10360
10361 2001-08-31  Per Bothner  <per@bothner.com>
10362
10363         * class.c (set_constant_value):  When not emitting class files, then a
10364         String ConstantValue is a utf8const_ptr_type.
10365
10366 2001-08-30  Per Bothner  <per@bothner.com>
10367
10368         * jcf-write.c (generate_classfile):  Check that field is primitive
10369         or string before emitting ConstantValue attribute.
10370
10371 2001-08-30  Per Bothner  <per@bothner.com>
10372
10373         * parse.y (resolve_qualified_expression_name):  If creating a
10374         COMPOUND_EXPR, set it's type correctly.
10375
10376 2001-08-30  Per Bothner  <per@bothner.com>
10377
10378         * jcf-io.c (open_class):  Set filename field.
10379
10380         * jcf-parse,c (parse_class_file):  Set current_function_decl
10381         for better error message when Code attribute is missing.
10382
10383         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10384         better diagnostics, especially for constructors.
10385
10386 2001-08-30  Per Bothner  <per@bothner.com>
10387
10388         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10389         attribute if field is not final, for compatibility with jdk.
10390
10391         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10392         to correct type.  Work-around for front-end bug.
10393         * class.c (set_constant_value):  Error if constant has wrong type.
10394
10395 2001-08-30  Per Bothner  <per@bothner.com>
10396
10397         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10398         "Double" are printed at verbosity 1.
10399
10400         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10401
10402         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10403
10404 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10405
10406         * parse.y (patch_assignment): Don't verify final re-assignment here.
10407         (java_complete_lhs): Verify assignments to finals calling
10408         patch_assignment. Verify re-assignments to finals before calling
10409         patch_assignment.
10410
10411 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10412
10413         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10414         Fixes PR java/1413
10415
10416 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10417
10418         * lex.c (java_lex): new local found_hex_digits. Set and then used
10419         in test to reject invalid hexadecimal numbers.
10420         * parse.y (java_complete_tree): Prevent unwanted cast with
10421         initialized floating point finals.
10422         (patch_binop): Emit a warning when detecting a division by zero,
10423         mark result not constant, don't simplify non integer division.
10424
10425 2001-08-28  Per Bothner  <per@bothner.com>
10426
10427         * jcf-write.c  (generate_bytecode_insns):  For increments and
10428         decrements just recurse to push constant.  Improvement on Mark's patch.
10429
10430 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10431
10432         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10433         real conversion for increments and decrements of reals.
10434
10435 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10436
10437         * parse.y (resolve_qualified_expression_name): Handle unresolved
10438         qualified expressions, prevent numerical qualifiers, fixed typo.
10439         Fixes PR java/4141
10440
10441 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10442
10443         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10444         don't report anything but deprecated class when marked so. Handle
10445         VAR_DECL.
10446         (patch_method_invocation): Check deprecation on methods and types.
10447         (patch_binop): code becomes an enum tree_code, added default: to
10448         switch to handle that. Detect division by zero, try to fold and
10449         return before using a subroutine.
10450
10451 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10452
10453         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10454         file smaller than 4 bytes.
10455         * parse.y (check_inner_circular_reference): New function.
10456         (check_circular_reference): Likewise.
10457         (array_initializer:): Accept {,}.
10458         (java_check_circular_reference): Rewritten using
10459         check_circular_reference and check_inner_circular_reference.
10460         (java_complete_expand_method): Unconditionally save and restore
10461         the unpurged exception list.
10462         (build_dot_class_method_invocation): Unmangle signature parameter.
10463
10464 2001-08-21  Tom Tromey  <tromey@redhat.com>
10465
10466         * decl.c (init_decl_processing): Add `throws' field to method
10467         descriptor.
10468         * class.c (make_method_value): Compute `throws' field for method.
10469
10470 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10471
10472         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10473         circularity is detected.
10474         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10475
10476 2001-08-17  Richard Henderson  <rth@redhat.com>
10477
10478         * class.c (emit_register_classes): Add align parameter to
10479         call to assemble_integer.
10480
10481 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10482
10483         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10484         loading a class_or_name fails, try considering an innerclass name
10485         and load the enclosing context.
10486         * parse.y (resolve_inner_class): New function.
10487         (find_as_inner_class): Added leading comment.
10488         (register_incomplete_type): Keep the current context as enclosing
10489         context for JDEP_FIELD dependencies.
10490         (do_resolve_class): Locals new_class_decl and super initialized to
10491         NULL. Call resolve_inner_class, explore the enclosing context
10492         superclass if necessary.
10493         Fixes PR java/4007
10494
10495 2001-08-16  Tom Tromey  <tromey@redhat.com>
10496
10497         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10498         * gjavah.c (main): Updated for change to jcf_path_seal.
10499         * lang.c (version_flag): New global.
10500         (java_decode_option): Recognize `-version'.
10501         (java_init): Update for change to jcf_path_seal.
10502         * jcf.h (jcf_path_seal): Added `print' argument.
10503         * jcf-path.c (jcf_path_seal): Added `print' argument.
10504
10505 2001-08-13  Zack Weinberg  <zackw@panix.com>
10506
10507         * Make-lang.in (java/decl.o): Update dependencies.
10508         * decl.c: Include libfuncs.h, don't include toplev.h.
10509
10510 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10511
10512         * decl.c (init_decl_processing): exception_type_node,
10513         class_not_found_type_node, and no_class_def_found_type_node
10514         initialized. predef_filenames augmented accordingly.
10515         instinit_identifier_node initialized.
10516         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10517         * java-tree.h (enum java_tree_index): New entries
10518         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10519         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10520         (exception_type_node): New macro.
10521         (class_not_found_type_node): Likewise.
10522         (no_class_def_found_type_node): Likewise.
10523         (instinit_identifier_node): Likewise.
10524         (PREDEF_FILENAMES_SIZE): Adjusted.
10525         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10526         (struct lang_type): Fixed typo in bitfield name.
10527         (DECL_INSTINIT_P): New macro.
10528         (ID_INSTINIT_P): Likewise.
10529         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10530         attribute.
10531         * parse.y (encapsulate_with_try_catch): New function.
10532         (generate_instinit): Likewise.
10533         (build_instinit_invocation): Likewise.
10534         (ctors_unchecked_throws_clause_p): Likewise.
10535         (add_instance_initializer): Deleted.
10536         (build_instance_initializer): Likewise.
10537         (in_instance_initializer): Likewise.
10538         (check_method_redefinition): instinit$ not to be verified.
10539         (java_complete_expand_methods): Generate instinit$, simplified code.
10540         (build_dot_class_method): Eliminated unnecessary locals. Use
10541         encapsulate_with_try_catch, removed unnecessary code.
10542         (fix_constructors): New local iii. Use build_instinit_invocation.
10543         (patch_method_invocation): Added comment.
10544         (maybe_use_access_method): Don't consider instinit$.
10545         (find_applicable_accessible_methods_list): Shorten the search for
10546         instinit$ too.
10547         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10548         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10549         (patch_throw_statement): Likewise. Fixed typo.
10550
10551 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
10552
10553         Revert:
10554         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10555         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10556         ASM_FINAL_SPEC.
10557         (lang_specific_pre_link): Use set_input to set input_filename.
10558         Append `main' here.
10559         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10560         (main): Fix definition.
10561         Strip `main' from classname.
10562         Fixes PR java/227.
10563
10564 2001-08-11  Zack Weinberg  <zackw@panix.com>
10565
10566         * lex.h: Don't include setjmp.h.  Don't define
10567         SET_FLOAT_HANDLER or prototype set_float_handler.
10568
10569 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10570
10571         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10572         `poplevel' in the right order.
10573
10574 2001-08-09  Richard Henderson  <rth@redhat.com>
10575
10576         * Make-lang.in (class.o): Depend on TARGET_H.
10577         * class.c (emit_register_classes): Use target hooks instead of
10578         assemble_constructor and assemble_destructor.
10579
10580 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
10581
10582         * check-init.c (flags.h): Include
10583         (check_init): Don't report uninitialized static class
10584         initialization flags, don't free bit index when doing static class
10585         initialization optimization.
10586         (check_for_initialization): Return type changed to `unsigned int.'
10587         (attach_initialized_static_class): New function.
10588         * class.c (add_method_1): Create the initialized static class
10589         table if necessary.
10590         (finish_class): Always emit deferred inline methods.
10591         * decl.c (emit_init_test_initialization): Moved to expr.c
10592         (complete_start_java_method): Don't traverse
10593         DECL_FUNCTION_INIT_TEST_TABLE.
10594         (lang_mark_tree): Mark hash tables in function decls.
10595         * expr.c (emit_init_test_initialization): Moved from decl.c.
10596         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10597         initialization flag, set DECL_CONTEXT and
10598         LOCAL_CLASS_INITIALIZATION_FLAG.
10599         (java_lang_expand_expr): Emit initialization code for static class
10600         initialized flags when entering block, if necessary.
10601         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10602         * java-tree.h (flag_optimize_sci): New global variable declaration.
10603         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10604         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10605         (LOCAL_FINAL_P): Fixed typo in comment.
10606         (FINAL_VARIABLE_P): Likewise.
10607         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10608         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10609         (struct lang_decl): New fields `ict', `smic' and `cif.'
10610         (check_for_initialization): New returned value for global.
10611         (attach_initialized_static_class): New global function.
10612         (STATIC_CLASS_INIT_OPT_P): New macro.
10613         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10614         * lang.c (java_decode_option): Handle
10615         `-fno-optimize-static-class-initialization'
10616         * parse.y (start_complete_expand_method): New function.
10617         (java_expand_method_bodies): Likewise.
10618         (attach_init_test_initialization_flags): Likewise.
10619         (adjust_init_test_initialization): Likewise.
10620         (emit_test_initialization): Likewise.
10621         (java_complete_expand_methods): Nullify abstract and native method
10622         bodies.
10623         (java_complete_expand_method): New locals `fbody', `block_body'
10624         and `exception_copy.' Reorganized: directly return on empty method
10625         bodies, call `start_complete_expand_method', remember definitely
10626         initialized static class in function, don't expand method bodies.
10627         (java_expand_classes): Call `java_expand_method_bodies' before
10628         `finish_class' when compiling to native.
10629         (resolve_expression_name): Use `orig' after building outer class
10630         field access.
10631         (patch_invoke): Remember static method invocations.
10632
10633 2001-08-06  Richard Henderson  <rth@redhat.com>
10634
10635         * class.c (emit_register_classes): Pass a symbol_ref and priority
10636         to assemble_constructor.
10637
10638 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
10639
10640         * java-tree.h (all_class_filename): New macro.
10641         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10642         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10643         newly created IDENTIFIER_NODE to `all_class_filename.'
10644
10645 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
10646
10647         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10648         Use ggc_add_tree_root to register roots.
10649
10650 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10651
10652         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10653         second operand calling check_init.
10654         * decl.c (complete_start_java_method): Swaped second and third
10655         arguments while creating WITH_CLEANUP_EXPR node.
10656         * jcf-write.c (generate_bytecode_insns): Use second operand
10657         instead of third when handling WITH_CLEANUP_EXPR.
10658         * parse.y (java_complete_lhs): Expand second operand of
10659         WITH_CLEANUP_EXPR nodes.
10660         (patch_synchronized_statement): Swaped second and third arguments
10661         while creating WITH_CLEANUP_EXPR node.
10662
10663 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
10664
10665         * parse.y (create_interface): Avoid cyclic inheritance report when
10666         syntax error encountered during class definition.
10667         Fixes PR java/2956
10668
10669 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10670
10671         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10672         ASM_FINAL_SPEC.
10673         (lang_specific_pre_link): Use set_input to set input_filename.
10674         Append `main' here.
10675         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10676         (main): Fix definition.
10677         Strip `main' from classname.
10678         Fixes PR java/227.
10679
10680 2001-07-18  Tom Tromey  <tromey@redhat.com>
10681
10682         For PR java/2812:
10683         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10684         * lex.c (java_new_lexer): Use ICONV_CONST.
10685         (java_read_char): Likewise.
10686         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10687         (jv-scan$(exeext)): Likewise.
10688
10689 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10690
10691         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10692         * parse.y (check_class_interface_creation): Allow `private' if the
10693         enclosing is not an interface.
10694         (create_interface): Interface tagged public if the enclosing
10695         context is an interface.
10696         (create_class): Class tagged public if the enclosing context
10697         is an interface.
10698         Fixes PR java/2959
10699
10700 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10701
10702         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10703         Fixes PR java/2665
10704
10705 2001-07-14  Tim Josling  <tej@melbpc.org.au>
10706
10707         * check-init.c (check_init): Remove references to EXPON_EXPR.
10708
10709 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10710
10711         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10712         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10713         Fixes PR java/3602
10714
10715 2001-07-13  Tom Tromey  <tromey@redhat.com>
10716
10717         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10718         invocation.
10719
10720 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10721
10722         * parse.y (patch_method_invocation): Don't override primary if one
10723         is already provided, but let this$<n> be built. Fixed comment.
10724
10725 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10726
10727         * parse.y (empty_statement:): Report empty statement error only
10728         when found at class declaration level.
10729         Fixes PR java/3635
10730
10731 2001-07-12  Tom Tromey  <tromey@redhat.com>
10732
10733         * expr.c (expand_load_internal): New function.
10734         (LOAD_INTERNAL): Use it.
10735
10736 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10737
10738         * parse.y (verify_constructor_super): Compare anonymous class ctor
10739         args with `valid_method_invocation_conversion_p.'
10740         Fixes PR java/3285
10741
10742 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10743
10744         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10745         `-fsyntax-only.' Fixes PR java/3248
10746
10747 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10748
10749         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10750
10751 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10752
10753         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10754         current function is static. Fixes PR java/1970
10755
10756 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10757
10758         * parse.y (patch_method_invocation): Add enclosing context to ctor
10759         calls if necessary. Fixes PR java/2953
10760
10761 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10762
10763         * parse.y (resolve_package): Abort if qualified expression member
10764         isn't right.
10765         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10766         Fixes PR java/1391
10767
10768 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10769
10770         * verify.c: Don't use // comments.
10771
10772 2001-07-05  Tom Tromey  <tromey@redhat.com>
10773
10774         * lang.c (flag_assume_compiled): Removed.
10775         * java-tree.h (flag_assume_compiled): Removed.
10776         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10777         -fhash-synchronization, -fuse-divide-subroutine,
10778         -fcheck-references, -femit-class-file, -femit-class-files,
10779         -fassume-compiled.  Updated --encoding information.  Changed
10780         -foutput-class-dir to `-d'.
10781
10782 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10783
10784         * jcf-parse.c (parse_class_file): Add lineno parameter to
10785         debug_start_source_file call.
10786
10787 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10788
10789         * gcj.texi: Use gpl.texi.
10790         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10791         dependencies and use doc/include in search path.
10792
10793 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10794
10795         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10796         `this'.  If so, don't build instance initializers.
10797
10798 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10799
10800         * parse.y (resolve_expression_name): Improved error message for
10801         inner class cases. Fixes PR java/1958
10802
10803 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10804
10805         * lang.c: #include diagnostic.h
10806         (lang_print_error): Add a `diagnostic_context *' parameter.
10807         (java_dummy_print): Likewise.
10808         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10809
10810 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10811
10812         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10813         * jcf.h (typedef struct JCF): New bitfield `finished.'
10814         (JCF_FINISH): Set `finished.'
10815         (JCF_ZERO): Reset `finished.'
10816         Fixes PR java/2633
10817
10818 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10819
10820         * parse.y (class_body_declaration:): Don't install empty instance
10821         initializers.
10822         Fixes PR java/1314
10823
10824 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10825
10826         * class.c (set_super_info): Call `set_class_decl_access_flags.'
10827         (set_class_decl_access_flags): New function.
10828         * java-tree.h (set_class_decl_access_flags): New prototype.
10829         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10830         (parse_class_file): New local `decl_max_locals.' Take wide types
10831         into account to compute DECL_MAX_LOCALS.
10832         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10833         imports on demand.
10834
10835 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
10836
10837         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10838
10839 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10840
10841         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10842         * parse.y (do_resolve_class): Moved comments out to leading comment
10843         section. Removed local `start', New local `_ht' and
10844         `circularity_hash.'  Record `enclosing' in hash table and search
10845         it to detect circularity.  Use `enclosing' as an argument to
10846         `lookup_cl.' Free the hash table when done.
10847
10848 2001-06-19  Tom Tromey  <tromey@redhat.com>
10849
10850         * lex.c (java_read_char): Disallow invalid and overlong
10851         sequences.  Fixes PR java/2319.
10852
10853 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
10854
10855         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10856
10857 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10858
10859         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10860         arguments accordingly.
10861
10862 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10863
10864         * gcj.texi: Move contents to just after title page.
10865
10866 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
10867
10868         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10869         builtin type.
10870         (patch_incomplete_class_ref): Build the class ref, build the class
10871         init if necessary, complete the tree.
10872         Fixes PR java/2605
10873
10874 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10875
10876         * parse.y (lookup_field_wrapper): Test `name' code.
10877         (resolve_qualified_expression_name): Test `qual_wfl' code.
10878         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10879         handle `qual_wfl' by code.
10880         (maybe_build_primttype_type_ref): Test `wfl' code.
10881
10882 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10883
10884         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10885         fdl.texi.
10886         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
10887         the dvi file in the java directory.
10888
10889 2001-05-25  Sam TH  <sam@uchicago.edu>
10890
10891         * gen-table.pl javaop.h jcf.h lex.h,
10892         parse.h: Fix header include guards.
10893
10894 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
10895
10896         * jv-scan.c (version): Update copyright year.
10897
10898 2001-05-21  Per Bothner  <per@bothner.com>
10899
10900         * jcf-parse.c (read_class):  If class is from .class or .zip file
10901         and it's already been read, don't push/pop parser context.
10902
10903 2001-05-18  Per Bothner  <per@bothner.com>
10904
10905         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
10906         command line so the jvgenmain-generated main program comes first.
10907
10908 2001-05-15  Tom Tromey  <tromey@redhat.com>
10909
10910         * class.c (build_utf8_ref): Don't generate identifier based on
10911         utf8const contents.
10912
10913 2001-05-12  Richard Henderson  <rth@redhat.com>
10914
10915         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10916         * expr.c (java_lang_expand_expr): Expand it.
10917         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10918         calling build_exception_object_ref.
10919         * parse.y (catch_clause_parameter): Likewise.
10920         (build_dot_class_method): Likewise.
10921         (try_reference_assignconv): Likewise.
10922         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10923         * jcf-write.c (generate_bytecode_insns): Likewise.
10924
10925 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10926
10927         * parse.y (build_unresolved_array_type): Set
10928         EXPR_WFL_QUALIFICATION on the newly created wfl.
10929         Fixes PR java/2538. Fixes PR java/2535.
10930
10931 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10932
10933         * parse.y (fix_constructors): Removed unnecessary assignment to
10934         local. Moved assignment to `this$<n>', fixed comments and
10935         indentation.
10936         (build_wfl_wrap): Fixed indentation.
10937         Fixes PR java/2598, java/2579 and java/2658.
10938
10939 2001-05-03  Mo DeJong  <mdejong@redhat.com>
10940
10941         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10942         check for byte swap.
10943
10944 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
10945
10946         * expr.c (build_class_init): Move MODIFY_EXPR
10947         outside of COND_EXPR.  Remove variable `call'.
10948
10949 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10950
10951         * decl.c: NULL_PTR -> NULL.
10952         * jcf-write.c: Likewise.
10953
10954 2001-05-01  Tom Tromey  <tromey@redhat.com>
10955
10956         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10957         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10958         * gcj.texi: Updated copyright text.  Include fdl.texi.
10959         (Top): Link to new node.
10960
10961 2001-05-01  Per Bothner  <per@bothner.com>
10962
10963         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
10964
10965 2001-05-01  Per Bothner  <per@bothner.com>
10966
10967         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
10968         import_list contains the name, not the TREE_PURPOSE.
10969
10970 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10971
10972         * jcf-io.c (read_zip_member): Cast to long in comparison with
10973         signed value.
10974
10975         * jvspec.c (lang_specific_driver): Initialize variables.
10976
10977         * mangle.c (find_compression_record_match): Likewise.
10978
10979         * typeck.c (build_null_signature): Provide static prototype.  Mark
10980         parameter with ATTRIBUTE_UNUSED.
10981
10982         * verify.c (verify_jvm_instructions): Initialize variable.
10983
10984 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10985
10986         * parse.y (do_resolve_class): Check for cyclic inheritance during
10987         inner class resolution.
10988
10989 2001-04-27  Per Bothner  <per@bothner.com>
10990
10991         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
10992         while iterating, since that could cause gc to lose stuff.
10993
10994 2001-04-26  Per Bothner  <per@bothner.com>
10995
10996         Fix method search wrt scope of inner classes to match JLS2.
10997         * typeck.c (build_null_signature):  New static function.
10998         (has_method):  New function.  Uses build_null_signature and lookup_do.
10999         * java-tree.h (has_method):  New declaration.
11000         * parse.y (find_applicable_accessible_methods_list):  Do not search
11001         context of inner classes here.
11002         (patch_method_invocation):  Search scope, ie. current and outer clases,
11003         for method matching simple name, to find class.
11004
11005 2001-04-26  Per Bothner  <per@bothner.com>
11006
11007         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11008         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
11009
11010         * constants.c (find_methodref_with_class_index):  New function.
11011         (find_methodref_index):  Use find_methodref_with_class_index.
11012         * java-tree.h (find_methodref_with_class_index):  New declaration.
11013         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
11014         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11015         If context changed from interface to class, don't use invokeinterface.
11016
11017 2001-04-25  Per Bothner  <per@bothner.com>
11018
11019         * verify.c (verify_jvm_instructions):  For field instructions,
11020         check that field index is valid.  For invoke instructions, check that
11021         method index is valid.
11022
11023 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
11024
11025         * config-lang.in (target_libs): Copy from $libgcj_saved.
11026
11027 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11028
11029         * decl.c (init_decl_processing): Add new class "protectionDomain"
11030         field.
11031         * class.c (make_class_data): Set initial value for "protectionDomain".
11032
11033 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11034
11035         * jvspec.c (lang_specific_driver): Fix memory allocation
11036         deficit, by using concat in lieu of xmalloc/sprintf.
11037
11038 2001-04-20  Per Bothner  <per@bothner.com>
11039
11040         Fixes to compile multiple .class files at once.
11041         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
11042         * java-tree.h (CLASS_PARSED_P):  New macro.
11043         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11044         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
11045         (read_class):  Avoid some code duplication.
11046         Don't call JCF_FINISH for a .class file - might be needed later.
11047         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
11048         rather than CLASS_LOADED_P, since latter implies class laid out.
11049         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
11050         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
11051
11052 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11053
11054         * Make-lang.in (java/boehm.o): Depend on toplev.h.
11055
11056         * boehm.c: Include toplev.h.
11057
11058 2001-04-06  Tom Tromey  <tromey@redhat.com>
11059             Alexandre Petit-Bianco  <apbianco@redhat.com>
11060
11061         Fix for PR gcj/1404 and PR gcj/2332:
11062         * parse.y (build_array_from_name): If we use the type_wfl then
11063         accumulate dimensions from the original type as well.
11064         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11065
11066 2001-04-06  Tom Tromey  <tromey@redhat.com>
11067
11068         * parse.y (analyze_clinit_body): Return true if the second operand
11069         of a METHOD_EXPR is nonzero.
11070
11071 2001-04-06  Tom Tromey  <tromey@redhat.com>
11072
11073         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11074         directory.
11075         ($(srcdir)/java/parse.c): Likewise.
11076
11077 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
11078
11079         * gcj.texi: Use `which-gcj' instead of `which-g77.'
11080         (version-gcc): Initialized.
11081         (which-gcj): Likewise.
11082
11083 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11084
11085         * java-tree.h (struct lang_decl): New macro
11086         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11087         * parse.y (build_instance_initializer): New function.
11088         (add_instance_initializer): Use it.
11089         (java_fix_constructors): Set `current_class' before fix pass.
11090         (fix_constructors): Just return if already fixed. Move `super()'
11091         invocation ahead. Use `build_instance_initializer.'
11092         Fixes PR java/1315.
11093
11094 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
11095
11096         * parse.y (resolve_qualified_expression_name): Pass field's
11097         DECL_CONTEXT to `not_accessible_p.'
11098         (not_accessible_p): Changed parameters order in `inherits_from_p'
11099         invocation.
11100
11101 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
11102
11103         * lang-options.h: Add flag_check_references.
11104
11105 2001-04-04  Per Bothner  <per@bothner.com>
11106
11107         * java-tree.h (CONSTANT_VALUE_P):  New macro.
11108         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
11109         * parse.y (maybe_build_class_init_for_field):  New static function.
11110         (resolve_expression_name, resolve_field_access):  Use
11111         maybe_build_class_init_for_field instead of build_class_init
11112         This does not do the init if the field is compile-time-constant.
11113         (resolve_field_access):  Simplify.
11114
11115         * parse.y (fold_constant_for_init):  Merge test into switch.
11116
11117 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
11118
11119         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11120         on gansidecl.h.
11121         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11122
11123 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
11124
11125         * expr.c (pop_type_0): Save the result of the first
11126         lang_printable_name call in a scratch buffer, so it
11127         won't be clobbered by the second call.
11128
11129 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
11130
11131         * parse-scan.y (array_type:): Rewritten.
11132         (type_declaration:): `empty_statement' replaces `SC_TK.'
11133         (class_member_declaration:): `empty statement' added.
11134         (method_body:): Simplified.
11135         (static_initializer:): Likewise.
11136         (primary_no_new_array:): Use `type_literals.'
11137         (type_literals:): New rule.
11138         (dims:): Set and update `bracket_count.'
11139         Fixes PR java/1074. Fixes PR java/2412.
11140
11141 2001-03-28  Hans Boehm  <boehm@acm.org>
11142
11143         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11144         (get_boehm_type_descriptor): Set type on returned value to be a
11145         pointer length integer.
11146
11147 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11148
11149         * expr.c (pop_type_0): Call `concat' rather than building the
11150         string manually.
11151         (pop_type): Add format specifier in call to `error'.
11152
11153         * parse.y (patch_method_invocation): Avoid casting away
11154         const-ness.
11155
11156 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
11157
11158         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11159
11160 2001-03-28  Richard Henderson  <rth@redhat.com>
11161
11162         IA-64 ABI Exception Handling:
11163         * Make-lang.in (except.o): Don't depend on eh-common.h.
11164         * check-init.c (check_init): Handle EXC_PTR_EXPR.
11165         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11166         [soft_exceptioninfo_call_node]: Remove.
11167         [eh_personality_libfunc, lang_eh_runtime_type]: New.
11168         (end_java_method): No emit_handlers.
11169         * except.c (java_set_exception_lang_code): Remove.
11170         (method_init_exceptions): Don't call it.
11171         (prepare_eh_table_type): No CATCH_ALL_TYPE.
11172         (build_exception_object_ref): New.
11173         (expand_end_java_handler): Update for except.h name changes.
11174         (emit_handlers, expand_resume_after_catch): Remove.
11175         * expr.c (java_lang_expand_expr): Update for except.h name changes.
11176         (process_jvm_instruction): Use build_exception_object_ref.
11177         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11178         (soft_exceptioninfo_call_node): Remove.
11179         (build_exception_object_ref): Declare.
11180         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11181         soft_exceptioninfo_call_node.  Move processing ...
11182         [EXC_PTR_EXPR]: ... here.
11183         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11184         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11185         (source_end_java_method): No java_set_exception_lang_code or
11186         emit_handlers.
11187         (build_dot_class_method): Use build_exception_object_ref.
11188         (try_reference_assignconv): Check EXC_PTR_EXPR not
11189         soft_exceptioninfo_call_node.
11190
11191 2001-03-28  Richard Henderson  <rth@redhat.com>
11192
11193         * java-tree.h (throw_node): Define as a single member of
11194         java_global_trees instead of a separate array.
11195         (JTI_THROW_NODE): New.
11196         * decl.c (throw_node): Don't declare.
11197         (init_decl_processing): Init a scalar throw_node.
11198         Don't register it for gc.
11199         * check-init.c (check_init): Reference scalar throw_node.
11200         * expr.c (build_java_athrow): Likewise.
11201         * jcf-write.c (generate_bytecode_insns): Likewise.
11202         * parse.h (BUILD_THROW): Likewise.
11203
11204 2001-03-28  Richard Henderson  <rth@redhat.com>
11205
11206         * decl.c (end_java_method): Do not save and restore
11207         flag_non_call_exceptions.
11208         * parse.y (source_end_java_method): Likewise.
11209         * lang.c (flag_exceptions): Don't declare.
11210         (java_init_options): Set flag_non_call_exceptions.  Set
11211         flag_exceptions here ...
11212         (java_init): ... not here.
11213
11214 2001-03-27  Richard Henderson  <rth@redhat.com>
11215
11216         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11217         exceptions_via_longjmp.
11218
11219         * lang.c (flag_new_exceptions): Don't declare it.
11220         (java_init_options): Or set it.
11221
11222 2001-03-27  Richard Henderson  <rth@redhat.com>
11223
11224         * decl.c (end_java_method): Rename asynchronous_exceptions to
11225         flag_non_call_exceptions.
11226         * parse.y (source_end_java_method): Likewise.
11227
11228 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11229
11230         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11231
11232 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11233
11234         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11235
11236 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11237
11238         * parse.y (find_as_inner_class): Follow current package
11239         indications not to mistakingly load an unrelated class.
11240
11241 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11242
11243         * constants.c (PUTN): Use memcpy, not bcopy.
11244
11245         * lex.c (java_read_char): Use memmove, not bcopy.
11246
11247         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11248
11249 2001-03-23  Per Bothner  <per@bothner.com>
11250
11251         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11252         macro for better error pin-pointing.
11253         * java-tree.h:  Fix typo in comment.
11254
11255         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11256         Don't include jsr/goto in exception range.
11257         Check if start and end of exception range are the same (also TRY_EXPR).
11258         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11259         However, do emit the following goto even if try_block is empty.
11260         Defer freeing exception_decl until after the finalizer, to make
11261         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11262
11263         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11264         return the finally-clause and vice versa.
11265
11266 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11267
11268         * gcj.texi (Input Options): documented the check for attribute
11269         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11270         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11271         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11272         (jcf_parse): Check for the right classes archive if necessary.
11273         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11274         (jcf_parse_fields): Fixed indentation.
11275         * jcf-write.c (append_gcj_attribute): New function.
11276         (generate_classfile): Compute the attribute count, invoke
11277         `append_gcj_attribute'.
11278         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11279         turned into bit-fields. New bit-field `right_zip.'
11280         (JCF_ZERO): Set `right_zip' to zero.
11281         * lang-options.h (-fforce-classes-archive-check): Added flag.
11282         * lang.c (flag_force_classes_archive_check): New flag.
11283         (lang_f_options): New entry `force-classes-archive-check.'
11284         Fixes PR java/1213.
11285
11286 2001-02-07  Andrew Haley  <aph@redhat.com>
11287
11288         * gcj.texi (Configure-time Options): Add -fcheck-references.
11289         * expr.c (build_java_indirect_ref): New function.
11290         (java_check_reference): New function.
11291         (build_java_array_length_access): Use build_java_indirect_ref to
11292         check for null references.
11293         (build_java_arrayaccess): Likewise.
11294         (build_get_class): Likewise.
11295         (build_field_ref): Likewise.
11296         (invoke_build_dtable): Likewise.
11297         (build_invokeinterface): Likewise.
11298         * lang.c (lang_f_options): Add flag_check_references.
11299         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11300         * java-tree.h (flag_check_references): New variable.
11301         * lang.c (flag_check_references): Likewise.
11302         * parse.y (patch_invoke): Use java_check_reference.
11303         (patch_assignment): Allow for extra nesting in
11304         _Jv_CheckArrayStore.
11305
11306 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11307
11308         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11309         * lex.c (cxx_keywords): Likewise.
11310
11311 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11312
11313         * parse.y (qualify_ambiguous_name): Broaden `length'
11314         recognition. Help MODIFY_EXPR be resolved as expression names.
11315         Fixes PR java/2066. Fixes PR java/2400.
11316
11317 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11318
11319         * gjavah.c (process_file): Mark interface definitions with
11320         "__attribute__ ((java_interface))".
11321
11322 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11323
11324         * class.c (layout_class): Fixed push_super_field's second
11325         argument. Fixes PR java/2333.
11326         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11327         too early to lay innerclasses out.
11328
11329 2001-03-20  Tom Tromey  <tromey@redhat.com>
11330             Alexandre Petit-Bianco <apbianco@redhat.com>
11331
11332         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11333         inside an array reference. Insertion of the array store check
11334         rewritten. Fixes PR java/2299.
11335
11336 2001-03-20  Tom Tromey  <tromey@redhat.com>
11337
11338         * lex.c (java_read_unicode): Only accept leading `u's.
11339
11340 2001-03-20  Tom Tromey  <tromey@redhat.com>
11341
11342         * jcf-parse.c (read_class): Initialize `class'.
11343
11344 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11345
11346         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11347
11348 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11349
11350         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11351         (layout_class): Likewise.
11352         (layout_class_method): Likewise.
11353         (emit_register_classes): Likewise.
11354         * decl.c (builtin_function): Likewise.
11355         (give_name_to_locals): Likewise.
11356
11357 2001-03-19  Per Bothner  <per@bothner.com>
11358
11359         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11360         before trying to load an inner class.
11361
11362         Fixes to process to command-line .class files in two passes.
11363         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11364         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11365         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11366         * class.c (is_compiled_class):  Fix for renamed flag.
11367         * parse.y (maybe_create_class_interface_decl):  Likewise.
11368         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11369         * jcf-parse.c (read_class);  Read current_class.
11370         (jcf_parse):  Make static.
11371         (load_inner_classes):  New function, with code moved from jcf_parse,
11372         because we need to inner classes after the command-line files are read.
11373         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11374         Reduce use of main_jcf (basically only for archive) and
11375         use finput instead of main_jcf->read_state.
11376         Inline jcf_figure_file_type into yyparse.
11377         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11378         Defer load_inner_classes and parse_class_file to a second pass,
11379         after we've correctly mapped command-line .clas fiels to classes.
11380         (jcf_figure_file_type):  Removed.
11381         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11382         (JCF_ZERO):  Also clear zipd field.
11383         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11384
11385 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11386
11387         * jcf-parse.c (yyparse): Change ch from char * to char.
11388
11389 2001-03-19  Per Bothner  <per@bothner.com>
11390
11391         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11392         Add constructed filelist-file at end, following -xjava.  Thus any .o
11393         and library files are not affected by the -xjava.  Also wrap
11394         explicit @FILE with -xjava and -xnone.
11395
11396 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11397
11398         * class.c (build_static_field_ref): Call make_decl_rtl() after
11399         setting the DECL_EXTERNAL flag.
11400
11401 2001-03-17  Per Bothner  <per@bothner.com>
11402
11403         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11404
11405         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11406         when result is is needed (target is STACK_TARGET).
11407
11408         * parse.h (JDEP_SOLV):  Removed.
11409         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11410
11411         * parse.y (incomplete_class_list): Removed.
11412         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11413         It doesn't work if resolve_class changes the name of an array type
11414         that is on the list and then someone else looks for the modified name.
11415         Also, seems liable to break when compiling multiple source files at
11416         once.  So the simplest is to just remove incomplete_class_list -
11417         it is only a minor space win and it is not even clear it saves time.
11418
11419         * parse.y (resolve_class):  Remove unneeded promote_type.
11420
11421 2001-03-15  Per Bothner  <per@bothner.com>
11422
11423         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11424         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11425         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11426         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11427
11428         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11429         * parse.y (java_expand_classes):  Likewise.
11430
11431         * parse.y (expand_start_java_method):  Was only called once and had a
11432         misleading name, so inline in caller java_complete_expand_method.
11433         (enter_a_block):  Likewise inline in enter_block and remove.
11434
11435         Remove junk from when gcc/java was created (by copying from C/C++).
11436         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11437         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11438         more_cleanups_ok, have_cleanups (which have never been used).
11439         (pushlevel, poplevel):  Remove related useless code.
11440
11441         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11442         vtable for Class) should be external, except when compiling Class.
11443
11444         * jvspec.c (lang_specific_driver):  Fix -C handling.
11445         Check -save-temps to see if temp @FILE should be deleted.
11446         Follow-up to/fix for February 16 patch.
11447
11448         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11449         (type_stack_dup):  Remove no-longer neded error check.
11450
11451 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11452
11453         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11454         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11455         don't surround the element with 'N..E' if the type name is
11456         unqualified.
11457
11458 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11459
11460         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11461         DECL_RTL_SET_P, etc.
11462         (make_method_value): Likewise.
11463         (get_dispatch_table): Likewise.
11464
11465         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11466
11467 2001-03-07  Tom Tromey  <tromey@redhat.com>
11468
11469         * config-lang.in (lang_requires): Define.
11470
11471 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11472
11473         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11474         not flag_fast_math.
11475
11476 2001-03-05  Per Bothner  <per@bothner.com>
11477
11478         Fix a problem where rest_of_decl_compilation applied to
11479         class_dtable_decl causes problems because it was done too early,
11480         before output file was opened.
11481         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11482         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11483         (make_class_data):  Define class_dtable_decl.
11484         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11485
11486 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11487
11488         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11489         uses of 'boolean' with 'bool'.
11490
11491 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11492
11493         * lang-specs.h: Add zero initializer for cpp_spec field to all
11494         array elements.
11495
11496 2001-02-16  Per Bothner  <per@bothner.com>
11497
11498         Handle compiling multiple input files at once, and @FILE syntax.
11499         * gcj.texi:  Updated documentation to match.
11500         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11501         * jcf-parse.c (parse_source_file):  Split into ...
11502         (parse_source_file_1):  New function - and:
11503         (parse_source_file_2):  New function.
11504         (yyparse):  On -ffilelist-file, open and scan named file.
11505         On first pass over files, only do parse_source_file_1.
11506         A new second pass calls parse_source_file_2 for each file to compile.
11507         (init_jcf_parse):  Call init_src_parse.
11508         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11509         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11510         as multiple input file combined in one compilation.
11511         * lang-options.h:  Add -ffilelist-file
11512         * lang.c (flag_filelist_file):  New flag variable.
11513         (lang_f_options):  Handle -ffilelist-file.
11514         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11515         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11516         gclass_list - use global fields of src_parse_roots instead.
11517         * parse.y (src_parse_roots):  New array.
11518         (incomplete_class_list, gclass_list):  New macros.
11519         (push_parser_context, java_pop_parser_context,
11520         java_parser_context_resume):  Don't fiddle with deleted fields.
11521         (various):  Use incomplete_class gclass_list and global macros
11522         instead of parse_ctxt fields - the lists are global.
11523         (init_src_parse):  New function.
11524
11525 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11526
11527         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11528
11529 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11530
11531         * parse.y (check_inner_class_access): Moved declaration of local
11532         `enclosing_decl_type' to the right location.
11533
11534 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
11535
11536         * parse.y (parser_check_super_interface): Don't call
11537         check_pkg_class_access for an inner interface.
11538         (parser_check_super): Don't call check_pkg_class_access for inner
11539         class.
11540         (do_resolve_class): Simplify enclosing type loop. Don't call
11541         check_pkg_class_access if CL and DECL are not set.
11542         (find_in_imports_on_demand): Set DECL if class_type needed to be
11543         loaded. Don't call check_pkg_class_access for an inner class.
11544         (check_inner_class_access): Rewritten to implement member access
11545         rules as per spec 6.6.1.
11546         (check_pkg_class_access): Handle the empty package correctly.
11547         (in_same_package): New function. Determine if two classes are in the
11548         same package.
11549
11550 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
11551
11552         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11553         method into array types.
11554         * parse.y (patch_method_invocation): Bypass access check on clone call
11555         to array instance.
11556
11557 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
11558
11559         * expr.c (build_instanceof): Check for arrays when trying fold to
11560         false.
11561
11562 2001-02-15  Jim Meyering  <meyering@lucent.com>
11563
11564         * Make-lang.in (java.install-common): Depend on `installdirs'.
11565         (java.install-info): Likewise.
11566
11567 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
11568
11569         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11570
11571 2001-02-14  Tom Tromey  <tromey@redhat.com>
11572             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11573
11574         Fix for PR java/1261.
11575         * typeck.c (build_java_array_type): Add public `clone' method to
11576         arrays.
11577         * parse.y (resolve_qualified_expression_name): Use current_class
11578         when checking for inaccessibility.
11579         (patch_method_invocation): Fixed error message when accessibility
11580         denied.  Added `from_super' argument.
11581
11582 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11583
11584         * parse.y (resolve_class): Don't build a fake decl. Use the one
11585         already built.
11586         * typeck.c (build_java_array_type): Build and assign decl to array
11587         type.
11588
11589 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11590
11591         * parse.y (not_accessible_p): Changed leading comment. Added extra
11592         `where' argument. Use it to enforce protected access rules.
11593         (resolve_qualified_expression_name): Added extra argument to
11594         not_accessible_p.
11595         (patch_method_invocation): Use argument `primary' to provide
11596         not_accessible_p with an extra argument.
11597         (lookup_method_invoke): Added extra argument to not_accessible_p.
11598         (search_applicable_method_list): Likewise.
11599
11600 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11601
11602         * parse.y (resolve_qualified_expression_name): Try to resolve as
11603         an inner class access only if `decl' is a TYPE_DECL.
11604
11605 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11606
11607         * decl.c (classdollar_identifier_node): Initialize.
11608         * java-tree.h (enum java_tree_index): New entry
11609         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11610         (classdollar_identifier_node): New macro.
11611         (ID_CLASSDOLLAR_P): Likewise.
11612         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11613         (build_dot_class_method_invocation): Likewise.
11614         (find_applicable_accessible_methods_list): `class$' can't be
11615         inherited.
11616
11617 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
11618
11619         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11620
11621 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11622
11623         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11624         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11625         gone.
11626
11627 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11628
11629         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11630         outside of the `__U' sequence too.
11631         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11632         sequence too.
11633
11634 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11635
11636         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11637
11638 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11639
11640         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11641         (JVGENMAIN_OBJS): Likewise.
11642         * java-tree.h (append_gpp_mangled_name): New prototype.
11643         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11644         Removed cast calling `gcc_add_root.'
11645         * jvgenmain.c (mangle_obstack): New global, initialized.
11646         (main): Use it.
11647         (do_mangle_class): Constify local `ptr.'
11648         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11649         append_gpp_mangle_name and update `count' if necessary.
11650         Use `mangle_obstack.'
11651         * mangle.c (append_unicode_mangled_name): Removed.
11652         (append_gpp_mangled_name): Likewise.
11653         (unicode_mangling_length): Likewise.
11654         (mangle_member_name): Return type set to `void.'
11655         (mangle_field_decl): Don't append `U' in escaped names.
11656         (mangle_method_decl): Likewise.
11657         (mangle_member_name): Just use `append_gpp_mangled_name.'
11658         * mangle_name.c: New file.
11659
11660 2001-02-07  Per Bothner  <per@bothner.com>
11661
11662         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
11663
11664         * check-init.c (check_init):  Don't call done_alternative after
11665         processing loop code, as a LOOP_EXPR never terminates normally.
11666
11667 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11668
11669         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11670
11671 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11672
11673         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11674         DECLs.
11675
11676 2001-02-06  Tom Tromey  <tromey@redhat.com>
11677
11678         * lex.c (java_new_lexer): Longer error message.
11679
11680 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
11681             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11682
11683         * typeck.c (build_prim_array_type): Added leading comment.
11684         (build_java_array_type): Moved locals out of
11685         block. Always create the `data' field, fixed alignment to match
11686         C++.
11687
11688 2001-02-04  Tom Tromey  <tromey@redhat.com>
11689
11690         * expr.c (java_lang_expand_expr): Don't bother recomputing
11691         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
11692         Fixes PR java/1866.
11693
11694 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11695
11696         * parse.y (process_imports): Save the original name of the import
11697         for better error report.
11698
11699 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
11700
11701         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11702         of macros used when compiling jvspec.c.
11703         * jvspec.c (lang_specific_driver): Link with the shared
11704         libgcc by default.
11705
11706 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11707
11708         * check-init.c (check_init): Call internal_error instead of fatal.
11709         * expr.c (java_lang_expand_expr): Likewise.
11710         * jcf-parse.c (get_constant): Likewise.
11711         * mangle.c (java_mangle_decl): Likewise.
11712         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11713         (operator_string): Likewise.
11714         * check-init.c (check_init): Call abort instead of fatal.
11715         * class.c (build_class_ref): Likewise.
11716         * constants.c (write_constant_pool): Likewise.
11717         * decl.c (start_java_method): Likewise.
11718         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11719         (java_stack_dup, encode_newarray_type): Likewise.
11720         (build_java_array_length_access): Likewise.
11721         (build_java_check_indexed_type, expand_java_pushc): Likewise.
11722         (build_java_soft_divmod, build_invokeinterface): Likewise.
11723         * java-tree.h (INNER_CLASS_P): Likewise.
11724         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11725         (give_name_to_class, get_class_constant): Likewise.
11726         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11727         (find_constant_index, generate_bytecode_conditional): Likewise.
11728         (generate_bytecode_insns, perform_relocations): Likewise.
11729         * lex.c (java_unget_unicode, java_lex): Likewise.
11730         * mangle.c (mangle_type, mangle_record_type): Likewise.
11731         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11732         (finish_mangling): Likewise.
11733         * parse.h (MARK_FINAL_PARMS): Likewise.
11734         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11735         (obtain_incomplete_type, java_complete_class): Likewise.
11736         (java_check_regular_methods, java_complete_expand_method): Likewise.
11737         (cut_identifier_in_qualified, check_deprecation): Likewise.
11738         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11739         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11740         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11741         * typeck.c (set_local_type, parse_signature_type): Likewise.
11742         (parse_signature_string, build_java_signature): Likewise;
11743         (set_java_signature): Likewise.
11744         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11745         * class.c (add_method): Call fatal_error instead of fatal.
11746         (build_static_field_ref): Likewise.
11747         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11748         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11749         * lex.c (java_new_new_lexer): Likewise.
11750         * jv-scan.c (main): Likewise.
11751         (fatal_error): Renamed from fatal.
11752         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11753         pfatal_with_name.
11754         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11755         (yyparse): Likewise.
11756         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11757         * lex.c (java_get_line_col): Likewise.
11758         * jcf-parse.c (load_class): Make errors non-fatal.
11759         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11760
11761 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11762
11763         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11764         (error): Remove unused function.
11765         (main): Don't use "__attribute__ alias" on generated class symbol.
11766
11767 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11768
11769         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11770         argument.
11771         * parse.y (finish_method_declaration): Code accounting for WFLed
11772         method DECL_NAMEs deleted.
11773         (check_abstract_method_definitions): Likewise.
11774         (resolve_type_during_patch): Layout resolved type.
11775         * typeck.c (lookup_do): Removed unused local.
11776
11777 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11778
11779         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11780         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11781         integer_negative_one_node.
11782         * expr.c (build_java_binop): Likewise.
11783
11784 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11785
11786         * zextract.c (read_zip_archive): Read file_offset before writing
11787         zipd and consequently clobbering the header contents.
11788
11789 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11790
11791         * Make-lang.in: Remove all dependencies on defaults.h.
11792         * decl.c: Don't include defaults.h.
11793         * expr.c: Likewise.
11794         * parse.y: Likewise.
11795
11796 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11797
11798         * ChangeLog (2001-01-21): Fixed typo.
11799         * class.c (layout_class_method): Code accounting for WFLed
11800         method DECL_NAMEs deleted.
11801         * constant.c (find_methodref_index): Likewise.
11802         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11803         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11804         (struct lang_decl): New field `wfl'.
11805         (java_get_real_method_name): Prototype deleted.
11806         * mangle.c (mangle_method_decl): Code accounting for WFLed
11807         method DECL_NAMEs deleted.
11808         * parse.h (GET_METHOD_NAME): Macro deleted.
11809         * parse.y (reset_method_name): Deleted.
11810         (method_header): Set DECL_FUNCTION_WFL.
11811         (check_abstract_method_header): Code accounting for WFLed method
11812         DECL_NAMEs deleted.
11813         (java_get_real_method_name): Deleted.
11814         (check_method_redefinition): Code accounting for WFLed method
11815         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11816         (java_check_regular_methods): Likewise.
11817         (java_check_abstract_methods): Likewise.
11818         (java_expand_classes): Don't call `reset_method_name.'
11819         (search_applicable_method_list): Use DECL_NAMEs instead of
11820         GET_METHOD_NAME.
11821         * typeck.c (lookup_do): Code accounting for WFLed method
11822         DECL_NAMEs deleted.
11823
11824 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
11825
11826         * lex.c (java_read_char): Check for EOF from getc first.
11827
11828 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11829
11830         * class.c (layout_class): Don't lay the superclass out if it's
11831         already being laid out.
11832         * jcf-parse.c (handle_innerclass_attribute): New function.
11833         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11834         handle_innerclasses_attribute.
11835         (jcf_parse): Don't load an innerclasses if it's already being
11836         laid out.
11837         * jcf-write.c (append_innerclass_attribute_entry): Static
11838         `anonymous_name' and its initialization deleted. `ocii' and `ini'
11839         to be zero for anonymous classes.
11840
11841 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11842
11843         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11844         necessary.
11845         * jcf-parse.c (set_source_filename): Use
11846         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11847
11848 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11849
11850         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11851         gets a unique asm name.
11852
11853 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11854
11855         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11856         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11857         if necessary.
11858         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11859         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11860         * parse.y (lookup_package_type_and_set_next): Deleted.
11861         (resolve_package): Removed unnecessary code.
11862         (find_applicable_accessible_methods_list): `finit$' can't be
11863         inherited.
11864         * verify.c (pop_argument_types): Added missing prototype.
11865
11866 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
11867
11868         * config-lang.in: Disable java by default.
11869
11870 2001-01-23  Tom Tromey  <tromey@redhat.com>
11871
11872         * gcj.texi (Copying): New node.
11873         Added copyright information.
11874
11875 2001-01-21  Per Bothner  <per@bothner.com>
11876
11877         Various fixes to allow compiling a compressed .jar/.zip archive.
11878         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
11879         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
11880         (struct ZipDirectory):  New field zipf points to owning ZipFile.
11881         * jcf.h (struct ZipDirectory):  Add forward declaration.
11882         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
11883         Remove seen_in_zip and zip_offset fields.
11884         (JCF_SEEN_IN_ZIP):  New macro.
11885         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
11886         * jcf-io.c:  Change all ZipFileCache to ZipFile.
11887         (read_zip_member):  New function.
11888         (open_in_zip):  Call read_zip_member.
11889         * jcf-parse.c (find_in_current_zip):  Remove function.
11890         (read_class):  Merge in find_in_current_zip functionality.
11891         Call read_zip_member if needed.
11892         (parse_zip_file_entries):  Use read_zip_member.
11893         (process_zip_dir):  Update for removed and added JCF fields.
11894         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
11895
11896 2001-01-21  Per Bothner  <per@bothner.com>
11897
11898         Minor optimization of static ggc roots.
11899         * jcf-parse.c (parse_roots):  New static field.
11900         (current_field, current_method, current_file_list):  Replace by macros
11901         naming fields of parse_roots.
11902         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
11903         * class.c (class_roots):  New static field.
11904         (registered_class, fields_ident, info_ident, class_list):
11905         New macros naming fields of parse_roots.
11906         (build_static_field_ref):  Don't register roots here.
11907         (layout_class):  Static field list replaced by macro class_list.
11908         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
11909         Initialize fields_ident and info_ident here.
11910
11911 2001-01-21  Per Bothner  <per@bothner.com>
11912
11913         * jcf-parse.c (ggc_mark_jcf):  New function.
11914         (init_jcf_parse):  Register current_jcf as ggc root.
11915
11916 2001-01-21  Per Bothner  <per@bothner.com>
11917
11918         * lang.c (put_decl_node):  Print method's name.
11919
11920 2001-01-21  Per Bothner  <per@bothner.com>
11921
11922         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
11923         (verify_jvm_instructions):  Use it, for better error messages on loads.
11924
11925 2001-01-21  Per Bothner  <per@bothner.com>
11926
11927         * verify.c (merge_type_state):  Still may have to merge even if
11928         LABEL_VERIFIED (label).
11929
11930 2001-01-21  Per Bothner  <per@bothner.com>
11931
11932         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
11933         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11934
11935 2001-01-19  Per Bothner  <per@bothner.com>
11936
11937         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
11938         if expeting an interface type.  Refines Tom's change of 2000-09-12.
11939
11940 2001-01-18  Per Bothner  <per@bothner.com>
11941
11942         * gcj.texi (Input Options): Mention .java files.
11943
11944 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11945
11946         * lang-options.h (-Wunsupported-jdk11): Removed.
11947         * lang.c (flag_not_overriding): Deleted.
11948         (flag_static_local_jdk1_1): Likewise.
11949         (lang_W_options): Removed "unsupported-jdk11" entry.
11950         * parse.y (java_check_methods): Removed dead code.
11951
11952 2001-01-17  Tom Tromey  <tromey@redhat.com>
11953
11954         Changes suggested by Per Bothner:
11955         * gcj.texi (Input Options): Don't mention input files.
11956         (Code Generation): Updated --main information.
11957         (Invoking jcf-dump): Mention that --javap is incomplete.
11958         From Alexandre Petit-Bianco:
11959         (Warnings): Don't mention -Wunsupported-jdk11.
11960         My stuff:
11961         (Compatibility): Mention JDK 1.2-ness of libraries.
11962         (Resources): Mention resources used when writing gcj.
11963
11964 2001-01-17  Tom Tromey  <tromey@redhat.com>
11965
11966         * gcj.texi: New file.
11967         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11968         (java.info): Depend on gcj.info.
11969         (java/gcj.dvi): New target.
11970         (java.dvi): Depend on gcj.dvi.
11971         (java.install-info): Wrote.
11972
11973 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
11974
11975         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11976         having called make_decl_rtl.
11977
11978 2001-01-14  Per Bothner  <per@bothner.com>
11979
11980         Various patches to emit better messages on verification errors.
11981         * expr.c (push_type_0):  Return error indication on stack overflow,
11982         instead of callinfg fatal.
11983         (push_type):  Now just call push_type_0 (nd fatal on overflow).
11984         (pop_type_0):  Return detailed error message (in a char** argument).
11985         (pop_type):  If pop_type_0 fails, print error message.
11986         (pop_argument_types):  Moved to verify.c.
11987         * verify.c (pop_argument_types):  Moved from expr.c.
11988         Return a (possible) error message, rather than void.
11989         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
11990         (verify_jvm_instruction):  Use new macros, improving error messages.
11991         For case OPCODE_astore use object_ptr_type_node.
11992         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
11993         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
11994
11995         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11996         constant, return body without wrapper.  (Improves constant folding.)
11997         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
11998
11999 2001-01-13  Per Bothner  <per@bothner.com>
12000
12001         * expr.c (expand_java_field_op):  Assigning to a final field outside
12002         an initializer does not violate JVM spec, so should be warning, not
12003         error.  (Sun's verifier does not complain - though MicroSoft's does.)
12004
12005 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
12006
12007         * gjavah.c (version), jcf-dump.c (version): Update copyright year
12008         to 2001.
12009
12010 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
12011
12012         * parse.y (resolve_expression_name): Permit instance variables from
12013         enclosing context in super constructor call.
12014         (resolve_qualified_expression_name): Permit enclosing class's qualified
12015         "this" in super constructor call.
12016
12017 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12018
12019         * class.c (build_utf8_ref): Remove last argument in call to
12020         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12021         (build_class_ref): Likewise.
12022         (build_static_field_ref): Likewise.
12023         (get_dispatch_table): Likewise.
12024         (layout_class_method): Likewise.
12025         (emit_register_classes): Likewise.
12026         * constants.c (build_constant_data_ref): Likewise.
12027         * decl.c (builtin_function): Likewise.
12028         (create_primitive_vtable): Likewise.
12029         * expr.c (build_known_method_def): Likewise.
12030         (build_jni_stub): Likewise.
12031         (java_lang_expand_expr): Likewise.
12032
12033 2001-01-10  Tom Tromey  <tromey@redhat.com>
12034
12035         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12036
12037 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12038
12039         * java-tree.h (lang_printable_name_wls): New prototype.
12040         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12041         rather than `current_class' to print type name. Don't prepend type
12042         names when printing constructor names.
12043         (lang_printable_name_wls): New function.
12044         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12045         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12046         * parse.y (patch_method_invocation): Message tuned for constructors.
12047         (not_accessible_p): Grant `private' access from within
12048         enclosing contexts.
12049
12050 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12051
12052         All files with updated copyright when applicable.
12053         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12054         * class.c (mangle_class_field): Function removed.
12055         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12056         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12057         (build_class_ref): Call `java_mangle_class_field' instead of
12058         `mangle_class_field.'
12059         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12060         (layout_class): Call `java_mangle_decl' instead of
12061         `mangle_static_field.'
12062         (cxx_keywords): Initialized static array moved to `lex.c.'
12063         (layout_class_method): Changed leading comment. Simplified to
12064         call `java_mangle_decl.' Local `ptr' moved in for loop body.
12065         * decl.c (lang_mark_tree): Mark field `package_list.'
12066         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12067         (struct lang_type): New field `package_list.'
12068         (unicode_mangling_length): Prototype removed.
12069         (append_gpp_mangled_name, append_gpp_mangled_classtype,
12070         emit_unicode_mangled_name): Likewise.
12071         (cxx_keyword_p): New prototype.
12072         (java_mangle_decl, java_mangle_class_field,
12073         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12074         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12075         `build_expr_wfl.'
12076         * jvgenmain.c (main_method_prefix): Global variable removed.
12077         (main_method_suffix): Likewise.
12078         (do_mangle_classname): New function.
12079         (main): Call it. Format changed to accommodate new mangling scheme.
12080         * lex.c: (utf8_cmp): Conditionally prototyped.
12081         (cxx_keywords): Moved from class.c, conditionally defined.
12082         (utf8_cmp, cxx_keyword_p): Likewise.
12083         * mangle.c (obstack.h, ggc.h): Included.
12084         (mangle_field_decl): New function.
12085         (mangle_method_decl, mangle_type, mangle_pointer_type,
12086         mangle_array_type, mangle_record_type,
12087         find_compression_pointer_match, find_compression_array_match,
12088         find_compression_record_match,
12089         find_compression_array_template_match, set_type_package_list,
12090         entry_match_pointer_p, emit_compression_string, init_mangling,
12091         finish_mangling, compression_table_add, mangle_member_name): Likewise.
12092         (mangle_obstack): New global.
12093         (MANGLE_RAW_STRING): New macro.
12094         (unicode_mangling_length): Turned static.
12095         (append_unicode_mangled_name): Renamed from
12096         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
12097         replaces `obstack', removed from the parameter list.
12098         (append_gpp_mangled_name): Turned static. `mangle_obstack'
12099         replaces parameter `obstack', removed from the parameter list. Call
12100         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12101         (append_gpp_mangled_classtype): Removed.
12102         (compression_table, compression_next): New static variables.
12103         * parse.y (temporary_obstack): Extern declaration removed.
12104
12105 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12106
12107         * parse.y (patch_binop): Compute missing type in error situations.
12108
12109 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12110
12111         * class.c (make_class_data): Push initial value for "arrayclass".
12112         * decl.c (init_decl_processing): Add new class field "arrayclass".
12113
12114 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
12115
12116         From patha@softlab.ericsson.se:
12117         * parse.y (switch_label): Use build, not build1, to construct
12118         DEFAULT_EXPR.
12119
12120 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
12121
12122         * lang.c (lang_decode_option): Change -MA to -MP.
12123         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12124         Update to new prototype; do quote targets.
12125         (jcf_dependency_write): Update.
12126
12127 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
12128
12129         Shorten primitive array allocation path:
12130         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12131         to create new primitive arrays.
12132         * expr.c (build_newarray): If generating native code, call
12133         soft_newarray_node with a reference to the primitive TYPE identifier
12134         instead of type_value.
12135
12136 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
12137
12138         Fix for PRs gcj/312 and gcj/253:
12139         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12140         dest if they arn't already.
12141         * class.c (layout_class): Call maybe_layout_super_class on
12142         superinterfaces also, but only if compiling from bytecode.
12143
12144         Fix for PR gcj/373:
12145         * parse.y (create_class): Set ACC_STATIC if class is declared in an
12146         interface.
12147
12148 2000-12-15  Tom Tromey  <tromey@redhat.com>
12149
12150         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12151         set.
12152
12153 2000-12-14  Andrew Haley  <aph@redhat.com>
12154
12155         * boehm.c (mark_reference_fields): Change test to correctly detect
12156         bitmap overflow.
12157
12158 2000-12-15  Andreas Jaeger  <aj@suse.de>
12159
12160         * config-lang.in (lang_dirs): Added.
12161
12162 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12163
12164         * parse.y (end_artificial_method_body): Fixed undefined behavior.
12165         Credits go to rth for finding it.
12166
12167 2000-12-13  Mike Stump  <mrs@wrs.com>
12168
12169         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12170
12171 2000-11-07  Tom Tromey  <tromey@cygnus.com>
12172
12173         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12174         * lex.c (java_ignorable_control_p): Removed.
12175         (java_letter_or_digit_p): Removed.
12176         (java_start_char_p): New function.
12177         (java_read_char): Return `int', not `unicode_t'.  Changed
12178         callers.
12179         (java_read_unicode): Likewise.
12180         (java_read_unicode_collapsing_terminators): Likewise.
12181         (java_get_unicode): Likewise.
12182         (java_new_lexer): Initialize hit_eof.
12183         (java_parse_end_comment): Take `int' argument.
12184         (java_parse_doc_section): Likewise.
12185         (java_parse_escape_sequence): Don't allow backlash-newline.
12186         Return `int'.
12187         * lex.h (JAVA_DIGIT_P): Removed.
12188         (_JAVA_LETTER_OR_DIGIT_P): Removed.
12189         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12190         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12191         (JAVA_PART_CHAR_P): New macro.
12192         (UEOF): Now -1.
12193         (JAVA_CHAR_ERROR): Now -2.
12194         (java_lexer): New field `hit_eof'.
12195         * chartables.h: New file.
12196         * gen-table.pl: new file.
12197
12198 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12199             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12200
12201         * parse.y (java_complete_lhs): Only allow compound assignment of
12202         reference type if type is String.
12203
12204 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12205
12206         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12207         jcf-path.c: Likewise.
12208
12209 2000-12-09  Anthony Green  <green@redhat.com>
12210
12211         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12212         filestart and filename_length as int values.
12213
12214 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12215
12216         * jcf-io.c (find_class): Correct the logic that tests to see if a
12217         .java file is newer than its .class file. The compiler was
12218         incorrectly printing a warning when file mod times were equal.
12219
12220 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12221
12222         * jvgenmain.c: Use ISPRINT not isascii.
12223
12224 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12225
12226         * parse.y (end_artificial_method_body): Fixed typo.
12227
12228 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12229
12230         * parse.y (patch_method_invocation): Pick the correct enclosing
12231         context when creating inner class instances.
12232         Fixes gcj/332.
12233
12234 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12235
12236         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12237         Update copyright year to 2000.
12238
12239 2000-11-23  Anthony Green  <green@redhat.com>
12240
12241         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12242         Move current_file_list out of yyparse and make it static.
12243
12244         * expr.c: Declare quick_stack and tree_list_free_list as static
12245         (init_expr_processing): Register quick_stack and
12246         tree_list_free_list roots.
12247
12248 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12249
12250         * parse.y (build_outer_field_access): New local `decl_ctx', use
12251         it. Check for field's context and current class immediate outer
12252         context inheritance.
12253         (outer_field_access_p): Consider fields inherited from the last
12254         enclosing context.
12255         (build_access_to_thisn): Stop at the last enclosing context if
12256         necessary.
12257         Fixes gcj/367.
12258
12259 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12260
12261         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12262
12263 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12264
12265         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12266         scratch buffer.
12267
12268 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12269
12270         * jv-scan.c (help): Document --complexity.
12271         (options): Added --complexity.
12272         (flag_complexity): New global.
12273         (main): Call `report'.
12274         * parse-scan.y (complexity): New global.
12275         (if_then_statement, if_then_else_statement,
12276         if_then_else_statement_nsi, switch_block_statement_group,
12277         while_expression, do_statement, for_begin, continue_statement,
12278         throw_statement, catch_clause, finally, method_invocation,
12279         conditional_and_expression, conditional_or_expression,
12280         conditional_expression): Update complexity.
12281         (reset_report): Reset complexity.
12282         (report): New function.
12283
12284 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12285
12286         * lex.c (yylex): Added STRICT_TK case.
12287         * parse.y (STRICT_TK): Added.
12288         * parse-scan.y (STRICT_TK): Added.
12289         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12290         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12291         file.
12292         * keyword.h: Rebuilt.
12293         * keyword.gperf (strictfp): Added.
12294
12295 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12296
12297         * lex.c (yylex): Recognize floating point constants with leading
12298         0.
12299
12300 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12301
12302         * java-tree.h (cyclic_inheritance_report): Constify.
12303         * parse.y (cyclic_inheritance_report): Likewise.
12304
12305 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12306
12307         * parse.y (goal): Remove call to ggc_add_string_root.
12308
12309 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12310
12311         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12312         Create string in scratch buffer, then pass to build_string.
12313
12314 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12315
12316         * parse.y (issue_warning_error_from_context): Add
12317         ATTRIBUTE_PRINTF.
12318
12319 2000-11-11  Anthony Green  <green@redhat.com>
12320
12321         * jcf-parse.c (process_zip_dir): Add finput parameter.
12322         (jcf_figure_file_type): Call process_zip_dir with appropriate
12323         argument.
12324
12325 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12326
12327         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12328         * jcf-parse.c (jcf_figure_file_type): Likewise.
12329
12330 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12331
12332         * parse.y (create_new_parser_context): Use memset () instead of
12333         bzero ().
12334
12335 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12336
12337         * gjavah.c (process_file): Only include gcj/cni.h when generating
12338         CNI stubs.
12339
12340 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12341
12342         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12343         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12344         instead of bzero ().
12345
12346 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12347
12348         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12349         * lex.c (IS_ZERO): New define.
12350         (java_perform_atof): Error on floating point underflow.
12351
12352 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12353
12354         * lex.c (java_parse_escape_sequence): Only read two octal
12355         characters if the first one is greater than 3.  Don't allow
12356         "octal" numbers to include the digits 8 or 9.
12357
12358 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12359
12360         * Make-lang.in (java.distdir): Remove.
12361
12362 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12363
12364         * Make-lang.in (java.dvi): New target.
12365         Partial fix for PR other/567.
12366
12367         * lang-options.h: Mention -Wout-of-date.
12368         * jcf-dump.c (flag_newer): New global.
12369         * gjavah.c (flag_newer): New global.
12370         * jcf-io.c (find_class): Only warn when flag_newer set.
12371         * lang.c (flag_newer): New global.
12372         (struct string_option): New declaration.
12373         (lang_W_options): New global.
12374         (process_option_with_no): New function.
12375         (lang_decode_option): Use it.
12376
12377         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12378         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12379         `$'.
12380
12381         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12382         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12383         * lex.c (java_read_unicode): Removed `term_context' argument.
12384         Recognize any number of `u' in `\u'.
12385         (java_read_unicode_collapsing_terminators): New function.
12386         (java_get_unicode): Use it.
12387         (java_lineterminator): Removed.
12388         (yylex): Produce error if character literal is newline or single
12389         quote.  Return if eof found in middle of `//' comment.  EOF in
12390         `//' comment is only an error if pedantic.
12391         (java_ignorable_control_p): New function.
12392         (java_parse_end_comment): Return if eof found in middle of
12393         comment.
12394         Include flags.h.
12395         * jv-scan.c (pedantic): New global.
12396
12397 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12398
12399         * parse.y (outer_field_access_p): Inherited fields aren't
12400         consider outer fields.
12401         (maybe_build_thisn_access_method): Use
12402         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12403         (resolve_expression_name): Trigger an error if a static field
12404         is being accessed as an outer field.
12405
12406 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12407
12408         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12409         Fixes gcj/365.
12410
12411 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12412
12413         * Make-lang.in: Move all build rules here from Makefile.in,
12414         adapt to new context.  Wrap all rules that change the current
12415         directory in parentheses.  Expunge all references to $(P).
12416         When one command depends on another and they're run all at
12417         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12418         all object-file generation rules.  Delete obsolete variables.
12419
12420         * Makefile.in: Delete.
12421         * config-lang.in: Delete outputs= line.
12422
12423 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12424
12425         * parse.y (patch_method_invocation): NULLify this_arg when already
12426         inserted.
12427         (maybe_use_access_method): Handle call to methods unrelated to the
12428         current class. Fixed comment.
12429         Fixes gcj/361.
12430
12431 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12432
12433         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12434         scope.
12435
12436 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12437
12438         * lex.c (java_new_lexer): Initialize new fields.  Work around
12439         broken iconv() implementations.
12440         (java_read_char): Swap bytes if required.  Use fallback decoder if
12441         required.
12442         (byteswap_init, need_byteswap): New globals.
12443         (java_destroy_lexer): Only close iconv handle if it is in use.
12444         * lex.h (java_lexer): New fields read_anything, byte_swap,
12445         use_fallback.
12446         Made out_buffer unsigned.
12447
12448 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12449
12450         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12451         where an enclosing context can be set on the jdep.
12452         (do_resolve_class): Fixed identation.
12453
12454 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12455
12456         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12457
12458         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12459         when requested.
12460
12461         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12462
12463         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12464
12465 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12466
12467         * jcf-write.c (OP1): Update `last_bc'.
12468         (struct jcf_block): Fixed indentation and typo in comments.  New
12469         field `last_bc'.
12470         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12471         follows `monitorenter'.
12472         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12473         `patch_string'.
12474         Fixes gcj/232.
12475
12476 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12477
12478         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12479         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12480         * lang-options.h: Added -MA, -MT, -MF..
12481         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12482         (DEPEND_TARGET_SET): New macro.
12483         (DEPEND_FILE_ALREADY_SET): Likewise.
12484         (init_parse): Handle new flags.
12485         * jcf.h (jcf_dependency_print_dummies): Declare.
12486         * Make-lang.in (s-java): Added mkdeps.o.
12487         * Makefile.in (BACKEND): Added mkdeps.o.
12488         (../gcjh$(exeext)): Added mkdeps.o.
12489         (../jcf-dump$(exeext)): Added mkdeps.o.
12490         * jcf-depend.c: Include mkdeps.h.
12491         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12492         add_entry): Removed.
12493         (jcf_dependency_reset): Rewrote.
12494         (dependencies): New global.
12495         (jcf_dependency_set_target): Rewrote.
12496         (jcf_dependency_add_target): Likewise.
12497         (jcf_dependency_add_file): Likewise.
12498         (munge): Removed.
12499         (print_ents): Removed.
12500         (jcf_dependency_write): Rewrote.
12501         (print_dummies): New global.
12502         (jcf_dependency_print_dummies): New function
12503         (jcf_dependency_write): Call deps_dummy_targets if required.
12504
12505 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12506
12507         * gjavah.c (add_class_decl): Removed unused variables `tname',
12508         `tlen' and `name_index'.
12509         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12510         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12511         in `wfl_operator' with value.
12512         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12513         (jcf_figure_file_type): Fixed identation.
12514         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12515         * parse.y (analyze_clinit_body): New function.
12516         (static_initializer:): Reset `current_static_block'.
12517         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12518         `wfl_operator' with new value.
12519         (lookup_cl): Use EXPR_WFL_FILENAME.
12520         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12521         analyze_clinit_body.
12522         (build_outer_field_access): Access to this$<n> built from
12523         current_class, not its outer context.
12524         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12525         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12526         (patch_method_invocation): Use `is_static_flag' when already
12527         initialized.
12528         (patch_newarray): Removed assignment in ternary operator.
12529
12530 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12531
12532         * except.c (free_eh_ranges): Don't free `whole_range'.
12533
12534 2000-10-15  Anthony Green  <green@redhat.com>
12535
12536         * decl.c (init_decl_processing): Call init_class_processing before
12537         anything else.
12538
12539 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12540
12541         * check-init.c (check_init): Fixed leading comment. Use
12542         LOCAL_FINAL_P.
12543         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12544         (give_name_to_locals): Likewise.
12545         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12546         fields in lang_decl_var.
12547         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12548         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12549         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12550         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12551         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12552         (LOCAL_FINAL): Rewritten.
12553         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12554         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12555         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12556         `init_final' fields.
12557         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12558         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12559         (TYPE_HAS_FINAL_VARIABLE): New macro.
12560         (struct lang_type): Added `afv' field.
12561         * parse.y (check_static_final_variable_assignment_flag): New function.
12562         (reset_static_final_variable_assignment_flag): Likewise.
12563         (check_final_variable_local_assignment_flag): Likewise.
12564         (reset_final_variable_local_assignment_flag): Likewise.
12565         (check_final_variable_indirect_assignment): Likewise.
12566         (check_final_variable_global_assignment_flag): Likewise.
12567         (add_inner_class_fields): Use LOCAL_FINAL_P.
12568         (register_fields): Handle local finals and final variables.
12569         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12570         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12571         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12572         on local finals.
12573         (java_complete_expand_methods): Loop to set
12574         TYPE_HAS_FINAL_VARIABLE. Call
12575         `reset_final_variable_local_assignment_flag' and
12576         `check_final_variable_local_assignment_flag' accordingly before
12577         and after constructor expansion. Call
12578         `reset_static_final_variable_assignment_flag'
12579         before expanding <clinit> and after call
12580         `check_static_final_variable_assignment_flag' if the
12581         current_class isn't an interface. After all methods have been
12582         expanded, call `check_final_variable_global_assignment_flag' and
12583         `check_static_final_variable_assignment_flag' if the current class
12584         is an interface.
12585         (maybe_yank_clinit): Fixed typo in comment.
12586         (build_outer_field_access_methods): Removed old sanity check. Use
12587         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12588         Don't create access methods for finals.
12589         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12590         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12591         existing DECL_INIT has been processed.
12592         (java_complete_lhs): Likewise.
12593         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12594         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12595         logic.
12596         (patch_assignment): Use LOCAL_FINAL_P.
12597         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12598         DECL_INITIAL is nullified.
12599         Fixes gcj/163.
12600
12601 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12602
12603         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12604
12605         * Makefile.in (parse.c, parse-scan.c): Likewise.
12606
12607 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12608
12609         * class.c (temporary_obstack): Remove.
12610         (make_class): Don't mess with obstascks.
12611         (push_class): Likewise.
12612         (set_super_info): Likewise.
12613         (add_method_1): Likewise.
12614         (add_method): Likewise.
12615         (add_field): Likewise.
12616         (build_utf8_ref): Likewise.
12617         (build_class_ref): Likewise.
12618         (build_static_field_ref): Likewise.
12619         (finish_class): Likewise.
12620         (push_super_field): Likewise.
12621         (layout_class): Likewise.
12622         (layout_class_methods): Likewise.
12623         (init_class_processing): Likewise.
12624         * constants.c (get_tag_node): Likewise.
12625         (build_constant_data_ref): Likewise.
12626         * decl.c (ggc_p): Remove.
12627         (copy_lang_decl): Use ggc_alloc.
12628         (complete_start_java_method): Don't mess with obstacks.
12629         (start_java_method): Likewise.
12630         (end_java_method): Likewise.
12631         * except.c (link_handler): Use xmalloc.
12632         (free_eh_ranges): New function.
12633         (method_init_exceptions): Use it.
12634         (add_handler): Use xmalloc.
12635         (expand_start_java_handler): Don't mess with obstacks.
12636         (prepare_eh_table_type): Likewise.
12637         (expand_end_java_handler): Likewise.
12638         * expr.c (push_value): Likewise.
12639         (create_label_decl): Likewise.
12640         (build_jni_stub): Likewise.
12641         (java_lang_expand_expr): Likewise.
12642         (note_instructions): Use xrealloc.
12643         (java_push_constant_from_pool): Don't mess with obstacks.
12644         (process_jvm_instruction): Likewise.
12645         * java-tree.h (cyclic_inheritance_report): Remove duplicate
12646         declaration.
12647         * jcf-parse.c (get_constant): Don't mess with obstacks.
12648         (read_class): Likewise.
12649         (jcf_parse): Likewise.
12650         * lex.c (expression_obstack): Remove.
12651         (java_lex): Don't use obstack_free.
12652         * parse.h (exit_java_complete_class): Don't mess with obstacks.
12653         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12654         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12655         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12656         * parse.y (gaol): Add more GC roots.
12657         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12658         (lookup_field_wrapper): Likewise.
12659         (obtain_incomplete_type): Don't mess with obstacks.
12660         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12661         macros.
12662         (craft_constructor): Don't mess with obstacks.
12663         (safe_layout_class): Likewise.
12664         (java_complete_class): Likewise.
12665         (source_end_java_method): Likewise.
12666         (build_outer_field_access_methods): Likewise.
12667         (build_outer_method_access_method): Likewise.
12668         (maybe_build_thisn_access_method): Likewise.
12669         (build_dot_class_method_invocation): Likewise.
12670         (java_complete_tree): Likewise.
12671         (java_complete_lhs): Likewise.
12672         (do_merge_string_cste): Likewise.
12673         (patch_string_cst): Likewise.
12674         (array_constructor_check_entry): Likewise.
12675         * typeck.c (build_java_array_type): Likewise.
12676         (parse_signature_string): Likewise.
12677         (build_java_signature): Likewise.
12678
12679 2000-10-12  Tom Tromey  <tromey@cygnus.com>
12680
12681         Fix for PR gcj/356:
12682         * gjavah.c (add_class_decl): Don't special-case inner classes.
12683         (add_namelet): Likewise.
12684
12685 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
12686
12687         * java-tree.h: Constify current_encoding.
12688         * lang.c: Constify current_encoding.
12689
12690 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
12691
12692         * jvgenmain.c (class_mangling_suffix): Omit `.'.
12693         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12694
12695 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12696
12697         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12698         patch. Fixes gcj/340.
12699
12700 2000-10-10  Tom Tromey  <tromey@cygnus.com>
12701
12702         * lex.c (java_new_lexer): Initialize out_first and out_last
12703         fields.
12704         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12705
12706 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12707
12708         * parse.y (pop_current_osb): New function.
12709         (array_type:): Use `dims:', changed actions
12710         accordingly. Suggested by Anthony Green.
12711         (array_creation_expression:): Used pop_current_osb.
12712         (cast_expression:): Likewise.
12713         (search_applicable_method_list): Fixed indentation.
12714
12715 2000-10-08  Anthony Green  <green@redhat.com>
12716
12717         * parse.y (array_type_literal): Remove production.
12718         (type_literals): Refer to array_type, not array_type_literal.
12719
12720 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12721
12722         Patch contributed by Corey Minyard.
12723         * decl.c (check_local_named_variable): New function.
12724         (tree check_local_unnamed_variable): Likewise.
12725         (find_local_variable): Splitted. Call check_local_{un}named_variable.
12726
12727 2000-10-07  Anthony Green  <green@redhat.com>
12728
12729         * class.c (layout_class): Handle case where superclass can't be
12730         layed out yet.
12731
12732 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12733
12734         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12735         gperf.
12736
12737 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12738
12739         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12740         * jvgenmain.c (class_mangling_prefix): Removed.
12741         (class_mangling_suffix): New global.
12742         (main): Use it.
12743         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12744         `$'.
12745         (print_method_info): Handle overrides for static and final
12746         methods.
12747         (process_file): Generate declaration for class object field.
12748         * class.c (cxx_keywords): New array.
12749         (utf8_cmp): New function.
12750         (cxx_keyword_p): New function.
12751         (layout_class_method): Mangle C++ keywords by appending `$'.
12752         (mangle_field): New function.
12753         (mangle_class_field): Use mangle_field.  Mangle class name as
12754         `class$'.
12755         (mangle_static_field): Use mangle_field.
12756
12757 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12758
12759         * decl.c (find_local_variable): Removed uncessary type check and
12760         fixed range check typo. From Corey Minyard.
12761
12762 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12763
12764         * decl.c (give_name_to_locals): New local `code_offset'. Call
12765         `maybe_adjust_start_pc'.
12766         * expr.c (note_instructions): New function.
12767         (expand_byte_code): Don't collect insn starts here.
12768         (peek_opcode_at_pc): New function.
12769         (maybe_adjust_start_pc): Likewise.
12770         * java-tree.h (maybe_adjust_start_pc): Declare.
12771         (note_instructions): Likewise.
12772         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12773
12774 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12775
12776         * parse.y (field_access:): Fixed indentation.
12777         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12778
12779 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12780
12781         Fix for PR gcj/307:
12782         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12783         JPRIMITIVE_TYPE_P, for arithmetic operators.
12784         (patch_method_invocation): Indentation fix.
12785         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12786         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12787         (do_unary_numeric_promotion): Cleaned up code.
12788         (valid_cast_to_p): Handle boolean correctly.
12789
12790 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12791
12792         * lex.c (java_read_unicode): Reset bs_count when finished with
12793         `\u' sequence.
12794
12795 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12796
12797         Convert to GC.
12798         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12799         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12800         (typeck.o): Depend on ggc.h.
12801         * class.c (add_method_1): Use GC functions for allocation.
12802         (init_class_processing): Register roots.
12803         * decl.c (ggc_p): Set to 1.
12804         (pending_local_decls): Make it static.
12805         (push_jvm_slot): Use GC functions for allocation.
12806         (init_decl_processing): Register roots.
12807         (give_name_to_locals): Use GC functions for allocation.
12808         (lang_mark_tree): New function.
12809         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12810         functions for allocation.
12811         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12812         * lex.c (java_lex): Use build_string, rather than replicating it
12813         inline.
12814         * parse.y (goal): Add more roots.
12815         (mark_parser_ctxt): New function.
12816         * typeck.c: Include ggc.h.
12817
12818 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12819
12820         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12821         contains something else than MODIFY_EXPR.
12822
12823 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
12824
12825         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12826         * Makefile.in (parse.o): Depend on ggc.h.
12827         (class.o): Likewise.
12828         (constants.o): Likewise.
12829         (decl.o): Likewise.
12830         (expr.o): Likewise.
12831         (jcf-parse.o): Likewise.
12832         (jcf-write.o): Likewise.
12833         (mangle.o): Likewise.
12834         * class.c: Include ggc.h.
12835         (build_static_field_ref): Register GC roots.
12836         (layout_class): Likewise.
12837         (init_class_processing): Likewise.
12838         * constants.c: Include ggc.h.
12839         (current_constant_pool_data_ref): Remove.
12840         (tag_nodes): Move it to ...
12841         (get_tag_node): ... here.  Register GC roots.
12842         * decl.c: Include ggc.h.  Remove many global tree definitions.
12843         (throw_node): Define.
12844         (java_global_trees): Likewise.
12845         (predef_filenames): Make the size a constant.
12846         (init_decl_processing): Adjust accordingly.
12847         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
12848         * expr.c: Include ggc.h.
12849         (init_expr_processing): Register GC roots.
12850         (build_invokeinterface): Likewise.
12851         * java-tree.h: Replace extern tree declarations with macros.
12852         (java_global_trees): New variable.
12853         (java_tree_index): New enumeration.
12854         (init_jcf_parse): Declare.
12855         * jcf-parse.c: Include ggc.h.
12856         (current_class): Remove declaration.
12857         (main_class): Likewise.
12858         (all_class_list): Likewise.
12859         (predefined_filename_p): Adjust for constant size of
12860         predef_filenames.
12861         (init_jcf_parse): New function.
12862         * jcf-write.c: Include ggc.h.
12863         (generate_classfile): Register GC roots.
12864         (append_synthetic_attribute): Likewise.
12865         (append_innerclass_attribute_entry): Likewise.
12866         * lang.c: Include ggc.h.
12867         (lang_print_error): Register GC roots.
12868         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12869         with macros.
12870         * parse.y: Include ggc.h.
12871         (wfl_operator): Remove.
12872         (goal): Register GC roots.
12873         (java_pop_parser_context): Adjust for new field names.
12874         (java_parser_context_save_global): Likewse.
12875         (java_parser_context_restore_global): Likewise.
12876         (java_parser_context_suspend): Likewise.
12877         (java_parser_context_resume): Likewise.
12878         (verify_constructor_circularity): Register GC roots.
12879         (lookup_cl): Likewise.
12880         (java_reorder_fields): Likewise.
12881         (build_current_this): Likewise.
12882         (class_in_current_package): Likewise.
12883         (argument_types_convertible): Likewise.
12884         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12885
12886 2000-09-14  Tom Tromey  <tromey@cygnus.com>
12887
12888         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12889
12890 2000-09-13  Tom Tromey  <tromey@cygnus.com>
12891
12892         * jcf-parse.c: Include <locale.h>.
12893         * jv-scan.c: Include <locale.h>.
12894
12895 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12896
12897         * expr.c (pop_type_0): Return `Object' if trying to merge two
12898         interface types.
12899         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12900         interface types; `Object' is always a valid supertype.
12901
12902 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12903
12904         Fix for PR gcj/33:
12905         * jv-scan.c (help): Document --encoding.
12906         (options): Added `encoding' entry.
12907         (OPT_ENCODING): New define.
12908         (main): Handle --encoding.
12909         Include <langinfo.h> if nl_langinfo exists.
12910         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12911         --encoding.
12912         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12913         (parse_source_file): Correctly call java_init_lex.  Added `finput'
12914         argument.  Use nl_langinfo to determine default encoding.
12915         * java-tree.h (current_encoding): Declare.
12916         * parse.y (java_parser_context_restore_global): Don't restore
12917         `finput'.
12918         (java_parser_context_save_global): Don't set `finput' field.
12919         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
12920         if required.
12921         * lang.c (current_encoding): New global.
12922         (lang_decode_option): Recognize `-fencoding='.
12923         (finish_parse): Don't close finput.
12924         * parse.h (struct parser_ctxt): Removed `finput' and
12925         `unget_utf8_value' fields.  Added `lexer' field.
12926         (java_init_lex): Fixed declaration.
12927         * lex.c (java_new_lexer): New function.
12928         (java_destroy_lexer): Likewise.
12929         (java_read_char): Added `lex' argument.  Handle iconv case.
12930         (java_read_unicode): Added `lex' argument.  Count backslashes in
12931         lexer structure.
12932         (java_init_lex): Added `finput' and `encoding' arguments.  Set
12933         `lexer' field in ctxp.
12934         (BAD_UTF8_VALUE): Removed.
12935         (java_lex): Handle seeing UEOF in the middle of a string literal.
12936         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12937         (java_lexer): New structure.
12938         (UNGETC): Removed.
12939         (GETC): Removed.
12940         (DEFAULT_ENCODING): New define.
12941         (java_destroy_lexer): Declare.
12942
12943 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12944
12945         Fix for PR gcj/343:
12946         * lex.c (java_init_lex): Initialize java_io_serializable.
12947         * parse.y (java_io_serializable): New global.
12948         (valid_ref_assignconv_cast_p): An array can be cast to
12949         serializable.
12950
12951 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12952
12953         * decl.c, expr.c: Include defaults.h if not already included.
12954         Don't define the *_TYPE_SIZE macros.
12955
12956 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
12957
12958         * typeck.c (build_java_array_type): Correct first parameter
12959         in ADJUST_FIELD_ALIGN invocation.
12960
12961 2000-09-06  Tom Tromey  <tromey@cygnus.com>
12962
12963         * lang-specs.h: Also recognize `-femit-class-files'.
12964
12965 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12966
12967         * verify.c (merge_types): Load the types to merge if necessary.
12968
12969 2000-09-02  Anthony Green  <green@redhat.com>
12970
12971         * jcf-io.c: Include zlib.h.
12972         (open_in_zip): Read compressed class file archives.
12973         * zipfile.h (ZipDirectory): Add uncompressed_size and
12974         compression_method fields.
12975         * zextract.c (read_zip_archive): Collect file compression info.
12976
12977 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
12978
12979         * parse.y (do_resolve_class): Also explore superclasses of
12980         intermediate enclosing contexts when searching for inner classes.
12981
12982 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12983
12984         * parse.y (variable_declarator_id:): Better error message.
12985         (expression_statement:): Use YYNOT_TWICE.
12986         (cast_expression:): Likewise.
12987         (assignment:): Likewise.
12988
12989 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12990
12991         * parse.y (do_merge_string_cste): New locals. Create new
12992         STRING_CSTs each time, use memcpy. Fixes gcj/311.
12993
12994 2000-08-07  Hans Boehm  <boehm@acm.org>
12995
12996         * boehm.c (mark_reference_fields): Set marking bits for all words in
12997         a multiple-word record.
12998         (get_boehm_type_descriptor): Use the procedure marking descriptor for
12999         java.lang.Class.
13000
13001 2000-08-31  Mike Stump  <mrs@wrs.com>
13002
13003         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13004         jcf-dump$(exeext)): Make parallel safe.
13005
13006 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
13007
13008         * jcf-parse.c (set_source_filename): Constify a char *.
13009         * jcf-write.c (append_innerclasses_attribute,
13010         make_class_file_name): Constify a char *.  Don't recycle a
13011         variable for an unrelated purpose.
13012         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13013         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13014
13015 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13016
13017         * expr.c (can_widen_reference_to): Fixed indentation.
13018         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13019         * parse.y: `finit$' replaces `$finit$' in comments.
13020         (try_builtin_assignconv): Fixed leading comment.
13021
13022 2000-08-25  Greg McGary  <greg@mcgary.org>
13023
13024         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13025
13026 2000-08-24  Greg McGary  <greg@mcgary.org>
13027
13028         * lang.c (lang_decode_option): Use ARRAY_SIZE.
13029         * parse.y (BINOP_LOOKUP): Likewise.
13030
13031 2000-08-22  Andrew Haley  <aph@cygnus.com>
13032
13033         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13034         sign extending. Fixes gcj/321.
13035         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13036         combining to make a jlong. Fixes gcj/321.
13037
13038 2000-08-21  Nix  <nix@esperi.demon.co.uk>
13039
13040         * lang-specs.h: Do not process -o or run the assembler if
13041         -fsyntax-only.
13042
13043 2000-08-16  Andrew Haley  <aph@cygnus.com>
13044
13045         * typeck.c (build_java_array_type): Rewrite code to do array
13046         alignment.  Take into account back-end macros when aligning array
13047         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13048         user to set alignment. Fixes gcj/252 and 160.
13049
13050 2000-08-09  Tom Tromey  <tromey@cygnus.com>
13051
13052         * parse.y (check_abstract_method_definitions): Now return `int'.
13053         Check implemented interfaces.  Fixes PR gcj/305.
13054
13055         * parse.y (patch_switch_statement): Disallow `long' in switch
13056         expressions.  Fixes PR gcj/310.
13057
13058 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13059
13060         * decl.c (finit_leg_identifier_node): New global.
13061         (init_decl_processing): Use `finit$' to initialize
13062         finit_identifier_node. Use `$finit$' to initialize
13063         finit_leg_identifier_node.
13064         * expr.c (expand_java_field_op): Use ID_FINIT_P.
13065         * java-tree.h (finit_identifier_node): Changed attached comment.
13066         (finit_leg_identifier_node): New declaration.
13067         (ID_FINIT_P): Take finit_identifier_node and
13068         finit_leg_identifier_node into account. This is a backward
13069         compatibility hack.
13070
13071 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13072
13073         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13074         Jan 6 2000 patch.
13075         (generate_bytecode_insns): Check `nargs' before emitting it.
13076         * verify.c (merge_type_state): Fixed typo.
13077         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13078         generate_bytecode_{conditional,insns}.
13079
13080 2000-08-13  Anthony Green  <green@redhat.com>
13081
13082         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13083         for -pg builds).
13084
13085 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13086
13087         * class.c (maybe_layout_super_class): Fixed indentation.
13088         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13089         (java_check_methods): New function declaration.
13090         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13091         instead of `str_ptr'.
13092         * jcf-write.c (generate_bytecode_insns): Emit number the of args
13093         of a `invokeinterface' at the right time.
13094         * parse.h (WFL_STRIP_BRACKET): New macro.
13095         (SET_TYPE_FOR_RESOLUTION): Use it.
13096         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13097         (check_class_interface_creation): Don't check for cross package
13098         innerclass name clashes.
13099         (method_header): Behave properly if MDECL is `error_mark_node'.
13100         (method_declarator): Return `error_mark_node' if bogus current
13101         class.
13102         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13103         (resolve_and_layout): New local `decl_type', set and used. Call
13104         java_check_methods.
13105         (java_check_methods): New method.
13106         (java_layout_classes): Use it.
13107         (resolve_qualified_expression_name): No EH check necessary in
13108         access$<n>.
13109         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13110         `case' statement.
13111         (patch_assignment): Set DECL_INITIAL on integral final local.
13112
13113 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13114
13115         * java-tree.h (flag_extraneous_semicolon): New extern.
13116         * lang-options.h: (-Wextraneous-semicolon): New option.
13117         * lang.c (flag_redundant): Fixed typo in leading comment.
13118         (flag_extraneous_semicolon): New global.
13119         (lang_decode_option): Set `flag_extraneous_semicolon' when
13120         -Wall. Decode `-Wextraneous-semicolon'.
13121         * parse.y (type_declaration:): Removed `SC_TK' hack, added
13122         `empty_statement' rule.
13123         (class_body_declaration): Likewise.
13124         (method_body:): Accept `;' as a method body.
13125         (static_initializer:): Removed `SC_TK' hack.
13126         (constructor_block_end:): Likewise.
13127         (empty_statement:): Report deprecated empty declaration. Fixes
13128         gcj/295
13129
13130 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13131
13132         * parse.y (build_dot_class_method_invocation): Changed parameter
13133         name to `type'. Build signature from `type' and convert it to a
13134         STRING_CST if it's an array.
13135         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13136         to use `ref_type' directly.
13137
13138 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
13139
13140         * lang-options.h: Added a comma after the last element to avoid
13141         syntax errors when other languages define additional options.
13142
13143 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13144
13145         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13146         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13147         (jc1): Link with $(BACKEND).
13148         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13149
13150 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13151
13152         * jvspec.c: Adjust type of second argument to
13153         lang_specific_driver, and update code as necessary.
13154
13155         * class.c (build_dtable_decl): Initialize dummy.
13156
13157 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13158
13159         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13160         method bodies not to rule out discarding `<clinit>'; don't use
13161         <clinit> to initialize static fields with constant initializers.
13162
13163 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13164
13165         * gjavah.c (print_method_info): Added `synth' parameter. Skip
13166         synthetic methods.
13167         (method_synthetic): New global.
13168         (HANDLE_METHOD): Recognize synthetic method and tell
13169         `print_method_info' about it.
13170         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13171         processing a synthetic method.
13172         * jcf-reader.c (skip_attribute): New function.
13173         ( skip_attribute): Likewise.
13174
13175 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13176
13177         * parse.y (build_outer_field_access): Fixed comments.
13178         (fix_constructors): Emit the initialization of this$<n> before
13179         calling $finit$.
13180         (resolve_qualified_expression_name): Build an access to `decl' if
13181         necessary.
13182
13183 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13184
13185         * parse-scan.y (curent_class): Non longer const.
13186         (inner_qualifier, inner_qualifier_length): Deleted.
13187         (current_class_length): New global.
13188         (bracket_count): Fixed typo in leading comment.
13189         (anonymous_count): New global.
13190         (class_instance_creation_expression:): Handle anonymous classes.
13191         (anonymous_class_creation:): New rule.
13192         (push_class_context): Rewritten.
13193         (pop_class_context): Likewise.
13194         (INNER_QUALIFIER): Macro deleted.
13195         (report_class_declaration): call `push_class_context' when
13196         entering the function. `fprintf' format modified not to use
13197         INNER_QUALIFIER.
13198         (report_class_declaration): Assign `package_name' and
13199         `current_class' to NULL separately.
13200
13201 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13202
13203         * expr.c (build_invokeinterface): Call layout_class_methods on
13204         target interface.
13205
13206 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13207             Anthony Green  <green@cygnus.com>
13208             Alexandre Petit-Bianco  <apbianco@cygnus.com>
13209
13210         * class.c (make_class_data): Create vtable for abstract classes.
13211         (get_dispatch_table): Changed to cope with abstract classes.
13212
13213 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13214
13215         * parse.y (patch_method_invocation): Don't reverse the argument
13216         list when dealing with anonymous class constructors. Fixed typo in
13217         comment.
13218
13219 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13220
13221         * parse.y (build_alias_initializer_parameter_list): Reverse
13222         crafted list when building aliases for anonymous class
13223         constructors.
13224
13225 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13226
13227         * parse.y (jdep_resolve_class): Don't bother checking potential
13228         innerclass access if `decl' is NULL.
13229         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13230         WFL.
13231
13232 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13233
13234         * parse.c: Remove (again.)
13235
13236 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13237
13238         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13239         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13240         outside the `if' statement, alias to innerclass removed, `decl'
13241         used to mark the class complete.
13242
13243 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13244
13245         * parse.y (simple_name:): Fixed typo in error message.
13246
13247 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13248
13249         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13250         or its first operand can be error marks.
13251
13252 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13253
13254         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13255         * parse.y (method_header): Likewise.
13256
13257 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13258
13259         * parse.y (process_imports): Consider that one might be trying to
13260         import an innerclass. Fixes gcj/254
13261
13262 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13263
13264         * parse.y (find_as_inner_class): Handle the case where the
13265         enclosing context of an innerclass has been loaded as bytecode.
13266
13267 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13268
13269         * parse.y (simple_name:): Reject `$' in type names.
13270         (resolve_type_during_patch): Use `type' as a second
13271         argument to resolve_no_layout. Fixes gcj/257.
13272
13273 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13274
13275         * parse.y (find_most_specific_methods_list): Select the only
13276         non-abstract method even if max has been set.
13277         Fixes gcj/285, gcj/298.
13278
13279 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13280
13281         * lang-specs.h: Added %(jc1) to java compiler options.
13282
13283 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13284
13285         * .cvsignore: New file.
13286
13287 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13288
13289         * parse.y (not_accessible_p): Access granted to innerclasses
13290         (indirectly) extending the reference type. Fixes gcj/249.
13291
13292 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13293
13294         * parse.y (patch_method_invocation): Fixed comment.
13295         (maybe_use_access_method): Build this$<n>s to the context of the
13296         target method, or a type that extends it. Fixes gcj/242.
13297
13298 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13299
13300         * parse.c: Remove.
13301
13302 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13303
13304         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13305
13306 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13307
13308         * lang-specs.h: Added %{I*}.
13309
13310 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13311
13312         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13313
13314 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13315
13316         * parse-scan.c: Remove.
13317
13318 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13319
13320         * class.c (set_super_info): Handled protected inner classes.
13321         (common_enclosing_context_p): Bail early if arguments aren't both
13322         inner classes.
13323         (get_access_flags_from_decl): Handle private and protected inner
13324         classes.
13325         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13326         (CLASS_PROTECTED): Likewise.
13327         (struct lang_type): New bitfield `poic'.
13328         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13329         inner classes only.
13330         (check_inner_class_access): Renamed arguments, added
13331         comments. Handles protected inner classes (fixes gcj/225)
13332         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13333
13334 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13335
13336         * parse.y (resolve_qualified_expression_name): Verify qualified
13337         access to `this'. Fixes gcj/239.
13338
13339 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13340
13341         * jcf-write.c (generate_classfile): Don't install ConstantValue
13342         for null pointers.
13343
13344 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13345
13346         * parse.y (resolve_qualified_expression_name): Handle inner class
13347         access. Fixes gcj/256.
13348
13349 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13350
13351         * jcf-write.c (generate_classfile): Properly install the
13352         ConstantValue attribute and the initial value constant pool index
13353         on string constants.
13354         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13355         class files.
13356
13357 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13358
13359         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13360         construct.
13361         * parse.y (find_as_inner_class): Fixed typo.
13362         (do_resolve_class): Explore enclosing contexts when searching for
13363         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13364         (check_inner_class_access): Check `decl' which can be null in case
13365         of previous errors.
13366
13367 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13368
13369         * java-tree.h (java_debug_context): Declared `extern'.
13370         (safe_layout_class): Likewise.
13371         * parse.y (resolve_field_access): Field must be `static' in order
13372         to be replaced by its initial value. Added comments.
13373         (find_applicable_accessible_methods_list): Fixed typo.
13374         (find_most_specific_methods_list): Methods found in innerclasses
13375         take over methods founds in the enclosing contexts.
13376         (java_complete_tree): Loosen restrictions on the type of DECLs
13377         that can be replaced by their initialization values.
13378         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13379
13380 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13381
13382         * Make-lang.in (PARSE_DIR): New macro.
13383         (PARSE_RELDIR): Likewise.
13384         (PARSE_C): Likewise.
13385         (PARSE_SCAN_C): Likewise.
13386         ($(PARSE_C)): New target.
13387         ($(PARSE_SCAN_C)): Likewise.
13388         (SET_BISON): New macro.
13389         (BISONFLAGS): Likewise.
13390         (JAVABISONFLAGS): Likewise.
13391
13392 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13393
13394         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13395         argument on the first pass for CNI as well as JNI.
13396         (print_method_info): Set up method name on the first pass only.
13397
13398 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13399
13400         * parse.y (parser_qualified_classname): Removed parameter
13401         `is_static'.
13402         (create_interface): Removed first passed parameter to
13403         parser_qualified_classname.
13404         (create_class): Likewise. Don't install alias on static
13405         innerclasses. Fixes gcj/275.
13406
13407 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13408
13409         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13410         debugable statement with empty_stmt_node. Fixes gcj/272
13411
13412 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13413
13414         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13415         gcj/271.
13416
13417 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13418
13419         * jcf-write.c (push_long_const): Appropriately cast short negative
13420         constant to jword.
13421
13422 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13423
13424         * parse.y (verify_constructor_super): Use loop variable
13425         `m_arg_type' initialized with `mdecl_arg_type'.
13426
13427 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13428
13429         * parse.y (resolve_field_access): Handle case where `type_found'
13430         is NULL.
13431
13432 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13433
13434         * expr.c (lookup_field): The same field can be found through two
13435         different interface. Don't declare it ambiguous in that case.
13436
13437 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13438
13439         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13440         follows \r, then unget it at a lower level.
13441
13442 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13443
13444         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13445         java_complete_tree.
13446
13447 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13448
13449         * parse.y (for_statement): Wrap expression in a WFL if it is a
13450         constant.  For PR gcj/268.
13451
13452 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13453
13454         * parse.y (do_resolve_class): Minor optimiztion in the package
13455         list search. Removed unnecessary test and return statement.
13456         (valid_ref_assignconv_cast_p): Order of arguments to
13457         enclosing_context_p fixed.
13458
13459 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13460
13461         * expr.c (lookup_field): Print error and return error_mark_node if
13462         field reference is ambiguous.
13463
13464         * parse.y (check_abstract_method_definitions): Also check if
13465         `other_method' is abstract.
13466
13467 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13468
13469         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13470         classes.
13471         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13472         (struct lang_type): New field `pic'.
13473         (CLASS_PRIVATE): New macro.
13474         * parse.y (check_inner_class_access): New function.
13475         (jdep_resolve_class): Call it.
13476
13477 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13478
13479         * parse.y (patch_incomplete_class_ref): Initialize the returned
13480         class.  For PR gcj/260.
13481
13482 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13483
13484         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13485
13486 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13487
13488         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13489         Java specific checks.
13490         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13491         screened by DECL_P.
13492         * java-tree.def (CASE_EXPR): Marked 'e'.
13493         (DEFAULT_EXPR): Likewise.
13494         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13495         screened by DECL_P.
13496         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13497         Java specific checks.
13498         (generate_bytecode_insns): Test try_block for BLOCK before using
13499         BLOCK_EXPR_BODY.
13500         * parse.y (build_wfl_wrap): Added `location' argument. Set
13501         EXPR_WFL_LINECOL accordingly.
13502         (dim_expr:): Wrap constants with WFLs.
13503         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13504         (resolve_package): Check for `stmt' not being a BLOCK before
13505         building a debuggable statement with it.
13506         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13507         invocation.
13508         (resolve_field_access): Make sure `decl' is a DECL before treating
13509         it as such.
13510         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13511         IDENTIFIER_NODE before treating it as such.
13512         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13513         treating it as such.
13514         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13515         to be applied only on non array types.
13516
13517 2000-06-16  Per Bothner  <per@bothner.com>
13518
13519         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13520         define in terms of DECL_RESULT, as that fails when --enable-checking.
13521
13522 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13523
13524         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13525         types the same in comparison.
13526         (CHECK_OP): Add static prototype.
13527
13528 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13529
13530         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13531         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13532         * parse.c: Rebuilt.
13533
13534 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13535
13536         * decl.c (create_primitive_vtable): Prototype.
13537
13538         * jcf-write.c (generate_bytecode_insns): Initialize variable
13539         `saved_context'.
13540
13541         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13542
13543 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13544
13545         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13546         to track searched classes, and do not search the same class more than
13547         once. Call find_applicable_accessible_methods_list on immediate
13548         superclass, instead of search_applicable_method_list on all ancestors.
13549         Fix for PR gcj/238.
13550
13551 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13552
13553         * parse.y (register_fields): Permit static fields in inner classes
13554         if they are final. Fix for PR gcj/255.
13555
13556 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13557
13558         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13559         * parse.y (find_in_imports): Returned type changed to void,
13560         leading comment fixed.
13561         (register_package): New function.
13562         (qualify_and_find): Likewise.
13563         (package_declaration:): Use `register_package'.
13564         (single_type_import_declaration:): Removed local variable
13565         `node'. Added missing `;' for consistency.
13566         (type_import_on_demand_declaration:): Use `chainon' to link new
13567         entries.
13568         (lookup_field_wrapper): Lookup local variables defined in outer
13569         contexts first.
13570         (java_complete_class): Don't reverse the list of imported on demand.
13571         (do_resolve_class): Reorganized. Removed local variable
13572         `original_name'. Call `qualify_and_find' with the current package
13573         name, invoke `find_in_imports_on_demand' right after. Call
13574         `qualify_and_find' with the packages we've seen so far. Fixed
13575         operations numbering in comments.
13576         (java_expand_class): Don't reverse `package_list'.
13577         (find_most_specific_methods_list): New local variables `abstract'
13578         and `candidates'. Use them to pick the right method.
13579
13580 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
13581
13582         * parse.y (check_modifiers_consistency): Don't subtract out
13583         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13584
13585 2000-06-04  Philipp Thomas  <pthomas@suse.de>
13586
13587         * Makefile.in (INTLLIBS): New.
13588         (LIBS): Add above.
13589         (DEPLIBS): Ditto.
13590
13591 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13592
13593         * class.c (get_dispatch_table): Build the vtable dummy entry list
13594         element with a null purpose. Fixed leading comment.
13595         (build_dtable_decl): Build an accurate dtable type when appropriate
13596         and use it.
13597
13598 2000-06-02  Richard Henderson  <rth@cygnus.com>
13599
13600         * lang.c (lang_get_alias_set): New.
13601
13602 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13603
13604         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13605         before using it as the accessed field.
13606
13607 2000-05-31  Tom Tromey  <tromey@cygnus.com>
13608
13609         * java-tree.h (boolean_array_vtable, byte_array_vtable,
13610         char_array_vtable, short_array_vtable, int_array_vtable,
13611         long_array_vtable, float_array_vtable, double_array_vtable):
13612         Declare.
13613         * expr.c (get_primitive_array_vtable): New function.
13614         (create_primitive_vtable): New function.
13615         (java_lang_expand_expr): Enable code to statically generate
13616         arrays.
13617         * decl.c (init_decl_processing): Create primitive vtables.
13618         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13619         short_array_vtable, int_array_vtable, long_array_vtable,
13620         float_array_vtable, double_array_vtable): Define.
13621
13622 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
13623
13624         * java/parse.y (find_applicable_accessible_methods_list):
13625         Don't add an uninitialized value to the list.
13626
13627 2000-05-25  Tom Tromey  <tromey@cygnus.com>
13628
13629         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13630         when trying to see if field's class should be initialized.  Always
13631         initialize field's declaring class, not qualified class.
13632         For PR gcj/162.
13633
13634         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13635         `wfl_operator', to maybe_build_primttype_type_ref.
13636         Fixes PR gcj/235.
13637
13638 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
13639
13640         * parse.y (patch_method_invocation): Don't try to lookup methods
13641         in primitive types.
13642
13643 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13644
13645         * parse.y (resolve_field_access): Call the appropriate <clinit>
13646         before accessing the length of a static array. Craft a decl for
13647         the field while its time. Fixes PR gcj/129.
13648
13649 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13650
13651         * parse.y (resolve_package): Correctly set `*next' (was off by
13652         one.)
13653         (resolve_qualified_expression_name): Fixed comment.
13654
13655 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13656
13657         * jcf-parse.c (jcf_parse_source): Reset current_class and
13658         current_function_decl to NULL before parsing a new file.
13659
13660 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13661
13662         * parse.y (block_end:): If the collected block doesn't feature a
13663         statement, insert an empty statement.
13664
13665 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13666
13667         * parse.y (maybe_yank_clinit): New function.
13668         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13669         end of the list of methods belonging to a class.
13670         (java_complete_expand_method): Check whether <clinit> is really
13671         necessary and expand it accordingly.
13672
13673 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13674
13675         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13676         processed by the method's switch statement.
13677
13678 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13679
13680         * java-tree.h: Added init state enum.
13681         * decl.c (emit_init_test_initialization): Initialize class
13682         initialization check variable by looking at class' state.
13683
13684 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13685
13686         * java-tree.h (build_instanceof): Declare.
13687         (build_get_class): Declare.
13688         * parse.y (patch_binop): Use build_instanceof.
13689         * expr.c (build_instanceof): New function.  If class is final,
13690         don't make a function call.
13691         (expand_java_INSTANCEOF): Use it.
13692         (build_get_class): New function.
13693
13694 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
13695
13696         * jcf-write.c (generate_classfile): Scan the source_file for
13697         slashes with the right pointer variable.
13698
13699 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
13700
13701         * lang.c (lang_decode_option): Update -Wunused flags by calling
13702         set_Wunused.
13703         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13704
13705 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13706
13707         * check_init.c (check_init): Constify local char *.
13708         * class.c (push_class): Constify local char *.
13709         * java_tree.h: Update prototypes.
13710         * jcf-io.c (open_class): Constify filename parameter and
13711         return value.
13712         (find_class): Remove redundant string copy.  Cast return from
13713         open_class.
13714         * jcf-parse.c (read_class, parse_class_file, yyparse):
13715         Constify local char *.
13716         * jcf-write.c (generate_bytecode_insns, generate_classfile):
13717         Constify local char *.
13718         * jcf.h (JCF): Constify filename and classname.
13719         (JCF_FINISH): Cast args to FREE to char * when appropriate.
13720         * lang.c (init_parse): Constify parameter and return value.
13721         * lex.c (java_get_line_col): Constify filename parameter.
13722         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
13723         * parse.y (java_parser_context_suspend,
13724         issue_warning_error_from_context, safe_layout_class): Constify
13725         local char *.
13726         * parse.c: Regenerate.
13727
13728 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13729
13730         * expr.c (build_jni_stub): Cache the result of
13731         _Jv_LookupJNIMethod.
13732
13733 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13734
13735         * decl.c (predef_filenames_size): Now 7.
13736         (predef_filenames): New seventh entry.
13737
13738 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13739
13740         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13741         Keep track of when we've seen a reference field after a
13742         non-reference field.
13743         (get_boehm_type_descriptor): Handle case where we see
13744         non-reference fields but no trailing reference field.
13745         * decl.c (rawdata_ptr_type_node): Define.
13746         (init_decl_processing): Initialize rawdata_ptr_type_node.
13747         * java-tree.h (rawdata_ptr_type_node): Declare.
13748
13749 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13750
13751         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13752         specifiers in calls to fprintf.
13753
13754 2000-05-03  Andrew Haley  <aph@cygnus.com>
13755
13756         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13757
13758         * javaop.h (WORD_TO_INT): New function.
13759         (IMMEDIATE_s4): Use WORD_TO_INT.
13760         * jcf.h (JPOOL_INT): Ditto.
13761
13762         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13763         separator.
13764
13765 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13766
13767         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13768         on native function.
13769         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13770         JNI methods.
13771         * expr.c (build_jni_stub): New function.
13772         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13773         * parse.c: Rebuilt.
13774         * parse.y (java_complete_expand_methods): Expand a native method
13775         and call build_jni_stub if -fjni given.
13776         * lang-options.h: Document -fjni.
13777         * lang.c (flag_jni): New global.
13778         (lang_f_options): Added `jni' entry.
13779         * java-tree.h (soft_lookupjnimethod_node,
13780         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13781         Declare.
13782         (flag_jni): Declare.
13783         (build_jni_stub): Declare.
13784         (struct lang_decl): Added `native' flag.
13785         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13786         structure.
13787         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13788         soft_jnipopsystemframe_node): New globals.
13789         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13790         argument.
13791
13792         * java-tree.def: Put into `C' mode.
13793
13794 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13795
13796         Fix for PR gcj/2:
13797         * expr.c (expand_invoke): Generate check to see if object pointer
13798         is null in nonvirtual invocation case.
13799         * java-tree.h (soft_nullpointer_node): Declare.
13800         * decl.c (soft_nullpointer_node): New global.
13801         (init_decl_processing): Initialize soft_nullpointer_node.
13802         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13803         or `private' methods.
13804         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13805
13806 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13807
13808         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13809         from <clinit>
13810
13811 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13812
13813         * zextract.c (find_zip_file_start): New function.
13814         (read_zip_archive): Use it.
13815
13816 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13817
13818         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13819
13820 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13821
13822         * class.c (common_enclosing_context_p): New function.
13823         * java-tree.h (common_enclosing_context_p): Added prototype.
13824         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13825         classes sharing an outer context with the current instance.
13826         * parse.y (build_access_to_thisn): Fixed leading comment.
13827         (verify_constructor_super): New local `supper_inner'. Skip
13828         enclosing context argument in the case of inner class constructors.
13829         (patch_method_invocation): Insert proper context as second
13830         parameter to pure inner class constructor super invocations.
13831
13832 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13833
13834         * parse.y (end_class_declaration): Reset the interface number
13835         counter.
13836
13837 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13838
13839         * parse.y (source_start_java_method): Deleted unnecessary code.
13840         (patch_method_invocation): Fixed comment.
13841
13842 2000-04-24  Robert Lipe <robertlipe@usa.net>
13843
13844         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13845
13846 2000-04-23  Tom Tromey  <tromey@cygnus.com>
13847
13848         * boehm.c (mark_reference_fields): Use int_byte_position.
13849
13850 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13851
13852         * boehm.c (mark_reference_fields): Only call byte_position on
13853         non-static fields.
13854
13855 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13856
13857         * boehm.c (mark_reference_fields): Added `last_view_index'
13858         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
13859
13860 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
13861
13862         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13863         * parse.y (check_class_interface_creation): Fixed comments. Select
13864         permitted modifiers for (inner) interfaces. Changed error message
13865         to report rejected modifiers used with local classes.
13866
13867 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13868
13869         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13870         of directly inherited type considered in scope.
13871         * parse.y (do_resolve_class): Search inherited classes for inner
13872         classes.
13873
13874 2000-04-20  Tom Tromey  <tromey@cygnus.com>
13875
13876         * parse.y (not_accessible_p): Use member's class, not current
13877         class, when doing inheritance check for protected reference.
13878         Fixes PR gcj/124.
13879
13880 2000-04-20  Jason Schroeder  <shrode@subnature.com>
13881
13882         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13883
13884 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13885
13886         * parse.y (lookup_field_wrapper): Search for final local aliases.
13887         (resolve_expression_name): Let lookup_field_wrapper search for
13888         final local aliases. Force the value of `name' if one is found.
13889         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13890         an expression name. Fixed comments.
13891
13892 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13893
13894         * parse.y (yyerror): `msg' can be null, don't use it in that case.
13895
13896 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13897
13898         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13899
13900 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13901
13902         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13903
13904 2000-04-18  Tom Tromey  <tromey@cygnus.com>
13905
13906         PR gcj/211:
13907         * gjavah.c (utf8_cmp): Changed return value.
13908         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
13909         result.
13910         (cxx_keywords): New global.
13911         (get_field_name): Handle new result of cxx_keyword_subst.
13912         (print_method_info): Likewise.
13913
13914 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
13915
13916         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13917         with a newline, for CNI.
13918         (print_stub_or_jni): Print a space or newline before method name for
13919         CNI as well as JNI.
13920         (print_cxx_classname): Don't write leading "::" in CNI stub method.
13921         (process_file): Include gcj/cni.h if generating CNI stubs.
13922
13923 2000-04-16  Tom Tromey  <tromey@cygnus.com>
13924
13925         * gjavah.c (decompile_method): Use print_field_name.
13926         Fixes PR gcj/205.
13927
13928 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13929
13930         * parse.y (java_expand_classes): Reverse the package list once.
13931         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13932         reduction.
13933         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13934         the `==' and `!=' operators.
13935
13936 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13937
13938         * jcf-write.c (generate_bytecode_insns): At invocation time,
13939         always relate an interface method to the type of its selector.
13940
13941 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13942
13943         Fix for PR gcj/2:
13944         * expr.c (expand_invoke): Generate check to see if object pointer
13945         is null in nonvirtual invocation case.
13946         * java-tree.h (soft_nullpointer_node): Declare.
13947         * decl.c (soft_nullpointer_node): New global.
13948         (init_decl_processing): Initialize soft_nullpointer_node.
13949         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13950         or `private' methods.
13951         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13952
13953 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13954
13955         Fix for PR gcj/140:
13956         * parse.y (check_final_assignment): Recognize assignments to the
13957         `length' field of an array when generating class files.
13958
13959 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13960
13961         * class.c (decl_hash): Prototype removed.
13962         (decl_compare): Likewise.
13963
13964 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13965
13966         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13967         * parse.y (check_modifiers_consistency): Check for final/volatile
13968         clash.  Fixes PR gcj/164.
13969
13970 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13971
13972         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13973         made global.
13974         (java_hash_compare_tree_node): Renamed from `decl_compare, made
13975         global.
13976         (add_method_1): Use `java_hash_hash_tree_node' and
13977         `java_hash_compare_tree_node'.
13978         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13979         (java_hash_compare_tree_node): Likewise.
13980         * parse.y (find_applicable_accessible_methods_list): Create,
13981         delete and use a hash table to remember already searched interfaces.
13982
13983 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
13984
13985         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13986         with latest entry.
13987
13988 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13989
13990         * boehm.c (mark_reference_fields, set_bit): Prototype.
13991         (set_bit): Un-ANSI-fy definition.
13992
13993         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13994         Prototype.
13995
13996         * decl.c (emit_init_test_initialization): Likewise.
13997
13998         * gjavah.c (jni_print_char): Likewise.
13999
14000         * parse.y (create_new_parser_context): Likewise.
14001
14002 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14003
14004         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14005         patch missing hunk. Fixed indentation.
14006
14007 2000-03-30  Tom Tromey  <tromey@cygnus.com>
14008
14009         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14010         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14011
14012 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14013
14014         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14015         when negative *before* using it as an array index.
14016         * ChangeLog: Fixed typo.
14017
14018 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14019
14020         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14021         to 0 when it reaches -1.
14022
14023 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14024
14025         * jcf-parse.c (get_constant): Properly cast `num' during the
14026         invocation of `add_double'.
14027         * jcf-write.c (push_long_const): Properly cast `lo' before
14028         comparing it to short bounds.
14029         * parse-scan.y (interface_declaration:): Rule re-arrange so that
14030         `interface_body:' is reduced after the current interface is
14031         pushed.
14032
14033 2000-03-26  Tom Tromey  <tromey@cygnus.com>
14034
14035         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14036         Java-specific `-f' option.
14037
14038 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14039
14040         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14041         Adjust order of making types.
14042         Make bitsize_*_node values.
14043
14044 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14045
14046         * class.c (make_field_value): Use byte_position.
14047         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14048         (java_array_data_offset): Likewise.
14049         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14050         bzero call.
14051
14052 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14053
14054         * parse.y (check_abstract_method_definitions): New local
14055         `end_type_reached'. Make sure we also consider `end_type'.
14056         (java_check_abstract_method_definitions): Make sure we eventually
14057         consider `java.lang.Object'.
14058         (maybe_use_access_method): Don't use access method if not in the
14059         context of a pure inner class or if the method's context is right.
14060         (find_applicable_accessible_methods_list): New static flag
14061         `object_done'. Don't search abstract classes as interfaces. Fixed
14062         indentation. Fixed the `java.lang.Object' only search. Search
14063         class interface(s) first, then fully search enclosing contexts.
14064         (find_most_specific_methods_list): Pick the closest candidate when
14065         they're all abstract.
14066
14067 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14068
14069         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14070         properly initialize `finished_label'. Don't emit gotos for empty
14071         try statements.
14072
14073 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14074
14075         * except.c (emit_handlers): Clear catch_clauses_last.
14076
14077 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14078
14079         * parse.y (check_method_types_complete): New function.
14080         (create_class): Reset anonymous class counter only when seeing an
14081         non inner classe.
14082         (java_complete_class): JDEP_METHOD: Don't recompute signature
14083         if incomplete.
14084
14085 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14086
14087         * class.c (build_static_ref): Fixed indentation in comment.
14088         * java-tree.def (TRY_EXPR): Fixed typo in name.
14089         (CLASS_LITERAL): Likewise.
14090         * java-tree.h: (TYPE_DOT_CLASS): New macro.
14091         (struct lang_type): New field `dot_class'.
14092         * jcf-write.c (generate_bytecode_insns): Fixed error message.
14093         (generate_classfile): Method `class$' is synthetic.
14094         * parse.y (build_do_class_method): New function.
14095         (build_dot_class_method_invocation): Likewise.
14096         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14097         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14098         (qualify_ambiguous_name): Likewise.
14099         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14100         (build_try_statement): Fixed leading comment.
14101
14102 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14103
14104         * class.c (make_field_value): Properly handle sizes.
14105         (get_dispatch_vector): Use tree_low_cst and host_integerp.
14106         (layout_class_method): Count using trees.
14107         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14108         * expr.c (java_array_data_offset): Use int_bit_position.
14109         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14110         (build_invokevirtual): Use tree_low_cst and do computations with trees.
14111
14112 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14113
14114         * lang.c (flag_hash_synchronization): New global.
14115         (lang_f_options): Added `hash-synchronization'.
14116         * lang-options.h: Mention -fhash-synchronization.
14117         * java-tree.h (flag_hash_synchronization): Declare.
14118         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14119         hash table synchronization is disabled.
14120         * decl.c (init_decl_processing): Only push `sync_info' value when
14121         hash table synchronization is disabled.
14122         * class.c (make_class_data): Only push `sync_info' field when hash
14123         table synchronization is disabled.  Removed dead code.
14124
14125 2000-03-16  Tom Tromey  <tromey@cygnus.com>
14126
14127         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14128
14129 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14130
14131         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14132         classes.
14133         * parse.y (patch_method_invocation): Handle anonymous classes
14134         creation in static context.
14135
14136 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14137
14138         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14139         * parse.y (resolve_qualified_expression_name): Use it.
14140         (patch_method_invocation): Likewise.
14141
14142 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14143
14144         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14145         depending on the type of dependency which dictates what the
14146         current class is.
14147         (unresolved_type_p): Resolved types limited to the current class.
14148
14149 2000-03-15  Tom Tromey  <tromey@cygnus.com>
14150
14151         * decl.c (init_decl_processing): Set type of `sync_info' to be
14152         pointer to Object.
14153
14154         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14155         Correctly compute bit number for current slot.  Zero `high' and
14156         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
14157         mark_reference_fields.
14158         (mark_reference_fields): New function.
14159
14160 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14161
14162         * parse.y (register_incomplete_type): Fixed initialization of
14163         JDEP_ENCLOSING.
14164
14165 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14166
14167         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14168         static globals.
14169         (push_class_context, pop_class_context): New function.
14170         (class_body:): Call pop_class_context.
14171         (interface_body:): Likewise.
14172         (INNER_QUALIFIER): New macro.
14173         (report_class_declaration): Changed output format and use
14174         INNER_QUALIFIER. Call push_class_context.
14175
14176 2000-02-14  Andrew Haley  <aph@cygnus.com>
14177
14178         * check-init.c (check_init): Add new cases for unary and binary
14179         tree nodes.
14180
14181 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14182
14183         * parse.y (resolve_package): Set `next' once a type name has been
14184         progressively discovered.
14185         (resolve_qualified_expression_name): Propagate resolution only if
14186         there are remaining qualifiers. Take into account `q' might have
14187         been cleared after re-qualification.
14188         * parse.y (patch_method_invocation): New local `resolved'.
14189         Section dealing with qualified expression rewritten to use
14190         resolve_field_access.
14191
14192 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14193
14194         * parse.h (PUSH_CPC): Fixed indentation.
14195         (DEBUG_CPC): New macro.
14196         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14197         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14198         * parse.y (class_body_declaration:): Use
14199         SET_CPC_INSTANCE_INITIALIZER_STMT.
14200         (method_declaration:): Check for null current_function_decl.
14201         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14202         (java_parser_context_pop_initialized_field): Better handling of
14203         empty lists.
14204         (maybe_make_nested_class_name): Mark nested class name as
14205         qualified when necessary.
14206         (end_class_declaration): Don't call java_parse_context_resume when
14207         one or more error occurred.
14208         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14209         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14210         SET_CPC_INITIALIZER_STMT.
14211         (method_header): Check for inner classes declaring static methods.
14212         (resolve_qualified_expression_name): Handle situation where `this'
14213         is implied.
14214
14215 2000-03-13  Hans Boehm <boehm@acm.org>
14216
14217         * typeck.c (build_prim_array_type): Correctly set the high word too.
14218
14219 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14220
14221         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14222         ordinary methods.
14223         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14224         list of methods for interfaces.
14225
14226 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14227
14228         * parse.y (qualify_ambiguous_name): Properly handle expressions
14229         using `null'.
14230
14231 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14232
14233         * parse.y (check_final_assignment): Extended to process
14234         COMPOUND_EXPR.
14235         (patch_assignment): Have check_final_assignment called only once.
14236
14237 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14238
14239         * java-tree.h (IS_INIT_CHECKED): New flag.
14240         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14241         * parse.y (patch_string): Call force_evaluation_order on the
14242         completed string concatenation tree.
14243         * expr.c (force_evaluation_order): Call force_evaluation_order on
14244         function's arguments too.
14245
14246 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14247
14248         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14249         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14250         (build_anewarray): Likewise.
14251         * parse.y (patch_newarray): Likewise.
14252         * parse.c: Regenerated.
14253
14254 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14255
14256         * decl.c (init_decl_processing): Added new class fields `depth',
14257         `ancestors', and `idt' to class_type_node. Use
14258         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14259         * class.c (make_class_data): Push initial values for new fields.
14260         * java-tree.h: Updated prototype for `build_invokeinterface'.
14261         * expr.c (build_invokeinterface): Changed parameters to accept
14262         `method' tree. Calculate index of `method' in its declaring
14263         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14264         (expand_invoke): Call `build_invokeinterface' with new parameters.
14265         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14266         parameters.
14267
14268 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14269
14270         * typeck.c (lookup_do): Search superinterfaces first
14271         when looking up an interface method. From Godmar Back
14272         <gback@cs.utah.edu>
14273
14274 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14275
14276         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14277
14278 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14279
14280         * java-tree.h (lookup_argument_method2): Declared.
14281         (safe_layout_class): Prototype moved from parse.h.
14282         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14283         * parse.y (java_check_regular_methods): Local `super_class' gone.
14284         Call lookup_argument_method2 instead of lookup_argument_method.
14285         Perform modifier match for methods found declared in implemented
14286         interfaces. Fixed indentation problem. Overriding/hiding error
14287         report to take place only for methods found in classes.
14288         * typeck.c (lookup_argument_method): Changed leading
14289         comment. Re-written by calling lookup_do.
14290         (lookup_argument_method2): New function.
14291         (lookup_java_method): Re-written by calling lookup_do.
14292         (lookup_do): New function.
14293
14294 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14295
14296         * check-init.c (check_init): Removed dead code. Handle (blank)
14297         final variables.
14298         * parse.y (declare_local_variables): New local `final_p', set it
14299         and use it to initialize LOCAL_FINAL.
14300         (check_final_assignment): Only check FIELD_DECLs.
14301
14302 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14303
14304         * Makefile.in (JAVA_OBJS): Added boehm.o.
14305         (boehm.o): New target.
14306         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14307         * java-tree.h (flag_use_boehm_gc): Declare.
14308         (get_boehm_type_descriptor): Declare.
14309         * lang.c (lang_f_options): Added `use-boehm-gc'.
14310         (flag_use_boehm_gc): New global.
14311         * lang-options.h: Added -fuse-boehm-gc.
14312         * boehm.c: New file.
14313         * class.c (get_dispatch_table): If class uses a Boehm type
14314         descriptor, put it in the vtable.
14315         (make_class_data): Removed dead code.
14316
14317 2000-03-03  Per Bothner  <per@bothner.com>
14318
14319         * decl.c (init_decl_processing):  Initialize sizetype properly.
14320
14321 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14322
14323         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14324         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14325         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14326         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14327         (jcf_parse): New local `current'. Load innerclasses seen in outer
14328         context being processed.
14329         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14330         * jcf-write.c (append_innerclasses_attribute): New function.
14331         (append_innerclasses_attribute_entry): Likewise.
14332         (get_access_flags): Handle static classes. Set anonymous and local
14333         classes to be private.
14334         (generate_classfile): Attribute count adjusted. Call
14335         append_innerclasses_attribute.
14336         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14337         PURE_INNER_CLASS_TYPE_P.
14338         * parse.y (parser_qualified_classname): New parameter `is_static',
14339         produce non qualified name accordingly.
14340         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14341         (create_interface): Added argument to parser_qualified_classname.
14342         (create_class): Added argument to parser_qualified_classname. Setup
14343         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14344         (add_inner_class_fields): Fixed indentation.
14345         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14346         (method_declarator): Fixed typo in comment.
14347         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14348         (build_current_thisn): Likewise.
14349         (patch_method_invocation): Likewise.
14350
14351 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14352
14353         * decl.c (current_function_decl): Move to toplev.c.
14354
14355 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14356
14357         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14358         (DECL_BIT_INDEX): Use underlying representation.
14359         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14360
14361 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14362
14363         * expr.c (build_java_ret): Pass proper type to size_binop.
14364
14365 2000-02-25  Anthony Green  <green@cygnus.com>
14366
14367         * expr.c (build_class_init): Mark the decl to be ignored by
14368         check_init.
14369         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14370         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14371         * class.c (init_test_hash_newfunc): New function.
14372         (decl_hash): New function.
14373         (decl_compare): New function.
14374         * decl.c (emit_init_test_initialization): New function.
14375         (complete_start_java_method): Traverse the init test hashtable,
14376         calling emit_init_test_initialization.
14377         (always_initialize_class_p): Define.
14378         * expr.c (build_class_init): Use initialization tests when
14379         emitting class initialization code.
14380         (always_initialize_class_p): Declare.
14381         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14382         1.
14383         * java-tree.h: Include hash.h.
14384         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14385         (struct lang_decl): Add init_test_table field.
14386         (init_test_hash_entry): Define.
14387
14388 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14389
14390         * gjavah.c (main): Avoid using `argi' to report unimplemented
14391         options.
14392
14393 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14394
14395         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14396         initialize locals to avoid warnings. Local `exception_type' moved
14397         into if statement.
14398
14399 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14400
14401         * parse.y (resolve_expression_name): Use `orig' as a second
14402         argument to resolve_field_access.
14403         (resolve_field_access): Removed unnecessary code when dealing with
14404         static fields.
14405
14406 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14407
14408         * class.c (push_super_field): Don't push the field twice.
14409         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14410         * parse.h (java_reorder_fields): Prototyped.
14411         * parse.y (java_reorder_fields): New function.
14412         (java_layout_class): Simplified not to worry about re-ordering.
14413
14414 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14415
14416         * gjavah.c (print_name): In JNI case, correctly quote string.
14417         (print_method_info): Don't handle overrides in JNI mode.
14418
14419 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14420
14421         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14422         value type set to `boolean_type_node'.
14423
14424 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14425
14426         * jcf-dump.c (main): Test for correct condition after
14427         output file creation.
14428
14429 2000-02-19  Anthony Green  <green@cygnus.com>
14430
14431         * jcf-depend.c (add_entry): Fix test for first list entry.
14432
14433 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14434
14435         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14436         * constants.c (build_constants_constructor): Likewise.
14437
14438 2000-02-19  Anthony Green  <green@cygnus.com>
14439
14440         * jcf-depend.c (add_entry): Add entries to the end of the list.
14441
14442 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14443
14444         * decl.c (INT_TYPE_SIZE): Define if necessary.
14445         (expand_java_return): Handle the case of a native integer smaller
14446         than a JVM integer.
14447
14448 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14449
14450         * gjavah.c (help): Use GCCBUGURL.
14451         * jv-scan.c (help): Likewise.
14452         * jcf-dump.c (help): Likewise.
14453
14454 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14455
14456         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14457         `finally' clauses.
14458
14459 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14460
14461         * jcf-parse.c (load_class): Call `fatal' if no file containing
14462         the target class are found.
14463
14464 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14465
14466         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14467         lex.c, lex.h, and PARSE_H to...
14468         (parse.o, parse-scan.o): ...here, respectively.
14469
14470         * lex.c: Split out code that may trigger SIGFPE from yylex()
14471         to its own function.
14472         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14473
14474 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14475
14476         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14477
14478 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14479
14480         * parse.y (outer_field_access_p): Stop in time when outer contexts
14481         are exhausted.
14482         (resolve_qualified_expression_name): Properly qualify *everything*
14483         after a package.type to be resoled as expression names.
14484         (find_applicable_accessible_methods_list): Save/restore `class' to
14485         isolate it from a possible outer context search.
14486
14487 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14488
14489         * gjavah.c (jni_print_char): New function.
14490         (print_full_cxx_name): Use it.
14491         (decode_signature_piece): Likewise.
14492         (print_cxx_classname): Likewise.
14493
14494 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14495
14496         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14497         version.o.
14498         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14499
14500         * gjavah.c: Include version.h.
14501
14502         * jcf-dump.c: Likewise.
14503
14504         * jv-scan.c: Likewise.
14505
14506 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14507
14508         * parse.y (outer_field_access_fix): First parameter now a tree
14509         node. Check for assignment to final. First argument to
14510         build_outer_field_access_fix modified to accommodate prototype.
14511         (build_outer_field_access): Don't check for assignment to final
14512         here.
14513         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14514         possibly returned by outer_field_access_fix. Changed
14515         outer_field_access_fix's first argument.
14516         (check_final_assignment): $finit$'s context is OK.
14517         (patch_unaryop): Use node instead of its line/column value when
14518         calling outer_field_access_fix.
14519
14520 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14521
14522         * parse.y (interface_declaration:): No longer tagged
14523         <node>. Re-installed default action.
14524         (class_member_declaration:): Handle inner interfaces.
14525         (interface_member_declaration): Handle inner interfaces and
14526         classes.
14527         (create_interface): Push error if one seen. Suspend parsing
14528         context when processing an inner interface.
14529         (register_fields): Inner class static field limitations not to
14530         apply to inner interfaces.
14531
14532 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14533
14534         * jcf-parse.c (load_class): Update `java_error_count' when a
14535         class' file can't be found.
14536         (parse.y): Avoid (byte)code generation when errors seen.
14537
14538 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14539
14540         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14541         decodes a valid node.
14542         (patch_binop): Handle TRUNC_DIV_EXPR.
14543
14544 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14545
14546         * parse.y (resolve_package): New local `acc'. Try to progressively
14547         build and guess a package and type name.
14548
14549 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14550
14551         * parse.y (find_applicable_accessible_methods_list): Load and
14552         layout the search class if necessary.
14553         (java_complete_tree): Keep to original type of the folded initial
14554         value.
14555
14556 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14557
14558         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14559         Generate error message if circularity is detected. New static
14560         local `list'.
14561         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
14562         * jcf-write.c (generate_bytecode_insns): Very simply handle
14563         SAVE_EXPR.
14564         * parse.y (java_check_circular_reference): Use
14565         `cyclic_inheritance_report' during report, if necessary.
14566         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14567         walking NEW_ARRAY_INIT twice.
14568
14569 2000-02-09  Tom Tromey  <tromey@cygnus.com>
14570
14571         * parse.y (check_class_interface_creation): Allow inner classes to
14572         be `private' or `protected', check modifiers' consistency. Prevent
14573         block local classes from bearing any modifiers.
14574
14575 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14576
14577         * except.c (check_start_handlers): Re-add prototype lost in last
14578         patch.
14579         (maybe_start_try): Remove excess argument to `check_start_handlers'.
14580
14581 2000-02-09  Andrew Haley  <aph@cygnus.com>
14582
14583         * decl.c (clear_binding_level): Remove excess initializer.
14584         (maybe_poplevels): Remove unused variable.
14585         (force_poplevels): Ditto.
14586         (struct binding_level): Add comment.
14587
14588 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14589
14590         * jcf-write.c (generate_classfile): Don't consider
14591         pre-initialization with reference value (use <clinit> instead.)
14592         * parse.y (java_fix_constructors): No generated constructor for
14593         interfaces.
14594         (build_outer_field_access): Removed debug message.
14595         (outer_field_expanded_access_p): Adapted to bytecode generation.
14596         (build_outer_field_access_method): Use fix_method_argument_names.
14597         (build_outer_method_access_method): Fixed indentation. Added
14598         comment. Handle access method generation for static and also void
14599         methods.
14600         (build_access_to_thisn): Inserted debug message.
14601         (maybe_build_thisn_access_method): Use fix_method_argument_names.
14602         (resolve_qualified_expression_name): Fixed comment.
14603         (not_accessible_p): Adapted to bytecode generation. Added comment.
14604         (patch_method_invocation): Added comment.
14605         (maybe_use_access_method): Fixed leading comment. Handle static
14606         methods.
14607         (java_complete_lhs): Don't shortcut handling of initialized upon
14608         declaration String type static fields when generating bytecode.
14609         (patch_unaryop): Handle outer field access when generating
14610         bytecode.
14611
14612 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14613
14614         * java-tree.h (FIELD_THISN): New macro.
14615         * jcf-write.c (append_synthetic_attribute): New function.
14616         (generate_classfile): Set "Synthetic" attribute on this$<n>,
14617         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14618         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14619         this$<n> fields.
14620         (build_outer_field_access): Turned on access functions usage and
14621         generation when compiling to bytecode.
14622         (maybe_use_access_method): Likewise.
14623
14624 2000-01-25  Andrew Haley  <aph@cygnus.com>
14625
14626         * java-except.h (struct eh_range): Add `expanded' field.
14627         (maybe_start_try): Add end_pc arg.
14628         (maybe_end_try): Ditto.
14629         * java-tree.h (force_poplevels): new function.
14630         * expr.c (expand_byte_code): Don't call maybe_start_try or
14631         maybe_end_try.
14632         * except.c (add_handler): Reset expanded.
14633         (expand_start_java_handler): Set expanded.
14634         (check_start_handlers): Don't expand a start handler that's
14635         already been expanded.
14636         (maybe_start_try): Add end_pc arg.  Only expand a handler which
14637         ends after end_pc.
14638         (expand_end_java_handler): call force_poplevels.
14639         (force_poplevels): new function.
14640         * decl.c (binding_level): Add start_pc of binding level.
14641         (maybe_pushlevels): Call maybe_start_try when pushing binding
14642         levels.
14643         (maybe_poplevels): Call maybe_end_try when popping binding levels.
14644         (LARGEST_PC): Define.
14645         (clear_binding_level): Use LARGEST_PC.
14646
14647         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14648         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14649         (binding_depth, is_class_level, current_pc): new variables.
14650         (struct binding_level): ditto.
14651         (indent): new function.
14652         (push_jvm_slot): add debugging info.
14653         (maybe_pushlevels): ditto.
14654         (maybe_poplevels): ditto.
14655         (pushlevel): ditto.
14656         (poplevel): ditto.
14657         (start_java_method): ditto.
14658         (give_name_to_locals): comment only.
14659         * except.c (binding_depth, is_class_level, current_pc):
14660         new variables.
14661         (expand_start_java_handler): add debugging info.
14662         (expand_end_java_handler): ditto.
14663
14664 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14665
14666         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14667         (print_name_for_stub_or_jni, process_file): Constify a char*.
14668
14669 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14670
14671         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14672
14673 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14674
14675         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14676         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14677         defined to be 1.
14678
14679 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14680
14681         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14682         * java-tree.h (TYPE_II_STMT_LIST): New macro.
14683         (struct lang_type): New field `ii_block'.
14684         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14685         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14686         * parse.h (struct parser_ctxt): New field `instance_initializers'.
14687         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14688         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14689         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14690         macros.
14691         * parse.y (add_instance_initializer): New function.
14692         (in_instance_initializer): New static global.
14693         (class_body_declaration:): Link instance initializer block.
14694         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14695         (array_creation_expression:): Remove unused local.
14696         (java_parser_context_push_initialized_field): Fixed leading
14697         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14698         CPC_INSTANCE_INITIALIZER_LIST.
14699         (java_parser_context_pop_initialized_field): Likewise.
14700         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14701         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14702         CPC_INITIALIZER_STMT.
14703         (fix_constructors): New local `class_type'. Use it. Call
14704         add_instance_initializer.
14705         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14706         (patch_return): Forbid return in instance initializers.
14707         (patch_throw_statement): Enforce exception handling in the context
14708         of instance initializers.
14709
14710 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14711
14712         * Make-lang.in (java.mostlyclean): Remove executables in
14713         `mostlyclean'.
14714
14715 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14716
14717         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14718         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14719         (java_float_finite): Convert to use union Word from javaop.h.
14720         (java_double_finite): Convert to use union DWord from javaop.h.
14721
14722 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14723
14724         * gjavah.c (options): Added `jni' entry.
14725         (help): Document -jni.
14726         (flag_jni): New global.
14727         (process_file): Handle JNI output.  Don't print text from
14728         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14729         suffix if it actually exists.
14730         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14731         correct output file name with `--jni'.
14732         (print_include): Mangle header name differently in JNI case.
14733         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14734         method list.
14735         (print_method_info): Handle JNI case.  Put signature info into
14736         method name.  Handle case when STREAM is NULL.
14737         (print_name_for_stub_or_jni): New function.
14738         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14739         (print_cxx_classname): Handle JNI.
14740         (print_full_cxx_name): Likewise.
14741         (decode_signature_piece): Likewise.
14742         (overloaded_jni_method_exists_p): New function.
14743         (struct method_name): Added `signature' and `sig_length' fields.
14744         (HANDLE_END_FIELD): Do nothing in JNI mode.
14745
14746 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14747
14748         * jv-scan.c: Include version.c, <getopt.h>.
14749         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14750         (options): New array.
14751         (usage): New function.
14752         (version): New function.
14753         (main): Use getopt_long to parse command line.
14754         * jcf-dump.c: Include version.c, <getopt.h>.
14755         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14756         OPT_JAVAP): New macros.
14757         (options): New array.
14758         (usage): Return `void'.  Changed message.
14759         (help): New function.
14760         (version): New function.
14761         (main): Use getopt_long_only to parse command line.
14762         * gjavah.c: Include <getopt.h>.
14763         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14764         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14765         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14766         (options): New array.
14767         (java_no_argument): Removed.
14768         (help): Updated with missing options.
14769         (main): Use getopt_long_only to parse command line.
14770         (usage): Changed message.
14771
14772 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14773
14774         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14775         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14776         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14777         * parse.y (array_creation_expression:): Handle anonymous arrays.
14778         (build_array_from_name): Don't set `ret_name' if null.
14779         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14780         (qualify_ambiguous_name): Likewise.
14781         (java_complete_expand_class): Likewise.
14782
14783 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14784
14785         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14786         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14787         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14788         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14789         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14790         AIPL_FUNCTION_COMPLETED_INVOCATION.
14791         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14792         AIPL_FUNCTION_INVOCATION_READY.
14793         (AIPL_FUNCTION_DECLARATION): New enum entry.
14794         * parse.y (reorder_static_initialized): New function.
14795         (java_parser_context_pop_initialized_field): Use it.
14796         (add_inner_class_fields): Use
14797         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14798         augmented. Install marker after last alias initializer, if any.
14799         (generate_finit): Fixed typo. Don't try to retain only the used
14800         fields.
14801         (method_header): Compute and set DECL_FUNCTION_NAP.
14802         (method_declarator): Fixed comment. Insert alias initializer in
14803         parameter list.
14804         (build_alias_initializer_parameter_list): Fixed leading
14805         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14806         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14807         (java_complete_expand_class): Code to retain only used aliases
14808         removed.
14809         (java_complete_expand_methods): New local `first_decl'. Generate
14810         $finit$ first, then expand the constructors, regular methods and
14811         <clinit>.
14812         (java_complete_expand_method): Don't report error on missing
14813         return statement if previously detected bogus.
14814         (fix_constructors): Don't patch constructor parameters list.
14815         (patch_method_invocation): Use new AIPL enum values. Reverse
14816         alias initializer list for anonymous classes.
14817
14818 2000-01-30  Anthony Green  <green@redhat.com>
14819
14820         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14821         determine how many stack slots to pop.
14822
14823 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14824
14825         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14826         error handling/recovery.
14827         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14828
14829 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14830
14831         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14832         FIELD_LOCAL_ALIAS_USED): New macros.
14833         (DECL_FUNCTION_NAP): New macro.
14834         (struct lang_decl): New field `nap'.
14835         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14836         (struct lang_type): New fields `finit_stmt_list' and
14837         `clinit_stmt_list'.
14838         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14839         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14840         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14841         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14842         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14843         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14844         (BUILD_THROW): Macro line separator re-indented.
14845         * parse.y (end_class_declaration): New function.
14846         (maybe_generate_pre_expand_clinit): New name for
14847         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14848         pre-expand static fields.
14849         (maybe_generate_clinit): Function deleted.
14850         (check_for_static_method_reference): Prototype's parameter list
14851         indented.
14852         (generate_finit): New name for maybe_generate_finit. Changed
14853         leading comment. Function rewritten to use
14854         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14855         (build_alias_initializer_parameter_list): New function.
14856         (java_parser_context_pop_initialized_field): Likewise.
14857         (add_inner_class_fields): Likewise.
14858         (type_declaration:): Call end_class_declaration.
14859         (class_member_declaration:): Likewise.
14860         (formal_parameter_list:): Fixed typos.
14861         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14862         element. Improved error handling.
14863         (block_statement:): Call end_class_declaration.
14864         (anonymous_class_creation:): Likewise.
14865         (create_anonymous_class): Fixed comments.
14866         (create_class): Call add_inner_class_fields.
14867         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14868         (method_header): Use MARK_FINAL_PARMS.
14869         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14870         (method_declarator): Propagate final argument flag.
14871         (craft_constructor): New local `artificial'. Call
14872         build_alias_initializer_parameter_list. Use
14873         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14874         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14875         necessary.
14876         (complete_expand_class): Get rid of unused outer context local
14877         alias fields.
14878         (java_complete_expand_methods): Fixed leading
14879         comment. Generate/pre-expand <clinit> first. Changed method
14880         expansion order to regular, $finit$, constructors, <clinit>.
14881         (java_complete_expand_method): Set current_function_decl.
14882         (fix_constructors): Fix constructor parameter list to account for
14883         outer context local alias initializers.
14884         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14885         (resolve_expression_name): Lookup outer context local aliases. New
14886         local `access', use it.
14887         (patch_method_invocation): Patch inner class ctor invocation with
14888         outer context local aliases initialization values. $finit$
14889         invocation patching now includes things generated with
14890         build_alias_initializer_parameter_list.
14891         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14892         (build_super_invocation): Likewise.
14893         (patch_assignment): Changed comment.
14894
14895 2000-01-27  Andrew Haley  <aph@cygnus.com>
14896
14897         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14898         (emit_if): Ditto.
14899         (emit_jsr): Ditto.
14900
14901 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14902
14903         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14904         concatenation.
14905         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14906
14907         * parse.y (register_fields): Don't pass a format specifier to
14908         OBSOLETE_MODIFIER_WARNING.
14909         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14910         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14911         specifier.
14912         (check_modifiers): Change function into a macro.
14913         (check_class_interface_creation): Pass a literal format string.
14914
14915 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14916
14917         * buffer.h: PROTO -> PARAMS.
14918         * check-init.c: Likewise.
14919         * class.c: Likewise.
14920         * constants.c: Likewise.
14921         * convert.h: Likewise.
14922         * decl.c: Likewise.
14923         * except.c: Likewise.
14924         * expr.c: Likewise.
14925         * gjavah.c: Likewise.
14926         * java-except.h: Likewise.
14927         * java-tree.h: Likewise.
14928         * jcf-depend.c: Likewise.
14929         * jcf-dump.c: Likewise.
14930         * jcf-parse.c: Likewise.
14931         * jcf-path.c: Likewise.
14932         * jcf-reader.c: Likewise.
14933         * jcf-write.c: Likewise.
14934         * jcf.h: Likewise.
14935         * jv-scan.c: Likewise.
14936         * jvgenmain.c: Likewise.
14937         * jvspec.c: Likewise.
14938         * lang.c: Likewise.
14939         * lex.c: Likewise.
14940         * lex.h: Likewise.
14941         * parse-scan.y: Likewise.
14942         * parse.h: Likewise.
14943         * parse.y: Likewise.
14944         * typeck.c: Likewise.
14945         * verify.c: Likewise.
14946         * xref.c: Likewise.
14947         * xref.h: Likewise.
14948         * zextract.c: Likewise.
14949         * zipfile.h: Likewise.
14950
14951 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14952
14953         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14954         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14955         * constants.c (build_constant_data_ref): Check for cached
14956         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14957         in TYPE_CPOOL_DATE_REF.
14958         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14959         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14960         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14961         (LOCAL_FINAL): New macro.
14962         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14963         constant pool -- don't try to reuse.
14964         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14965         TYPE_LANG_SPECIFIC.
14966         (find_in_current_zip): Use TYPE_JCF.
14967         * parse.h (java_check_final): Prototype removed.
14968         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14969         (maybe_create_class_interface_decl,
14970         check_class_interface_creation): Likewise.
14971         (java_expand_finals): Function removed.
14972         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14973         (block_statement:): Fixed comment.
14974         (anonymous_class_creation:): Likewise.
14975         (check_class_interface_creation): Reversed Jan 12, 2000 extra
14976         argument patch.
14977         (check_class_interface_creation): Loosened error report on (inner)
14978         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14979         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14980         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14981         argument patch.
14982         (create_interface): Likewise.
14983         (anonymous_class_counter): New static global.
14984         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14985         patch. Fixed comments.
14986         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14987         anonymous_class_counter when declaring a toplevel class.
14988         (craft_constructor): Fixed constructor name when handling
14989         anonymous classes. Anonymous class constructors to feature hidden
14990         this$<n> parameter.
14991         (java_fix_constructors): Added comment.
14992         (java_check_final): Function removed.
14993         (java_complete_expand_methods): Fixed comment. Don't generate
14994         class data, save its outgoing constant pool instead.
14995         (verify_constructor_super): Skip anonymous class constructor
14996         hidden this$<n> parameter.
14997         (java_expand_classes): New local `saved_ctxp'. Removed call to
14998         java_expand_finals and java_check_final. Expand anonymous class
14999         constructors. Generate class data.
15000         (build_super_invocation): Skip anonymous class hidden this$<n>
15001         parameter.
15002         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15003         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15004         (set_java_signature): Likewise.
15005
15006 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15007
15008         * gjavah.c: Delete ACC_VISIBILITY define.
15009         * jcf.h: Add ACC_VISIBILITY define.
15010         * parse.y: final: rule tagged <value>.
15011         (java_check_regular_methods): Use ACC_VISIBILITY define for
15012         default package access check.
15013         (local_variable_declaration_statement): Use final: rule.
15014
15015 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
15016
15017         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15018         (final:): New rule.
15019
15020 2000-01-17  Tom Tromey  <tromey@cygnus.com>
15021
15022         * gjavah.c (print_field_info): Allow non-static final fields.
15023
15024 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15025
15026         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15027         * parse.y (patch_anonymous_class): New function.
15028         (create_anonymous_class): Register incomplete type when the
15029         class/interface to extends/implement isn't known yet.
15030         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15031         (verify_constructor_super): Tuned error message.
15032
15033 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15034
15035         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15036         (ANONYMOUS_CLASS_P): New macro.
15037         (TYPE_SIGNATURE, TYPE_JCF): New macros.
15038         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15039         * parse.y (create_class): Added leading argument.
15040         (maybe_create_class_interface_decl,
15041         check_class_interface_creation): Likewise.
15042         (craft_constructor): New function.
15043         (verify_constructor_super): Added argument in prototype.
15044         (class_declaration:): Inserted leading argument.
15045         (for_begin:): Use FOR_LOOP_P.
15046         (anonymous_class_creation): Create WFL of the anonymous class to
15047         instantiate. Call build_new_invocation. Added comments.
15048         (check_class_interface_creation): Handle parameter `anonymous' in
15049         verbose mode class creation announce.
15050         (link_nested_class_to_enclosing): Exclude anonymous classes.
15051         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15052         anonymous class, even though they appear to have an enclosing
15053         context.
15054         (create_interface): Pass extra argument to
15055         check_class_interface_creation.
15056         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15057         (create_class): Call check_class_interface_creation and
15058         maybe_create_class_interface_decl with extra new argument. Don't
15059         add private this$<n> to anonymous classes.
15060         (method_declarator): Insert hidden this$<n> to anonymous class
15061         constructors.
15062         (java_fix_constructors): Deleted code creating default
15063         constructor. Call craft_constructor instead.
15064         (java_check_regular_methods): Set `saw_constructor' to 1 for
15065         anonymous classes.
15066         (fix_constructors): Pass extra argument to verify_constructor_super.
15067         (verify_constructor_super): New local `sdecl', use it. Search for
15068         matching constructor (possibly featuring arguments) in super
15069         class.
15070         (lookup_method_invoke): Craft constructor according to arguments
15071         list when dealing with anonymous class constructors.
15072         (build_super_invocation): Pass arguments to anonymous class super
15073         constructors.
15074         (search_loop): Use FOR_LOOP_P.
15075         (labeled_block_contains_loop_p): Likewise.
15076
15077 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15078
15079         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15080         (enclosing_context_p): New function.
15081         (get_access_flags_from_decl): Handle CLASS_STATIC.
15082         (maybe_layout_super_class): Extra first argument passed to
15083         do_resolve_class.
15084         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15085         ID_INIT_P.
15086         * decl.c (access0_identifier_node): New global.
15087         (init_decl_processing): access0_identifier_node initialized.
15088         (pushdecl): Set DECL_CONTEXT only on non type decls.
15089         * expr.c (lookup_field): Lookup inner class fields in enclosing
15090         contexts.
15091         (expand_invoke): Use ID_INIT_P.
15092         (expand_java_field_op): Use DECL_CLINIT_P.
15093         * java-tree.def (CLASS_LITERAL): New tree code.
15094         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15095         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15096         (struct lang_decl): New field `inner_access'.
15097         (enclosing_context_p): Prototyped.
15098         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15099         ID_CLINIT_P): New macros.
15100         (CLASS_STATIC): New macro.
15101         (CLASS_ACCESS0_GENERATED_P): New macro.
15102         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15103         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15104         INNER_CLASS_P): New macros.
15105         (DECL_INNER_CLASS_LIST): New macro.
15106         * jcf-parse.c (yyparse): Avoid the use of ANSI string
15107         concatenation.
15108         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15109         the shift value to int. Fixed typo in comment.
15110         * lex.c (inst_id, wpv_id): Initialize.
15111         * mangle.c (unicode_mangling_length): Take `$' into account.
15112         * parse.h (DRECOVER, RECOVER): Terminate properly.
15113         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15114         (typedef struct _jdep): New field `enclosing'.
15115         (JDEP_ENCLOSING): New macro.
15116         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15117         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15118         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15119         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15120         GET_ENCLOSING_CPC_CONTEXT): New macros.
15121         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15122         (do_resolve_class): Added extra argument in prototype.
15123         * parse.y (resolve_class): Added extra argument in prototype.
15124         (maybe_create_class_interface_decl): Likewise.
15125         (maybe_use_access_method, build_wfl_wrap): New functions.
15126         (java_complete_expand_classes, java_complete_expand_class):
15127         Likewise.
15128         (java_parser_context_push_initialized_field,
15129         java_parser_context_suspend, java_parser_context_resume):
15130         Likewise.
15131         (maybe_make_nested_class_name, make_nested_class_name,
15132         set_nested_class_simple_name_value,
15133         link_nested_class_to_enclosing, find_as_inner_class,
15134         find_as_inner_class_do, check_inner_class_redefinition,
15135         build_thisn_assign, build_current_thisn, build_access_to_thisn,
15136         maybe_build_thisn_access_method, build_outer_field_access,
15137         build_outer_field_access_methods, build_outer_field_access_expr,
15138         build_outer_method_access_method, build_new_access_id,
15139         build_outer_field_access_method, outer_field_access_p,
15140         outer_field_expanded_access_p, outer_field_access_fix,
15141         build_incomplete_class_ref, patch_incomplete_class_ref,
15142         create_anonymous_class): Likewise.
15143         (inst_id, wpv_id): New static global variables.
15144         (synchronized:): New rule, tagged <node>.
15145         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15146         rules.
15147         (anonymous_class_creation:): New rule, tagged <node>.
15148         (NEW_TK): Tagged <node>.
15149         (type_literals, array_type_literal): New rules, tagged <node>.
15150         (class_declaration:): Removed action when reducing by class_body:
15151         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15152         using GET_CPC in sub-rules.
15153         (class_member_declaration): Handle inner classes.
15154         (method_declaration): When reducing method_header:, reset
15155         current_function_decl when appropriate.
15156         (method_declarator:): Set the number of formal parameter to 0 for
15157         method declared without arguments.
15158         (constructor_declarator:): Likewise.
15159         (static_initializer:): List of elements kept in a list.
15160         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15161         use of the keyword `static' for type declarations.
15162         (block_statement:): Handle inner class declarations.
15163         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15164         type qualified `this'.
15165         (class_instance_creation_expression): Use anonymous_class_creation:
15166         to handle inner class instances creation. Handle qualified `new'.
15167         (something_dot_new): Added appropriate actions.
15168         (create_new_parser_context): New function.
15169         (java_push_parser_context, java_parser_context_save_global,
15170         java_parser_context_suspend): Use create_new_parser_context.
15171         (check_modifiers): Changed leading comment.
15172         (check_class_interface_creation): Handle interclasses.
15173         (add_superinterfaces): Fixed comment.
15174         (create_interface): Build qualified name from the raw_name instead
15175         of its matching WFL. Push the initialized fields list. raw_name added
15176         as an extra argument to maybe_create_class_interface_decl.
15177         (create_class): Build qualified name from the raw_name instead of
15178         its matching WFL. Removed assignment to current_parsed_class_un.
15179         Call PUSH_ERROR before returning an error. Suspend the current
15180         parser context when processing an inner class. Push the
15181         initialized fields list. raw_name added as an extra argument to
15182         maybe_create_class_interface_decl. Add the private this$<n>
15183         field.
15184         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15185         (register_fields): Get the class type from GET_CPC and handle
15186         previous errors.  Added code to handle the creation of static
15187         fields in inner classes. Initialized fields initialization
15188         statements kept in a list of lists.
15189         (maybe_generate_finit): Initialized fields initialization
15190         statements kept in a list of lists. Use GET_CPC.
15191         (maybe_generate_clinit): Likewise.
15192         (method_header): Use GET_CPC and GET_CPC_UN.
15193         (parser_qualified_classname): Handle inner classes.
15194         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15195         (java_fix_constructors): Hide pointer to enclosing context
15196         instance in constructor list when dealing with inner classes.
15197         (jdep_resolve_class): Call resolve_class with extra first argument
15198         JDEP_ENCLOSING.
15199         (resolve_class): Add enclosing context as a first extra argument
15200         to do_resolve_class.
15201         (do_resolve_class): Call find_as_inner_class. Handle WFLs
15202         properly.
15203         (resolve_no_layout): Extra argument added to resolve_class
15204         invocation.
15205         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15206         (java_get_real_method_name): Use GET_CPC_UN.
15207         (check_abstract_method_definitions): Use DECL_CLINIT_P.
15208         (java_check_abstract_methods): Handle static method declared in
15209         inner classes by an error.
15210         (java_check_regular_methods): Use DECL_CLINIT_P.
15211         (source_start_java_method): Also set DECL_MAX_LOCALS.
15212         (create_artificial_method): Call java_parser_context_save_global
15213         and java_parser_context_restore_global instead of saving/restoring
15214         the context by hand.
15215         (expand_start_java_method): Improved verbose mode message.
15216         (java_complete_expand_methods): Fixed leading comment. Use
15217         DECL_CLINIT_P.
15218         (fix_constructors): Added assignment to this$<n> if necessary.
15219         (java_expand_classes): Call java_complete_expand_classes instead
15220         of java_complete_expand_methods.
15221         (make_qualified_primary): Simplified.
15222         (merge_qualified_name): Optimized for missing left or right parts.
15223         (resolve_expression_name): Handle access to outer class fields from
15224         interclasses.
15225         (resolve_qualified_expression_name): New macro
15226         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15227         classes. Report error on non appropriate qualification of
15228         `new'. Handle qualified `this'.
15229         (not_accessible_p): Allow access to outer class private fields from
15230         inner classes.
15231         (patch_method_invocation): Handle method invocations through
15232         access methods and inner class constructor invocations.
15233         (find_applicable_accessible_methods_list): Search enclosing
15234         contexts of an inner class.
15235         (search_applicable_methods_list): Fixed typo.
15236         (argument_types_convertible): Handle inner class constructors'
15237         hidden outer context reference argument.
15238         (qualify_ambiguous_name): Handle qualified `this'.
15239         (java_complete_lhs): Handle use of field accessed through
15240         artificial access methods in various cases of assignments. Handle
15241         CLASS_LITERAL node.
15242         (check_final_assignment): Use DECL_CLINIT_P.
15243         (valid_ref_assignconv_cast_p): Handle the destination being an
15244         enclosing context of the source.
15245         (patch_unaryop): Handle use of field accessed through artificial
15246         access methods.
15247         (patch_return): Use DECL_CLINIT_P.
15248         (patch_throw_statement): Use DECL_CLINIT_P.
15249         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15250         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15251         ID_INIT_P.
15252
15253 2000-01-16  Anthony Green  <green@cygnus.com>
15254
15255         * parse.y (build_string_concatenation): Only use
15256         StringBuffer(String) shortcut if String arg is constant.
15257
15258 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15259
15260         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15261         the shift value to int. Fixed typo in comment.
15262
15263 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15264
15265         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15266         * jcf-write.c: Likewise.
15267         * parse.y: Likewise.
15268         * parse.c: Regenerate.
15269
15270 2000-01-09  Anthony Green  <green@cygnus.com>
15271
15272         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15273         bytecodes in the correct order.
15274
15275 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15276
15277         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15278
15279 2000-01-06  Anthony Green  <green@cygnus.com>
15280
15281         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15282         before building constant array decl.
15283
15284 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15285
15286         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15287         method invocation and typo in conditional expression.
15288         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15289         the appropriate NOTE_POP.
15290         * parse.y (patch_binop): Shift value mask to feature the right
15291         type.
15292
15293 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15294
15295         * class.c (assume_compiled, assume_compiled_node): Add static
15296         prototype.
15297         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15298
15299         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15300
15301         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15302
15303         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15304         to `__modifier' to avoid stringifying it.
15305
15306         * parse.y (verify_constructor_circularity): Don't call a variadic
15307         function with a non-literal format string.
15308         (java_check_abstract_methods): Move unreachable code inside
15309         `continue' statement.
15310         (lookup_method_invoke): Call xstrdup, not strdup.
15311
15312         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15313         concatenation.
15314
15315         * jcf-parse.c (yyparse): Likewise.
15316
15317         * jv-scan.c (main): Likewise.
15318
15319 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15320
15321         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15322         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15323         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15324         concatenation.
15325
15326         * parse.y (synchronized, variable_redefinition_error,
15327         check_class_interface_creation, create_interface, create_class,
15328         method_header, finish_method_declaration,
15329         check_modifiers_consistency, method_declarator,
15330         complete_class_report_errors, check_abstract_method_definitions,
15331         java_check_regular_methods, check_throws_clauses,
15332         java_check_abstract_methods, read_import_dir,
15333         check_pkg_class_access, declare_local_variables, fix_constructors,
15334         cut_identifier_in_qualified, resolve_expression_name,
15335         resolve_qualified_expression_name, patch_method_invocation,
15336         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15337         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15338         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15339         patch_try_statement, patch_synchronized_statement,
15340         patch_throw_statement, check_thrown_exceptions,
15341         patch_conditional_expr): Likewise.
15342
15343 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15344
15345         * Makefile.in (LIBDEPS): Added gcc's errors.o
15346         (../jcf-dump$(exeext):): Link with gcc's errors.o
15347         (../gcjh$(exeext):): Likewise.
15348         * expr.c (expand_java_NEW): Layout the entire target type instead of
15349         laying out its methods only.
15350         (lookup_field): Layout the class after having loaded it.
15351         * java-tree.h (java_debug_context): Declared.
15352         * jcf-io.c (toplev.h): Included.
15353         (find_class): Removed assignment to jcf's outofsynch
15354         field. Force source file to be read if newer than its matching
15355         class file. Tweaked debug messages.
15356         * jcf-parse.c (jcf_out_of_synch): Deleted.
15357         (read_class): Call to jcf_out_of_synch removed.
15358         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15359         (jcf_out_of_synch): Prototype deleted.
15360         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15361         `deprecated' and `class_err': integer turned into bit-fields.
15362         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15363         * parse.y (package_list): New global.
15364         (package_declaration:): Record newly parsed package name.
15365         (extra_ctxp_pushed_p): Static global deleted.
15366         (java_parser_context_save_global): Create buffer context for the
15367         purpose of saving globals, if necessary.
15368         (java_parser_context_restore_global): Pop context pushed for the
15369         purpose of saving globals, if necessary.
15370         (java_debug_context_do): New prototype and function.
15371         (java_debug_context): Likewise.
15372         (do_resolve_class): Use already parsed package names to qualify
15373         and lookup class candidate.
15374         (java_pre_expand_clinit): Removed unnecessary local variable.
15375
15376 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15377
15378         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15379         fixes PR gcj/119.
15380         (process_file): Use `\n\' at end of each line in string.
15381
15382 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15383
15384         * expr.c (expand_invoke): Layout the loaded class before
15385         attempting to use it.
15386         (expand_java_field_op): Allow final field assignments to take
15387         place in $finit$.
15388         * typeck.c (convert): Return error_mark_node if expr is null.
15389
15390 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15391
15392         * class.c (class_depth): Return -1 if the class doesn't load
15393         properly.
15394         * expr.c (can_widen_reference_to): Check for errors during depth
15395         computation and return 0 accordingly.
15396         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15397         create default constructors and add an other error check.
15398         * parse.h (java_fix_constructors): Prototyped.
15399         * parse.y (java_pre_expand_clinit): Likewise.
15400         (build_super_invocation): Re-prototyped to feature one argument.
15401         (java_check_circular_reference): Directly use `current'.
15402         (java_fix_constructors): New function.
15403         (java_check_regular_methods): Don't create default constructors
15404         here, but abort if none were found.
15405         (java_complete_expand_methods): Pre-process <clinit> calling
15406         java_pre_expand_clinit.
15407         (java_pre_expand_clinit): New function.
15408         (fix_constructors): build_super_invocation invoked with the
15409         current method declaration as an argument.
15410         (build_super_invocation): Use the context of the processed method
15411         decl argument instead of current_class.
15412         * typeck.c (lookup_java_method): Take WFLs in method names into
15413         account.
15414
15415 1999-12-14  Per Bothner  <per@bothner.com>
15416
15417         * class.c (make_class_data): flag_keep_inline_functions to keep
15418         private methods in the method array.
15419
15420 1999-12-15  Anthony Green  <green@cygnus.com>
15421
15422         * check-init.c (check_init): Take into account both types of
15423         `throw's when checking for uninitialized variables.
15424
15425 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15426
15427         * parse.y (java_complete_lhs): Force conversion of array
15428         dimensions to int_type_node, that's what runtime's ABI expects.
15429
15430 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15431
15432         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15433         operand of a WFL, until the Java front-end gets fixed with regard
15434         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15435
15436 1999-12-10  Andrew Haley  <aph@cygnus.com>
15437
15438         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15439         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15440         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15441         java-tree.h: Ditto.
15442         jcf-write.c: Ditto.
15443
15444 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15445
15446         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15447         before calling expand_eh_region_start and expand_start_all_catch.
15448         * except.c (expand_start_java_handler): Switch to permanent
15449         obstack before calling expand_eh_region_start.
15450         (expand_end_java_handler): Switch to permanent obstack before
15451         calling expand_start_all_catch.
15452
15453 1999-12-5  Anthony Green  <green@cygnus.com>
15454
15455         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15456         function with side effects.
15457         (init_decl_processing): Mark all memory allocating DECLs with
15458         DECL_IS_MALLOC.
15459
15460 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15461
15462         * except.c (expand_end_java_handler): Call
15463         expand_resume_after_catch and end_catch_handler.
15464
15465 1999-11-30  Anthony Green  <green@cygnus.com>
15466
15467         * verify.c (verify_jvm_instructions): Create new return label
15468         chain if non existent (don't rely on the verified state of the jsr
15469         target.)
15470
15471 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15472
15473         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15474         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15475
15476         * parse.y (patch_assignment): Removed bogus final class test on
15477         lhs when checking on whether to emit an ArrayStoreException runtime
15478         check.
15479         * expr.c (expand_java_arraystore): Likewise.
15480
15481 1999-11-28 Anthony Green <green@cygnus.com>
15482
15483         * decl.c (find_local_variable): Reuse single slot decls when
15484           appropriate.
15485
15486 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15487
15488         * jcf-parse.c (saw_java_source): Global variable removed.
15489         (read_class): Don't use `saw_java_source'. Added extra braces.
15490         (yyparse): Code setting `saw_java_source' removed.
15491
15492 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15493
15494         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15495
15496 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15497
15498         * verify.c (merge_type_state): Non verified subroutines being
15499         considered more than once to trigger passive type merge.
15500
15501 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15502
15503         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15504         in case of error. Error message tuned.
15505
15506 1999-11-21  Anthony Green  <green@cygnus.com>
15507
15508         * constants.c (find_methodref_index): Unwrap method names before
15509         inserting them in the constant pool.
15510
15511         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15512
15513         * class.c (assume_compiled_node): New typedef.
15514         (assume_compiled_tree): New static data.
15515         (find_assume_compiled_node): New function.
15516         (add_assume_compiled): New function.
15517         (assume_compiled): New function.
15518         * class.c (make_class_data): Use assume_compiled.
15519         (is_compiled_class): Use assume_compiled.
15520
15521         * java-tree.h (add_assume_compiled): Declare.
15522
15523         * lang.c (lang_decode_option): Parse new options.
15524
15525 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15526
15527         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15528         int_type_node: that's what `_Jv_AllocObject' expects.
15529
15530 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15531
15532         * parse.y (lookup_method_invoke): Use lang_printable_name to
15533         reliably build the type name during error report. Fixes PR gcj/97.
15534
15535 1999-11-09  Tom Tromey  <tromey@cygnus.com>
15536
15537         * jcf-path.c: Include <sys/stat.h>.
15538         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
15539         (DIR_UP): New macro.
15540
15541 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15542
15543         * parse.y (source_end_java_method): Resume permanent allocation,
15544         reversing Apr 27 1998 patch.
15545         (patch_string_cst): Pop obstacks after having pushed the permanent
15546         ones.
15547
15548 1999-11-05  Tom Tromey  <tromey@cygnus.com>
15549
15550         * class.c (finish_class): Emit inlined methods if any native
15551         methods exist in the class.  Fixes PR gcj/85.
15552
15553 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15554
15555         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15556         (qualify_ambiguous_name): Likewise.
15557
15558 1999-11-03  Godmar Back <gback@cs.utah.edu>
15559
15560         * typeck.c: (lookup_java_method):  search all inherited
15561         interfaces when looking up interface method.
15562
15563 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15564
15565         * parse.y (method_header:): Issue error message for rule `type
15566         error'.
15567         (synchronized:): Error report when not using synchronized.
15568
15569 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15570
15571         * parse.y (resolve_qualified_expression_name): Prevent `this' from
15572         being used before the superclass constructor has been called.
15573         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15574         instead of `CALL_THIS_CONSTRUCTOR_P'.
15575
15576 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
15577
15578         * check-init.c: Fix typo in comment.
15579
15580 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15581
15582         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15583         and final method.
15584
15585 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15586
15587         * parse.y (expression_statement:): Call function to report
15588         improper invocation of a constructor.
15589         (parse_ctor_invocation_error): New function.
15590
15591 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
15592
15593         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15594         remember_end_note.
15595
15596 1999-10-21  Tom Tromey  <tromey@cygnus.com>
15597
15598         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15599         in generated `main'.
15600
15601 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15602
15603         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15604         (qualify_ambiguous_name): Likewise.
15605
15606 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15607
15608         * parse.y (java_complete_tree): fold_constant_for_init to work on
15609         permanent_obstack.
15610         (java_complete_lhs): Likewise.
15611         (array_constructor_check_entry): Complete an initializer element
15612         on permanent_obstack.
15613
15614 1999-10-19  Tom Tromey  <tromey@cygnus.com>
15615
15616         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15617         From Mike Moreton <mike@pillim.demon.co.uk>.
15618
15619 1999-10-15  Greg McGary  <gkm@gnu.org>
15620
15621         * java-tree.h (flag_bounds_check): Remove extern decl.
15622         * lang.c (flag_bounds_check): Remove global variable.
15623         (lang_f_options): Remove "bounds-check" entry.
15624         (lang_init_options): Default flag_bounds_check to "on".
15625
15626 1999-10-14  Tom Tromey  <tromey@cygnus.com>
15627
15628         * jvgenmain.c (usage): New function.
15629         (main): Use it.  Also, handle `-D' options.
15630         * jvspec.c (lang_specific_driver): Recognize -D.
15631         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15632
15633         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15634
15635 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15636
15637         * jcf-dump.c (print_constant, disassemble_method): Don't call a
15638         variadic function with a non-literal format string.
15639
15640         * parse-scan.y (report_main_declaration): Likewise.
15641
15642         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15643
15644         * parse.y (read_import_dir, patch_assignment, patch_binop,
15645         patch_array_ref): Likewise.
15646
15647         * typeck.c (build_java_array_type): Likewise.
15648
15649         * verify.c (verify_jvm_instructions): Likewise.
15650
15651 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15652
15653         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15654
15655 1999-10-07  Anthony Green  <green@cygnus.com>
15656
15657         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15658         where CHECK_PUT may fail for valid reasons.
15659
15660         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15661         UNSAFE_PUTN): New macros.
15662
15663 1999-10-04  Tom Tromey  <tromey@cygnus.com>
15664
15665         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15666         well.  Fixes Java PR gcj/59.
15667         * parse-scan.y (yyerror): Report errors.
15668
15669 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
15670
15671         * decl.c (insert_block): Remove unconditional `abort'.
15672
15673 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
15674
15675         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
15676         FUNCTION_CODE now of type int.  All callers changed.
15677         Set the builtin's DECL_BUILT_IN_CLASS.
15678
15679 1999-09-23  Tom Tromey  <tromey@cygnus.com>
15680
15681         * jvspec.c (lang_specific_driver): Don't read spec file if
15682         -fsyntax-only given.
15683
15684 1999-09-22  Tom Tromey  <tromey@cygnus.com>
15685
15686         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15687
15688         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15689         (WORDS_TO_LONG): Likewise.
15690         (WORDS_TO_DOUBLE): Likewise.
15691
15692 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15693
15694         * jcf-write.c (RELOCATION_VALUE_0): New macro.
15695         (RELOCATION_VALUE_1): Likewise.
15696         (emit_iinc, emit_reloc, push_constant1, push_constant2,
15697         push_in_const, push_long_const): Prototyped.
15698         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15699         (push_constant2): Likewise.
15700         (push_int_const): Cast find_constant1's integer arguments to `jword'.
15701         (find_constant_wide): Cast find_constant2's integer arguments to
15702         `jword'.
15703         (find_constant_index): Cast find_constant2's and find_constant2's
15704         integer arguments to `jword'.
15705         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15706         (emit_switch_reloc): Use RELOCATION_VALUE_0.
15707         (emit_if): Use RELOCATION_VALUE_1.
15708         (emit_goto): Likewise.
15709         (emit_jsr): Likewise.
15710         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15711         argument to push_long_const to HOST_WIDE_INT.
15712
15713 1999-09-15  Andreas Schwab  <schwab@suse.de>
15714
15715         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15716
15717 1999-09-20  Nick Clifton  <nickc@cygnus.com>
15718
15719         * lang.c (lang_decode_option): Extend comment.
15720
15721 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15722
15723         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15724         instead of fndecl.
15725
15726 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15727
15728         * gjavah.c (get_field_name, print_method_info, print_include,
15729         add_namelet): Use xmalloc, not malloc.
15730
15731         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15732         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15733         NULL pointer.
15734
15735         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15736
15737         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15738
15739         * jcf-path.c (add_entry): Likewise.
15740
15741         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15742
15743         * jv-scan.c (xmalloc): Remove definition.
15744
15745         * jvgenmain.c (xmalloc): Likewise.
15746
15747         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15748
15749         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15750
15751         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15752         concat, not xmalloc/sprintf.
15753         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15754         (xstrdup): Remove definition.
15755
15756         * parse.y (duplicate_declaration_error_p,
15757         constructor_circularity_msg, verify_constructor_circularity,
15758         check_abstract_method_definitions, java_check_regular_methods,
15759         java_check_abstract_methods, patch_method_invocation,
15760         check_for_static_method_reference, patch_assignment, patch_binop,
15761         patch_cast, array_constructor_check_entry, patch_return,
15762         patch_conditional_expr): Use xstrdup, not strdup.
15763
15764         * zextract.c (ALLOC): Use xmalloc, not malloc.
15765
15766 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15767
15768         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15769
15770         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15771         (do_spec, lang_specific_pre_link, lang_specific_driver,
15772         input_filename, input_filename_length): Don't declare.
15773         (main_class_name, jvgenmain_spec, lang_specific_driver):
15774         Constify a char*.
15775         (lang_specific_driver): All calls to the function pointer
15776         parameter now explicitly call `fatal'.
15777
15778 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15779
15780         * parse.y (find_applicable_accessible_methods_list): Search
15781         abstract classes as interfaces.
15782
15783 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15784
15785         * class.c (finish_class): We're now outside a valid method
15786         declaration. Tell the rest of gcc so.
15787
15788 1999-09-08  Bruce Korb  autogen@linuxbox.com
15789
15790         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15791
15792 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15793
15794         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15795         java-array.h.
15796         (decode_signature_piece): Don't emit "::" in JArray<>.
15797         (print_namelet): Only print trailing `;' when printing a class.
15798
15799 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15800
15801         * java-tree.h: Delete declarations for all tree nodes now moved to
15802         global_trees.
15803         * decl.c: Delete their definitions.
15804
15805 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15806
15807         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15808         * Makefile.in (OBJS): Add ggc-callbacks.o.
15809         (OBJDEPS): Likewise.
15810
15811 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15812
15813         * parse.y (strip_out_static_field_access_decl): Return operand if
15814         it satisfies JDECL_P.
15815
15816 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15817
15818         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15819         Handle nested arrays, like `[[I'.
15820
15821 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15822
15823         * class.c (finish_class): Remove unused parameter, all callers
15824         changed.
15825
15826         * expr.c (build_java_athrow): Change return type to void.
15827         (java_lang_expand_expr): Make sure each case in switch returns a
15828         value.
15829
15830         * java-tree.h (finish_class): Fix prototype to take void args.
15831
15832         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15833         (main): Issue return from main, not exit.
15834
15835         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15836
15837         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15838
15839         * jv-scan.c (main): Issue return from main, not exit.
15840
15841         * parse.y (check_abstract_method_definitions,
15842         java_check_abstract_method_definitions): Add static prototypes.
15843         (java_complete_expand_methods): Fix call to `finish_class'.
15844
15845         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15846         and `prevpc'.
15847
15848 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15849
15850         * lang.c (language_string): Constify.
15851
15852 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15853
15854         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15855         Remove hacks for stuff which comes from libiberty.
15856
15857         * Make-lang.in: Likewise.
15858
15859 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
15860
15861         * Makefile.in (xref.o): Depend on xref.c explicitly.
15862
15863 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15864
15865         * java-tree.h (lang_printable_name): Constify a char*.
15866
15867         * lang.c (lang_printable_name): Likewise.
15868
15869 1999-08-27  Jeffrey A Law  (law@cygnus.com)
15870
15871         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15872         comments in C code.
15873
15874 1999-08-26  Tom Tromey  <tromey@cygnus.com>
15875
15876         * gjavah.c (print_cxx_classname): Print "::" before qualified
15877         name.
15878
15879 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15880
15881         * parse.y (lookup_cl): Changed leading comment. Now does its best
15882         to set the column number.
15883         (qualify_ambiguous_name): Take WFL wrappers into account.
15884
15885 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
15886
15887         * verify.c (verify_jvm_instructions): Don't check instruction
15888         validity beyond end of method.
15889
15890 1999-08-25  Tom Tromey  <tromey@cygnus.com>
15891
15892         * jvspec.c (lang_specific_driver): Correctly handle --help again.
15893
15894 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15895
15896         * gjavah.c (print_name, print_base_classname, utf8_cmp,
15897         cxx_keyword_subst, generate_access, name_is_method_p,
15898         get_field_name, print_field_name, super_class_name, print_include,
15899         decode_signature_piece, print_class_decls, usage, help,
15900         java_no_argument, version, add_namelet, print_namelet): Add static
15901         prototype.
15902         (print_base_classname, utf8_cmp, cxx_keyword_subst,
15903         name_is_method_p): Constify a char*.
15904         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
15905         Provide a final else clause in an if-else-if.
15906         (print_field_info): Add missing final arg in function call to
15907         `print_field_name'.
15908         (print_method_info, decompile_method, decode_signature_piece,
15909         print_c_decl, print_full_cxx_name, print_stub,
15910         print_mangled_classname, super_class_name, print_include,
15911         add_namelet, add_class_decl, print_class_decls, process_file,
15912         help): Constify a char*.
15913
15914         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15915         push_int_const, find_constant_wide, find_constant_index,
15916         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15917         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15918         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15919         emit_if, emit_goto, emit_jsr, call_cleanups,
15920         make_class_file_name): Add static prototypes.
15921         (generate_bytecode_return, generate_bytecode_insns): Pass a
15922         NULL_PTR, not a NULL_TREE.
15923
15924         * jv-scan.c: Include "jcf.h".
15925         (main): Declare using DEFUN macro.
15926
15927         * jvspec.c (find_spec_file, lang_specific_pre_link,
15928         lang_specific_driver): Add prototypes.
15929         (find_spec_file): Constify a char*.
15930
15931         * keyword.gperf (hash, java_keyword): Add prototypes.
15932
15933         * lang.c (lang_print_error): Add static prototype.
15934         (lang_init): Prefer memcpy over bcopy to avoid casts.
15935
15936         * lex.c (yylex): Add static prototype.
15937
15938         * parse-scan.y: Include "lex.c" earlier.
15939
15940         * parse.h: Remove redundant declaration for `yylex'.
15941
15942         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15943         labeled_block_contains_loop_p): Add static prototypes.
15944         (not_accessible_p): Make static to match prototype.
15945
15946         * verify.c (start_pc_cmp): Don't needlessly cast away const.
15947
15948 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15949
15950         * parse.y (check_method_redefinition): Changed leading comment.
15951         (check_abstract_method_definitions): New function.
15952         (java_check_abstract_method_definitions): New function.
15953         (java_check_regular_methods): Call it.
15954         (verify_constructor_super): Fixed indentation.
15955         (lookup_method_invoke): Likewise.
15956
15957 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15958
15959         * parse.y (method_header): Return a null pointer if the current
15960         class node is null.
15961         (finish_method_declaration): Return if the current function decl
15962         is null.
15963         (source_start_java_method): Likewise.
15964         (java_method_add_stmt): Likewise.
15965
15966 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15967
15968         * class.c (emit_register_class): Removed unnecessary call to
15969         start_sequence.
15970         * parse.y (labeled_block_contains_loop_p): Removed unused local
15971         variable.
15972
15973 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15974
15975         * parse.y (java_refold): Added prototype.
15976
15977 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15978
15979         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15980         (java_stabilize_reference): Removed unnecessary `else'.
15981         (java_complete_lhs): Set flag to remember boolean. Call
15982         java_refold. Added comments.
15983         (java_decl_equiv): New function.
15984         (binop_compound_p): Likewise.
15985         (java_refold): Likewise.
15986         (patch_unaryop): Striped static field access assigned to decl and
15987         op. Changed promotion scheme for ++/-- operators.
15988         (search_loop): New function.
15989         (labeled_block_contains_loop_p): Likewise.
15990         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15991         comment.
15992         (patch_bc_statement): Call search_loop. Fixed comment.
15993
15994 1999-08-14  Anthony Green  <green@cygnus.com>
15995
15996         * expr.c (java_lang_expand_expr): Mark static array data as
15997         referenced.
15998
15999 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
16000
16001         * jvgenmain.c (main): NUL-terminate name_obstack.
16002
16003 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16004
16005         * check-init.c (check_bool2_init, done_alternative): Add static
16006         prototypes.
16007
16008         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16009         (add_method, build_utf8_ref, build_class_ref,
16010         append_gpp_mangled_type, layout_class_method): Constify a char*.
16011
16012         * decl.c (push_promoted_type, make_binding_level): Add static
16013         prototypes.
16014         (push_promoted_type, pushdecl): Constify a char*.
16015
16016         * except.c (find_handler_in_range, link_handler,
16017         check_start_handlers): Add static prototypes.
16018
16019         * expr.c (process_jvm_instruction): Constify a char*.
16020
16021         * gjavah.c (main): Constify a char*.
16022
16023         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16024         Constify a char*.
16025
16026         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16027         static prototypes.
16028         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16029         munge, print_ents): Constify a char*.
16030
16031         * jcf-dump.c (disassemble_method): Constify a char*.
16032         (print_constant_pool, print_exception_table): Add static prototypes.
16033         (print_constant, print_exception_table, main, disassemble_method):
16034         Constify a char*.
16035
16036         * jcf-io.c (find_classfile, find_class): Likewise.
16037
16038         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16039         (set_source_filename, predefined_filename_p): Add static prototypes.
16040         (set_source_filename, get_constant, get_class_constant,
16041         find_in_current_zip): Constify a char*.
16042
16043         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16044         static prototypes.
16045         (add_entry, add_path, jcf_path_classpath_arg,
16046         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16047
16048         * jcf-reader.c (get_attribute, jcf_parse_preamble,
16049         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16050         jcf_parse_one_method, jcf_parse_methods,
16051         jcf_parse_final_attributes): Add static prototypes.
16052         (get_attribute): Constify a char*.
16053
16054         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16055         jcf_dependency_add_target, jcf_path_classpath_arg,
16056         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16057
16058         * jv-scan.c (main): Constify a char*.
16059         (gcc_obstack_init): Add prototype arguments.
16060
16061         * jvgenmain.c (gcc_obstack_init): Likewise.
16062         (main): Constify a char*.
16063
16064         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16065         static prototypes.
16066         (put_decl_string, lang_print_error): Constify a char*.
16067         (lang_init): Remove redundant extern prototype.
16068
16069         * mangle.c (emit_unicode_mangled_name): Constify a char*.
16070
16071         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16072         Add static prototypes.
16073         (get_type_from_signature): Constify a char*.
16074
16075         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16076         Add static prototypes.
16077         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16078         (verify_jvm_instructions): Constify a char*.
16079
16080         * xref.c (xref_flag_value): Likewise.
16081
16082         * xref.h (xref_flag_value): Likewise.
16083
16084         * zextract.c (makeword, makelong): Add static prototypes.
16085         (makeword, makelong): Constify a uch*.
16086
16087 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16088
16089         * lang.c (java_dummy_print): Constify a char*.
16090         (lang_print_error): Likewise.
16091         (lang_init): Remove redundant prototype for `print_error_function'.
16092         (lang_init_source): Likewise.
16093         (lang_identify): Constify a char*.
16094
16095 1999-08-09  Tom Tromey  <tromey@cygnus.com>
16096
16097         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16098         (WORDS_TO_LONG): Likewise.
16099         (WORDS_TO_DOUBLE): Likewise.
16100
16101 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16102
16103         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16104
16105         * expr.c (java_stack_pop, java_array_data_offset,
16106         build_java_throw_out_of_bounds_exception, case_identity,
16107         build_java_check_indexed_type): Add static prototypes.
16108         (linenumber_table, expand_invoke, expand_java_field_op,
16109         build_primtype_type_ref, expand_byte_code): Constify a char*.
16110
16111         * java-tree.h (build_primtype_type_ref, linenumber_table):
16112         Constify a char*.
16113         (java_lang_expand_expr): Add prototype.
16114
16115         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
16116         `java_lang_expand_expr'.
16117
16118         * lex.c (java_lex_error): Constify a char*.
16119         (java_get_unicode, java_read_char, java_allocate_new_line,
16120         java_unget_unicode, java_sneak_unicode): Prototype.
16121
16122         * parse-scan.y (current_class, package_name, method_declarator,
16123         report_class_declaration, yyerror): Constify a char*.
16124
16125         * parse.h (java_report_errors): Prototype.
16126         (yyerror): Constify a char*.
16127
16128         * parse.y (classitf_redefinition_error, check_modifiers,
16129         parse_jdk1_1_error, lookup_package_type,
16130         lookup_package_type_and_set_next, get_printable_method_name,
16131         purify_type_name): Constify a char*.
16132         (build_super_invocation, maybe_generate_finit,
16133         verify_constructor_super, parser_add_interface,
16134         add_superinterfaces, jdep_resolve_class, note_possible_classname,
16135         java_complete_expand_methods, java_expand_finals,
16136         cut_identifier_in_qualified, java_stabilize_reference,
16137         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16138         merge_string_cste): Prototype.
16139         (single_type_import_declaration, yyerror,
16140         variable_redefinition_error, build_array_from_name,
16141         build_unresolved_array_type, check_class_interface_creation,
16142         resolve_class, complete_class_report_errors,
16143         note_possible_classname, read_import_dir,
16144         find_in_imports_on_demand, resolve_package, fix_constructors,
16145         check_deprecation, lookup_method_invoke,
16146         maybe_build_primttype_type_ref, array_constructor_check_entry):
16147         Constify a char*.
16148         (java_complete_expand_methods, java_expand_finals): Make static.
16149         (convert_narrow): Remove static prototype.
16150
16151 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
16152
16153         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16154
16155 1999-08-02  Richard Henderson  <rth@cygnus.com>
16156
16157         * decl.c: Include defaults.h instead of expr.h.
16158         * parse.y: Likewise.
16159
16160 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
16161
16162         * java/decl.c (start_java_method): Change all uses of
16163         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16164         Ensure expr.h is included.
16165         * java/expr.c (pop_arguments): Ditto.
16166         * java/parse.y (expand_start_java_method): Ditto.
16167
16168 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16169
16170         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16171
16172 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
16173
16174         * decl.c: Include "function.h".
16175         * except.c: Likewise.
16176         * parse.y: Likewise.
16177         * Makefile.in: Update dependencies.
16178
16179 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16180
16181         * expr.c (build_java_soft_divmod): Provide a default case in switch.
16182         (java_lang_expand_expr): Mark parameters `target', `tmode' and
16183         `modifier' with ATTRIBUTE_UNUSED.
16184
16185         * gjavah.c (process_file): Add braces around ambiguous `else'.
16186
16187         * jcf-dump.c (print_access_flags, localvar_free): Change return
16188         type to void.
16189
16190         * parse.y (java_complete_expand_method): Initialize variable
16191         `exception_copy'.
16192         (resolve_qualified_expression_name): Likewise for `field_decl'.
16193         (patch_method_invocation): Likewise for `class_to_search'.
16194         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16195         (patch_assignment): Likewise for `lhs_type'.
16196
16197         * verify.c (verify_jvm_instructions): Remove unused variable
16198         `caller'.
16199
16200 1999-07-25  Richard Henderson  <rth@cygnus.com>
16201
16202         * decl.c (va_list_type_node): New.
16203
16204 1999-07-25  Anthony Green  <green@cygnus.com>
16205
16206         * gjavah.c (print_stub): New function.
16207         (METHOD_IS_NATIVE): New macro.
16208         (print_mangled_classname): Make static.
16209         (HANDLE_END_FIELD): Don't emit fields during stub generation.
16210         (process_file): Perform stub generation.
16211         (HANDLE_METHOD): Don't emit class decls during stub
16212         generation.
16213         (HANDLE_END_METHOD): Take into account stub generation.
16214         (print_method_info): Handle stub generation.
16215         (print_stub): New function.
16216         (print_cxx_classname): Make signature consistant with others.
16217         (help): Describe -stubs option.
16218         (main): Create stub file.
16219         (version): Use version.c.
16220         (print_full_cxx_name): New function.
16221         (print_c_decl): Use print_full_cxx_name.
16222
16223 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16224
16225         * check-init.c (check_init): Handle MAX_EXPR.
16226
16227 1999-07-15  Andrew Haley  <aph@cygnus.com>
16228
16229         * lang.c (flag_use_divide_subroutine): New variable.
16230         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16231         fp-to-integer conversion.
16232         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16233         is not set.
16234
16235         * expr.c (build_java_soft_divmod): New function.
16236         (build_java_binop): Call build_java_soft_divmod if
16237         flag_use_divide_subroutine is set.
16238         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16239         soft_lrem_node: new builtin functions.
16240         (init_decl_processing) Initialize the new builtins.
16241         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16242         soft_lrem_node: new builtin functions.
16243         (build_java_soft_divmod): New function.
16244         * parse.y: Call build_java_soft_divmod if
16245         flag_use_divide_subroutine is set.
16246         * parse.c: Rebuilt.
16247
16248         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16249         a --specs= arg) even if not linking.
16250         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16251         -fuse-divide-subroutine
16252
16253 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16254
16255         * parse.y (resolve_and_layout): Check methods only once.
16256         (resolve_qualified_expression_name): Verify thrown exceptions
16257         compatibility.
16258         (check_thrown_exceptions): Reject exceptions thrown in
16259         initializer. Error message tuned.
16260
16261 1999-07-14  Andrew Haley  <aph@cygnus.com>
16262
16263         * expr.c (expand_expr): Do not return the last statement in a
16264         block as the block's value.
16265
16266 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16267
16268         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16269         CALL_EXPR, to avoid order of evaluation changes.
16270
16271 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16272
16273         * parse.y (qualify_ambiguous_name): Do not use
16274         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16275
16276 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16277
16278         * check-init.c (check_init): Handle MAX_EXPR.
16279         * expr.c (force_evaluation_order): Force method call arguments to
16280         be evaluated in left-to-right order.
16281         * parse.y (qualify_ambiguous_name): Loop again to qualify
16282         NEW_ARRAY_EXPR properly.
16283
16284 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16285
16286         * parse.y (patch_invoke): Resolve unresolved invoked method
16287         returned type.
16288         (qualify_ambiguous_name): STRING_CST to qualify expression for
16289         type name resolution.
16290
16291 1999-06-24  Andrew Haley  <aph@cygnus.com>
16292
16293         * class.c (finish_class): Whenever a deferred method is
16294         output, rescan the list of methods to see if a new candidate for
16295         output can be found.
16296
16297 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16298
16299         * jvspec.c (lang_specific_driver): Recognize --help.
16300
16301 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16302
16303         * parse.y (resolve_package): Fixed bogus return statement.
16304         (patch_method_invocation): Resolve method invocation beginning with
16305         a package name qualifier.
16306
16307 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16308
16309         * Make-lang.in (java.stage1): Depend on stage1-start.
16310         (java.stage2): Likewise for stage2-start.
16311         (java.stage3): Likewise for stage3-start.
16312         (java.stage4): Likewise for stage4-start.
16313
16314 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16315
16316         * parse.y (java_complete_lhs): When doing cross referencing, don't
16317         try to keep file location on a WFL expanded as a CALL_EXPR.
16318
16319 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16320
16321         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16322         compiling to class file a void method with an empty method body.
16323         As a side effect, the bytecode backend will generate the
16324         appropriate `return' instruction.
16325
16326 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16327
16328         * parse.y (lookup_package_type_and_set_next): New function prototype.
16329         (resolve_package): Search current and imported packages.
16330         (lookup_package_type_and_set_next): New function.
16331
16332 1999-06-22  Andrew Haley  <aph@cygnus.com>
16333
16334         * verify.c (verify_jvm_instructions): Check for pending blocks
16335         before invalid PC test and opcode switch, not after.
16336
16337 1999-06-21  Andrew Haley  <aph@cygnus.com>
16338
16339         * except.c (find_handler_in_range): The upper limit for exception
16340         ranges is exclusive, not inclusive: (start <= pc < end).
16341         (link_handler): find child pointer which points to outer by
16342         searching sibling list: previous code incorrectly assumed that
16343         outer->outer->first_child must point to outer.
16344         * verify.c (verify_jvm_instructions): FIXME added to code for
16345         `athrow'.
16346         (verify_jvm_instructions): Do not assume that the last block
16347         processed in a subroutine is a block which ends with a `ret'
16348         instruction.  With some control flows it is possible that the last
16349         block ends with an `athrow'.
16350
16351 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16352
16353         * parse.y (qualify_ambiguous_name): Reorganized the post
16354         evaluation of non WFL leading expression nodes.
16355
16356 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16357
16358         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16359         CONVERT_EXPR.
16360
16361 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16362
16363         * parse.y (qualify_ambiguous_name): Handle qualified expression
16364         beginning with a STRING_CST.
16365
16366 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16367
16368         * parse.y (register_fields): Set DECL_INITIAL on both
16369         pre-initialized static and public fields.
16370         (resolve_field_access): Static field access expressions to always
16371         use pointer types.
16372         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16373         qualification. CONVERT_EXPR to be resolved as an expression name.
16374         (java_complete_lhs): Identify and access qualified final
16375         initialized field in switch statement case expression.
16376         (fold_constant_for_init): Pre-initialized field decl constant to
16377         be folded.
16378
16379 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16380
16381         * parse.y (note_possible_classname): Mark returned node with
16382         QUALIFIED_P only if the original class name contained a '/'.
16383
16384 1999-06-05  Anthony Green  <green@cygnus.com>
16385
16386         * Make-lang.in (gcjh): More parallel build fixes.
16387
16388 1999-06-03  Mike Stump  <mrs@wrs.com>
16389
16390         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16391
16392 1999-06-02  Anthony Green  <green@cygnus.com>
16393
16394         * except.c (link_handler): Chain exception handlers in order.
16395
16396 1999-06-02  Anthony Green  <green@cygnus.com>
16397
16398         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16399         with nops and process as usual in order to always set correct EH
16400         ranges.  Emit detailed warnings about unreachable bytecodes.
16401
16402 1999-06-02  Anthony Green  <green@cygnus.com>
16403
16404         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16405         constant.
16406
16407 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16408
16409         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16410           or the searched field decl.
16411
16412 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16413
16414         * parse.y (fold_constant_for_init): Convert numerical constant
16415         values to the type of the assigned field.
16416
16417 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16418
16419         * expr.c (lookup_field): Relaxed the test on class loading error
16420         detection.
16421         * parse.y (fold_constant_for_init): Enabeled old code.
16422
16423 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16424
16425         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16426         decide the validity of the cast of a java.lang.Cloneable reference
16427         to an array.
16428         (patch_conditional_expr): Fixed first argument passed to
16429         binary_numeric_promotion.
16430
16431 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16432
16433         * parse.y (qualify_ambiguous_name): Take into account that a
16434         CONVERT_EXPR might specify a type as a WFL.
16435
16436 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16437
16438         * parse.y (patch_assignment): Save the rhs before using it as an
16439         argument to _Jv_CheckArrayStore.
16440
16441 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16442
16443         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16444
16445 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16446
16447         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16448         floating point literal only when the exponent indicator has been
16449         parsed.
16450
16451 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16452
16453         * parse.y (formal_parameter:): Construct argument tree list
16454         element even if a yet unsupported final parameter was encountered.
16455
16456 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16457
16458         * parse.y (finish_method_declaration): Issue errors for native or
16459         abstract methods declared with a method body, as well as for non
16460         native or non abstract methods with no method body.
16461
16462 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16463
16464         * class.c (build_utf8_ref): Initialize variable `field'.
16465
16466         * decl.c (init_decl_processing): Initialize variable `field'.
16467
16468         * expr.c (build_known_method_ref): Mark parameters `method_type',
16469         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16470         (process_jvm_instruction): Likewise for parameter `length'.
16471
16472         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16473         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16474         ATTRIBUTE_UNUSED.
16475
16476         * parse.y (maybe_generate_clinit): Remove unused variable
16477         `has_non_primitive_fields'.
16478         (find_in_imports_on_demand): Initialize variables `node_to_use'
16479         and `cl'.
16480         (patch_binop): Likewise for variable `prom_type'.
16481         (patch_unaryop): Likewise for variable `prom_type'.
16482
16483         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16484
16485         * xref.c (xref_table): Add missing initializer.
16486
16487 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16488
16489         * java-except.h (struct eh_range): Removed unused `next' member.
16490         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16491         after adding all exception handlers.  Sort exception ranges in
16492         order of start PC.
16493         (struct pc_index): New structure.
16494         (start_pc_cmp): New function.
16495         * except.c (add_handler): Return `void'.  Don't call link_handler;
16496         instead construct an ordinary linked list and do range
16497         coalescing.
16498         (check_nested_ranges): New function.
16499         (link_handler): Changed interface to allow merging of eh_ranges.
16500         Split overlapping ranges.  Return `void'.
16501
16502 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16503
16504         * parse.y (constructor_block_end:): New rule, tagged <node>.
16505         (constructor_body:): Use `constructor_block_end' instead of
16506         `block_end'.
16507
16508 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16509
16510         * parse.y (statement_nsi:): Pop `for' statement block.
16511         (java_complete_lhs): Labeled blocks containing no statement are
16512         marked as completing normally.
16513
16514 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16515
16516         * xref.c (xref_set_current_fp): New function, defined.
16517         * xref.h (xref_set_current_fp): New function, prototyped.
16518
16519 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16520
16521         * check-init.c (check_init): Take into account that
16522         LABELED_BLOCK_STMT can be empty.
16523
16524 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16525
16526         * parse.y (java_check_regular_methods): Warning check on not
16527         overriding methods with default access in other packages does not
16528         apply to `<clinit>'.
16529         (java_complete_lhs): If block body is an empty_stmt_node, replace
16530         it by NULL_TREE. This prevents gcc from generating an irrelevant
16531         warning.
16532
16533 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16534
16535         * check-init.c (check_init): Removed code accepting to see things
16536         falling through default:, when doing xrefs.
16537         * java-tree.h (do_not_fold): New global variable, declared.
16538         * parse.y (do_not_fold): New global variable, defined.
16539         (java_complete_expand_method): Set `do_not_fold' to the value of
16540         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16541         and reinstall them after them have been purged; do not check for
16542         initializations; do not issue missing return errors.
16543         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16544         when doing xrefs.
16545         (patch_binop): Skip the fold part when doing xrefs.
16546         (build_string_concatenation): Skip the concatenation part when
16547         doing xrefs.
16548         (patch_synchronized_statement): Do not generate a try-finally when
16549         doing xrefs.
16550         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16551         and keep the location where the throw was seen.
16552         * typeck.c (convert): When `do_not_fold' is set, do not attempt
16553         any treatment on the converted node an simply return a NOP_EXPR of
16554         the targeted type.
16555         * xref.c (xref_get_data): New function, defined.
16556         * xref.h (xref_get_data): New function, declared.
16557         (XREF_GET_DATA): Use xref_get_data.
16558
16559 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16560
16561         * gjavah.c (print_include): Cast the result of `strlen' to int
16562         when comparing against a signed value.
16563         (add_namelet): Likewise.
16564
16565 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16566
16567         * expr.c (expand_invoke): Mark parameter `nargs' with
16568         ATTRIBUTE_UNUSED.
16569         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16570
16571         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16572         ATTRIBUTE_UNUSED.
16573
16574         * jcf-reader.c (get_attribute): Cast a value to long
16575         when comparing against a signed expression.  Likewise.
16576
16577         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16578         HOST_BITS_PER_CHAR.
16579
16580 1999-05-11  Andrew Haley  <aph@cygnus.com>
16581
16582         * parse.y (source_end_java_method): If the current method contains
16583         any exception handlers, force asynchronous_exceptions: this is
16584         necessary because signal handlers in libjava may throw exceptions.
16585         * decl.c (end_java_method): Ditto.
16586
16587 1999-05-11  Tom Tromey  <tromey@cygnus.com>
16588
16589         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16590         flags.
16591         * jvspec.c (THREAD_NAME): Removed.
16592         (GC_NAME): Likewise.
16593         (MATHLIB): Likewise.
16594         (WITHLIBC): Likewise.
16595         (GCLIB): Likewise.
16596         (THREADLIB): Likewise.
16597         (MATH_LIBRARY): Likewise.
16598         (lang_specific_driver): Don't add `-l' options to command line.
16599         Instead, add a single --specs option.  Recognize `-L' options and
16600         use them to search for spec file.
16601         (find_spec_file): New function.
16602         (SPEC_FILE): New define.
16603
16604 1999-05-11  Dave Brolley  <brolley@cygnus.com>
16605
16606         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16607         cpplib-enabled build.
16608
16609 1999-05-05  Per Bothner  <bothner@cygnus.com>
16610
16611         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
16612         temporarily zero it while calling rest_of_decl_compilation.
16613
16614         * java-tree.h (string_ptr_type_node):  Add declaration.
16615         * decl.c:  Define and initialize string_ptr_type_node.
16616         * parse.y (patch_string_cst):  Use string_ptr_type_node.
16617
16618         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
16619         * parse.y (for_statement):  Now unconditionally exit_block.
16620         (finish_labeled_statement):  No longer exit_block if for-loop.
16621         (patch_loop_statement):  Check harder if the loop is already labeled.
16622
16623         * parse.y (patch_initialized_static_field):  Removed function.
16624         (maybe_generate_clinit):  Removed special handling for interfaces.
16625         (java_complete_expand_methods):  Do a preliminary java_complete_tree
16626         on <clinit> to determine if it can be removed.
16627         (java_complete_expand_method):  Remove special handling for <clinit>.
16628         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
16629         optimize if we get back empty_stmt_node.
16630         For MODIFY_EXPR, re-do checking of static initializers.
16631         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
16632         For VAR_DECL, pass correct context.
16633
16634         * verify.c (verify_jvm_instructions):  Better error messages.
16635
16636 1999-05-03  Tom Tromey  <tromey@cygnus.com>
16637
16638         * parse-scan.y (interface_declaration): Call
16639         report_class_declaration for interfaces.
16640
16641 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
16642
16643         * Makefile.in: Remove -v from bison command lines.
16644
16645 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16646
16647         * check-init.c (check_init): Exclude a case of error when doing
16648         xrefs.
16649         * class.c (layout_class_method): Don't generate the error message
16650         twice when compiling from source.
16651         * lang-options.h: Added `-Wredundant-modifers' and
16652         `-Wunusupported-jdk11' flags and help text.
16653         * lang.c (lang_decode_option): Added support for
16654         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16655         flag_static_local_jdk11 and flag_redundant set accordingly.
16656         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16657         * parse.h (EXPR_WFL_ADD_COL): New macro.
16658         (DECL_END_SOURCE_LINE): Likewise.
16659         (DECL_INHERITED_SOURCE_LINE): Likewise.
16660         * parse.y (static_ref_err): New function, prototyped.
16661         (CCB_TK): Now tagged <operator>.
16662         (class_body:): Remember the location of the closing '}' of a class
16663         definition when doing xrefs.
16664         (block:): Likewise.
16665         (block_end:): Likewise.
16666         (create_class): Remember the location of the inherited class
16667         identifier when doing xrefs.
16668         (register_fields): Added test on first operand of `init' before
16669         testing it TREE_CODE.
16670         (method_header): Store the location of the class identifier in the
16671         class decl when doing xrefs.
16672         (finish_method_declaration): Don't combine first/last method line
16673         when doing xref.
16674         (java_check_regular_methods): Warning check on not overriding
16675         methods with default access on other packages move before check on
16676         static methods. Initialization of `aflags' also moved up.
16677         (resolve_expression_name): Call static_ref_err to report the error.
16678         (static_ref_err): New function, implemented.
16679         (resolve_field_access): Returned simplified static field access
16680         when doing xrefs.
16681         (resolve_qualified_expression_name): Check for illegal use of
16682         static fields in a non static context. Call static_ref_err to
16683         report error in various places.
16684         (java_complete_tree): Do not fold initialized static fields when
16685         doing xrefs.
16686         (java_complete_lhs): Likewise.
16687
16688 1999-04-29  Anthony Green  <green@cygnus.com>
16689
16690         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16691         create internal labels.
16692         (lookup_label): Ditto.
16693
16694 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16695
16696         * class.c (layout_class_method): Generate <clinit>'s rtl for
16697         interfaces.
16698         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16699         for interfaces' <clinit>.
16700         * expr.c (lookup_field): Search for fields in interfaces.
16701         (expand_invoke): Fixed indentation.
16702         (expand_java_field_op): Likewise. Use IS_CLINIT.
16703         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16704         (IS_CLINIT): New macro.
16705         * parse.y (type_declaration:): Call maybe_generate_clinit after an
16706         interface was parsed.
16707         (maybe_generate_clinit): Don't generate if the current class is an
16708         interface with only fields of primitive types.
16709         (reset_method_name): Use IS_CLINIT.
16710         (java_complete_expand_method): Expand <clinit> when it exists for
16711         interfaces. Use IS_CLINIT.
16712         (resolve_expression_name): Use DECL_CONTEXT instead of
16713         current_class to build static field references.
16714         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16715         ARRAY_REF when doing xreferencing.
16716         (check_final_assignment): Fixed typo in leading comment. Use
16717         IS_CLINIT.
16718         (patch_array_ref): Don't fully expand array references when
16719         xreferencing.
16720         (patch_return): Use IS_CLINIT.
16721         (patch_throw_statement): Likewise.
16722
16723 1999-04-22  Tom Tromey  <tromey@cygnus.com>
16724
16725         * Make-lang.in (JAVA_SRCS): Added check-init.c.
16726
16727 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16728
16729         * decl.c (predef_filenames, predef_filenames_size): New globals
16730         (init_decl_processing): predef_filenames and predef_filenames_size
16731         initialized.
16732         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16733         extern.
16734         * jcf-parse.c (predefined_filename_p): New function.
16735         (yyparse): Check that files on the command line are specified only
16736         once and issue a warning otherwise.
16737         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16738         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16739         avoid a gcc warning with -W -Wall turned on.
16740         (java_expand_classes): Abort if errors were encountered.
16741         (java_complete_lhs): If the cross reference flag is set, wrap
16742         field DECL node around a WFL when resolving expression name.
16743
16744 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16745
16746         * lang.c (lang_decode_option): Fixed returned value when parsing
16747         `-fxref=...' and `-Wall'.
16748         * parse.y (source_end_java_method): Do not generate code when
16749         flag_emit_xref is set.
16750         (resolve_expression_name): Do not build static field access when
16751         flag_emit_xref is set.
16752         (resolve_field_access): No special treatment on `length' when
16753         flag_emit_xref is set. Do not build qualified static field access
16754         when flag_emit_xref is set.
16755         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16756         when flag_emit_xref is set.
16757         (patch_assignment): Do not generate array store runtime check when
16758         flag_emit_xref is set.
16759         * xref.c (xref_flag_value): Fixed function declaration
16760         indentation.
16761         (xset_set_data): New function.
16762         * xref.h (xref_set_data): Added prototype for new function.
16763         (typedef struct xref_flag_table): New field data.
16764         (XREF_GET_DATA): New macro.
16765
16766 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16767
16768         * xref.h (enum): Removed trailing comma.
16769
16770         * parse.y (resolve_qualified_expression_name): Added missing
16771         `break'.
16772
16773 1999-04-15  Anthony Green  <green@cygnus.com>
16774
16775         * gjavah.c: New prototypes for java_float_finite and
16776         java_double_finite.
16777
16778 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16779
16780         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16781         references.
16782
16783 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16784
16785         * Makefile.in (TREE_H): Add tree-check.h.
16786         (RTL_H): Add genrtl.h.
16787
16788 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16789
16790         * parse.y (patch_assignment): Added ArrayStoreException runtime
16791         check.
16792
16793 1999-04-06  Per Bothner  <bothner@cygnus.com>
16794
16795         * expr.c (pop_type_0):  New function.
16796         (pop_type):  Use pop_type_0.
16797         * java-tree.h (pop_type_0):  New declaration.
16798         * verify.c (verify_jvm_instructions):  Check return instructions.
16799
16800         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16801         class files.
16802
16803 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16804
16805         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16806
16807         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16808         (main_jcf): Don't define.
16809         (process_file): Don't set `main_jcf'.
16810
16811         * java-tree.h (main_jcf): Don't declare.
16812
16813         * jcf-parse.c (main_jcf): Add static definition.
16814
16815         * lang.c (main_jcf): Don't define.
16816
16817 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16818
16819         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16820
16821         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16822
16823         * jcf-depend.c: Include "config.h", not <config.h>.
16824
16825         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16826         `bcopy' to PTR.
16827
16828         * jcf-path.c: Include "config.h", not <config.h>.
16829
16830         * lex.c: Don't include various system header files.
16831         (java_init_lex): Cast the argument of `bzero' to PTR
16832
16833         * parse-scan.y (java_push_parser_context): Likewise.
16834
16835         * parse.y (java_push_parser_context): Likewise.
16836         (patch_bc_statement): Match format specifier to variable argument.
16837
16838         * xref.c: Don't include <stdio.h>.
16839
16840 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16841
16842         * parse.y (struct parser_ctxt *ctxp): Now global.
16843         (declare_local_variables): Use WFL compound value for the
16844         declaration source line value, when doing cross-referencing.
16845
16846 1999-03-31  Tom Tromey  <tromey@cygnus.com>
16847
16848         * gjavah.c (print_field_info): Allow constants of other types.
16849         (print_include): Generate include when new name is proper prefix
16850         of already printed name.
16851         (add_namelet): Likewise.
16852         (cxx_keyword_subst): New function.
16853         (print_method_info): Use it.
16854         (print_field_name): New function.
16855         (get_field_name): New function.
16856         (print_field_info): Use get_field_name and print_field_name.
16857
16858 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16859
16860         * Makefile.in (keyword.h): Generate using gperf language 'C', not
16861         'KR-C', so gperf uses the `const' keyword on strings.
16862
16863         * keyword.gperf (java_keyword): Const-ify a char*.
16864
16865 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16866
16867         * parse.y (patch_bc_statement): Fixed identation and a bogus
16868         `printf' format.
16869
16870 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16871
16872         * parse.y (patch_assignment): Allow static variables in other
16873         classes to be assigned.
16874
16875 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16876
16877         * class.c (maybe_add_interface): Remove unused variable
16878         `interface_binfo'.
16879         (make_class_data): Use = for assignment, not ==.  Likewise.
16880         (emit_register_classes): Remove unused variable `decl'.
16881
16882         * lex.c: Fix comment so as not to contain an embedded `/*'.
16883
16884         * verify.c (verify_jvm_instructions): Remove unused variable
16885         `self_type'.
16886
16887 1999-03-27  Per Bothner  <bothner@cygnus.com>
16888
16889         * parse.y (complete_loop_body):  Rename to finish_loop_body.
16890         (complete_labeled_statement):  Rename to finish_labeled_statement.
16891         (complete_for_loop):  Rename to finish_for_loop.
16892         (complete_method_declaration):  Rename to finish_method_declaration.
16893
16894         * java-tree.h (continue_identifier_node):  New global node.
16895         * decl.c:  Define and initialize continue_identifier_node.
16896         * parse.y (generate_labeled_block):  Remove - no longer needed.
16897         (build_loop_body):  Use continue_identifier_node for continue block.
16898         (finish_labeled_statement):  Also do pop_labeled_block actions.
16899         (java_complete_lhs):  POP_LOOP even if error.
16900         (build_labeled_block):  Special handling for continue_identifier_node.
16901         (patch_loop_statement):  Re-organize.
16902         (patch_bc_statement):  Re-write.
16903
16904 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16905
16906         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16907         using a WFL compound value.
16908         * parse.y (xref.h): Include.
16909         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16910         WFL compound value.
16911         (register_fields): Set WFL compound value to lineno if doing
16912         xrefs.
16913         (java_complete_expand_method): Call expand_xref if flag_emit_xref
16914         is set.
16915         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16916         * xref.h (expand_xref): Prototype renamed from xref_generate.
16917
16918 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16919
16920         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16921         (GET_CURRENT_BLOCK): New macro.
16922         * parse.y (current_static_block): New global variable.
16923         (method_body:): Define action.
16924         (complete_method_declaration): Set current_function_decl to NULL
16925         when work on the current method is done.
16926         (declare_local_variables): Use GET_CURRENT_BLOCK.
16927         (java_method_add_stmt): Likewise.
16928         (java_complete_expand_method): Disable the use of `this' when
16929         expanding <clinit>.
16930         (enter_a_block): If no current method exist, use
16931         current_static_block to link static initializer blocks.
16932         (exit_block): Rewritten to use current_static_block when no current
16933         method decl exists.
16934         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16935         (patch_return): Forbid the use of `return' in static initializers.
16936         (patch_throw_statement): Fixed indentation. Issue specific error
16937         for uncaught thrown checked exception in static initializer
16938         blocks. Removed FIXME.
16939
16940 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
16941
16942         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16943         Link gcj from gcc.o.
16944
16945 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16946
16947         * parse.y (find_applicable_accessible_methods_list): When dealing
16948         with interface: ensure that a given interface or java.lang.Object
16949         are searched only once.
16950
16951 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16952
16953         * gjavah.c (print_c_decl): Remove unused argument `flags'.
16954
16955         * jcf-dump.c (print_access_flags): Add braces around if-else.
16956
16957         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16958         COMBINE_INPUTS.
16959
16960         * lex.c (build_wfl_node): Add static prototype.
16961
16962         * lex.h (build_wfl_node): Remove static prototype.
16963
16964         * parse.y: Include lex.c early enough to declare everything needed.
16965         Ensure calls to `build_wfl_node' pass the proper arguments.
16966         (create_class): Remove unused variable `super_decl'.
16967         (get_printable_method_name): Initialize variable `name'.
16968
16969 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16970
16971         * Changelog: Fixed 1999-03-22 typos.
16972         * lang.c (lang_decode_option): Fixed typo in error string in the
16973         XARG section.
16974
16975 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16976
16977         * Makefile.in (JAVA_OBJS): Added entry xref.o.
16978         (xref.o): New rule.
16979         * java-tree.h (flag_emit_xref): Declared extern.
16980         * lang.c (xref.h): Included.
16981         (flag_emit_xref): New global variable.
16982         (lang_decode_option): Added support for -fxref.
16983         * xref.c: Created.
16984         * xref.h: Likewise.
16985
16986 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
16987
16988         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16989         linked with.
16990
16991 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16992
16993         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16994         $(srcdir)/../system.h and $(JAVA_TREE_H).
16995         (jcf-io.o): Depend on $(JAVA_TREE_H).
16996         (mangle.o): Likewise.
16997
16998         * check-init.c (check_cond_init): Add static prototype.
16999
17000         * class.c (build_java_method_type, hashUtf8String,
17001         make_field_value, get_dispatch_vector, get_dispatch_table,
17002         append_gpp_mangled_type, mangle_static_field): Likewise.
17003         (strLengthUtf8): Hide unused definition.
17004         (hashUtf8String): Const-ify.
17005         (make_field_value): Un-ANSI-fy.
17006
17007         * constants.c: Move inclusion of jcf.h above java-tree.h.
17008         (set_constant_entry, find_class_or_string_constant,
17009         find_name_and_type_constant, get_tag_node,
17010         build_constant_data_ref): Add static prototype.
17011
17012         * decl.c (push_jvm_slot, builtin_function,
17013         lookup_name_current_level): Likewise.
17014         (builtin_function): Const-ify.
17015
17016         * except.c (expand_start_java_handler, expand_end_java_handler):
17017         Add static prototype.
17018
17019         * expr.c (flush_quick_stack, push_value, pop_value,
17020         java_stack_swap, java_stack_dup, build_java_athrow,
17021         build_java_jsr, build_java_ret, expand_java_multianewarray,
17022         expand_java_arraystore, expand_java_arrayload,
17023         expand_java_array_length, build_java_monitor, expand_java_pushc,
17024         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17025         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17026         expand_compare, expand_test, expand_cond, expand_java_goto,
17027         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17028         expand_java_field_op, java_push_constant_from_pool): Likewise.
17029
17030         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17031         (build_java_arraynull_check): Mark parameters `node' and `type'
17032         with ATTRIBUTE_UNUSED.
17033         (note_label): Likewise for parameter `current_pc'.
17034         (expand_java_call, expand_java_ret): Hide unused definition.
17035
17036         * java-tree.h (make_class, build_constants_constructor,
17037         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17038         init_outgoing_cpool, register_class, emit_register_classes,
17039         java_layout_seen_class_methods): Prototype.
17040         (unicode_mangling_length): Const-ify.
17041         (append_gpp_mangled_name, append_gpp_mangled_classtype,
17042         emit_unicode_mangled_name, format_int, format_uint,
17043         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17044         jcf_print_utf8_replace, open_class): Prototype.
17045
17046         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
17047         <stdio.h>.  Include tree.h/java-tree.h.
17048         (utf8_equal_string usage, process_class): Add static prototype.
17049         (open_class): Don't prototype this here.
17050         (utf8_equal_string): Match arguments to format specifiers.
17051         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17052         TABLE_SWITCH, disassemble_method): Likewise.
17053
17054         * jcf-io.c: Include tree.h/java-tree.h.
17055         (open_class, find_classfile, jcf_print_utf8,
17056         jcf_print_utf8_replace): Const-ify.
17057
17058         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17059         parse_class_file): Add static prototype.
17060         (find_in_current_zip): Match definition to existing static
17061         prototype.
17062
17063         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17064         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17065         finish_jcf_block, define_jcf_label, get_jcf_label_here,
17066         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17067         write_chunks, adjust_typed_op, generate_bytecode_conditional,
17068         generate_bytecode_return, perform_relocations, init_jcf_state,
17069         init_jcf_method, release_jcf_state, generate_classfile):
17070         Add static prototype.
17071         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17072         (make_class_file_name): Const-ify.
17073
17074         * jcf.h (find_classfile): Const-ify.
17075
17076         * jv-scan.c (reset_report): Remove prototype.
17077
17078         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17079         (error): Rewrite to allow varargs.
17080
17081         * lang.c (lang_f_options): Const-ify.
17082
17083         * lex.c (java_parse_escape_sequence): Add static prototype.
17084         (java_allocate_new_line): Match definition to existing static
17085         prototype.
17086
17087         * mangle.c Include tree.h/java-tree.h.
17088         (unicode_mangling_length, emit_unicode_mangled_name,
17089         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17090
17091         * parse.h (jdep_code): Remove trailing comma in enumeration.
17092         (java_get_line_col): Move prototype outside of !JC1_LITE test.
17093         (reset_report): Add prototype.
17094
17095         * verify.c (push_pending_label, merge_types): Add static
17096         prototypes.
17097
17098         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17099
17100 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17101
17102         * parse.y (find_applicable_accessible_methods_list): Extend the
17103         search to superinterfaces when relevant.
17104         (search_applicable_methods_list): New function.
17105
17106 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17107
17108         * class.c (unmangle_classname): Implemented stricter testing
17109         before setting the QUALIFIED_P flag on an identifier.
17110
17111 1999-03-16  Per Bothner  <bothner@cygnus.com>
17112
17113         * parse.y (java_complete_lhs):  Call force_evaluation_order
17114         after patch_newarray.
17115         (patch_binop):  Don't call fold if there are side effects.
17116
17117 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17118
17119         * parse.y (java_stabilize_reference): Use save_expr instead of
17120         building a SAVE_EXPR node.
17121         (java_complete_lhs): Patch the resulting string of the `+='
17122         operator (if necessary) and complete the RHS after having built
17123         the cast.
17124
17125 1999-03-15  Per Bothner  <bothner@cygnus.com>
17126
17127         * class.c (make_class):  Don't set CLASS_P here (because
17128         this function is also called by build_java_array_type).
17129         (push_class):  Set CLASS_P here instead.
17130         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
17131
17132         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
17133         context.  If the context is class, perfer "super" over "synchronized".
17134         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
17135
17136         * parse.y (create_class):  Don't call parser_check_super here;
17137         it is not robust.  Always wait until later.
17138
17139         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
17140         match what JDK 1.2 does), but don't set ACC_PUBLIC.
17141
17142 1999-03-13  Per Bothner  <bothner@cygnus.com>
17143
17144         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
17145         * lex.h (UNGETC):  Change misleading macro.
17146
17147 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17148
17149         * parse.y (java_stabilize_reference): Return NODE when patching a
17150         COMPOUND_EXPR.
17151         (java_complete_lhs): Put parenthesis around truth values.
17152
17153 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17154
17155         * class.c (layout_class_method): Don't make rtl for interface
17156         methods.
17157         * parse.h (GET_TYPE_NAME): New macro.
17158         * parse.y (if_then_statement:): Fixed indentation.
17159         (if_then_else_statement:): Likewise.
17160         (for_statement:): Fixed spacing.
17161         (try_statement:): Fixed indentation.
17162         (create_interface): Don't force interfaces to be abstract.
17163         (method_header): Abstract methods are OK in interfaces.
17164         (declare_local_variables): Fixed typo in comment.
17165         (java_complete_expand_method): Fixed indentation.
17166         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17167         non accessible fields.
17168         (java_stabilize_reference): New function.
17169         (java_complete_lhs): Fixed indentation. Use
17170         java_stabilize_reference in compound assignment. Insert the
17171         cast. If not processing `+' fix string constants before processing
17172         binop.
17173
17174 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17175
17176         * constants.c (find_class_or_string_constant): Cast variable `j'
17177         to a `jword' when comparing against one.
17178
17179         * expr.c (java_lang_expand_expr): Remove unused variables
17180         `has_finally_p' and `op0'.
17181
17182         * gjavah.c (print_field_info): Cast a value to jint when comparing
17183         against one.  Likewise for a jlong.
17184         (add_namelet): Likewise cast a `sizeof' to an int when comparing
17185         against a signed quantity.
17186
17187         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17188         (print_signature): Don't needlessly dereference variable `str'
17189
17190         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17191         `max_locals' with ATTRIBUTE_UNUSED.
17192         (jcf_parse_class): Likewise for variable `index'.
17193
17194         * parse.h (reverse_jdep_list): Remove static prototype.
17195
17196         * parse.y (build_jump_to_finally): Remove prototype and definition.
17197         (reverse_jdep_list): Add static prototype.
17198
17199         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17200         `assignment' and `expr_decl'.
17201
17202         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17203
17204 1999-03-12  Andrew Haley  <aph@cygnus.com>
17205
17206         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17207         we'll need a directory separator and a null character.
17208
17209 1999-03-10  Per Bothner  <bothner@cygnus.com>
17210
17211         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17212
17213 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17214
17215         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17216         interfaces.
17217
17218 1999-03-05  Per Bothner  <bothner@cygnus.com>
17219
17220         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17221
17222         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17223
17224         * class.c (layout_class_method):  A static method in a base class
17225         is never overridden, so treat it like it doesn't exist.
17226         However, do complain about private non-static method overriding
17227         public static method.
17228
17229         * parse.y:  Don't set unused INITIALIZED_P flag.
17230         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17231
17232         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17233         (build_array_from_name):  Re-order &index[string] to &string[index].
17234
17235         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17236         error_mark (it might catch more errors, but it is more likely to lose).
17237
17238 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17239
17240         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17241         (parse-scan.o): Depend on toplev.h.
17242
17243         * class.c (make_method_value): Add prototype.  Make it static.
17244         Remove unused second argument, caller changed.
17245
17246         * expr.c (java_lang_expand_expr): Remove unused variable
17247         `return_label'.
17248
17249         * java-tree.h: Don't prototype find_in_current_zip.
17250         Add prototypes for verify_constant_pool, start_java_method,
17251         end_java_method, give_name_to_locals, expand_byte_code,
17252         open_in_zip, set_constant_value, find_constant1, find_constant2,
17253         find_utf8_constant, find_string_constant, find_class_constant,
17254         find_fieldref_index, find_methodref_index, write_constant_pool,
17255         count_constant_pool_bytes and encode_newarray_type.
17256
17257         * jcf-dump.c: Remove unused variable `LONG_temp'.
17258
17259         * jcf-parse.c: Include parse.h.
17260         (jcf_parse_source): Remove unused parameter, all callers changed.
17261         (jcf_figure_file_type): Add static prototype.
17262         (find_in_current_zip): Likewise.  Also remove unused parameter,
17263         all callers changed.
17264         (read_class): Initialize variable `saved_pos'.
17265
17266         * jcf-reader.c (jcf_parse_preamble): Mark variables
17267         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17268
17269         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17270         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17271         (java_parse_doc_section): Initialize variable `seen_star'.
17272         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17273         (java_lex_error): Mark parameters `msg' and `forward' with
17274         ATTRIBUTE_UNUSED.
17275         (java_get_line_col): Mark parameters `filename' and `line' with
17276         ATTRIBUTE_UNUSED.
17277
17278         * parse-scan.y: Include toplev.h.
17279         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17280
17281         * parse.h: use `struct JCF', not plain `JCF'.
17282         (java_parser_context_save_global, java_expand_classes
17283         java_parser_context_restore_global, java_parse): Add prototypes.
17284
17285         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17286         `node'.
17287
17288 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17289
17290         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17291
17292 1999-02-26  Per Bothner  <bothner@cygnus.com>
17293
17294         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17295         explicit build_decl.  (Avoids crash in reload when optimizing.)
17296
17297 1999-02-25  Per Bothner  <bothner@cygnus.com>
17298
17299         * decl.c (complete_start_java_method):  Handle synchronized method
17300         even when compiling from bytecode.
17301
17302 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17303
17304         * gjavah.c (add_class_decl): Only generate `#include' if outer
17305         class is not the name of the class we are processing.  Correctly
17306         append `.h' in #include.
17307         (process_file): Clean up newlines around generated `#include's.
17308         (decode_signature_piece): Correctly handle inner classes.
17309         (struct include): New structure.
17310         (all_includes): New global.
17311         (print_include): New function.
17312         (add_class_decl): Use it.
17313         (process_file): Likewise.
17314         (add_class_decl): Generate include for java-array.h if array
17315         seen.
17316         (process_file): Don't generate java-array.h include.
17317
17318         * gjavah.c (add_namelet): Check for standard package names here.
17319         (add_class_decl): Don't check for standard package names here.
17320
17321 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17322
17323         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17324         When reading a zip file, only use strncmp if both strings are
17325         bigger than the buffer length.  Initialize `k' when looping
17326         through zip file.
17327
17328 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17329
17330         * gjavah.c (struct namelet): New structure.
17331         (add_namelet): New function.
17332         (print_namelet): New function.
17333         (print_class_decls): Use add_namelet and print_namelet to generate
17334         namespaces and not classes.
17335         (method_printed): New global.
17336         (HANDLE_END_METHOD): Examine method_printed.
17337         (print_method_info): Set method_printed when required.  Print
17338         error if function to be ignored is marked virtual.  Handle $finit$
17339         method.
17340         (METHOD_IS_FINAL): New macro.
17341         (print_field_info): Use it.
17342         (HANDLE_METHOD): Clear method_printed.
17343         (method_pass): New global.
17344         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17345         (process_file): Do two passes over both fields and methods.
17346         (HANDLE_METHOD): Examine method_pass.
17347         (root): New global.
17348         (add_class_decl): New function.
17349         (print_class_decls): Don't scan over entire constant pool.
17350
17351 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17352
17353         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17354         disable linking in that case.
17355
17356 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17357
17358         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17359         not 0x1f.
17360
17361 1999-02-21  Per Bothner  <bothner@cygnus.com>
17362
17363         * decl.c (build_result_decl), java-tree.h:  New method.
17364         (complete_start_java_method):  Handle synchronized methods.
17365         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17366         (start_java_method):  Call build_result_decl here instead  ...
17367         * parse.y (java_complete_expand_method):  ... and here.
17368         (expand_start_java_method): Don't call complete_start_java_method here.
17369         (java_complete_expand_method):  Call it here instead.
17370         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17371         * java-tree.h:  ... here.
17372
17373         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17374         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17375         for ARRAY_REF - it doesn't work when array bounds are checked.
17376         (patch_array_ref):  Handle it here instead.
17377
17378         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17379
17380 1999-02-19  Per Bothner  <bothner@cygnus.com>
17381
17382         Force left-to-right evaluation of binary operations etc.
17383         * expr.c (force_evaluation_order), java-tree.h:  New function.
17384         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17385         calls, and ARRAY_REFs to force_evaluation_order.
17386         (various):  Set TREE_SIDE_EFFECTS more carefully.
17387
17388         Tolerate random (non-UTF8) encoding in comments without complaining.
17389         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17390         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17391
17392         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17393         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17394
17395         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17396         COMPOUND_EXPR.  Don't complain about empty statement after return.
17397
17398 1999-02-19  Per Bothner  <bothner@cygnus.com>
17399
17400         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17401         in TREE_LIST - just chain the POINTER_TYPEs together.
17402         (resolve_class):  If type already resolved, return decl.
17403         After resolving, update TREE_TYPE(class_type), and name (if array).
17404         * parse.h (do_resolve_class), parse.y:  Make non-static.
17405         * class.c (maybe_layout_super_class):  Take this_class argument.
17406         Do do_resolve_class if necessary.
17407         (layout_class, layout_class_methods): Adjust calls appropriately.
17408         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17409         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17410         * typeck.c (build_java_array_type):  Don't call layout_class.
17411
17412 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17413
17414         * parse.y (check_pkg_class_access): Allow private class access
17415         within the same package.
17416         (strip_out_static_field_access_decl): New function.
17417         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17418         operator argument before testing its nature.
17419
17420 1999-02-03  Per Bothner  <bothner@cygnus.com>
17421
17422         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17423         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17424         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17425         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17426         * expr.c (java_lang_expand_expr):  Likewise.
17427         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17428         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17429         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17430         (build_try_statement):  Remove finally parameter and handling.
17431         (build_try_finally_statement):  New function.
17432         (patch_try_statement):   No longer need to support finally clause.
17433         (try_statement):  Update grammar action rules.
17434         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17435         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17436
17437 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17438
17439         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17440         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17441
17442 1999-02-17  Andrew Haley  <aph@cygnus.com>
17443
17444         * class.c (build_utf8_ref): Back out broken patch which was
17445         intended to to output signatures using '.' as a separator.
17446
17447         * class.c (make_class_data): Output signatures using '.' as a
17448         separator, rather than '/'.
17449         (mangled_classname): Likewise.
17450         (make_field_value): Likewise.
17451         (make_method_value): Likewise.
17452         * constants.c (alloc_class_constant): Likewise.
17453         * expr.c (build_invokeinterface): Likewise.
17454
17455 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17456
17457         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17458         of an ancient workaround.
17459
17460 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17461
17462         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17463         here anymore.
17464
17465 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17466
17467         * lex.c (yylex): Encode \0 as UTF8.
17468
17469 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17470
17471         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17472         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17473         (libgcj_zip): Renamed.
17474         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17475         LIBJAVA_ZIP_FILE.
17476         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17477
17478         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17479         (GC_NAME): Renamed -lgc to -lgcjgc.
17480
17481 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17482
17483         * lex.c (java_lang_cloneable): Initialize.
17484         * parse.y (java_lang_cloneable): New static variable.
17485         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17486         doing one more qualification round.
17487         (valid_ref_assignconv_cast_p): Reject null source or
17488         destination. Allow an array to be cast into java.lang.Cloneable.
17489         (patch_cast): Swapped two first arguments to first call to
17490         valid_ref_assignconv_cast_p.
17491
17492 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17493
17494         * parse.h: DECL_P renamed JDECL_P.
17495         * parse.y: DECL_P replaced by JDECL_P.
17496         (build_array_from_name): Always use pointer's type.
17497         (patch_bc_statement): Extra code to search continue target in a
17498         for loop. Fixed comments. Continue target is current loop when
17499         unlabeled.
17500
17501 1999-02-05  Andrew Haley  <aph@cygnus.com>
17502
17503         * class.c (make_class_data): The superclass of an interface should
17504         be null, not class Object.
17505
17506         * lex.c (java_lex): Sign extend hex literals.
17507
17508 1999-02-04  Andrew Haley  <aph@cygnus.com>
17509
17510         * class.c (build_utf8_ref): Output signatures using '.' as a
17511         separator, rather than '/'.
17512         (make_class_data): Likewise.
17513
17514 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17515
17516         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17517         mkstemp.o.  Get them from libiberty now.
17518
17519 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17520
17521         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17522
17523 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17524
17525         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17526         from libiberty.h
17527
17528 1999-02-02  Per Bothner  <bothner@cygnus.com>
17529
17530         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17531         * jcf-write.c (generate_bytecode_return):  New function.
17532         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
17533
17534         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
17535         generate special [fd]const_[01] instructions.
17536
17537         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
17538
17539         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
17540         handling OPCODE_lookupswitch or OPCODE_tableswitch.
17541
17542 1999-02-01  Per Bothner  <bothner@cygnus.com>
17543
17544         * parse.y (patch_method_invocation):  Handle calling static methods,
17545         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17546
17547         * parse.y (java_complete_lhs):  Don't complain about unreachable
17548         exit condition in a do-while statement.
17549
17550 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17551
17552         * lex.c (java_read_char): Fixed utf8 decoding.
17553         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17554         range.
17555         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17556         comments. Local variable `all_primitive' is gone. Broadened
17557         acceptance of `0' to floating point targets. `long' can now be
17558         widened to `double' or `float'.
17559         (valid_method_invocation_conversion_p): Added leading
17560         comment. Fixed tabulation.
17561         (build_string_concatenation): Optimize out left or right empty
17562         string constants.
17563
17564 1999-01-28  Per Bothner  <bothner@cygnus.com>
17565
17566         * jcf-write.c (localvar_alloc):  Only emit entry for
17567         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17568         (generate_bytecode_insns):  Only call put_linenumber if
17569         debug_info_level > DINFO_LEVEL_NONE.
17570         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
17571         is specified, add -g1 (for compatibility wih javac).
17572
17573 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
17574
17575         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17576         gjavah.o, check-init.o, jv-scan.o
17577
17578 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17579
17580         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17581
17582         * gjavah.c: Include config.h and system.h.
17583
17584         * javaop.h (inline): Don't define, its handled by system.h.
17585         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17586         from `inline' to `static inline'.
17587
17588         * jcf.h (inline): Don't define, its handled by system.h.
17589
17590         * lex.c (inline): Likewise.
17591
17592 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
17593
17594         * lang-specs.h: Map -Qn to -fno-ident.
17595
17596 1999-01-29  Richard Henderson  <rth@cygnus.com>
17597
17598         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17599
17600 1999-01-29  Tom Tromey  <tromey@cygnus.com>
17601
17602         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17603         then cast it to Object before calling `append' method.
17604
17605 1999-01-28  Per Bothner  <bothner@cygnus.com>
17606
17607         * check-init.c (check_bool2_init, check_bool_init, check_init):
17608         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17609         * jcf-write.c (generate_bytecode_insns):  Likewise.
17610
17611 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17612
17613         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17614         * parse.y (patch_cast): Allow a boolean to be cast into a
17615         boolean.
17616
17617 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17618
17619         * parse.y: (class_declaration:): Fixed indentation.
17620         (class_member_declaration:): Extra `;' after field declaration now
17621         accepted.
17622         (interface_declaration:): Removed debug messages in error reports.
17623         (patch_binop): Nodes created and returned inherit the orignal
17624         node's COMPOUND_ASSIGN_P flag value.
17625         (patch_cast): Fix cast from char to floating point.
17626
17627 1999-01-25  Andrew Haley  <aph@cygnus.com>
17628
17629         * except.c, java-except.h (expand_resume_after_catch): new
17630         function.
17631         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17632         to branch back to main flow of control after a catch block.
17633
17634 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17635
17636         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17637         $(srcdir)/../system.h.
17638         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17639         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17640         (jcf-write.o): Likewise.
17641         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17642         (mangle.o): Depend on $(srcdir)/../toplev.h.
17643         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17644         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17645
17646         * class.c: Include output.h and parse.h.
17647         (mangled_classname): Add the `const' keyword to a char*.
17648         (find_named_method): Hide unused function definition.
17649         (build_utf8_ref): Change type of variable `c' to unsigned char.
17650         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17651         (build_class_ref): Add the `const' keyword to a char*.
17652         (layout_class_method): Remove unused variable `buf'.
17653
17654         * decl.c (find_local_variable): Remove unused variable `rtl'.
17655         (pushdecl): Likewise for variables `different_binding_level' and
17656         `oldglobal'.
17657         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17658         (maybe_build_cleanup): Likewise for parameter `decl'.
17659
17660         * except.c (expand_start_java_handler): Mark parameter `range'
17661         with ATTRIBUTE_UNUSED.
17662
17663         * expr.c: Include except.h.
17664         (pop_type): Remove unused variable `i'.
17665         (pop_value): Likewise for variables `n_words' and `i'.
17666         (expand_java_arrayload): Likewise for variable `convert'.
17667         (java_lang_expand_expr): Likewise for variables `op0', `type',
17668         `mode', `unsignedp', `node' and `elements'.
17669         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17670         `eh_ranges'.
17671         (process_jvm_instruction): Add a `const' qualifier to a char*.
17672
17673         * gjavah.c (output_directory): Add the `const' keyword to a char*.
17674         (temp_directory): Likewise.
17675         (print_c_decl): Likewise.
17676         (print_method_info): Likewise.
17677         (decode_signature_piece): Likewise.
17678         (print_mangled_classname): Likewise.
17679
17680         * java-except.h: Provide prototypes for maybe_start_try,
17681         maybe_end_try and add_handler.
17682
17683         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17684         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
17685         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17686         init_expr_processing, push_super_field, init_class_processing,
17687         can_widen_reference_to, class_depth, verify_jvm_instructions,
17688         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17689         set_local_type, merge_type_state, push_type, load_type_state,
17690         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17691         emit_unicode_mangled_name): Add prototypes.
17692
17693         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17694         (print_signature_type): Use ISDIGIT, not isdigit.
17695         (print_signature): Remove unused variable `j'.
17696
17697         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17698         int when comparing against one.
17699
17700         * jcf-parse.c: Include toplev.h.
17701
17702         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
17703         (localvar_free): Remove unused variable `i'.
17704         (generate_bytecode_conditional): Likewise for variable `kind'.
17705
17706         * jv-scan.c: Include config.h and system.h.  Remove redundant
17707         OS header and gansidecl.h includes.
17708         (warning): Add the `const' keyword to a char*.  Also add
17709         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
17710         __STDC__, when determining whether to use ANSI-isms.
17711         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
17712         (xmalloc): Don't redundantly prototype here.
17713         (main): Remove unused parameter `envp'.  Also fix the arguments
17714         passed to function `fatal' to match the format specifier.
17715
17716         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17717
17718         * mangle.c: Include toplev.h.
17719         (emit_unicode_mangled_name): Declare parameter `len'.
17720
17721         * parse.y (parse_warning_context): Add the `const' keyword to a
17722         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
17723         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17724         (issue_warning_error_from_context): Add the `const' keyword to
17725         a char*.
17726         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17727         not `__STDC__' for whether to use ANSI-isms.
17728
17729         * typeck.c (incomplete_type_error): Mark parameters `value' and
17730         `type' with ATTRIBUTE_UNUSED.
17731         (parse_signature_type): Use ISDIGIT, not isdigit.
17732
17733         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17734         (verify_jvm_instructions): Likewise.  Remove unused variables
17735         `field_name' and `default_val'.
17736
17737         * zextract.c: Include config.h and system.h.  Remove redundant
17738         OS header includes.
17739
17740         * zipfile.h: Prototype `read_zip_archive'.
17741
17742 1999-01-21  Andrew Haley  <aph@cygnus.com>
17743
17744         * typeck.c (convert): Allow conversions to void type: some
17745         optimizations in gcc do this.
17746
17747 1999-01-21  Andrew Haley  <aph@cygnus.com>
17748
17749         * typeck.c (convert_ieee_real_to_integer): New function.
17750         (convert): When not using fast-math and using hardware fp, convert
17751         an IEEE NaN to zero.
17752
17753 1999-01-18  Andrew Haley  <aph@cygnus.com>
17754
17755         * parse.y (patch_binop): Do a type conversion from signed to
17756         unsigned and then back to signed when a ">>>" is found.
17757
17758 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17759
17760         * java-tree.h: (check_for_initialization): Added prototype.
17761         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17762         * parse.y (do_resolve_class): Removed unused locals.
17763         (read_import_dir): Likewise.
17764         (resolve_qualified_expression_name): Array creation
17765         expressions are valid primary expressions.
17766         (qualify_ambiguous_name): Likewise.
17767         (patch_synchronized_statement): Removed unused local.
17768
17769 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17770
17771         * Makefile.in (zextract.o): Add dependencies.
17772
17773         * Makefile.in: Do not put ^Ls at the start of a line.
17774
17775 1999-01-15  Per Bothner  <bothner@cygnus.com>
17776
17777         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17778         sub-type the result of the call that gets the exception value.
17779
17780         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17781         don't call finish_class.
17782
17783         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17784         clear found before continuing.
17785
17786         * verify.c (verify_jvm_instructions):  On an array load, allow
17787         and handle top of stack to be TYPE_NULL.
17788
17789         * gjavah.c (generate_access):  Translate Java package private or
17790         protected access to C++ public, but with a comment.
17791
17792 1999-01-13  Andrew Haley  <aph@cygnus.com>
17793
17794         * expr.c (generate_name): Name prefix changed to avoid clashes
17795         with assembler temp labels.
17796
17797         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17798         MODIFY_EXPR.  Without this, code for the assignment may not be
17799         generated at all and the synchronized statement will read an
17800         uninitialized variable.
17801
17802 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17803
17804         * class.c (maybe_layout_super_class): Fixed returned value.
17805         * lex.c: Added 1999 to the copyright.
17806         (java_init_lex): Initialize java_lang_imported.
17807         * lex.h: Added 1999 to the copyright.
17808         * parse.h: Added 1999 to the copyright.
17809         (REGISTER_IMPORT): Fixed typo in trailing macro.
17810         (CURRENT_OSB): New macro.
17811         (struct parser_ctxt): New fields osb_depth, osb_limit.
17812         * parse.y (java_lang_id): New global variable.
17813         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17814         (array_creation_expression:): Use CURRENT_OSB.
17815         (dims:): Uses a stack to keep track of array dimensions.
17816         (cast_expression:): Use CURRENT_OSB.
17817         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17818         conditions.
17819         (register_fields): Fixed typos in comment.
17820         (check_method_redefinition): Fixed comment indentation.
17821         (java_check_regular_methods): Set saved found wfl to NULL after
17822         having reinstalled it in the previously found DECL_NAME.
17823
17824 1999-01-10  Richard Henderson  <rth@cygnus.com>
17825
17826         * gjavah.c (java_float_finite): Use a union to do type punning.
17827         (java_double_finite): Likewise.
17828
17829 1999-01-09  Per Bothner  <bothner@cygnus.com>
17830
17831         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
17832         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17833         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
17834         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
17835         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17836         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
17837
17838 1999-01-08  Per Bothner  <bothner@cygnus.com>
17839
17840         * check-init.c (check_init):  If compiling to native, we don't
17841         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
17842
17843 1999-01-08  Tom Tromey  <tromey@cygnus.com>
17844
17845         * parse-scan.y (variable_declarator_id): Set or increment
17846         bracket_count.
17847         (bracket_count): New global.
17848         (formal_parameter): Handle case where bracket pairs trail variable
17849         declarator id.
17850
17851 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
17852
17853         * jcf-parse.c (yyparse): variable len changed from a char to an
17854         int to prevent overflow.
17855
17856 1999-01-06  Per Bothner  <bothner@cygnus.com>
17857
17858         * java-tree.h:  Declare read_class.
17859         * jcf-parse.c (read_class):  New function.
17860         (load_class):  Now just call read_class.
17861
17862         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
17863         * jcf-parse.c (parse_source_file):  Declare save_error_count,
17864         which is needed by java_parse_abort_on_error macro,
17865         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
17866
17867         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
17868         constructor, if initializing a static field.
17869         (patch_new_array_init):  Set TREE_CONSTANT if it is.
17870         * expr.c (java_lang_expand_expr):  For a static array constructor
17871         of primitive elements, allocate the array itself statically.
17872         Disabled until we can set the vtable field statically.
17873
17874         * check-init.c:  New file.  Checks for definite assignment.
17875         * Makefile.in (JAVA_OBJS):  Add check-init.o.
17876         * parse.y (java_complete_expand_method): Call check_for_initialization.
17877         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
17878
17879 1999-01-06  Graham <grahams@rcp.co.uk>
17880
17881         * parse.y : include system.h instead of including
17882         standard headers directly with the exception of <dirent.h>.
17883
17884 1999-01-06  Per Bothner  <bothner@cygnus.com>
17885
17886         * lex.h:  Moved static function declarations to lex.c,
17887         to shut up some -Wall warnings.
17888         * lex.c:  Static function declarations moved here.
17889         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
17890
17891 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17892
17893         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17894
17895 1998-12-22  Per Bothner  <bothner@cygnus.com>
17896
17897         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
17898         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
17899
17900         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
17901         (localvar_alloc):  Change return type to void,
17902         (emit_unop):  Remove unused variable size.
17903
17904         * jcf-write.c (struct jcf_block):  Add new union.
17905         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
17906         (call_cleanups):  New functions.
17907         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
17908         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
17909         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17910         * lang.c (lang_init):  Call using_eh_for_cleanups.
17911         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
17912         completing operands to patch_synchronized_statement.
17913         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17914         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17915         WITH_CLEANUP_EXPR instead of TRY_EXPR.
17916
17917 1998-12-20  John F. Carr  <jfc@mit.edu>
17918
17919         * Make-lang.in: Comment out control-Ls; they upset some makes.
17920
17921 1998-12-18  Tom Tromey  <tromey@cygnus.com>
17922
17923         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17924         consistently.
17925
17926 1998-12-17  Tom Tromey  <tromey@cygnus.com>
17927
17928         * parse.y (DIR_SEPARATOR): New define.
17929         (check_class_interface_creation): Use it.
17930
17931         * parse-scan.y (report_main_declaration): Recognize
17932         `java.lang.String' in argument to main.
17933
17934 1998-12-16  Per Bothner  <bothner@cygnus.com>
17935
17936         * parse.y (create_interface):  Remove bogus test.
17937
17938 1998-12-16  Per Bothner  <bothner@cygnus.com>
17939
17940         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
17941         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
17942
17943 1998-12-16  Tom Tromey  <tromey@cygnus.com>
17944
17945         * parse-scan.y (qualified_name): Use correct sprintf format.
17946
17947 1998-12-15  Tom Tromey  <tromey@cygnus.com>
17948
17949         * gjavah.c (print_field_info): Changed how most negative number is
17950         printed.
17951
17952 1998-12-14  Per Bothner  <bothner@cygnus.com>
17953
17954         * parse.y (fold_constant_for_init):  New function.
17955         (resolve_expression_name):  Don't replace static final
17956         constant-initialized fields by its value.
17957         (java_complete_lhs):  New.  Same as java_complete_tree, except does
17958         not replace static final constant-initialized fields by their values.
17959         (register_fields):  If there is an initializer, set DECL_INITIAL and
17960         MODIFY_EXPR_FROM_INITIALIZATION_P.
17961         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
17962         Only call patch_initialized_static_field if
17963         MODIFY_EXPR_FROM_INITIALIZATION_P.
17964         (patch_initialized_static_field):  If not valid constant, clear
17965         DECL_INITIAL.
17966
17967         * parse.y (lookup_field_wrapper):  Fix thinko.
17968
17969         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
17970         set and restore global lineno.
17971
17972 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17973
17974         * gjavah.c (print_field_info): If value to print is the smallest
17975         value of its size, then print as hex to avoid later warnings from
17976         C++ compiler.
17977
17978 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17979
17980         * gjavah.c (decompile_method): Decompile `return null'.
17981         (process_file): Generate `#pragma interface'.
17982         (method_declared): New global.
17983         (print_method_info): Set it.
17984         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17985         (print_method_info): Handle abstract methods.
17986
17987 1998-12-13  Per Bothner  <bothner@cygnus.com>
17988
17989         * parse.y (patch_method_invocation):  If class_decl is null
17990         (e.g. an array type), use original type.
17991
17992         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
17993         errors about uncaught exception from clone (of array, specifically).
17994
17995 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17996
17997         * gjavah.c (decompile_method): Handle all types of `return'
17998         opcode.  Decompile `return this' and `return'.
17999         (method_access): New global.
18000         (print_method_info): Set it.
18001         (decompile_method): Don't decompile a synchronized method.
18002
18003 1998-12-13  Tom Tromey  <tromey@cygnus.com>
18004
18005         * jcf-reader.c (jcf_parse_one_method): Recognize
18006         HANDLE_END_METHOD.
18007         * gjavah.c (HANDLE_END_METHOD): New macro.
18008         (HANDLE_CODE_ATTRIBUTE): New macro.
18009         (decompile_method): New function.
18010         (print_method_info): Don't print `;\n' at end of function decl.
18011         Include java-opcodes.h.
18012         (decompiled): New global.
18013
18014 1998-12-12  Per Bothner  <bothner@cygnus.com>
18015
18016         * class.c (build_class_ref):  Handle PRIMTYPE.class if
18017         flag_emit_class_files.
18018         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
18019         if flag_emit_class_files.
18020         * parse.y (java_complete_tree):  Pre-liminary support for
18021         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18022
18023         * parse.y (patch_synchronized_statement):   Don't call monitorexit
18024         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
18025
18026         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
18027
18028         * zipfile.h (opendir_in_zip):  New declaration.
18029         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
18030         (opendir_in_zip):  New function, using code from open_in_zip.
18031         (open_in_zip):  Call opendir_in_zip.
18032         (find_class):  Remove no-longer-used do_class_file parameter,
18033         but add source_ok parameter.  Change logic so if we find a .java file,
18034         we don't look for .class in later classpath emtries.
18035         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
18036         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
18037         * gjavah.c: Update call to find_class.
18038         * jcf-dump.c:  Likewise.
18039
18040         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
18041         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
18042         nothing if body is empty_stmt_node.
18043         Various little fixes so SP gets correctly adjusted.
18044         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18045         For CALL_EXPR, test if static first.
18046         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
18047         such as the ones we create for Object and Class.
18048         Set and restore current_function_decl.
18049         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18050         (note_possible_classname):  New function.
18051         (read_import_entry):  Removed.  Merged with read_import_dir.
18052         (read_import_dir):  Don't call find_class - that only gives us
18053         the first classpath entry having the needed package.
18054         Use the struct buffer data structure from buffer.h.
18055         (read_import_dir, find_in_imports_on_demand):  The remembered
18056         class names now use '.' (not '/') as package separator.
18057
18058         * parse.y (java_complete_expand_methods):  Call write_classfile
18059         here, and not in java_expand_classes (which only gets first class).
18060
18061 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18062
18063         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
18064         (register_fields):  If a static fields has an initializer, just
18065         chain it on ctxp->static_initialized, and handle later.
18066         (java_complete_expand_methods):  Force <clinit> first.
18067         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
18068         - it's already been completed.
18069         (patch_initialized_static_field):  New function.
18070         (java_complete_field):  Call it.
18071
18072 1998-12-12  Per Bothner  <bothner@cygnus.com>
18073
18074         * expr.c (encode_newarray_type, build_new_array):  New functions.
18075         * java-tree.h:  Declare build_new_array.
18076         * jcf-write.c (patch_newarray):  Use build_new_array.
18077
18078         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
18079         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
18080
18081         * parse.y (patch_new_array_init):  Re-organize.
18082         Now is passed the actual array (pointer) type of the value.
18083         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18084         (patch_array_constructor):  Removed - merged into patch_new_array_init.
18085         (java_complete_tree):  Update patch_new_array_init.
18086
18087         * jcf-write.c (find_constant_index):  New function.
18088         (generate_bytecode_insns):  Use find_constant_index.
18089         (generate_classfile):  Use find_constant_index for ConstantValue.
18090
18091 1998-12-11  Tom Tromey  <tromey@cygnus.com>
18092
18093         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18094         * decl.c (init_decl_processing): Renamed dtable -> vtable.
18095         * class.c (make_class_data): Renamed dtable -> vtable, and
18096         dtable_method_count -> vtable_method_count.
18097
18098 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18099
18100         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18101         global variables, initialized.
18102         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18103         Declared new global variables.
18104         * lex.c (java_lex): Return long_zero_node, float_zero_node,
18105         double_zero_node, integer_zero_node upon direct matching.
18106         * parse.y (purify_type_name): Added function prototype.
18107         (duplicate_declaration_error_p): Consider new_type as potentially
18108         being a incomplete type. Use purify_type_name on type string.
18109         (method_header): saved_type: unused variable removed. Don't figure
18110         return type if method name is invalid.
18111         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18112         processed by patch_unaryop.
18113         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18114         increment/decrement node into its original type after binary
18115         numeric promotion on its operands.
18116
18117 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18118
18119         * parse.y (array_initializer:): Array init operand is NULL_TREE
18120         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18121         now an error. Fixed indentation problems.
18122         (patch_string): Handle error_mark_node as an argument.
18123         (patch_new_array_init): Fixed indentation problems.
18124         (array_constructor_check_entry): Removed check on null wfl_value.
18125         Return an error if wfl_value's walk returns an error.
18126
18127 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18128
18129         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18130         * lex.c (java_lex): Remember column position before advancing one
18131         token. Retain location information on OCB_TK.
18132         * lex.h (typedef struct java_lc): Added new field.
18133         * parse.h (GET_SKIP_TYPE): New macro.
18134         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18135         * parse.y (build_new_array_init, patch_new_array_init,
18136         patch_array_constructor, maybe_build_array_element_wfl,
18137         array_constructor_check_entry): New function prototypes.
18138         (switch_block:): Tagged <node>.
18139         (OCB_TK): Tagged <operator>.
18140         (array_initializer:): Installed actions.
18141         (variable_initializer): Build location information on element if
18142         necessary.
18143         (switch_statement:): Fixed indentation typo.
18144         (switch_block:): Redefined default action.
18145         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18146         (patch_assignment): Removed duplicate code.
18147         (maybe_build_array_element_wfl, build_new_array_init,
18148         patch_new_array_init, patch_array_constructor,
18149         array_constructor_check_entry): New functions.
18150
18151 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18152
18153         * parse.y (array_initializer): Tagged <node>.
18154         (variable_initializer:): Use default rule.
18155         (array_initializer:): Defined actions.
18156         (variable_initializers:): Likewise.
18157         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18158         non-static field accesses.
18159         (patch_invoke): Fixed indentation typo.
18160         (java_complete_tree): Likewise.
18161         (build_labeled_block): Changed leading comment. Generate an error
18162         in case of duplicate loop labels.
18163         (patch_conditional_expr): Patch results of string concatenation
18164         operations.
18165
18166 1998-12-06  Per Bothner  <bothner@cygnus.com>
18167
18168         * constants.c (find_methodref_index):  When the class is an interface,
18169         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18170
18171         * decl.c (finit_identifier_node):  Use "$finit$", rather than
18172         "<finit>" (which Sun's verifier rejects).
18173         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
18174         (generate_field_initialization_code):  Removed.
18175         (fix_constructors)  Don't add call to $finit$ here (wrong order).
18176         (patch_method_invocation):  Add $finit$ call here.
18177
18178         * java-tree.h (CALL_USING_SUPER):  New macro.
18179         * parse.y (patch_invoke):  Remove im local variable.
18180         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
18181         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
18182         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
18183
18184         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
18185
18186         * parse.y (java_complete_tree):  Don't complain about unreachable
18187         statement if it is empty_stmt_node.
18188
18189         * jcf-write.c (find_constant_wide):  New function.
18190         (push_long_const):  Use find_constant_wide.
18191
18192         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
18193         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
18194         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18195         Emit invokeinterface when calling an interface method.
18196         Emit invokespecial also when calling super or private methods.
18197
18198         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
18199
18200 1998-12-06  Per Bothner  <bothner@cygnus.com>
18201
18202         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
18203
18204 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18205
18206         * java-tree.h (java_layout_seen_class_methods): New function
18207         prototype.
18208         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18209         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18210         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18211         * parse.y (method_declarator:): Defined action.
18212         (issue_warning_error_from_context): input_filename saved, set to
18213         the appropriate value and restored after java_error is called.
18214         (build_unresolved_array_type): Fixed comment.
18215         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18216         (method_header): Deal with return type the same way type are
18217         handled for fields and method's parameters and local variables
18218         types are handled.
18219         (check_method_redefinition): Removed extra CR.
18220         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18221         (java_layout_seen_class_methods): New function.
18222         (java_layout_classes): Call java_layout_seen_class_methods.
18223
18224 1998-12-03  Per Bothner  <bothner@cygnus.com>
18225
18226         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18227
18228 1998-12-03  Per Bothner  <bothner@cygnus.com>
18229
18230         * jcf-dump.c (main):  Fix error message.
18231         * jcf-path.c (add_entry):  Style fix.
18232
18233 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18234
18235         * class.c (layout_class_method): Call build_java_argument_signature
18236         on constructors too.
18237         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18238         (patch_method_invocation): Define a primary when resolving an
18239         expression name. Augmented comment on code checking illegal `this'
18240         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18241
18242 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18243
18244         * class.c (layout_class_method): Don't report error on non-static
18245         overriding static if the method is private.
18246         * java-tree.h (finish_class): Prototype added.
18247         * lex.c (java_get_line_col): Handle col argument -2 value.
18248         * parse.h: All static method declarations moved to parse.y.
18249         * parse.y: Now contains all static method declarations previously
18250         found in parse.h.
18251         (find_expr_with_wfl, missing_return_error,
18252         unreachable_stmt_error): New functions.
18253         (java_get_real_method_name): Identify constructors bearing class
18254         names in source code compiled classes only.
18255         (java_complete_expand_methods): Call missing_return_error.
18256         (invocation_mode): Private methods invoked as static methods.
18257         (java_complete_tree): Call unreachable_stmt_error.
18258
18259 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18260
18261         * Makefile.in (+target): Removed.
18262         (+xmake_file): Likewise.
18263         (+tmake_file): Likewise.
18264         (.NOEXPORT): Removed duplicate.
18265
18266 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18267
18268         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18269
18270         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18271
18272         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18273         libiberty.h.  Provide an xmalloc definition.
18274
18275         * jvspec.c: Remove the xmalloc prototype.
18276
18277         * parse-scan.y: Include config.h and system.h.  Don't include
18278         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18279         Provide an xstrdup definition.
18280
18281 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18282
18283         * jcf-path.c (add_entry): Recognize ".jar" too.
18284         * lang-specs.h: Likewise.
18285
18286 1998-11-26  Per Bothner  <bothner@cygnus.com>
18287
18288         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18289         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18290
18291         * jcf-write.c (generate_bytecode_insns):
18292         Handle pre/post-increment/decrement of long.
18293
18294         * jcf-write.c (generate_bytecode_insns):
18295         Handle missing exception handler (finally for synchronized).
18296
18297 1998-11-25  Per Bothner  <bothner@cygnus.com>
18298
18299         * java-tree.h (end_params_node):  Declare global.
18300         * decl.c (end_params_node):  New global.
18301         (init_decl_processing, start_java_method):  Use end_params_node for
18302         end of list of parameter types.  Follows correct gcc conventions.
18303         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18304         * lang.c (put_decl_node):  Likewise.
18305         * typeck.c (various places):  Likewise.
18306         * class.y (various places):  Likewise.
18307         * parse.y (various places):  Likewise.
18308
18309         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18310         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18311
18312         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18313
18314         * class.c (layout_class_method):  Remove commented-out code, re-format.
18315         Don't add vtable entry (or index) for private methods.
18316         * expr.c (expand_invoke):  A private method is implicitly final.
18317         * class.c (make_class_data):  If inlining or optimizing,
18318         skip private methods.
18319
18320         * class.c (finish_class):  New function.  Calls existing methods,
18321         but alls emits deferred inline functions.
18322         * jcf-parse.c (parse_class_file):  Call finish_class.
18323         * parse.y (java_complete_expand_methods):  Likewise.
18324
18325         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18326
18327         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18328
18329 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18330
18331         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18332
18333 1998-11-24  Per Bothner  <bothner@cygnus.com>
18334
18335         * (generate_classfile): Always write class access flag with
18336         ACC_SUPER set.
18337
18338 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18339
18340         * class.c (maybe_layout_super_class): New function.
18341         (layout_class): Reorganized. Loop on class methods dispatched into
18342         a new function. Call maybe_layout_super_class.
18343         (layout_class_methods, layout_class_method): New functions.
18344         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18345         class.
18346         (expand_invoke): Likewise.
18347         * java-tree.h (all_class_list): New global variable declared.
18348         (layout_class_methods, layout_class_method): New function
18349         prototypes.
18350         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18351         * jcf-parse.c (all_class_list): New global variable.
18352         (load_class): Extended what class_or_name can be. Use parser
18353         context mechanism to save globals before calling jcf_parse.
18354         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18355         is set on the file name.
18356         (jcf_parse): Layout class methods when Object is loaded, otherwise
18357         record class in all_class_list for delayed method layout.
18358         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18359         * lang.c (put_decl_node): Decode <init> into the decl context
18360         class name.
18361         * lex.c (java_allocate_new_line): Use xmalloc.
18362         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18363         pointers, not TREE_LIST elements.
18364         (struct parser_ctxt): Fixed comment indentations, added comments
18365         and reordered some fields.
18366         (java_check_methods): Function prototype removed.
18367         * parse.y (java_push_parser_context): Use xmalloc.
18368         (java_parser_context_restore_global): Pop extra pushed ctxp only
18369         when there's nothing next.
18370         (maybe_create_class_interface_decl): Fixed comment, add new
18371         created class decl to all_class_list.
18372         (method_header): Use GET_REAL_TYPE on argument's types.
18373         (method_declarator): Use GET_REAL_TYPE, change type to the real
18374         type in TREE_LIST dependency node. Build argument list with the
18375         real type.
18376         (create_jdep_list): Use xmalloc. Removed allocation error message.
18377         (obtain_incomplete_type): Fixed leading comment. Broadened
18378         incoming argument meaning.
18379         (register_incomplete_type): Use xmalloc. Removed allocation error
18380         message.
18381         (safe_layout_class): Fixed leading comment.
18382         (jdep_resolve_class): Reversed if statement condition and switch
18383         if and else bodies.
18384         (resolve_and_layout): Fixed leading comment. Broadened incoming
18385         argument meaning.
18386         (complete_class_report_errors): New local variable name, for
18387         clarity. purify_type_name used for all error cases.
18388         (java_get_real_method_name): Stricter check on constructors.
18389         (java_check_regular_methods): Reverse methods list only if not
18390         already laid out. Layout artificial constructor.
18391         (java_check_methods): Deleted.
18392         (source_start_java_method): Obtain incomplete type for patchable
18393         method arguments.
18394         (java_layout_classes): Fixed leading comment. Use
18395         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18396         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18397         before returning. Fixed comments.
18398         (java_expand_classes): Check for errors up front.
18399         (patch_method_invocation): Class to search is resolved and laid
18400         out.
18401
18402 1998-11-24  Per Bothner  <bothner@cygnus.com>
18403
18404         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18405
18406         * javaop.h (int8):  Removed - not used.
18407         (jbyte):  Redefine portably with correct signedness.
18408
18409         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18410
18411         * jcf-write.c (generate_bytecode_insns):  Fix typo
18412         OPCODE_getstatic to OPCODE_getfield.
18413
18414         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18415         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18416         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18417
18418 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18419
18420         * jcf-parse.c (jcf_parse_source): Function returned type is
18421         void. Added prototype.
18422         (jcf_parse): Function returned type is void.
18423         (yyparse): Remove call to fclose on the last parsed file.
18424
18425         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18426
18427 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18428
18429         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18430         (layout_class): Cope with methods featuring WFL in decl names.
18431         * decl.c (unqualified_object_id_node): New global variable,
18432         initialized.
18433         (build_decl_no_layout): Removed.
18434         * expr.c (build_primtype_type_ref): Handle Double.
18435         (java_lang_expand_expr): Fixed indentations.
18436         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18437         (flag_wall, flag_redundant, flag_not_overriding,
18438         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18439         variable declarations.
18440         (build_decl_no_layout): Removed prototype.
18441         (java_get_real_method_name): Added prototype.
18442         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18443         (java_parse_abort_on_error): Macro now just returns.
18444         * jcf-parse.c (jcf_parse_source): Check fclose returned
18445         value. Call emit_register_classes if java_report_errors returns
18446         zero.
18447         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18448         flag_static_local_jdk1_1): New integer flags.
18449         (lang_decode_option): New flags set here.
18450         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18451         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18452         the flag_redundant variable.
18453         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18454         when parsing java.lang.Object class.
18455         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18456         NULL_TREE to build.
18457         (resolve_qualified_expression_name): Fixed indentation.
18458         (patch_array_ref): Changed prototype.
18459         (not_initialized_as_it_should_p): Prototype removed.
18460         (java_report_errors): Added function prototype.
18461         * parse.y (formal_parameter:): Changed error message for not yet
18462         supported final parameters.
18463         (class_type_list:): Set both PURPOSE and VALUE of created
18464         TREE_LIST to be class_type.
18465         (primary_no_new_array:): Handle class literals on primitive types.
18466         (parse_warning_context): Reinstalled correct force_error and
18467         do_warning flags setups.
18468         (java_report_errors): Changed prototype. Return java_error_count
18469         value.
18470         (variable_redefinition_error): Consider treating variable type as
18471         a fake pointer.
18472         (create_interface): Warn about redundant abstract modifier if
18473         flag_redundant is set. Changed error message.
18474         (lookup_field_wrapper): Save/restore globals before/after looking
18475         up field.
18476         (duplicate_declaration_error_p): Consider treating declaration
18477         type as a fake pointer.
18478         (register_fields): Extract real type from dependency node. Check
18479         for duplicate field declaration after type adjustment. Use
18480         DECL_INITIAL to store static final initialized values.
18481         (method_header): Extract real function type from dependency node.
18482         (check_abstract_method_header): Use GET_METHOD_NAME.
18483         (obtain_incomplete_type): Layout fake pointer type.
18484         (safe_layout_class): Don't try to check for methods before layout.
18485         (java_complete_class): Don't check for correct throws clause
18486         elements inheritance here.
18487         (resolve_and_layout): Broadened name parameter meaning.
18488         (reset_method_name): Use GET_METHOD_NAME.
18489         (java_get_real_method_name): New function.
18490         (java_check_regular_methods): Don't check methods in
18491         java.lang.Object.  Verify lineage of throws clause elements. Use
18492         flag_no_overriding in warning report.
18493         (check_throws_clauses): Don't check if class was from
18494         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18495         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18496         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18497         warning on unsupported final local variables. Use build_decl
18498         instead of build_decl_no_layout. Get real local variable type from
18499         dependency node.
18500         (source_start_java_method): Get real parameter type from
18501         dependency node. Call build_decl instead of build_decl_no_layout.
18502         (java_layout_classes): Reverse tree and layout type and class as
18503         required. Mark class as loaded when done.
18504         (resolve_field_access): Fixed indentation. Restricted condition
18505         leading to static field access code generation. Set field_type
18506         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18507         (resolve_qualified_expression_name): Initialize type_found to
18508         null. Handle static field resolved during qualification. Fixed
18509         layout on non primitive field decl types.
18510         (not_accessible_p): Fixed typo in comment.
18511         (patch_method_invocation): Resolve and layout class to search from
18512         type.
18513         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18514         layout non primitive type, if necessary. Make method node only to
18515         report errors.
18516         (find_applicable_accessible_methods_list): Consider WFL'ed method
18517         decl names. Fixed indentation.
18518         (argument_types_convertible): Resolve and layout target type if
18519         necessary.
18520         (java_complete_tree): Fixed indentation problems. Rewrote
18521         CALL_EXPR thrown exceptions check. Re-installed further processing
18522         of the assignment in certain cases.
18523         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18524         inlining on class literals.
18525         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18526         0 literal.
18527         (valid_method_invocation_conversion_p): Likewise.
18528         (patch_string): Temporary disable forbidden use of `this' in
18529         explicit constructor invocations when doing string concatenation
18530         within their scope.
18531         (patch_unaryop): Added comment. Reinstalled code to disable
18532         further check on assignment operation with cast expression RHS.
18533         (patch_switch_statement): Fixed indentation.
18534         (build_try_statement): Call build_decl instead of
18535         build_decl_no_layout.
18536         (patch_synchronized_statement): Likewise.
18537         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18538         IS_UNCHECKED_EXPRESSION_P.
18539         (check_thrown_exceptions_do): Changed leading comment. Resolve and
18540         layout argument exception type.
18541         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18542         of IS_UNCHECKED_EXPRESSION_P.
18543
18544 1998-11-18  Anthony Green  <green@cygnus.com>
18545
18546         * jcf-parse.c (yyparse): Open class file in binary mode.
18547
18548 1998-11-15  Per Bothner  <bothner@cygnus.com>
18549
18550         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
18551
18552         * jcf-write.c (perform_relocations):  Move check out one loop.
18553
18554 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
18555
18556         * Make-lang.in: Fix reference to srcdir.
18557         * jv-scan.c: Add missing xmalloc prototype.
18558         * jvgenmain.c: Ditto.
18559
18560 1998-11-15  Per Bothner  <bothner@cygnus.com>
18561
18562         * decl.c (error_mark_node), java-tree.h:  New global.
18563         * parse.y:  Use empty_stmt_node instead of size_zero_node.
18564         (build_if_else_statement):  If missing else, use empty_stmt_node.
18565
18566         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
18567         (java_complete_expand_method):  Complain if return is missing.
18568         (java_check_regular_methods):  Comment out incorrect error check.
18569         (not_accessible_p):  Fix incorrect handling of protected methods.
18570         (patch_method_invocation):  Pass correct context to not_accessible_p.
18571         (find_applicable_accessible_methods_list):  Likewise.
18572         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
18573         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
18574         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
18575         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
18576
18577         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
18578         (push_int_const):  Remove reundant NOTE_PUSH.
18579         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
18580         (- case SWITCH_EXPR):  Fix code generation bug.
18581         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
18582         (generate_classfile):  More robust for abstract methods.
18583
18584 1998-11-15  Anthony Green  <green@cygnus.com>
18585
18586         * Makefile.in: jv-scan and jvgenmain all require libiberty.
18587         * Make-lang.in: Ditto.
18588
18589         * jv-scan.c: Remove xmalloc and xstrdup definitions.
18590         * jvgenmain: Ditto.
18591
18592 1998-11-15  Per Bothner  <bothner@cygnus.com>
18593
18594         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
18595
18596         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
18597
18598 1998-11-14  Per Bothner  <bothner@cygnus.com>
18599
18600         Allow uses of interface types to verify.  This is not really
18601         type-safe, but it matches what Sun does, and is OK as long as
18602         there are appropriate run-time checks.
18603         * verify.c (merge_types):  If merging two interface types,
18604         just set the result to java.lang.Object.
18605         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
18606
18607 1998-11-13  Tom Tromey  <tromey@cygnus.com>
18608
18609         * gjavah.c (main): Handle --output-class-directory argument.
18610         * jvspec.c (lang_specific_driver): Translate `-d' into
18611         -foutput-class-dir.
18612         * jcf.h (jcf_write_base_directory): Declare.
18613         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18614         * lang-options.h: Mention -foutput-class-dir.
18615         * jcf-write.c (jcf_write_base_directory): New global.
18616         (make_class_file_name): Put generated .class file into `-d'
18617         directory, or into source directory if -d not given.  Function now
18618         static.
18619         (write_classfile): Free class file name.  Handle case where class
18620         file name is NULL.
18621         (DIR_SEPARATOR): New macro.
18622         Include <sys/stat.h>
18623
18624         * Makefile.in (prefix): New macro.
18625
18626 1998-11-12  Per Bothner  <bothner@cygnus.com>
18627
18628         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
18629         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
18630         here (done in patch_invoke instead).
18631         (case_identity):  Moved here from parse.y.
18632
18633         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
18634         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
18635         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
18636         so they can be efficiently scanned without recursion.
18637         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18638         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
18639         in BLOCK iteratively, rather than recursively.
18640
18641         * parse.y (do_unary_numeric_promotion):  New function.
18642         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
18643
18644         * parse.y (patch_newarray):  Various fixes.
18645
18646         Re-do handling of switch statements (for proper block scoping).
18647         * parse.y:  Add just a single block for the enture switch block,
18648         but don't create any "case blocks".
18649         (group_of_labels):  Rmeoved unneeded non-terminal.
18650         CASE_EXPR and DEFAULT_EXPR are added to current block.
18651         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
18652         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18653         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
18654         * parse.y (wfl_operator, print_int_node): Make non-static.
18655         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
18656         as part of recursive scan of block.
18657         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
18658         (patch_switch_statement):  Most tests move dinto java_complete_tree.
18659
18660         * parse.y:  Make various production be non-typed (void).
18661         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
18662         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
18663         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
18664
18665         * jcf-write.c (struct jcf_handler):  New type.
18666         (struct jcf_switch_state):  New type.
18667         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
18668         (alloc_handler, emit_unop, emit_reloc):  New functions.
18669         (adjust_typed_op):  Add extra parameter ("max type" offset).
18670         (emit_switch_reloc, emit_case-reloc):  New function.
18671         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
18672         (generate_bytecode_insns):  Support REAL_CST, switch statements,
18673         exception handling, method calls, object/array creation, and more.
18674
18675         * class.c:  Remove some unused variables.
18676         * constants.c (find_string_constant):  New function.
18677         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
18678         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
18679         if flag_emit_class_files.
18680
18681 1998-11-12  Tom Tromey  <tromey@cygnus.com>
18682
18683         * jcf-io.c (find_class): Added explanatory comment.
18684
18685         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
18686         trailing slash to `.zip' entries.
18687
18688         * jvspec.c (lang_specific_driver): Correctly handle case where
18689         GC_NAME not defined.
18690
18691 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18692
18693         * jvspec.c (GC_NAME): New define.
18694         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
18695         if required.
18696         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18697
18698 1998-11-11  Per Bothner  <bothner@cygnus.com>
18699
18700         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
18701
18702 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18703
18704         * jcf-dump.c (main): Correctly recognize `--'-style long options.
18705
18706 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18707
18708         * class.c (is_compiled_class): Call safe_layout_class for class
18709         compiled from source.
18710         * conver.h (convert_to_integer, convert_to_real,
18711         convert_to_pointer): Added prototypes.
18712         * decl.c (init_decl_processing): Non longer push the decls of
18713         `methodtable', `constants', `Class', `Field', `dispatchTable'
18714         `jexception' and `Method'.
18715         * expr.c (build_invokeinterface): New function.
18716         (expand_invoke): static variable CLASS_IDENT now in
18717         build_invokeinterface. Use build_invokeinterface.
18718         (expand_java_field_op): Moved code to inline
18719         java.lang.PRIMTYPE.TYPE into a function.
18720         (build_primtype_type_ref): New function.
18721         * java-tree.def (INSTANCEOF_EXPR): New tree code.
18722         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18723         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18724         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18725         (DECL_LOCAL_STATIC_VALUE): New macro.
18726         (build_invokeinterface, build_primtype_type_ref): New function
18727         prototypes.
18728         (java_parse_abort_on_error): Macro rewritten.
18729         * jcf-parse.c (current_method): Add comment to declaration.
18730         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18731         Function prototypes fixed.
18732         (jcf_parse_source): push/pop parser context. save/restore global.
18733         (parse_source_file): Fixed leading comment. Now take a
18734         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18735         classes and pop the parser context anymore.
18736         (yyparse): Push parser context, save globals, parse the source
18737         file, restore globals and pop the parser context when processing a
18738         source file.
18739         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18740         * lex.c (java_parse_doc_section): New function.
18741         (java_lex): Call java_parse_doc_section when appropriate. Build an
18742         operator around INSTANCEOF_TK.
18743         * lex.h (java_lineterminator, java_sprint_unicode,
18744         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18745         Prototypes rewritten.
18746         (java_parse_escape_sequence, java_letter_or_digit_p,
18747         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18748         java_read_unicode, java_store_unicode, java_read_char,
18749         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18750         Added function prototypes.
18751         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18752         define.
18753         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18754         New macros
18755         (struct parser_ctxt): New fields: deprecated,
18756         current_parsed_class_un, gclass_list.
18757         (fix_method_argument_names, issue_warning_error_from_context,
18758         resolve_package, lookup_package_type): New function prototypes.
18759         (resolve_expression_name): Fixed function prototype.
18760         (find_applicable_accessible_methods_list): Fixed indentation, added
18761         extra argument in prototype.
18762         (check_final_assignment, build_null_of_type, check_deprecation,
18763         check_method_redefinition, reset_method_name,
18764         java_check_regular_methods, java_check_abstract_methods,
18765         maybe_build_primttype_type_ref): New function prototype.
18766         * parse.y (conver.h): Include.
18767         (INSTANCEOF_TK): Tagged <operator>.
18768         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18769         (relational_expression:): Build binop for instanceof.
18770         (java_push_parser_context): Remember ctxp->gclass_list across
18771         contexts.
18772         (java_pop_parser_context): Simply return if no context
18773         exists. Remember gclass_list across contexts.
18774         (issue_warning_error_from_context): New function.
18775         (parse_error_context): Don't setup ctxp->elc here. Call
18776         issue_warning_error_from_context instead.
18777         (parse_warning_context): Likewise.
18778         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18779         setup. Link new class/interface to ctxp->gclass_list.
18780         (add_superinterfaces): Register interface as incomplete if not
18781         loaded.
18782         (create_class): Remember class unqualified name in
18783         ctxp->current_parsed_class_un. Check class deprecation.
18784         (register_fields): Check field deprecation. Remember static final
18785         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18786         processing INIT.
18787         (method_header): New local variable ORIG_ARG. Use unqualified
18788         current class name for check on constructor errors. Promote return
18789         type if of record type. Argument list fix moved in
18790         fix_method_argument_names, called here. Check method deprecation.
18791         (fix_method_argument_names): New function.
18792         (method_declarator): Promote record typed arguments.
18793         (safe_layout_class): Check class methods before layout.
18794         (java_complete_class): Compute field layout when patched.
18795         (do_resolve_class): Try to load class after having it renamed
18796         after the package name.
18797         (get_printable_method_name): Use DECL_CONTEXT.
18798         (reset_method_name): New function.
18799         (check_method_redefinition): Use reset_method_name.
18800         (java_check_regular_methods): New local variable
18801         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18802         names for error report. Check for compile-time error when method
18803         found has default (package) access.
18804         (java_check_abstract_methods): Now takes an interface DECL node as
18805         an argument. Also reinstall real name on unchecked
18806         overriding/hiding methods for error report.
18807         (java_check_methods): Fixed leading comment. Get classes to verify
18808         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18809         CLASS_METHOD_CHECKED_P on class verification.
18810         (lookup_java_method2): Get real method name if necessary.
18811         (find_in_imports): Don't check package class access here.
18812         (resolve_package, lookup_package_type): New functions.
18813         (java_layout_classes): Fixed leading comment. Take classes to be
18814         laid out from ctxp->gclass_list.
18815         (java_complete_expand_methods): Don't expand native and abstract
18816         methods.
18817         (java_expand_classes): New function.
18818         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18819         values of static final field of primitive types.
18820         (resolve_field_access): Handles static final field of promotive
18821         type.
18822         (resolve_qualified_expression_name): Handle STRING_CST as
18823         primaries and package name resolution. Check deprecation on found
18824         decls. Set where_found and type_found on non static field resolved
18825         during qualification. Layout non primitive field decl types.
18826         (check_deprecation): New function.
18827         (maybe_access_field): Simplified.
18828         (patch_method_invocation_stmt): Local variable CLASS_TYPE
18829         removed. Reverse method's argument when primary is a type. Don't
18830         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18831         instead. Include abstract class in the list of class searchable
18832         for constructors. Use DECL_CONTEXT of found method for access
18833         checks. Check method deprecation.
18834         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18835         converting arguments. Handle INVOKE_INTERFACE.
18836         (lookup_method_invoke): Search constructor using existing
18837         infrastructure (don't rely on lookup_java_constructor anymore).
18838         (find_applicable_accessible_methods_list): Extra argument flag
18839         LC. Now include constructor in the search.
18840         (qualify_ambiguous_name): Conditional expression are primaries.
18841         (not_initialized_as_it_should_p): static final are always
18842         initialized.
18843         (java_complete_tree): Pass extra NULL argument to
18844         resolve_expression_name. Stricter test to carry on patching
18845         assignments. New case for INSTANCEOF_EXPR.
18846         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18847         (check_final_assignment, maybe_build_primttype_type_ref): New
18848         functions.
18849         (patch_assignment): Detect resolved static finals and carry normal
18850         assignment error check on them. Inline PRIMTYPE.TYPE read access.
18851         (try_builtin_assignconv): Access constant 0 on all primitive
18852         types.
18853         (valid_builtin_assignconv_identity_widening_p): Accept identical
18854         types. Accept all promoted type on int type.
18855         (valid_ref_assignconv_cast_p): Accept a null pointer to be
18856         assigned to a reference.
18857         (valid_method_invocation_conversion_p): Accept to check null
18858         pointers.
18859         (build_binop): Merge declaration and initialization of local
18860         variable BINOP.
18861         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18862         numeric types. Improved validity test for qualify operators on
18863         references.
18864         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18865         and PREINCREMENT_EXPR. Also detect resolved static finals of a
18866         primitive type and issue the appropriate error message.
18867         (resolve_type_during_patch): Mark class loaded when resolved.
18868         (patch_cast): Allow null to be cased to reference types.
18869         (build_null_of_type): New function.
18870         (patch_array_ref): Handle array on references correctly.
18871         (patch_return): Removed unused local variable MODIFY. Force
18872         boolean to be returned as integers. Allows null to be returned by
18873         a function returning a reference.
18874         * typeck.c (convert_to_integer, convert_to_real,
18875         convert_to_pointer): Prototypes moved to convert.h
18876         (lookup_argument_method): Use method real name, if necessary.
18877
18878 1998-10-30  Tom Tromey  <tromey@cygnus.com>
18879
18880         * class.c (build_class_ref): Changed name of primitive classes to
18881         start with `_Jv_'.
18882
18883         * class.c (make_class_data): Renamed fields: nmethods to
18884         method_count, method_count to dtable_method_count.  Always set
18885         `state' field to 0.
18886         * decl.c (init_decl_processing): Likewise.
18887
18888 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18889
18890         * class.c (layout_class): Don't mangle <finit>, produce
18891         __finit<class> instead. Don't verify artificial methods.
18892         * decl.c (finit_identifier_node): New declared global.
18893         (init_decl_processing): finit_identifier_node initialized.
18894         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18895         * java-tree.h (finit_identifier_node): Declared as extern.
18896         (struct lang_decl): New field called_constructor.
18897         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18898         (CLASS_HAS_FINIT_P): New macro.
18899         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18900         explicit constructor invocation.
18901         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18902         CALL_SUPER_CONSTRUCTOR_P): New macros.
18903         (write_classfile): Added prototype.
18904         * jcf-parse.c (jcf_parse_source): Parse and remember for
18905         generation if the file was seen on the command line.
18906         (parse_source_file): Don't write the class file here.
18907         (yyparse): Loop on files rewritten. Set current_jcf.
18908         (parse_zip_file_entries): Parse class file only if it was found.
18909         * lang.c (init_parse): Don't open command line provided filename
18910         here.
18911         (lang_parse): Don't set main_jcf anymore.
18912         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18913         (JCONSTRUCTOR_CHECK): New macro.
18914         (JBSC_TYPE_P): New macro.
18915         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18916         (COMPLETE_CHECK_OP_2): New macro.
18917         (struct parse_ctxt): New field explicit_constructor_p.
18918         (check_class_interface_creation): Fixed prototype indentation.
18919         (patch_method_invocation_stmt): Prototype reflects added argument.
18920         (patch_invoke): Likewise.
18921         (complete_method_declaration, build_super_invocation,
18922         verify_constructor_circularity,
18923         build_this_super_qualified_invocation, get_printable_method_name,
18924         patch_conditional_expr, maybe_generate_finit, fix_constructors,
18925         verify_constructor_super, create_artificial_method,
18926         start_artificial_method_body, end_artificial_method_body,
18927         generate_field_initialization_code): New function prototypes.
18928         * parse.y: Fixed leading comment
18929         (constructor_header:, constructor_body:, block_end:): Rules tagged
18930         <node>.
18931         (type_declaration:): Call maybe_generate_finit.
18932         (method_declaration:): Action for method_body: placed in new
18933         function complete_method_declaration, called here.
18934         (constructor_declaration:): Defined actions. Removed leading
18935         FIXME.
18936         (constructor_header:): New rule with action.
18937         (constructor_body:): Rule rewritten using block_begin: and
18938         block_end:. Defined actions.
18939         (constructor_declarator:, explicit_constructor_invocation:):
18940         Defined actions.
18941         (block:): Use new rules block_begin: block_end:.
18942         (block_begin:, block_end:): New rules and actions.
18943         (block_statements:): Fixed error message for explicit
18944         constructors.
18945         (method_invocation:): Call build_this_super_qualified_invocation
18946         if primary is `this' or `super' was seen.
18947         (conditional_expression:): Action defined.
18948         (extra_ctxp_pushed_p): New static global flag.
18949         (java_parser_context_save_global): Create parser context if
18950         necessary. Use extra_ctxp_pushed_p to remember it.
18951         (java_parser_context_restore_global): Pop extra parser context if
18952         one exists.
18953         (build_array_from_name): Array on primitive types are marked
18954         loaded.
18955         (register_fields): Restore new name in field initializer
18956         expression if type was altered. Non static fields initialized upon
18957         declaration marked initialized.
18958         (maybe_generate_finit): New function.
18959         (maybe_generate_clinit): Use create_artificial_method,
18960         start_artificial_method_body, end_artificial_method_body. Generate
18961         debug info for enclosed initialization statements.
18962         (method_header): Fixed leading comment. Check constructor
18963         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18964         accordingly.
18965         (complete_method_declaration, constructor_circularity_msg,
18966         verify_constructor_circularity): New functions.
18967         (get_printable_method_name): New function.
18968         (check_method_redefinition): Don't rename <finit> methods. Fix
18969         declared constructor names. Error message for
18970         constructors modified.
18971         (java_check_regular_methods): Local variable seen_constructor
18972         renamed saw_constructor. Skip verification on constructors. Create
18973         default constructor with create_artificial_method.
18974         (java_check_methods): Removed unnecessary empty line.
18975         (create_artificial_method, start_artificial_method_body,
18976         end_artificial_method_body): New functions.
18977         (java_layout_classes): Changed leading comment. Reverse fields
18978         list if necessary. Always layout java.lang.Object if being
18979         defined.
18980         (java_complete_expand_methods): Verify constructor circularity.
18981         (java_complete_expand_method): Call fix_constructor on
18982         constructors.  Local variable no_ac_found removed. Restore
18983         bindings if method body expansion failed.
18984         (fix_constructors, verify_constructor_super,
18985         generate_field_initialization_code): New function.
18986         (java_expand_classes): Fixed leading comment. Write class file
18987         here.
18988         (resolve_expression_name): Check for illegal instance variable
18989         usage within the argument scope of an explicit constructor
18990         invocation.
18991         (resolve_qualified_expression_name): Pass extra from_super flag
18992         when invoking patch_method_invocation_stmt. New case for
18993         conditional expression when used as a primary. Check for error
18994         when acquiring super.
18995         (patch_method_invocation_stmt): Added extra argument super. New
18996         local variable is_static_flag. Set class_to_search according to
18997         the nature of the constructor invocation. Don't add `this'
18998         argument when expanding NEW_CLASS_EXPR. Check for illegal method
18999         invocation within the argument scope of explicit constructor
19000         invocation. Set is_static according to is_static_flag. Provide
19001         extra `super' argument to patch_invoke invocation.
19002         (patch_invoke): New argument from_super. Loop on arguments
19003         indentation fixed. Pass from_super to invocation_mode. New switch
19004         case INVOKE_SUPER. Fixed error message in switch default case.
19005         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19006         value.
19007         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19008         (lookup_method_invoke): Fixed prototypes in candidates list. Error
19009         message takes constructors into account.
19010         (find_applicable_accessible_methods_list): Fixed indentation.
19011         (qualify_ambiguous_name): Take explicit constructor invocation
19012         into account. Deal with a conditional expression as a primary to
19013         a method call.
19014         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19015         case. Added extra argument to patch_method_invocation_stmt.
19016         Register calls made to explicit constructor `this'. Don't call
19017         save_expr in ARRAY_REF case when emitting class files. Check for
19018         illegal use of this when expanding explicit constructor invocation
19019         arguments.
19020         (complete_function_arguments): Set and reset parser context
19021         explicit_constructor_p field value when appropriate.
19022         (build_super_invocation, build_this_super_qualified_invocation):
19023         New functions.
19024         (patch_assignment): Fixed typo.
19025         (patch_unaryop): Check on final fields occurs only when a decl
19026         exits.
19027         (patch_return): Take constructors into account.
19028         (patch_conditional_expr): New function.
19029         * typeck.c (build_java_signature): Removed unnecessary empty line.
19030
19031 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19032
19033         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19034
19035 1998-10-28  Tom Tromey  <tromey@cygnus.com>
19036
19037         * decl.c (init_decl_processing): Renamed fields.
19038         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19039         interface_len, msize fields.
19040
19041         * class.c (make_class_data): Removed subclass_head and
19042         subclass_next fields.
19043         * decl.c (init_decl_processing): Removed subclass_head and
19044         subclass_next fields.
19045
19046 1998-10-28  Jeffrey A Law  (law@cygnus.com)
19047
19048         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19049         * mangle.c (emit_unicode_mangled_name): Similarly.
19050
19051 1998-10-26  Nick Clifton  <nickc@cygnus.com>
19052
19053         * jcf-parse.c (get_constant): Place braces around code to compute
19054         'd' when REAL_ARITHMETIC is not defined.
19055
19056 1998-10-25  H.J. Lu  (hjl@gnu.org)
19057
19058         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19059         dependency.
19060
19061 1998-10-23  Tom Tromey  <tromey@cygnus.com>
19062
19063         * lang-specs.h: `.zip' files are input to jc1.
19064
19065 1998-10-22  Per Bothner  <bothner@cygnus.com>
19066
19067         * jvspecs.c:  Add (but don't enable) support for combining multiple
19068         .class and .java input filenames to a single jc1 invocation.
19069         Add support for -C flag (copile to .class files).
19070         Translate -classpath and -CLASSPATH arguments.
19071         * lang-specs.h:  Don't set %2 spec.
19072
19073 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19074
19075         * jcf-path.c (add_entry): Don't add trailing separator if entry is
19076         a .zip file.
19077         (add_path): Don't add trailing separator to non-empty path
19078         elements.
19079
19080         * lang.c (lang_decode_option): Check for -fclasspath and
19081         -fCLASSPATH before examining other `-f' options.
19082
19083         * java-tree.h (finalize_identifier_node): Don't declare.
19084         * class.c (make_class_data): Don't push "final" field.
19085         * decl.c (init_decl_processing): Don't push "final" field.
19086         (finalize_identifier_node): Removed.
19087         (init_decl_processing): Don't set finalize_identifier_node.
19088
19089         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19090
19091 1998-10-11  Anthony Green  <green@cygnus.com>
19092
19093         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19094         (JV_SCAN_SOURCES): New macro.
19095         (JCF_DUMP_SOURCES): Likewise.
19096         (jcf-dump$(exeext)): New target.
19097         (jv-scan$(exeext)): New target.
19098
19099 1998-10-22  Tom Tromey  <tromey@cygnus.com>
19100
19101         * Makefile.in (LEX): Removed.
19102         (LEXFLAGS): Likewise.
19103         (SET_BISON): New macro.
19104         (BISON): Removed.
19105         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
19106         spurious diffs in parse.c.
19107         ($(PARSE_SCAN_C)): Likewise.
19108         (PARSE_DIR): New macro.
19109         (PARSE_C): Use it.
19110         (PARSE_SCAN_C): Likewise.
19111         (PARSE_RELDIR): New macro.
19112
19113         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19114
19115         * jcf-io.c (find_class): Use saw_java_source to determine when to
19116         look for `.java' file.
19117         * jcf-parse.c (saw_java_source): New global.
19118         (yyparse): Set it if `.java' file seen.
19119
19120         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19121         (GCJH_SOURCES): Likewise.
19122         * Makefile.in (datadir): New macro.
19123         (libjava_zip): Likewise.
19124         (JAVA_OBJS): Added jcf-path.o.
19125         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19126         (../gcjh$(exeext)): Likewise.
19127         (jcf-path.o): New target.
19128         * java-tree.h (fix_classpath): Removed decl.
19129         * jcf-parse.c (fix_classpath): Removed.
19130         (load_class): Don't call fix_classpath.
19131         * parse.y (read_import_dir): Don't call fix_classpath.
19132         * lex.h: Don't mention classpath.
19133         * lex.c (java_init_lex): Don't initialize classpath.
19134         * jcf-io.c (classpath): Removed global.
19135         (find_class): Use jcf_path iteration functions.  Correctly search
19136         class path for .java file.
19137         (open_in_zip): New argument `is_system'.
19138         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
19139         classpath-related options.
19140         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19141         and -I.
19142         (lang_init): Call jcf_path_init.
19143         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19144         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
19145         Correctly put braces around second string in each entry.
19146         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
19147         classpath-related options.
19148         (help): Updated for new options.
19149         * jcf.h: Declare functions from jcf-path.c.  Don't mention
19150         `classpath' global.
19151         * jcf-path.c: New file.
19152
19153         * jcf-depend.c: Include jcf.h.
19154
19155         * jcf-write.c (localvar_alloc): Returns `void'.
19156         (localvar_free): Removed unused variable.
19157
19158         * lang.c (OBJECT_SUFFIX): Define if not already defined.
19159         (init_parse): Use OBJECT_SUFFIX, not ".o".
19160
19161 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19162
19163         * class.c (emit_register_classes): Renamed from
19164         emit_register_class.
19165         * java-tree.h (emit_register_classes): Prototype renamed from
19166         emit_register_class.
19167         * jcf-parse.c (yyparse): Call emit_register_classes once before
19168         returning.
19169         * parse.y (java_expand_classes): No longer register classes.
19170
19171 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19172
19173         * class.c (is_compiled_class): New local variable
19174         seen_in_zip. Identify classes found in currently compiled source
19175         file(s).
19176         * decl.c (complete_start_java_method): Fixed typo.
19177         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19178         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19179         (CLASS_P): Moved around.
19180         (java_parse_abort_on_error): Macro moved from jcf-parse.c
19181         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19182         java-tree.h
19183         (jcf_parse_source): Changed leading comment. Removed unnecessary
19184         fclose and CLASS_FROM_SOURCE_P marking.
19185         (parse_source_file): New local variables remember_for_generation
19186         and filename. Mark parsed file name identifier node. Removed block
19187         executed when parse_only was null. Set remember_for_generation.
19188         Use it as an argument to java_pop_parser_context.
19189         (yyparse): New local variables several_files, list, next node and
19190         current_file_list. Split ampersand separated file names into
19191         current_file_list. Iterate through the list and parse accordingly.
19192         * parse.h (java_pop_parser_context): New function prototype.
19193         * parse.y (ctxp_for_generation): New static global variable.
19194         (java_pop_parser_context): New argument generate. Link popped ctxp
19195         to ctxp_for_generation list accordingly.
19196         (java_complete_expand_methods): Fixed indentation.
19197         (java_expand_classes): New function.
19198
19199 1998-10-17  Per Bothner  <bothner@cygnus.com>
19200
19201         * Makefile.in:  Link with libiberty.a instead of memmove.o.
19202
19203 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19204
19205         * lex.c (setjmp.h): No longer included.
19206         * lex.h (setjmp.h): Included.
19207         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19208         (duplicate_declaration_error_p): Renamed from
19209         duplicate_declaration_error.
19210         (build_array_from_name): New function prototype.
19211         * parse.y (setjmp.h): No longer included.
19212         (variable_declarator_id): Define action.
19213         (build_array_from_name): New function.
19214         (duplicate_declaration_error_p): Renamed from
19215         duplicate_declaration_error.  Fixed leading comment.
19216         (register_fields): Main `for' loop reorganized. Uses
19217         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19218         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19219         build_array_from_name.
19220         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19221         types.
19222         (read_import_dir): Don't try to skip `.' and `..'.
19223         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19224         build_array_from_name. Main `for' loop reorganized.
19225         (resolve_qualified_expression_name): When building access to a
19226         field, use the type where the field was found, not its own type.
19227         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19228         field was found is null.
19229         (qualify_ambiguous_name): Sweep through all successive array
19230         dimensions.
19231
19232 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19233
19234         * java-tree.h (pop_labeled_block, lang_printable_name,
19235         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19236         interface_of_p, inherits_from_p, fix_classpath,
19237         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19238         make_class_data, register_class, alloc_name_constant): New
19239         function prototypes.
19240         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19241         indentation. Added cast to remove warning.
19242         (lang_printable_name): Set v argument unused.
19243         (lang_print_error): Added argument to lang_printable_name call.
19244         (java_dummy_print, print_lang_decl, print_lang_type,
19245         print_lang_identifier, lang_print_xnode): All argument marked
19246         unused.
19247         * lex.c (java_unget_unicode): Removed unnecessary argument.
19248         (java_allocate_new_line): Unused local variable is gone.
19249         (java_read_char): Added parenthesis in expressions to remove
19250         warnings.  Added final return statement.
19251         (java_read_unicode): Added parenthesis in expression to remove
19252         warning.
19253         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19254         (java_parse_escape_sequence): Likewise.
19255         (java_lex): Unused local variables are gone. Fixed
19256         java_unget_unicode invocation.
19257         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19258         defined.
19259         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19260         lang_printable_name invocation in macro.
19261         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19262         Likewise.
19263         (duplicate_declaration_error): Suppressed unused argument in
19264         prototype.
19265         (identical_subpath_p): Function declaration is gone.
19266         (patch_invoke): Suppressed unused argument in prototype.
19267         (patch_cast, build_labeled_block, check_thrown_exceptions):
19268         Likewise.
19269         * parse.y (setjmp.h): Included
19270         (toplev.h): Likewise.
19271         (field_declaration:): Suppressed unused local
19272         (label_decl:): Fixed build_labeled_block invocation.
19273         (java_pop_parser_context): Put extra parenthesis around assignment
19274         in if.
19275         (yyerror): Suppressed unused local variables.
19276         (variable_redefinition_error): Fixed lang_printable_name
19277         invocation.
19278         (create_interface): Suppressed unused local variables.
19279         (create_class): Likewise.
19280         (duplicate_declaration_error): Suppressed unused argument. Fixed
19281         lang_printable_name invocation.
19282         (register_fields): Suppressed unused local variable. Fixed
19283         duplicate_declaration_error invocation.
19284         (method_header): Suppressed unused local variable.
19285         (method_declarator, parser_check_super): Likewise.
19286         (java_complete_class): Suppressed unused local variable. Fixed
19287         fatal error message.
19288         (complete_class_report_errors): Added default: in switch.
19289         (java_check_regular_methods): Fixed lang_printable_name
19290         invocations.
19291         (check_throws_clauses): Likewise.
19292         (java_check_abstract_methods): Suppressed unused local
19293         variable. Fixed lang_printable_name invocation.
19294         (read_import_entry): Added supplemental return statement.
19295         (read_import_dir): Suppressed unused local variables.
19296         (check_pkg_class_access, declare_local_variables): Likewise.
19297         (source_start_java_method): Suppressed unused extern variable
19298         declarations
19299         (expand_start_java_method): Suppressed unused extern and local
19300         variable declarations.
19301         (java_complete_expand_methods): Likewise.
19302         (java_complete_expand_method): Suppressed unused local variables.
19303         (make_qualified_name): Likewise.
19304         (resolve_qualified_expression_name): Added default: in
19305         switch. Fixed lang_printable_name invocation.
19306         (class_instance_creation_expression): Added parenthesis around
19307         expressions.
19308         (patch_method_invocation_stmt): Fixed lang_printable_name and
19309         patch_invoke invocations.
19310         (check_for_static_method_reference): Fixed lang_printable_name
19311         invocation.
19312         (patch_invoke): Suppressed unused arguments and local variables.
19313         (lookup_method_invoke): Suppressed unused local variables.
19314         (qualify_ambiguous_name): Added default: in switch.
19315         (identical_subpath_p): Function removed.
19316         (patch_assignment): Suppressed unused local variables. Suppressed
19317         unnecessary if statement. Fixed lang_printable_name invocations.
19318         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19319         (valid_ref_assignconv_cast_p): Parenthesis around
19320         expression. Suppressed unused local variables.
19321         (build_binop): Suppressed unused local variables. fixed
19322         lang_printable_name invocations.
19323         (string_constant_concatenation): Suppressed unused local
19324         variables.
19325         (patch_unaryop): Fixed lang_printable_name invocation.
19326         (patch_cast): Suppressed unnecessary argument. Fixed
19327         lang_printable_name invocation.
19328         (patch_array_ref): Fixed lang_printable_name invocation.
19329         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19330         (build_labeled_block): Suppressed unused argument.
19331         (generate_labeled_block): Fixed build_labeled_block invocation.
19332         (build_loop_body): Suppressed unused local variables.
19333         (patch_loop_statement): Likewise.
19334         (patch_exit): Fixed lang_printable_name invocation.
19335         (patch_switch_statement): Likewise.
19336         (case_identity): First argument marked unused.
19337         (patch_try_statement): Fixed lang_printable_name invocations.
19338         (patch_synchronized_statement, patch_throw_statement): Likewise.
19339         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19340         lang_printable_name invocations.
19341         (check_thrown_exceptions_do): Suppressed unused argument.
19342
19343 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19344
19345         * jcf-write.c (write_classfile): Add output class file as target.
19346         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19347         * jcf.h: Added declarations for dependency-tracking functions.
19348         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19349         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19350         (finish_parse): Call jcf_dependency_write.
19351         (dependency_tracking): New global.
19352         (DEPEND_SET_FILE): New define.
19353         (DEPEND_ENABLE): New define.
19354         (init_parse): Enable dependency tracking if required.
19355         Include "flags.h".
19356         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19357         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19358         (../gcjh$(exeext)): Likewise.
19359         (jcf-depend.o): New target.
19360         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19361         (GCJH_SOURCES): Likewise.
19362         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19363         dep_name argument.
19364         (find_classfile): Added dep_name argument.
19365         (find_class): Compute name of dependency.
19366         (open_in_zip): Call jcf_dependency_add_file.
19367         * gjavah.c (output_file): No longer global.
19368         (usage): Don't mention "gjavah".
19369         (help): Likewise.
19370         (java_no_argument): Likewise.
19371         (version): Likewise.
19372         (main): Recognize and handle -M family of options.
19373         (print_mangled_classname): Return is void.
19374         (process_file): Handle case where output is suppressed.
19375         (HANDLE_END_FIELD): Likewise.
19376         (HANDLE_METHOD): Likewise.
19377         * jcf-depend.c: New file.
19378
19379 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19380
19381         * java-tree.def: Add missing newline at EOF.
19382
19383 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19384
19385         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19386         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19387         function.
19388         Include <config.h> and "system.h".
19389         (disassemble_method): Undefine RET to avoid clash with
19390         config/i386/i386.h.
19391
19392 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19393
19394         * decl.c (runtime_exception_type_node, error_exception_type_node):
19395         New global variables.
19396         (init_decl_processing): Initialized.
19397         * expr.c (java_lang_expand_expr): Set caught exception type to
19398         null if catch handler argument doesn't exit.
19399         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19400         tree codes.
19401         * java-tree.h (runtime_exception_type_node,
19402         error_exception_type_node): Global variables declared.
19403         (DECL_FUNCTION_THROWS): New macro.
19404         (DECL_FUNCTION_BODY): Modified comment.
19405         (DECL_SPECIFIC_COUNT): Likewise.
19406         (struct lang_decl): New field throws_list.
19407         (IS_UNCHECKED_EXPRESSION_P): New macro.
19408         * lex.c (java_lex): Generate location information for THROW_TK.
19409         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19410         EXCEPTIONS_P): New macros.
19411         (enum jdep_code): New value JDEP_EXCEPTION.
19412         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19413         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19414         PATCH_METHOD_RETURN_ERROR): New macros.
19415         (patch_method_invocation_stmt): Added new argument to prototype.
19416         (patch_synchronized_statement, patch_throw_statement,
19417         check_thrown_exceptions, check_thrown_exceptions_do,
19418         purge_unchecked_exceptions, check_throws_clauses): New function
19419         prototypes.
19420         * parse.y Fixed typo in keyword section.
19421         (throw:): Rule tagged <node>.
19422         (THROW_TK): Keyword tagged <operator>.
19423         (method_header:): Last argument to call to method_header passed
19424         from throws: rule.
19425         (throws:, class_type_list:, throw_statement:,
19426         synchronized_statement:, synchronized:): Defined actions.
19427         (method_header): New local variable current. Register exceptions
19428         from throws clause.
19429         (java_complete_tree): Complete and verify exceptions from throws
19430         clause.
19431         (complete_class_report_errors): Error message on exceptions not
19432         found
19433         (java_check_regular_methods): Fixed typo. Shortcut on private
19434         overriding methods. Changed error message on method
19435         redefinition. Check for throws clause compatibility.
19436         (check_throws_clauses): New function.
19437         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19438         method. Changed error message on method redefinition.
19439         (currently_caught_type_list): New static variable.
19440         (java_complete_expand_methods): Purge unchecked exceptions from
19441         throws clause list. Call PUSH_EXCEPTIONS before walk and
19442         POP_EXCEPTIONS after.
19443         (resolve_qualified_expression_name): Pass new argument as NULL to
19444         patch_method_invocation_stmt.
19445         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19446         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19447         argument list when appropriate. Use new argument if non null to
19448         store selected method decl.
19449         (patch_invoke): Convert if necessary args of builtin types before
19450         forming CALL_EXPR. Argument list no longer reversed here.
19451         (invocation_mode): Treat final methods as static methods.
19452         (java_complete_tree): New cases for THROW_EXPR: and
19453         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19454         function call.
19455         (complete_function_arguments): No more RECORD_TYPE
19456         conversion. Function parameter nodes no longer saved.
19457         (valid_ref_assignconv_cast_p): Avoid handling null type.
19458         (patch_binop): Fixed null constant reference handling.
19459         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19460         BUILD_THROW macros.
19461         (patch_try_statement): Fixed comments. Record caught types in
19462         list, push the list, expand try block and pop the list.
19463         (patch_synchronized_statement, patch_throw_statement,
19464         check_thrown_exceptions, check_thrown_exceptions_do,
19465         purge_unchecked_exceptions): New functions.
19466         * typeck.c (lookup_argument_method): Allow WFL in place of method
19467         DECL_NAME during method definition check
19468
19469 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19470
19471         * gjavah.c (decode_signature_piece): New function.
19472         (print_c_decl): Use it.  Added `name_override' argument.
19473         (print_method_info): Use name_override argument to print_c_decl.
19474         (seen_fields): Removed.
19475         (print_field_info): Don't update seen_fields.
19476         (struct method_name): New structure.
19477         (method_name_list): New global.
19478         (print_method_info): Add new method to list of methods.
19479         (name_is_method_p): New function.
19480         (print_field_info): If field name has same name as method, then
19481         change field name.
19482         (process_file): Parse methods before fields.
19483         (field_pass): New global.
19484         (HANDLE_END_FIELD): Take field_pass into account.
19485
19486 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19487
19488         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19489         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19490
19491 1998-10-03  Anthony Green  <green@cygnus.com>
19492
19493         * jvspec.c: Fix bug in jvgenmain_spec patch.
19494
19495 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19496
19497         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19498         * decl.c (soft_exceptioninfo_call_node): New global variable.
19499         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19500         takes extra integer argument. soft_exceptioninfo_call_node
19501         initialized.
19502         * except.c (java_set_exception_lang_code): New function
19503         (method_init_exceptions): Called here.
19504         (prepare_eh_table_type): New function.
19505         (expand_end_java_handler): Called here.
19506         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19507         one argument. Modified generation of call to
19508         soft_badarrayindex_node to use new argument.
19509         (build_java_arrayaccess): Pass faulty index value to
19510         build_java_throw_out_of_bounds_exception.
19511         (generate_name): New function.
19512         (java_lang_expand_expr): New local variables node, current,
19513         has_finally_p. Expand TRY_EXPR node.
19514         (process_jvm_instruction): Replace top of the stack with thrown
19515         object reference when entering exception handler.
19516         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19517         specific tree codes.
19518         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19519         global.
19520         (DECL_SPECIFIC_COUNT): New macro.
19521         (prepare_eh_table_type, java_set_exception_lang_code,
19522         generate_name): New function declarations.
19523         (match_java_method): Declaration deleted.
19524         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19525         macros.
19526         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19527         * parse.h (redefinition_error, refine_accessible_methods_list,
19528         can_cast_to_p): Function declaration removed.
19529         (classitf_redefinition_error, variable_redefinition_error,
19530         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19531         find_most_specific_methods_list, argument_types_convertible,
19532         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19533         valid_cast_to_p, valid_method_invocation_conversion_p,
19534         try_reference_assignconv, add_stmt_to_compound,
19535         build_jump_to_finally, build_tree_list, patch_try_statement,
19536         java_get_catch_block): New function declarations.
19537         * parse.y (string_buffer_type): Global variable deleted.
19538         (group_of_labels, catches, catch_clause, catch_clause_parameter,
19539         finally): Rules tagged <node>.
19540         (TRY_TK, CATCH_TK): Token tagged <operator>.
19541         (class_body_declaration:, class_member_declaration:,
19542         formal_parameter:, explicit_constructor_invocation:,
19543         interface_member_declaration:, constant_declaration:,
19544         primary_no_new_array:, class_instance_creation_expression:,
19545         array_creation_expression:): Issue error on unsuported JDK1.1
19546         features.
19547         (try_statement:, catches:, finally:): Define actions.
19548         (catch_clause_parameter): New rule.
19549         (catch_clause:): Use new rule catch_clause_parameter.
19550         (parse_jdk1_1_error): New function.
19551         (redefinition_error): Renamed classitf_redefinition_error.
19552         (variable_redefinition_error): New function.
19553         (check_class_interface_creation): Call
19554         classitf_redefinition_error.
19555         (java_complete_tree): Added error message on JDEP_TYPE: case.
19556         (complete_class_report_errors): Fixed indentation.
19557         (declare_local_variables): Call variable_redefinition_error.
19558         (source_end_java_method): Call java_set_exception_lang_code and
19559         emit_handlers where appropriate.
19560         (java_method_add_stmt): Call add_stmt_to_block.
19561         (add_stmt_to_block): New function.
19562         (lookup_method_invoke): Fixed outside comment. new local variable
19563         candicates.  Call find_applicable_accessible_methods_list and
19564         find_most_specific_methods_list when searching for a
19565         method. Modified error report to list possible candidates when
19566         applicable.
19567         (find_applicable_accessible_methods_list,
19568         find_most_specific_methods_list, argument_types_convertible): New
19569         function.
19570         (refine_accessible_methods_list): Function deleted.
19571         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19572         expr (if applicable) before calling patch_array_ref.
19573         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19574         (enter_block): Fixed comment.
19575         (enter_a_block): New function.
19576         (patch_assignment): Reorganized. Call try_reference_assignconv for
19577         references. Call valid_cast_to_p instead of can_cast_to_p.
19578         (try_reference_assignconv,
19579         valid_builtin_assignconv_identity_widening_p): New functions.
19580         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19581         (valid_cast_to_p, valid_method_invocation_conversion_p): New
19582         functions.
19583         (build_string_concatenation): Don't resolve StringBuffer.
19584         (patch_cast): Fixed inverted arguments.
19585         (patch_array_ref): Code to save array expr deleted. Call
19586         valid_cast_to_p instead of can_cast_to_p.
19587         (generate_labeled_block): Call generate_name.
19588         (build_jump_to_finally, build_try_statement, java_get_catch_block,
19589         patch_try_statement): New functions.
19590         * typeck.c (match_java_method): Function deleted.
19591
19592 1998-10-02  Anthony Green  <green@cygnus.com>
19593
19594         * jvspec.c: jvgenmain_spec uses different temporary file names.
19595
19596 1998-10-02  Anthony Green  <green@cygnus.com>
19597
19598         * jvspec.c (lang_specific_driver): Fail if user specifies
19599         --main= when not linking.
19600
19601 1998-09-28  Tom Tromey  <tromey@cygnus.com>
19602
19603         * class.c (make_class_data): Push value for `thread' field.
19604         * decl.c (init_decl_processing): Added `thread' field to class.
19605
19606         * class.c (add_field): Always make static fields externally
19607         visible.
19608
19609 1998-09-26  Anthony Green  <green@cygnus.com>
19610
19611         * expr.c (build_java_athrow,
19612         build_java_throw_out_of_bounds_exception, expand_invoke,
19613         build_newarray, expand_java_multianewarray, build_java_monitor):
19614         Update comments to reflect _Jv_* function names.
19615
19616 1998-09-25  Per Bothner  <bothner@cygnus.com>
19617
19618         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
19619         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
19620         * parse.y (expand_start_java_method):  Likewise.
19621
19622 1998-09-24  Per Bothner  <bothner@cygnus.com>
19623
19624         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
19625
19626         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19627         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
19628         * expr.c:  Remove no-longer-needed calls to promote_type.
19629         * decl.c (give_name_to_locals):  Liekwise.
19630         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
19631         * parse.y:  Add/remove promote_type calls as appropriate.
19632         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
19633         (parse_signature_string):  Likewise.
19634         (build_java_array_type):  Fix for now signature convenions.
19635
19636         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
19637
19638 1998-09-23  Tom Tromey  <tromey@cygnus.com>
19639
19640         * class.c (init_class_processing): libjava function renamed to
19641         _Jv_RegisterClass.
19642
19643 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19644
19645         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19646         * java-tree.def: Fixed DEFTREECODE third argument.
19647         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19648         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19649         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19650         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19651         JAVA_THIS_EXPR): Now replaced by tree code definitions.
19652         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19653         * lang.c (java_tree_code_type, java_tree_code_length,
19654         java_tree_code_name): New arrays.
19655         (lang_init): Append Java tree node definitions to Gcc ones.
19656         * lex.c (expression_obstack): Declared as extern when JC1_LITE
19657         defined.
19658         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19659         wfl_to_string.
19660         (java_lex): Allow declaration of empty string constants. Retain
19661         location information on CASE_TK and DEFAULT_TK.
19662         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19663         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19664         Modified to be more robust.
19665         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19666         (build_new_invocation, try_builtin_assignconv,
19667         patch_switch_statement, string_constant_concatenation,
19668         build_string_concatenation, patch_string_cst, patch_string,
19669         java_expand_switch): New function declarations.
19670         * parse.y: Rules related to switch and EH tagged <node>.
19671         (label_id): Set to NULL_TREE
19672         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19673         tree nodes.
19674         (this_or_super:): Fixed indentation.
19675         (statement:, statement_nsi:, statement_without_trailing_substatement:,
19676         statement_expression:): Removed call to RULE on all sub-rules.
19677         (switch_expression:, switch_labels:): New rules.
19678         (switch_statement:, switch_block:, switch_block_statement_groups:,
19679         switch_block_statement_group:, switch_labels:, switch_label:):
19680         Defined actions.
19681         (throw_statement:, synchronized_statement:, try_statement:):
19682         Defined temporary actions.
19683         (class_instance_creation_expression:): Call
19684         build_new_invocation. Fixed indentation.
19685         (field_access): Fixed indentation.
19686         (method_invocation): Likewise.
19687         (make_qualified_primary): Use THIS_EXPR.
19688         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19689         resolving from SUPER, set *type_found.
19690         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19691         (java_complete_tree): Removed unused local variable `location'. Case
19692         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19693         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19694         on MODIFY_EXPR: and all binary operator tree code cases. Removed
19695         STRING_CST: case. default: checks for patchable strings.
19696         (complete_function_arguments): Transform string constant or
19697         crafted StringBuffer if necessary.
19698         (build_method_invocation): Fixed comments.
19699         (build_new_invocation): New function.
19700         (patch_assignment): Call try_builtin_assignconv to figure a valid
19701         assignment conversion between builtin types.
19702         (try_builtin_assignconv): New function.
19703         (build_binop): Use URSHIFT_EXPR directly to call build.
19704         (operator_string): Use UNARY_PLUS_EXPR.
19705         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19706         operator.
19707         (do_merge_string_cste, merge_string_cste,
19708         string_constant_concatenation, build_string_concatenation,
19709         patch_string, patch_string_cst): New function.
19710         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19711         (patch_unaryop): Likewise. New test of valid ++/-- operands.
19712         (build_newarray_node): Use NEW_ARRAY_EXPR.
19713         (build_this): Use THIS_EXPR.
19714         (build_return): Enable debug information on return statement.
19715         (build_if_else_statement): Likewise.
19716         (complete_labeled_statement): Fixed related comment.
19717         (build_loop_body): Fixed comment.
19718         (build_bc_statement): Enable debug information on break/continue
19719         statements.
19720         (patch_bc_statement): Fixed typos. Handle SWITCH statement
19721         context.
19722         (patch_switch_statement, case_identity, java_expand_switch): New
19723         functions.
19724
19725 1998-09-21  Per Bothner  <bothner@cygnus.com>
19726
19727         * buffer.h (BUFFER_INIT):  New macro.
19728         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19729         Pass (struct jcf_partial *state) to most functions.
19730         (jcf_block, jcf_relocation):  New types.
19731         Support labels, branches, conditionals, loops.
19732
19733 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19734
19735         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19736
19737 1998-09-21  Per Bothner  <bothner@cygnus.com>
19738
19739         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19740         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19741         not integer_type_node (INT_TYPE_SIZ bits).
19742
19743         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19744
19745         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19746         * jcf-dump.c (print_exception_table):  New function.
19747         (disassemble_method):  Better handling of wide instructions.
19748         Make more robust for bad input.
19749
19750 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19751
19752         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19753         FreeBSD.
19754
19755 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19756
19757         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19758
19759 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19760
19761         * Makefile.in ($(PARSE_H)): Removed target.
19762
19763 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19764
19765         * Makefile.in (JAVA_OBJS): Add memmove.o
19766         (memmove.o): New target & rules.
19767
19768 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19769
19770         * expr.c (expand_invoke): Don't generate a call to the class init
19771         code.
19772
19773 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19774
19775         * Makefile.in: Add many missing dependencies.
19776         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19777         as appropriate.
19778         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19779         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19780
19781 1998-09-11  Per Bothner  <bothner@cygnus.com>
19782
19783         * decl.c (complete_start_java_method):  If method is static (and
19784         not private) call _Jv_InitClass.
19785         * expr.c (expand_invoke):  Don't call build_class_init.
19786
19787         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19788
19789 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19790
19791         * Make-lang.in (GCJ): Define before using.
19792
19793 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19794
19795         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19796         losing due to namespace pollution in GNU getopt.h
19797
19798 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19799
19800         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19801         (java.all.cross): Likewise.
19802         (java.rest.encap): Likewise.
19803
19804 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19805
19806         * gjavah.c (print_class_decls): Fix thinko in arglist
19807         * jcv-io.c (find_classfile): Similarly.
19808
19809 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19810
19811         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19812
19813 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19814
19815         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19816         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19817         * Makefile.in (PARSE_C): New macro.
19818         (PARSE_H): Likewise.
19819         (PARSE_SCAN_C): Likewise.
19820         ($(PARSE_C)): Target renamed from parse.c.
19821         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19822         (clean): Remove parse-scan.c as well.
19823         (parse.o): Depend on $(PARSE_C).
19824
19825 1998-09-05  Anthony Green  <green@cygnus.com>
19826
19827         * README, license.terms: Removed.
19828
19829         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19830         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19831         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19832         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19833         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19834         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19835         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19836         and Java trademark attribution.
19837
19838 1998-09-04  Tom Tromey  <tromey@cygnus.com>
19839
19840         * Makefile.in: Use gcjh, not gjavah.
19841         * config-lang.in (stagestuff): Use gcjh, not gjavah.
19842         * Make-lang.in: Changed gjavah to gcjh everywhere.
19843
19844 1998-09-03  Per Bothner  <bothner@cygnus.com>
19845
19846         * gjavah.c:  Support new -prepend -add -append flags.
19847         (print_method_info):  Method is not virtual if class is final.
19848
19849 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19850
19851         * jv-scan.c: Fixed copyright assignment.
19852         * keyword.gperf: Likewise.
19853         * keyword.h: Likewise.
19854         * lex.c: Fixed copyright assignment.
19855         (java_lex): Push unicode back when parsing '<'.
19856         * lex.h: Fixed copyright assignment.
19857         * parse-scan.y: Likewise.
19858         * parse.h: Fixed copyright assignment.
19859         (build_debugable_stmt, complete_for_loop): New function prototypes.
19860         * parse.y: Fixed copyright assignment.
19861         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19862         size_zero_node when completing a loop with no exit condition.
19863         (for_statement_nsi:): Define action.
19864         (for_init:, for_update:): Return size_zero_node when empty.
19865         (declare_local_variables): Call build_debugable_stmt.
19866         (build_debugable_stmt): New function.
19867         (build_loop_body): Build debugable statement around loop
19868         condition part.
19869         (complete_loop_body): Take into account the debugable statement
19870         around the EXIT_EXPR.
19871         (complete_loop_body): New function.
19872         (patch_exit_expr): Fixed condition inversion.
19873
19874 1998-09-02  Tom Tromey  <tromey@cygnus.com>
19875
19876         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19877         name of thread define.
19878         * jvspec.c (THREAD_NAME): New macro.
19879         (GCLIB): Likewise.
19880         (THREADLIB): Likewise.
19881         (lang_specific_driver): Recognize attempt to link with thread
19882         library or gc library.  Recognize -ljava on command line so it
19883         isn't linked against more than once.
19884
19885 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19886
19887         * parse-scan.y (report_main_declaration): Name of the class
19888         containing `main' can be a qualified name.
19889
19890 1998-08-31  Tom Tromey  <tromey@cygnus.com>
19891
19892         * config-lang.in: Changed gjavac to gjc everywhere.
19893         * Make-lang.in: Changed gjavac to gjc everywhere.
19894
19895 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19896
19897         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19898         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19899         and install the files.
19900         * Makefile.in (JAVA_OBJS_LITE): New variable.
19901         (compiler:): Now include jv-scan as a dependency.
19902         (../jv-scan$(exeext), parse-scan.c): New targets.
19903         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19904         * config-lang.in (compilers): Removed gcj, gjavah from the list.
19905         * jcf-parse.c (parse_source_file): Call java_layout_classes and
19906         check for errors even if parse_only.
19907         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19908         defined.
19909         (yylex): New function. Uses java_lex body.
19910         (java_lex): Removed commented out statement. Remove local variable
19911         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19912         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19913         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19914         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19915         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19916         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19917         where appropriate.
19918         (java_lex_error): Empty if JC1_LITE is defined.
19919         (java_get_line_col): Return 0 if JC1_LITE is defined.
19920         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19921         SET_MODIFIER_CTX): Moved into the section containing the macros
19922         conditionally defined by JC1_LITE.
19923         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19924         argument if JC1_LITE is defined.
19925         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19926         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19927         is defined.
19928         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19929         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19930         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19931         to different values according to JC1_LITE.
19932         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19933         declared if JC1_LITE set.
19934         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19935         defined if JC1_LITE not set.
19936         (struct parser_ctx): Reorganized and skip the jc1 front end part
19937         if JC1_LITE set.
19938         (java_layout_classes): New function definition.
19939         (java_push_parser_context, java_init_lex, yyparse, yylex,
19940         yyerror): Prototype always declared. All other static function
19941         prototypes declared only if JC1_LITE is not set.
19942         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19943         declared in parse.h.
19944         (java_layout_classes): New function.
19945         (java_complete_expand_methods): No longer layout the class here.
19946         * parse-scan.y: New file.
19947         * jv-scan.c: New file.
19948
19949 1998-08-25  Tom Tromey  <tromey@cygnus.com>
19950
19951         * gjavah.c (main): Handle -friend option.
19952         (friend_specs): New global.
19953         (generate_access): Handle friend_specs.
19954         (process_file): Likewise.
19955         (MAX_FRIENDS): New macro.
19956         (friend_count): New global.
19957         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
19958         Changed all callers.
19959
19960 1998-08-24  Per Bothner  <bothner@cygnus.com>
19961
19962         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
19963         (main):  Handle processing all the entries of a named .zip archive.
19964         * jcf-io.c (jcf_trim_old_input):  New function.
19965         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
19966
19967 1998-08-24  Per Bothner  <bothner@cygnus.com>
19968
19969         * lang.c (flag_assume_compiled):  Make default be on.
19970
19971 1998-08-21  Per Bothner  <bothner@cygnus.com>
19972
19973         * jcf-dump.c:  Add bunches of flags to control output more.
19974         (process_class):  New function;  support printing more than one class.
19975         (main): Support new --print-main and --javap flags.
19976         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
19977         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
19978
19979 1998-08-20  Per Bothner  <bothner@cygnus.com>
19980
19981         Change mangling of dispatch table to match C++ vtable (w/thunks).
19982         * class.c (build_dtable_decl), java-tree.h:  New function.
19983         (make_class_data):  Call it.
19984         * decl.c (init_decl_processing):  Likewise.
19985
19986 1998-08-19  Warren Levy  <warrenl@cygnus.com>
19987
19988         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19989         soft_anewarray; adjust args passed.
19990         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19991         match _Jv_NewObjectArray.
19992
19993 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19994
19995         * decl.c (push_labeled_block, pop_labeled_block): New functions.
19996         * expr.c (loopup_label): Call create_label_decl.
19997         (create_label_decl): New function.
19998         (java_lang_expand_expr): Call expand_start_bindings with argument
19999         set to zero.
20000         * java-tree.h Added space after PROTO in function declarations
20001         when necessary.
20002         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20003         (create_label_decl, push_labeled_block): New function
20004         declarations.
20005         * lex.c (label_id): Initialize.
20006         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20007         switch.
20008         * parse.h Added space after PROTO in function declarations when
20009         necessary.
20010         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20011         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20012         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20013         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20014         macros.
20015         (struct parser_ctxt): New fields current_loop,
20016         current_labeled_block.
20017         (build_if_else_statement, patch_if_else_statement,
20018         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20019         generate_labeled_block, complete_labeled_statement,
20020         build_bc_statement, patch_bc_statement, patch_loop_statement,
20021         build_new_loop, build_loop_body, complete_loop_body): New function
20022         declarations.
20023         * parse.y (java_warning_count): New global variable.
20024         (label_id): New static variable.
20025         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20026         (block:): Return size_zero_node when block is empty.
20027         (empty_statement:): Return size_zero_node.
20028         (statement:): Implement supplemental action when for_statement: is
20029         reduced.
20030         (label_decl:): New rule.
20031         (labeled_statement:): Rewritten using label_decl. Actions
20032         implemented.
20033         (labeled_statement_nsi:): Likewise.
20034         (if_then_statement): Actions implemented.
20035         (while_expression): New rule.
20036         (while_statement:): Rewritten using while_expression. Actions
20037         implemented.
20038         (while_statement_nsi:): Likewise.
20039         (do_statement_begin:): New rule.
20040         (do_statement:): Rewritten using do_statement_begin. Actions
20041         implemented.
20042         (for_statement:): Rewritten using for_begin. Actions implemented.
20043         (for_statement_nsi:): Likewise.
20044         (for_header:, for_begin:): New rules.
20045         (for_init:): Actions implemented.
20046         (statement_expression_list:, break_statement:,
20047         continue_statement:): Likewise.
20048         (yyerror): Count number of issued warning(s).
20049         (java_report_errors): Report error(s) and/or warning(s).
20050         (java_complete_class): Use build_java_argument_signature to
20051         recompute completed method signature.
20052         (java_check_regular_methods): New locals method_wfl and aflags.
20053         Use method_wfl instead of lookup_cl during error reports. Fixed
20054         indentation and modified some error messages. Use
20055         lang_printable_name in method instead of the DECL_NAME. New code
20056         to issue warnings on methods not overriding corresponding methods
20057         private to a different package.
20058         (java_method_add_stmt): Call add_stmt_to_compound.
20059         (add_stmt_to_compound): New function.
20060         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20061         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20062         (build_if_else_statement, patch_if_else_statement,
20063         build_labeled_block, generate_labeled_block,
20064         complete_labeled_statement, build_new_loop, build_loop_body,
20065         complete_loop_body, patch_loop_statement, build_bc_statement,
20066         patch_bc_statement, patch_exit_expr): New functions.
20067         * typeck.c (build_java_signature): Build argument signature before
20068         enclosing it in between parenthesis.
20069
20070 1998-08-17  Warren Levy  <warrenl@cygnus.com>
20071
20072         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20073         (JAVA_OBJS): Added reminder comment
20074
20075 1998-08-13  Nick Clifton  <nickc@cygnus.com>
20076
20077         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20078         be interpreted as a long long.
20079
20080 1998-08-13  Warren Levy  <warrenl@cygnus.com>
20081
20082         * decl.c (init_decl_processing): Use _Jv_InitClass, not
20083         soft_initialise_class.  Use _Jv_NewMultiArray, not
20084         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
20085         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
20086         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
20087         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20088
20089 1998-08-12  Per Bothner  <bothner@cygnus.com>
20090
20091         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20092         length_identifier_node):  New global tree node constants.
20093         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
20094         Replace uses by super_identifier_node etc.
20095         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
20096
20097         * parse.y (resolve_field_access):  Don't special-case ".length" if
20098         flag_emit_class_files.
20099         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
20100         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
20101         and ARRAY.length.
20102
20103 1998-08-11  Per Bothner  <bothner@cygnus.com>
20104
20105         * decl.c (init_decl_processing): Remove unused method_type_node fields.
20106         * class.c (make_method_value):  Remove init for removed fields.
20107
20108         * class.c (layout_class):  Use build_java_argument_signature.
20109         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
20110
20111         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
20112         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
20113         (build_java_signature):  Don't use push_java_argument_signature.
20114
20115         * typeck.c (lookup_argument_method):  New function.
20116         * parse.y (java_check_regular_methods):  Use lookup_argument_method
20117         instead of lookup_java_method2 followed by lookup_java_method.
20118
20119         * parse.y (check_method_redefinition):  Minor optimization.
20120
20121         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
20122         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20123
20124 1998-08-10  Tom Tromey  <tromey@cygnus.com>
20125
20126         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20127         c-pragma.o.
20128
20129         * gjavah.c (java_float_finite): Use K&R-style definition.
20130         (java_double_finite): Likewise.
20131         (generate_access): Now returns void.  Changed all callers.
20132         (last_access_generated): Removed.
20133         (process_file): Only make a single pass over the .class file.
20134
20135 1998-07-29  Per Bothner  <bothner@cygnus.com>
20136
20137         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
20138         for compatibility for G++ (with -fvtable-thunks).
20139         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
20140
20141         * gjavah.c (process_file):  Use public inheritance for super-class.
20142
20143 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20144
20145         * lex.c (java_init_lex): Initialize ctxp->package.
20146         * parse.h (struct parser_ctxt): package and package_len replaced
20147         by tree package, an identifier node. Field method_decl_list is
20148         gone. Fixed comments.
20149         (lookup_field_wrapper, merge_qualified_name, not_accessible,
20150         class_in_current_package): New function prototypes.
20151         * parse.y (array_type:): Set class loaded flag on primitive type
20152         arrays.
20153         (package_declaration:): Assign ctxp->package to the
20154         identifier node.
20155         (method_invocation:): Handle invocation of method qualified by
20156         `super'.
20157         (single_type_import_declaration:): Removed ambiguity check.
20158         (java_pop_parser_context): New local variable `next'. Reset and
20159         set IMPORT_CLASSFILE_NAME flags on current and previous import
20160         list.
20161         (java_accstring_lookup): Use new local macro COPY_RETURN.
20162         (lookup_field_wrapper): New function.
20163         (parser_qualified_classname): Use merge_qualified_name.
20164         (parser_check_super_interface): Broaden error message.
20165         (do_resolve_class): Check for qualified class name in the current
20166         compilation unit if appropriate.
20167         (process_imports): Check for already defined classes.
20168         (check_pkg_class_access): Got rid of call to
20169         get_access_flags_from_decl.
20170         (java_complete_expand_methods): Call safe_layout_class based on
20171         the current class size.
20172         (make_qualified_primary): Build a WFL qualification on primary if
20173         none exists.
20174         (merge_qualified_name): New function.
20175         (make_qualified_name): Use merge_qualified_name.
20176         (resolve_expression_name): Use safe_lookup_field.
20177         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20178         (resolve_qualified_expression_name): Likewise. Check on resolved
20179         element accessibility.
20180         (not_accessible_p, class_in_current_package): New functions.
20181         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20182         (patch_method_invocation_stmt): Merged common pieces. Check
20183         accessibility of invoked method.
20184         (check_for_static_method_reference): Add returned type in error
20185         message.
20186         (invocation_mode): Get rid of bogus check on PRIVATE methods.
20187         (refine_accessible_methods_list): Merged two conditions in test.
20188         (java_complete_class): Sanity check on stabilize_ref gone.
20189         * zextract.c (read_zip_archive): Cast lseek second argument to long.
20190
20191 1998-07-28  Per Bothner  <bothner@cygnus.com>
20192
20193         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
20194
20195 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20196
20197         * gjavah.c (F_NAN): Removed.
20198         (F_NAN_MASK): New macro.
20199         (F_POSITIVE_INFINITY): Removed.
20200         (F_NEGATIVE_INFINITY): Likewise.
20201         (java_float_finite): Rewrote.
20202         (D_NAN_MASK): Renamed.
20203         (java_double_finite): Rewrote.
20204         (D_POSITIVE_INFINITY): Removed.
20205         (D_NEGATIVE_INFINITY): Likewise.
20206
20207         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20208         If verbose, print underlying representation of value in hex.
20209
20210 1998-07-24  Per Bothner  <bothner@cygnus.com>
20211
20212         * buffer.h, buffer.c:  New files.
20213         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20214
20215         Support locals variables and writing their debug entries to .class.
20216         * jcf-write.c:  Simplify some by user new buffer type.
20217         (vode_buffer_grow):  Removed.
20218         (struct localvar_info):  New type.
20219         (localsvars, localvartable):  New buffers.
20220         (localvar_alloc, localvar_free):  New functions.
20221         (generate_bytecode_insns):  Handle local variables.
20222         (generate_classfile):  Write LocalVariableTable attribute.
20223
20224 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20225
20226         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20227         * zipfile.h (ZIPMAGIC): New macro.
20228
20229 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20230
20231         * Makefile.in (gjavah.o): Updated dependencies.
20232         (jcf-dump.o): Likewise.
20233         (all.indirect): Use ../gjavah.
20234         (../gjavah$(exeext)): Likewise.
20235         (clean): Don't remove gjavah.
20236         (clean): Remove parse.c, not java/parse.c.
20237         * Make-lang.in (java): Added gjavah.
20238         (gjavah$(exeext)): New target.
20239         (GJAVAH_SOURCES): New macro.
20240         (java.all.build): Added gjavah.
20241         (java.all.cross): Likewise.
20242         (java.rest.encap): Likewise.
20243         * config-lang.in (compilers, stagestuff): Added gjavah.
20244
20245 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20246
20247         * gjavah.c (java_float_finite): New function.
20248         (java_double_finite): Likewise.
20249         (F_POSITIVE_INFINITY): New macro.
20250         (F_NEGATIVE_INFINITY): Likewise.
20251         (F_NAN): Likewise.
20252         (D_POSITIVE_INFINITY): Likewise.
20253         (D_NEGATIVE_INFINITY): Likewise.
20254         (D_NAN): Likewise.
20255         (print_field_info): Use java_float_finite and java_double_finite.
20256
20257 1998-07-23  Per Bothner  <bothner@cygnus.com>
20258
20259         * parse.y (method_header):  Name "this" implicit argument.
20260
20261 1998-07-22  Per Bothner  <bothner@cygnus.com>
20262
20263         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20264         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20265         (put_linenumber):  New function.
20266         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20267
20268 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20269
20270         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20271         (lookup_name, build_known_method_ref, build_class_init,
20272         build_invokevirtual, invoke_build_dtable, match_java_method,
20273         build_field_ref, pushdecl_force_head, build_java_binop,
20274         binary_numeric_promotion, build_decl_no_layout,
20275         build_java_arrayaccess, build_newarray, build_anewarray,
20276         build_java_array_length_access, build_java_arraynull_check): New
20277         extern function prototypes.
20278         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20279         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20280         java-tree.h.
20281         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20282         to NULL
20283         * jcf.h (jcf_out_of_synch): New extern function prototype.
20284         * parse.h: Static/global function implemented in parse.y
20285         prototyped and declarations moved at the end of the file.
20286         (DECL_P): Check that the argument isn't null.
20287         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20288         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20289         (QUAL_DECL_TYPE): New macro.
20290         (PARAMS): Macro definition removed.
20291         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20292         (return_statement:): Call build_return.
20293         (field_access:): Call make_qualified_primary in sub rule.
20294         (method_invocation:): Build method invocation and call
20295         make_qualified_primary when processing primaries.
20296         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20297         get_type_from_signature.
20298         (java_check_regular_method): Extra integer 0 argument when calling
20299         lookup_java_method2.
20300         (lookup_java_interface_method2): Extra method DECL argument when
20301         calling lookup_java_interface_method2.
20302         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20303         COMPOUND_EXPR node.
20304         (java_complete_expand_method): Layout current class iff not
20305         already done. Don't process interface's methods.
20306         (java_complete_expand_method): Use super class only if it
20307         exists. Use current class otherwise.
20308         (make_qualified_primary): New function.
20309         (resolve_expression_name): Process qualified expression or
20310         expression from primary the same way.
20311         (resolve_expression_name): Two last arguments to
20312         resolve_field_access are now NULL_TREEs.
20313         (resolve_field_access): New variable is_static. Local field must
20314         be DECLs. is_static computed on field DECLs only. Append code in
20315         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20316         to initialize field_type.
20317         (resolve_qualified_expression_name): New local variable,
20318         previous_call_static and is_static. Handle primaries with function
20319         calls, casts, array references and `this'. `super' now handled as
20320         `(super_class)this'. Use is_static to clarify boolean expressions.
20321         Added code to handle case where a proper handle is required to
20322         access a field. Use QUAL_DECL_TYPE where applicable.
20323         (maybe_access_field): New function.
20324         (patch_method_invocation_stmt): New arguments primary, where,
20325         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20326         deleted. Use `where' as a type to search from if specified. Check
20327         for static method reference where forbidden. Append primary or
20328         current_this to the argument list if not calling constructor nor
20329         static methods.
20330         (check_for_static_method_reference): New function.
20331         (patch_invoke): Layout the class on which new is done if
20332         necessary.
20333         (lookup_method_invoke): Changed format to report errors on
20334         methods.
20335         (qualify_ambiguous_name): New local variable this_found. Now
20336         handle things from primaries. Method call are considered
20337         expression names.
20338         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20339         changed into NULLs.
20340         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20341         (java_complete_tree): New case fo RETURN_EXPR. Process function
20342         call arguments in separate function.
20343         (complete_function_arguments): New function.
20344         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20345         anymore.
20346         (patch_assignment): Take the return function slot into account as
20347         a RHS. Distinguish assignment from a return.
20348         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20349         when checking methods in interfaces.
20350         (resolve_type_during_patch): NULL argument to unresolve_type_p
20351         instead of NULL_TREE.
20352         (patch_newarray): Fixed typo in comment.
20353         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20354         (build_return, patch_return): New functions.
20355         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20356
20357 1998-07-21  Per Bothner  <bothner@cygnus.com>
20358
20359         * constants.c (find_name_and_type_constant, find_fieldref_index,
20360         find_methodref_index):  New methods.
20361         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20362         just return given method.  Also, rename to build_known_method_ref.
20363         (expand_invoke):  Rename call to build_invoke_non_interface.
20364         * java-tree.h, parse.h:  Update prototype.
20365         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20366         (such as expand_expr_stmt) if flag_emit_class_files.
20367         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20368         STACK_TARGET, IGNORE_TARGET):  New macros.
20369         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20370         (generate_bytecode_insn):  New function to generate method's bytecode.
20371         (generate_classfile):  Node generate Code attribute for a method.
20372         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20373         push_long_const, field_op, adjust_typed_op, maybe_wide):
20374         New functions used by generate_bytecode_insn.
20375
20376         * typeck.c (signature_include_return):  Remove variable.
20377         (push_java_argument_signature, build_java_argument_signature):  New.
20378         (build_java_signature):  Use push_java_argument_signature.
20379         * parse.y:  Use build_java_argument_signature instead of fiddling
20380         with signature_include_return.
20381
20382 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20383
20384         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20385         types.
20386
20387         * Makefile.in (all.indirect): Added gjavah$(exeext).
20388         (gjavah$(exeext)): Added $(exeext).
20389         (clean): Likewise.
20390
20391 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20392
20393         * class.c (layout_class): Call to java_layout_parsed_class replace
20394         by safe_layout_class.
20395         * expr.c (build_java_array_length_access): Removed static storage
20396         class in the function definition.
20397         (build_java_arraynull_check): Likewise.
20398         Also fixed typos in two comments.
20399         * lex.c (java_init_lex): Initialize static global kw_length.
20400         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20401         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20402         java_lex_error.
20403         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20404         * parse.h (resolve_no_layout): New static function declaration.
20405         (get_identifier_in_static): Declaration removed.
20406         (java_layout_parsed_class): Function name declaration changed to
20407         safe_layout_class.
20408         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20409         not_initialized_as_it_should_p, build_this): New static function
20410         declarations.
20411         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20412         binary_numeric_promotion, stabilize_reference,
20413         build_decl_no_layout, build_java_arrayaccess): Extern function
20414         declarations moved into their own section.
20415         (build_newarray, build_anewarray, build_java_array_length_access,
20416         build_java_arraynull_check): New extern function declarations.
20417         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20418         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20419         fake tree codes.
20420         (CALL_CONSTRUCTOR_P): New macro.
20421         * parse.y (kw_length): New static global tree node.
20422         (return_statement): Tagged <node>.
20423         (RETURN_TK): Tagged <operator>.
20424         (variable_declarator_id:): Build variable declaration with an
20425         empty initialization value if a syntax error was found in the
20426         initialization part of the variable declaration.
20427         (statement_without_trailing_substatement:): return_statement: now
20428         uses the default rule.
20429         (return_statement:): Temporarily fixed to return NULL_TREE.
20430         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20431         (class_instance_creation_expression:): Class creation rules now
20432         call build_method_invocation upon reduction.
20433         (array_creation_expression:): Rules call build_newarray_node upon
20434         reduction.
20435         (dim_exprs:): Build a list of dimension expressions.
20436         (dim_expr:): Store location of the OSB_TK in the dimension
20437         expression node.
20438         (method_invocation:): Added a new error rule.
20439         (build_unresolved_array_type): WFL argument may also be an array
20440         on a primitive type. Name of the argument changed to reflect this.
20441         (method_declarator): Insert argument type at the beginning of the
20442         argument type list and later reverse the list.
20443         (unresolved_type_p): Argument 'returned' may be optionally
20444         NULL_TREE.
20445         (java_layout_class_from_source): Function renamed
20446         safe_layout_class.
20447         (resolve_and_layout): Now call resolve_no_layout and
20448         safe_layout_class.
20449         (resolve_no_layout): New function.
20450         (purify_type_name): New function.
20451         (complete_class_report_errors): Call purify_type_name during error
20452         report on a type not found.
20453         (process_imports): error_found local variable doesn't need to be
20454         initialized to zero.
20455         (declare_local_variables): New local type_wfl. Fixed typo in error
20456         message. type_wfl assigned to unresolved type and used to register
20457         incomplete type. Build a WFL around the variable initialization
20458         statement so that debug info can be generated on it.
20459         (source_start_java_method): Reverse argument list after they've
20460         been processed.
20461         (current_this): New static global variable.
20462         (java_complete_expand_methods): Set current_this when appropriate.
20463         (resolve_expression_name): Build correct static and non static
20464         field access bearing a simple name.
20465         (resolve_field_access): Resolve the length field of arrays. Handle
20466         f.m() cases.
20467         (patch_method_invocation_stmt): Set the type of the method
20468         invocation to error_mark_node. This value is later overridden by a
20469         valid type, if any. Don't handle qualified constructor invocation
20470         as qualified method invocation. Call lookup_method_invoke with its
20471         new flag. It's no longer necessary to access the selected method
20472         as the value of a tree list. Handle constructor invocation.
20473         (patch_invoke): Reverse argument list when invoking non interface
20474         methods. Insert call to new as the first argument of the
20475         constructor.
20476         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20477         defined within a final class. Return INVOKE_STATIC if the invoked
20478         method is a constructor.
20479         (lookup_method_invoke): New lc argument is a flag to indicate a
20480         constructor lookup. Now handle constructor lookup. Choose the most
20481         specific method in case several were matching the invocation
20482         requirements. Return a method decl instead of a tree list featuring
20483         one single method decl element.
20484         (refine_accessible_methods_list): New lc flag argument to
20485         indicate that a constructor is being looked up.
20486         (not_initialized_as_it_should_p): New function.
20487         (java_complete_tree): Now process fake tree codes
20488         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20489         save_expr on resolved function call arguments. Case on
20490         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20491         (patch_assignment): LHS can be a field access expression. When
20492         dealing with reference, lhs_type is the promoted type of the
20493         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20494         applicable.
20495         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20496         (patch_binop): Use not_initialized_as_it_should_p where
20497         applicable.
20498         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20499         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20500         where applicable.
20501         (resolve_type_during_patch): New function.
20502         (patch_cast): Call resolve_type_during_patch to resolve type and
20503         report error accordingly.
20504         (patch_array_ref): Use not_initialized_as_it_should_p where
20505         applicable. Array base expression is saved before being
20506         used. Promote the type of an array elements if it contains non
20507         builtin types.
20508         (build_newarray_node, patch_newarray, build_this): New functions.
20509
20510 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20511
20512         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20513         increment it in `for' statement.
20514         (print_field_info): If number is inf or nan, don't print it.
20515         (print_method_info): If method name is `delete', just ignore it.
20516         (print_c_decl): Special-case jstringArray.
20517
20518         * gjavah.c (help): New function.
20519         (no_argument): New function.
20520         (usage): Changed text.
20521         (main): Rewrote argument handling.  Now handles -v, --help,
20522         --version.
20523         (version): New function.
20524         (found_error): New global.
20525         (main): Return found_error.
20526         (generate_access): Set found_error.
20527         (print_c_decl): Likewise.
20528
20529 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20530
20531         * gjavah.c (print_c_decl): Don't print "," when examining field.
20532         Skip type name when looking at "[L" types.
20533         (process_file): Now static.
20534         (generate_access): Now returns int.
20535         (last_access_generated): New global.
20536         (process_file): Clear last_access_generated; make multiple passes
20537         over the class.
20538         (print_field_info): Just return if generate_access returns true.
20539         (print_method_info): Likewise.  Also, allow <init> functions to
20540         pass through.
20541         (print_c_decl): Added is_init argument.  Print constructors
20542         properly.
20543         (print_cxx_classname): Use UTF8_GET to extract characters from
20544         string.
20545         (print_base_classname): New function.
20546         (print_class_decls): New function.
20547         (process_file): Use it.
20548         (utf8_cmp): New function.
20549
20550 1998-07-13  Nick Clifton  <nickc@cygnus.com>
20551
20552         * lang-options.h: Format changed to match changes in gcc/toplev.c
20553         to implement a --help option.
20554
20555 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
20556
20557         * decl.c (init_decl_processing): Revert change to dtable_type.
20558
20559 1998-07-09  Per Bothner  <bothner@cygnus.com>
20560
20561         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20562
20563 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
20564
20565         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20566
20567         * lang.c (lang_init): Default flag_exceptions to 1, without
20568         checking to see if it's 2 first.
20569
20570 1998-07-08  Jeffrey A Law  (law@cygnus.com)
20571
20572         * constants.c: Include "system.h".
20573         * decl.c: Likewise.
20574         * lang.c (flag_new_exceptions): Get via extern now.
20575         (lang_init_options): New functions.  Turn on flag_new_exceptions.
20576
20577 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20578
20579         * lex.c (java_lex): Return 0 when we see an invalid character in
20580         the input.
20581
20582         * lex.c (java_read_char): Specify extra argument when calling
20583         java_lex_error.
20584         (java_read_unicode, java_parse_end_comment,
20585         java_parse_escape_sequence): Likewise,
20586         (java_lex): Specify extra argument when calling
20587         java_lex_error. Test that IDs are beginning with a legal character
20588         for IDs. Handle invalid characters with an error message and a
20589         call to java_lex_error.
20590         (java_lex_error): Adjust column position by new argument
20591         `forward'. Issue an error even if in the middle of reporting an
20592         other error.
20593
20594 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
20595
20596         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20597         we don't explicitly put a null pointer when we're copying it.
20598
20599 1998-07-07  Tom Tromey  <tromey@cygnus.com>
20600
20601         * gjavah.c (print_cxx_classname): New function.
20602         (super_class_name): Likewise.
20603         (print_super_fields): Removed.
20604         (in_super): Removed.
20605         (print_field_info): Never generate #defines.
20606         (print_c_decl): Changed generated types to match JNI.  No longer
20607         print class name before method name.
20608         (print_method_info): Print "static" before static methods.
20609         Print "virtual" before non-final methods.
20610         (usage): Use exit(1), not exit(-1).
20611         (main): Likewise.
20612         (print_field_info): Use %.17g to print a double.
20613         (last_access): New globals.
20614         (process_file): Initialize last_access.
20615         (usage): Now static.
20616         (ACC_VISIBILITY): New define.
20617         (generate_access): New function.
20618         (print_field_info): Call it.
20619         (print_method_info): Likewise.  Also, generate information for all
20620         methods, not just native methods.  Return void.
20621         (print_c_decl): Return void.
20622         (print_field_info): Return void.
20623
20624 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20625
20626         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20627         processing the jc1 grammar file. Prefix bison functions and
20628         variables with java_.
20629         (parse.c): Dependencies on parse.h and lex.h
20630         * expr.c (build_java_arrayaccess): Function now global.
20631         * java-tree.h: Comment reorganized to carry on previous
20632         classification effort.
20633         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20634         RESOLVE_TYPE_NAME_P): New flags on WFLs.
20635         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20636         java_parse (new prefix java_ generated by bison).
20637         (java_layout_parsed_class, java_register_parsed_class): Function
20638         call removed.
20639         (yyparse): Removed unnecessary call to init_outgoing_cpool.
20640         * lex.c (static tree wfl_op): Variable deleted.
20641         (java_init_lex): Initialize kw_super and kw_this. Initialize more
20642         ctxp fields to NULL_TREE.
20643         (java_lex): No longer create WFL for operators. Filename caching
20644         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20645         created as STRING_CST and later expanded. Removed extra argument
20646         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20647         and SUPER.
20648         (build_wfl_node): Removed code in comments.
20649         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20650         store token and location data in the current bison token.
20651         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20652         static/extern function declaration at the beginning of the file.
20653         (struct qualification): Data structure definition deleted.
20654         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20655         (qualify_ambiguous_name): Function declaration modified. Function
20656         now returns nothing.
20657         (build_array_ref, patch_array_ref, make_qualified_name,
20658         resolve_qualified_expression_name, maybe_generate_clinit,
20659         resolve_field_access): New static function declarations.
20660         (build_java_arrayaccess): New extern function declaration.
20661         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20662         (CALL_EXPR_PRIMARY): Macro deleted.
20663         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20664         (struct parser_ctxt): Field initialized_final
20665         removed. non_static_initialized, static_initialized: New fields.
20666         * parse.y (static tree kw_super, static tree kw_this): New global
20667         static.
20668         (%union): tree wfl field of operator member replaced by int
20669         location. WFLs are non longer created for operators.
20670         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20671         (qualified_name:): Now calls make_qualified_name to build the
20672         identifier.
20673         (type_declaration:): Consider generating <clinit> when class
20674         parsing completed.
20675         (variable_declarator:): Directly build an assignment node when the
20676         variable is initialized when declared.
20677         (this_or_super:): Build a WFL and set current location when THIS
20678         or SUPER are parsed.
20679         (expression_statement:): Wrap statement around a WFL.
20680         (primary_no_new_array:): Fixed typo. Changed value returned by
20681         THIS_TK because of its new type (temporary).
20682         (dim_exprs:): Temporary fix because of OSB_TK's new type.
20683         (field_access:): Build qualified name with SUPER.
20684         (method_invocation:): Fixed returned value because of SUPER's new
20685         type.
20686         (array_access:): Use OSB_TK location information.
20687         (post_increment_expression:, post_decrement_expression:,
20688         unary_expression:, pre_increment_expression:,
20689         pre_decrement_expression:, unary_expression_not_plus_minus:,
20690         cast_expression:, multiplicative_expression:,
20691         additive_expression:, shift_expression:, relational_expression:,
20692         equality_expression:, and_expression:, exclusive_or_expression:,
20693         inclusive_or_expression:, conditional_and_expression:,
20694         conditional_or_expression:, assignment:): Use new location/token
20695         information available on operators.
20696         (create_class): Set super_decl_type to NULL_TREE when processing
20697         java.lang.Object.
20698         (register_fields): Field initialization is now a MODIFY_EXPR
20699         node. Chain initialization code to the matching lists (according
20700         to the field declaration modifiers).
20701         (maybe_generate_clinit): New function.
20702         (method_header): Don't set method's DECL_NAME to a WFL when adding
20703         methods to java.lang.Object.
20704         (resolve_and_layout): Now can return NULL_TREE if the type
20705         resolution fails. Otherwise, return the class DECL instead of its
20706         TYPE.
20707         (check_method_redefinition): Don't patch method DECL_NAME if it
20708         belongs to java.lang.Object.
20709         (process_imports): Simply assign error_found to the value returned
20710         by check_pkg_class_access.
20711         (declare_local_variables): Don't use their init statements (if
20712         any) when parsing error were previously found. Reuse MODIFY_EXPR
20713         build during parsing as an init statement.
20714         (java_method_add_stmt): Now return the current method body.
20715         (java_layout_parsed_class, java_register_parsed_class): Functions
20716         removed.
20717         (java_complete_expand_methods): Initialize the constant pool on a
20718         per class basis. Layout the classes before expanding their method
20719         bodies. Don't try expand artificial constructor code if error were
20720         found. Make the classes data and register them if no error were
20721         found.
20722         (java_complete_expand_method): Retrieve an artificial constructor
20723         argument list before entering its body. Assign the top block to
20724         the artificial constructor function body and set types of declared
20725         blocks and compound statements to void. Walk method body if not an
20726         artificial constructor.
20727         (make_qualified_name, cut_identifier_in_qualified): New functions.
20728         (resolve_expression_name): Fixed comments. Save/restore the
20729         current class CLASS_LOADED_P flag value. Build non qualified
20730         static field access and handle qualified expression names.
20731         (resolve_field_access, resolve_qualified_expression_name): New
20732         functions.
20733         (patch_method_invocation_stmt): Use the new expression resolution
20734         scheme, calling resolve_field_access when the function call is
20735         resolved as an expression.
20736         (qualify_ambiguous_name): Function rewritten to work on qualified
20737         expression produced by make_qualified_name.
20738         (java_complete_tree): Promote type when function's argument are
20739         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20740         the assignment to discover further errors if RHS is a expression
20741         name that fails to evaluate. Declare LHS initialized even though
20742         the assignment failed. Don't use the location variable and removed
20743         extra argument in patch function calls. Now handle the ARRAY_REF
20744         case and build internal string representation when STRING_CSTs are
20745         walked.
20746         (build_method_invocation): Don't wrap function call around a WFL.
20747         (build_assignment): Likewise. Use the operator location
20748         information.
20749         (patch_assignment): Handle array access LHSs. Handle error
20750         provenance, resulting in a better error report.
20751         (build_binop): Use op_location from operator as binop location
20752         information.
20753         (build_unaryop, build_incdec, build_cast): Likewise.
20754         (patch_binop): Extract location information from the node. Fixed
20755         typo in error message.
20756         (patch_unary_op): Extract location information from the node.
20757         (build_array_ref, patch_array_ref): New functions.
20758
20759 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20760
20761         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20762         match _Jv_IsInstanceOf.
20763         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20764         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20765
20766 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20767
20768         * decl.c (init_decl_processing): Functions are now named
20769         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20770
20771 1998-06-29  Per Bothner  <bothner@cygnus.com>
20772
20773         * java-tree.h (load_class):  Add prototype.
20774         * class.c (is_compiled_class):  Add missing arg to load_class.
20775         * expr.c (expand_java_NEW):  Call load_class.
20776         * parse.y (process_import):  Removed bogus use of void return value.
20777
20778 1998-06-25  Per Bothner  <bothner@cygnus.com>
20779
20780         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20781         Function name is "_Jv_Throw" instead of "soft_athrow".
20782         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20783         Function name is "_Jv_AllocObject" instead of "soft_new".
20784         Takes an extra parameter (object size).
20785         * expr.c:  Update calls.
20786
20787 1998-06-24  Per Bothner  <bothner@cygnus.com>
20788
20789         * lex.c (java_get_line_col):  Handle end-of-file.
20790         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20791
20792 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20793
20794         * lang.c (lang_init): Make -fexceptions the default.
20795         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20796         exception handling is not turned on.
20797
20798 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20799
20800         * lang.c (flag_new_exceptions): Make this this default.
20801         * decl.c (end_java_method): Call emit_handlers.
20802         * except.c (method_init_exceptions): Set language code and version.
20803         (expand_start_java_handler): Enable exception, and call
20804         expand_eh_region_start.
20805         (expand_end_java_handler): Enable exception, and set up catch blocks.
20806         (emit_handlers): New routine to generate the saved handlers.
20807         * java-except.h (emit_handlers): Add prototype.
20808
20809 1998-06-12  Per Bothner  <bothner@cygnus.com>
20810
20811         We used to have three different representations of the constant pool:
20812         the CPool structure, the tree_constant_pool, and the constructures
20813         used to build the Class object (which may need class and string
20814         constants) in compiled code.  None were appropriate for compiling
20815         to .class files, so I did a major overhaul.
20816
20817         First, the tree_constant_pool array was removed.  Things were
20818         modified to the CPool structure in the JCF could be used.
20819         Second, a "capacity" field was added to the CPool, and functions
20820         written to search for a matching constant, adding one if not found.
20821         The code that generated the Class object was changed to use a CPool.
20822         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20823         the static Class object are now only in build_constants_constructor.
20824         Finally, I wrote code which can generate a .class file (including its
20825         constant pool) from the RECORD_TYPE of a class.  This is a big step
20826         on the way to compiling Java source into .class files.
20827
20828         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
20829         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
20830
20831         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20832         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
20833         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20834         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20835         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
20836         (lang_type):  Removed constant_pool field.
20837         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
20838         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20839         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
20840         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20841
20842         * constants.c (current_constant_pool_tags, current_constant_pool_data,
20843         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20844         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
20845         (set_constant_entry, find_constant1, find_constant2,
20846         find_class_constant, count_constant_pool_bytes, write_constant_pool,
20847         find_utf8_constant, find_class_or_string_constant):  New functions.
20848
20849         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
20850         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
20851         (give_name_to_class, get_class_constant):  Likewise.
20852         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
20853         (get_name_and_type_constant, get_ref_constant):  Removed.
20854         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
20855         * parse.y:  Don't save/restore tree_constant_pool.
20856         * verify.c (verify_jvm_instructions):  Update for new approach.
20857         * expr.c (expand_invoke, expand_java_field_op): Likewise.
20858
20859         * lang-options.h:  Added -femit-class-file, -femit-class-files.
20860         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
20861         (lang_f_options):  Added "emit-class-file(s)".
20862
20863         * expr.c (build_java_arrayaccess):  Generate more efficient array
20864         bounds checking, by using unsigned compare.
20865
20866         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
20867
20868 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20869
20870         * parse.h: New comment on the handling of unresolved type
20871         identifiers. JDEPs are now part of the jdep_code enum.
20872         (typedef struct jdep): Now use enum jdep_code or int, depending on
20873         availability. Both are narrowed down to an 8 bits bitfield.
20874         (CALL_EXPR_PRIMARY): Fixed comment.
20875
20876 1998-06-10  Tom Tromey  <tromey@cygnus.com>
20877
20878         * Make-lang.in (java): Added gjavac and jvgenmain.
20879         (java.start.encap): Depend on gjavac.
20880         (java.rest.encap): Depend on jvgenmain.
20881
20882         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20883         (JAVA_CROSS_NAME): Likewise.
20884         (java.all.build): Depend on jvgenmain and gjavac.
20885         (java.all.cross): Depend on jvgenmain and gjavac-cross.
20886         (jvgenmain$(exeext)): New target.
20887         (java.install-common): Wrote.
20888         * config-lang.in (compilers, stagestuff): Added gjavac and
20889         jvgenmain.
20890
20891 1998-06-10  Dave Brolley  <brolley@cygnus.com>
20892
20893         * lang.c (lang_decode_option): New argc/argv interface.
20894
20895 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20896
20897         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20898         * decl.c (build_decl_no_layout): New function.
20899         * expr.c (java_lang_expand_expr): Layout declarations found in
20900         blocks before they're pushed.
20901         * jcf-parse.c (load_class): Save current line when parsing class
20902         file.
20903         (parse_source_file): Register class before expanding their
20904         methods.
20905         * lang.c (put_decl_node): Produce `null' when `void *' is
20906         processed.
20907         * lex.c (static tree wfl_op): New static global, for error report
20908         on casts.
20909         (java_init_lex): wfl_operator and wfl_op initialized
20910         here. Filename caching added for wfl_op. Return wfl_op when `(' is
20911         parsed.
20912         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20913         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20914         build_unresolved_array_type): New static function definitions.
20915         (build_decl_no_layout): New extern function declared.
20916         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20917         faulty modifier exists.
20918         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20919         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20920         (UNARY_PLUS_EXPR): New fake operator.
20921         (struct parser_ctxt): New field osb_number.
20922         * parse.y (static tree wfl_operator): New static WFL for operator
20923         bound error messages.
20924         (DECR_TK, INCR_TK): Moved.
20925         (OP_TK): Tagged <operator>.
20926         (array_type:): Now call build_unresolved_array_type.
20927         (dim_expr:): Count the number of '[' seen.
20928         (post_increment_expression, post_decrement_expression,
20929         pre_increment_expression, pre_decrement_expression,
20930         unary_expression_not_plus_minus, unary_expression:): Actions are
20931         now building the corresponding unary expressions.
20932         (cast_expression:): Actions are now building cast expressions.
20933         (build_unresolved_array_type): New function.
20934         (create_interface): Reset the number of declared interfaces.
20935         (create_class): Likewise.
20936         (method_header): Methods declared within the scope of an interface
20937         are now implicitly set public and abstract.
20938         (java_complete_class): Variable's and parameter's type are patched
20939         with a promoted type.
20940         (declare_local_variables): Resolved non builtin types are promoted
20941         before being used to build a variable decl. Removed type patch
20942         posted on variable initialization statement.
20943         (source_start_java_method): Use build_decl_no_layout to build the
20944         decl of a parameter of incomplete type.
20945         (java_register_parsed_class): Process interfaces too. Call
20946         rest_of_decl_compilation on each processed class declarations.
20947         (java_complete_expand_methods): Don't attempt to expand things in
20948         interfaces.
20949         (java_complete_tree): Process CONVERT_EXPR, even though it always
20950         has a type. Propagate error_mark_node to node's type too. Promote
20951         method's call argument type and return error_mark_node if
20952         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20953         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20954         handle unary operator nodes.
20955         (build_assignment): Added comment.
20956         (print_int_node): New function.
20957         (patch_assignment): New second argument. New error handling. Use
20958         print_int_node. Handle references. Use can_cast_to_p to issue
20959         different error message according to the context and check upon
20960         the initialization of the RHS.
20961         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20962         (operator_string): Handle more operators.
20963         (patch_binop): No longer use a function static
20964         wfl_operator. Improved error message on shift distance.
20965         (build_unaryop, build_incdec, build_cast, patch_unaryop,
20966         patch_cast): New functions.
20967
20968 1998-06-05  Per Bothner  <bothner@cygnus.com>
20969
20970         * jvspec.c:  New file.
20971         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
20972
20973         * java-tree.h (identifier_subst):  Add declaration.
20974
20975 1998-06-04  Tom Tromey  <tromey@cygnus.com>
20976
20977         * jvgenmain.c (main): Generate call to JvRunMain.
20978
20979         * class.c (make_class_data): Push value for "sync_info" field.
20980         * decl.c (init_decl_processing): Push "sync_info" field.
20981
20982 1998-06-03  Per Bothner  <bothner@cygnus.com>
20983
20984         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
20985         Java (source) name, not signature.
20986         Set TYPE_ALIGN to (at least) that of element_type.
20987
20988 1998-06-02  Per Bothner  <bothner@cygnus.com>
20989
20990         * class.c:  Moved classname-mangling-rekated code to ...
20991         * mangle.c:  ... this new file.
20992         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
20993         * Makefile.in:  Update for above changes.
20994
20995 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20996
20997         * expr.c (truthvalue_conversion): Convert integer and floating
20998         point value to their truth value.
20999         * lex.c (java_lex): Handle the `null' literal.
21000         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21001         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21002         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21003         New macros.
21004
21005         * parse.y: Reorganization/documentation on token declaration.
21006         (binop_lookup[]): New added new tree codes.
21007         (relational_expression): Build corresponding binary operators.
21008         (equality_expression, conditional_and_expression,
21009         conditional_or_expression): Likewise.
21010         (java_complete_class): Fix crash in debug message.
21011         (java_complete_tree): Check initialization of method call
21012         arguments. Further bogus node evaluation to detect more error
21013         during assignments. Handles more binary operators.
21014         (patch_assignment): Use DECL_P.
21015         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21016         code.
21017         (operator_string): Handle more case. Compacted source.
21018         (patch_binop): Changed function comment. Checking for
21019         uninitialized first operand takes the compound assignment into
21020         account and uses DECL_P. Checking for uninitialized second operand
21021         delayed to routine's end. Use macros to issue type bound error
21022         messages and issue messages on both operands if their types are
21023         different. Force fixed type into node. Handle all binary
21024         operators.
21025
21026 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21027
21028         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21029         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21030         build operator node and return tokens.
21031         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21032         * parse.h (java_complete_tree): Changed returned type in prototype.
21033         (build_method_invocation, build_assignment, patch_assignment,
21034         patch_binop): New static function declarations.
21035         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21036         BUILD_EXPR_WFL): New macros.
21037         * parse.y (enum tree_code binop_lookup[]): New static for token to
21038         TREE_CODE lookup.
21039         (%union): Parser union has new sub-structure `operator'.
21040         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21041         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21042         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21043         ASSIGN_ANY_TK): Tokens tagged `operator'.
21044         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21045         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21046         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21047         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21048         (assignment_operator:): Rule tagged `operator'.
21049         (expression_statement:): Re-installed default rule.
21050         (method_invocation:): Sub rules call build_method_invocation.
21051         (postfix_expression:): Don't attempt to resolve name here. Just
21052         return an ID.
21053         (multiplicative_expression:): Sub-rules build corresponding binop
21054         expression node.
21055         (additive_expression:, shift_expression:, and_expression:,
21056         exclusive_or_expression:, inclusive_or_expression:): Likewise.
21057         (assignment:): Sub rule invoke build_assignment.
21058         (assignment_operator:): Default rules on sub rules.
21059         (force_error): Added documentation on this variable.
21060         (declare_local_variables): Build initialization calling
21061         build_assignment.
21062         (expand_start_java_method): Removed unused rtx declaration. Mark
21063         arguments as already initialized.
21064         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21065         (java_complete_expand_methods): Don't process next method if
21066         completion of the previous one triggered errors.
21067         (java_complete_expand_method): Call source_end_java_method if no
21068         error were found during completion.
21069         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21070         locals declaratilon. Handle names found within a class. Return
21071         error_mark_node when things aren't found.
21072         (patch_method_invocation_stmt): Return error_mark_node on failures.
21073         (patch_invoke): Removed unused local. Return the correct node.
21074         (java_complete_tree): Now returns a value. The BLOCK section binds
21075         local identifiers and the type of a BLOCK is now void. Assign the
21076         result of operand completion on COMPOUND_EXPR. Assign the
21077         encapsulated node of a WFL to the result of its completion, except
21078         when the node is an identifier. Now handle MODIFY_EXPR and several
21079         binary operators. Return error_mark_node on errors.
21080         (build_method_invocation, build_assignment, patch_assignment,
21081         build_binop, operator_string, patch_binop): New functions.
21082         * typeck.c (binary_numeric_promotion): New function.
21083
21084 1998-05-21  Per Bothner  <bothner@cygnus.com>
21085
21086         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
21087         Replace most uses of ident_subst by identifier_subst.
21088
21089         * class.c (push_class_static_dummy_field):  Removed function.
21090         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
21091         instead of looking got "class" static field.  Create that decl here.
21092         (class_identifier_node):  Removed;  no longer needed.
21093         (init_class_processing):  Don't init class_identifier_node.
21094         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
21095         Do nreverse 0 times (instead of twice) for Object and Class.
21096         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21097
21098 1998-05-20  Per Bothner  <bothner@cygnus.com>
21099
21100         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
21101         while initializing linenumber_count and linenumber_table.
21102         Do it before init_function_start (which calls emit_line_note).
21103         * expr.c (expand_byte_code):  Don't need to clear lineno here.
21104
21105 1998-05-18  Tom Tromey  <tromey@cygnus.com>
21106
21107         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21108         then mangle number as _N_.
21109
21110         * class.c (mangle_class_field): New function.
21111         (build_class_ref): Set assembler name of class reference using
21112         mangle_class_field.
21113         (push_class_static_dummy_field): Likewise.
21114
21115 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
21116
21117         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21118         of assigning to TREE_CODE.  The latter method exploits a feature
21119         of GCC that is not ANSI compliant.
21120
21121 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21122
21123         * decl.c (pushdecl_force_head): New function.
21124         (pushlevel): Removed conditional printf.
21125         (complete_start_java_method): Don't enter local variable scope if
21126         function is compiled from source code.
21127         * expr.c: parse.h now included
21128         (java_lang_expand_expr): New function.
21129         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21130         printf. Terminate buffer when doing directories.
21131         * jcf-parse.c (parse_source_file): Call lang_init_source before
21132         parsing and before code generation.
21133         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21134         use printf if the macro is defined.
21135         * lang.c (lang_init): Install lang_expand_expr hook on
21136         java_lang_expand_expr.
21137         (java_dummy_print): New function.
21138         (lang_init_source): New function.
21139         * lex.c (java_lex): Remember location of an opening brace at the
21140         second nesting level.
21141         (java_is_eol): Unget character seen after a CR if it is EOF.
21142         * parse.h: Now includes lex.h
21143         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21144         printf if the macro is defined.
21145         (expand_start_java_method, build_expr_block, enter_block,
21146         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21147         New static function declarations.
21148         (pushdecl_force_head): New extern function declaration.
21149         (INCOMPLETE_TYPE_P): New macro.
21150         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21151         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21152         BLOCK_EXPR_ORIGIN): New macros.
21153         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21154         DECL_SOURCE_LINE_LAST): New macros.
21155         (struct parser_ctxt): Removed field current_method_decl, redundant
21156         with the field current_function_decl. Added fields
21157         first_ccb_indent1 and pending_block.
21158         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21159         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21160         tagged <node>
21161         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21162         (compilation_unit:): Cosmetic on sub rule.
21163         (type_declaration:): Cosmetic on sub rules. Added an error rule.
21164         (variable_initializer:): Installed default rule on expression:.
21165         (method_declaration:): method_header: starts a new
21166         method. method_body: installs the function body, absorbs blocks
21167         emitted for temporary variable scopings, pops function's body block
21168         and merges function's last statement lineno in DECL_SOURCE_LINE.
21169         (method_body:): Installed default rules.
21170         (block:): Call enter_block when an opening brace is seen.  Absorb
21171         scoping blocks and call exit_block when a closing brace is seen.
21172         (block_statement:): Cosmetic changes.
21173         (method_invocation:): Create WFL around CALL_EXPR node.
21174         (patch_stage): Added comment around definition.
21175         (method_header): Try to use first_ccb_indent1 as the first line of
21176         the method, so BP debug info are emitted at the first opening
21177         brace of the function. If the function has no body, use the
21178         location of the function's name. Override currently defined method
21179         name with the matching WFL so we can point redefinition errors
21180         using the location where the function's name was declared.
21181         (check_abstract_method_header): Interprets DECL_NAME as an
21182         identifier or as a WFL, accordingly.
21183         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21184         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21185         location and name information out of it and reinstall DECL_NAME to
21186         its original identifier node value.
21187         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21188         function's source code).
21189         (read_import_dir): Test the value returned by find_class and issue
21190         a fatal accordingly.
21191         (declare_local_variables): Push a new block for the scope of the
21192         new variable(s) if code has been already generated at that nesting
21193         level. Pinpoint redefinition errors using the variable id
21194         WFLs. Generate initialization code if necessary. If the variable
21195         type is incomplete, register a patch on its decl.
21196         (source_start_java_method): Rewritten. Define a new block for the
21197         function's parameters. Build parameter decl out of function's
21198         arguments and register them for a patch if their types are
21199         incomplete.
21200         (expand_start_java_method): Includes the part of
21201         source_start_java_method that was pushing the parameter decls and
21202         completing the method start code.
21203         (source_end_java_method): Removed call the expand_end_bindings and
21204         poplevel (already taken care of). Reinstall function's arguments
21205         and get function's last line of code before calling
21206         expand_function_end.
21207         (java_method_add_stmt): New comment before the function's
21208         code. Complement the second operand of the current COMPOUND_EXPR
21209         if necessary.
21210         (java_complete_expand_methods): Don't generate debug info on line
21211         zero when expanding a generated constructor.
21212         (java_complete_expand_method): Set start and end line numbers for
21213         a artificially generated constructor to one and manually call
21214         enter_block and exit_block when defining it. For all methods:
21215         expand function's start calling the new expand_start_java_method
21216         and invoke java_complete_tree on the effective method's body, if
21217         any.
21218         (resolve_expression_name): Now use lookup_name_in_blocks to search
21219         local variable decls and print out an error when variables are
21220         undefined.
21221         (patch_method_invocation_stmt): Inserted comment before the
21222         function's code.
21223         (lookup_method_invoke): Chain method's arguments using chainon
21224         with the current arg list as a second argument. Inserted missing
21225         IDENTIFIER_POINTER when reporting an error on methods not found.
21226         (refine_accessible_methods_list): Don't retain constructors.
21227         (patch_arguments): Function removed.
21228         (java_complete_tree): Inserted comment before the function's
21229         code. New case for BLOCKs. Moved the WFL case a bit
21230         further. Complete function's arguments.
21231         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21232         maybe_absorb_scoping_blocks): New functions.
21233
21234 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21235
21236         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21237         previously set.
21238         * jcf-parse.c (parse_source_file, java_error_count): New forward
21239         and extern declarations.
21240         (java_parse_abort_on_error): Macro moved.
21241         (jcf_parse_source): fatal called if fopen fails. Now calls
21242         parse_source_file.
21243         (parse_source_file): New parse_only parameter. Reflects the
21244         elimination of the second pass.
21245         (yyparse): parse_source_file called with argument set to 0.
21246         * jcf.h (JCF_ZERO): Sets java_source to zero.
21247         * lex.c (java_init_lex): pass argument is gone. Function modified
21248         to be called once during the analysis of a file.
21249         (java_unget_unicode): Fixed typo in fatal message.
21250         (java_get_line_col): Likewise.
21251         (java_lval): Likewise. String literals no longer built during
21252         second pass.
21253         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21254         account.
21255         * parse.h (MODIFIER_WFL): New macro.
21256         (parse_check_super, parser_check_super_interface): Now return int.
21257         (parser_chain_incomplete_item, not_builtin_p,
21258         complete_method_decl): Declarations removed.
21259         (build_method_invocation_stmt, build_invoke): Renamed using the
21260         `patch' instead of `build'
21261         (register-incomplete_type, obtain_incomplete_type,
21262         java_complete_tree, java_complete_expand_method,
21263         unresolved_type_p, create_jdep_list): New function declarations.
21264         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21265         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21266         (jdep): New typedef on new struct _jdep.
21267         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21268         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21269         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21270         JDEP_RESOLVED_P): New macros.
21271         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21272         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21273         JDEP_VARIABLE): New enum values and jdep kinds.
21274         (jdeplist): New typedef on struct _jdeplist.
21275         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21276         macros.
21277         (CALL_EXPR_PRIMARY): New macro.
21278         (struct parser_ctxt): Fields java_pass, current_method_decl,
21279         method_decl_list deleted. New field jdeplist.
21280         (INCOMPLETE_P): Macro deleted.
21281         * parse.y (single_type_import_declaration:): Removed pass switch.
21282         (type_import_on_demand_declaration): Likewise.
21283         (field_declaration:): Removed pass switch on all sub rules.
21284         (class_declaration:): Call the complete_class_decl removed on
21285         class_body rules.
21286         (method_declaration:): Removed second pass switch. No longer chain
21287         methods decl when method_header reduced.
21288         (method_header:): Sub rules no longer depend on pass switch.
21289         (method_declarator:): Likewise.
21290         (method_body:): Likewise.
21291         (abstract_method_declaration:): Likewise.
21292         (block_statement:): Likewise.
21293         (local_variable_declaration:): Likewise.
21294         (argument_list:): Likewise.
21295         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21296         removed. Partial CLASS_EXPR tree node built instead.
21297         (postfix_expression:): Removed pass switch on all sub rules.
21298         (java_pop_parser_context): Free classd_list content.
21299         (yyerror): Call obstrack_grow0 to finalize error message.
21300         (check_class_interface_creation): Comment modified to reflect new
21301         returned value meaning. Removed second pass switch. Return 1 if an
21302         error was found, 0 otherwise. Adjust pointer on filename if a
21303         leading path separator was found.
21304         (maybe_create_class_interface_decl): Removed first pass switch
21305         when linking the class decl to the class_list. Install a new
21306         jdep_list for the class.
21307         (add_superinterfaces): List of unresolved interfaces is
21308         gone. Unresolved interfaces are directly added to the current
21309         dependencies list.
21310         (create_interface): Second pass shortcut removed.
21311         ctpx->modifier_ctx access through MODIFIER_WFL.
21312         (create_class): Second pass shortcut removed. Call to
21313         register_incomplete_type replaces the call to
21314         parser_chain_incomplete_item.
21315         (complete_class_decl): Function removed.
21316         (duplicate_declaration_error): New way of retrieving redeclared
21317         item type.
21318         (register_fields): Call to lookup_modifier_cl replaced by
21319         MODIFIER_WFL. New way of handling unresolved type, using
21320         unresolved_type_p and obtain_incomplete_type.
21321         register_incomplete_type replaces call to parser_chain_incomplete_item.
21322         (patch_stage): New static global variable.
21323         (method_header): New way of handling unresolved type, using
21324         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21325         indicates that the method decl needs to be patched.
21326         (check_abstract_method_header): Call to lookup_modifier_cl
21327         replaced by MODIFIER_WFL.
21328         (method_declarator): Incomplete argument type are registered
21329         calling register_incomplete_type. Patch on the declared method is
21330         issued in that case.
21331         (unresolved_type_p): New function.
21332         (parser_check_super_interface): New comment to reflect function's
21333         modified returned type (int). Function and has a new argument
21334         this_wfl. Call to parse_error_context uses this_wfl instead of
21335         relying on lookup_cl.
21336         (parser_check_super): Comment reflects function's new returned
21337         type (int). Function returns nonzero value on error.
21338         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21339         register_incomplete_type, jdep_resolve_class): New functions to
21340         handle incomplete types in declarations.
21341         (java_complete_class): Rewritten to work with the new incomplete
21342         type handling scheme.
21343         (complete_class_report_errors): Likewise.
21344         (complete_method_decl): Removed: it jobs is now handled by
21345         java_complete_class.
21346         (do_resolve_class): Class loaded in not already loaded and not
21347         found in Java source code.
21348         (java_check_regular_methods, java_check_abstract_methods): Don't
21349         call complete_method_decl anymore.
21350         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21351         (read_import_dir): Got rid of the pass number dependency.
21352         (declare_local_variables): New handling of unresolved types (patch
21353         issued).
21354         (source_start_java_method): New parameter level. Function called
21355         with level set to 1 when argument types are potentially
21356         unresolved.  Called to complete the job with level set to 2 once
21357         types are complete.
21358         (source_end_java_method): Call to permanent_allocation
21359         removed. Waiting to be replaced by a more suitable obstack
21360         management.
21361         (java_complete_expand_methods, java_complete_expand_method,
21362         java_expand_finals): New functions.
21363         (build_method_invocation_stmt): Renamed
21364         patch_method_invocation_stmt. Extracts function call expression
21365         (wfl) and arguments (args) from CALL_EXPR tree operands.
21366         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21367         call. Patch the function and argument operand of the CALL_EXPR
21368         tree argument.
21369         (patch_argument, java_complete_tree): New functions.
21370
21371 1998-04-20  Per Bothner  <bothner@cygnus.com>
21372
21373         Recover from missing fields and methods (i.e. error instead of fatal).
21374         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21375         * expr.c (expand_invoke):  Recover from missing method.
21376         (expand_java_field_op):  Recover from missing field.
21377         Inline references to java.lang.{Integer,Char,...}.TYPE.
21378         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21379         * class.c (add_method):  Use get_type_from_signature.
21380         (build_class_ref):  Handle a class that was not found.
21381         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21382         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21383         instead of lookup_field to handle missing fields.
21384
21385         * jcf-parse.c (process_zip_dir):  Set java_source.
21386
21387 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21388
21389         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21390
21391 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21392
21393         * jcf-parse.c (load_class): Don't change input_filename before
21394         calling jcf_parse_source (but still do it before calling
21395         jcf_parse).
21396         (jcf_parse_source): Assign input_filename after having saved the
21397         parser context.
21398         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21399         list. ctxp->modifier_ctx zeroed according to its new
21400         definition. ctxp->filename initialized. Removed
21401         JAVA_MODIFIER_CTX_UNMARK.
21402         (java_unget_unicode): Update the character based column position.
21403         (java_allocate_new_line): ref_count not used anymore. Always free
21404         ctxp->p_line. Initialize c_line->char_col to 0.
21405         (java_get_unicode): Update the character based column position.
21406         (java_lex): Use ctxp->elc to store current position in source
21407         file, at the beginning of the parsed token. Set modifier_ctx entry
21408         corresponding to the parse modifier to a WFL node. Return a WFL
21409         node when an identifier is parsed.
21410         (java_lex_error): Now uses ctxp->elc to store current position in
21411         source.
21412         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21413         * lex.h (build_wfl_node): New function definitions.
21414         (struct java_line): ref_count and next fields are gone. New field
21415         char_col.
21416         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21417         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21418         (JAVA_COLUMN_DELTA): New macro.
21419         (java_lc): New typedef on new struct _java_lc.
21420         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21421         (parse_error_context, parse_warning_context): Changed prototypes.
21422         (java_get_line_col): Added as an available global function.
21423         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21424         (IC_DECL): Replaced by macro IC_TYPE
21425         (DEPEND_WFL): New macro.
21426         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21427         wrong modifier.
21428         (exit_java_complete_class): Removed a commented out statement.
21429         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21430         now an array of tree nodes. Deleted fields line_list and
21431         e_line. New field elc, to replace e_line.
21432         * parse.y (array_type:): Build WFL node.
21433         (qualified_name:): Build a single WFL node out of two. Retain
21434         the location information of the first node in the resulting node.
21435         (package_declaration:): Use package name as a WFL node
21436         (single_type_import_declaration:): Use imported name as a WFL node.
21437         (type_import_on_demand_declaration:): Use root of the imported
21438         packages as a WFL node.
21439         (field_declaration:): Removed unused local variable cl.
21440         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21441         (yyerror): New static elc. Removed static error_line, error_pos.
21442         New local code_from_source. Save ctxp->elc into elc at the first
21443         pass. Call java_get_line_col to get a string of the line where
21444         the error occurred.
21445         (debug_line): Removed static function.
21446         (parse_error_context, parse_warning_context): Parameter cl is now
21447         a WFL node. Use its value to initialize ctxp->elc.
21448         (redefinition_error): Parameter cl is now a WFL node.
21449         (parse_add_interface): New parameter wfl. No longer call
21450         lookup_cl, use wfl instead.
21451         (check_class_interface_creation): Parameter cl is now a WFL node.
21452         (maybe_create_class_interface_decl): Likewise.
21453         (add_superinterfaces): New function.
21454         (create_interface): Removed local cl, node, super_decl,
21455         super_decl_type.  Function now uses id as a WFL node. Better
21456         warning/error report on obsolete or forbidden mix of
21457         modifiers. Now calls add_superinterfaces to register interfaces.
21458         (create_class): Removed local cl, node. Local variable id is used
21459         as a WFL node. Better error report on forbidden modifier
21460         mix. Uses add_superinterfaces to register interfaces.
21461         (find_field): Argument cl is now a WFL node. Now store the WFL
21462         node of a fields that needs to be checked for their
21463         initialization.
21464         (method_header): Local variable node non longer used. Local
21465         variable id replaces cl.
21466         (check_modifiers_consistency): Local variable cl is now a WFL
21467         node.
21468         (method_declarator): Local variable cl replaced by parameter id.
21469         (parser_qualified_name): Now uses parameter name as a WFL node.
21470         (parser_check_super_interface): New parameter wfl, for achieve
21471         greater accuracy during error reports.
21472         (parser_chain_incomplete_item): New parameter named location. Used,
21473         along the decl, to construct the incomplete item node.
21474         (java_complete_class): resolve_class now uses WFL node extracted
21475         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21476         where appropriate.
21477         (complete_method_decl): Unresolved function's argument types are WFL.
21478         (resolve_class): Parameter cl is now a WFL node.
21479         (resolve_and_layout): Likewise.
21480         (do_resolve_class): Likewise. Try first to use cl and then do the
21481         lookup on the decl when calling check_pkg_class_access.
21482         (complete_class_report_errors): Use IC_TYPE in place of
21483         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21484         instead of doing a lookup over the decl.
21485         (java_check_final): Use WFL info from field tree list.
21486         (lookup_cl): Rewritten and returns a statically defined WFL node.
21487         (lookup_modifier_cl): Now uses information from WFL nodes.
21488         (process_imports): Likewise.
21489         (read_import_dir): name and cl arguments replaced by a single WFL
21490         node. Function modified accordingly.
21491         (find_in_imports_on_demand): Now uses WFL node.
21492         (check_pkg_class_access): cl argument is now a WFL node.
21493         (declare_local_variables): Fixed to use WFL nodes.
21494         (resolve_expression_name): Likewise.
21495         (build_method_invocation_stmt): name_combo argument renamed
21496         wfl. Function modified to use WFL nodes.
21497         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21498         (lookup_method_invoke): cl is now a WFL node. Added missing
21499         IDENTIFIER_POINTER to class type decl name.
21500
21501 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21502
21503         * lang.c (init_parse): Now returns char* containing the filename.
21504
21505 1998-04-10  Per Bothner  <bothner@cygnus.com>
21506
21507         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21508
21509         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21510         * class.c (make_class_data):  If flag_assume_compiled, initial class
21511         state is CSTATE_PREPARED; make superclass and interfaces direct
21512         references, rather than constant pool indexes.
21513
21514 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21515
21516         * parser.y: Include flags.h. Removed debug variable pl.
21517         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21518         (block:): Likewise.
21519         (labeled_statement_nsi:): Generate debug info when reducing
21520         expression_statement:.
21521         (check_pkg_class_access): get_access_flags_from_decl invocation
21522         fixed for new CLASS_* flags location.
21523         (source_end_java_method): Save/restore parser context when
21524         entering/leaving this routine. Restore lineno to its right value
21525         before calling expand_end_bindings.
21526         (build_method_invocation_stmt): build_invoke called with the
21527         current line information.
21528         (build_invoke): New argument cl. Wrap the function call around a
21529         wfl node.
21530         (refine_accessible_methods_list): Changed comment, removed
21531         unnecessary code.
21532         * parse.h: Fixed typo in comments.
21533         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21534         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21535         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21536         parser_ccb_indent.
21537         * lex.c (java_lex): Record the last closing curly bracket of a
21538         function.
21539         * jcf-parse.c (jcf_parse_source): Now calls
21540         java_check_methods. Clarified comment, fixed typo.
21541
21542 1998-04-09  Dave Brolley  <brolley@cygnus.com>
21543
21544         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21545         (finish_parse): Expose for non USE_CPPLIB builds.
21546
21547 1998-04-08  Jeffrey A Law  (law@cygnus.com)
21548
21549         * lang.c (lang_print_xnode): New function.
21550
21551 1998-04-03  Per Bothner  <bothner@cygnus.com>
21552
21553         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
21554         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
21555         used to build a class's dispatch table.
21556         (make_class_data):  Generate dispatch table if flag_assume_compiled.
21557         Set dtable of class object to address of class_dtable_decl.
21558
21559         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
21560         be volatile and have side effects - generates better code.
21561
21562         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
21563         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21564
21565         * expr.c (expand_invoke):  If class is final, method is
21566         effectively final, so can call it directly.
21567
21568         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
21569
21570         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
21571
21572 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21573
21574         * parse.y (build_method_invocation_stmt): Removed extra argument
21575         to build_invoke.
21576
21577 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21578
21579         * expr.c (dtable_indent): Now static global.
21580         (expand_invoke): Now call invoke_build_dtable and
21581         build_invokevirtual.
21582         (invoke_build_dtable, build_invokevirtual): New functions.
21583         * jcf-io.c (find_class): Defer issuing a warning by setting
21584         jcf->outofsynch to 1.
21585         * jcf-parse.c (jcf_out_of_synch): New function.
21586         (load_class): Test this_jcf.outofsynch flag and call
21587         jcf_out_of_synch accordingly.
21588         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21589         comment indentation.
21590         * lex.c (java_get_unicode): Fixed code indentation.
21591         (java_lex): Create string literal. Fixed typo. Removed several
21592         premature obstack_free.
21593         * parse.h: New enums for name resolution and invocation mode.
21594         (struct qualification): New data structure.
21595         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21596         (do_resolve_class, build_method_invocation_stmt,
21597         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21598         debug_line, identical_subpath_p, invocation_mode,
21599         refine_accessible_methods_list, build_invoke,
21600         lookup_method_invoke): New functions declared.
21601         (build_invokevirtual, invoke_build_dtable, match_java_method,
21602         build_field_ref, jcf_out_of_synch): New references to external
21603         functions.
21604         (struct parse_ctxt): Removed artificial_constructor field.
21605         * parse.y: (array_type:): Type defined for this rule.
21606         (class_type:): Installed default rule for interface_type:.
21607         (array_type:): Now build Java array type.
21608         (qualified_name:): Now use obstack_grow0.
21609         (method_declaration:): Skip the artificial constructor added to
21610         the list, if any.
21611         (abstract_method_declaration:): Execute the code only during pass 1.
21612         (block:): Installed default rule in block_statements:.
21613         (block_statement:): Add the statement to the method during pass 2.
21614         (statement_expression): Installed default rule for
21615         method_invocation:.
21616         (argument_list:): Added code to build the argument list.
21617         (method_invocation:): Added call to create the method invocation
21618         node.
21619         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21620         (debug_line): New function for debug.
21621         (complete_class_decl): No longer do something during pass 1.
21622         (method_header): Use BUILD_PTR_FROM_NAME.
21623         (parser_qualified_classname): Use obstack_grow0. Removed bogus
21624         obstack_free.
21625         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21626         function's main comment.
21627         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21628         classes.
21629         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21630         (resolve_class): Now works with arrays.
21631         (do_resolve_class, resolve_and_layout): New functions.
21632         (java_check_regular_methods): Reverse method list before and after
21633         having processed it. No longer set ctxp->artificial_constructor.
21634         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21635         accordingly. Fixed typo in issued error message. Now use
21636         obstack_grow0.
21637         (find_in_imports_on_demand): Now use obstack_grow0.
21638         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21639         (source_end_java_method): Call expand_expr_stmt instead of
21640         expand_expr. Calls it before calling expand_function_end.
21641         (java_method_add_stmt): Do nothing if errors were found during
21642         parsing.
21643         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21644         (build_method_invocation_stmt, build_invoke, invocation_mode,
21645         lookup_method_invoke, refine_accessible_methods_list,
21646         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21647         New functions.
21648         * typeck.c (build_java_signature): Properly end method signature
21649         if return type skipped.
21650         (match_java_method): New function.
21651
21652 1998-03-16  Per Bothner  <bothner@cygnus.com>
21653
21654         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
21655
21656 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21657
21658         * expr.c (build_invoke_non_interface): New function.
21659         (methods_ident, ncode_ident): Now static globals.
21660         (expand_invoke): Use build_invoke_non_interface.
21661         * java-tree.h (struct lang_decl): New field function_decl_body.
21662         (DECL_FUNCTION_BODY): New macro.
21663         * jcf-parse.c (jcf_parse_source): Deeper check before setting
21664         CLASS_FROM_SOURCE_P.
21665         (parse_source_file): Fixed typos. Call java_layout_parsed_class
21666         before starting pass 2. Call to java_generate_parsed_class replaced
21667         by java_register_parsed_class.
21668         * lex.c: Fixed typo in header. Some line width related formating.
21669         * lex.h: Some line width related formating.
21670         * parse.h (source_end_java_method, resolve_expression_name,
21671         complete_class_decl, maybe_create_class_interface_decl,
21672         check_class_interface_creation): New static function declarations.
21673         (java_layout_parsed_class, java_method_add_stmt): New function
21674         declarations.
21675         (struct parser_ctxt): Field mark_class_generate removed. New
21676         fields class_list and artificial_constructor.
21677         * parse.y: Fixed typo in header.
21678         (class_declaration:): Call complete_class_decl when class body
21679         parsed.
21680         (method_declaration:): Call source_end_java_method in pass 2 when
21681         the method body is defined.
21682         (postfix_expression:): Do expression name resolution on sub-rule
21683         name during pass 2.
21684         (create_class, create_interface): Merged common pieces.
21685         (check_class_interface_creation, maybe_create_class_interface_decl):
21686         New functions.
21687         (complete_class_decl): New function.
21688         (register_fields): Fixed line width related typo.
21689         (method_header): Correctly skip first argument when fixing
21690         argument line. Changed the loop.
21691         (java_check_circular_reference): Now use ctxp->class_list.
21692         (java_complete_class): Removed start/stop marking.
21693         (java_check_regular_methods): Now takes a class decl as an
21694         argument.  Add default constructor if none were encountered.
21695         (java_check_methods): Now use ctxp->class_list. Changed call to
21696         java_check_regular_methods.
21697         (source_start_java_method): Set DECL_ARG_TYPE for each function
21698         arguments.
21699         (source_end_java_method, java_method_add_stmt): New functions.
21700         (java_generate_parsed_class): No longer exists.
21701         (java_layout_parsed_class, java_register_parsed_class): New functions.
21702         (resolve_expression_name): New function.
21703
21704 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21705
21706         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21707         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21708         until pass initializations are done. Call read_import_dir with
21709         pass set to 0.
21710         * parse.h: (lookup_modifier_cl): New function declared.
21711         (INTERFACE_FIELD_MODIFIERS): New macro.
21712         (OBSOLETE_MODIFIER_WARNING): New macro.
21713         * parse.y: (register_fields): Class type and current field name in
21714         local variables. Check modifier(s) if adding field(s) to an interface.
21715         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21716         and report errors using the faulty modifier line context.
21717         (lookup_modifier_cl): New function.
21718         (read_import_dir): Detect and report default import processing
21719         failure.
21720
21721 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
21722
21723         Add a pair of -fassume-compiled/-fno-assume-compiled options.
21724         * class.c (is_compiled_class): Return 1 after making sure it
21725         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21726         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21727         * java-tree.h (flag_assume_compiled): Add decl.
21728         * lang.c (lang_f_options): Add the flag.
21729         (flag_assume_compiled): Add decl, default to 0.
21730
21731 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21732
21733         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21734         (is_compiled_class): Likewise.
21735         (layout_class): Likewise.
21736         (layout_class): Detect and lay out classes defined in source code.
21737         (interface_of_p, add_interface_do, may_add_interface): New
21738         function.
21739         (add_interface): Now use add_interface_do.
21740         (add_method_1): New function.
21741         (add_method): Now use add_method_1.
21742         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21743         (complete_start_java_method): New function.
21744         (start_java_mehod): Now call complete_start_java_method.
21745         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21746         (expand_invoke): Likewise and fixed typo.
21747         *gjava.c: (print_super_field): Use new argument to find_class
21748         DO_CLASS_FILE.
21749         (main): Likewise.
21750         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21751         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21752         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21753         IDENTIFIER_NODE.
21754         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21755         (add_method_1, push_class): New prototypes.
21756         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21757         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21758         directory where the class was found.
21759         (find_class): New argument DO_CLASS_FILE. Function find_class
21760         modified accordingly.
21761         *jcf-parse.c: (fix_class_path): New function.
21762         (load_class): Use new VERBOSE argument. load_class now finds and
21763         loads/parses .class/.java files. Save read_state of current_jcf
21764         if necessary.
21765         (java_parser_abort_on_error): New macro.
21766         (jcf_parse_source, parse_source_file): New function.
21767         (jcf_parse): Fixed typo.
21768         (yyparse): Call parse_source_file () only.
21769         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21770         writing the real class name back in the zip directory entry.
21771         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21772         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21773         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21774         (find_class): Prototype fixed.
21775         *lex.c: Added 1998 time stamp.
21776         Removed all static global variables, moved into the parser
21777         context data structure.. Now include unistd.h if SEEK_SET not
21778         defined.
21779         (java_init_lex): Rewritten.
21780         (java_sneak_unicode): Modified current unicode access in current line.
21781         (java_unget_unicode): Likewise.
21782         (java_allocate_new_line): New allocation management.
21783         (java_read_char): Modified access and storage of unget_utf8_value.
21784         New way of processing current unicode.
21785         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21786         (java_get_unicode): Now use the parser context.
21787         (java_lineterminator): Likewise.
21788         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21789         of the reentrant parser implementation. Function now use the
21790         parser context data structure and java_lval. Fixed production of
21791         the float and double constant "out of range" error message. Fixed
21792         obstack use. Return integer value when hitting a modifier. Now
21793         return type for TRUE, FALSE and other predefined types. Return
21794         identifier as a TREE_LIST list containing the current line context
21795         as the TREE_VALUE sub-node.
21796         (java_unicode_2_utf8): Fixed typo in declaration.
21797         (java_lex_error): Now use the parser context data structure.
21798         *lex.h: Added 1998 time stamp.
21799         (struct java_line): New fields ref_count and next.
21800         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21801         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21802         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21803         *parse.h: Added 1998 time stamp.
21804         (java_parse_source_file): Renamed from parse_source_file.
21805         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21806         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21807         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21808         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21809         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21810         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21811         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21812         (struct parser_ctxt): New data structure to keep the parser context.
21813         *parse.y: Added 1998 time stamp, got rid of static global variables.
21814         (java_error_count, ctxp): New global variables.
21815         (%union): New value field.
21816         (numeric_type, integral_type): Rules removed.
21817         (primitive_type): Rule defined to handle integral, float, double and
21818         boolean types.
21819         (qualified_name, package_declaration,
21820         single_type_import_declaration, type_import_on_demand_declaration,
21821         modifiers, class_declaration, super, interfaces,
21822         interface_type_list, class_body, field_declaration,
21823         field_declaration, variable_declarators, variable_declarator,
21824         variable_declarator_id, method_declaration, method_header,
21825         formal_parameter_list, formal_parameter, method_body, block,
21826         static, interface_declaration, extends_interfaces,
21827         abstract_method_declaration, local_variable_declarators): Rules now
21828         define actions.
21829         (force_error, do_warning): New global statics.
21830         (push_parser_context, parser_context_save_global,
21831         parser_context_restore_global, pop_parser_context): New functions.
21832         (yyerror): Now uses the global parser context. Fixed use of obstack.
21833         (parse_error, parse_error_context, parse_warning_context,
21834         java_accstring_lookup, redefinition_error, check_modifiers,
21835         parser_add_interface, create_interface, create_class, find_field,
21836         duplicate_declaration_error, register_fields, method_header,
21837         check_modifiers_consistency, check_abstract_method_header,
21838         method_declarator, parser_qualified_classname,
21839         parser_check_super_interface, parser_check_super,
21840         parser_chain_incomplete_item, java_check_circular_reference,
21841         layout_class_from_source, java_complete_class,
21842         complete_method_decl, resolve_class, complete_class_report_errors,
21843         java_check_final, check_method_redefinition,
21844         java_check_regular_methods, java_check_abstract_methods,
21845         java_check_methods, lookup_java_interface_method2,
21846         lookup_java_method2, lookup_cl, find_name_in_single_imports,
21847         process_imports, find_in_imports, read_import_entry,
21848         read_import_dir, find_in_imports_on_demand,
21849         check_pkg_class_access, not_builtin_p, declare_local_variables,
21850         source_start_java_method, java_generate_parsed_class): New
21851         functions.
21852         *typeck.c: (signature_include_return): New global variable.
21853         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21854         to add the function returned type in the signature.
21855
21856 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
21857
21858         * jcf-io.c (open_in_zip): Use strncmp and LEN.
21859
21860 1998-01-29  Dave Brolley  <brolley@cygnus.com>
21861
21862         * Make-lang.in (java.info): Added.
21863         (java.install-info): Added
21864
21865 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
21866
21867         * Makefile.in (clean): Also remove java/parse.c.
21868
21869 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
21870
21871         Add a pair of -fbounds-check/-fno-bounds-check options.
21872         * lang.c (lang_decode_option): Add code to grok arguments.
21873         (flag_bounds_check): Add decl.
21874         (lang_f_options): New array w/ the option in it.
21875         * java-tree.h (flag_bounds_check): Add decl.
21876         * lang-options.h: New file.
21877         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21878         of a static macro value.
21879         (JAVA_ARRAY_EXCEPTION): Delete macro.
21880
21881 1998-01-23  Per Bothner  <bothner@cygnus.com>
21882
21883         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
21884         * expr.c (build_anewarray):  Add missing promote_type.
21885
21886 1998-01-22  Per Bothner  <bothner@cygnus.com>
21887
21888         Add array types with known length to optimize bounds checking.
21889         * typeck.c (build_java_array_type):  Take length parameter.
21890         (java_array_type_length, build_prim_array_type):  New functions.
21891         * java-tree.h:  Update for new functions.
21892         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21893         * class.c:  Use build_prim_array_type.
21894         * expr.c (can_widen_reference_to):  Handle known-length array types.
21895         (verify_jvm_instructions):  Keep track of integer push instructions
21896         followed by newarray/anewarray, so we can build known-length arrays.
21897         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
21898         (java_array_data_offset):  New function.
21899         (build_java_array_length_access):  New function.  Optimize if constant.
21900         (build_java_arrayaccess):  Constant fold bounds check.
21901         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
21902         (build_newarray, build_anewarray):  New functions.
21903         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
21904         * verify.c (merge_types):  Handle known-lengh array types.
21905
21906 1998-01-19  Per Bothner  <bothner@cygnus.com>
21907
21908         * expr.c (expand_byte_code):  Fix performace bug, which caused
21909         searching linenumber_table to be linear rather than constant.
21910
21911 1997-12-12  Per Bothner  <bothner@cygnus.com>
21912
21913         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
21914
21915         * decl.c, java-tree.h (soft_fmod_node):  New global.
21916         * decl.c (init_decl_processing):  Define __builtin_fmod.
21917         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
21918         using __builtin_fmod.
21919
21920 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21921
21922         * keyword.h: New file, output of keyword.gperf as processed by
21923         gperf.
21924         * lex.c (java_lex_init): Initialize java_error_flag.
21925         * parse.c (YYERROR_NOW): Uses java_error_flag.
21926         * parse.y: New static java_error_flag. Useless definition of
21927         buffer_error gone.
21928         * parse.y (java_error): Portable error recovery using
21929         java_error_flag (not yet completely tuned).
21930
21931 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
21932
21933         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21934
21935 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21936
21937         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21938         (parse.c, lex.c, keyword.h): New rules for Java source code
21939         front-end.
21940         * parse.c: Renamed into jcf-parse.c.
21941         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21942         * keyword.gperf: New file, Java keywords.
21943         * parse.y: New file, Java language grammar.
21944         * parse.h: New file, Java language grammar definitions.
21945         * lex.c: New file, Java language lexer.
21946         * lex.h: New file, Java language lexer definitions.
21947
21948 1997-12-03  Per Bothner  <bothner@cygnus.com>
21949
21950         * decl.c (clinit_identifier_node), java-tree.h:  New global.
21951         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
21952         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
21953         * expr.c (expand_java_field_op):  Check for invalid assignment
21954         to final field.
21955
21956         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
21957
21958 1997-10-27  Per Bothner  <bothner@cygnus.com>
21959
21960         * verify.c (verify_jvm_instructions):  When processing a handler,
21961         attempt to set the current_subr to the right value.
21962         (More complicated code combines Sep 17 and Oct 22 versions.)
21963
21964 1997-10-24  Per Bothner  <bothner@cygnus.com>
21965
21966         * class.c (push_class):  Figure out (guess) name of source file.
21967         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
21968         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
21969         (parse_class_file):  Change return type from int to void.
21970         Call debug_start_source_file/debug_end_source_file.
21971
21972         * expr.c (build_java_binop):  Fix masking 2nd operand.
21973         * decl.c (init_decl_processing):  Set sizetype first.
21974
21975 1997-10-22  Per Bothner  <bothner@cygnus.com>
21976
21977         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
21978         (Revert Sep 17 change.)
21979
21980 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21981
21982         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21983         .class extension in their name and fix thing so we don't process
21984         them parse_zip_file_entries().
21985         (parse_zip_file_entries): Cleaned unused local variables.
21986
21987 1997-10-20  Per Bothner  <bothner@cygnus.com>
21988
21989         * expr.c (can_widen_reference_to):  Allows equal array element types.
21990         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
21991         * jcf-dump.c (RET):  Get (and print) index.
21992
21993         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21994         Promote element type to POINTER_TYPE.
21995
21996 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21997
21998         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21999         find_in_current_zip, jcf_figure_file_type): Moved from
22000         jcf-reader.c to parse.c.
22001         * zextract.c: (read_zip_archive): takes file_comment_length possible
22002         field into account.
22003
22004 1997-10-20  Per Bothner  <bothner@cygnus.com>
22005
22006         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
22007
22008         * verify.c (merge_types):  Handle array types even better ...
22009
22010 1997-10-17  Per Bothner  <bothner@cygnus.com>
22011
22012         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
22013
22014         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
22015         * class.c (make_class_data):  Don't build fields_decl if no fields.
22016         When building fields_decl, skip if DECL_ARTIFICIAL.
22017
22018         * expr.c (java_stack_swap):  Update stack_type_map.
22019         * verify.c (merge_types):  Handle array types better.
22020
22021 1997-10-15  Per Bothner  <bothner@cygnus.com>
22022
22023         * class.c (add_field):  Don't promote short integral fields to
22024         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22025         * expr.c (push_value):  Promote and convert short integral values.
22026
22027         * decl.c, java-tree.h (integer_two_node):  New constant node.
22028         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
22029
22030 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22031
22032         * class.c (append_gpp_mangled_type): Use function argument
22033         unpromoted type to generate mangled name.
22034
22035 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22036
22037         * constants.c (build_constant_data_ref): Now uses current_class
22038         instead of main_class.
22039         (build_constants_constructor): Now uses current_class instead of
22040         main_class.
22041         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22042         of the global variable SeepZipFiles done here.
22043         * zextract.c (read_zip_archive): extra_field optional field taken
22044         into account while computing the position of the class file in the
22045         archive.
22046         * verify.c (verify_jvm_instructions): Use current_jcf to search
22047         the constant pool.
22048         * parse.c (load_class): First search for the class to load in the
22049         current zip file. Saves current_jcf (restored before returning
22050         from that function). Don't call JCF_FINISH in the class was found
22051         in the current ZIP file.
22052         (jcf_parse): If the class was found in the current ZIP file, save
22053         its tree_constant_pool (for later reuse).
22054         (parse_class_file): New function. Process each method defined in
22055         the current class and record the class as to be later registered.
22056         (yyparse): Rewritten. Figure the type of the current file and switch
22057         accordingly.
22058         * lang.c: New global variable current_jcf.
22059         (lang_init): Removed compiling_from_source test (done later, in
22060         yyparse). Removed call the jcf_parse ().
22061         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22062         (typedef struct JCF): New fields seen_in_zip (to mark a class found
22063         in the current ZIP file) and zip_offset (offset to the class data in
22064         the current zip file).
22065         * jcf-reader.c: zipfile.h included.
22066         localToFile: New ZipFileCache static global variable
22067         (parse_zip_file_entries): New function. Browse the current ZIP
22068         file directory and process each class found.
22069         (process_zip_dir): New function. Register each class found in the
22070         ZIP file directory. The class aren't parsed but a valid JCF is
22071         link to each of them.
22072         (find_in_current_zip): New function. Search for a class in the
22073         current ZIP file directory. If found, prepare the class so that it
22074         can be loaded.
22075         (jcf_figure_file_type): New function. Examine the file structure
22076         to figure a class file, a ZIP file. If none of these categories are
22077         matched, a source file is assumed.
22078         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22079         SeenZipFile: New global variable.
22080         (open_in_zip): Use zipmember's length to accelerate the search for
22081         a member. If zipmember was NULL and zip file successfully read,
22082         return 0.
22083         * java-tree.h: New global variable current_jcf declared.  Added
22084         declaration for current_constant_pool_tags, current_constant_pool_data,
22085         current_constant_pool_length, current_constant_pool_data_ref.
22086         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22087         store the JCF of classes seen in a zip file) and tree *constant_pool
22088         (to save a loaded class constant pool). current_class declared here.
22089         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22090         retrieve method_ref_constant.
22091         (PUSHC): java_push_constant_from_pool now uses current_jcf.
22092         (OBJECT): get_class_constant now uses current_jcf.
22093         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22094         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22095         (expand_invoke): Now uses current_class instead of main_class
22096         (build_class_init): Now uses current_class instead of main_class
22097         * class.c: New static global variable registered_class.
22098         (register_class): New function.
22099         (emit_register_class): Modified to use registered_class instead of
22100         main_class
22101         (is_compiled_class): Now take into account class seen in the archive.
22102
22103 1997-10-06  Per Bothner  <bothner@cygnus.com>
22104
22105         * except.h:  Renamed to: java-except.h.
22106         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
22107         * except.c:  Add semi-working (commented out) implementation.
22108
22109         * expr.c (expand_iinc):  Add needed flush_quick_stack.
22110         * parse.c (set_source_filename):  New function.
22111         (give_name_to_class):  Set input_filename from package.classname.java.
22112
22113         * jcf-io.c (find_class):  Don't look first in ".".
22114
22115 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22116
22117         * zextract.c (read_zip_archive): Now takes into account the
22118         extra_field field.
22119         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22120
22121 1997-09-20  Per Bothner  <bothner@cygnus.com>
22122
22123         * constants.c, java-tree.h (build_internal_class_name):  New function.
22124         (alloc_class_constant):  Re-implement using build_internal_class_name.
22125         * class.c (make_class_data):  Likewise.
22126         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
22127
22128 1997-09-17  Per Bothner  <bothner@cygnus.com>
22129
22130         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
22131         to NULL before pushing an exception handler target.
22132
22133         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
22134         (java_stack_swap, java_stack_dup):  Re-write to be safe from
22135         clobbering registers.
22136         (build_class_init):  New function.
22137
22138 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22139
22140         * typeck.c (build_java_array_type): Temporary use
22141         permanent_obstack to create the array 'length' field.
22142         * expr.c (lookup_label): Temporay use permanent_obstack to create
22143         label if not found.
22144         * class.c (push_super_field): Tempory use permanent_obstack.
22145
22146 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22147
22148         * typeck.c (type_for_mode): Now handles double_type_node and
22149         float_type_node.
22150         * verify.c (verify_jvm_instructions): The instruction following
22151         the wide bytecode is checked. OPCODE_ret added to the list of
22152         wide.
22153
22154 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22155
22156         * class.c (make_class): Temporary use permanent_obstack. Set the
22157         class CLASS_P field to 1.
22158         (push_class): Temporary use permanent_obstack.
22159         (set_super_info): Temporary use permanent_obstack.
22160         (add_method): Temporary use permanent_obstack, set
22161         METHOD_TRANSIENT().
22162         (add_field): Temporary use permanent_obstack. Sets
22163         FIELD_VOLATILE() and FIELD_TRANSIENT().
22164         (build_class_ref): Temporary use permanent_obstack if the class
22165         isn't compiled.
22166         (build_static_field_ref): Temporary use permanent_obstack when
22167         creating field's rtl.
22168         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22169         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22170         and fields. Function finalized, as far as flag handling.
22171         (push_class_static_dummy_field): Temporary use permanent_obstack.
22172         (emit_register_class): Force generation of class registration at
22173         -O3 or deeper.
22174         * decl.c (end_java_method): Call permanent_allocation() before
22175         returning.
22176         * expr.c (can_widen_reference_to): Added comment to interface
22177         handling, fixed typo.
22178         (lookup_field): Now uses CLASS_P() to correct FIXME
22179         (expand_invoke): Verification on public && !static &&
22180         !abstract moved into soft_lookupinterfacemethod (kaffe).
22181         Use Object class dtable if objectref is an array when expanding
22182         invokeinterface.
22183         (java_push_constant_from_pool): Temporary use permanent_obstack
22184         for CONSTANT_string
22185         * parse.c (get_ref_constant): Temporary use permanent_obstack to
22186         create constant references.
22187         (get_constant): Temporary use permanent_obstack to create constant.
22188         (load_class): Temporary use permanent_obstack to load class.
22189         (jcf_parse): Temporary use permanent_obstack to perform class
22190         layout.
22191         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22192         (build_java_signature): Temporary use permanent_obstack.
22193         * verify.c: (verify_jvm_instruction): removed unnecessary verification
22194         on ACC_SUPER flag.
22195         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22196         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22197         (CLASS_P): Defined
22198
22199 1997-09-11  Per Bothner  <bothner@cygnus.com>
22200
22201         * class.c (append_gpp_mangled_type):  Fix typo.
22202         (emit_register_class):  Use main_class to get class object, rather
22203         than looking for no-longer-existing static decl starting with _CL.
22204         * typeck.c (parse_signature_type):  Promote array element type
22205         if it is a RECORD_TYPE.
22206
22207 1997-09-10  Per Bothner  <bothner@cygnus.com>
22208
22209         * class.c (push_class_static_dummy_field):  New function.
22210         (mangle_static_field):  New. Do G++-style mangling of static fields.
22211         (layout_class):  Mandle static fields here, not in add_field.
22212         (build_class_ref):  The class object is now a dummy static field.
22213         * decl.c (find_local_variable):  Look for best, instead of first match.
22214         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22215         (build_java_athrow):  Don't check here if exception is Throwable.
22216         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22217         (TYPE_USED):  Removed.  No longer used ...
22218         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22219         * verify.c (push_pending_label):  New function.
22220         (push_pending_block):  Renamed to check_pending_block.
22221         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22222         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22223         re-checking possible handlers) after a store (less wasted work).
22224         Check for null handler (finally) before calling add_handler.
22225         Various changes to (finally?) correctly handle try/finally.
22226
22227 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22228
22229         * class.c: Include stdio.h.
22230
22231 1997-09-04  Per Bothner  <bothner@cygnus.com>
22232
22233         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22234         to make sure class is initialized before static/special invoke.
22235
22236         * verify.c (verify_jvm_instructions):  On a store instruction,
22237         call find_local_variable to force pre-allocation of decl and rtx.
22238         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22239
22240 1997-09-03  Per Bothner  <bothner@cygnus.com>
22241
22242         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22243         (make_field_value): Call build_java_signature when needed.
22244         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22245         * expr.c (build_java_athrow):  Don't push_value of exception.
22246         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22247         match specification of [fd]cmp[lg] for NaNs.
22248         (expand_byte_code):  Add support for exception handler ranges.
22249         * except.c:  Add skeleton for EH code-generation.
22250         * verify.c (merge_types):  Treat all promoted integral types as equal.
22251         * constants.c (build_constants_constructor):  To force creation of
22252         current_constant_pool_data_ref, call build_constant_data_ref.
22253
22254         * javaop.def (lload):  Fix typo.
22255         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22256
22257 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22258
22259         * parse.c: Don't include function.h.
22260
22261 1997-08-27  Per Bothner  <bothner@cygnus.com>
22262
22263         * except.[ch]:  New files.
22264         * Makefile.in (JAVA_OBJS):  Add except.o
22265         * expr.c:  Temporary warning about unimplemented exceptions.
22266         * verify.c:  Verify exception handlers.
22267
22268         * jcf-dump.c (disassemble_method):  Print exception table.
22269
22270 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22271
22272         * expr.c (verify_jvm_instructions): Started a thorough
22273         verification of invoke* bytecodes.
22274         (expand_byte_code): flush quick stack if PC is the target of a
22275         branch.  and undef RET (conflicting with config/i386/i386.h).
22276         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22277         used.
22278         (expand_invoke): Now handles invokeinterface and do more
22279         verification according to the bytecode.
22280         (lookup_field): Don't try to load the class if processing
22281         dtable_type.
22282         (can_widen_reference_to): Now handles interfaces.
22283         * decl.c (init_decl_processing): New global variable
22284         soft_lookupinterfacemethod_node, declared in java-tree.h.
22285         Call set_super_info on string_type_node.
22286         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22287         defined.
22288         * class.c (set_super_info): Fills the CLASS_* flags according to
22289         access_flags.
22290         (get_access_flags_from_decl): Handles all class flags.
22291
22292 1997-08-26  Per Bothner  <bothner@cygnus.com>
22293
22294         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22295         * parse.c (yyparse):  Check for abstract method, and missing code.
22296         * expr.c (expand_byte_code):  Change interface.
22297         * lang.c (put_decl_node):  Print promoted types prettier.
22298         * verify.c (verify_jvm_instruction):  Change interface.
22299         Partial support for scanning exception table.
22300         For load instructions, handle promoted integral types.
22301
22302 1997-08-21  Per Bothner  <bothner@cygnus.com>
22303
22304         * verify.c:  New file, with contents moved from expr.c.
22305         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22306         * typeck.c (is_array_type_p):  Moved here from expr.c.
22307         * java-tree.h:  Add some now-needed function declarations.
22308         * Makefile.in (JAVA_OBJS): Added verify.o.
22309
22310 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22311
22312         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22313         METHOD_ABSTRACT flag.
22314
22315         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22316         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22317         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22318
22319         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22320         variables.
22321         (start_java_method): Hook for SYNCHRONIZED methods.
22322
22323         * expr.c (build_java_jsr, build_java_ret): New functions
22324         (JSR,PRE): New macros
22325         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22326         (verify_jvm_instructions): tableswitch, lookupswitch,
22327         monitorenter, monitorexit, goto_w: verified.
22328         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22329         (build_java_monitor): New function.
22330         (MONITOR_OPERATION): Modified to call build_java_monitor()
22331         (verify_jvm_instructions): Started a thorough verification of
22332         invoke* bytecodes.
22333
22334 1997-08-19  Per Bothner  <bothner@cygnus.com>
22335
22336         Support verification of jsr/ret subroutines (used for try/finally).
22337         * decl.c (return_address_type_node):  New type node.
22338         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22339         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22340         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22341         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22342         TYPE_USED):  New macros for special types in type_map.
22343
22344         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22345         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22346         BCODE_JUMP_TARGET.
22347         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22348
22349         * expr.c (can_widen_reference_to):  New function.
22350         (pop_type):  Use it.
22351         (merge_type_state):  Support handling start of subroutine.
22352         (push_pending_block):  Return char* error message, instead of calling
22353         fatal on an error.  Also handle subroutines.
22354         (verify_jvm_instructions):  Handle errors from push_poending_block.
22355         Support jsr and ret instructions.
22356
22357 1997-08-19  Per Bothner  <bothner@cygnus.com>
22358
22359         * jcf-io.c (find_classfile):  Fix thinko.
22360         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22361
22362 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22363
22364         * Makefile.in (BISON): Remove.
22365
22366 1997-08-07  Per Bothner  <bothner@cygnus.com>
22367
22368         * Makefile.in:  Convert to autoconf.
22369         * config-lang.in (outputs):  Added java/Makefile.
22370
22371         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22372         Rename cc1java to jc1.
22373
22374         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22375         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22376
22377         * class.c (class_depth):  Do load_class if needed.
22378
22379         Mostly better verification.
22380         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22381         (init_decl_processing):  Change return type of soft_checkcast.
22382         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22383         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22384         lang_print_error):  New functions.
22385         (lang_init):  Set global hook print_error_function to lang_print_error.
22386         * expr.c:  In the type_map ptr_type_node is only used for null now.
22387         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22388         (merge_types):  Dererence pointer to record types before comparing.
22389         (decode_newarray_type, merge_types):  On error just return NULL.
22390         (build_java_binop):  Add preliminary implementation (with warning)
22391         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22392         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22393         (expand_compare, expand_java_goto, expand_java_call):  Don't
22394         push_pending_block, since that only makes sense when verifying.
22395         (merge_type_state):  Different return codes.
22396         (push_pending_block):  A block may need to be verified more than once.
22397         (expand_byte_code):  Warn about unused code at code generation time.
22398         (verify_jvm_instruction):  Changed logic, since code may need to be
22399         re-verified if type-state has changed.  Also, better error handling.
22400         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22401         Improve newarray, anewarray, ?aload, athrow,
22402         * java-tree.h (LABEL_CHANGED):  New macro.
22403
22404 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22405
22406         * decl.c (soft_athrow_node): New global variable initialized.
22407         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22408         * typeck.c (convert): Added support for REAL_TYPE.
22409         (convert_to_char): New function.
22410         (convert): Handle CHAR_TYPE.
22411         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22412         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22413         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22414         promoted type.
22415         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22416         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22417         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22418         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22419         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22420         to Use The Right Things.
22421         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22422         compatible with INT. BOOLEAN is made equivalent to BYTE.
22423         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22424         OPCODE_ifnonnull): Now supported.
22425         (build_java_athrow): New function.
22426
22427 1997-08-04  Per Bothner  <bothner@cygnus.com>
22428
22429         Rename method name <init> to match G++ (and fix mangling).
22430         * class.c (layout_class):  Replace method name of <init> by class name.
22431         (make_method_value):  Do inverse renaming of constructor from <init>.
22432         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22433         * typeck.c (lookup_java_constructor):  New function.
22434         * expr.c (expand_invoke):  If method_name is <init>, call
22435         lookup_java_constructor to find constructor.
22436
22437         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22438
22439 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22440
22441         * parse.c (get_class_constant): Modified to handle array "classes"
22442         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22443         wide type.
22444         (convert): Modified to handle real type.
22445         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22446         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22447         variables declared.
22448         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22449         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22450         global variables initialized.
22451         (find_local_variable): Handles the case of a pointer
22452         (end_java_method): Restore the use of one more scope
22453         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22454         build_java_array_length_access, expand_java_arrayload,
22455         expand_java_arraystore, expand_java_array_length,
22456         expand_java_multianewarray, expand_java_anewarray,
22457         build_java_check_indexed_type, is_array_type_p,
22458         build_java_throw_out_of_bound_exception): New functions.
22459         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22460         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22461         OPCODE_<t>aload): Implemented code for verification.
22462         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22463         ARRAY_NEW_MULTI): Macro defined.
22464         (CONVERT): Modified to invoke convert().
22465         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22466
22467 1997-07-31  Per Bothner  <bothner@cygnus.com>
22468
22469         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22470         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22471         (make_class_data):  Field name needs '/' as package prefix.
22472         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22473
22474 1997-07-25  Per Bothner  <bothner@cygnus.com>
22475
22476         Implement debug information for local variables.
22477         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22478         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22479         DECL_LOCAL_SLOT_CHAIN):  New macros.
22480         (struct lang_decl_var):  New type.
22481         * parse.c (give_name_to_locals):  Move to decl.c.
22482         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22483         (start_java_method):  Re-write parameter handling.
22484         (pending_local_decls):  New global variable.
22485         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22486         (find_local_variable):  Accept pc so we can skips decls not in range.
22487         (struct binding_level):  Add end_pc field.
22488         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22489         (various):  Change so current pc gets passed to find_local_variable.
22490
22491         * decl.c (init_decl_processing):  Re-arrange fields in
22492         class_type_node and and method_type_node to match kaffe 0.9.1.
22493         * class.c (make_method_value, make_class_data):  Update
22494         initializations to match.
22495
22496 1997-07-16  Per Bothner  <bothner@cygnus.com>
22497
22498         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22499         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22500         (push_super_field):  New function.
22501         (make_class_data):  Handle inheritance of class static initializer.
22502         (layout_class):  New name mangling.
22503         * constants.c (build_constant_data_ref):  Init type of data array
22504         to a one-element array.
22505         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22506         * decl.c:  Rename class_type, object_type etc to class_type_node,
22507         object_type_node etc.  Make former inherit from latter.
22508         * expr.c (expand_invoke):  Add cast of function address.
22509         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22510         * parse.c (yyparse):  Don't call layout_class here.
22511         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22512
22513 1997-06-14  Per Bothner  <bothner@cygnus.com>
22514
22515         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22516         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22517         (alloc_class_constant):  New.
22518         * expr.c (expand_invoke):  Make sure method's class is initialized.
22519         * class.c (interits_from_p, emit_register_class):  New functions.
22520         * parse.c (yyparse):  Call emit_register_class.
22521
22522 1997-06-09  Per Bothner  <bothner@cygnus.com>
22523
22524         * constants.c:  New file, to handle constant pool.
22525         * Makefile.in (JAVA_OBJS):  Add constants.o.
22526         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22527         (pushdecl_top_level):  New.
22528         * parse.c (layout_class):  Moved to class.c.
22529         * expr.c (java_push_constant_from_pool):  New function.
22530         * class.c (build_class_ref):  Make work fully
22531         (make_class_data):  Emit super-class, constant pool, interface vector.
22532
22533 1997-06-03  Per Bothner  <bothner@cygnus.com>
22534
22535         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
22536         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
22537         * class.c (class_depth):  New function.
22538         (lookup_named_class):  Replaced by new function lookup_class.
22539         * decl.c (object_type_node, string_type_node):  New.
22540         Remove various types that we no longer need.
22541         * expr.c (verify_jvm_instructions):  New separate verifier pass.
22542         (push_type, pop_type):  New functions for verifier.
22543         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
22544         (expand_byte_code):  Simplify, since we assume already verified.
22545         (expand_invoke):  Now mostly works.
22546         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22547         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
22548         * parse.c:  Wait to allocate class object until we know its name.
22549         (layout_class):  Calculate DECL_VINDEX for each virtual method.
22550         * typeck.c (get_array_type):  Rename to ...
22551         (build_java_array_type):  ... and provide working implementation.
22552         (build_java_signature):  New function - build Java signature of type.
22553         (set_java_signature):  New function - cache signature with type.
22554         (lookup_java_method):  New function.
22555
22556 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
22557
22558         * class.c (ident_subst):  Take extra SUFFIX parameter.
22559         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
22560         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
22561         (build_class_ref):  Actually implement.
22562         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
22563         * decl.c (builtin_function):  New.
22564         (init_decl_processing):  Update for current Kaffe.  Declare some
22565         builtin Kaffe functions.
22566         * expr.c (build_address_of):  New.
22567         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22568         Renamed (from expand_java_new etc), and added working implementations.
22569         (build_field_ref):  Now also handle static fields.
22570         (expand_invoke):  Implement invokestatic, and start implement rest.
22571         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
22572         * javaop.def:  Rename invokevirt -> invokevirtual.
22573         * lang.c (use_handles):  Removed.
22574         * parse.c:  Add support for ConstantValue attribute.
22575         Handle nested loading of a class.  (JPOOL_UTF):  New.
22576
22577 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
22578
22579         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
22580
22581 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
22582
22583         * Make-lang.in (java.install-man):  New empty rule.
22584         * typeck.c (set_local_type):  New function.
22585         * expr.c (STORE_INTERNAL):  Call find_local_variable,
22586         not find_stack_slot.  Call set_local_type.
22587
22588 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
22589
22590         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
22591         and building RECORD_TYPE CONSTRUCTORs.
22592         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22593
22594         * lang.c (use_handles):  Change the default to 0.
22595         * decl.c:  Define and build class_type, field_type, utf8const_type.
22596         * class.c (make_class_data, make_field_value,
22597         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22598         hashUtf8String, strLengthUtf8, mangled_classname:
22599         Functions to build reflective data structures.
22600         * parse.c (yyparse):  Call make_class_data.
22601
22602         * jcf-io.c (open_class, find_classfile):  New functions.
22603         * jcf-dump.c:  Support reading classfile from explicitly-named
22604         class file (without CLASSPATH searching).
22605
22606 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22607
22608         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
22609         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22610         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22611         (get_constant):  Now trivial for CONSTANT_Utf8.
22612
22613         * jcf.h:  Make NEW_CPOOL the default.
22614         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
22615
22616 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22617
22618         New directory.
22619
22620 \f
22621 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22622 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
22623
22624 Copying and distribution of this file, with or without modification,
22625 are permitted in any medium without royalty provided the copyright
22626 notice and this notice are preserved.