OSDN Git Service

* check-init.c: Correct minor typos.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
2
3         * check-init.c: Correct minor typos.
4
5 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6
7         * Make-lang.in, expr.c, java-gimplify.c: Rename
8         tree-simple.[ch] to tree-gimple.[ch].
9
10 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
11
12         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
13
14 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
15
16         Merge from tree-ssa-20020619-branch.  See
17         ChangeLog.tree-ssa for details.
18
19         * Make-lang.in, builtins.c, check-init.c, class.c,
20         constants.c, decl.c, except.c, expr.c, java-except.h,
21         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
22         lang.c, lang.opt, parse.y, resource.c: Merged.
23         * java-gimplify.c: New file.
24
25 2004-05-10  Andrew Haley  <aph@redhat.com>
26
27         * parse.y (create_class): Set TYPE_VFIELD.
28         * decl.c (java_init_decl_processing): Likewise.
29
30         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
31         * class.c (make_method_value): Replace DECL_VINDEX with call to
32         get_method_index().
33         (get_dispatch_vector): Likewise.
34         (layout_class_method): Likewise.
35         Replace set of DECL_VINDEX with call to set_method_index().
36         (set_method_index): New function.
37         (get_method_index): New function.
38         * java-tree.h (set_method_index): New function decl.
39         (get_method_index): New function decl.
40
41 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
42
43         * parse.y (check_pkg_class_access): Add new argument
44         and use it when cl is NULL to call lookup_cl on it.
45         (parser_check_super_interface): Do not call lookup_cl.
46         Pass this_decl to check_pkg_class_access and NULL
47         instead of lookup_cl.
48         (parser_check_super): Update for change in
49         check_pkg_class_access.
50         (do_resolve_class): Likewise.
51         (process_imports): Likewise.
52         (find_in_imports_on_demand): Likewise.
53         (resolve_qualified_expression_name): Likewise.
54
55 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
56
57         Fixes PR java/9685, PR java/15073
58         * parse.y (accessibility_string): New method.
59         (not_accessible_field_error): Use accessibility_string()
60         instead of java_accstring_lookup().
61         (resolve_qualified_expression_name): Check with
62         check_pkg_class_access() before allowing access using
63         qualified names.
64         Fix comment typo.
65         Use check_pkg_class_access() instead of not_accessible_p()
66         for unqualified types.
67         (not_accessible_p): Use DECL_CONTEXT (member) instead of 
68         REFERENCE for package-private access checking.
69         (patch_method_invocation): Use accessibility_string() instead
70         of java_accstring_lookup().
71
72 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
73
74         Fixes PR java/15133
75         * gjavah.c (struct method_name): Add member is_native.
76         (overloaded_jni_method_exists_p): Match candidate method only if
77         it is native.
78         (print_method_info): Initialise is_native flag from the method's
79         access flags.
80
81 2004-04-30  Roger Sayle  <roger@eyesopen.com>
82
83         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
84         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
85
86 2004-04-22  Roger Sayle  <roger@eyesopen.com>
87
88         * resource.c (write_resource_constructor): Guard call to possibly
89         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
90
91 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
92
93         * class.c (make_class_data): Add new field aux_info.
94         * decl.c (java_init_decl_processing): Push type and decl for 
95         `aux_info'.
96
97 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
98
99         * expr.c (expand_java_NEW): Don't use size argument for 
100         _Jv_AllocObject calls.
101         * parse.y (patch_invoke): Likewise.
102
103 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
104
105         * expr.c (build_invokeinterface): Remove unused variables to
106         fix warnings.
107
108 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
109
110         * class.c (get_interface_method_index): New function. Return dispatch 
111         index for interface method.
112         (make_method_value): For interface methods, set index field to
113         iface dispatch index, not DECL_VINDEX.
114         * expr.c (build_invokeinterface): Use get_interface_method_index.
115
116 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
117
118         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
119
120 2004-03-31  Andrew Haley  <aph@redhat.com>
121
122         PR java/14104
123         * jcf-io.c (opendir_in_zip): Tidy up error handling.
124
125 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
126
127         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
128         form of GTY markers.
129
130 2004-03-25  Marcus Meissner  <meissner@suse.de>
131
132         PR java/14689:
133         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
134
135 2004-03-23  Tom Tromey  <tromey@redhat.com>
136
137         PR java/14315:
138         * jcf-write.c (make_class_file_name): Don't report if mkdir
139         failed with EEXIST.
140
141 2004-03-23  Tom Tromey  <tromey@redhat.com>
142
143         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
144
145 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
146
147         * class.c, gjavah.c, lang.c: Fix comment typos.
148         * gcj.texi: Fix typos.
149
150 2004-03-19  Per Bothner  <per@bothner.com>
151
152         * gcj.texi (Code Generation):  Document new flags and assert defaults.
153
154         * class.c (assume_compiled_node_struct):  Rename type to
155         class_flag_node_struct, as it is now also used for enable_assertions.
156         Rename assume_compiled_node typedef.  Rename excludep field to value.
157         (find_assume_compiled_node):  Rename function to find_class_flag_node.
158         Minor optimization - avoid needless strlen.
159         (add_assume_compiled):  Some tweaking and optimization.
160         Rename and generalize to add_class_flag takem an extra parameter.
161         (add_assume_compled):  New just calls add_class_flag.
162         (add_enable_assert, enable_assertions):  New functions.
163         (enable_assert_tree):  New static.
164         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
165         * lang.opt (fenable-assertions, fenable-assertions=,
166         fdisable-assertions, fdisable-assertions=):  New options.
167         * lang.c (java_handle_option):  Handle new options.
168         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
169         class in an interface - create helper class nested in outer interface.
170         (build_assertion):  Short-circuit if enable_assertions is false.
171
172 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
173
174         * java-tree.h: Changes throughout to add checking to macros
175         and numerous whitespace changes.
176         (VAR_OR_FIELD_CHECK): New macro.
177         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
178         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
179
180 2004-03-16  Per Bothner  <per@bothner.com>
181
182         * jcf-jump.c (options):  New --print-constants option.
183         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
184
185         * jcf-dump.c (flag_print_constant_pool):  Default to off.
186         (print_constant_terse_with_index):  New helper function.
187         (various places):  Check flag_print_constant_pool where missing.
188         (main):  If verbose set flag_print_constant_pool.
189         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
190
191 2004-03-15  Andrew Haley  <aph@redhat.com>
192
193         PR java/14581
194         * parse.y (java_complete_lhs): Check that final variable has an
195         initializer.
196
197 2004-03-12  Andrew Haley  <aph@redhat.com>
198
199         PR java/14551
200         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
201         conversion.
202
203 2004-02-29  Roger Sayle  <roger@eyesopen.com>
204
205         * jcf-parse.c (java_parse_file): Handle the case that input_filename
206         is NULL.
207
208 2004-02-27  Per Bothner  <per@bothner.com>
209
210         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
211         suggestion:  Use build_incomplete_class_ref.
212         This fixes PR java/13508, java/11714.
213
214 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
215
216         * java/parse.h: Update copyright.
217
218 2004-02-26  Andrew Haley  <aph@redhat.com>
219
220         PR java/14231:
221         * parse.y (check_interface_throws_clauses): Check for
222         !METHOD_INVISIBLE (iface_method).
223         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
224         well as CLASS_ABSTRACT.
225
226 2004-02-25  Per Bothner  <per@bothner.com>
227
228         * parse.y (build_assertion):  If we're in an inner class, create the
229         class$ helper routine in the outer class.
230
231 2004-02-19  Richard Henderson  <rth@redhat.com>
232
233         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
234
235 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
236
237         * Make-lang.in (java.install-man): Add extra dependencies.
238
239 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
240
241         * Make-lang.in: Install man pages under the same names
242         (possibly transformed) as the program they document.
243
244 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
245
246         * gjavah.c: Include "intl.h".
247         (error): New function.
248         (main): Call gcc_init_libintl.
249         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
250         print_stub_or_jni, process_file, main): Use error rather than
251         fprintf.
252         (print_method_info, usage, help, version, main): Mark strings for
253         translation with _.  Avoid splitting up sentences.  Send
254         information messages to stdout.
255         * jcf-dump.c: Include "intl.h".
256         (main): Call gcc_init_libintl.
257         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
258         Mark error, usage and version messages for translation with _.
259         Avoid splitting up sentences.
260         * jv-scan.c: Include "intl.h".
261         (fatal_error, warning): Change parameter s to msgid.  Translate
262         messages.
263         (main): Call gcc_init_libintl.
264         (usage, help, version): Mark error, usage and version messages for
265         translation with _.  Avoid splitting up sentences.
266         * jvgenmain.c: Include "intl.h".
267         (main): Call gcc_init_libintl.
268         (usage, main): Mark error messages for translation with _.
269         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
270         JVGENMAIN_OBJS): Add intl.o.
271         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
272         java/jvgenmain.o): Update dependencies.
273
274 2004-02-08  Per Bothner  <per@bothner.com>
275
276         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
277         class don't use not_accessible_field_error, which can get confused.
278
279 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
280
281         Make-lang.in (po-generated):  Delete.
282
283 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
284
285         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
286         Depend on target.h.
287         * decl.c: Include target.h.
288         (start_java_method): Replace PROMOTE_PROTOTYPES with
289         targetm.calls.promote_prototypes.
290         * expr.c: Include target.h.
291         (pop_arguments): Replace PROMOTE_PROTOTYPES with
292         targetm.calls.promote_prototypes.
293         * parse.y: Include target.h.
294         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
295         with targetm.calls.promote_prototypes.
296
297 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
298
299         * typeck.c: Update copyright.
300
301 2004-02-02  Tom Tromey  <tromey@redhat.com>
302
303         * decl.c (java_init_decl_processing): Remove duplicate
304         gnu/gcj/RawData.
305
306 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
307
308         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
309
310 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
311
312         * expr.c (build_field_ref): Move variable
313         definition up.
314
315 2004-01-28  Andrew Haley  <aph@redhat.com>
316
317         * expr.c (build_field_ref): Widen field offset.
318
319 2004-01-27  Andrew Haley  <aph@redhat.com>
320
321         java/13273
322         * parse.y (check_interface_throws_clauses): Make sure class_decl
323         has been loaded.
324
325 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
326
327         PR java/13733
328         * parse.y (patch_assignment): Don't modify lhs_type for
329         reference assignments.
330
331 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
332
333         * Make-lang.in: Replace $(docdir) with doc.
334         (java.info, java.srcinfo, java.man, java.srcman): New rules.
335         (java.install-man): Revamp rule.
336
337 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
338
339         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
340         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
341         instead of deferred backquote.
342
343 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
344
345         * typeck.c (find_method_in_interfaces): Move variable
346         definition up.
347
348 2004-01-16  Andrew Haley  <aph@redhat.com>
349
350         PR java/13273:
351         * typeck.c (shallow_find_method): New.
352         (find_method_in_superclasses): New.
353         (find_method_in_interfaces): New.
354         (lookup_do): Rewrite.
355         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
356
357         * jcf-parse.c (read_class): Save and restore output_class.
358         * decl.c (java_expand_body): Set output_class from fndecl.
359
360 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
361
362         * class.c (gen_indirect_dispatch_tables): Fix string length
363         calculations.
364
365 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
366
367         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
368         (java.srcextra): Copy above back to source directory if requested.
369         (po-generated): Delete reference to $(parsedir).
370         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
371         Use implicit rule.
372
373 2004-01-14  Jan Hubicka  <jh@suse.cz>
374
375         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
376         estimation.
377
378 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
379
380         * java-tree.h (java_expand_expr): Change prototype.
381         * expr.c (java_expand_expr): Add alt_rtl parameter.
382
383 2004-01-09  Andrew Haley  <aph@redhat.com>
384
385         PR java/12755:
386         * parse.y (java_fix_constructors):  Set output_class.
387         (java_reorder_fields): Likewise.
388         (java_layout_classes): Likewise.
389         (java_expand_classes): Generate indirect dispatch tables.
390         (java_expand_classes): Set output_class.
391         (java_finish_classes): Likewise.
392         * lang.c (java_init): Turn on always_initialize_class_p if we're
393         using indirect dis[atch.
394         (java_decl_ok_for_sibcall): Use output_class, not current_class.
395         (java_get_callee_fndecl): Use class local atable.
396         * jcf-parse.c
397         (always_initialize_class_p): Decl moved to java-tree.h.
398         (HANDLE_CLASS_INFO): Set output_class.
399         (read_class): Likewise.
400         (parse_class_file): Call gen_indirect_dispatch_tables.
401         (parse_zip_file_entries): Set output_class.
402         (java_parse_file): Set output_class.  Don't emit symbol tables.
403         * java-tree.h (output_class): New.
404         Remove global declarations for otable, atable, and ctable.
405         (always_initialize_class_p): moved here from decl.c.
406         (DECL_OWNER): New.
407         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
408         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
409         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
410         (struct lang_type): Add otable_methods, otable_decl,
411         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
412         ctable_decl, catch_classes, type_to_runtime_map.
413         * expr.c (build_field_ref): Make otable, atable, and ctable class
414         local rather than global.
415         (build_known_method_ref): Likewise.
416         (build_invokeinterface): Likewise.
417         (java_expand_expr): Pass runtime type (rather than actual type) to
418         expand_start_catch.
419         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
420         this class.  Look up each class in that map to delete duplicates.
421         (expand_end_java_handler): Pass runtime type (rather than actual
422         type) to expand_start_catch.
423         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
424         (do_nothing): New.
425         (java_init_decl_processing): Rearrange things.  Remove global
426         declarations of otable, atable, and ctable.
427         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
428         (java_expand_body): Set output_class.
429         * constants.c (build_constant_data_ref): Use output_class, not
430         current_class.
431         (alloc_name_constant): Likewise.
432         * class.c (gen_indirect_dispatch_tables): New.
433         (build_class_ref): Generate hard reference to superclass, even if
434         using indirect dispatch.
435         (build_static_field_ref): Use class local atable.
436         (make_class_data): Generate hard reference to superclass, even if
437         using indirect dispatch.
438         Generate symbolic references to interfaces when using indirect
439         dispatch.
440         (make_class_data): Emit otable, atable, and ctable.
441         Make otable, atable, and ctable class local rather than global.
442         (emit_catch_table): Make otable, atable, and ctable class local
443         rather than global.
444
445 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
446
447         * parse.y (catch_clause_parameter): Fix typo.
448
449         PR java/13404
450         * parse.y: (catch_clause_parameter): Return early if $3, aka
451         formal_parameter, is null.
452
453 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
454
455         * class.c: Remove uses of "register" specifier in
456         declarations of arguments and local variables.
457         * decl.c: Likewise.
458         * expr.c: Likewise.
459         * gjavah.c: Likewise.
460         * jcf-dump.c: Likewise.
461         * jcf-io.c: Likewise.
462         * jcf-parse.c: Likewise.
463         * jcf-write.c: Likewise.
464         * keyword.h: Likewise.
465         * parse.y: Likewise.
466         * typeck.c: Likewise.
467         * verify.c: Likewise.
468
469 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
470
471         * Make-lang.in (GCJ_CROSS_NAME): Delete.
472         (java.install_common, java.install-man): Adjust for above.
473         (java.uninstall): Likewise.
474
475 2003-12-03  Michael Koch  <konqueror@gmx.de>
476
477         * class.c (make_class_data):
478         Push field value to 'hack_signers' instead of 'signers'.
479         * decl.c (java_init_decl_processing):
480         Push field 'hack_signers' instead of 'signers'.
481
482 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
483
484         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
485         including iconv.h.
486
487 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
488
489         PR java/12374:
490         * parse.y (qualify_ambiguous_name): Remove lots of broken
491         field access processing - there's no need to do that here,
492         because we have resolve_field_access.  Remove
493         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
494         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
495         used.
496
497 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
498
499         Fix PR java/13237
500         * parse.y (java_complete_lhs): Save location prior to patching
501         CALL_EXPR.
502
503 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
504
505         PR java/12548
506         * resource.c (write_resource_constructor): Append
507         "_resource" to constructor identifier name.
508
509 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
510
511         Fix PR java/13183.
512         * constants.c (cpool_for_class): New function.
513         (outgoing_cpool): Remove global variable.
514         (alloc_name_constant): Use cpool_for_class.
515         (build_constants_constructor): Likewise.
516         * decl.c (java_expand_body): Set current_class.
517         * java-tree.h (outgoing_cpool) Remove declaration.
518         (init_outgoing_cpool): Likewise.
519         * jcf-parse.c (init_outgoing_cpool): Remove function.
520         (parse_class_file): Don't call init_outgoing_cpool.
521         * parse.y (java_complete_expand_methods): Don't call
522         init_outgoing_cpool.  Don't save outgoing_cpool.
523         (java_expand_classes): Don't restore outgoing_cpool.
524         (java_finish_classes): Likewise.
525
526 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
527
528         * Make-lang.in: (java.install-common) Add
529         symlink for $(target_noncanonical)-gcjh for
530         native builds.
531
532 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
533
534         * Make-lang.in (java.extraclean): Delete.
535
536 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
537
538         * Make-lang.in (check-java): Add.
539
540 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
541
542         Fix PR java/13024.
543         * except.c (prepare_eh_table_type): Allocate variable-sized
544         buffer `buf' with alloca.
545
546 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
547
548         Fix PR java/12857.
549
550         decl.c (java_init_decl_processing): Don't initialize
551         class_not_found_type_node, no_class_def_found_type_node.
552
553         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
554         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
555         (class_not_found_type_node, no_class_def_found_type_node):
556         Don't define.
557
558         parse.y (build_dot_class_method_invocation): Add this_class
559         argument.  Qualify method invocations to a different class.
560         (create_new_parser_context): Initialize saved_data_ctx to 0.
561         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
562         (build_dot_class_method): Don't load classes.  Register
563         incomplete types.
564         (build_incomplete_class_ref): Special cases for interfaces
565         and inner classes.  Move build_dot_class_method call to here...
566         (patch_incomplete_class_ref): ...from here.  Pass current_class
567         to build_dot_class_method_invocation.
568         (build_assertion): Pass class_type to
569         build_dot_class_method_invocation.
570         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
571
572 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
573
574         Fix PR java/12739.
575         * java-tree.h (BLOCK_EMPTY_P): Define.
576         * parse.y (java_complete_lhs): Check for empty blocks
577         in TRY_FINALLY_EXPR case.
578
579 2003-11-17  Andrew Haley  <aph@redhat.com>
580
581         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
582         (struct lang_decl_var:freed): New variable.
583         * decl.c (poplevel): Mark local vars that have gone out of scope.
584         (push_jvm_slot): Don't use the RTL of a var that has gone out of
585         scope.
586
587 2003-11-16  Jason Merrill  <jason@redhat.com>
588
589         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
590         and TAGS files that include them for each front end.
591
592 2003-11-15  Tom Tromey  <tromey@redhat.com>
593
594         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
595
596 2003-11-12  Jason Merrill  <jason@redhat.com>
597
598         PR optimization/12547
599         * lang.c (java_tree_inlining_walk_subtrees): Just walk
600         BLOCK_EXPR_BODY directly.
601
602 2003-11-12  Andrew Haley  <aph@redhat.com>
603
604         PR java/11045
605         * parse.y (fold_constant_for_init): Check that we really do have a
606         constant.
607
608         PR java/11533
609         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
610         init_test_decls being inlined.
611
612         PR java/12890:
613         * parse.y (do_resolve_class): Check return value from
614         breakdown_qualified().
615
616 2003-11-11  Tom Tromey  <tromey@redhat.com>
617
618         PR java/12915:
619         * parse.y (merge_string_cste): Handle case where we have a
620         pointer that happens to be zero, not null_pointer_node.
621
622 2003-11-10  Tom Tromey  <tromey@redhat.com>
623
624         * jcf-parse.c (classify_zip_file): Correctly compare
625         filename_length against length of manifest file's name.
626
627 2003-11-08  Tom Tromey  <tromey@redhat.com>
628
629         PR java/12894:
630         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
631
632 2003-11-06  Andrew Haley  <aph@redhat.com>
633
634         * expr.c (java_stack_swap): Make sure destination stack slots are
635         of the correct type.
636
637 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
638
639         * Make-lang.in (dvi): Move targets to $(docobjdir).
640         (gcj.dvi): Simplify rule and adjust target.
641         (gcj.info): Simplify rule.
642         (gcj.pod): New intermediate rule.
643         (gcjh.pod): Likewise.
644         (jv-scan.pod): Likewise.
645         (jcf-dump.pod): Likewise.
646         (gij.pod): Likewise.
647         (jv-convert.pod): Likewise.
648         (rmic.pod): Likewise.
649         (rmiregistry.pod): Likewise.
650         (gcj.1): Delete.
651         (gcjh.1): Delete.
652         (jv-scan.1): Delete.
653         (jcf-dump.1): Delete.
654         (gij.1): Delete.
655         (jv-convert.1): Delete.
656         (rmic.1): Delete.
657         (rmiregistry.1): Delete.
658
659 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
660
661         Fixes PR java/12866.
662         * parse.y (resolve_qualified_expression_name): Move test
663         for outer field access methods from here...
664         (check_thrown_exceptions) ...to here.
665
666 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
667
668         * .cvsignore: Delete.
669
670 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
671
672         * verify.c (verify_jvm_instructions): Don't warn about legal
673         eh binding regions generated for example by jdk 1.4.1.
674
675 2003-10-24  David S. Miller  <davem@redhat.com>
676
677         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
678
679 2003-10-22  Andrew Haley  <aph@redhat.com>
680
681         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
682         (java_get_callee_fndecl): New.
683
684         * jcf-parse.c (java_parse_file): Call emit_catch_table().
685
686         * java-tree.h (ctable_decl): New.
687         (catch_classes):  New.
688         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
689
690         * decl.c (java_init_decl_processing): Add catch_class_type.
691         Add ctable_decl.
692         Add catch_classes field.
693
694         * class.c (build_indirect_class_ref): Break out from
695         build_class_ref.
696         (make_field_value): Check flag_indirect_dispatch.
697         (make_class_data): Ditto.
698         Tidy uses of PUSH_FIELD_VALUE.
699         Add field catch_classes.
700         (make_catch_class_record): New.
701
702         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
703
704 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
705
706         * jcf-write.c: Follow spelling conventions.
707         * parse.y: Likewise.
708
709 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
710
711         * ChangeLog: Fix typos.
712         * expr.c: Fix comment typos.
713         * jcf-write.c: Likewise.
714         * lang.c: Likewise.
715         * lex.c: Likewise.
716         * mangle.c: Likewise.
717         * parse-scan.y: Likewise.
718         * parse.y: Likewise.
719
720 2003-10-22  Tom Tromey  <tromey@redhat.com>
721
722         * expr.c (expand_byte_code): Only warn about dead bytecode when
723         extra_warnings is set.
724
725 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
726
727         Fix for PR java/12586.
728         * mangle.c (find_compression_record_match): Don't iterate through
729         package namespace elements unless they all match compression_table
730         entries.
731
732 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
733
734         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
735         (generate-manpages): Likewise.
736         (java.maintainer-clean): Likewise.
737         (gcj.info): Likewise.
738         (gcj.1): Likewise.
739         (gcjh.1): Likewise.
740         (jv-scan.1): Likewise.
741         (jcf-dump.1): Likewise.
742         (gij.1): Likewise.
743         (jv-convert.1): Likewise.
744         (rmic.1): Likewise.
745         (rmiregistry.1): Likewise.
746         (java.install-man): Likewise.
747         (parse-scan.o): Move and define complete compile line.
748         (parse.o): Likewise.
749         (jcf-tree-inline.o): Move.
750
751 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
752
753         * Make-lang.in (info): Update dependencies.
754         (java.install-info): Remove.
755         ($(srcdir)/java/gcj.info): Replace with ...
756         ($(docobjdir)/gcj.info): ... this.
757
758 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
759
760         * Make-lang.in: Replace uses of $(target_alias) with
761         $(target_noncanonical).
762
763 2003-10-09  Tom Tromey  <tromey@redhat.com>
764
765         * decl.c (java_init_decl_processing): Declare signers field.
766         * class.c (make_class_data): Set signers field.
767
768 2003-10-09  Jason Merrill  <jason@redhat.com>
769
770         * parse.y (patch_assignment): Use make_node to create a BLOCK.
771         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
772         POINTER_TYPE.
773
774 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
775
776         * Make-lang.in (java.info): Replace with ...
777         (info): ... this.
778         (java.dvi): Replace with ...
779         (dvi): ... this.
780         (java.generated-manpages): Replace with ...
781
782 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
783
784         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
785
786 2003-10-01  Andrew Haley  <aph@redhat.com>
787
788         * jcf-parse.c (java_parse_file): Write otable and atable.
789         * java-tree.h (atable_methods): New.
790         (atable_decl): New.
791         (atable_syms_decl): New.
792         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
793         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
794         (symbol_*type): Rename method_symbol* to symbol*type.
795         (emit_offset_symbol_table): Delete.
796         (emit_symbol_table): New.
797         (get_symbol_table_index): New.
798         (atable_type): New.
799         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
800         (build_known_method_ref): Likewise.
801         (get_symbol_table_index): Rename from get_offset_table_index.
802         Parameterize to allow re-use by differing types of symbol table.
803         (build_invokevirtual): Pass table to get_offset_table_index.
804         * decl.c (java_init_decl_processing): Push types and decls for
805         atable and atable_syyms.
806         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
807         (make_class_data): Add new fields atable and atable_syms.
808         (emit_symbol_table): Rename from emit_offset_symbol_table.
809         Parameterize to allow re-use by different types of symbol table.
810         (build_symbol_entry): Renamed from build_method_symbols_entry.
811
812 2003-09-30  Roger Sayle  <roger@eyesopen.com>
813
814         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
815         semantics for SAVE_EXPR, by caching the result in a temporary.
816
817 2003-09-28  Richard Henderson  <rth@redhat.com>
818
819         * check-init.c (check_init): Save and restore input_location
820         instead of file and line separately.
821         * decl.c (java_expand_body): Likewise.
822         * jcf-write.c (generate_bytecode_insns): Likewise.
823         * parse.y (safe_layout_class): Likewise.
824         * jcf-parse.c (read_class, parse_class_file): Likewise.
825         (java_parse_file): Use %H for warning locator.
826
827 2003-09-28  Roger Sayle  <roger@eyesopen.com>
828
829         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
830         with void-type branches instead of using a COMPOUND_EXPR.
831
832 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
833
834         * decl.c (java_optimize_inline, dump_function): Remove.
835         * java-tree.h (java_optimize_inline): Remove declaration.
836         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
837         * parse.y (source_end_java_method, java_expand_classes):
838         Likewise.  Remove dead code.
839
840 2003-09-27  Roger Sayle  <roger@eyesopen.com>
841
842         * lang.c (java_init_options): Set flag_evaluation_order.
843         * expr.c (force_evaluation_order): Don't attempt to force
844         evaluation order of binary operations using save_expr.
845         * parse.y (java_complete_lhs): No longer need to call
846         force_evaluation_order when constructing binary operators.
847
848 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
849             Bryce McKinlay  <bryce@mckinlay.net.nz>
850
851         PR java/1333:
852         * parse.y (not_accessible_field_error): New function.
853         (resolve_expression_name): Check field access permissions.
854         (resolve_qualified_expression_name): Use
855         not_accessible_field_error.
856         (resolve_qualified_expression_name): Likewise.
857
858 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
859
860         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
861
862 2003-09-23  Roger Sayle  <roger@eyesopen.com>
863
864         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
865         with equal operands without side-effects.
866
867 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
868
869         * decl.c (java_init_decl_processing): Don't emit otable decls
870         if flag_indirect_dispatch is not set.
871
872 2003-09-21  Richard Henderson  <rth@redhat.com>
873
874         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
875         resource.c: Revert.
876
877 2003-09-21  Richard Henderson  <rth@redhat.com>
878
879         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
880         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
881
882 2003-09-20  Richard Henderson  <rth@redhat.com>
883
884         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
885
886 2003-09-18  Roger Sayle  <roger@eyesopen.com>
887
888         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
889         * check-init.c (check_init): Likewise.
890
891 2003-09-18  Roger Sayle  <roger@eyesopen.com>
892
893         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
894
895 2003-09-16  Andrew Haley  <aph@redhat.com>
896
897         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
898
899 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
900
901         Fixes PR java/9577
902         * mangle.c (find_compression_record_match): Skip
903         over a "6JArray" (the array template mangled string)
904         IDENTIFIER_NODE.
905         (mangle_array_type): Correct minor typo.
906         (atms): Move definition to the beginning.
907
908 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
909
910         * class.c (add_miranda_methods): Ensure super-interfaces are laid
911         out. Fix for PR java/12254.
912
913 2003-09-11  Richard Henderson  <rth@redhat.com>
914
915         * parse.y (source_end_java_method): Update for new
916         cgraph_finalize_function argument.
917
918 2003-09-09  Richard Henderson  <rth@redhat.com>
919
920         * parse.y (source_end_java_method): Update call to
921         cgraph_finalize_function.
922
923 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
924
925         * decl.c (java_expand_body): New function.
926         * expr.c (build_class_init): Set DECL_IGNORED_P.
927         * java-tree.h (start_complete_expand_method,
928         java_expand_body): Declare.
929         * jcf-parse.c (cgraph.h): Include.
930         (java_parse_file): Handle flag_unit_at_a_time.
931         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
932         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
933         (java_estimate_num_insns): Use walk_tree_without_duplicates.
934         (java_start_inlining): New function.
935         * parse.h (java_finish_classes): Declare.
936         * parse.y: Include cgraph.h.
937         (block): Don't special-case empty block production.
938         (craft_constructor): Set DECL_INLINE.
939         (source_end_java_method): Handle flag_unit_at_a_time.
940         Replace inline code with call to java_expand_body.
941         (start_complete_expand_method): Remove static modifier.
942         (java_expand_method_bodies): Patch function tree for
943         class initialization and/or synchronization as needed.
944         Don't begin RTL expansion yet.
945         (java_expand_classes): Check flag_unit_at_a_time before
946         calling finish_class.
947         (java_finish_classes): New function.
948         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
949         (patch_assignment): Set DECL_CONTEXT on temporary variable.
950         (emit_test_initialization): Set DECL_IGNORED_P.
951
952 2003-09-03  Roger Sayle  <roger@eyesopen.com>
953
954         * builtins.c (enum builtin_type): Delete unused enumeration.
955         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
956
957 2003-08-28  Tom Tromey  <tromey@redhat.com>
958
959         * gcj.texi (Extensions): Document gcjlib URLs.
960
961 2003-08-20  Tom Tromey  <tromey@redhat.com>
962
963         * gcj.texi (Extensions): Added xref.
964         (libgcj Runtime Properties): Document
965         gnu.gcj.runtime.VMClassLoader.library_control.
966
967 2003-08-20  Andrew Haley  <aph@redhat.com>
968
969         * except.c (prepare_eh_table_type): Use new encoding for exception
970         handlers when using -fno-assume-compiled.
971
972 2003-08-13  Tom Tromey  <tromey@redhat.com>
973
974         * gcj.texi (Invoking gij): Document -X and -?.
975
976 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
977
978         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
979         GCJH_OBJS, JCFDUMP_OBJS
980         * win32-host.c: Removed the unnecessary and broken dependency
981         on jcf.h
982
983 2003-08-11  Tom Tromey  <tromey@redhat.com>
984
985         * parse.y (java_check_regular_methods): Typo fixes.  Call
986         check_interface_throws_clauses.  Use
987         check_concrete_throws_clauses.
988         (check_interface_throws_clauses): New function.
989         (check_concrete_throws_clauses): New function.
990         (hack_is_accessible_p): New function.
991         (find_most_specific_methods_list): Added FIXME.
992         * typeck.c (lookup_do): Use `flags' argument to decide what to
993         do.  Reimplemented.
994         (lookup_argument_method_generic): New function.
995         (lookup_argument_method2): Removed.
996         * jcf.h (ACC_INVISIBLE): New define.
997         * jcf-write.c (generate_classfile): Skip invisible methods.
998         * class.c (add_miranda_methods): New function.
999         (layout_class_methods): Use it.
1000         (get_access_flags_from_decl): Use ACC_INVISIBLE.
1001         * java-tree.h (METHOD_INVISIBLE): New define.
1002         (lang_decl_func) [invisible]: New field.
1003         (lookup_argument_method_generic): Declare.
1004         (SEARCH_INTERFACE): New define.
1005         (SEARCH_SUPER): Likewise.
1006         (SEARCH_ONLY_INTERFACE): Likewise.
1007         (SEARCH_VISIBLE): Likewise.
1008         (lookup_argument_method2): Removed declaration.
1009
1010 2003-08-05  Tom Tromey  <tromey@redhat.com>
1011
1012         Fix for PR java/11600:
1013         * parse.y (java_complete_lhs): See whether we're calling a method
1014         on an array.
1015         (check_thrown_exceptions): Added `is_array_call' argument;
1016         fixed `clone' checking; updated all callers.
1017
1018 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1019
1020         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1021
1022 2003-08-03  Tom Tromey  <tromey@redhat.com>
1023
1024         * java-tree.h (METHOD_TRANSIENT): Removed.
1025         * decl.c (pushdecl): Removed some dead code.
1026         * class.c (get_access_flags_from_decl): Can't have transient
1027         method.
1028         (add_method_1): Can't have a transient method.
1029
1030 2003-07-28  Andreas Jaeger  <aj@suse.de>
1031
1032         * jvspec.c: Convert to ISO C90 prototypes.
1033
1034 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1035
1036         * decl.c (force_poplevels): Fix warning call.
1037
1038 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1039
1040         * expr.c (expand_java_field_op): Don't use xxx_with_decl
1041         (expand_java_field_op): Likewise.
1042         * class.c (layout_class_method): Likewise
1043         (emit_register_classes): Likewise.
1044         * decl.c (pushdecl): Likewise.
1045         (poplevel): Likewise.
1046         (force_poplevels): Likewise.
1047         (give_name_to_locals): Likewise.
1048         * check-init.c (check_for_initialization): Likewise.
1049
1050 2003-07-24  Jason Merrill  <jason@redhat.com>
1051
1052         * java-tree.h: Move boolean_type_node et al to the back end.
1053
1054 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1055
1056         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1057         casts.
1058
1059 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
1060
1061         * lang.opt: Don't show -MD_ and -MDD_.
1062
1063 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
1064
1065         * lang-options.h: Remove.
1066         * lang.opt: Add help text.
1067
1068 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
1069
1070         * expr.c: Remove the last argument to expand_assignment().
1071
1072 2003-07-09  Jan Hubicka  <jh@suse.cz>
1073
1074         * java-tree.h (DECL_NUM_STMTS): Rename to...
1075         (DECL_ESTIMATED_INSNS): ... this.
1076         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1077         New static functions.
1078         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1079         * parser.y (add_stmt_to_compound): Do not account statements.
1080
1081 2003-07-08  Mark Wielaard  <mark@klomp.org>
1082
1083         * gcj.texi: CNI now expands to Compiled Native Interface.
1084
1085 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1086
1087         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1088
1089 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1090
1091         * expr.c (expand_byte_code): Adjist emit_line_note call.
1092
1093 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1094
1095         * lang.c (java_handle_option): Don't handle filenames.
1096
1097 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
1098
1099         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1100         DIR_SEPARATOR.
1101         Use FILENAME_CMP.
1102         * jcf-write.c: Don't default-define DIR_SEPARATOR.
1103         * jcf.h: Delete COMPARE_FILENAMES definition.
1104
1105 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
1106
1107         * lang.c (java_init_options): Update prototype.
1108
1109 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1110
1111         * decl.c (poplevel): Adjust define_label call.
1112
1113 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1114
1115         * gjavah.c (flag_jni): Make non-static.
1116         * parse-scan.y (ctxp): Make non-static.
1117
1118         * class.c (build_method_symbols_entry)
1119         * expr.c (get_offset_table_index)
1120         * jcf-parse.c (jcf_parse):
1121         Mark the definition static, matching the forward declaration.
1122
1123 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
1124
1125         * lang.c (java_handle_option): Don't check for missing arguments.
1126
1127 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1128
1129         * class.c (push_class): Use a location_t to save place.
1130         (emit_register_classes): Set input_location. Adjust
1131         expand_function_end call.
1132         * resource.c (write_resource_constructor): Likewise.
1133         * decl.c (end_java_method): Adjust expand_function_end call.
1134         * parse.y (source_end_java_method): Likewise.
1135
1136 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1137
1138         * lang.c (java_handle_option): Likewise.
1139
1140 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
1141
1142         * lang.c (java_handle_option): Special-casing of optional
1143         joined arguments no longer needed.
1144         * lang.opt: Update switches that take optional argument.
1145
1146 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1147
1148         * lang.opt: Declare Java.
1149         * lang.c (java_init_options): Update.
1150
1151 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1152
1153         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1154
1155 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1156
1157         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1158         * lang.c (java_handle_option): -MD and -MMD have an underscore.
1159         * lang.opt: -MD and -MMD have an underscore.
1160
1161 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1162
1163         * class.c (emit_register_classes): Adjust init_function_start
1164         call.
1165         * decl.c (complete_start_java_method): Likewise.
1166         * resource.c (write_resource_constructor): Likewise.
1167
1168 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1169
1170         * Make-lang.in: Update to use options.c and options.h.
1171         * lang.c: Include options.h not j-options.h.
1172         (java_handle_option): Abort on unrecognized option.
1173         (java_init_options): Request Java switches.
1174
1175 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
1176
1177         * Make-lang.in: Handle mostlyclean.
1178
1179 2003-06-11  Tom Tromey  <tromey@redhat.com>
1180
1181         * lang.c (java_handle_option): Update dependency_tracking for
1182         OPT_MF case.
1183
1184         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1185         empty argument.
1186
1187 2003-06-10  Andrew Haley  <aph@redhat.com>
1188
1189         * resource.c (write_resource_constructor): Use expand_expr to
1190         generate the address of the label attached to a resource.
1191         * Make-lang.in (java/resource.o): Add expr.h
1192
1193 2003-06-10  Andrew Haley  <aph@redhat.com>
1194
1195         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1196         (java_decl_ok_for_sibcall): New.
1197
1198 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
1199
1200         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1201         (java/j-options.c, java/j-options.h): New.
1202         * java-tree.h (resource_name, compile_resource_file,
1203         compile_resource_data): Constify.
1204         * jcf-write.c (jcf_write_base_directory): Similarly.
1205         * jcf.h (jcf_write_base_directory): Similarly.
1206         * lang.c: Include j-options.h.
1207         (cl_options_count, cl_options, string_option, java_decode_option,
1208         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1209         process_option_with_no): Remove.
1210         (resource_name): Constify.
1211         (LANG_HOOKS_HANDLE_OPTION): Override.
1212         (java_handle_option): New.
1213         (java_init): Don't call jcf_path_init.
1214         (java_init_options): Call jcf_path_init.
1215         * lang.opt: New.
1216         * resource.c (compile_resource_data, compile_resource_file): Constify.
1217
1218 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
1219
1220         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1221         (struct lang_decl_func): Add last_line field.
1222         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1223         DECL_SOURCE_LINE_LAST): Remove.
1224         * parse.y (missing_return_error, finish_method_declaration,
1225         lookup_cl, start_artificial_method_body, source_end_java_method,
1226         start_complete_expand_method): Adjust.
1227
1228 2003-06-08  Tom Tromey  <tromey@redhat.com>
1229
1230         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1231         fno-assume-compiled.
1232
1233 2003-06-08  Roger Sayle  <roger@eyesopen.com>
1234
1235         * builtins.c (define_builtin_type, builtin_types): Delete.
1236         (define_builtin): Rewritten to take just the built-in code,
1237         the function's name, type and fallback library function name.
1238         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1239         (initialize_builtins): Overhaul to define the GCC builtins
1240         used by gcj manually, providing the Java run-time's
1241         implementations as the fallback library function.
1242
1243 2003-06-08  Anthony Green  <green@redhat.com>
1244
1245         * parse.y (patch_cast): Fix conversions from floating-point to
1246         integral types.
1247
1248 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
1249
1250         * Make-lang.in: Update.
1251         * lang.c: Include opts.h. Define cl_options_count and cl_options.
1252
1253 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1254
1255         * lang.c (java_init_options): Update.
1256
1257 2003-06-05  Jan Hubicka  <jh@suse.cz>
1258
1259         * Make-lang.in:  Add support for stageprofile and stagefeedback
1260
1261 2003-05-31  Roger Sayle  <roger@eyesopen.com>
1262
1263         * lang.c (java_init_options): Prescribe wrap-around two's
1264         complement arithmetic overflow by setting flag_wrapv.
1265
1266 2003-05-29  Roger Sayle  <roger@eyesopen.com>
1267
1268         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1269         (builtin_record): Add an additional builtin_code field to
1270         record which GCC built-in corresponds to the Java function.
1271         (java_builtins):  Add new entries for atan, atan2, exp, log,
1272         pow and tan.
1273         (max_builtin, min_builtin, abs_builtin): Perform constant
1274         folding on the resulting tree.
1275         (java_build_function_call_expr): Likewise, perform constant
1276         folding on the resulting tree.
1277         (initialize_builtins): The NULL creators are now allowed in
1278         the java_builtins table, which is now terminated by an entry
1279         with builtin_code == END_BUILTINS.
1280         (check_for_builtin): Likewise.  If the matching creator is
1281         NULL, construct the call using java_build_function_call_expr
1282         directly with the decl for the corresponding builtin_code.
1283
1284 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1285
1286         * win32-host.c: Normalize copyright boilerplate.
1287
1288 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1289
1290         * parse.y (print_int_node): Use string concatentation on
1291         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1292         function calls into one.
1293
1294 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
1295
1296         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1297         fatal_io_error with calls to fatal_error; add ": %m" to the end of
1298         all the affected error messages.
1299
1300 2003-05-13  Richard Henderson  <rth@redhat.com>
1301
1302         * class.c (layout_class_method): Set DECL_EXTERNAL.
1303         * decl.c (java_mark_decl_local, java_mark_class_local): New.
1304         * java-tree.h (java_mark_class_local): Declare.
1305         * jcf-parse.c (parse_class_file): Use it.
1306         * parse.y (java_expand_classes): Likewise.
1307
1308 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
1309
1310         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1311         * lex.h: #include input.h.
1312         * jv-scan.c (input_filename): Remove.
1313
1314 2003-05-02  Tom Tromey  <tromey@redhat.com>
1315
1316         PR java/10491:
1317         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1318         (handle_inner_classes): New function.
1319
1320 2003-05-01  Tom Tromey  <tromey@redhat.com>
1321
1322         PR java/10459:
1323         * parse.y (finish_for_loop): Do nothing if update expression is a
1324         EXPR_WFL_NODE wrapping nothing.
1325         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1326
1327 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
1328
1329         * lex.h (input_lineno): Remove declaration.
1330         * parse-scan.y: #include input.h.
1331         (input_filename): Remove declaration.
1332         (input_location): Add definition.
1333         (input_line): Remove definition.
1334
1335 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1336
1337         * lex.h (lineno): Rename to ...
1338         (input_line): ... here
1339         * parse-scan.y (lineno): Rename to ...
1340         (input_line): ... here.
1341         (reset_report): Rename lineno to input_line.
1342         * check-init.c (check_init): Likewise.
1343         * class.c (push_class): Likewise.
1344         * decl.c (complete_start_java_method, end_java_method): Likewise.
1345         * expr.c (expand_byte_code): Likewise.
1346         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1347         * jcf-write.c (generate_bytecode_insns): Likewise.
1348         * lex.c (java_init_lex, java_allocate_new_line,
1349         do_java_lex): Likewise.
1350         * parse.h (YYNOT_TWICE): Likewise.
1351         * parse.y (empty_statement, expression_statement,
1352         java_pop_parser_context, java_parser_context_save_global,
1353         yyerror, register_fields, method_header, safe_layout_class,
1354         find_in_imports_on_demand, create_artificial_method,
1355         source_end_java_method, start_complete_expand_method,
1356         build_thisn_assign, java_complete_lhs,
1357         maybe_absorb_scoping_block): Likewise.
1358
1359 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
1360
1361         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1362         '/' when computing java source filename
1363
1364 2003-04-13  Tom Tromey  <tromey@redhat.com>
1365
1366         * gjavah.c (print_c_decl): Indentation fix.
1367
1368 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1369
1370         * class.c (make_field_value, make_method_value, get_dispatch_table)
1371         (make_class_data, emit_offset_symbol_table)
1372         * constants.c (build_constants_constructor)
1373         * java-tree.h (START_RECORD_CONSTRUCTOR)
1374         * parse.y (maybe_build_array_element_wfl):
1375         Use build_constructor.
1376
1377 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
1378
1379         PR java/10253:
1380         * parse.y (string_convert_int_cst): Always use at least one digit
1381         in string conversion. Remove ASCII dependence.
1382         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
1383
1384 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
1385
1386         * Make-lang.in: added win32-host.c
1387         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
1388         resolves to open() on non-Win32 platforms and
1389         Win32-specific jcf_open_exact_case() on Win32
1390         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
1391         when trying .java and .class files
1392         * win32-host.c: added to repository. Defines
1393         Win32-specific jcf_open_exact_case()
1394
1395 2003-04-10  Andrew Haley  <aph@redhat.com>
1396
1397         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
1398         (maybe_free_localvar): Renamed from localvar_free.
1399         Add new arg, really.
1400         (generate_bytecode_insns): Set new variable, jsrs.
1401         Only free local vars if no jsr insns have been emittted.
1402         Call maybe_free_localvar, not localvar_free.
1403
1404 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
1405
1406         * gcj.texi: Remove @ at start of file.
1407
1408 2003-03-25  Tom Tromey  <tromey@redhat.com>
1409
1410         * parse.y (create_interface): Call CHECK_DEPRECATED.
1411
1412 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
1413
1414         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
1415
1416 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1417
1418         * javaop.h (jfloat, jdouble): Make them structures mirroring
1419         the bit fields of IEEE float and double respectively.
1420         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
1421         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
1422         (union Word, union DWord): Delete.
1423         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
1424
1425         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
1426         D_NAN_MASK): Delete.
1427         (jni_print_float, jni_print_double): New.  Generate
1428         hexadecimal floating constants.
1429         (print_field_info): Use jni_print_float/double.
1430
1431         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
1432         finite floating point numbers for output; special case
1433         non-finite floats.
1434
1435 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1436
1437         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
1438         Replace 0 and 1 with true and false in return statements.
1439
1440 2003-03-19  Tom Tromey  <tromey@redhat.com>
1441
1442         * lex.c (do_java_lex): Renamed from java_lex.
1443         (java_lex): New function.
1444         Include timevar.h.
1445
1446 2003-03-13  Tom Tromey  <tromey@redhat.com>
1447
1448         * parse.y (resolve_inner_class): Error if qualifier is a primitive
1449         type.
1450
1451 2003-03-04  Andrew Haley  <aph@redhat.com>
1452
1453         * gjavah.c (is_first_data_member): New global variable.
1454         (print_c_decl): If it's the first data member, align it as the
1455         superclass.
1456         (process_file): Set is_first_data_member.
1457
1458 2003-03-11  Tom Tromey  <tromey@redhat.com>
1459
1460         * parse.y (resolve_field_access): Initialize class if field is
1461         found in another static field.
1462         * expr.c (build_class_init): Don't optimize out initialization of
1463         implemented interface.
1464
1465 2003-03-11  Andrew Haley  <aph@redhat.com>
1466
1467         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
1468         warning.
1469
1470 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1471
1472         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
1473         and DIR_SEPARATOR_2 for a target.
1474         Correct minor typos.
1475
1476         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
1477         and DIR_SEPARATOR_2 for a target into account.
1478
1479 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1480
1481         * lang.c (java_init): Update prototype, move code to java_post_options.
1482         (java_post_options): Similarly.
1483
1484 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
1485
1486         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
1487         compare file name components depending on the case-sensitivity
1488         or otherwise of the host file system.
1489
1490         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
1491         "strcmp" to compare file name components.
1492         Use IS_DIR_SEPARATOR instead of comparing directly against
1493         DIR_SEPARATOR.
1494         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
1495         comparing directly against DIR_SEPARATOR.
1496
1497 2003-03-04  Tom Tromey  <tromey@redhat.com>
1498
1499         * Make-lang.in (java.tags): New target.
1500
1501 2003-03-01  Roger Sayle  <roger@eyesopen.com>
1502
1503         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
1504         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
1505
1506 2003-03-01  Tom Tromey  <tromey@redhat.com>
1507
1508         * parse.y (jdep_resolve_class): Only check deprecation if we found
1509         a decl.
1510
1511 2003-02-28  Tom Tromey  <tromey@redhat.com>
1512
1513         PR java/9695:
1514         * class.c (maybe_layout_super_class): Always pass a WFL to
1515         do_resolve_class.
1516         * parse.y (do_resolve_class): Updated comment to explain
1517         parameters.
1518
1519 2003-02-26  Tom Tromey  <tromey@redhat.com>
1520
1521         * jcf-write.c (generate_classfile): Check whether class is
1522         deprecated before writing attribute count.
1523
1524 2003-02-25  Roger Sayle  <roger@eyesopen.com>
1525
1526         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
1527         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
1528
1529 2003-02-23  Tom Tromey  <tromey@redhat.com>
1530
1531         * lang-options.h: Added -Wdeprecated.
1532         * gcj.texi (Warnings): Document -Wdeprecated.
1533         * java-tree.h (flag_deprecated): Declare.
1534         * lang.c (lang_W_options): Added deprecated.
1535         (flag_deprecated): New global.
1536         * chartables.h: Rebuilt.
1537         * gen-table.pl (process_one): Look at whitespace.
1538         (print_tables): Define LETTER_SPACE, LETTER_MASK.
1539         * parse.h (CLEAR_DEPRECATED): New macro.
1540         (CHECK_DEPRECATED_NO_RESET): New macro.
1541         * jcf-parse.c (handle_deprecated): New function.
1542         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
1543         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
1544         * parse.y (resolve_type_during_patch): Check deprecation.
1545         (jdep_resolve_class): Likewise.
1546         (process_imports): Likewise.
1547         (resolve_expression_name): Likewise.
1548         (check_deprecation): Strip arrays from decl.  Check
1549         flag_deprecated.
1550         (patch_method_invocation): Also check the particular constructor
1551         for deprecation.
1552         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
1553         * jcf-write.c (append_deprecated_attribute): New function.
1554         (generate_classfile): Generate deprecated attribute when
1555         appropriate.
1556         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
1557         (java_lex) [case '*']: Simplify logic.
1558         (java_start_char_p): Use LETTER_MASK.
1559         (java_part_char_p): Likewise.
1560         (java_space_char_p): New function.
1561
1562 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1563
1564         Change base class access representation.
1565         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
1566         (add_interface_do): Likewise.
1567
1568 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
1569
1570         * decl.c (java_init_decl_processing): Change
1571         soft_lookupjnimethod_node to reflect the change in
1572         signature of _Jv_LookupJNIMethod in libjava/jni.cc
1573         * expr.c (build_jni_stub): Calculate and pass the size
1574         on the stack of the arguments to a JNI function. Use
1575         new target macro MODIFY_JNI_METHOD_CALL to allow a
1576         target to modify the call to a JNI method.
1577
1578 2003-02-08  Roger Sayle  <roger@eyesopen.com>
1579
1580         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
1581         instead of basename to avoid compiler warnings on Tru64.
1582
1583 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1584
1585         * gcj.texi: Update to GFDL 1.2.
1586
1587 2003-01-31  Andrew Haley  <aph@redhat.com>
1588
1589         * parse.y (java_expand_classes): Scan the whole class list looking
1590         for access methods that haven't yet been expanded.
1591
1592 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
1593
1594         Fix for java/4269:
1595
1596         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
1597         to fix bootstrap on sparc-unknown-netbsdelf1.5.
1598         * jcf-parse.c: Likewise.
1599
1600 2003-01-31  Mark Wielaard  <mark@klomp.org>
1601
1602         * gjavah.c (throwable_p): Allocate 1 more byte for string.
1603
1604 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1605
1606         * class.c (make_class): Use BINFO_ELTS.
1607         (set_super_info): Likewse.
1608         (add_interface_do): Likewise.
1609
1610 2003-01-30  Tom Tromey  <tromey@redhat.com>
1611
1612         * jcf-parse.c (read_class): Update identifier's class value if it
1613         changed during parsing.
1614
1615 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
1616
1617         * Make-lang.in (po-generated): Find the targets in $(parsedir).
1618         Propagate change to all other rules as required.
1619         (java/parse-scan.o): Add explicit dependency on
1620         $(parsedir)/java/parse-scan.c .
1621
1622 2003-01-29  Tom Tromey  <tromey@redhat.com>
1623
1624         * parse.y (patch_assignment): Only transform the rhs of an
1625         assignment when compiling to native.
1626
1627 2003-01-28  Tom Tromey  <tromey@redhat.com>
1628
1629         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
1630
1631 2003-01-28  Tom Tromey  <tromey@redhat.com>
1632
1633         * lex.c (java_lex): Don't include UEOF as part of token.
1634         (java_read_unicode): Error if \u sequence prematurely terminated.
1635
1636 2003-01-27  Tom Tromey  <tromey@redhat.com>
1637
1638         * parse.y (java_check_regular_methods): Check for construct after
1639         checking types in throws clause.
1640
1641 2003-01-24  Tom Tromey  <tromey@redhat.com>
1642
1643         * class.c (build_static_field_ref): Only a String or numeric field
1644         can fold to a constant.
1645
1646 2003-01-23  Tom Tromey  <tromey@redhat.com>
1647
1648         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
1649         file name in resource buffer.
1650
1651 2003-01-23  Tom Tromey  <tromey@redhat.com>
1652
1653         * expr.c (build_known_method_ref): Use method's context to find
1654         method table index.
1655
1656 2003-01-23  Tom Tromey  <tromey@redhat.com>
1657
1658         * constants.c (set_constant_entry): Allocated cleared memory.
1659
1660 2003-01-22  Tom Tromey  <tromey@redhat.com>
1661
1662         * java-tree.h: Don't use PARAMS.
1663         * resource.c: Add prototypes for all functions.
1664         (write_resource_constructor): Use `const char *' to avoid
1665         warning.
1666
1667 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
1668
1669         * jcf-parse.c (process_zip_dir): Remove unused variable.
1670
1671 2003-01-22  Tom Tromey  <tromey@redhat.com>
1672
1673         * expr.c (build_invokeinterface): Abort if method's context is not
1674         an interface.
1675
1676 2003-01-22  Tom Tromey  <tromey@redhat.com>
1677
1678         * gcj.texi (Input and output files): Mention non-class entries.
1679         * decl.c (java_init_decl_processing): Call
1680         init_resource_processing.
1681         * java-tree.h (compile_resource_data, write_resource_constructor,
1682         compile_resource_file, init_resource_processing): Declare.
1683         * config-lang.in (gtfiles): Added resource.c.
1684         * Make-lang.in (gt-java-resource.h): New target.
1685         (JAVA_OBJS): Added resource.o.
1686         (java/resource.o): New target.
1687         * resource.c: New file.
1688         * class.c (compile_resource_file): Moved to resource.c.
1689         (registerResource_libfunc): Likewise.
1690         (utf8_decl_list): Mark with GTY; now static.
1691         * jcf-parse.c (classify_zip_file): New function.
1692         (parse_zip_file_entries): Use it; compile .properties files.
1693         (process_zip_dir): Use classify_zip_file and compute_class_name.
1694         Don't write class name into zip directory.
1695         (java_parse_file): Call write_resource_constructor.
1696         (compute_class_name): New function.
1697         * jcf-io.c (read_zip_member): Reindented.
1698
1699 2003-01-21  Tom Tromey  <tromey@redhat.com>
1700
1701         * class.c (supers_all_compiled): New function.
1702         (make_class_data): Use it.
1703
1704 2003-01-21  Tom Tromey  <tromey@redhat.com>
1705
1706         * parse.y (method_header): Native method can't be strictfp.
1707         No method can be transient or volatile.
1708
1709 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1710
1711         Make-lang.in (jvspec.o-warn): Add -Wno-error.
1712
1713 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1714
1715         * check-init.c: Fix comment typos.
1716         * class.c: Likewise.
1717         * constants.c: Likewise.
1718         * decl.c: Likewise.
1719         * except.c: Likewise.
1720         * expr.c: Likewise.
1721         * java-except.h: Likewise.
1722         * java-tree.h: Likewise.
1723         * javaop.h: Likewise.
1724         * jcf-dump.c: Likewise.
1725         * jcf-io.c: Likewise.
1726         * jcf-parse.c: Likewise.
1727         * jcf-write.c: Likewise.
1728         * lang.c: Likewise.
1729         * mangle.c: Likewise.
1730         * typeck.c: Likewise.
1731         * verify.c: Likewise.
1732
1733 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1734
1735         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
1736         * jcf-write.c: Include "tm_p.h".
1737
1738 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1739
1740         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
1741
1742 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1743
1744         * builtins.c (java_build_function_call_expr): Renamed from
1745         build_function_call_expr.  All callers changed.
1746
1747         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
1748         * jcf-parse.c: Include tm_p.h.
1749
1750         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
1751         warning.
1752
1753 2003-01-14  Tom Tromey  <tromey@redhat.com>
1754
1755         * class.c (make_class_data): Check that super is compiled before
1756         building class reference to it.
1757
1758 2003-01-14  Andrew Haley  <aph@redhat.com>
1759
1760         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1761         varargs function -- correct.
1762
1763 2003-01-14  Andrew Haley  <aph@redhat.com>
1764
1765         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
1766
1767 2003-01-14  Andrew Haley  <aph@redhat.com>
1768
1769         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1770         varargs function -- correct.
1771
1772         * parse.y (patch_assignment): Copy the rhs of an assignment into a
1773         temporary if the RHS is a reference.
1774
1775 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1776
1777         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
1778         * keyword.h: Regenerated.
1779
1780         * All Files: Convert to ISO C style function definitions.
1781
1782 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1783
1784         * parse.y (check_pkg_class_access): ANSIfy definition.
1785
1786 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1787
1788         * decl.c, parse-scan.y, parse.y: Don't cast return value of
1789         xmalloc et al.
1790
1791         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
1792
1793 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1794
1795         Merge from pch-branch:
1796
1797         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
1798
1799         * Make-lang.in (java/gjavah.o): Update dependencies.
1800         * gjavah.c: Include ggc.h.
1801
1802         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
1803
1804         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
1805         (JCFDUMP_OBJS): Add ggc-none.o.
1806         (java/jcf-dump.o): Depend on GGC_H.
1807         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
1808         CPool substructures.
1809         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
1810         * jcf-dump.c: Include ggc.h.
1811
1812         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
1813
1814         * jcf.h (union cpool_entry): New.
1815         (struct CPool): Use gengtype to mark.  Change field 'data' to be
1816         an array of unions.
1817         (struct JCF): Use gengtype to mark.
1818         (CPOOL_UINT): Update for new cpool_entry type.
1819         (CPOOL_USHORT1): Likewise.
1820         (CPOOL_USHORT2): Likewise.
1821         (CPOOL_FINISH): Use GC to free cpool subfields.
1822         * parse.h (struct parser_ctxt): Mark field current_jcf.
1823         * lex.c (java_init_lex): Use GC to allocate struct JCF.
1824         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
1825         (main_jcf): Use gengtype to mark.
1826         (ggc_mark_jcf): Delete.
1827         (get_constant): Update for new cpool_entry type.
1828         (give_name_to_class): Likewise.
1829         (get_class_constant): Likewise.
1830         (init_outgoing_cpool): Use GGC to allocate struct CPool.
1831         (java_parse_file): Use GGC to allocate struct JCF.
1832         (init_jcf_parse): Don't call ggc_add_root.
1833         * jcf-reader.c (jcf_parse_constant_pool): Update for new
1834         cpool_entry type.
1835         * java-tree.h (current_jcf): Use gengtype to mark.
1836         (CPOOL_UTF): Update for new cpool_entry type.
1837         (outgoing_cpool): Use gengtype to mark.
1838         (struct lang_type): GC struct JCF and struct CPool.
1839         * config-lang.in (gtfiles): Add jcf.h.
1840         * constants.c (find_tree_constant): New.
1841         (set_constant_entry): Allocate cpool subfields using GGC.  Update
1842         for new cpool_entry type.
1843         (find_constant1): Update for new cpool_entry type.
1844         (find_constant2): Likewise.
1845         (find_utf8_constant): Use find_tree_constant.
1846         (find_class_or_string_constant): Remove unnecessary cast to jword.
1847         Update for new cpool_entry type.
1848         (count_constant_pool_bytes): Update for new cpool_entry type.
1849         (write_constant_pool): Likewise.
1850         (alloc_name_constant): Use find_tree_constant.
1851         (build_constants_constructor): Update for new cpool_entry type.
1852
1853         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
1854
1855         * parse.y (mark_parser_ctxt): Delete.
1856         (goal): Don't use ggc_add_root.
1857         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
1858         (java_pop_parser_context): Let GC free parser_ctxt.
1859         (java_parser_context_resume): Likewise.
1860         * parse.h (struct parser_ctxt): Use gengtype to mark.
1861         (ctxp): Likewise.
1862         (ctxp_for_generation): Likewise.
1863         * lex.h (struct java_lc_s): Mark for gengtype.
1864         (java_lexer): Rearrange for gengtype.
1865         * config-lang.in (gtfiles): Add lex.h, parse.h.
1866
1867 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1868
1869         * All Files: Remove PARAMS macro.
1870
1871         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
1872         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
1873         `__STDC__' macros.
1874
1875         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
1876         VA_CLOSE.
1877
1878 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1879
1880         * Make-lang.in (java.install-common, java.uninstall,
1881         java.install-info, java.install-man): Prepend $(DESTDIR)
1882         to destination paths in all (un)installation commands.
1883         (java.install-common): Rewrite $(LN) command to support
1884         DESTDIR with "ln" as well as with "ln -s".
1885
1886 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1887
1888         * java-tree.h: Protect against multiple inclusion.
1889
1890 2003-01-07  Tom Tromey  <tromey@redhat.com>
1891
1892         * class.c (add_assume_compiled): Don't adjust parent if we're
1893         already at the root of tree.
1894
1895 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1896
1897         * lang.c (dump_compound_expr): Prototype.
1898
1899 2003-01-03  Tom Tromey  <tromey@redhat.com>
1900
1901         Fix for PR java/8712:
1902         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
1903         when simply checking against `null'.
1904
1905 2003-01-03  Tom Tromey  <tromey@redhat.com>
1906
1907         * gcj.texi (Standard Properties): Document http.proxyHost and
1908         http.proxyPort.
1909
1910         * gcj.texi (GNU Classpath Properties): Document new properties.
1911
1912 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1913
1914         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
1915         java/lang-options.h, java/mangle.c, java/mangle_name.c,
1916         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
1917
1918 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1919
1920         * Make-lang.in, boehm.c, buffer.c,
1921           buffer.h, builtins.c, class.c,
1922           config-lang.in, constants.c,
1923           convert.h, decl.c, except.c,
1924           expr.c, java-except.h,
1925           java-tree.h, javaop.def,
1926           jcf-parse.c, jcf-write.c,
1927           jv-scan.c, jvgenmain.c,
1928           jvspec.c, keyword.gperf,
1929           keyword.h, lang-options.h,
1930           lang-specs.h, lang.c, lex.c,
1931           lex.h, mangle.c, mangle_name.c,
1932           parse-scan.y, parse.h, parse.y,
1933           typeck.c, verify.c, xref.c,
1934           xref.h: Replace "GNU CC" with
1935           "GCC" in the copyright header.
1936
1937         * check-init.c, gjavah.c, javaop.h,
1938           jcf-depend.c, jcf-dump.c, jcf-io.c,
1939           jcf-path.c, jcf-reader.c, jcf.h,
1940           zextract.c, zipfile.h: These files are
1941           "part of GCC". Also say "GCC" not "GNU CC".
1942
1943 2002-12-30  DJ Delorie  <dj@redhat.com>
1944
1945         * Make-lang.in: Protect against texi2pod/pod2man failing.
1946
1947 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
1948
1949         * gcj.texi: Use @copying.
1950
1951 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1952
1953         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
1954         print_cxx_classname.
1955         (print_cxx_classname): Add add_scope parameter.
1956         (print_class_decls): Do not emit a semicolon after the extern
1957         "Java" block.
1958         (process_file): Adjust calls to print_cxx_classname.
1959
1960 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
1961
1962         * gcj.texi: Include Cover Texts in man page.
1963
1964 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
1965
1966         * class.c (build_static_field_ref): Check FIELD_FINAL.
1967
1968         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
1969         instead of current_constant_pool_data_ref.
1970         * java-tree.h (current_constant_pool_data_ref): Undefine.
1971         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
1972         * jcf-parse.c (init_outgoing_cpool): Don't initialize
1973         current_constant_pool_data_ref.
1974
1975         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
1976         not build_internal_class_name.
1977
1978         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
1979         Use it when class ref isn't certain to be compiled.
1980
1981 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
1982
1983         * gcj.texi: Include gcc-common.texi.
1984         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
1985         $(srcdir)/doc/include/gcc-common.texi.
1986
1987 2002-12-22  Anthony Green  <green@redhat.com>
1988
1989         * gcj.texi (Limitations): Add note about org.xml.sax and
1990         org.w3c.dom.
1991
1992 2002-12-20  Tom Tromey  <tromey@redhat.com>
1993
1994         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
1995         where minimum case value is Integer.MIN_VALUE.
1996         Fixes PR java/8955.
1997
1998 2002-12-18  Andrew Haley  <aph@redhat.com>
1999
2000         * parse.y (patch_invoke): Force evaluation order when `check' is
2001         set.  For PR libgcj/8945.
2002
2003 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
2004
2005         * gcj.texi: Change version number to 3.4.
2006
2007 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
2008         Andrew Haley <aph@redhat.com>
2009
2010         * parse.y (source_end_java_method): Remove custom encoding of line
2011         numbers for a function decl before passing it to the back end.
2012
2013 2002-12-03  Andrew Haley  <aph@redhat.com>
2014
2015         * class.c (make_class_data): New field, "chain".
2016         * decl.c (java_init_decl_processing): Likewise.
2017
2018 2002-12-02  Tom Tromey  <tromey@redhat.com>
2019
2020         For PR java/8740:
2021         * parse.y (do_resolve_class): Handle qualified name via
2022         recursion.
2023
2024 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2025
2026         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2027         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2028         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2029         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2030         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2031         Include coretypes.h and tm.h.
2032         * Make-lang.in: Update dependencies.
2033
2034 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2035
2036         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2037
2038 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2039
2040         * jcf-reader.c: Don't expand JCF_readu4 inside the
2041         expansion of JCF_SKIP.
2042
2043 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2044
2045         * jcf-reader.c: Don't expand JCF_readu4 inside the
2046         expansion of JCF_SKIP.
2047
2048 2002-11-22  Tom Tromey  <tromey@redhat.com>
2049
2050         * parse.y (patch_binop): Cast right hand side of shift expression
2051         to `int'.  Fixes PR java/8676.
2052
2053 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
2054             Andrew Haley <aph@redhat.com>
2055
2056         * gcc/java/jcf-write.c (write_classfile): Remove target
2057         class file, if it exists, before renaming the temporary
2058         class file to it.
2059
2060 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2061
2062         * jvspec.c (lang_specific_spec_functions): New.
2063
2064 2002-11-18  Tom Tromey  <tromey@redhat.com>
2065
2066         Fix for PR java/7912:
2067         * expr.c (can_widen_reference_to): Allow cast of array to
2068         Cloneable or Serializable.
2069         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2070         (java_io_serializable_identifier_node): Likewise.
2071         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2072         (valid_ref_assignconv_cast_p): Use new identifier nodes.
2073         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2074         java_io_serializable.
2075         * decl.c (java_init_decl_processing): Initialize
2076         java_lang_cloneable_identifier_node and
2077         java_io_serializable_identifier_node.
2078         (java_lang_cloneable_identifier_node): New global.
2079         (java_io_serializable_identifier_node): Likewise.
2080
2081 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2082
2083         * buffer.c: Remove unnecessary casts.
2084         * check-init.c: Likewise.
2085         * class.c: Likewise.
2086         * constants.c: Likewise.
2087         * decl.c: Likewise.
2088         * except.c: Likewise.
2089         * gjavah.c: Likewise.
2090         * jcf-io.c: Likewise.
2091         * jcf-parse.c: Likewise.
2092         * jcf-path.c: Likewise.
2093         * jvspec.c: Likewise.
2094         * lang.c: Likewise.
2095         * lex.c: Likewise.
2096         * verify.c: Likewise.
2097
2098 2002-11-06  Tom Tromey  <tromey@redhat.com>
2099
2100         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2101         a JNI header.
2102
2103 2002-11-05  Tom Tromey  <tromey@redhat.com>
2104
2105         Fix for PR java/6388.
2106         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2107         * java-tree.h (enum java_tree_index): New values
2108         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2109         (decimal_int_max, decimal_long_max): New defines.
2110         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
2111         (error_if_numeric_overflow): Rewrote range checking.
2112         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2113         decimal_long_max.
2114
2115 2002-11-02  Tom Tromey  <tromey@redhat.com>
2116
2117         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2118
2119         * class.c (make_method_value): Put class name, not signature, into
2120         `throws' field.  For PR java/8415.
2121
2122 2002-10-24  Tom Tromey  <tromey@redhat.com>
2123
2124         * gcj.texi (Invoking gij): Document --showversion.
2125         (Standard Properties): java.library.path now set.
2126
2127 2002-10-23  Tom Tromey  <tromey@redhat.com>
2128
2129         * gjavah.c (decode_signature_piece): In JNI mode, print
2130         `jobjectArray' when array depth is nonzero.
2131         Fixes PR java/8296.
2132
2133 2002-10-15  Andrew Haley  <aph@redhat.com>
2134
2135         * parse.y (patch_invoke): Call force_evaluation_order on a static
2136         arg list.
2137         (resolve_qualified_expression_name): Call force_evaluation_order
2138         on a arg list that is part of a Qualified Expression Name.
2139
2140         * lang.c (dump_compound_expr): New.
2141         (java_dump_tree): New.
2142
2143 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
2144
2145         * gcj.texi: Added item describing the GCJ runtime property
2146         "gnu.gcj.progname".
2147
2148 2002-10-15  Richard Henderson  <rth@redhat.com>
2149
2150         * jcf-parse.c (get_constant): Fix type warning.
2151
2152 2002-10-15  Andrew Haley  <aph@redhat.com>
2153
2154         * java-tree.h (java_inlining_merge_static_initializers): Declare.
2155         (java_inlining_map_static_initializers): Declare.
2156
2157 2002-10-14  Andrew Haley  <aph@redhat.com>
2158
2159         * tree-inline.c (remap_block): All local class initialization
2160         flags go in the outermost scope.
2161         (expand_call_inline): Call java_inlining_map_static_initializers.
2162         (expand_call_inline): Call java_inlining_merge_static_initializers.
2163         * java/lang.c (merge_init_test_initialization): New.
2164         (java_inlining_merge_static_initializers): New.
2165         (inline_init_test_initialization): New.
2166         (java_inlining_map_static_initializers): New.
2167
2168 2002-10-11  Mark Wielaard  <mark@klomp.org>
2169
2170         * gcj.texi (Compatibility): Add Limitations and Extensions section.
2171
2172 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2173
2174         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2175
2176 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2177
2178         * parse.y (merge_string_cste): Add parentheses around & within |.
2179
2180 2002-10-08  Tom Tromey  <tromey@redhat.com>
2181
2182         * parse.y (variable_declarator_id): Simplify error path for
2183         array declarator error.  For PR java/8003.
2184
2185 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
2186
2187         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2188         bug_report_url.
2189
2190 2002-10-08  Andrew Haley  <aph@redhat.com>
2191
2192         * parse.y (attach_init_test_initialization_flags): Check for
2193         error_mark_node.
2194
2195 2002-10-07  Anthony Green  <green@redhat.com>
2196
2197         * parse.y (merge_string_cste): Fix bug in string concatenation.
2198
2199 2002-10-03  Michael Koch  <konqueror@gmx.de>
2200
2201         * gcj.texi (Standard properties):
2202         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2203
2204 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2205
2206         PR optimization/6627
2207         * lang.c (java_init): If storing the vbit in function
2208         pointers, ensure that force_align_functions_log is atleast
2209         one to aid compatability with g++ vtables.
2210
2211 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
2212
2213         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2214         foul of type-based aliasing.
2215
2216 2002-09-30  Anthony Green  <green@redhat.com>
2217
2218         * gcj.texi (Invoking jv-scan): Fix texinfo.
2219
2220 2002-09-28  Anthony Green  <green@redhat.com>
2221
2222         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2223         (Code Generation): Add -fno-assert documentation.
2224         * jv-scan.c (flag_assert): New global.
2225         (options): Add assert option.
2226         (help): Add --no-assert documentation.
2227         * parse-scan.y (flag_assert): New global.
2228         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2229         (flag_assert): New global.
2230         * java-tree.h (flag_assert): New global.
2231         * lex.c (java_lex): Obey flag_assert.
2232         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2233         calling cc1.
2234
2235 2002-09-26  Andrew Haley  <aph@redhat.com>
2236
2237         * expr.c (build_java_array_length_access): Check for null pointer.
2238         * expr.c (expand_java_arrayload): Likewise.
2239
2240 2002-09-21  Richard Henderson  <rth@redhat.com>
2241
2242         * jcf-parse.c (get_constant): Decode from IEEE no matter
2243         what the target format.
2244
2245 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
2246
2247         * ChangeLog: Follow spelling conventions.
2248         * class.c: Likewise.
2249         * decl.c: Likewise.
2250         * expr.c: Likewise.
2251         * gjavah.c: Likewise.
2252         * java-tree.h: Likewise.
2253         * jcf-dump.c: Likewise.
2254         * jcf-parse.c: Likewise.
2255         * jvspec.c: Likewise.
2256         * lang.c: Likewise.
2257         * mangle.c: Likewise.
2258         * parse.y: Likewise.
2259
2260 2002-09-17  Tom Tromey  <tromey@redhat.com>
2261
2262         * lex.c (java_read_unicode_collapsing_terminators): Handle case
2263         where \r appears at EOF.  Fixes PR java/7950.
2264
2265 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2266
2267         * jvspec.c (lang_specific_driver): Remove unused variable.
2268
2269 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2270
2271         * java-tree.h (union lang_tree_node): Add chain_next option.
2272
2273 2002-09-16  Richard Henderson  <rth@redhat.com>
2274
2275         * jcf-parse.c (get_constant): Runtime check for IEEE format;
2276         use new real.h interface.
2277         * jcf-write.c (find_constant_index): Use new real.h interface.
2278         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2279
2280 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2281
2282         * lang.c: Follow spelling conventions.
2283
2284 2002-09-11  Per Bothner  <per@bothner.com>
2285
2286         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
2287         constant to the type of the field.
2288         (java_complete_tree):  Remove now-redundant code.
2289
2290         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
2291
2292 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
2293
2294         For PR java/5794:
2295         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2296         return label if a ret instruction for the jsr has been reached.
2297
2298 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
2299
2300         * parse.y (DIR_SEPARATOR): Don't define.
2301         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2302
2303 2002-08-28  Andrew Haley  <aph@redhat.com>
2304
2305         * verify.c (verify_jvm_instructions): Allow exception handler
2306         inside code that is being protected, but generate a warning.
2307         * except.c (link_handler): Initialize `expanded' in new eh_range.
2308         (binding_depth, is_class_level, current_pc): Declare extern.
2309
2310 2002-09-01  Mark Wielaard <mark@klomp.org>
2311
2312         * gcj.texi: Add chapter about system properties.
2313         Fixed some typos.
2314
2315 2002-08-26  Tom Tromey  <tromey@redhat.com>
2316
2317         * parse.y (try_builtin_assignconv): Allow narrowing primitive
2318         conversion if RHS_TYPE is byte, short, or char.
2319
2320 2002-08-22  Tom Tromey  <tromey@redhat.com>
2321
2322         * gcj.texi (Invoking gij): Document -cp and -classpath.
2323
2324 2002-08-21  Tom Tromey  <tromey@redhat.com>
2325
2326         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2327         $(prefix)/share.  For PR libgcj/7633.
2328
2329         For PR java/6005 and PR java/7611:
2330         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2331         (java_can_use_bit_fields_p): New function.
2332
2333 2002-08-16  Tom Tromey  <tromey@redhat.com>
2334
2335         * gcj.texi (Class Initialization): Mention class initialization of
2336         arrays.
2337
2338 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
2339
2340         * Make-lang.in (java-tree-inline.o): New.
2341         (JAVA_OBJS): Add java-tree-inline.o.
2342         * parse.y (source_end_java_method): Call java_optimize_inline.
2343         (java_expand_method_bodies): Save method's tree in
2344         DECL_SAVED_TREE.
2345         (add_stmt_to_compound): Keep track of the number of statments.
2346         * lang.c (java_init): Enable flag_inline_trees.
2347         (java_post_options): If flag_inline_functions is on, enable
2348         flag_inline_trees instread.
2349         (decl_constant_value): New.
2350         (java_tree_inlining_walk_subtrees): New.
2351         * java-tree.h (DECL_NUM_STMTS): New macro.
2352         (java_optimize_inline): Declare.
2353         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2354         Handle a LABEL_EXPR.
2355         * decl.c (build_result_decl): If we already have a DECL_RESULT
2356         don't make another.
2357         (dump_function): New.
2358         (java_optimize_inline): New.
2359         (dump_function): New.
2360
2361 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
2362
2363         For PR java/7483:
2364         * parse.y (build_assertion): Invert return from
2365         desiredAssertionStatus.
2366
2367 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2368
2369         * jcf-write.c (get_access_flags): Return correct access flags for
2370         private and protected inner classes.
2371
2372 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2373
2374         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
2375
2376 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2377
2378         * mangle_name.c: Don't include obstack.h twice.
2379         * xref.c: Don't include obstack.h.
2380
2381 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2382
2383         * class.c: (permanent_obstack): Delete declaration.
2384         * constants.c: (permanent_obstack): Delete declaration.
2385         * except.c: (permanent_obstack): Delete declaration.
2386         * expr.c: (permanent_obstack): Delete declaration.
2387         * jcf-parse.c: (permanent_obstack): Delete declaration.
2388         (saveable_obstack): Delete declaration.
2389         * parse.h: (permanent_obstack): Delete declaration.
2390         * typeck.c: (permanent_obstack): Delete declaration.
2391
2392 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2393
2394         * gcj.texi (version-gcc): Increase to 3.3.
2395
2396 2002-07-22  Tom Tromey  <tromey@redhat.com>
2397
2398         * lex.c (java_lex): Check for `e' or `E' after 0.
2399
2400 2002-07-21  Richard Henderson  <rth@redhat.com>
2401
2402         * lang.c (java_unsafe_for_reeval): New.
2403         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2404
2405 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
2406
2407         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
2408         (jcf_path_init): Use GET_ENVIRONMENT.
2409
2410 2002-07-10  Roger Sayle  <roger@eyesopen.com>
2411             Zack Weinberg <zack@codesourcery.com>
2412
2413         * builtins.c (initialize_builtins): Remove defines that
2414         handled C/C++ specific junk hereby removed from builtins.def.
2415
2416 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
2417
2418         * lang.c (java_post_options): Update prototype.
2419
2420 2002-07-05  Roger Sayle  <roger@eyesopen.com>
2421
2422         * builtins.c (initialize_builtins): Ignore the additional
2423         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
2424         the builtins.def file.
2425
2426 2002-07-01  Tom Tromey  <tromey@redhat.com>
2427
2428         For PR libgcj/7073:
2429         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2430         specially.
2431
2432 2002-07-01  Roger Sayle  <roger@eyesopen.com>
2433
2434         * java/decl.c (builtin_function): Accept additional parameter.
2435         (java_init_decl_processing): Pass an additional NULL_TREE
2436         argument to builtin_function.
2437
2438 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
2439
2440         * gcj.texi: Fixed gcj invocation example so that it compiles.
2441
2442 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2443
2444         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
2445         * parse.y (mark_parser_ctxt): Likewise.
2446         (check_modifiers, declare_local_variables): Avoid incorrect
2447         hardcoded constant 10.
2448
2449         * lex.c (java_read_char): Avoid "comparison is always true"
2450         warning.
2451
2452 2002-06-25  Andreas Schwab  <schwab@suse.de>
2453
2454         * expr.c (JSR): Avoid undefined operation on PC.
2455
2456 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2457
2458         * decl.c (clear_binding_level): Const-ify.
2459
2460 2002-06-13  Akim Demaille  <akim@epita.fr>
2461
2462         * parse.y (class_declaration, interface_declaration): Make sure
2463         all their rules have an action, in order to avoid meaningless `$$
2464         = $1' and their type clashes.
2465
2466 2002-06-11  Tom Tromey  <tromey@redhat.com>
2467
2468         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
2469         * parse-scan.y (statement_without_trailing_substatement): Added
2470         assert_statement.
2471         (assert_statement): New rule.
2472         * java-tree.h (struct lang_type) [assertions]: New field.
2473         (TYPE_USES_ASSERTIONS): New macro.
2474         (CLASS_USES_ASSERTIONS): Likewise.
2475         (FIELD_SYNTHETIC): New define.
2476         * lex.c (java_lval;): Added ASSERT_TK.
2477         * parse.y (ASSERT_TK): Added.
2478         (statement_without_trailing_substatement): Added assert_statement.
2479         (assert_statement): New rule.
2480         (build_assertion): New function.
2481         (maybe_generate_pre_expand_clinit): Create and initialize
2482         $assertionsDisabled.
2483         (lookup_package_type): Removed decl.
2484         * keyword.h: Rebuilt.
2485         * keyword.gperf (assert): New token.
2486
2487 2002-06-10  Akim Demaille  <akim@epita.fr>
2488
2489         * parse.y (interface_type_list, class_member_declaration)
2490         (unary_expression_not_plus_minus): Remove duplicate %type.
2491         Whitespace changes.
2492
2493 2002-06-09  Tom Tromey  <tromey@redhat.com>
2494
2495         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
2496
2497         * parse.y (method_header): Give error message in all cases.
2498         Fixes PR java/6865.
2499
2500 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2501
2502         Don't use RTL inlining. Fix for PR java/6820.
2503         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
2504         (flag_really_inline): New.
2505         (java_decode_option): Set flag_really_inline if -finline-functions
2506         is seen.
2507         (java_post_options): New function. Turn off inlining unless
2508         flag_really_inline is set.
2509
2510 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2511
2512         * gjavah.c (throwable_p): Accept argument as either a classname or
2513         signature fragment. Create null-terminated classname string for super
2514         when calling itself recursively.
2515         (decode_signature_piece): Skip first character from class name
2516         signature when calling throwable_p.
2517
2518 2002-06-08  H.J. Lu  (hjl@gnu.org)
2519
2520         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2521
2522 2002-06-04  Tom Tromey  <tromey@redhat.com>
2523
2524         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
2525
2526 2002-06-04  Michael Koch  <konqueror@gmx.de>
2527
2528         * gcj.texi (Input Options): Fixed typo.
2529
2530 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
2531
2532         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
2533         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
2534         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
2535         and all now-pointless local variables.  Rename other local
2536         variables to reflect their not being handles.
2537
2538         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
2539         #if JCF_USE_STDIO blocks.
2540
2541         * parse.y: Add missing semicolon at end of rule.
2542
2543 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2544
2545         * check-init.c (attach_initialized_static_class): Delete, unused.
2546         * parse.y: Use htab_t instead of struct hashtable, update
2547         all uses.
2548         * java-tree.h: Include hashtab.h instead of hash.h.
2549         (struct lang_decl_func): Use htab_t, set up for gengtype.
2550         (struct init_test_hash_entry): Delete.
2551         (struct treetreehash_entry): New.
2552         (java_treetreehash_find): New
2553         (java_treetreehash_new): New prototype.
2554         (java_treetreehash_create): New prototype.
2555         (java_mark_tree): Delete prototype.
2556         (java_hash_hash_tree_node): Delete prototype.
2557         (java_hash_compare_tree_node): Delete prototype.
2558         (attach_initialized_static_class): Delete prototype.
2559         * expr.c (build_class_init): Update to use java_treetreehash
2560         functions.
2561         (java_expand_expr): Update to use htab_t.
2562         (emit_init_test_initialization): Likewise.
2563         * decl.c (java_mark_tree): Delete.
2564         * class.c (init_test_hash_newfunc): Delete.
2565         (java_hash_hash_tree_node): Delete.
2566         (java_hash_compare_tree_node): Delete.
2567         (add_method_1): Update to use java_treetreehash functions.
2568         (JAVA_TREEHASHHASH_H): New macro.
2569         (java_treetreehash_hash): New function.
2570         (java_treetreehash_compare): New function.
2571         (java_treetreehash_find): New function.
2572         (java_treetreehash_new): New function.
2573         (java_treetreehash_create): New function.
2574         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
2575
2576         * Make-lang.in (java/parse.o): Depend on debug.h.
2577         * java-tree.h (struct lang_identifier): Use gengtype.
2578         (union lang_tree_node): New.
2579         (struct lang_decl_func): Use gengtype.
2580         (struct lang_decl_var): Likewise.
2581         (struct lang_decl): Likewise.
2582         * parse.y: Include debug.h.
2583         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
2584
2585         * lang.c (struct language_function): New dummy structure.
2586
2587         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
2588         descriminator for DECL_LANG_SPECIFIC.
2589         (struct lang_decl_func): Rename from struct lang_decl.
2590         (enum lang_decl_desc): New.
2591         (struct lang_decl): Make it a union.  Update all the accessor macros.
2592         (struct lang_type): Use gengtype.
2593         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
2594         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
2595         are now the same size.
2596         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
2597         use discriminator to mark DECL_LANG_SPECIFIC.
2598
2599         * Make-lang.in (gt-java-builtins.h): New rule.
2600         (java/builtins.o): Add dependency on gt-<filename>.h.
2601         * builtins.c: Use gengtype for roots.
2602         (union string_or_tree): Use gengtype.
2603         (struct builtin_record): Use gengtype.
2604         * config-lang.in (gtfiles): Add builtins.c.
2605
2606         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
2607         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
2608         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
2609         gt-java-parse.h, gtype-java.h): Add rules to generate.
2610         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
2611         (class.o): Add dependency on gt-*.h.
2612         (constants.o): Likewise.
2613         (decl.o): Likewise.
2614         (expr.o): Likewise.
2615         (jcf-parse.o): Likewise.
2616         (jcf-write.o): Likewise.
2617         (lang.o): Likewise.
2618         * config-lang.in (gtfiles): New.
2619         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2620         * constants.c: Replace uses of ggc_add_* with GTY markers.
2621         Include gt-*.h.
2622         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2623         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2624         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
2625         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
2626         Include gt-*.h.
2627         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
2628         Include gt-*.h.
2629         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2630         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
2631         gt-*.h.
2632         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2633         Include gtype-java.h.
2634
2635 2002-06-02  Tom Tromey  <tromey@redhat.com>
2636
2637         Fix for PR java/5913:
2638         * parse.y (patch_binop): Call patch_string on op1.
2639
2640 2002-06-02  Tom Tromey  <tromey@redhat.com>
2641
2642         Fix for PR java/1343, PR java/6336:
2643         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
2644         formatting.  Changed return type.
2645         (anonymous_class_counter): Moved to top of file.
2646         (maybe_make_nested_class_name): Append number to class name for
2647         function-local classes.
2648
2649 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2650
2651         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
2652         * Make-lang.in: Update dependency lists.
2653
2654 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
2655
2656         * gjavah.c (throwable_p): Do not free the name of the class after
2657         passing it to find_class.
2658         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
2659         * jcf-io.c (dirent.h): Include it.
2660         (fnmatch.h): Likewise.
2661         (compare_path): New function.
2662         (java_or_class_file): Likewise.
2663         (memoized_dirlist_entry): New type.
2664         (memoized_dirlist_lookup_eq): New function.
2665         (memoized_dirlists): New variable.
2666         (caching_stat): New function.
2667         (memoized_class_lookup_eq): New function.
2668         (memoized_class_lookups): Likewise.
2669         (find_class): Use memoized_class_lookups and caching_stat.
2670         * jcf.h (JCF_USE_SCANDIR): Define.
2671         * parse.y (java_expand_classes): Write the class files in reverse
2672         order.
2673
2674 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2675
2676         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2677
2678 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
2679
2680         * jcf-write.c (write_classfile): Unlink the temporary file if it
2681         cannot be renamed.  Use concat to build up the name of the
2682         temporary file.
2683
2684 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
2685
2686         * jcf-write.c (write_classfile): Write the file to a
2687         temporary file and then rename it.
2688
2689 2002-05-07  Tom Tromey  <tromey@redhat.com>
2690
2691         * gjavah.c (throwable_p): Use xstrdup, not strdup.
2692
2693         Fix for PR java/1200:
2694         * gjavah.c (throwable_p): New function.
2695         (decode_signature_piece): Use it.  A `WeakReference' isn't the
2696         same as a `jweak'.
2697         Include hashtab.h.
2698         (gcjh_streq): New function.
2699
2700 2002-05-07  Andreas Jaeger  <aj@suse.de>
2701
2702         * parse.y (finish_for_loop): Fix if statement.
2703
2704 2002-05-06  Tom Tromey  <tromey@redhat.com>
2705
2706         Fix for PR java/5941:
2707         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
2708         loop update expression.
2709         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
2710         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2711
2712 2002-05-04  Mark Wielaard  <mark@klomp.org>
2713
2714         For PR java/6519:
2715         * parse.y (build_string_concatenation): Return just op1 only when op2
2716         is null and op1 is a STRING_CST, otherwise always construct a
2717         StringBuffer.
2718
2719 2002-04-27  Tom Tromey  <tromey@redhat.com>
2720
2721         For PR java/6382:
2722         * parse.y (string_convert_int_cst): New function.
2723         (merge_string_cste): Use it.
2724
2725 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2726
2727         * java-tree.h (java_parse_file): Update.
2728         (java_set_yydebug): Remove.
2729         * jcf-parse.c (yydebug): Remove.
2730         (java_set_yydebug): Die.
2731         (java_parse_file): Update.
2732         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2733
2734 2002-04-24  Tom Tromey  <tromey@redhat.com>
2735
2736         For PR java/6425:
2737         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
2738         EXPR_WFL_QUALIFICATION of qual_wfl.
2739
2740 2002-04-23  Per Bothner  <per@bothner.com>
2741
2742         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
2743         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
2744         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
2745
2746 2002-04-23  Tom Tromey  <tromey@redhat.com>
2747
2748         For PR java/6314:
2749         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
2750         recognize `-fcompile-resource='.
2751         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
2752         a bit.
2753
2754 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2755
2756         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
2757         paths. Fixes PR java/2791.
2758
2759 2002-04-19  Andrew Haley  <aph@redhat.com>
2760
2761         * jcf-write.c (push_long_const): lo, hi: New variables.
2762         Use rshift_double to extract the high part of a 64-bit long.
2763         Use WORD_TO_INT to extract the low part.
2764
2765         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
2766         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
2767         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
2768
2769 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2770
2771         * typeck.c (incomplete_type_error): Remove.
2772
2773 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2774
2775         * class.c (make_class_data): Set DECL_ALIGN on static class data,
2776         for hash synchronization.
2777         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
2778         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
2779         class_type_node.
2780
2781 2002-04-16  Mark Wielaard  <mark@klomp.org>
2782
2783         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
2784         negative zero.
2785
2786 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2787
2788         Fix for PR java/6294:
2789         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
2790         interfaces.
2791
2792 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2793
2794         Fix for PR java/6085:
2795         * parse.y (patch_method_invocation): Always use build_access_to_thisn
2796         to get enclosing "this" argument for inner-class constructor
2797         invocation. Pass correct arguments to build_access_to_thisn.
2798
2799 2002-04-10  Andreas Jaeger  <aj@suse.de>
2800
2801         * gcj.texi (Input Options): Fix extdirs patch.
2802
2803 2002-04-10  Anthony Green  <green@redhat.com>
2804
2805         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
2806
2807 2002-04-09  Anthony Green  <green@redhat.com>
2808
2809         * gcj.texi (Input Options): Add --extdirs documentation.
2810         * jcf-dump.c (OPT_extdirs): New macro.
2811         (options): Add extdirs option.
2812         (help): Describe --extdirs.
2813         (main): Handle OPT_extdirs.
2814         * gjavah.c (OPT_extdirs): New macro.
2815         (options): Add extdirs option.
2816         (help): Describe --extdirs.
2817         (main): Handle OPT_extdirs.
2818         * jcf-path.c (jcf_path_init): Add extdirs support.
2819         (jcf_path_extdirs_arg): New function.
2820         (extensions): New variable to hold extensions path entries.
2821         * jvspec.c: Remove -fextdirs= when compiling main().
2822         * lang.c (java_decode_option): Handle -fextdirs=.
2823         * jcf.h (jcf_path_extdirs_arg): Declare new function.
2824         * Make-lang.in: Compile jcf-path with version info for use in
2825         identifying the appropriate libgcj.jar.
2826
2827 2002-04-08  Tom Tromey  <tromey@redhat.com>
2828
2829         For PR libgcj/5303:
2830         * .cvsignore: Added rmic.1 and rmiregistry.1.
2831         * gcj.texi (Top): Link to new nodes.
2832         (Invoking rmic): New node.
2833         (Invoking rmiregistry): Likewise.
2834         * Make-lang.in (java.generated-manpages): Added rmic.1 and
2835         rmiregistry.1.
2836         (java.maintainer-clean): Likewise.
2837         ($(srcdir)/java/rmic.1): New target.
2838         ($(srcdir)/java/rmiregistry.1): Likewise.
2839         (java.install-man): Handle rmic.1 and rmiregistry.1.
2840
2841 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2842
2843         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
2844         Add note about handling uncaught exceptions. Add an exception handler
2845         to example.
2846
2847 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2848
2849         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
2850         after using it to patch CALL_EXPR.
2851
2852 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2853
2854         * gcj.texi (Invocation): Document CNI invocation API.
2855
2856 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
2857
2858         * expr.c (truthvalue_conversion): Rename.  Update.
2859         (expand_compare): Update.
2860         * java-tree.h (java_truthvalue_conversion): New.
2861         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2862
2863 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2864
2865         * java-tree.h (java_mark_addressable): New.
2866         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
2867         * typeck.c (mark_addressable): Rename, update.
2868
2869 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2870
2871         * expr.c (build_java_binop): Update.
2872         * java-tree.h (java_signed_type, java_unsigned_type,
2873         java_signed_or_unsigned_type): Update.
2874         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2875         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
2876         * parse.y (patch_binop): Update.
2877         * typeck.c (signed_or_unsigned_type, unsigned_type,
2878         signed_type): Update.
2879
2880 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
2881
2882         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
2883         (java_dummy_print): Remove.
2884         (lang_print_error): Rename.  Exit early if inhibiting output.
2885         (inhibit_error_printing_function): New.
2886         (java_init): Don't set hook.
2887         (lang_init_source): Use new boolean.
2888
2889 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
2890
2891         * parse.y (do_resolve_class): Fix infinite recursion.
2892
2893 2002-03-29  Tom Tromey  <tromey@redhat.com>
2894
2895         * parse.y (check_inner_circular_reference): Ignore incomplete
2896         types.
2897
2898 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
2899
2900         * Make-lang.in (builtins.o): Update.
2901         * boehm.c (get_boehm_type_descriptor): Update.
2902         * builtins.c: Include langhooks.h.
2903         * decl.c (java_init_decl_processing): Update.
2904         * java-tree.h (java_type_for_mode, java_type_for_size): New.
2905         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
2906         Redefine.
2907         * typeck.c (type_for_mode, type_for_size): Update.
2908
2909 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
2910
2911         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
2912
2913 2002-03-28  Tom Tromey  <tromey@redhat.com>
2914
2915         * except.c (expand_end_java_handler): If the handler type is NULL,
2916         use java.lang.Throwable.  Fixes PR java/5986.
2917
2918 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2919
2920         Fix for PR java/4715:
2921         * jcf-parse.c (parse_source_file_3): New function.
2922         (read_class): Call it.
2923         (java_parse_file): Likewise.
2924
2925 2002-03-28  Jan Hubicka  <jh@suse.cz>
2926
2927         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
2928
2929 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2930
2931         * parse.y (resolve_package): Initialize "decl".
2932         (lookup_package_type): Remove unused function.
2933
2934 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2935
2936         Fix for PR java/5993:
2937         * parse.y (resolve_package): Return the decl if resolution was
2938         successful. Don't special case "java.lang" and "java.lang.reflect"
2939         packages. Set type_name to the merged identifier.
2940         (resolved_qualified_expression_name): Print error using "name" if
2941         resolve_package returns NULL_TREE.
2942
2943 2002-03-27  Tom Tromey  <tromey@redhat.com>
2944
2945         * expr.c (expand_invoke): Don't generate null pointer check if
2946         we're calling <init>.
2947
2948 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
2949
2950         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
2951         fix prototype.
2952         * java-tree.h (java_lang_expand_expr): Similarly.
2953         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
2954         (java_init): Don't set hook.
2955
2956 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2957
2958         Fix for PR java/5850:
2959         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
2960         context if field was not found in the current scope.
2961         * expr.c (lookup_field): Don't look in enclosing contexts.
2962
2963 2002-03-26  Tom Tromey  <tromey@redhat.com>
2964
2965         Fix for PR java/5942:
2966         * parse.y (init_src_parse): Added sanity check.
2967         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
2968         elements, not 11.
2969
2970 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
2971
2972         * decl.c (lang_mark_tree): Rename java_mark_tree.
2973         * java-tree.h (java_mark_tree): New.
2974         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2975
2976 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
2977
2978         * lex.c: Change java_perform_atof to take normal parameters
2979         instead of a pointer to a parameter block.  Call it directly
2980         from java_lex.
2981
2982 2002-03-22  Mark Wielaard  <mark@klomp.org>
2983
2984         Fix for PR java/5368:
2985         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
2986         when printing error message.
2987
2988 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2989
2990         * decl.c (maybe_build_cleanup): Remove.
2991
2992 2002-03-22  Tom Tromey  <tromey@redhat.com>
2993
2994         Andrew Haley  <aph@cambridge.redhat.com>
2995
2996         * expr.c (build_field_ref): Don't build a check if the field is a
2997         member of `this'.
2998
2999 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
3000
3001         Fix for PR java/6026:
3002         * lex.c (java_lex): Fix parsing of consecutive floats.
3003
3004 2002-03-21  Tom Tromey  <tromey@redhat.com>
3005
3006         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3007         class.
3008
3009 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3010
3011         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3012         insert_block, getdecls, kept_level_p, global_bindings_p): New.
3013
3014 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3015
3016         * gcj.texi: @code{gcj} becomes @command{gcj}.
3017         @code{gcc} becomes @command{gcc}.
3018         GcjRaw changed to gnu.gcc.RawData.
3019
3020 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3021
3022         * decl.c (start_java_method): Use new hook.
3023         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3024         (java_init): Remove old hook.
3025
3026 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3027
3028         * builtins.c (define_builtin): Do nothing if `type' is null.
3029         Fixes PR java/5876.
3030
3031 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3032
3033         * parse.y (parser_check_super_interface): Fix error message
3034         grammar/order.
3035
3036 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3037
3038         * jcf-parse.c (get_constant): Delete unused variables.
3039
3040 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3041
3042         * java-tree.h (java_parse_file): New.
3043         * jcf-parse.c (yyparse): Rename java_parse_file.
3044         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3045
3046 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3047
3048         * parse.y (craft_constructor): Return the constructor decl.
3049         (java_expand_classes): Update comments.
3050         (lookup_method_invoke): Call fix_constructors immediately for
3051         anonymous class. Fixes PR java/5935.
3052
3053 2002-03-15  Anthony Green  <green@redhat.com>
3054
3055         * jcf-parse.c (yyparse): Don't emit class registration
3056         constructor when compiling resource files.
3057
3058 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3059
3060         * lang.c (java_tree_code_type, java_tree_code_length,
3061         tree_code_name): Delete.
3062         (tree_code_type, tree_code_length, tree_code_name): Define.
3063         (java_init): Don't try to copy into the various tree_code
3064         arrays.
3065
3066 2002-03-12  Tom Tromey  <tromey@redhat.com>
3067
3068         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3069         UTF-8, not UCS-2.  Fixes PR java/5923.
3070
3071         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3072         a call_expr wrapped in a convert.  Fixes PR java/5848.
3073
3074 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3075
3076         * jcf-write.c (write_classfile): Improve error strings.
3077
3078 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3079
3080         * lex.c: Adjust comments to GNU standards.
3081
3082 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3083
3084         Fix for PR java/5902:
3085         * lex.c (java_lex): Fix parsing of literals.
3086
3087 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3088
3089         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3090         to prevent it getting evaluated twice in the store checking case.
3091         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3092         examining OBJECT.
3093
3094 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3095
3096         * decl.c (java_init_decl_processing): Make sure class_type_node
3097         alignment is not less than 64 bits if hash synchronization is enabled.
3098
3099 2002-03-08  Per Bothner  <per@bothner.com>
3100
3101         * parse.y (java_complete_lhs):  Check if patch_assignment
3102         returned an error-mark.
3103
3104         * parse.y (try_builtin_assignconv):  Don't special-case zero.
3105
3106 2002-03-08  Per Bothner  <per@bothner.com>
3107
3108         Fix for PR java/5812.
3109         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
3110         here instead of in JSR macro.  Likewise with load_type_state call.
3111         Do the latter on if the return_pc has been verified (the jsr returns).
3112         (JSR):  Now just call build_java_jsr.
3113
3114 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
3115
3116         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3117         (java.install-common): Link native driver to
3118         JAVA_TARGET_INSTALL_NAME.
3119
3120 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
3121
3122         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3123         * builtins.c(sin_builtin): Likewise
3124         * builtins.c(sqrt_builtin): Likewise
3125
3126 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
3127
3128         * java/expr.c, java/jcf-parse.c, java/lex.c:
3129         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3130         REAL_ARITHMETIC blocks unconditional.  Delete some further
3131         #ifdef blocks predicated on REAL_ARITHMETIC.
3132
3133 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3134
3135         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3136         explicit sizeof/sizeof.
3137         * decl.c (java_init_decl_processing): Likewise.
3138         * jcf-parse.c (init_jcf_parse): Likewise.
3139         * parse.y (init_src_parse): Likewise.
3140
3141 2002-03-02  Per Bothner  <per@bothner.com>
3142
3143         Make --CLASSPATH by a synonym for --classpath and -classpath.
3144         Implement --bootclasspath.
3145         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
3146         (classpath_l):  Remove.
3147         (jcf_path_CLASSPATH_arg):  Remove.
3148         (jcf_path_bootclasspath_arg):  New function.
3149         (jcf_path_seal):  Simplify accordingly.
3150
3151         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
3152         (jcf_path_CLASSPATH):  Remove declaration.
3153         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
3154         (lang_specific_driver):  Translate -bootclasspath.
3155         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
3156         * lang.c (decode_lang_options):  Do jcf_path_init first.
3157         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
3158         * gjavah.c:  Also handle --bootclasspath.
3159         Handle --CLASSPATH as a synonum for --classpath.
3160         * jcf-dump.c: Likewise.
3161
3162         "." is not part of system path, but is the default for --classpath.
3163         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
3164         (jcf_path_seal):  Add "." if no CLASSPATH specified.
3165
3166         * gcj.texi:  Document changes.
3167
3168 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3169
3170         * expr.c (build_java_arraystore_check): Fix formatting.
3171
3172 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3173
3174         Fix for PR java/5758, java/5632:
3175         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3176         inner-class separator too.
3177         * parse.y (do_resolve_class): New local `decl_result.'
3178         Progressively build a name for what can have been loaded.
3179
3180 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3181
3182         * expr.c (java_array_data_offset): Removed function.
3183         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3184         (build_java_array_length_access): Obtain "length" value using a
3185         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3186         (build_java_arrayaccess): Correct comment. Access "data" using a
3187         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3188         (build_java_arraystore_check): New function.
3189         (expand_java_arraystore): Use build_java_arraystore_check.
3190         * parse.y (patch_assignment): Simplify code to insert a store check
3191         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3192         * check-init.c (check_init): Update to reflect that an array length
3193         access is now a COMPONENT_REF.
3194         * gcj.texi (Code Generation): Improve documentation of
3195         -fno-bounds-check. Add documentation for -fno-store-check.
3196         * java-tree.h (flag_store_check): Declare.
3197         (build_java_arraystore_check): Declare.
3198         * lang.c (flag_store_check): Initialize to 1.
3199         (lang_f_options): Add store-check option.
3200         * jvspec.c: Don't pass store-check option to jvgenmain.
3201         * lang-options.h: Add help string for -fno-store-check.
3202
3203 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3204
3205         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3206         * java-tree.h (java_dup_lang_specific_decl): New.
3207         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3208
3209 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3210
3211         * builtins.c, decl.c: Delete traditional-mode-related code
3212         copied from the C front end but not used, or used only to
3213         permit the compiler to link.
3214
3215 2002-02-22  Tom Tromey  <tromey@redhat.com>
3216
3217         Fix for PR java/2369:
3218         * jvspec.c (verify_class_name): New function.
3219         (lang_specific_driver): Call it.
3220         (JAVA_START_CHAR_P): New macro.
3221         (JAVA_PART_CHAR_P): Likewise.
3222
3223 2002-02-22  Per Bothner  <per@bothner.com>
3224
3225         * class.c:  Change vtable to be more compatible with g++ v3 abi.
3226         (get_dispatch_table):  Prepend offset-to-top (always 0) and
3227         type_info pointer (currently unimplemented hence NULL) to vtable.
3228         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3229         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
3230         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3231         (build_dtable_decl):  Add declarations for new fields.
3232
3233 2002-02-20  Per Bothner  <per@bothner.com>
3234
3235         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3236         to finit$ (otherwise generate_bytecode_insns drops it). However, we
3237         don't need to set it on the COMPOUND_EXPR - the caller does that.
3238
3239 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3240
3241         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3242         `--CLASSPATH' becomes `--classpath.'
3243         * gjavah.c: Likewise.
3244         * jcf-dump.c: Likewise.
3245         * lang-options.h: Likewise.
3246         * lang.c: Likewise.
3247         * jcf-path.c: Updated comment.
3248         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3249         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3250         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3251         (jcf_path_CLASSPATH_arg): Ditto.
3252         (classpath_u): Updated leading comment.
3253
3254 2002-02-20  Per Bothner  <per@bothner.com>
3255
3256         * builtins.c (check_for_builtin):  New function.
3257         (build_call_or_builtin):  Remove.
3258         * java-tree.h:  Update accordingly.
3259         * expr.c (expand_invoke):  Use build + check_for_builtin instead
3260         of build_call_or_builtin.
3261         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
3262         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3263         flag (which had caused jcf-write to incorrectly emit invokevirtual).
3264
3265 2002-02-17  Tom Tromey  <tromey@redhat.com>
3266
3267         * java-tree.h (TYPE_STRICTFP): New macro.
3268         (struct lang_type) [strictfp]: New field.
3269         (CLASS_STRICTFP): New macro.
3270         (METHOD_STRICTFP): New macro.
3271         (struct lang_decl) [strictfp]: New field.
3272         * parse.y (method_header): Disallow strictfp constructor or
3273         abstract method.
3274         (STRICT_TK): Move before MODIFIER_TK.
3275         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3276         (METHOD_MODIFIERS): Likewise.
3277         (INTERFACE_MODIFIERS): Likewise.
3278         * jcf-write.c (get_access_flags): Likewise.
3279         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3280         (add_method_1): Likewise.
3281         (get_access_flags_from_decl): Likewise.
3282         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
3283         recognize strictfp flag.
3284         * jcf.h (ACC_STRICT): New define.
3285
3286 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
3287
3288         * class.c(build_utf8_ref): Move declaration of decl_size
3289
3290 2002-02-07  Tom Tromey  <tromey@redhat.com>
3291
3292         * gcj.texi (Input Options): --CLASSPATH does not suppress system
3293         path.
3294
3295 2002-02-04  Anthony Green  <green@redhat.com>
3296
3297         * class.c (build_utf8_ref): Put UTF-8 constants into merged
3298         sections if available.
3299
3300 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3301
3302         * parse.y (java_expand_classes): Fix typo in static field loop.
3303
3304 2002-02-02  Richard Henderson  <rth@redhat.com>
3305
3306         * class.c (add_field): Mark static fields external.
3307         (build_class_ref): Remove redundant set.
3308         * parse.y (java_expand_classes): Mark static fields of classes
3309         to be compiled as local.
3310         * jcf-parse.c (parse_class_file): Likewise.
3311
3312 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3313
3314         * gcj.texi (About CNI): New node.
3315
3316 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3317
3318         PR java/5080
3319         * jcf-parse.c : Check for HAVE_LOCALE_H before using
3320         setlocale() with LC_CTYPE as a parameter.
3321         * jv-scan.c: Same.
3322
3323 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
3324
3325         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3326         Follow GNU Coding Standards for --version.
3327
3328 2002-01-28  Tom Tromey  <tromey@redhat.com>
3329
3330         * expr.c (build_jni_stub): Ensure storage for `meth' is
3331         generated.
3332         * parse.y (java_complete_expand_methods): Set
3333         current_function_decl before building JNI stub.
3334
3335 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3336
3337         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3338         BUILT_IN_SQRTF.
3339
3340 2002-01-22  Tom Tromey  <tromey@redhat.com>
3341
3342         * decl.c (java_init_decl_processing): Use add_predefined_file.
3343         Predefine RawData.java.
3344         (predef_filenames): Removed.
3345         (java_init_decl_processing): Don't register predef_filenames.
3346         * jcf-parse.c (add_predefined_file): New function.
3347         (predefined_filename_p): Rewrote.
3348         (predefined_filename_p): No longer static.
3349         * decl.c (java_init_decl_processing): Call initialize_builtins.
3350         * Make-lang.in (JAVA_OBJS): Added builtins.o.
3351         (java/builtins.o): New target.
3352         * builtins.c: New file.
3353         * parse.y (patch_invoke): Use build_call_or_builtin.
3354         * java-tree.h (build_call_or_builtin): Declare.
3355         (initialize_builtins): Declare.
3356         (java_set_exception_lang_code): Removed unused declaration.
3357         (PREDEF_FILENAMES_SIZE): Removed.
3358         (java_tree_index): Added JTI_PREDEF_FILENAMES.
3359         (predef_filenames): New define.
3360         (add_predefined_file): Declare.
3361         (predefined_filename_p): Declare.
3362         * expr.c (expand_invoke): Use build_call_or_builtin.
3363
3364 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3365
3366         * parse.y (patch_switch_statement): Fix format specifier.
3367
3368 2002-01-16  Tom Tromey  <tromey@redhat.com>
3369
3370         More for PR java/5365:
3371         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
3372         default.
3373         (process_file): Generate include for
3374         java.lang.UnsupportedOperationExceptions.
3375
3376 2002-01-15  Andreas Jaeger  <aj@suse.de>
3377
3378         * .cvsignore: Add man pages.
3379
3380 2002-01-15  Tom Tromey  <tromey@redhat.com>
3381
3382         Fix for PR java/5365:
3383         * gjavah.c (process_file): Turn class name into a file name.
3384
3385 2002-01-14  Matthias Klose  <doko@debian.org>
3386
3387         * gcj.texi: Fix whitespace and formatting errors in the
3388         synopsis of the man pages. Update copyright.
3389
3390 2002-01-14  Tom Tromey  <tromey@redhat.com>
3391
3392         For PR libgcj/5303:
3393         * Make-lang.in (java.install-man): Handle jv-convert man page.
3394         (java.generated-manpages): Added jv-convert.1.
3395         (java.uninstall): Remove jv-convert.1.
3396         (java.maintainer-clean): Likewise.
3397         ($(srcdir)/java/jv-convert.1): New target.
3398         * gcj.texi (Top): Link to jv-convert node.
3399         (Individual utilities): Likewise.
3400         (Invoking jv-convert): New node.
3401
3402 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
3403             Martin Kahlert  <martin.kahlert@infineon.com>
3404
3405         * jcf-parse.c (get_constant): Don't swap lo/hi for big
3406         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
3407
3408 2002-01-03  Graham Stott  <grahams@redhat.com>
3409
3410         * class.c (compile_resource_file): Update copyright date.
3411         Constify filename parameter.
3412         (java-tree.h): Update copyright date.
3413         (compile_resource_file): Constify filename parameter.
3414
3415 2002-01-03  Graham Stott  <grahams@redhat.com>
3416
3417         * gcc/jcf-parse.c: Update copyright date.
3418         (yyparse): Constify resource_filename.
3419
3420 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3421
3422         * parse.y (src_parse_roots): Don't needlessly zero init.
3423
3424 2001-12-31  Tom Tromey  <tromey@redhat.com>
3425
3426         * parse.y (dump_java_tree): New function.
3427         (source_end_java_method): Call it.
3428         (end_class_declaration): Likewise.
3429         * lang.c (java_decode_option): Call dump_switch_p.
3430
3431 2001-12-28  Tom Tromey  <tromey@redhat.com>
3432
3433         * gen-table.pl: Don't process characters after \uffff.  Added
3434         comment pointing to input file.
3435
3436 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3437
3438         * gen-table.pl: Const-ify output.  Document the location of a
3439         suitable unicode input file.
3440
3441         * chartables.h: Regenerate.
3442
3443 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3444
3445         * chartables.h: Const-ify.
3446         * gjavah.c (options): Likewise.
3447         * jcf-dump.c (options): Likewise.
3448         * jv-scan.c (options): Likewise.
3449         * lex.c (java_start_char_p, java_part_char_p): Likewise.
3450         * parse.y (binop_lookup): Likewise.
3451
3452 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3453
3454         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
3455         the static arrays that are output.
3456         * jvspec.c (jvgenmain_spec): Make static.
3457         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
3458         * keyword.h: Regenerate.
3459         * lang.c (string_option, process_option_with_no, lang_f_options,
3460         lang_W_options): Const-ify.
3461         * lex.c (java_lex): Likewise.
3462
3463 2001-12-21  Richard Henderson  <rth@redhat.com>
3464
3465         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
3466         (get_boehm_type_descriptor): ... here.  Arrange for the
3467         TREE_TYPE to get set properly.
3468
3469 2001-12-21  Richard Henderson  <rth@redhat.com>
3470
3471         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
3472         only if the target requires collect2.
3473
3474         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
3475
3476 2001-12-20  Tom Tromey  <tromey@redhat.com>
3477
3478         For PR java/4509:
3479         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
3480         CAN_COMPLETE_NORMALLY for the node.
3481         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
3482         generate code for second branch if first branch can't complete
3483         normally.
3484         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
3485         the loop head if the loop body can't complete normally.
3486
3487 2001-12-20  Tom Tromey  <tromey@redhat.com>
3488
3489         For PR java/4766:
3490         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
3491         case where `finally' clause can't complete normally.
3492
3493 2001-12-20  Tom Tromey  <tromey@redhat.com>
3494
3495         Fixes PR java/5057:
3496         * parse.y (analyze_clinit_body): Added this_class parameter.
3497         Check for more cases where we must keep <clinit>.
3498         (maybe_yank_clinit): Cleaned up flow control.
3499
3500 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3501
3502         * decl.c (java_init_decl_processing): Don't initialize
3503         finit_leg_identifier_node.
3504         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
3505         (finit_leg_identifier_node): Remove.
3506         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
3507
3508 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3509
3510         * mangle.c (mangle_member_name): Don't special-case for
3511         NO_DOLLAR_IN_LABEL.
3512         * mangle_name.c (unicode_mangling_length): Likewise.
3513         (append_unicode_mangled_name): Likewise.
3514         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
3515         code.
3516
3517 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3518
3519         * expr.c (build_java_array_length_access): Don't force null pointer
3520         check unless flag_check_references is set.
3521
3522 2001-12-20  Tom Tromey  <tromey@redhat.com>
3523
3524         Fix for PR java/3417:
3525         * parse.y (patch_assignment): Added special processing for
3526         `return'.
3527         (patch_return): Don't convert booleans to integers, and don't
3528         special-case `null'.
3529
3530 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
3531
3532         * config-lang.in (diff_excludes): Remove.
3533
3534 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3535
3536         * gcj.texi: Update link to GCC manual.
3537
3538 2001-12-17  Tom Tromey  <tromey@redhat.com>
3539
3540         * parse.y (link_nested_class_to_enclosing): Removed useless
3541         statement.
3542
3543 2001-12-16  Tom Tromey  <tromey@redhat.com>
3544
3545         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
3546         Fixes PR java/5088.
3547
3548 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
3549
3550         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
3551         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
3552         spelling errors.
3553
3554 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3555
3556         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
3557
3558 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3559
3560         * decl.c (java_init_decl_processing): Build otable_type correctly.
3561         otable_decl is an otable_type.
3562
3563 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3564
3565         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
3566         otable_type, otable_ptr_type, method_symbol_type,
3567         method_symbols_array_type, method_symbols_array_ptr_type): New
3568         field/global tree definitions.
3569         (flag_indirect_dispatch): New flag.
3570         * decl.c (java_init_decl_processing): Initialize new otable and
3571         otable_syms type nodes and decls. Add new field "index" to
3572         method_type_node.
3573         * class.c (build_method_symbols_entry): New function.
3574         (make_method_value): Set "index" to to method's vtable index for
3575         virtual methods when indirect-dispatch is not used.
3576         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
3577         and set vtable_method_count to -1. Set otable and otable_syms field
3578         if indirect-dispatch is used and there was something to put in them.
3579         (build_method_symbols_entry): New function.
3580         (emit_offset_symbol_table): New function.
3581         * expr.c (get_offset_table_index): New function.
3582         (build_invokevirtual): Build array reference to otable at the index
3583         returned by get_offset_table_index, and use the result as the vtable
3584         offset.
3585         (build_invokeinterface): Similar.
3586         * jcf-parse.c (yyparse): If indirect-dispatch, call
3587         emit_offset_symbol_table at the end of compilation, after all classes
3588         have been generated.
3589         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
3590         * lang.c (flag_indirect_dispatch): Define.
3591         (lang_f_options): Add indirect-dispatch flag.
3592
3593 2001-12-14  Matthias Klose  <doko@debian.org>
3594
3595         * gcj.texi: Markup for man page generation. Document missing
3596         options printed by <tool> --help.
3597         Terminate description of gij's -ms option with a dot.
3598         * Make-lang.in ($(srcdir)/java/*.1): New targets.
3599         (java.generated-manpages java.install-man, java.uninstall,
3600         java-maintainer-clean) Updated.
3601
3602 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
3603
3604         * class.c (get_dispatch_table): Fix java vtable layout
3605         for TARGET_VTABLE_USES_DESCRIPTORS.
3606         * decl.c (java_init_decl_processing): Initialize
3607         alloc_no_finalizer_node, finalize_identifier_node.
3608         * expr.c (class_has_finalize_method): New function.
3609         (expand_java_NEW): Generate calls for finalizer-free allocation.
3610         (build_invokevirtual): Fix java vtable layout for
3611         TARGET_VTABLE_USES_DESCRIPTORS.
3612         * java-tree.h (enum java_tree_index): New entries:
3613         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
3614         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
3615         (class_has_finalize_method): declare.
3616         (HAS_FINALIZER_P): New macro.
3617         * parse.y (patch_invoke): Generate calls for finalizer-free
3618         allocation.
3619
3620 2001-12-12  Matthias Klose  <doko@debian.org>
3621
3622         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
3623         whitespace at end of line.
3624
3625 2001-12-11  Tom Tromey  <tromey@redhat.com>
3626
3627         * lex.c (java_init_lex): Define wfl_to_string as
3628         gnu.gcj.runtime.StringBuffer unless generating bytecode.
3629
3630 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
3631
3632         * class.c (make_method_value): Use null_pointer_node to
3633         represent empty exception table.
3634
3635 2001-12-10  Tom Tromey  <tromey@redhat.com>
3636
3637         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
3638
3639 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
3640
3641         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
3642
3643 2001-12-09  Per Bothner  <per@bothner.com>
3644
3645         * check-init.c (current_switch_has_default):  New static field.
3646         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
3647         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
3648         DEFAULT_EXPR seen, simulate a default alternative that copies state.
3649
3650 2001-12-09  Tom Tromey  <tromey@redhat.com>
3651
3652         * check-init.c (check_init): Don't allow pre- or post- increment
3653         or decrement of final variable.
3654         (final_assign_error): Minor error message rewording.
3655
3656 2001-12-08  Tom Tromey  <tromey@redhat.com>
3657
3658         * java-tree.h: Fixed typo.
3659
3660         * gjavah.c (decompile_method): Don't decompile to `return this'
3661         for static methods.
3662
3663         * gjavah.c (cxx_keywords): Re-sorted.
3664         * lex.c (cxx_keywords): Re-sorted.
3665
3666         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
3667         else.
3668
3669         * gjavah.c (print_namelet): Clear subnamelets.
3670         (HANDLE_METHOD): Set `method_printed' earlier.
3671
3672 2001-12-07  Tom Tromey  <tromey@redhat.com>
3673
3674         * lang.c (lang_f_options): Added
3675         optimize-static-class-initialization.
3676         (java_decode_option): Removed special case.
3677
3678 2001-12-07  Per Bothner  <per@bothner.com>
3679
3680         * check-init.c (check_init):  Fix typo freeing memory twice.
3681
3682 2001-12-05  Per Bothner  <per@bothner.com>
3683
3684         Restore support for static class initialization optimization.
3685         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
3686         * check-init.c (check_int):  At end of BLOCK handle initialization
3687         blocks, which used to be done in java_complete_expand_method but did
3688         not handle the case where check_for_initialization might allocate
3689         more than a word of bits.
3690         * decl.c (lang_make_tree):  The smic field is now a tree.
3691         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
3692         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
3693
3694         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
3695
3696         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
3697         Change from a hash table to a list.
3698         (struct_lang_decl):  Change field 'smic' to match.
3699         * class.c (add_method_1):  Initialize
3700         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
3701         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
3702         (java_expand_method_bodies): -here, since 'smic' is now a list.
3703         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
3704
3705         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
3706
3707         * class.c (java_hash_compare_tree_node):  Fix casts.
3708
3709 2001-12-04  Per Bothner  <per@bothner.com>
3710
3711         * check-init.c:   Handle definite unassignment to finals in addition
3712         to definite assignment.
3713         (loop_current_locals):  New field.
3714         (num_current_locals, int start_current_locals, num_current_words):
3715         Make static.
3716         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
3717         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
3718         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
3719         (get_variable_decl, check_final_reassigned):  New functions.
3720         (check_init, check_bool_init):  Modify as needed for checking finals.
3721         (check_for_initialization):  Take extra parameter and return void.
3722         Do extra start-up logic to check final fields for assignment.
3723         * parse.y (check_static_final_variable_assignment_flag,
3724         reset_static_final_variable_assignment_flag, check_final_assignment,
3725         check_final_variable_local_assignment_flag,
3726         reset_final_variable_indirect_assignment_flag,
3727         reset_final_variable_global_assignment_flag):  Remove functions.
3728         (java_complete_expand_methods, outer_field_access_fix,
3729         patch_assignment): Remove no-longer used logic.
3730         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
3731         * parse.y (register_fields, java_complete_tree):  Update accordingly.
3732
3733         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
3734         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
3735         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
3736
3737         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
3738
3739         * java-tree.h (DECL FINAL):  New bit-field.
3740         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
3741         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
3742         (DECL_INIT_CALLS_THIS):  New macro.
3743         (struct lang_decl):  New bit-field init_calls_this.
3744         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
3745         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
3746         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
3747         use it for both local variables and final fields.
3748         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
3749         and local_final.
3750         (struct lang_type):  Remove hfv bit-field.
3751         (check_for_initialization):  Change to return void.
3752
3753         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
3754         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
3755         * check-init.c (final_assign_error):  New helper function.
3756         (check_final_reassigned, check_init):  Use it.
3757         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
3758
3759         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
3760         bit-fields to unsigned.
3761
3762 2001-12-03  Per Bothner  <per@bothner.com>
3763
3764         * parse.y (patch_binop):  Minor constant folding.
3765
3766         * parse.y (build_current_thisn):  Shorter 'buffer'.
3767
3768 2001-12-03  Per Bothner  <per@bothner.com>
3769
3770         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
3771         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
3772         * jcf-write.c (generate_bytecode_insns):  Remove support for
3773         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
3774         * check-init.c (check_init):  Likewise.
3775
3776 2001-12-03  Per Bothner  <per@bothner.com>
3777
3778         * verify.c (subroutine_nesting):  New function.
3779         (verify_jvm_instructions):  Use it to fix logic for checking that
3780         we're done with the current subroutine.
3781
3782         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
3783         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
3784
3785 2001-12-03  Per Bothner  <per@bothner.com>
3786
3787         * jcf.h:  Fix obvious typo in comment.
3788         * typeck.c (build_null_signature):  Add comment.
3789
3790 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3791
3792         * expr.c: Remove leading capital from diagnostic messages, as
3793         per GNU coding standards.
3794         * jcf-io.c: Similarly.
3795         * jcf-parse.c: Similarly.
3796         * jv-scan.c: Similarly.
3797         * jvspec.c: Similarly.
3798         * mangle.c: Similarly.
3799
3800 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
3801             Alexandre Petit-Bianco  <apbianco@redhat.com>
3802
3803         * expr.c (build_java_arrayaccess): Call save_expr on array for
3804         correct evaluation order, modified comment, fixed indentation.
3805         * parse.y: (patch_assignment): Correctly extract the array base
3806         from the tree generate by build_java_arrayaccess, added comments.
3807         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
3808         Fixes PR java/3096, PR java/3803, PR java/3965.
3809
3810 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3811
3812         * expr.c (expand_byte_code): Remove trailing periods from messages.
3813         * jcf-parse.c (load_class, jcf_parse): Similarly.
3814         * jcf-write.c (generate_classfile): Similarly.
3815         * lex.c (java_lex): Similarly.
3816
3817 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3818
3819         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
3820
3821 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3822
3823         * Make-lang.in (java.generated-manpages): New dummy target.
3824
3825 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3826
3827         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3828         ASM_FINAL_SPEC.
3829         (lang_specific_pre_link): Use set_input to set input_filename.
3830         Append `main' here.
3831         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3832         (main): Fix definition.
3833         Strip `main' from classname.
3834         Fixes PR java/227.
3835
3836 2001-11-18  Roger Sayle <roger@eyesopen.com>
3837
3838         * parse.h (java_expand_switch): Remove old prototype.
3839
3840 2001-11-18  Tom Tromey  <tromey@redhat.com>
3841
3842         Fix for PR java/1401:
3843         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
3844         arg0 is null.
3845         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
3846         correctly.
3847
3848 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3849
3850         * lang.c (finish_parse): Rename to java_finish.
3851         (LANG_HOOKS_FINISH, java_finish): New.
3852
3853 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
3854
3855         * decl.c (init_decl_processing): Rename java_init_decl_processing.
3856         * java-tree.h: New prototype.
3857         * lang.c (java_init): Update prototype.  Combine with old init_parse.
3858
3859 2001-11-13  Tom Tromey  <tromey@redhat.com>
3860
3861         * gjavah.c (method_signature): New global.
3862         (HANDLE_METHOD): Set it.
3863         (decompile_return_statement): New function.
3864         (decompile_method): Use it.
3865         (print_method_info): Removed `synth' argument.
3866
3867 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3868
3869         * java-tree.h (java_set_yydebug): New.
3870         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
3871         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
3872         (print_lang_decl, print_lang_type, print_lang_identifier,
3873         print_lang_statistics, lang_print_xnode): Remove.
3874
3875 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3876
3877         * jcf-parse.c (init_lex): Remove.
3878         * lang.c (language_string, lang_identify): Remove.
3879         (struct lang_hooks): Constify.
3880         (LANG_HOOKS_NAME): Override.
3881         (init_parse): Update.
3882
3883 2001-11-08  Andreas Franck  <afranck@gmx.de>
3884
3885         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
3886         program_transform_name the way suggested by autoconf.
3887         (java.install-common): Also transform auxiliary program names with
3888         program_transform_name.
3889
3890 2001-11-08  Tom Tromey  <tromey@cygnus.com>
3891
3892         * parse.y (trap_overflow_corner_case): New rule.
3893         (unary_expression): Use it.
3894         * lex.c (java_init_lex): Don't set minus_seen.
3895         (yylex): Don't use minus_seen.  Communicate overflow to parser for
3896         it to handle.
3897         (error_if_numeric_overflow): New function.
3898         * parse.h (minus_seen): Removed field.
3899         (JAVA_RADIX10_FLAG): New define.
3900
3901 2001-11-07  Tom Tromey  <tromey@redhat.com>
3902
3903         Patch for PR java/1414:
3904         * parse.y (case_label_list): New global.
3905         (goal): Register case_label_list with GC.
3906         (java_complete_lhs): Save new case on case_label_list.
3907         (patch_switch_statement): Check for duplicate case labels.
3908
3909 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
3910
3911         * parse.y (patch_assignment): Removed unused third argument.
3912         (java_complete_lhs): Removed unused third argument to patch_assignment.
3913
3914 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3915
3916         * lang.c: Include langhooks-def.h.
3917         * Make-lang.in: Update.
3918
3919 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
3920
3921         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3922
3923 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3924
3925         * mangle.c (find_compression_record_match): Don't match compression
3926         records for package name elements unless they occur at the start of
3927         the name. Fix for PR java/4717.
3928
3929 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3930
3931         * expr.c (expand_java_field_op): Don't special-case references to
3932         java.lang.PRIMTYPE.TYPE.
3933         (build_primtype_type_ref): Removed.
3934         * java-tree.h (build_primtype_type_ref): Remove prototype.
3935         * parse.y (maybe_build_primttype_type_ref): Removed.
3936         (complete_function_arguments): Don't special-case references to
3937         java.lang.PRIMTYPE.TYPE.
3938         (patch_assignment): Likewise.
3939         (array_constructor_check_entry): Likewise.
3940
3941 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
3942
3943         * mangle.c (static tree compression_table): Fixed leading comment.
3944         * parse.h (struct parser_ctxt): Fixed field comment.
3945         * parse.y (check_pkg_class_access): New prototype, fixed leading
3946         comment, new parameter used to emit error only if passed as true.
3947         (parse_check_super): Pass extra argument to check_pkg_class_access.
3948         (do_resolve_class): Likewise.
3949         (process_imports): Likewise.
3950         (read_import_dir): Fixed indentation.
3951         (find_in_imports_on_demand): New local class_type_name. Local
3952         node_to_use deleted. while loop changed into for loop. Report
3953         multiple definition only for accessible classes. Improved error
3954         message.
3955         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
3956         assigned to parameter list, fixed indentation. while loop changed
3957         into for loop, restore TREE_CHAIN on local `tem' before the next
3958         iteration.
3959
3960 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3961
3962         * lang.c (lang_get_alias_set): Deleted.
3963
3964 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3965
3966         * gjavah.c (jni_print_char): Fix thinko in last change.
3967
3968         * gjavah.c (jni_print_char, decode_signature_piece): Use
3969         safe-ctype macros and/or fold extra calls into fewer ones.
3970         * lex.c (java_read_unicode, java_lex): Likewise.
3971         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
3972         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
3973         * mangle_name.c (append_unicode_mangled_name,
3974         unicode_mangling_length): Likewise.
3975
3976 2001-10-17  Richard Henderson  <rth@redhat.com>
3977
3978         * Make-lang.in (java/lang.o): Depend on langhooks.h.
3979
3980 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
3981
3982         * lang.c (langhooks.h): Included.
3983         (LANG_HOOKS_INIT): Redefined.
3984         (LANG_HOOKS_INIT_OPTIONS): Likewise.
3985         (LANG_HOOKS_DECODE_OPTION): Likewise.
3986         (struct lang_hooks lang_hooks): New initialization.
3987
3988 2001-10-11  Per Bothner  <per@bothner.com>
3989
3990         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
3991         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
3992         The former is simpler, and jcf-write.c handles it better.
3993         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
3994         or WITH_CLEANUP_EXPR.
3995         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
3996         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
3997
3998         * parse.y (patch_if_else_statement):  If the condition is constant,
3999         optimize away the test.
4000
4001 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4002
4003         * parse.y (patch_cast): Call patch_string on the first operand of
4004         the incoming node, update it if necessary. Fixes PR java/4510.
4005
4006 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4007
4008         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4009         when name qualifier matches a package name.
4010
4011 2001-10-08  Tom Tromey  <tromey@redhat.com>
4012
4013         Fix for PR java/4489:
4014         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4015         force a new label when computing `body_block'.
4016
4017 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4018
4019         * jcf-io.c (format_uint): Const-ify.
4020         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4021         * lex.c (java_get_line_col): Likewise.
4022         * parse.y (build_incdec): Likewise.
4023
4024 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4025
4026         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4027         a NULL enclosing context if appropriate. Fixes PR java/4466.
4028
4029 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4030
4031         * parse.y (patch_assignment): Use lvalue's original TYPE when
4032         building the final COMPOUND_EXPR.
4033         (try_reference_assignconv): Fixed leading comment.
4034
4035 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4036
4037         * parse.y (check_final_variable_indirect_assignment): For
4038         COMPOUND_EXPR, return only if finals were found initialized
4039         properly, if not, keep on checking.
4040         (check_final_variable_global_assignment_flag): New local
4041         error_found, set when appropriate and used to decide whether to
4042         report uninitialized finals. Fixed typo in comment.
4043
4044 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4045
4046         * decl.c (init_decl_processing): Fixed typo in predef_filenames
4047         last three initializations. Fixes PR java/4360.
4048
4049 2001-09-21  Richard Henderson  <rth@redhat.com>
4050
4051         * class.c (get_dispatch_table): Handle function descriptors.
4052         (build_dtable_decl): Likewise.
4053         * expr.c (build_invokevirtual): Likewise.
4054
4055 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4056
4057         * parse.y (patch_method_invocation): Build class initialization
4058         when static finals are used to qualify method invocation.
4059         Fixes PR java/4366.
4060
4061 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
4062
4063         * parse.h: (WFL_STRIP_BRACKET): Re-written using
4064         build_type_name_from_array_name.
4065         (STRING_STRIP_BRACKETS): New macro.
4066         * parse.y (build_type_name_from_array_name): New function.
4067         (array_creation_expression:): Accumulate []s instead of [s.
4068         (cast_expression:): Accumulate []s instead of [s after cast type
4069         name.
4070         (build_array_from_name): Local string deleted, use
4071         build_type_name_from_array_name.
4072         (build_unresolved_array_type): Accumulate []s instead of [s after
4073         type name.
4074         (register_fields): Fixed comment.
4075         (resolve_class): Local name, base deleted, new locals tname and
4076         array_dims. Use build_type_name_from_array_name. Use array_dims to
4077         build array type.
4078         (purify_type_name): Use STRING_STRIP_BRACKETS.
4079
4080 2001-09-18  Andreas Jaeger  <aj@suse.de>
4081
4082         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4083         * jv-scan.c: Likewise.
4084
4085 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4086
4087         * parse.y (patch_method_invocation): Inner class creation context
4088         check not enforced within constructors. Fixes PR java/1873.
4089
4090 2001-09-16  Tom Tromey  <tromey@redhat.com>
4091
4092         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4093         NOTE_PUSH for single-case push.  Fixes PR java/4189.
4094
4095 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4096
4097         * java-tree.h (TYPE_IMPORT_LIST): New macro.
4098         (TYPE_IMPORT_DEMAND_LIST): Likewise.
4099         (struct lang_type): New fields import_list and import_demand_list.
4100         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4101         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4102         (do_resolve_class): New local saved_enclosing_type, initialized,
4103         passed as parameter to find_in_imports and find_in_imports_on_demand.
4104         (find_in_imports): Added paramater enclosing_type, use its
4105         TYPE_IMPORT_LIST when applicable.
4106         (find_in_imports_on_demand): Added parameter enclosing_type, use
4107         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4108         declaration and initialization.
4109         (fold_constant_for_init): Switch/restore current_class to the
4110         appropriate context.
4111
4112 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
4113
4114         * verify.c (verify_jvm_instructions): Fix typo.
4115
4116 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4117
4118         * expr.c (expand_invoke): Const-ification.
4119         * parse.y (patch_method_invocation): Likewise.
4120
4121 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4122
4123         * gjavah.c (cxx_keywords): Const-ification.
4124         * keyword.gperf (java_keyword): Likewise.
4125         * lang.c (java_tree_code_name): Likewise.
4126         * lex.c (cxx_keywords): Likewise.
4127         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4128
4129 2001-09-11  Richard Henderson  <rth@redhat.com>
4130
4131         * parse.h (ctxp_for_generation): Mark extern.
4132
4133 2001-09-10  Richard Henderson  <rth@redhat.com>
4134
4135         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4136
4137 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4138
4139         * typeck.c (java_array_type_length, build_prim_array_type):
4140         Represent empty arrays by NULL index.
4141
4142 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
4143
4144         * java-tree.h (compile_resource_file): Grouped with other prototypes.
4145         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4146
4147 2001-09-06  Anthony Green  <green@redhat.com>
4148
4149         * class.c (O_BINARY): Define if necessary.
4150         (registerResource_libfunc): Declare.
4151         (init_class_processing): Initilize registerResource_libfunc.
4152         (compile_resource_file): New function.
4153         * java-tree.h (resource_name): Declare.
4154         (compile_resource_file): Declare.
4155         * jcf-parse.c (yyparse): Handle compiling java resource files.
4156         * lang.c (java_decode_option): Handle -fcompile-resource option.
4157         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4158         resource files.
4159         * gcj.texi (Code Generation): Add documentation for -R flag.
4160
4161 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
4162
4163         * jcf-write.c (generate_classfile): Issue an error in case of
4164         field/initial value mismatch.
4165         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4166         being initialized and we're generating bytecode.
4167         (java_complete_lhs): In MODIFY_EXPR section: added comments,
4168         set DECL_INITIAL properly when appropriate.
4169         Fixes PR java/4230
4170         Fixes PR java/4204
4171
4172 2001-09-01  Per Bothner  <per@bothner.com>
4173
4174         * parse.y (maybe_yank_clinit):  A field without an initializer is not
4175         relevant.  All initializers except static final and constant require
4176         <clinit>, regardless of flag_emit_class_files.
4177
4178 2001-08-31  Per Bothner  <per@bothner.com>
4179
4180         * class.c (set_constant_value):  When not emitting class files, then a
4181         String ConstantValue is a utf8const_ptr_type.
4182
4183 2001-08-30  Per Bothner  <per@bothner.com>
4184
4185         * jcf-write.c (generate_classfile):  Check that field is primitive
4186         or string before emitting ConstantValue attribute.
4187
4188 2001-08-30  Per Bothner  <per@bothner.com>
4189
4190         * parse.y (resolve_qualified_expression_name):  If creating a
4191         COMPOUND_EXPR, set it's type correctly.
4192
4193 2001-08-30  Per Bothner  <per@bothner.com>
4194
4195         * jcf-io.c (open_class):  Set filename field.
4196
4197         * jcf-parse,c (parse_class_file):  Set current_function_decl
4198         for better error message when Code attribute is missing.
4199
4200         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
4201         better diagnostics, especially for constructors.
4202
4203 2001-08-30  Per Bothner  <per@bothner.com>
4204
4205         * jcf-write.c (generate_classfile):  Don't write ConstantValue
4206         attribute if field is not final, for compatibility with jdk.
4207
4208         * jcf-write.c (generate_classfile):  Convert ConstantValue values
4209         to correct type.  Work-around for front-end bug.
4210         * class.c (set_constant_value):  Error if constant has wrong type.
4211
4212 2001-08-30  Per Bothner  <per@bothner.com>
4213
4214         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
4215         "Double" are printed at verbosity 1.
4216
4217         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
4218
4219         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
4220
4221 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4222
4223         * parse.y (patch_assignment): Don't verify final re-assignment here.
4224         (java_complete_lhs): Verify assignments to finals calling
4225         patch_assignment. Verify re-assignments to finals before calling
4226         patch_assignment.
4227
4228 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
4229
4230         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4231         Fixes PR java/1413
4232
4233 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4234
4235         * lex.c (java_lex): new local found_hex_digits. Set and then used
4236         in test to reject invalid hexadecimal numbers.
4237         * parse.y (java_complete_tree): Prevent unwanted cast with
4238         initialized floating point finals.
4239         (patch_binop): Emit a warning when detecting a division by zero,
4240         mark result not constant, don't simplify non integer division.
4241
4242 2001-08-28  Per Bothner  <per@bothner.com>
4243
4244         * jcf-write.c  (generate_bytecode_insns):  For increments and
4245         decrements just recurse to push constant.  Improvement on Mark's patch.
4246
4247 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
4248
4249         * jcf-write.c (generate_bytecode_insns): Generate an integer to
4250         real conversion for increments and decrements of reals.
4251
4252 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4253
4254         * parse.y (resolve_qualified_expression_name): Handle unresolved
4255         qualified expressions, prevent numerical qualifiers, fixed typo.
4256         Fixes PR java/4141
4257
4258 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4259
4260         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4261         don't report anything but deprecated class when marked so. Handle
4262         VAR_DECL.
4263         (patch_method_invocation): Check deprecation on methods and types.
4264         (patch_binop): code becomes an enum tree_code, added default: to
4265         switch to handle that. Detect division by zero, try to fold and
4266         return before using a subroutine.
4267
4268 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4269
4270         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4271         file smaller than 4 bytes.
4272         * parse.y (check_inner_circular_reference): New function.
4273         (check_circular_reference): Likewise.
4274         (array_initializer:): Accept {,}.
4275         (java_check_circular_reference): Rewritten using
4276         check_circular_reference and check_inner_circular_reference.
4277         (java_complete_expand_method): Unconditionally save and restore
4278         the unpurged exception list.
4279         (build_dot_class_method_invocation): Unmangle signature parameter.
4280
4281 2001-08-21  Tom Tromey  <tromey@redhat.com>
4282
4283         * decl.c (init_decl_processing): Add `throws' field to method
4284         descriptor.
4285         * class.c (make_method_value): Compute `throws' field for method.
4286
4287 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4288
4289         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4290         circularity is detected.
4291         (ctors_unchecked_throws_clause_p): Fixed leading comment.
4292
4293 2001-08-17  Richard Henderson  <rth@redhat.com>
4294
4295         * class.c (emit_register_classes): Add align parameter to
4296         call to assemble_integer.
4297
4298 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
4299
4300         * jcf-parse.c (load_class): New locals saved and class_loaded. If
4301         loading a class_or_name fails, try considering an innerclass name
4302         and load the enclosing context.
4303         * parse.y (resolve_inner_class): New function.
4304         (find_as_inner_class): Added leading comment.
4305         (register_incomplete_type): Keep the current context as enclosing
4306         context for JDEP_FIELD dependencies.
4307         (do_resolve_class): Locals new_class_decl and super initialized to
4308         NULL. Call resolve_inner_class, explore the enclosing context
4309         superclass if necessary.
4310         Fixes PR java/4007
4311
4312 2001-08-16  Tom Tromey  <tromey@redhat.com>
4313
4314         * jcf-dump.c (main): Updated for change to jcf_path_seal.
4315         * gjavah.c (main): Updated for change to jcf_path_seal.
4316         * lang.c (version_flag): New global.
4317         (java_decode_option): Recognize `-version'.
4318         (java_init): Update for change to jcf_path_seal.
4319         * jcf.h (jcf_path_seal): Added `print' argument.
4320         * jcf-path.c (jcf_path_seal): Added `print' argument.
4321
4322 2001-08-13  Zack Weinberg  <zackw@panix.com>
4323
4324         * Make-lang.in (java/decl.o): Update dependencies.
4325         * decl.c: Include libfuncs.h, don't include toplev.h.
4326
4327 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4328
4329         * decl.c (init_decl_processing): exception_type_node,
4330         class_not_found_type_node, and no_class_def_found_type_node
4331         initialized. predef_filenames augmented accordingly.
4332         instinit_identifier_node initialized.
4333         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4334         * java-tree.h (enum java_tree_index): New entries
4335         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4336         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4337         (exception_type_node): New macro.
4338         (class_not_found_type_node): Likewise.
4339         (no_class_def_found_type_node): Likewise.
4340         (instinit_identifier_node): Likewise.
4341         (PREDEF_FILENAMES_SIZE): Adjusted.
4342         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4343         (struct lang_type): Fixed typo in bitfield name.
4344         (DECL_INSTINIT_P): New macro.
4345         (ID_INSTINIT_P): Likewise.
4346         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4347         attribute.
4348         * parse.y (encapsulate_with_try_catch): New function.
4349         (generate_instinit): Likewise.
4350         (build_instinit_invocation): Likewise.
4351         (ctors_unchecked_throws_clause_p): Likewise.
4352         (add_instance_initializer): Deleted.
4353         (build_instance_initializer): Likewise.
4354         (in_instance_initializer): Likewise.
4355         (check_method_redefinition): instinit$ not to be verified.
4356         (java_complete_expand_methods): Generate instinit$, simplified code.
4357         (build_dot_class_method): Eliminated unnecessary locals. Use
4358         encapsulate_with_try_catch, removed unnecessary code.
4359         (fix_constructors): New local iii. Use build_instinit_invocation.
4360         (patch_method_invocation): Added comment.
4361         (maybe_use_access_method): Don't consider instinit$.
4362         (find_applicable_accessible_methods_list): Shorten the search for
4363         instinit$ too.
4364         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4365         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4366         (patch_throw_statement): Likewise. Fixed typo.
4367
4368 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
4369
4370         Revert:
4371         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4372         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4373         ASM_FINAL_SPEC.
4374         (lang_specific_pre_link): Use set_input to set input_filename.
4375         Append `main' here.
4376         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4377         (main): Fix definition.
4378         Strip `main' from classname.
4379         Fixes PR java/227.
4380
4381 2001-08-11  Zack Weinberg  <zackw@panix.com>
4382
4383         * lex.h: Don't include setjmp.h.  Don't define
4384         SET_FLOAT_HANDLER or prototype set_float_handler.
4385
4386 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4387
4388         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
4389         `poplevel' in the right order.
4390
4391 2001-08-09  Richard Henderson  <rth@redhat.com>
4392
4393         * Make-lang.in (class.o): Depend on TARGET_H.
4394         * class.c (emit_register_classes): Use target hooks instead of
4395         assemble_constructor and assemble_destructor.
4396
4397 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
4398
4399         * check-init.c (flags.h): Include
4400         (check_init): Don't report uninitialized static class
4401         initialization flags, don't free bit index when doing static class
4402         initialization optimization.
4403         (check_for_initialization): Return type changed to `unsigned int.'
4404         (attach_initialized_static_class): New function.
4405         * class.c (add_method_1): Create the initialized static class
4406         table if necessary.
4407         (finish_class): Always emit deferred inline methods.
4408         * decl.c (emit_init_test_initialization): Moved to expr.c
4409         (complete_start_java_method): Don't traverse
4410         DECL_FUNCTION_INIT_TEST_TABLE.
4411         (lang_mark_tree): Mark hash tables in function decls.
4412         * expr.c (emit_init_test_initialization): Moved from decl.c.
4413         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
4414         initialization flag, set DECL_CONTEXT and
4415         LOCAL_CLASS_INITIALIZATION_FLAG.
4416         (java_lang_expand_expr): Emit initialization code for static class
4417         initialized flags when entering block, if necessary.
4418         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
4419         * java-tree.h (flag_optimize_sci): New global variable declaration.
4420         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
4421         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
4422         (LOCAL_FINAL_P): Fixed typo in comment.
4423         (FINAL_VARIABLE_P): Likewise.
4424         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
4425         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
4426         (struct lang_decl): New fields `ict', `smic' and `cif.'
4427         (check_for_initialization): New returned value for global.
4428         (attach_initialized_static_class): New global function.
4429         (STATIC_CLASS_INIT_OPT_P): New macro.
4430         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
4431         * lang.c (java_decode_option): Handle
4432         `-fno-optimize-static-class-initialization'
4433         * parse.y (start_complete_expand_method): New function.
4434         (java_expand_method_bodies): Likewise.
4435         (attach_init_test_initialization_flags): Likewise.
4436         (adjust_init_test_initialization): Likewise.
4437         (emit_test_initialization): Likewise.
4438         (java_complete_expand_methods): Nullify abstract and native method
4439         bodies.
4440         (java_complete_expand_method): New locals `fbody', `block_body'
4441         and `exception_copy.' Reorganized: directly return on empty method
4442         bodies, call `start_complete_expand_method', remember definitely
4443         initialized static class in function, don't expand method bodies.
4444         (java_expand_classes): Call `java_expand_method_bodies' before
4445         `finish_class' when compiling to native.
4446         (resolve_expression_name): Use `orig' after building outer class
4447         field access.
4448         (patch_invoke): Remember static method invocations.
4449
4450 2001-08-06  Richard Henderson  <rth@redhat.com>
4451
4452         * class.c (emit_register_classes): Pass a symbol_ref and priority
4453         to assemble_constructor.
4454
4455 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
4456
4457         * java-tree.h (all_class_filename): New macro.
4458         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
4459         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
4460         newly created IDENTIFIER_NODE to `all_class_filename.'
4461
4462 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
4463
4464         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
4465         Use ggc_add_tree_root to register roots.
4466
4467 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4468
4469         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
4470         second operand calling check_init.
4471         * decl.c (complete_start_java_method): Swaped second and third
4472         arguments while creating WITH_CLEANUP_EXPR node.
4473         * jcf-write.c (generate_bytecode_insns): Use second operand
4474         instead of third when handling WITH_CLEANUP_EXPR.
4475         * parse.y (java_complete_lhs): Expand second operand of
4476         WITH_CLEANUP_EXPR nodes.
4477         (patch_synchronized_statement): Swaped second and third arguments
4478         while creating WITH_CLEANUP_EXPR node.
4479
4480 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4481
4482         * parse.y (create_interface): Avoid cyclic inheritance report when
4483         syntax error encountered during class definition.
4484         Fixes PR java/2956
4485
4486 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4487
4488         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4489         ASM_FINAL_SPEC.
4490         (lang_specific_pre_link): Use set_input to set input_filename.
4491         Append `main' here.
4492         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4493         (main): Fix definition.
4494         Strip `main' from classname.
4495         Fixes PR java/227.
4496
4497 2001-07-18  Tom Tromey  <tromey@redhat.com>
4498
4499         For PR java/2812:
4500         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
4501         * lex.c (java_new_lexer): Use ICONV_CONST.
4502         (java_read_char): Likewise.
4503         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
4504         (jv-scan$(exeext)): Likewise.
4505
4506 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4507
4508         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
4509         * parse.y (check_class_interface_creation): Allow `private' if the
4510         enclosing is not an interface.
4511         (create_interface): Interface tagged public if the enclosing
4512         context is an interface.
4513         (create_class): Class tagged public if the enclosing context
4514         is an interface.
4515         Fixes PR java/2959
4516
4517 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4518
4519         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
4520         Fixes PR java/2665
4521
4522 2001-07-14  Tim Josling  <tej@melbpc.org.au>
4523
4524         * check-init.c (check_init): Remove references to EXPON_EXPR.
4525
4526 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4527
4528         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
4529         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
4530         Fixes PR java/3602
4531
4532 2001-07-13  Tom Tromey  <tromey@redhat.com>
4533
4534         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
4535         invocation.
4536
4537 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4538
4539         * parse.y (patch_method_invocation): Don't override primary if one
4540         is already provided, but let this$<n> be built. Fixed comment.
4541
4542 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4543
4544         * parse.y (empty_statement:): Report empty statement error only
4545         when found at class declaration level.
4546         Fixes PR java/3635
4547
4548 2001-07-12  Tom Tromey  <tromey@redhat.com>
4549
4550         * expr.c (expand_load_internal): New function.
4551         (LOAD_INTERNAL): Use it.
4552
4553 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
4554
4555         * parse.y (verify_constructor_super): Compare anonymous class ctor
4556         args with `valid_method_invocation_conversion_p.'
4557         Fixes PR java/3285
4558
4559 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4560
4561         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
4562         `-fsyntax-only.' Fixes PR java/3248
4563
4564 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4565
4566         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
4567
4568 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4569
4570         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
4571         current function is static. Fixes PR java/1970
4572
4573 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4574
4575         * parse.y (patch_method_invocation): Add enclosing context to ctor
4576         calls if necessary. Fixes PR java/2953
4577
4578 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4579
4580         * parse.y (resolve_package): Abort if qualified expression member
4581         isn't right.
4582         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
4583         Fixes PR java/1391
4584
4585 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
4586
4587         * verify.c: Don't use // comments.
4588
4589 2001-07-05  Tom Tromey  <tromey@redhat.com>
4590
4591         * lang.c (flag_assume_compiled): Removed.
4592         * java-tree.h (flag_assume_compiled): Removed.
4593         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
4594         -fhash-synchronization, -fuse-divide-subroutine,
4595         -fcheck-references, -femit-class-file, -femit-class-files,
4596         -fassume-compiled.  Updated --encoding information.  Changed
4597         -foutput-class-dir to `-d'.
4598
4599 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
4600
4601         * jcf-parse.c (parse_class_file): Add lineno parameter to
4602         debug_start_source_file call.
4603
4604 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4605
4606         * gcj.texi: Use gpl.texi.
4607         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
4608         dependencies and use doc/include in search path.
4609
4610 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
4611
4612         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
4613         `this'.  If so, don't build instance initializers.
4614
4615 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4616
4617         * parse.y (resolve_expression_name): Improved error message for
4618         inner class cases. Fixes PR java/1958
4619
4620 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4621
4622         * lang.c: #include diagnostic.h
4623         (lang_print_error): Add a `diagnostic_context *' parameter.
4624         (java_dummy_print): Likewise.
4625         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
4626
4627 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4628
4629         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
4630         * jcf.h (typedef struct JCF): New bitfield `finished.'
4631         (JCF_FINISH): Set `finished.'
4632         (JCF_ZERO): Reset `finished.'
4633         Fixes PR java/2633
4634
4635 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4636
4637         * parse.y (class_body_declaration:): Don't install empty instance
4638         initializers.
4639         Fixes PR java/1314
4640
4641 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4642
4643         * class.c (set_super_info): Call `set_class_decl_access_flags.'
4644         (set_class_decl_access_flags): New function.
4645         * java-tree.h (set_class_decl_access_flags): New prototype.
4646         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
4647         (parse_class_file): New local `decl_max_locals.' Take wide types
4648         into account to compute DECL_MAX_LOCALS.
4649         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
4650         imports on demand.
4651
4652 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
4653
4654         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
4655
4656 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4657
4658         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
4659         * parse.y (do_resolve_class): Moved comments out to leading comment
4660         section. Removed local `start', New local `_ht' and
4661         `circularity_hash.'  Record `enclosing' in hash table and search
4662         it to detect circularity.  Use `enclosing' as an argument to
4663         `lookup_cl.' Free the hash table when done.
4664
4665 2001-06-19  Tom Tromey  <tromey@redhat.com>
4666
4667         * lex.c (java_read_char): Disallow invalid and overlong
4668         sequences.  Fixes PR java/2319.
4669
4670 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
4671
4672         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
4673
4674 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4675
4676         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
4677         arguments accordingly.
4678
4679 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4680
4681         * gcj.texi: Move contents to just after title page.
4682
4683 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
4684
4685         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
4686         builtin type.
4687         (patch_incomplete_class_ref): Build the class ref, build the class
4688         init if necessary, complete the tree.
4689         Fixes PR java/2605
4690
4691 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4692
4693         * parse.y (lookup_field_wrapper): Test `name' code.
4694         (resolve_qualified_expression_name): Test `qual_wfl' code.
4695         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
4696         handle `qual_wfl' by code.
4697         (maybe_build_primttype_type_ref): Test `wfl' code.
4698
4699 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4700
4701         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
4702         fdl.texi.
4703         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
4704         the dvi file in the java directory.
4705
4706 2001-05-25  Sam TH  <sam@uchicago.edu>
4707
4708         * gen-table.pl javaop.h jcf.h lex.h,
4709         parse.h: Fix header include guards.
4710
4711 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
4712
4713         * jv-scan.c (version): Update copyright year.
4714
4715 2001-05-21  Per Bothner  <per@bothner.com>
4716
4717         * jcf-parse.c (read_class):  If class is from .class or .zip file
4718         and it's already been read, don't push/pop parser context.
4719
4720 2001-05-18  Per Bothner  <per@bothner.com>
4721
4722         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
4723         command line so the jvgenmain-generated main program comes first.
4724
4725 2001-05-15  Tom Tromey  <tromey@redhat.com>
4726
4727         * class.c (build_utf8_ref): Don't generate identifier based on
4728         utf8const contents.
4729
4730 2001-05-12  Richard Henderson  <rth@redhat.com>
4731
4732         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
4733         * expr.c (java_lang_expand_expr): Expand it.
4734         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
4735         calling build_exception_object_ref.
4736         * parse.y (catch_clause_parameter): Likewise.
4737         (build_dot_class_method): Likewise.
4738         (try_reference_assignconv): Likewise.
4739         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
4740         * jcf-write.c (generate_bytecode_insns): Likewise.
4741
4742 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4743
4744         * parse.y (build_unresolved_array_type): Set
4745         EXPR_WFL_QUALIFICATION on the newly created wfl.
4746         Fixes PR java/2538. Fixes PR java/2535.
4747
4748 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4749
4750         * parse.y (fix_constructors): Removed unnecessary assignment to
4751         local. Moved assignment to `this$<n>', fixed comments and
4752         indentation.
4753         (build_wfl_wrap): Fixed indentation.
4754         Fixes PR java/2598, java/2579 and java/2658.
4755
4756 2001-05-03  Mo DeJong  <mdejong@redhat.com>
4757
4758         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4759         check for byte swap.
4760
4761 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
4762
4763         * expr.c (build_class_init): Move MODIFY_EXPR
4764         outside of COND_EXPR.  Remove variable `call'.
4765
4766 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4767
4768         * decl.c: NULL_PTR -> NULL.
4769         * jcf-write.c: Likewise.
4770
4771 2001-05-01  Tom Tromey  <tromey@redhat.com>
4772
4773         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
4774         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
4775         * gcj.texi: Updated copyright text.  Include fdl.texi.
4776         (Top): Link to new node.
4777
4778 2001-05-01  Per Bothner  <per@bothner.com>
4779
4780         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
4781
4782 2001-05-01  Per Bothner  <per@bothner.com>
4783
4784         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
4785         import_list contains the name, not the TREE_PURPOSE.
4786
4787 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4788
4789         * jcf-io.c (read_zip_member): Cast to long in comparison with
4790         signed value.
4791
4792         * jvspec.c (lang_specific_driver): Initialize variables.
4793
4794         * mangle.c (find_compression_record_match): Likewise.
4795
4796         * typeck.c (build_null_signature): Provide static prototype.  Mark
4797         parameter with ATTRIBUTE_UNUSED.
4798
4799         * verify.c (verify_jvm_instructions): Initialize variable.
4800
4801 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4802
4803         * parse.y (do_resolve_class): Check for cyclic inheritance during
4804         inner class resolution.
4805
4806 2001-04-27  Per Bothner  <per@bothner.com>
4807
4808         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
4809         while iterating, since that could cause gc to lose stuff.
4810
4811 2001-04-26  Per Bothner  <per@bothner.com>
4812
4813         Fix method search wrt scope of inner classes to match JLS2.
4814         * typeck.c (build_null_signature):  New static function.
4815         (has_method):  New function.  Uses build_null_signature and lookup_do.
4816         * java-tree.h (has_method):  New declaration.
4817         * parse.y (find_applicable_accessible_methods_list):  Do not search
4818         context of inner classes here.
4819         (patch_method_invocation):  Search scope, ie. current and outer clases,
4820         for method matching simple name, to find class.
4821
4822 2001-04-26  Per Bothner  <per@bothner.com>
4823
4824         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
4825         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
4826
4827         * constants.c (find_methodref_with_class_index):  New function.
4828         (find_methodref_index):  Use find_methodref_with_class_index.
4829         * java-tree.h (find_methodref_with_class_index):  New declaration.
4830         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
4831         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
4832         If context changed from interface to class, don't use invokeinterface.
4833
4834 2001-04-25  Per Bothner  <per@bothner.com>
4835
4836         * verify.c (verify_jvm_instructions):  For field instructions,
4837         check that field index is valid.  For invoke instructions, check that
4838         method index is valid.
4839
4840 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
4841
4842         * config-lang.in (target_libs): Copy from $libgcj_saved.
4843
4844 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4845
4846         * decl.c (init_decl_processing): Add new class "protectionDomain"
4847         field.
4848         * class.c (make_class_data): Set initial value for "protectionDomain".
4849
4850 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4851
4852         * jvspec.c (lang_specific_driver): Fix memory allocation
4853         deficit, by using concat in lieu of xmalloc/sprintf.
4854
4855 2001-04-20  Per Bothner  <per@bothner.com>
4856
4857         Fixes to compile multiple .class files at once.
4858         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
4859         * java-tree.h (CLASS_PARSED_P):  New macro.
4860         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
4861         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
4862         (read_class):  Avoid some code duplication.
4863         Don't call JCF_FINISH for a .class file - might be needed later.
4864         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
4865         rather than CLASS_LOADED_P, since latter implies class laid out.
4866         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
4867         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
4868
4869 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4870
4871         * Make-lang.in (java/boehm.o): Depend on toplev.h.
4872
4873         * boehm.c: Include toplev.h.
4874
4875 2001-04-06  Tom Tromey  <tromey@redhat.com>
4876             Alexandre Petit-Bianco  <apbianco@redhat.com>
4877
4878         Fix for PR gcj/1404 and PR gcj/2332:
4879         * parse.y (build_array_from_name): If we use the type_wfl then
4880         accumulate dimensions from the original type as well.
4881         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
4882
4883 2001-04-06  Tom Tromey  <tromey@redhat.com>
4884
4885         * parse.y (analyze_clinit_body): Return true if the second operand
4886         of a METHOD_EXPR is nonzero.
4887
4888 2001-04-06  Tom Tromey  <tromey@redhat.com>
4889
4890         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
4891         directory.
4892         ($(srcdir)/java/parse.c): Likewise.
4893
4894 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4895
4896         * gcj.texi: Use `which-gcj' instead of `which-g77.'
4897         (version-gcc): Initialized.
4898         (which-gcj): Likewise.
4899
4900 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4901
4902         * java-tree.h (struct lang_decl): New macro
4903         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
4904         * parse.y (build_instance_initializer): New function.
4905         (add_instance_initializer): Use it.
4906         (java_fix_constructors): Set `current_class' before fix pass.
4907         (fix_constructors): Just return if already fixed. Move `super()'
4908         invocation ahead. Use `build_instance_initializer.'
4909         Fixes PR java/1315.
4910
4911 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4912
4913         * parse.y (resolve_qualified_expression_name): Pass field's
4914         DECL_CONTEXT to `not_accessible_p.'
4915         (not_accessible_p): Changed parameters order in `inherits_from_p'
4916         invocation.
4917
4918 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
4919
4920         * lang-options.h: Add flag_check_references.
4921
4922 2001-04-04  Per Bothner  <per@bothner.com>
4923
4924         * java-tree.h (CONSTANT_VALUE_P):  New macro.
4925         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
4926         * parse.y (maybe_build_class_init_for_field):  New static function.
4927         (resolve_expression_name, resolve_field_access):  Use
4928         maybe_build_class_init_for_field instead of build_class_init
4929         This does not do the init if the field is compile-time-constant.
4930         (resolve_field_access):  Simplify.
4931
4932         * parse.y (fold_constant_for_init):  Merge test into switch.
4933
4934 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
4935
4936         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
4937         on gansidecl.h.
4938         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
4939
4940 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
4941
4942         * expr.c (pop_type_0): Save the result of the first
4943         lang_printable_name call in a scratch buffer, so it
4944         won't be clobbered by the second call.
4945
4946 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4947
4948         * parse-scan.y (array_type:): Rewritten.
4949         (type_declaration:): `empty_statement' replaces `SC_TK.'
4950         (class_member_declaration:): `empty statement' added.
4951         (method_body:): Simplified.
4952         (static_initializer:): Likewise.
4953         (primary_no_new_array:): Use `type_literals.'
4954         (type_literals:): New rule.
4955         (dims:): Set and update `bracket_count.'
4956         Fixes PR java/1074. Fixes PR java/2412.
4957
4958 2001-03-28  Hans Boehm  <boehm@acm.org>
4959
4960         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
4961         (get_boehm_type_descriptor): Set type on returned value to be a
4962         pointer length integer.
4963
4964 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4965
4966         * expr.c (pop_type_0): Call `concat' rather than building the
4967         string manually.
4968         (pop_type): Add format specifier in call to `error'.
4969
4970         * parse.y (patch_method_invocation): Avoid casting away
4971         const-ness.
4972
4973 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
4974
4975         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
4976
4977 2001-03-28  Richard Henderson  <rth@redhat.com>
4978
4979         IA-64 ABI Exception Handling:
4980         * Make-lang.in (except.o): Don't depend on eh-common.h.
4981         * check-init.c (check_init): Handle EXC_PTR_EXPR.
4982         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
4983         [soft_exceptioninfo_call_node]: Remove.
4984         [eh_personality_libfunc, lang_eh_runtime_type]: New.
4985         (end_java_method): No emit_handlers.
4986         * except.c (java_set_exception_lang_code): Remove.
4987         (method_init_exceptions): Don't call it.
4988         (prepare_eh_table_type): No CATCH_ALL_TYPE.
4989         (build_exception_object_ref): New.
4990         (expand_end_java_handler): Update for except.h name changes.
4991         (emit_handlers, expand_resume_after_catch): Remove.
4992         * expr.c (java_lang_expand_expr): Update for except.h name changes.
4993         (process_jvm_instruction): Use build_exception_object_ref.
4994         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
4995         (soft_exceptioninfo_call_node): Remove.
4996         (build_exception_object_ref): Declare.
4997         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
4998         soft_exceptioninfo_call_node.  Move processing ...
4999         [EXC_PTR_EXPR]: ... here.
5000         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5001         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5002         (source_end_java_method): No java_set_exception_lang_code or
5003         emit_handlers.
5004         (build_dot_class_method): Use build_exception_object_ref.
5005         (try_reference_assignconv): Check EXC_PTR_EXPR not
5006         soft_exceptioninfo_call_node.
5007
5008 2001-03-28  Richard Henderson  <rth@redhat.com>
5009
5010         * java-tree.h (throw_node): Define as a single member of
5011         java_global_trees instead of a separate array.
5012         (JTI_THROW_NODE): New.
5013         * decl.c (throw_node): Don't declare.
5014         (init_decl_processing): Init a scalar throw_node.
5015         Don't register it for gc.
5016         * check-init.c (check_init): Reference scalar throw_node.
5017         * expr.c (build_java_athrow): Likewise.
5018         * jcf-write.c (generate_bytecode_insns): Likewise.
5019         * parse.h (BUILD_THROW): Likewise.
5020
5021 2001-03-28  Richard Henderson  <rth@redhat.com>
5022
5023         * decl.c (end_java_method): Do not save and restore
5024         flag_non_call_exceptions.
5025         * parse.y (source_end_java_method): Likewise.
5026         * lang.c (flag_exceptions): Don't declare.
5027         (java_init_options): Set flag_non_call_exceptions.  Set
5028         flag_exceptions here ...
5029         (java_init): ... not here.
5030
5031 2001-03-27  Richard Henderson  <rth@redhat.com>
5032
5033         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5034         exceptions_via_longjmp.
5035
5036         * lang.c (flag_new_exceptions): Don't declare it.
5037         (java_init_options): Or set it.
5038
5039 2001-03-27  Richard Henderson  <rth@redhat.com>
5040
5041         * decl.c (end_java_method): Rename asynchronous_exceptions to
5042         flag_non_call_exceptions.
5043         * parse.y (source_end_java_method): Likewise.
5044
5045 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5046
5047         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5048
5049 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5050
5051         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5052
5053 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5054
5055         * parse.y (find_as_inner_class): Follow current package
5056         indications not to mistakingly load an unrelated class.
5057
5058 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5059
5060         * constants.c (PUTN): Use memcpy, not bcopy.
5061
5062         * lex.c (java_read_char): Use memmove, not bcopy.
5063
5064         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5065
5066 2001-03-23  Per Bothner  <per@bothner.com>
5067
5068         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
5069         macro for better error pin-pointing.
5070         * java-tree.h:  Fix typo in comment.
5071
5072         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
5073         Don't include jsr/goto in exception range.
5074         Check if start and end of exception range are the same (also TRY_EXPR).
5075         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5076         However, do emit the following goto even if try_block is empty.
5077         Defer freeing exception_decl until after the finalizer, to make
5078         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
5079
5080         * parse.y (java_complete_lhs):  If the try-clause is empty, just
5081         return the finally-clause and vice versa.
5082
5083 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5084
5085         * gcj.texi (Input Options): documented the check for attribute
5086         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5087         * java-tree.h (flag_force_classes_archive_check): Declared extern.
5088         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5089         (jcf_parse): Check for the right classes archive if necessary.
5090         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5091         (jcf_parse_fields): Fixed indentation.
5092         * jcf-write.c (append_gcj_attribute): New function.
5093         (generate_classfile): Compute the attribute count, invoke
5094         `append_gcj_attribute'.
5095         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5096         turned into bit-fields. New bit-field `right_zip.'
5097         (JCF_ZERO): Set `right_zip' to zero.
5098         * lang-options.h (-fforce-classes-archive-check): Added flag.
5099         * lang.c (flag_force_classes_archive_check): New flag.
5100         (lang_f_options): New entry `force-classes-archive-check.'
5101         Fixes PR java/1213.
5102
5103 2001-02-07  Andrew Haley  <aph@redhat.com>
5104
5105         * gcj.texi (Configure-time Options): Add -fcheck-references.
5106         * expr.c (build_java_indirect_ref): New function.
5107         (java_check_reference): New function.
5108         (build_java_array_length_access): Use build_java_indirect_ref to
5109         check for null references.
5110         (build_java_arrayaccess): Likewise.
5111         (build_get_class): Likewise.
5112         (build_field_ref): Likewise.
5113         (invoke_build_dtable): Likewise.
5114         (build_invokeinterface): Likewise.
5115         * lang.c (lang_f_options): Add flag_check_references.
5116         * jvspec.c (jvgenmain_spec): Add flag_check_references.
5117         * java-tree.h (flag_check_references): New variable.
5118         * lang.c (flag_check_references): Likewise.
5119         * parse.y (patch_invoke): Use java_check_reference.
5120         (patch_assignment): Allow for extra nesting in
5121         _Jv_CheckArrayStore.
5122
5123 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
5124
5125         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5126         * lex.c (cxx_keywords): Likewise.
5127
5128 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5129
5130         * parse.y (qualify_ambiguous_name): Broaden `length'
5131         recognition. Help MODIFY_EXPR be resolved as expression names.
5132         Fixes PR java/2066. Fixes PR java/2400.
5133
5134 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
5135
5136         * gjavah.c (process_file): Mark interface definitions with
5137         "__attribute__ ((java_interface))".
5138
5139 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5140
5141         * class.c (layout_class): Fixed push_super_field's second
5142         argument. Fixes PR java/2333.
5143         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5144         too early to lay innerclasses out.
5145
5146 2001-03-20  Tom Tromey  <tromey@redhat.com>
5147             Alexandre Petit-Bianco <apbianco@redhat.com>
5148
5149         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5150         inside an array reference. Insertion of the array store check
5151         rewritten. Fixes PR java/2299.
5152
5153 2001-03-20  Tom Tromey  <tromey@redhat.com>
5154
5155         * lex.c (java_read_unicode): Only accept leading `u's.
5156
5157 2001-03-20  Tom Tromey  <tromey@redhat.com>
5158
5159         * jcf-parse.c (read_class): Initialize `class'.
5160
5161 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5162
5163         * jcf_parse.c (jcf_parse): Eliminate unused variable.
5164
5165 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5166
5167         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5168         (layout_class): Likewise.
5169         (layout_class_method): Likewise.
5170         (emit_register_classes): Likewise.
5171         * decl.c (builtin_function): Likewise.
5172         (give_name_to_locals): Likewise.
5173
5174 2001-03-19  Per Bothner  <per@bothner.com>
5175
5176         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
5177         before trying to load an inner class.
5178
5179         Fixes to process to command-line .class files in two passes.
5180         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
5181         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
5182         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
5183         * class.c (is_compiled_class):  Fix for renamed flag.
5184         * parse.y (maybe_create_class_interface_decl):  Likewise.
5185         * jcf-parse.c (yyparse):  Also set if compiling .class files.
5186         * jcf-parse.c (read_class);  Read current_class.
5187         (jcf_parse):  Make static.
5188         (load_inner_classes):  New function, with code moved from jcf_parse,
5189         because we need to inner classes after the command-line files are read.
5190         (yyparse):  Set finput to NULL when it doesn't need to be closed.
5191         Reduce use of main_jcf (basically only for archive) and
5192         use finput instead of main_jcf->read_state.
5193         Inline jcf_figure_file_type into yyparse.
5194         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5195         Defer load_inner_classes and parse_class_file to a second pass,
5196         after we've correctly mapped command-line .clas fiels to classes.
5197         (jcf_figure_file_type):  Removed.
5198         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
5199         (JCF_ZERO):  Also clear zipd field.
5200         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
5201
5202 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5203
5204         * jcf-parse.c (yyparse): Change ch from char * to char.
5205
5206 2001-03-19  Per Bothner  <per@bothner.com>
5207
5208         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
5209         Add constructed filelist-file at end, following -xjava.  Thus any .o
5210         and library files are not affected by the -xjava.  Also wrap
5211         explicit @FILE with -xjava and -xnone.
5212
5213 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
5214
5215         * class.c (build_static_field_ref): Call make_decl_rtl() after
5216         setting the DECL_EXTERNAL flag.
5217
5218 2001-03-17  Per Bothner  <per@bothner.com>
5219
5220         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
5221
5222         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
5223         when result is is needed (target is STACK_TARGET).
5224
5225         * parse.h (JDEP_SOLV):  Removed.
5226         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
5227
5228         * parse.y (incomplete_class_list): Removed.
5229         (obtain_incomplete_type): Don't use or set incomplete_class_list.
5230         It doesn't work if resolve_class changes the name of an array type
5231         that is on the list and then someone else looks for the modified name.
5232         Also, seems liable to break when compiling multiple source files at
5233         once.  So the simplest is to just remove incomplete_class_list -
5234         it is only a minor space win and it is not even clear it saves time.
5235
5236         * parse.y (resolve_class):  Remove unneeded promote_type.
5237
5238 2001-03-15  Per Bothner  <per@bothner.com>
5239
5240         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
5241         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
5242         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5243         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5244
5245         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
5246         * parse.y (java_expand_classes):  Likewise.
5247
5248         * parse.y (expand_start_java_method):  Was only called once and had a
5249         misleading name, so inline in caller java_complete_expand_method.
5250         (enter_a_block):  Likewise inline in enter_block and remove.
5251
5252         Remove junk from when gcc/java was created (by copying from C/C++).
5253         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
5254         (struct binding_level):  Remove fields keep, keep_if_subblocks,
5255         more_cleanups_ok, have_cleanups (which have never been used).
5256         (pushlevel, poplevel):  Remove related useless code.
5257
5258         * class.c (make_class_data):  The class_dtable_decl (i.e. the
5259         vtable for Class) should be external, except when compiling Class.
5260
5261         * jvspec.c (lang_specific_driver):  Fix -C handling.
5262         Check -save-temps to see if temp @FILE should be deleted.
5263         Follow-up to/fix for February 16 patch.
5264
5265         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
5266         (type_stack_dup):  Remove no-longer neded error check.
5267
5268 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
5269
5270         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5271         to 'for_pointer'. If this type is for a pointer (argument) mangling,
5272         don't surround the element with 'N..E' if the type name is
5273         unqualified.
5274
5275 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5276
5277         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5278         DECL_RTL_SET_P, etc.
5279         (make_method_value): Likewise.
5280         (get_dispatch_table): Likewise.
5281
5282         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5283
5284 2001-03-07  Tom Tromey  <tromey@redhat.com>
5285
5286         * config-lang.in (lang_requires): Define.
5287
5288 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
5289
5290         * typeck.c (convert): Check flag_unsafe_math_optimizations,
5291         not flag_fast_math.
5292
5293 2001-03-05  Per Bothner  <per@bothner.com>
5294
5295         Fix a problem where rest_of_decl_compilation applied to
5296         class_dtable_decl causes problems because it was done too early,
5297         before output file was opened.
5298         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
5299         * class.c (class_dtable_decl):  Add macro - element of class_roots.
5300         (make_class_data):  Define class_dtable_decl.
5301         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
5302
5303 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5304
5305         * java/class.c, java/decl.c, java/java-tree.h: Replace all
5306         uses of 'boolean' with 'bool'.
5307
5308 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5309
5310         * lang-specs.h: Add zero initializer for cpp_spec field to all
5311         array elements.
5312
5313 2001-02-16  Per Bothner  <per@bothner.com>
5314
5315         Handle compiling multiple input files at once, and @FILE syntax.
5316         * gcj.texi:  Updated documentation to match.
5317         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
5318         * jcf-parse.c (parse_source_file):  Split into ...
5319         (parse_source_file_1):  New function - and:
5320         (parse_source_file_2):  New function.
5321         (yyparse):  On -ffilelist-file, open and scan named file.
5322         On first pass over files, only do parse_source_file_1.
5323         A new second pass calls parse_source_file_2 for each file to compile.
5324         (init_jcf_parse):  Call init_src_parse.
5325         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
5326         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
5327         as multiple input file combined in one compilation.
5328         * lang-options.h:  Add -ffilelist-file
5329         * lang.c (flag_filelist_file):  New flag variable.
5330         (lang_f_options):  Handle -ffilelist-file.
5331         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5332         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
5333         gclass_list - use global fields of src_parse_roots instead.
5334         * parse.y (src_parse_roots):  New array.
5335         (incomplete_class_list, gclass_list):  New macros.
5336         (push_parser_context, java_pop_parser_context,
5337         java_parser_context_resume):  Don't fiddle with deleted fields.
5338         (various):  Use incomplete_class gclass_list and global macros
5339         instead of parse_ctxt fields - the lists are global.
5340         (init_src_parse):  New function.
5341
5342 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5343
5344         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5345
5346 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5347
5348         * parse.y (check_inner_class_access): Moved declaration of local
5349         `enclosing_decl_type' to the right location.
5350
5351 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
5352
5353         * parse.y (parser_check_super_interface): Don't call
5354         check_pkg_class_access for an inner interface.
5355         (parser_check_super): Don't call check_pkg_class_access for inner
5356         class.
5357         (do_resolve_class): Simplify enclosing type loop. Don't call
5358         check_pkg_class_access if CL and DECL are not set.
5359         (find_in_imports_on_demand): Set DECL if class_type needed to be
5360         loaded. Don't call check_pkg_class_access for an inner class.
5361         (check_inner_class_access): Rewritten to implement member access
5362         rules as per spec 6.6.1.
5363         (check_pkg_class_access): Handle the empty package correctly.
5364         (in_same_package): New function. Determine if two classes are in the
5365         same package.
5366
5367 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
5368
5369         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
5370         method into array types.
5371         * parse.y (patch_method_invocation): Bypass access check on clone call
5372         to array instance.
5373
5374 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5375
5376         * expr.c (build_instanceof): Check for arrays when trying fold to
5377         false.
5378
5379 2001-02-15  Jim Meyering  <meyering@lucent.com>
5380
5381         * Make-lang.in (java.install-common): Depend on `installdirs'.
5382         (java.install-info): Likewise.
5383
5384 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
5385
5386         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
5387
5388 2001-02-14  Tom Tromey  <tromey@redhat.com>
5389             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5390
5391         Fix for PR java/1261.
5392         * typeck.c (build_java_array_type): Add public `clone' method to
5393         arrays.
5394         * parse.y (resolve_qualified_expression_name): Use current_class
5395         when checking for inaccessibility.
5396         (patch_method_invocation): Fixed error message when accessibility
5397         denied.  Added `from_super' argument.
5398
5399 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5400
5401         * parse.y (resolve_class): Don't build a fake decl. Use the one
5402         already built.
5403         * typeck.c (build_java_array_type): Build and assign decl to array
5404         type.
5405
5406 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5407
5408         * parse.y (not_accessible_p): Changed leading comment. Added extra
5409         `where' argument. Use it to enforce protected access rules.
5410         (resolve_qualified_expression_name): Added extra argument to
5411         not_accessible_p.
5412         (patch_method_invocation): Use argument `primary' to provide
5413         not_accessible_p with an extra argument.
5414         (lookup_method_invoke): Added extra argument to not_accessible_p.
5415         (search_applicable_method_list): Likewise.
5416
5417 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5418
5419         * parse.y (resolve_qualified_expression_name): Try to resolve as
5420         an inner class access only if `decl' is a TYPE_DECL.
5421
5422 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5423
5424         * decl.c (classdollar_identifier_node): Initialize.
5425         * java-tree.h (enum java_tree_index): New entry
5426         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
5427         (classdollar_identifier_node): New macro.
5428         (ID_CLASSDOLLAR_P): Likewise.
5429         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
5430         (build_dot_class_method_invocation): Likewise.
5431         (find_applicable_accessible_methods_list): `class$' can't be
5432         inherited.
5433
5434 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
5435
5436         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
5437
5438 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5439
5440         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
5441         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
5442         gone.
5443
5444 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5445
5446         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
5447         outside of the `__U' sequence too.
5448         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
5449         sequence too.
5450
5451 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5452
5453         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
5454
5455 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5456
5457         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
5458         (JVGENMAIN_OBJS): Likewise.
5459         * java-tree.h (append_gpp_mangled_name): New prototype.
5460         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
5461         Removed cast calling `gcc_add_root.'
5462         * jvgenmain.c (mangle_obstack): New global, initialized.
5463         (main): Use it.
5464         (do_mangle_class): Constify local `ptr.'
5465         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
5466         append_gpp_mangle_name and update `count' if necessary.
5467         Use `mangle_obstack.'
5468         * mangle.c (append_unicode_mangled_name): Removed.
5469         (append_gpp_mangled_name): Likewise.
5470         (unicode_mangling_length): Likewise.
5471         (mangle_member_name): Return type set to `void.'
5472         (mangle_field_decl): Don't append `U' in escaped names.
5473         (mangle_method_decl): Likewise.
5474         (mangle_member_name): Just use `append_gpp_mangled_name.'
5475         * mangle_name.c: New file.
5476
5477 2001-02-07  Per Bothner  <per@bothner.com>
5478
5479         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
5480
5481         * check-init.c (check_init):  Don't call done_alternative after
5482         processing loop code, as a LOOP_EXPR never terminates normally.
5483
5484 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5485
5486         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
5487
5488 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5489
5490         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
5491         DECLs.
5492
5493 2001-02-06  Tom Tromey  <tromey@redhat.com>
5494
5495         * lex.c (java_new_lexer): Longer error message.
5496
5497 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
5498             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5499
5500         * typeck.c (build_prim_array_type): Added leading comment.
5501         (build_java_array_type): Moved locals out of
5502         block. Always create the `data' field, fixed alignment to match
5503         C++.
5504
5505 2001-02-04  Tom Tromey  <tromey@redhat.com>
5506
5507         * expr.c (java_lang_expand_expr): Don't bother recomputing
5508         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
5509         Fixes PR java/1866.
5510
5511 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5512
5513         * parse.y (process_imports): Save the original name of the import
5514         for better error report.
5515
5516 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
5517
5518         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
5519         of macros used when compiling jvspec.c.
5520         * jvspec.c (lang_specific_driver): Link with the shared
5521         libgcc by default.
5522
5523 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5524
5525         * check-init.c (check_init): Call internal_error instead of fatal.
5526         * expr.c (java_lang_expand_expr): Likewise.
5527         * jcf-parse.c (get_constant): Likewise.
5528         * mangle.c (java_mangle_decl): Likewise.
5529         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
5530         (operator_string): Likewise.
5531         * check-init.c (check_init): Call abort instead of fatal.
5532         * class.c (build_class_ref): Likewise.
5533         * constants.c (write_constant_pool): Likewise.
5534         * decl.c (start_java_method): Likewise.
5535         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
5536         (java_stack_dup, encode_newarray_type): Likewise.
5537         (build_java_array_length_access): Likewise.
5538         (build_java_check_indexed_type, expand_java_pushc): Likewise.
5539         (build_java_soft_divmod, build_invokeinterface): Likewise.
5540         * java-tree.h (INNER_CLASS_P): Likewise.
5541         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
5542         (give_name_to_class, get_class_constant): Likewise.
5543         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
5544         (find_constant_index, generate_bytecode_conditional): Likewise.
5545         (generate_bytecode_insns, perform_relocations): Likewise.
5546         * lex.c (java_unget_unicode, java_lex): Likewise.
5547         * mangle.c (mangle_type, mangle_record_type): Likewise.
5548         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
5549         (finish_mangling): Likewise.
5550         * parse.h (MARK_FINAL_PARMS): Likewise.
5551         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
5552         (obtain_incomplete_type, java_complete_class): Likewise.
5553         (java_check_regular_methods, java_complete_expand_method): Likewise.
5554         (cut_identifier_in_qualified, check_deprecation): Likewise.
5555         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
5556         (java_complete_lhs, lookup_name_in_blocks): Likewise.
5557         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
5558         * typeck.c (set_local_type, parse_signature_type): Likewise.
5559         (parse_signature_string, build_java_signature): Likewise;
5560         (set_java_signature): Likewise.
5561         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
5562         * class.c (add_method): Call fatal_error instead of fatal.
5563         (build_static_field_ref): Likewise.
5564         * expr.c (build_known_method_ref, expand_invoke): Likewise.
5565         * jcf-parse.c (get_constant, jcf_parse): Likewise.
5566         * lex.c (java_new_new_lexer): Likewise.
5567         * jv-scan.c (main): Likewise.
5568         (fatal_error): Renamed from fatal.
5569         * jcf-parse.c (yyparse): Call fatal_io_error instead of
5570         pfatal_with_name.
5571         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
5572         (yyparse): Likewise.
5573         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
5574         * lex.c (java_get_line_col): Likewise.
5575         * jcf-parse.c (load_class): Make errors non-fatal.
5576         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
5577
5578 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
5579
5580         * jvgenmain.c (class_mangling_suffix): Remove unused string.
5581         (error): Remove unused function.
5582         (main): Don't use "__attribute__ alias" on generated class symbol.
5583
5584 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5585
5586         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
5587         argument.
5588         * parse.y (finish_method_declaration): Code accounting for WFLed
5589         method DECL_NAMEs deleted.
5590         (check_abstract_method_definitions): Likewise.
5591         (resolve_type_during_patch): Layout resolved type.
5592         * typeck.c (lookup_do): Removed unused local.
5593
5594 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
5595
5596         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
5597         * decl.c (init_decl_processing): Use integer_minus_one_node, not
5598         integer_negative_one_node.
5599         * expr.c (build_java_binop): Likewise.
5600
5601 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
5602
5603         * zextract.c (read_zip_archive): Read file_offset before writing
5604         zipd and consequently clobbering the header contents.
5605
5606 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5607
5608         * Make-lang.in: Remove all dependencies on defaults.h.
5609         * decl.c: Don't include defaults.h.
5610         * expr.c: Likewise.
5611         * parse.y: Likewise.
5612
5613 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5614
5615         * ChangeLog (2001-01-21): Fixed typo.
5616         * class.c (layout_class_method): Code accounting for WFLed
5617         method DECL_NAMEs deleted.
5618         * constant.c (find_methodref_index): Likewise.
5619         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
5620         * java-tree.h (DECL_FUNCTION_WFL): New macro.
5621         (struct lang_decl): New field `wfl'.
5622         (java_get_real_method_name): Prototype deleted.
5623         * mangle.c (mangle_method_decl): Code accounting for WFLed
5624         method DECL_NAMEs deleted.
5625         * parse.h (GET_METHOD_NAME): Macro deleted.
5626         * parse.y (reset_method_name): Deleted.
5627         (method_header): Set DECL_FUNCTION_WFL.
5628         (check_abstract_method_header): Code accounting for WFLed method
5629         DECL_NAMEs deleted.
5630         (java_get_real_method_name): Deleted.
5631         (check_method_redefinition): Code accounting for WFLed method
5632         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
5633         (java_check_regular_methods): Likewise.
5634         (java_check_abstract_methods): Likewise.
5635         (java_expand_classes): Don't call `reset_method_name.'
5636         (search_applicable_method_list): Use DECL_NAMEs instead of
5637         GET_METHOD_NAME.
5638         * typeck.c (lookup_do): Code accounting for WFLed method
5639         DECL_NAMEs deleted.
5640
5641 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
5642
5643         * lex.c (java_read_char): Check for EOF from getc first.
5644
5645 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5646
5647         * class.c (layout_class): Don't lay the superclass out if it's
5648         already being laid out.
5649         * jcf-parse.c (handle_innerclass_attribute): New function.
5650         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
5651         handle_innerclasses_attribute.
5652         (jcf_parse): Don't load an innerclasses if it's already being
5653         laid out.
5654         * jcf-write.c (append_innerclass_attribute_entry): Static
5655         `anonymous_name' and its initialization deleted. `ocii' and `ini'
5656         to be zero for anonymous classes.
5657
5658 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5659
5660         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
5661         necessary.
5662         * jcf-parse.c (set_source_filename): Use
5663         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
5664
5665 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5666
5667         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
5668         gets a unique asm name.
5669
5670 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5671
5672         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
5673         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5674         if necessary.
5675         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
5676         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
5677         * parse.y (lookup_package_type_and_set_next): Deleted.
5678         (resolve_package): Removed unnecessary code.
5679         (find_applicable_accessible_methods_list): `finit$' can't be
5680         inherited.
5681         * verify.c (pop_argument_types): Added missing prototype.
5682
5683 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
5684
5685         * config-lang.in: Disable java by default.
5686
5687 2001-01-23  Tom Tromey  <tromey@redhat.com>
5688
5689         * gcj.texi (Copying): New node.
5690         Added copyright information.
5691
5692 2001-01-21  Per Bothner  <per@bothner.com>
5693
5694         Various fixes to allow compiling a compressed .jar/.zip archive.
5695         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
5696         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
5697         (struct ZipDirectory):  New field zipf points to owning ZipFile.
5698         * jcf.h (struct ZipDirectory):  Add forward declaration.
5699         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
5700         Remove seen_in_zip and zip_offset fields.
5701         (JCF_SEEN_IN_ZIP):  New macro.
5702         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
5703         * jcf-io.c:  Change all ZipFileCache to ZipFile.
5704         (read_zip_member):  New function.
5705         (open_in_zip):  Call read_zip_member.
5706         * jcf-parse.c (find_in_current_zip):  Remove function.
5707         (read_class):  Merge in find_in_current_zip functionality.
5708         Call read_zip_member if needed.
5709         (parse_zip_file_entries):  Use read_zip_member.
5710         (process_zip_dir):  Update for removed and added JCF fields.
5711         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
5712
5713 2001-01-21  Per Bothner  <per@bothner.com>
5714
5715         Minor optimization of static ggc roots.
5716         * jcf-parse.c (parse_roots):  New static field.
5717         (current_field, current_method, current_file_list):  Replace by macros
5718         naming fields of parse_roots.
5719         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
5720         * class.c (class_roots):  New static field.
5721         (registered_class, fields_ident, info_ident, class_list):
5722         New macros naming fields of parse_roots.
5723         (build_static_field_ref):  Don't register roots here.
5724         (layout_class):  Static field list replaced by macro class_list.
5725         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
5726         Initialize fields_ident and info_ident here.
5727
5728 2001-01-21  Per Bothner  <per@bothner.com>
5729
5730         * jcf-parse.c (ggc_mark_jcf):  New function.
5731         (init_jcf_parse):  Register current_jcf as ggc root.
5732
5733 2001-01-21  Per Bothner  <per@bothner.com>
5734
5735         * lang.c (put_decl_node):  Print method's name.
5736
5737 2001-01-21  Per Bothner  <per@bothner.com>
5738
5739         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
5740         (verify_jvm_instructions):  Use it, for better error messages on loads.
5741
5742 2001-01-21  Per Bothner  <per@bothner.com>
5743
5744         * verify.c (merge_type_state):  Still may have to merge even if
5745         LABEL_VERIFIED (label).
5746
5747 2001-01-21  Per Bothner  <per@bothner.com>
5748
5749         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
5750         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
5751
5752 2001-01-19  Per Bothner  <per@bothner.com>
5753
5754         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
5755         if expeting an interface type.  Refines Tom's change of 2000-09-12.
5756
5757 2001-01-18  Per Bothner  <per@bothner.com>
5758
5759         * gcj.texi (Input Options): Mention .java files.
5760
5761 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5762
5763         * lang-options.h (-Wunsupported-jdk11): Removed.
5764         * lang.c (flag_not_overriding): Deleted.
5765         (flag_static_local_jdk1_1): Likewise.
5766         (lang_W_options): Removed "unsupported-jdk11" entry.
5767         * parse.y (java_check_methods): Removed dead code.
5768
5769 2001-01-17  Tom Tromey  <tromey@redhat.com>
5770
5771         Changes suggested by Per Bothner:
5772         * gcj.texi (Input Options): Don't mention input files.
5773         (Code Generation): Updated --main information.
5774         (Invoking jcf-dump): Mention that --javap is incomplete.
5775         From Alexandre Petit-Bianco:
5776         (Warnings): Don't mention -Wunsupported-jdk11.
5777         My stuff:
5778         (Compatibility): Mention JDK 1.2-ness of libraries.
5779         (Resources): Mention resources used when writing gcj.
5780
5781 2001-01-17  Tom Tromey  <tromey@redhat.com>
5782
5783         * gcj.texi: New file.
5784         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
5785         (java.info): Depend on gcj.info.
5786         (java/gcj.dvi): New target.
5787         (java.dvi): Depend on gcj.dvi.
5788         (java.install-info): Wrote.
5789
5790 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
5791
5792         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
5793         having called make_decl_rtl.
5794
5795 2001-01-14  Per Bothner  <per@bothner.com>
5796
5797         Various patches to emit better messages on verification errors.
5798         * expr.c (push_type_0):  Return error indication on stack overflow,
5799         instead of callinfg fatal.
5800         (push_type):  Now just call push_type_0 (nd fatal on overflow).
5801         (pop_type_0):  Return detailed error message (in a char** argument).
5802         (pop_type):  If pop_type_0 fails, print error message.
5803         (pop_argument_types):  Moved to verify.c.
5804         * verify.c (pop_argument_types):  Moved from expr.c.
5805         Return a (possible) error message, rather than void.
5806         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
5807         (verify_jvm_instruction):  Use new macros, improving error messages.
5808         For case OPCODE_astore use object_ptr_type_node.
5809         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
5810         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
5811
5812         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
5813         constant, return body without wrapper.  (Improves constant folding.)
5814         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
5815
5816 2001-01-13  Per Bothner  <per@bothner.com>
5817
5818         * expr.c (expand_java_field_op):  Assigning to a final field outside
5819         an initializer does not violate JVM spec, so should be warning, not
5820         error.  (Sun's verifier does not complain - though MicroSoft's does.)
5821
5822 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
5823
5824         * gjavah.c (version), jcf-dump.c (version): Update copyright year
5825         to 2001.
5826
5827 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
5828
5829         * parse.y (resolve_expression_name): Permit instance variables from
5830         enclosing context in super constructor call.
5831         (resolve_qualified_expression_name): Permit enclosing class's qualified
5832         "this" in super constructor call.
5833
5834 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5835
5836         * class.c (build_utf8_ref): Remove last argument in call to
5837         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5838         (build_class_ref): Likewise.
5839         (build_static_field_ref): Likewise.
5840         (get_dispatch_table): Likewise.
5841         (layout_class_method): Likewise.
5842         (emit_register_classes): Likewise.
5843         * constants.c (build_constant_data_ref): Likewise.
5844         * decl.c (builtin_function): Likewise.
5845         (create_primitive_vtable): Likewise.
5846         * expr.c (build_known_method_def): Likewise.
5847         (build_jni_stub): Likewise.
5848         (java_lang_expand_expr): Likewise.
5849
5850 2001-01-10  Tom Tromey  <tromey@redhat.com>
5851
5852         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
5853
5854 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5855
5856         * java-tree.h (lang_printable_name_wls): New prototype.
5857         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
5858         rather than `current_class' to print type name. Don't prepend type
5859         names when printing constructor names.
5860         (lang_printable_name_wls): New function.
5861         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
5862         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
5863         * parse.y (patch_method_invocation): Message tuned for constructors.
5864         (not_accessible_p): Grant `private' access from within
5865         enclosing contexts.
5866
5867 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5868
5869         All files with updated copyright when applicable.
5870         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
5871         * class.c (mangle_class_field): Function removed.
5872         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
5873         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
5874         (build_class_ref): Call `java_mangle_class_field' instead of
5875         `mangle_class_field.'
5876         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
5877         (layout_class): Call `java_mangle_decl' instead of
5878         `mangle_static_field.'
5879         (cxx_keywords): Initialized static array moved to `lex.c.'
5880         (layout_class_method): Changed leading comment. Simplified to
5881         call `java_mangle_decl.' Local `ptr' moved in for loop body.
5882         * decl.c (lang_mark_tree): Mark field `package_list.'
5883         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
5884         (struct lang_type): New field `package_list.'
5885         (unicode_mangling_length): Prototype removed.
5886         (append_gpp_mangled_name, append_gpp_mangled_classtype,
5887         emit_unicode_mangled_name): Likewise.
5888         (cxx_keyword_p): New prototype.
5889         (java_mangle_decl, java_mangle_class_field,
5890         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
5891         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
5892         `build_expr_wfl.'
5893         * jvgenmain.c (main_method_prefix): Global variable removed.
5894         (main_method_suffix): Likewise.
5895         (do_mangle_classname): New function.
5896         (main): Call it. Format changed to accommodate new mangling scheme.
5897         * lex.c: (utf8_cmp): Conditionally prototyped.
5898         (cxx_keywords): Moved from class.c, conditionally defined.
5899         (utf8_cmp, cxx_keyword_p): Likewise.
5900         * mangle.c (obstack.h, ggc.h): Included.
5901         (mangle_field_decl): New function.
5902         (mangle_method_decl, mangle_type, mangle_pointer_type,
5903         mangle_array_type, mangle_record_type,
5904         find_compression_pointer_match, find_compression_array_match,
5905         find_compression_record_match,
5906         find_compression_array_template_match, set_type_package_list,
5907         entry_match_pointer_p, emit_compression_string, init_mangling,
5908         finish_mangling, compression_table_add, mangle_member_name): Likewise.
5909         (mangle_obstack): New global.
5910         (MANGLE_RAW_STRING): New macro.
5911         (unicode_mangling_length): Turned static.
5912         (append_unicode_mangled_name): Renamed from
5913         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
5914         replaces `obstack', removed from the parameter list.
5915         (append_gpp_mangled_name): Turned static. `mangle_obstack'
5916         replaces parameter `obstack', removed from the parameter list. Call
5917         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
5918         (append_gpp_mangled_classtype): Removed.
5919         (compression_table, compression_next): New static variables.
5920         * parse.y (temporary_obstack): Extern declaration removed.
5921
5922 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5923
5924         * parse.y (patch_binop): Compute missing type in error situations.
5925
5926 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
5927
5928         * class.c (make_class_data): Push initial value for "arrayclass".
5929         * decl.c (init_decl_processing): Add new class field "arrayclass".
5930
5931 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
5932
5933         From patha@softlab.ericsson.se:
5934         * parse.y (switch_label): Use build, not build1, to construct
5935         DEFAULT_EXPR.
5936
5937 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5938
5939         * lang.c (lang_decode_option): Change -MA to -MP.
5940         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
5941         Update to new prototype; do quote targets.
5942         (jcf_dependency_write): Update.
5943
5944 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
5945
5946         Shorten primitive array allocation path:
5947         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
5948         to create new primitive arrays.
5949         * expr.c (build_newarray): If generating native code, call
5950         soft_newarray_node with a reference to the primitive TYPE identifier
5951         instead of type_value.
5952
5953 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
5954
5955         Fix for PRs gcj/312 and gcj/253:
5956         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
5957         dest if they arn't already.
5958         * class.c (layout_class): Call maybe_layout_super_class on
5959         superinterfaces also, but only if compiling from bytecode.
5960
5961         Fix for PR gcj/373:
5962         * parse.y (create_class): Set ACC_STATIC if class is declared in an
5963         interface.
5964
5965 2000-12-15  Tom Tromey  <tromey@redhat.com>
5966
5967         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
5968         set.
5969
5970 2000-12-14  Andrew Haley  <aph@redhat.com>
5971
5972         * boehm.c (mark_reference_fields): Change test to correctly detect
5973         bitmap overflow.
5974
5975 2000-12-15  Andreas Jaeger  <aj@suse.de>
5976
5977         * config-lang.in (lang_dirs): Added.
5978
5979 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5980
5981         * parse.y (end_artificial_method_body): Fixed undefined behavior.
5982         Credits go to rth for finding it.
5983
5984 2000-12-13  Mike Stump  <mrs@wrs.com>
5985
5986         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
5987
5988 2000-11-07  Tom Tromey  <tromey@cygnus.com>
5989
5990         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
5991         * lex.c (java_ignorable_control_p): Removed.
5992         (java_letter_or_digit_p): Removed.
5993         (java_start_char_p): New function.
5994         (java_read_char): Return `int', not `unicode_t'.  Changed
5995         callers.
5996         (java_read_unicode): Likewise.
5997         (java_read_unicode_collapsing_terminators): Likewise.
5998         (java_get_unicode): Likewise.
5999         (java_new_lexer): Initialize hit_eof.
6000         (java_parse_end_comment): Take `int' argument.
6001         (java_parse_doc_section): Likewise.
6002         (java_parse_escape_sequence): Don't allow backlash-newline.
6003         Return `int'.
6004         * lex.h (JAVA_DIGIT_P): Removed.
6005         (_JAVA_LETTER_OR_DIGIT_P): Removed.
6006         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6007         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6008         (JAVA_PART_CHAR_P): New macro.
6009         (UEOF): Now -1.
6010         (JAVA_CHAR_ERROR): Now -2.
6011         (java_lexer): New field `hit_eof'.
6012         * chartables.h: New file.
6013         * gen-table.pl: new file.
6014
6015 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6016             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6017
6018         * parse.y (java_complete_lhs): Only allow compound assignment of
6019         reference type if type is String.
6020
6021 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6022
6023         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6024         jcf-path.c: Likewise.
6025
6026 2000-12-09  Anthony Green  <green@redhat.com>
6027
6028         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6029         filestart and filename_length as int values.
6030
6031 2000-12-07  Mo DeJong  <mdejong@redhat.com>
6032
6033         * jcf-io.c (find_class): Correct the logic that tests to see if a
6034         .java file is newer than its .class file. The compiler was
6035         incorrectly printing a warning when file mod times were equal.
6036
6037 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
6038
6039         * jvgenmain.c: Use ISPRINT not isascii.
6040
6041 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6042
6043         * parse.y (end_artificial_method_body): Fixed typo.
6044
6045 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6046
6047         * parse.y (patch_method_invocation): Pick the correct enclosing
6048         context when creating inner class instances.
6049         Fixes gcj/332.
6050
6051 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
6052
6053         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6054         Update copyright year to 2000.
6055
6056 2000-11-23  Anthony Green  <green@redhat.com>
6057
6058         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6059         Move current_file_list out of yyparse and make it static.
6060
6061         * expr.c: Declare quick_stack and tree_list_free_list as static
6062         (init_expr_processing): Register quick_stack and
6063         tree_list_free_list roots.
6064
6065 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6066
6067         * parse.y (build_outer_field_access): New local `decl_ctx', use
6068         it. Check for field's context and current class immediate outer
6069         context inheritance.
6070         (outer_field_access_p): Consider fields inherited from the last
6071         enclosing context.
6072         (build_access_to_thisn): Stop at the last enclosing context if
6073         necessary.
6074         Fixes gcj/367.
6075
6076 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
6077
6078         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6079
6080 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
6081
6082         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6083         scratch buffer.
6084
6085 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6086
6087         * jv-scan.c (help): Document --complexity.
6088         (options): Added --complexity.
6089         (flag_complexity): New global.
6090         (main): Call `report'.
6091         * parse-scan.y (complexity): New global.
6092         (if_then_statement, if_then_else_statement,
6093         if_then_else_statement_nsi, switch_block_statement_group,
6094         while_expression, do_statement, for_begin, continue_statement,
6095         throw_statement, catch_clause, finally, method_invocation,
6096         conditional_and_expression, conditional_or_expression,
6097         conditional_expression): Update complexity.
6098         (reset_report): Reset complexity.
6099         (report): New function.
6100
6101 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6102
6103         * lex.c (yylex): Added STRICT_TK case.
6104         * parse.y (STRICT_TK): Added.
6105         * parse-scan.y (STRICT_TK): Added.
6106         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6107         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
6108         file.
6109         * keyword.h: Rebuilt.
6110         * keyword.gperf (strictfp): Added.
6111
6112 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6113
6114         * lex.c (yylex): Recognize floating point constants with leading
6115         0.
6116
6117 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6118
6119         * java-tree.h (cyclic_inheritance_report): Constify.
6120         * parse.y (cyclic_inheritance_report): Likewise.
6121
6122 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6123
6124         * parse.y (goal): Remove call to ggc_add_string_root.
6125
6126 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6127
6128         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6129         Create string in scratch buffer, then pass to build_string.
6130
6131 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6132
6133         * parse.y (issue_warning_error_from_context): Add
6134         ATTRIBUTE_PRINTF.
6135
6136 2000-11-11  Anthony Green  <green@redhat.com>
6137
6138         * jcf-parse.c (process_zip_dir): Add finput parameter.
6139         (jcf_figure_file_type): Call process_zip_dir with appropriate
6140         argument.
6141
6142 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6143
6144         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6145         * jcf-parse.c (jcf_figure_file_type): Likewise.
6146
6147 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6148
6149         * parse.y (create_new_parser_context): Use memset () instead of
6150         bzero ().
6151
6152 2000-11-08  Tom Tromey  <tromey@cygnus.com>
6153
6154         * gjavah.c (process_file): Only include gcj/cni.h when generating
6155         CNI stubs.
6156
6157 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6158
6159         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6160         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6161         instead of bzero ().
6162
6163 2000-11-05  Tom Tromey  <tromey@cygnus.com>
6164
6165         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6166         * lex.c (IS_ZERO): New define.
6167         (java_perform_atof): Error on floating point underflow.
6168
6169 2000-11-04  Tom Tromey  <tromey@cygnus.com>
6170
6171         * lex.c (java_parse_escape_sequence): Only read two octal
6172         characters if the first one is greater than 3.  Don't allow
6173         "octal" numbers to include the digits 8 or 9.
6174
6175 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6176
6177         * Make-lang.in (java.distdir): Remove.
6178
6179 2000-11-03  Tom Tromey  <tromey@cygnus.com>
6180
6181         * Make-lang.in (java.dvi): New target.
6182         Partial fix for PR other/567.
6183
6184         * lang-options.h: Mention -Wout-of-date.
6185         * jcf-dump.c (flag_newer): New global.
6186         * gjavah.c (flag_newer): New global.
6187         * jcf-io.c (find_class): Only warn when flag_newer set.
6188         * lang.c (flag_newer): New global.
6189         (struct string_option): New declaration.
6190         (lang_W_options): New global.
6191         (process_option_with_no): New function.
6192         (lang_decode_option): Use it.
6193
6194         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6195         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6196         `$'.
6197
6198         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6199         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6200         * lex.c (java_read_unicode): Removed `term_context' argument.
6201         Recognize any number of `u' in `\u'.
6202         (java_read_unicode_collapsing_terminators): New function.
6203         (java_get_unicode): Use it.
6204         (java_lineterminator): Removed.
6205         (yylex): Produce error if character literal is newline or single
6206         quote.  Return if eof found in middle of `//' comment.  EOF in
6207         `//' comment is only an error if pedantic.
6208         (java_ignorable_control_p): New function.
6209         (java_parse_end_comment): Return if eof found in middle of
6210         comment.
6211         Include flags.h.
6212         * jv-scan.c (pedantic): New global.
6213
6214 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6215
6216         * parse.y (outer_field_access_p): Inherited fields aren't
6217         consider outer fields.
6218         (maybe_build_thisn_access_method): Use
6219         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6220         (resolve_expression_name): Trigger an error if a static field
6221         is being accessed as an outer field.
6222
6223 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6224
6225         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6226         Fixes gcj/365.
6227
6228 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6229
6230         * Make-lang.in: Move all build rules here from Makefile.in,
6231         adapt to new context.  Wrap all rules that change the current
6232         directory in parentheses.  Expunge all references to $(P).
6233         When one command depends on another and they're run all at
6234         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6235         all object-file generation rules.  Delete obsolete variables.
6236
6237         * Makefile.in: Delete.
6238         * config-lang.in: Delete outputs= line.
6239
6240 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6241
6242         * parse.y (patch_method_invocation): NULLify this_arg when already
6243         inserted.
6244         (maybe_use_access_method): Handle call to methods unrelated to the
6245         current class. Fixed comment.
6246         Fixes gcj/361.
6247
6248 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6249
6250        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6251        scope.
6252
6253 2000-10-24  Tom Tromey  <tromey@cygnus.com>
6254
6255         * lex.c (java_new_lexer): Initialize new fields.  Work around
6256         broken iconv() implementations.
6257         (java_read_char): Swap bytes if required.  Use fallback decoder if
6258         required.
6259         (byteswap_init, need_byteswap): New globals.
6260         (java_destroy_lexer): Only close iconv handle if it is in use.
6261         * lex.h (java_lexer): New fields read_anything, byte_swap,
6262         use_fallback.
6263         Made out_buffer unsigned.
6264
6265 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6266
6267         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6268         where an enclosing context can be set on the jdep.
6269         (do_resolve_class): Fixed identation.
6270
6271 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6272
6273         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6274
6275         * jcf-reader.c (peek_attribute, skip_attribute): Only define
6276         when requested.
6277
6278         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6279
6280         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6281
6282 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6283
6284         * jcf-write.c (OP1): Update `last_bc'.
6285         (struct jcf_block): Fixed indentation and typo in comments.  New
6286         field `last_bc'.
6287         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6288         follows `monitorenter'.
6289         * parse.y (patch_synchronized_statement): New local `tmp'. Call
6290         `patch_string'.
6291         Fixes gcj/232.
6292
6293 2000-10-16  Tom Tromey  <tromey@cygnus.com>
6294
6295         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6296         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6297         * lang-options.h: Added -MA, -MT, -MF..
6298         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6299         (DEPEND_TARGET_SET): New macro.
6300         (DEPEND_FILE_ALREADY_SET): Likewise.
6301         (init_parse): Handle new flags.
6302         * jcf.h (jcf_dependency_print_dummies): Declare.
6303         * Make-lang.in (s-java): Added mkdeps.o.
6304         * Makefile.in (BACKEND): Added mkdeps.o.
6305         (../gcjh$(exeext)): Added mkdeps.o.
6306         (../jcf-dump$(exeext)): Added mkdeps.o.
6307         * jcf-depend.c: Include mkdeps.h.
6308         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6309         add_entry): Removed.
6310         (jcf_dependency_reset): Rewrote.
6311         (dependencies): New global.
6312         (jcf_dependency_set_target): Rewrote.
6313         (jcf_dependency_add_target): Likewise.
6314         (jcf_dependency_add_file): Likewise.
6315         (munge): Removed.
6316         (print_ents): Removed.
6317         (jcf_dependency_write): Rewrote.
6318         (print_dummies): New global.
6319         (jcf_dependency_print_dummies): New function
6320         (jcf_dependency_write): Call deps_dummy_targets if required.
6321
6322 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6323
6324         * gjavah.c (add_class_decl): Removed unused variables `tname',
6325         `tlen' and `name_index'.
6326         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6327         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6328         in `wfl_operator' with value.
6329         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6330         (jcf_figure_file_type): Fixed identation.
6331         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6332         * parse.y (analyze_clinit_body): New function.
6333         (static_initializer:): Reset `current_static_block'.
6334         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6335         `wfl_operator' with new value.
6336         (lookup_cl): Use EXPR_WFL_FILENAME.
6337         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6338         analyze_clinit_body.
6339         (build_outer_field_access): Access to this$<n> built from
6340         current_class, not its outer context.
6341         (build_access_to_thisn): Fixed leading comment. Tidied things up.
6342         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6343         (patch_method_invocation): Use `is_static_flag' when already
6344         initialized.
6345         (patch_newarray): Removed assignment in ternary operator.
6346
6347 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6348
6349         * except.c (free_eh_ranges): Don't free `whole_range'.
6350
6351 2000-10-15  Anthony Green  <green@redhat.com>
6352
6353         * decl.c (init_decl_processing): Call init_class_processing before
6354         anything else.
6355
6356 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6357
6358         * check-init.c (check_init): Fixed leading comment. Use
6359         LOCAL_FINAL_P.
6360         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6361         (give_name_to_locals): Likewise.
6362         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6363         fields in lang_decl_var.
6364         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6365         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6366         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
6367         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
6368         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
6369         (LOCAL_FINAL): Rewritten.
6370         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
6371         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
6372         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
6373         `init_final' fields.
6374         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
6375         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
6376         (TYPE_HAS_FINAL_VARIABLE): New macro.
6377         (struct lang_type): Added `afv' field.
6378         * parse.y (check_static_final_variable_assignment_flag): New function.
6379         (reset_static_final_variable_assignment_flag): Likewise.
6380         (check_final_variable_local_assignment_flag): Likewise.
6381         (reset_final_variable_local_assignment_flag): Likewise.
6382         (check_final_variable_indirect_assignment): Likewise.
6383         (check_final_variable_global_assignment_flag): Likewise.
6384         (add_inner_class_fields): Use LOCAL_FINAL_P.
6385         (register_fields): Handle local finals and final variables.
6386         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
6387         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6388         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6389         on local finals.
6390         (java_complete_expand_methods): Loop to set
6391         TYPE_HAS_FINAL_VARIABLE. Call
6392         `reset_final_variable_local_assignment_flag' and
6393         `check_final_variable_local_assignment_flag' accordingly before
6394         and after constructor expansion. Call
6395         `reset_static_final_variable_assignment_flag'
6396         before expanding <clinit> and after call
6397         `check_static_final_variable_assignment_flag' if the
6398         current_class isn't an interface. After all methods have been
6399         expanded, call `check_final_variable_global_assignment_flag' and
6400         `check_static_final_variable_assignment_flag' if the current class
6401         is an interface.
6402         (maybe_yank_clinit): Fixed typo in comment.
6403         (build_outer_field_access_methods): Removed old sanity check. Use
6404         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6405         Don't create access methods for finals.
6406         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
6407         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
6408         existing DECL_INIT has been processed.
6409         (java_complete_lhs): Likewise.
6410         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
6411         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
6412         logic.
6413         (patch_assignment): Use LOCAL_FINAL_P.
6414         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
6415         DECL_INITIAL is nullified.
6416         Fixes gcj/163.
6417
6418 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6419
6420         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
6421
6422         * Makefile.in (parse.c, parse-scan.c): Likewise.
6423
6424 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6425
6426         * class.c (temporary_obstack): Remove.
6427         (make_class): Don't mess with obstascks.
6428         (push_class): Likewise.
6429         (set_super_info): Likewise.
6430         (add_method_1): Likewise.
6431         (add_method): Likewise.
6432         (add_field): Likewise.
6433         (build_utf8_ref): Likewise.
6434         (build_class_ref): Likewise.
6435         (build_static_field_ref): Likewise.
6436         (finish_class): Likewise.
6437         (push_super_field): Likewise.
6438         (layout_class): Likewise.
6439         (layout_class_methods): Likewise.
6440         (init_class_processing): Likewise.
6441         * constants.c (get_tag_node): Likewise.
6442         (build_constant_data_ref): Likewise.
6443         * decl.c (ggc_p): Remove.
6444         (copy_lang_decl): Use ggc_alloc.
6445         (complete_start_java_method): Don't mess with obstacks.
6446         (start_java_method): Likewise.
6447         (end_java_method): Likewise.
6448         * except.c (link_handler): Use xmalloc.
6449         (free_eh_ranges): New function.
6450         (method_init_exceptions): Use it.
6451         (add_handler): Use xmalloc.
6452         (expand_start_java_handler): Don't mess with obstacks.
6453         (prepare_eh_table_type): Likewise.
6454         (expand_end_java_handler): Likewise.
6455         * expr.c (push_value): Likewise.
6456         (create_label_decl): Likewise.
6457         (build_jni_stub): Likewise.
6458         (java_lang_expand_expr): Likewise.
6459         (note_instructions): Use xrealloc.
6460         (java_push_constant_from_pool): Don't mess with obstacks.
6461         (process_jvm_instruction): Likewise.
6462         * java-tree.h (cyclic_inheritance_report): Remove duplicate
6463         declaration.
6464         * jcf-parse.c (get_constant): Don't mess with obstacks.
6465         (read_class): Likewise.
6466         (jcf_parse): Likewise.
6467         * lex.c (expression_obstack): Remove.
6468         (java_lex): Don't use obstack_free.
6469         * parse.h (exit_java_complete_class): Don't mess with obstacks.
6470         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
6471         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
6472         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
6473         * parse.y (gaol): Add more GC roots.
6474         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
6475         (lookup_field_wrapper): Likewise.
6476         (obtain_incomplete_type): Don't mess with obstacks.
6477         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
6478         macros.
6479         (craft_constructor): Don't mess with obstacks.
6480         (safe_layout_class): Likewise.
6481         (java_complete_class): Likewise.
6482         (source_end_java_method): Likewise.
6483         (build_outer_field_access_methods): Likewise.
6484         (build_outer_method_access_method): Likewise.
6485         (maybe_build_thisn_access_method): Likewise.
6486         (build_dot_class_method_invocation): Likewise.
6487         (java_complete_tree): Likewise.
6488         (java_complete_lhs): Likewise.
6489         (do_merge_string_cste): Likewise.
6490         (patch_string_cst): Likewise.
6491         (array_constructor_check_entry): Likewise.
6492         * typeck.c (build_java_array_type): Likewise.
6493         (parse_signature_string): Likewise.
6494         (build_java_signature): Likewise.
6495
6496 2000-10-12  Tom Tromey  <tromey@cygnus.com>
6497
6498         Fix for PR gcj/356:
6499         * gjavah.c (add_class_decl): Don't special-case inner classes.
6500         (add_namelet): Likewise.
6501
6502 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
6503
6504         * java-tree.h: Constify current_encoding.
6505         * lang.c: Constify current_encoding.
6506
6507 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
6508
6509         * jvgenmain.c (class_mangling_suffix): Omit `.'.
6510         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
6511
6512 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6513
6514         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
6515         patch. Fixes gcj/340.
6516
6517 2000-10-10  Tom Tromey  <tromey@cygnus.com>
6518
6519         * lex.c (java_new_lexer): Initialize out_first and out_last
6520         fields.
6521         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
6522
6523 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6524
6525         * parse.y (pop_current_osb): New function.
6526         (array_type:): Use `dims:', changed actions
6527         accordingly. Suggested by Anthony Green.
6528         (array_creation_expression:): Used pop_current_osb.
6529         (cast_expression:): Likewise.
6530         (search_applicable_method_list): Fixed indentation.
6531
6532 2000-10-08  Anthony Green  <green@redhat.com>
6533
6534         * parse.y (array_type_literal): Remove production.
6535         (type_literals): Refer to array_type, not array_type_literal.
6536
6537 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6538
6539         Patch contributed by Corey Minyard.
6540         * decl.c (check_local_named_variable): New function.
6541         (tree check_local_unnamed_variable): Likewise.
6542         (find_local_variable): Splitted. Call check_local_{un}named_variable.
6543
6544 2000-10-07  Anthony Green  <green@redhat.com>
6545
6546         * class.c (layout_class): Handle case where superclass can't be
6547         layed out yet.
6548
6549 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6550
6551         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
6552         gperf.
6553
6554 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6555
6556         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
6557         * jvgenmain.c (class_mangling_prefix): Removed.
6558         (class_mangling_suffix): New global.
6559         (main): Use it.
6560         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
6561         `$'.
6562         (print_method_info): Handle overrides for static and final
6563         methods.
6564         (process_file): Generate declaration for class object field.
6565         * class.c (cxx_keywords): New array.
6566         (utf8_cmp): New function.
6567         (cxx_keyword_p): New function.
6568         (layout_class_method): Mangle C++ keywords by appending `$'.
6569         (mangle_field): New function.
6570         (mangle_class_field): Use mangle_field.  Mangle class name as
6571         `class$'.
6572         (mangle_static_field): Use mangle_field.
6573
6574 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6575
6576         * decl.c (find_local_variable): Removed uncessary type check and
6577         fixed range check typo. From Corey Minyard.
6578
6579 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6580
6581         * decl.c (give_name_to_locals): New local `code_offset'. Call
6582         `maybe_adjust_start_pc'.
6583         * expr.c (note_instructions): New function.
6584         (expand_byte_code): Don't collect insn starts here.
6585         (peek_opcode_at_pc): New function.
6586         (maybe_adjust_start_pc): Likewise.
6587         * java-tree.h (maybe_adjust_start_pc): Declare.
6588         (note_instructions): Likewise.
6589         * jcf-parse.c (parse_class_file): Call `note_instructions'.
6590
6591 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6592
6593         * parse.y (field_access:): Fixed indentation.
6594         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
6595
6596 2000-09-07  Tom Tromey  <tromey@cygnus.com>
6597
6598         Fix for PR gcj/307:
6599         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
6600         JPRIMITIVE_TYPE_P, for arithmetic operators.
6601         (patch_method_invocation): Indentation fix.
6602         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
6603         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
6604         (do_unary_numeric_promotion): Cleaned up code.
6605         (valid_cast_to_p): Handle boolean correctly.
6606
6607 2000-09-27  Tom Tromey  <tromey@cygnus.com>
6608
6609         * lex.c (java_read_unicode): Reset bs_count when finished with
6610         `\u' sequence.
6611
6612 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6613
6614         Convert to GC.
6615         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
6616         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
6617         (typeck.o): Depend on ggc.h.
6618         * class.c (add_method_1): Use GC functions for allocation.
6619         (init_class_processing): Register roots.
6620         * decl.c (ggc_p): Set to 1.
6621         (pending_local_decls): Make it static.
6622         (push_jvm_slot): Use GC functions for allocation.
6623         (init_decl_processing): Register roots.
6624         (give_name_to_locals): Use GC functions for allocation.
6625         (lang_mark_tree): New function.
6626         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
6627         functions for allocation.
6628         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
6629         * lex.c (java_lex): Use build_string, rather than replicating it
6630         inline.
6631         * parse.y (goal): Add more roots.
6632         (mark_parser_ctxt): New function.
6633         * typeck.c: Include ggc.h.
6634
6635 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6636
6637         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
6638         contains something else than MODIFY_EXPR.
6639
6640 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
6641
6642         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
6643         * Makefile.in (parse.o): Depend on ggc.h.
6644         (class.o): Likewise.
6645         (constants.o): Likewise.
6646         (decl.o): Likewise.
6647         (expr.o): Likewise.
6648         (jcf-parse.o): Likewise.
6649         (jcf-write.o): Likewise.
6650         (mangle.o): Likewise.
6651         * class.c: Include ggc.h.
6652         (build_static_field_ref): Register GC roots.
6653         (layout_class): Likewise.
6654         (init_class_processing): Likewise.
6655         * constants.c: Include ggc.h.
6656         (current_constant_pool_data_ref): Remove.
6657         (tag_nodes): Move it to ...
6658         (get_tag_node): ... here.  Register GC roots.
6659         * decl.c: Include ggc.h.  Remove many global tree definitions.
6660         (throw_node): Define.
6661         (java_global_trees): Likewise.
6662         (predef_filenames): Make the size a constant.
6663         (init_decl_processing): Adjust accordingly.
6664         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
6665         * expr.c: Include ggc.h.
6666         (init_expr_processing): Register GC roots.
6667         (build_invokeinterface): Likewise.
6668         * java-tree.h: Replace extern tree declarations with macros.
6669         (java_global_trees): New variable.
6670         (java_tree_index): New enumeration.
6671         (init_jcf_parse): Declare.
6672         * jcf-parse.c: Include ggc.h.
6673         (current_class): Remove declaration.
6674         (main_class): Likewise.
6675         (all_class_list): Likewise.
6676         (predefined_filename_p): Adjust for constant size of
6677         predef_filenames.
6678         (init_jcf_parse): New function.
6679         * jcf-write.c: Include ggc.h.
6680         (generate_classfile): Register GC roots.
6681         (append_synthetic_attribute): Likewise.
6682         (append_innerclass_attribute_entry): Likewise.
6683         * lang.c: Include ggc.h.
6684         (lang_print_error): Register GC roots.
6685         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
6686         with macros.
6687         * parse.y: Include ggc.h.
6688         (wfl_operator): Remove.
6689         (goal): Register GC roots.
6690         (java_pop_parser_context): Adjust for new field names.
6691         (java_parser_context_save_global): Likewse.
6692         (java_parser_context_restore_global): Likewise.
6693         (java_parser_context_suspend): Likewise.
6694         (java_parser_context_resume): Likewise.
6695         (verify_constructor_circularity): Register GC roots.
6696         (lookup_cl): Likewise.
6697         (java_reorder_fields): Likewise.
6698         (build_current_this): Likewise.
6699         (class_in_current_package): Likewise.
6700         (argument_types_convertible): Likewise.
6701         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
6702
6703 2000-09-14  Tom Tromey  <tromey@cygnus.com>
6704
6705         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
6706
6707 2000-09-13  Tom Tromey  <tromey@cygnus.com>
6708
6709         * jcf-parse.c: Include <locale.h>.
6710         * jv-scan.c: Include <locale.h>.
6711
6712 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6713
6714         * expr.c (pop_type_0): Return `Object' if trying to merge two
6715         interface types.
6716         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
6717         interface types; `Object' is always a valid supertype.
6718
6719 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6720
6721         Fix for PR gcj/33:
6722         * jv-scan.c (help): Document --encoding.
6723         (options): Added `encoding' entry.
6724         (OPT_ENCODING): New define.
6725         (main): Handle --encoding.
6726         Include <langinfo.h> if nl_langinfo exists.
6727         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
6728         --encoding.
6729         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
6730         (parse_source_file): Correctly call java_init_lex.  Added `finput'
6731         argument.  Use nl_langinfo to determine default encoding.
6732         * java-tree.h (current_encoding): Declare.
6733         * parse.y (java_parser_context_restore_global): Don't restore
6734         `finput'.
6735         (java_parser_context_save_global): Don't set `finput' field.
6736         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
6737         if required.
6738         * lang.c (current_encoding): New global.
6739         (lang_decode_option): Recognize `-fencoding='.
6740         (finish_parse): Don't close finput.
6741         * parse.h (struct parser_ctxt): Removed `finput' and
6742         `unget_utf8_value' fields.  Added `lexer' field.
6743         (java_init_lex): Fixed declaration.
6744         * lex.c (java_new_lexer): New function.
6745         (java_destroy_lexer): Likewise.
6746         (java_read_char): Added `lex' argument.  Handle iconv case.
6747         (java_read_unicode): Added `lex' argument.  Count backslashes in
6748         lexer structure.
6749         (java_init_lex): Added `finput' and `encoding' arguments.  Set
6750         `lexer' field in ctxp.
6751         (BAD_UTF8_VALUE): Removed.
6752         (java_lex): Handle seeing UEOF in the middle of a string literal.
6753         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
6754         (java_lexer): New structure.
6755         (UNGETC): Removed.
6756         (GETC): Removed.
6757         (DEFAULT_ENCODING): New define.
6758         (java_destroy_lexer): Declare.
6759
6760 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6761
6762         Fix for PR gcj/343:
6763         * lex.c (java_init_lex): Initialize java_io_serializable.
6764         * parse.y (java_io_serializable): New global.
6765         (valid_ref_assignconv_cast_p): An array can be cast to
6766         serializable.
6767
6768 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6769
6770         * decl.c, expr.c: Include defaults.h if not already included.
6771         Don't define the *_TYPE_SIZE macros.
6772
6773 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
6774
6775         * typeck.c (build_java_array_type): Correct first parameter
6776         in ADJUST_FIELD_ALIGN invocation.
6777
6778 2000-09-06  Tom Tromey  <tromey@cygnus.com>
6779
6780         * lang-specs.h: Also recognize `-femit-class-files'.
6781
6782 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6783
6784         * verify.c (merge_types): Load the types to merge if necessary.
6785
6786 2000-09-02  Anthony Green  <green@redhat.com>
6787
6788         * jcf-io.c: Include zlib.h.
6789         (open_in_zip): Read compressed class file archives.
6790         * zipfile.h (ZipDirectory): Add uncompressed_size and
6791         compression_method fields.
6792         * zextract.c (read_zip_archive): Collect file compression info.
6793
6794 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
6795
6796         * parse.y (do_resolve_class): Also explore superclasses of
6797         intermediate enclosing contexts when searching for inner classes.
6798
6799 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6800
6801         * parse.y (variable_declarator_id:): Better error message.
6802         (expression_statement:): Use YYNOT_TWICE.
6803         (cast_expression:): Likewise.
6804         (assignment:): Likewise.
6805
6806 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6807
6808         * parse.y (do_merge_string_cste): New locals. Create new
6809         STRING_CSTs each time, use memcpy. Fixes gcj/311.
6810
6811 2000-08-07  Hans Boehm  <boehm@acm.org>
6812
6813         * boehm.c (mark_reference_fields): Set marking bits for all words in
6814         a multiple-word record.
6815         (get_boehm_type_descriptor): Use the procedure marking descriptor for
6816         java.lang.Class.
6817
6818 2000-08-31  Mike Stump  <mrs@wrs.com>
6819
6820         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
6821         jcf-dump$(exeext)): Make parallel safe.
6822
6823 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6824
6825         * jcf-parse.c (set_source_filename): Constify a char *.
6826         * jcf-write.c (append_innerclasses_attribute,
6827         make_class_file_name): Constify a char *.  Don't recycle a
6828         variable for an unrelated purpose.
6829         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
6830         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
6831
6832 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6833
6834         * expr.c (can_widen_reference_to): Fixed indentation.
6835         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
6836         * parse.y: `finit$' replaces `$finit$' in comments.
6837         (try_builtin_assignconv): Fixed leading comment.
6838
6839 2000-08-25  Greg McGary  <greg@mcgary.org>
6840
6841         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
6842
6843 2000-08-24  Greg McGary  <greg@mcgary.org>
6844
6845         * lang.c (lang_decode_option): Use ARRAY_SIZE.
6846         * parse.y (BINOP_LOOKUP): Likewise.
6847
6848 2000-08-22  Andrew Haley  <aph@cygnus.com>
6849
6850         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
6851         sign extending. Fixes gcj/321.
6852         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
6853         combining to make a jlong. Fixes gcj/321.
6854
6855 2000-08-21  Nix  <nix@esperi.demon.co.uk>
6856
6857         * lang-specs.h: Do not process -o or run the assembler if
6858         -fsyntax-only.
6859
6860 2000-08-16  Andrew Haley  <aph@cygnus.com>
6861
6862         * typeck.c (build_java_array_type): Rewrite code to do array
6863         alignment.  Take into account back-end macros when aligning array
6864         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
6865         user to set alignment. Fixes gcj/252 and 160.
6866
6867 2000-08-09  Tom Tromey  <tromey@cygnus.com>
6868
6869         * parse.y (check_abstract_method_definitions): Now return `int'.
6870         Check implemented interfaces.  Fixes PR gcj/305.
6871
6872         * parse.y (patch_switch_statement): Disallow `long' in switch
6873         expressions.  Fixes PR gcj/310.
6874
6875 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6876
6877         * decl.c (finit_leg_identifier_node): New global.
6878         (init_decl_processing): Use `finit$' to initialize
6879         finit_identifier_node. Use `$finit$' to initialize
6880         finit_leg_identifier_node.
6881         * expr.c (expand_java_field_op): Use ID_FINIT_P.
6882         * java-tree.h (finit_identifier_node): Changed attached comment.
6883         (finit_leg_identifier_node): New declaration.
6884         (ID_FINIT_P): Take finit_identifier_node and
6885         finit_leg_identifier_node into account. This is a backward
6886         compatibility hack.
6887
6888 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6889
6890         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
6891         Jan 6 2000 patch.
6892         (generate_bytecode_insns): Check `nargs' before emitting it.
6893         * verify.c (merge_type_state): Fixed typo.
6894         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
6895         generate_bytecode_{conditional,insns}.
6896
6897 2000-08-13  Anthony Green  <green@redhat.com>
6898
6899         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
6900         for -pg builds).
6901
6902 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6903
6904         * class.c (maybe_layout_super_class): Fixed indentation.
6905         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
6906         (java_check_methods): New function declaration.
6907         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
6908         instead of `str_ptr'.
6909         * jcf-write.c (generate_bytecode_insns): Emit number the of args
6910         of a `invokeinterface' at the right time.
6911         * parse.h (WFL_STRIP_BRACKET): New macro.
6912         (SET_TYPE_FOR_RESOLUTION): Use it.
6913         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
6914         (check_class_interface_creation): Don't check for cross package
6915         innerclass name clashes.
6916         (method_header): Behave properly if MDECL is `error_mark_node'.
6917         (method_declarator): Return `error_mark_node' if bogus current
6918         class.
6919         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
6920         (resolve_and_layout): New local `decl_type', set and used. Call
6921         java_check_methods.
6922         (java_check_methods): New method.
6923         (java_layout_classes): Use it.
6924         (resolve_qualified_expression_name): No EH check necessary in
6925         access$<n>.
6926         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
6927         `case' statement.
6928         (patch_assignment): Set DECL_INITIAL on integral final local.
6929
6930 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6931
6932         * java-tree.h (flag_extraneous_semicolon): New extern.
6933         * lang-options.h: (-Wextraneous-semicolon): New option.
6934         * lang.c (flag_redundant): Fixed typo in leading comment.
6935         (flag_extraneous_semicolon): New global.
6936         (lang_decode_option): Set `flag_extraneous_semicolon' when
6937         -Wall. Decode `-Wextraneous-semicolon'.
6938         * parse.y (type_declaration:): Removed `SC_TK' hack, added
6939         `empty_statement' rule.
6940         (class_body_declaration): Likewise.
6941         (method_body:): Accept `;' as a method body.
6942         (static_initializer:): Removed `SC_TK' hack.
6943         (constructor_block_end:): Likewise.
6944         (empty_statement:): Report deprecated empty declaration. Fixes
6945         gcj/295
6946
6947 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6948
6949         * parse.y (build_dot_class_method_invocation): Changed parameter
6950         name to `type'. Build signature from `type' and convert it to a
6951         STRING_CST if it's an array.
6952         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
6953         to use `ref_type' directly.
6954
6955 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
6956
6957         * lang-options.h: Added a comma after the last element to avoid
6958         syntax errors when other languages define additional options.
6959
6960 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
6961
6962         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
6963         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
6964         (jc1): Link with $(BACKEND).
6965         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
6966
6967 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
6968
6969         * jvspec.c: Adjust type of second argument to
6970         lang_specific_driver, and update code as necessary.
6971
6972         * class.c (build_dtable_decl): Initialize dummy.
6973
6974 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6975
6976         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
6977         method bodies not to rule out discarding `<clinit>'; don't use
6978         <clinit> to initialize static fields with constant initializers.
6979
6980 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6981
6982         * gjavah.c (print_method_info): Added `synth' parameter. Skip
6983         synthetic methods.
6984         (method_synthetic): New global.
6985         (HANDLE_METHOD): Recognize synthetic method and tell
6986         `print_method_info' about it.
6987         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
6988         processing a synthetic method.
6989         * jcf-reader.c (skip_attribute): New function.
6990         ( skip_attribute): Likewise.
6991
6992 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6993
6994         * parse.y (build_outer_field_access): Fixed comments.
6995         (fix_constructors): Emit the initialization of this$<n> before
6996         calling $finit$.
6997         (resolve_qualified_expression_name): Build an access to `decl' if
6998         necessary.
6999
7000 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7001
7002         * parse-scan.y (curent_class): Non longer const.
7003         (inner_qualifier, inner_qualifier_length): Deleted.
7004         (current_class_length): New global.
7005         (bracket_count): Fixed typo in leading comment.
7006         (anonymous_count): New global.
7007         (class_instance_creation_expression:): Handle anonymous classes.
7008         (anonymous_class_creation:): New rule.
7009         (push_class_context): Rewritten.
7010         (pop_class_context): Likewise.
7011         (INNER_QUALIFIER): Macro deleted.
7012         (report_class_declaration): call `push_class_context' when
7013         entering the function. `fprintf' format modified not to use
7014         INNER_QUALIFIER.
7015         (report_class_declaration): Assign `package_name' and
7016         `current_class' to NULL separately.
7017
7018 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7019
7020         * expr.c (build_invokeinterface): Call layout_class_methods on
7021         target interface.
7022
7023 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7024             Anthony Green  <green@cygnus.com>
7025             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7026
7027         * class.c (make_class_data): Create vtable for abstract classes.
7028         (get_dispatch_table): Changed to cope with abstract classes.
7029
7030 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7031
7032         * parse.y (patch_method_invocation): Don't reverse the argument
7033         list when dealing with anonymous class constructors. Fixed typo in
7034         comment.
7035
7036 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7037
7038         * parse.y (build_alias_initializer_parameter_list): Reverse
7039         crafted list when building aliases for anonymous class
7040         constructors.
7041
7042 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7043
7044         * parse.y (jdep_resolve_class): Don't bother checking potential
7045         innerclass access if `decl' is NULL.
7046         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7047         WFL.
7048
7049 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7050
7051         * parse.c: Remove (again.)
7052
7053 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7054
7055         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7056         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7057         outside the `if' statement, alias to innerclass removed, `decl'
7058         used to mark the class complete.
7059
7060 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7061
7062         * parse.y (simple_name:): Fixed typo in error message.
7063
7064 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7065
7066         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7067         or its first operand can be error marks.
7068
7069 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7070
7071         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7072         * parse.y (method_header): Likewise.
7073
7074 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7075
7076         * parse.y (process_imports): Consider that one might be trying to
7077         import an innerclass. Fixes gcj/254
7078
7079 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7080
7081         * parse.y (find_as_inner_class): Handle the case where the
7082         enclosing context of an innerclass has been loaded as bytecode.
7083
7084 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7085
7086         * parse.y (simple_name:): Reject `$' in type names.
7087         (resolve_type_during_patch): Use `type' as a second
7088         argument to resolve_no_layout. Fixes gcj/257.
7089
7090 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
7091
7092         * parse.y (find_most_specific_methods_list): Select the only
7093         non-abstract method even if max has been set.
7094         Fixes gcj/285, gcj/298.
7095
7096 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
7097
7098         * lang-specs.h: Added %(jc1) to java compiler options.
7099
7100 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7101
7102         * .cvsignore: New file.
7103
7104 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7105
7106         * parse.y (not_accessible_p): Access granted to innerclasses
7107         (indirectly) extending the reference type. Fixes gcj/249.
7108
7109 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7110
7111         * parse.y (patch_method_invocation): Fixed comment.
7112         (maybe_use_access_method): Build this$<n>s to the context of the
7113         target method, or a type that extends it. Fixes gcj/242.
7114
7115 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7116
7117         * parse.c: Remove.
7118
7119 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7120
7121         * parse.y (fold_constant_for_init): Avoid bullish conversion.
7122
7123 2000-07-13  Tom Tromey  <tromey@cygnus.com>
7124
7125         * lang-specs.h: Added %{I*}.
7126
7127 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7128
7129         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7130
7131 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7132
7133         * parse-scan.c: Remove.
7134
7135 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7136
7137         * class.c (set_super_info): Handled protected inner classes.
7138         (common_enclosing_context_p): Bail early if arguments aren't both
7139         inner classes.
7140         (get_access_flags_from_decl): Handle private and protected inner
7141         classes.
7142         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7143         (CLASS_PROTECTED): Likewise.
7144         (struct lang_type): New bitfield `poic'.
7145         * parse.y (jdep_resolve_class): Call check_inner_class_access on
7146         inner classes only.
7147         (check_inner_class_access): Renamed arguments, added
7148         comments. Handles protected inner classes (fixes gcj/225)
7149         (not_accessible_p): Fixed comments. Avoid handling inner classes.
7150
7151 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7152
7153         * parse.y (resolve_qualified_expression_name): Verify qualified
7154         access to `this'. Fixes gcj/239.
7155
7156 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7157
7158         * jcf-write.c (generate_classfile): Don't install ConstantValue
7159         for null pointers.
7160
7161 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7162
7163         * parse.y (resolve_qualified_expression_name): Handle inner class
7164         access. Fixes gcj/256.
7165
7166 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7167
7168         * jcf-write.c (generate_classfile): Properly install the
7169         ConstantValue attribute and the initial value constant pool index
7170         on string constants.
7171         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7172         class files.
7173
7174 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7175
7176         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7177         construct.
7178         * parse.y (find_as_inner_class): Fixed typo.
7179         (do_resolve_class): Explore enclosing contexts when searching for
7180         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7181         (check_inner_class_access): Check `decl' which can be null in case
7182         of previous errors.
7183
7184 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7185
7186         * java-tree.h (java_debug_context): Declared `extern'.
7187         (safe_layout_class): Likewise.
7188         * parse.y (resolve_field_access): Field must be `static' in order
7189         to be replaced by its initial value. Added comments.
7190         (find_applicable_accessible_methods_list): Fixed typo.
7191         (find_most_specific_methods_list): Methods found in innerclasses
7192         take over methods founds in the enclosing contexts.
7193         (java_complete_tree): Loosen restrictions on the type of DECLs
7194         that can be replaced by their initialization values.
7195         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7196
7197 2000-07-05  Tom Tromey  <tromey@cygnus.com>
7198
7199         * Make-lang.in (PARSE_DIR): New macro.
7200         (PARSE_RELDIR): Likewise.
7201         (PARSE_C): Likewise.
7202         (PARSE_SCAN_C): Likewise.
7203         ($(PARSE_C)): New target.
7204         ($(PARSE_SCAN_C)): Likewise.
7205         (SET_BISON): New macro.
7206         (BISONFLAGS): Likewise.
7207         (JAVABISONFLAGS): Likewise.
7208
7209 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
7210
7211         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7212         argument on the first pass for CNI as well as JNI.
7213         (print_method_info): Set up method name on the first pass only.
7214
7215 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7216
7217         * parse.y (parser_qualified_classname): Removed parameter
7218         `is_static'.
7219         (create_interface): Removed first passed parameter to
7220         parser_qualified_classname.
7221         (create_class): Likewise. Don't install alias on static
7222         innerclasses. Fixes gcj/275.
7223
7224 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7225
7226         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7227         debugable statement with empty_stmt_node. Fixes gcj/272
7228
7229 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7230
7231         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7232         gcj/271.
7233
7234 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7235
7236         * jcf-write.c (push_long_const): Appropriately cast short negative
7237         constant to jword.
7238
7239 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7240
7241         * parse.y (verify_constructor_super): Use loop variable
7242         `m_arg_type' initialized with `mdecl_arg_type'.
7243
7244 2000-06-29  Tom Tromey  <tromey@cygnus.com>
7245
7246         * parse.y (resolve_field_access): Handle case where `type_found'
7247         is NULL.
7248
7249 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7250
7251         * expr.c (lookup_field): The same field can be found through two
7252         different interface. Don't declare it ambiguous in that case.
7253
7254 2000-06-27  Tom Tromey  <tromey@cygnus.com>
7255
7256         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
7257         follows \r, then unget it at a lower level.
7258
7259 2000-06-26  Tom Tromey  <tromey@cygnus.com>
7260
7261         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7262         java_complete_tree.
7263
7264 2000-06-25  Tom Tromey  <tromey@cygnus.com>
7265
7266         * parse.y (for_statement): Wrap expression in a WFL if it is a
7267         constant.  For PR gcj/268.
7268
7269 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7270
7271         * parse.y (do_resolve_class): Minor optimiztion in the package
7272         list search. Removed unnecessary test and return statement.
7273         (valid_ref_assignconv_cast_p): Order of arguments to
7274         enclosing_context_p fixed.
7275
7276 2000-06-24  Tom Tromey  <tromey@cygnus.com>
7277
7278         * expr.c (lookup_field): Print error and return error_mark_node if
7279         field reference is ambiguous.
7280
7281         * parse.y (check_abstract_method_definitions): Also check if
7282         `other_method' is abstract.
7283
7284 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7285
7286         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7287         classes.
7288         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7289         (struct lang_type): New field `pic'.
7290         (CLASS_PRIVATE): New macro.
7291         * parse.y (check_inner_class_access): New function.
7292         (jdep_resolve_class): Call it.
7293
7294 2000-06-23  Tom Tromey  <tromey@cygnus.com>
7295
7296         * parse.y (patch_incomplete_class_ref): Initialize the returned
7297         class.  For PR gcj/260.
7298
7299 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7300
7301         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7302
7303 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7304
7305         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7306         Java specific checks.
7307         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7308         screened by DECL_P.
7309         * java-tree.def (CASE_EXPR): Marked 'e'.
7310         (DEFAULT_EXPR): Likewise.
7311         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7312         screened by DECL_P.
7313         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7314         Java specific checks.
7315         (generate_bytecode_insns): Test try_block for BLOCK before using
7316         BLOCK_EXPR_BODY.
7317         * parse.y (build_wfl_wrap): Added `location' argument. Set
7318         EXPR_WFL_LINECOL accordingly.
7319         (dim_expr:): Wrap constants with WFLs.
7320         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7321         (resolve_package): Check for `stmt' not being a BLOCK before
7322         building a debuggable statement with it.
7323         (make_qualified_primary): Added extra parameter to build_wfl_wrap
7324         invocation.
7325         (resolve_field_access): Make sure `decl' is a DECL before treating
7326         it as such.
7327         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7328         IDENTIFIER_NODE before treating it as such.
7329         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7330         treating it as such.
7331         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7332         to be applied only on non array types.
7333
7334 2000-06-16  Per Bothner  <per@bothner.com>
7335
7336         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
7337         define in terms of DECL_RESULT, as that fails when --enable-checking.
7338
7339 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7340
7341         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
7342         types the same in comparison.
7343         (CHECK_OP): Add static prototype.
7344
7345 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7346
7347         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7348         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7349         * parse.c: Rebuilt.
7350
7351 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7352
7353         * decl.c (create_primitive_vtable): Prototype.
7354
7355         * jcf-write.c (generate_bytecode_insns): Initialize variable
7356         `saved_context'.
7357
7358         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7359
7360 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7361
7362         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7363         to track searched classes, and do not search the same class more than
7364         once. Call find_applicable_accessible_methods_list on immediate
7365         superclass, instead of search_applicable_method_list on all ancestors.
7366         Fix for PR gcj/238.
7367
7368 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7369
7370         * parse.y (register_fields): Permit static fields in inner classes
7371         if they are final. Fix for PR gcj/255.
7372
7373 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7374
7375         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
7376         * parse.y (find_in_imports): Returned type changed to void,
7377         leading comment fixed.
7378         (register_package): New function.
7379         (qualify_and_find): Likewise.
7380         (package_declaration:): Use `register_package'.
7381         (single_type_import_declaration:): Removed local variable
7382         `node'. Added missing `;' for consistency.
7383         (type_import_on_demand_declaration:): Use `chainon' to link new
7384         entries.
7385         (lookup_field_wrapper): Lookup local variables defined in outer
7386         contexts first.
7387         (java_complete_class): Don't reverse the list of imported on demand.
7388         (do_resolve_class): Reorganized. Removed local variable
7389         `original_name'. Call `qualify_and_find' with the current package
7390         name, invoke `find_in_imports_on_demand' right after. Call
7391         `qualify_and_find' with the packages we've seen so far. Fixed
7392         operations numbering in comments.
7393         (java_expand_class): Don't reverse `package_list'.
7394         (find_most_specific_methods_list): New local variables `abstract'
7395         and `candidates'. Use them to pick the right method.
7396
7397 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
7398
7399         * parse.y (check_modifiers_consistency): Don't subtract out
7400         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
7401
7402 2000-06-04  Philipp Thomas  <pthomas@suse.de>
7403
7404         * Makefile.in (INTLLIBS): New.
7405         (LIBS): Add above.
7406         (DEPLIBS): Ditto.
7407
7408 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7409
7410         * class.c (get_dispatch_table): Build the vtable dummy entry list
7411         element with a null purpose. Fixed leading comment.
7412         (build_dtable_decl): Build an accurate dtable type when appropriate
7413         and use it.
7414
7415 2000-06-02  Richard Henderson  <rth@cygnus.com>
7416
7417         * lang.c (lang_get_alias_set): New.
7418
7419 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7420
7421         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
7422         before using it as the accessed field.
7423
7424 2000-05-31  Tom Tromey  <tromey@cygnus.com>
7425
7426         * java-tree.h (boolean_array_vtable, byte_array_vtable,
7427         char_array_vtable, short_array_vtable, int_array_vtable,
7428         long_array_vtable, float_array_vtable, double_array_vtable):
7429         Declare.
7430         * expr.c (get_primitive_array_vtable): New function.
7431         (create_primitive_vtable): New function.
7432         (java_lang_expand_expr): Enable code to statically generate
7433         arrays.
7434         * decl.c (init_decl_processing): Create primitive vtables.
7435         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
7436         short_array_vtable, int_array_vtable, long_array_vtable,
7437         float_array_vtable, double_array_vtable): Define.
7438
7439 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
7440
7441         * java/parse.y (find_applicable_accessible_methods_list):
7442         Don't add an uninitialized value to the list.
7443
7444 2000-05-25  Tom Tromey  <tromey@cygnus.com>
7445
7446         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
7447         when trying to see if field's class should be initialized.  Always
7448         initialize field's declaring class, not qualified class.
7449         For PR gcj/162.
7450
7451         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
7452         `wfl_operator', to maybe_build_primttype_type_ref.
7453         Fixes PR gcj/235.
7454
7455 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
7456
7457        * parse.y (patch_method_invocation): Don't try to lookup methods
7458        in primitive types.
7459
7460 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7461
7462         * parse.y (resolve_field_access): Call the appropriate <clinit>
7463         before accessing the length of a static array. Craft a decl for
7464         the field while its time. Fixes PR gcj/129.
7465
7466 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7467
7468         * parse.y (resolve_package): Correctly set `*next' (was off by
7469         one.)
7470         (resolve_qualified_expression_name): Fixed comment.
7471
7472 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7473
7474         * jcf-parse.c (jcf_parse_source): Reset current_class and
7475         current_function_decl to NULL before parsing a new file.
7476
7477 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7478
7479         * parse.y (block_end:): If the collected block doesn't feature a
7480         statement, insert an empty statement.
7481
7482 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7483
7484         * parse.y (maybe_yank_clinit): New function.
7485         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
7486         end of the list of methods belonging to a class.
7487         (java_complete_expand_method): Check whether <clinit> is really
7488         necessary and expand it accordingly.
7489
7490 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7491
7492         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
7493         processed by the method's switch statement.
7494
7495 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7496
7497         * java-tree.h: Added init state enum.
7498         * decl.c (emit_init_test_initialization): Initialize class
7499         initialization check variable by looking at class' state.
7500
7501 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7502
7503         * java-tree.h (build_instanceof): Declare.
7504         (build_get_class): Declare.
7505         * parse.y (patch_binop): Use build_instanceof.
7506         * expr.c (build_instanceof): New function.  If class is final,
7507         don't make a function call.
7508         (expand_java_INSTANCEOF): Use it.
7509         (build_get_class): New function.
7510
7511 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
7512
7513         * jcf-write.c (generate_classfile): Scan the source_file for
7514         slashes with the right pointer variable.
7515
7516 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
7517
7518         * lang.c (lang_decode_option): Update -Wunused flags by calling
7519         set_Wunused.
7520         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
7521
7522 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7523
7524         * check_init.c (check_init): Constify local char *.
7525         * class.c (push_class): Constify local char *.
7526         * java_tree.h: Update prototypes.
7527         * jcf-io.c (open_class): Constify filename parameter and
7528         return value.
7529         (find_class): Remove redundant string copy.  Cast return from
7530         open_class.
7531         * jcf-parse.c (read_class, parse_class_file, yyparse):
7532         Constify local char *.
7533         * jcf-write.c (generate_bytecode_insns, generate_classfile):
7534         Constify local char *.
7535         * jcf.h (JCF): Constify filename and classname.
7536         (JCF_FINISH): Cast args to FREE to char * when appropriate.
7537         * lang.c (init_parse): Constify parameter and return value.
7538         * lex.c (java_get_line_col): Constify filename parameter.
7539         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
7540         * parse.y (java_parser_context_suspend,
7541         issue_warning_error_from_context, safe_layout_class): Constify
7542         local char *.
7543         * parse.c: Regenerate.
7544
7545 2000-05-08  Tom Tromey  <tromey@cygnus.com>
7546
7547         * expr.c (build_jni_stub): Cache the result of
7548         _Jv_LookupJNIMethod.
7549
7550 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7551
7552         * decl.c (predef_filenames_size): Now 7.
7553         (predef_filenames): New seventh entry.
7554
7555 2000-05-04  Tom Tromey  <tromey@cygnus.com>
7556
7557         * boehm.c (mark_reference_fields): Don't mark RawData fields.
7558         Keep track of when we've seen a reference field after a
7559         non-reference field.
7560         (get_boehm_type_descriptor): Handle case where we see
7561         non-reference fields but no trailing reference field.
7562         * decl.c (rawdata_ptr_type_node): Define.
7563         (init_decl_processing): Initialize rawdata_ptr_type_node.
7564         * java-tree.h (rawdata_ptr_type_node): Declare.
7565
7566 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7567
7568         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
7569         specifiers in calls to fprintf.
7570
7571 2000-05-03  Andrew Haley  <aph@cygnus.com>
7572
7573         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
7574
7575         * javaop.h (WORD_TO_INT): New function.
7576         (IMMEDIATE_s4): Use WORD_TO_INT.
7577         * jcf.h (JPOOL_INT): Ditto.
7578
7579         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
7580         separator.
7581
7582 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7583
7584         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
7585         on native function.
7586         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
7587         JNI methods.
7588         * expr.c (build_jni_stub): New function.
7589         * lang-specs.h: -fjni and -femit-class-file are incompatible.
7590         * parse.c: Rebuilt.
7591         * parse.y (java_complete_expand_methods): Expand a native method
7592         and call build_jni_stub if -fjni given.
7593         * lang-options.h: Document -fjni.
7594         * lang.c (flag_jni): New global.
7595         (lang_f_options): Added `jni' entry.
7596         * java-tree.h (soft_lookupjnimethod_node,
7597         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
7598         Declare.
7599         (flag_jni): Declare.
7600         (build_jni_stub): Declare.
7601         (struct lang_decl): Added `native' flag.
7602         (METHOD_NATIVE): Redefined to use `native' field of lang specific
7603         structure.
7604         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
7605         soft_jnipopsystemframe_node): New globals.
7606         (init_decl_processing): Set them.  _Jv_InitClass only takes one
7607         argument.
7608
7609         * java-tree.def: Put into `C' mode.
7610
7611 2000-04-27  Tom Tromey  <tromey@cygnus.com>
7612
7613         Fix for PR gcj/2:
7614         * expr.c (expand_invoke): Generate check to see if object pointer
7615         is null in nonvirtual invocation case.
7616         * java-tree.h (soft_nullpointer_node): Declare.
7617         * decl.c (soft_nullpointer_node): New global.
7618         (init_decl_processing): Initialize soft_nullpointer_node.
7619         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7620         or `private' methods.
7621         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7622
7623 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7624
7625         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
7626         from <clinit>
7627
7628 2000-04-26  Tom Tromey  <tromey@cygnus.com>
7629
7630         * zextract.c (find_zip_file_start): New function.
7631         (read_zip_archive): Use it.
7632
7633 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7634
7635         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
7636
7637 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7638
7639         * class.c (common_enclosing_context_p): New function.
7640         * java-tree.h (common_enclosing_context_p): Added prototype.
7641         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
7642         classes sharing an outer context with the current instance.
7643         * parse.y (build_access_to_thisn): Fixed leading comment.
7644         (verify_constructor_super): New local `supper_inner'. Skip
7645         enclosing context argument in the case of inner class constructors.
7646         (patch_method_invocation): Insert proper context as second
7647         parameter to pure inner class constructor super invocations.
7648
7649 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7650
7651         * parse.y (end_class_declaration): Reset the interface number
7652         counter.
7653
7654 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7655
7656         * parse.y (source_start_java_method): Deleted unnecessary code.
7657         (patch_method_invocation): Fixed comment.
7658
7659 2000-04-24  Robert Lipe <robertlipe@usa.net>
7660
7661         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
7662
7663 2000-04-23  Tom Tromey  <tromey@cygnus.com>
7664
7665         * boehm.c (mark_reference_fields): Use int_byte_position.
7666
7667 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7668
7669         * boehm.c (mark_reference_fields): Only call byte_position on
7670         non-static fields.
7671
7672 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7673
7674         * boehm.c (mark_reference_fields): Added `last_view_index'
7675         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
7676
7677 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
7678
7679         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
7680         * parse.y (check_class_interface_creation): Fixed comments. Select
7681         permitted modifiers for (inner) interfaces. Changed error message
7682         to report rejected modifiers used with local classes.
7683
7684 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7685
7686         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
7687         of directly inherited type considered in scope.
7688         * parse.y (do_resolve_class): Search inherited classes for inner
7689         classes.
7690
7691 2000-04-20  Tom Tromey  <tromey@cygnus.com>
7692
7693         * parse.y (not_accessible_p): Use member's class, not current
7694         class, when doing inheritance check for protected reference.
7695         Fixes PR gcj/124.
7696
7697 2000-04-20  Jason Schroeder  <shrode@subnature.com>
7698
7699         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
7700
7701 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7702
7703         * parse.y (lookup_field_wrapper): Search for final local aliases.
7704         (resolve_expression_name): Let lookup_field_wrapper search for
7705         final local aliases. Force the value of `name' if one is found.
7706         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
7707         an expression name. Fixed comments.
7708
7709 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7710
7711         * parse.y (yyerror): `msg' can be null, don't use it in that case.
7712
7713 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7714
7715         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
7716
7717 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7718
7719         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
7720
7721 2000-04-18  Tom Tromey  <tromey@cygnus.com>
7722
7723         PR gcj/211:
7724         * gjavah.c (utf8_cmp): Changed return value.
7725         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
7726         result.
7727         (cxx_keywords): New global.
7728         (get_field_name): Handle new result of cxx_keyword_subst.
7729         (print_method_info): Likewise.
7730
7731 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
7732
7733         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
7734         with a newline, for CNI.
7735         (print_stub_or_jni): Print a space or newline before method name for
7736         CNI as well as JNI.
7737         (print_cxx_classname): Don't write leading "::" in CNI stub method.
7738         (process_file): Include gcj/cni.h if generating CNI stubs.
7739
7740 2000-04-16  Tom Tromey  <tromey@cygnus.com>
7741
7742         * gjavah.c (decompile_method): Use print_field_name.
7743         Fixes PR gcj/205.
7744
7745 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7746
7747         * parse.y (java_expand_classes): Reverse the package list once.
7748         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
7749         reduction.
7750         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
7751         the `==' and `!=' operators.
7752
7753 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7754
7755         * jcf-write.c (generate_bytecode_insns): At invocation time,
7756         always relate an interface method to the type of its selector.
7757
7758 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7759
7760         Fix for PR gcj/2:
7761         * expr.c (expand_invoke): Generate check to see if object pointer
7762         is null in nonvirtual invocation case.
7763         * java-tree.h (soft_nullpointer_node): Declare.
7764         * decl.c (soft_nullpointer_node): New global.
7765         (init_decl_processing): Initialize soft_nullpointer_node.
7766         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7767         or `private' methods.
7768         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7769
7770 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7771
7772         Fix for PR gcj/140:
7773         * parse.y (check_final_assignment): Recognize assignments to the
7774         `length' field of an array when generating class files.
7775
7776 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7777
7778         * class.c (decl_hash): Prototype removed.
7779         (decl_compare): Likewise.
7780
7781 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7782
7783         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
7784         * parse.y (check_modifiers_consistency): Check for final/volatile
7785         clash.  Fixes PR gcj/164.
7786
7787 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7788
7789         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
7790         made global.
7791         (java_hash_compare_tree_node): Renamed from `decl_compare, made
7792         global.
7793         (add_method_1): Use `java_hash_hash_tree_node' and
7794         `java_hash_compare_tree_node'.
7795         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
7796         (java_hash_compare_tree_node): Likewise.
7797         * parse.y (find_applicable_accessible_methods_list): Create,
7798         delete and use a hash table to remember already searched interfaces.
7799
7800 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
7801
7802         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
7803         with latest entry.
7804
7805 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7806
7807         * boehm.c (mark_reference_fields, set_bit): Prototype.
7808         (set_bit): Un-ANSI-fy definition.
7809
7810         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
7811         Prototype.
7812
7813         * decl.c (emit_init_test_initialization): Likewise.
7814
7815         * gjavah.c (jni_print_char): Likewise.
7816
7817         * parse.y (create_new_parser_context): Likewise.
7818
7819 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7820
7821         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
7822         patch missing hunk. Fixed indentation.
7823
7824 2000-03-30  Tom Tromey  <tromey@cygnus.com>
7825
7826         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
7827         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
7828
7829 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7830
7831         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
7832         when negative *before* using it as an array index.
7833         * ChangeLog: Fixed typo.
7834
7835 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7836
7837         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
7838         to 0 when it reaches -1.
7839
7840 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7841
7842         * jcf-parse.c (get_constant): Properly cast `num' during the
7843         invocation of `add_double'.
7844         * jcf-write.c (push_long_const): Properly cast `lo' before
7845         comparing it to short bounds.
7846         * parse-scan.y (interface_declaration:): Rule re-arrange so that
7847         `interface_body:' is reduced after the current interface is
7848         pushed.
7849
7850 2000-03-26  Tom Tromey  <tromey@cygnus.com>
7851
7852         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
7853         Java-specific `-f' option.
7854
7855 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7856
7857         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
7858         Adjust order of making types.
7859         Make bitsize_*_node values.
7860
7861 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7862
7863         * class.c (make_field_value): Use byte_position.
7864         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
7865         (java_array_data_offset): Likewise.
7866         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
7867         bzero call.
7868
7869 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7870
7871         * parse.y (check_abstract_method_definitions): New local
7872         `end_type_reached'. Make sure we also consider `end_type'.
7873         (java_check_abstract_method_definitions): Make sure we eventually
7874         consider `java.lang.Object'.
7875         (maybe_use_access_method): Don't use access method if not in the
7876         context of a pure inner class or if the method's context is right.
7877         (find_applicable_accessible_methods_list): New static flag
7878         `object_done'. Don't search abstract classes as interfaces. Fixed
7879         indentation. Fixed the `java.lang.Object' only search. Search
7880         class interface(s) first, then fully search enclosing contexts.
7881         (find_most_specific_methods_list): Pick the closest candidate when
7882         they're all abstract.
7883
7884 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7885
7886         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
7887         properly initialize `finished_label'. Don't emit gotos for empty
7888         try statements.
7889
7890 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7891
7892         * except.c (emit_handlers): Clear catch_clauses_last.
7893
7894 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7895
7896         * parse.y (check_method_types_complete): New function.
7897         (create_class): Reset anonymous class counter only when seeing an
7898         non inner classe.
7899         (java_complete_class): JDEP_METHOD: Don't recompute signature
7900         if incomplete.
7901
7902 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7903
7904         * class.c (build_static_ref): Fixed indentation in comment.
7905         * java-tree.def (TRY_EXPR): Fixed typo in name.
7906         (CLASS_LITERAL): Likewise.
7907         * java-tree.h: (TYPE_DOT_CLASS): New macro.
7908         (struct lang_type): New field `dot_class'.
7909         * jcf-write.c (generate_bytecode_insns): Fixed error message.
7910         (generate_classfile): Method `class$' is synthetic.
7911         * parse.y (build_do_class_method): New function.
7912         (build_dot_class_method_invocation): Likewise.
7913         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
7914         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
7915         (qualify_ambiguous_name): Likewise.
7916         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
7917         (build_try_statement): Fixed leading comment.
7918
7919 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7920
7921         * class.c (make_field_value): Properly handle sizes.
7922         (get_dispatch_vector): Use tree_low_cst and host_integerp.
7923         (layout_class_method): Count using trees.
7924         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
7925         * expr.c (java_array_data_offset): Use int_bit_position.
7926         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
7927         (build_invokevirtual): Use tree_low_cst and do computations with trees.
7928
7929 2000-03-16  Tom Tromey  <tromey@cygnus.com>
7930
7931         * lang.c (flag_hash_synchronization): New global.
7932         (lang_f_options): Added `hash-synchronization'.
7933         * lang-options.h: Mention -fhash-synchronization.
7934         * java-tree.h (flag_hash_synchronization): Declare.
7935         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
7936         hash table synchronization is disabled.
7937         * decl.c (init_decl_processing): Only push `sync_info' value when
7938         hash table synchronization is disabled.
7939         * class.c (make_class_data): Only push `sync_info' field when hash
7940         table synchronization is disabled.  Removed dead code.
7941
7942 2000-03-16  Tom Tromey  <tromey@cygnus.com>
7943
7944         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
7945
7946 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7947
7948         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
7949         classes.
7950         * parse.y (patch_method_invocation): Handle anonymous classes
7951         creation in static context.
7952
7953 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7954
7955         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
7956         * parse.y (resolve_qualified_expression_name): Use it.
7957         (patch_method_invocation): Likewise.
7958
7959 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7960
7961         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
7962         depending on the type of dependency which dictates what the
7963         current class is.
7964         (unresolved_type_p): Resolved types limited to the current class.
7965
7966 2000-03-15  Tom Tromey  <tromey@cygnus.com>
7967
7968         * decl.c (init_decl_processing): Set type of `sync_info' to be
7969         pointer to Object.
7970
7971         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
7972         Correctly compute bit number for current slot.  Zero `high' and
7973         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
7974         mark_reference_fields.
7975         (mark_reference_fields): New function.
7976
7977 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7978
7979         * parse.y (register_incomplete_type): Fixed initialization of
7980         JDEP_ENCLOSING.
7981
7982 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7983
7984         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
7985         static globals.
7986         (push_class_context, pop_class_context): New function.
7987         (class_body:): Call pop_class_context.
7988         (interface_body:): Likewise.
7989         (INNER_QUALIFIER): New macro.
7990         (report_class_declaration): Changed output format and use
7991         INNER_QUALIFIER. Call push_class_context.
7992
7993 2000-02-14  Andrew Haley  <aph@cygnus.com>
7994
7995         * check-init.c (check_init): Add new cases for unary and binary
7996         tree nodes.
7997
7998 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7999
8000         * parse.y (resolve_package): Set `next' once a type name has been
8001         progressively discovered.
8002         (resolve_qualified_expression_name): Propagate resolution only if
8003         there are remaining qualifiers. Take into account `q' might have
8004         been cleared after re-qualification.
8005         * parse.y (patch_method_invocation): New local `resolved'.
8006         Section dealing with qualified expression rewritten to use
8007         resolve_field_access.
8008
8009 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8010
8011         * parse.h (PUSH_CPC): Fixed indentation.
8012         (DEBUG_CPC): New macro.
8013         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8014         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8015         * parse.y (class_body_declaration:): Use
8016         SET_CPC_INSTANCE_INITIALIZER_STMT.
8017         (method_declaration:): Check for null current_function_decl.
8018         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8019         (java_parser_context_pop_initialized_field): Better handling of
8020         empty lists.
8021         (maybe_make_nested_class_name): Mark nested class name as
8022         qualified when necessary.
8023         (end_class_declaration): Don't call java_parse_context_resume when
8024         one or more error occurred.
8025         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8026         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8027         SET_CPC_INITIALIZER_STMT.
8028         (method_header): Check for inner classes declaring static methods.
8029         (resolve_qualified_expression_name): Handle situation where `this'
8030         is implied.
8031
8032 2000-03-13  Hans Boehm <boehm@acm.org>
8033
8034         * typeck.c (build_prim_array_type): Correctly set the high word too.
8035
8036 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8037
8038         * parse.y (java_complete_expand_methods): Leave <clinit> out of
8039         ordinary methods.
8040         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8041         list of methods for interfaces.
8042
8043 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8044
8045         * parse.y (qualify_ambiguous_name): Properly handle expressions
8046         using `null'.
8047
8048 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8049
8050         * parse.y (check_final_assignment): Extended to process
8051         COMPOUND_EXPR.
8052         (patch_assignment): Have check_final_assignment called only once.
8053
8054 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8055
8056         * java-tree.h (IS_INIT_CHECKED): New flag.
8057         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8058         * parse.y (patch_string): Call force_evaluation_order on the
8059         completed string concatenation tree.
8060         * expr.c (force_evaluation_order): Call force_evaluation_order on
8061         function's arguments too.
8062
8063 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8064
8065         * decl.c (emit_init_test_initialization): Mark KEY as unused.
8066         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8067         (build_anewarray): Likewise.
8068         * parse.y (patch_newarray): Likewise.
8069         * parse.c: Regenerated.
8070
8071 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
8072
8073         * decl.c (init_decl_processing): Added new class fields `depth',
8074         `ancestors', and `idt' to class_type_node. Use
8075         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8076         * class.c (make_class_data): Push initial values for new fields.
8077         * java-tree.h: Updated prototype for `build_invokeinterface'.
8078         * expr.c (build_invokeinterface): Changed parameters to accept
8079         `method' tree. Calculate index of `method' in its declaring
8080         interface. Build call to _Jv_LookupInterfaceMethodIdx.
8081         (expand_invoke): Call `build_invokeinterface' with new parameters.
8082         * parse.y (patch_invoke): Call `build_invokeinterface' with new
8083         parameters.
8084
8085 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
8086
8087         * typeck.c (lookup_do): Search superinterfaces first
8088         when looking up an interface method. From Godmar Back
8089         <gback@cs.utah.edu>
8090
8091 2000-03-06  Tom Tromey  <tromey@cygnus.com>
8092
8093         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8094
8095 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8096
8097         * java-tree.h (lookup_argument_method2): Declared.
8098         (safe_layout_class): Prototype moved from parse.h.
8099         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8100         * parse.y (java_check_regular_methods): Local `super_class' gone.
8101         Call lookup_argument_method2 instead of lookup_argument_method.
8102         Perform modifier match for methods found declared in implemented
8103         interfaces. Fixed indentation problem. Overriding/hiding error
8104         report to take place only for methods found in classes.
8105         * typeck.c (lookup_argument_method): Changed leading
8106         comment. Re-written by calling lookup_do.
8107         (lookup_argument_method2): New function.
8108         (lookup_java_method): Re-written by calling lookup_do.
8109         (lookup_do): New function.
8110
8111 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8112
8113         * check-init.c (check_init): Removed dead code. Handle (blank)
8114         final variables.
8115         * parse.y (declare_local_variables): New local `final_p', set it
8116         and use it to initialize LOCAL_FINAL.
8117         (check_final_assignment): Only check FIELD_DECLs.
8118
8119 2000-02-17  Tom Tromey  <tromey@cygnus.com>
8120
8121         * Makefile.in (JAVA_OBJS): Added boehm.o.
8122         (boehm.o): New target.
8123         * Make-lang.in (JAVA_SRCS): Added boehm.c.
8124         * java-tree.h (flag_use_boehm_gc): Declare.
8125         (get_boehm_type_descriptor): Declare.
8126         * lang.c (lang_f_options): Added `use-boehm-gc'.
8127         (flag_use_boehm_gc): New global.
8128         * lang-options.h: Added -fuse-boehm-gc.
8129         * boehm.c: New file.
8130         * class.c (get_dispatch_table): If class uses a Boehm type
8131         descriptor, put it in the vtable.
8132         (make_class_data): Removed dead code.
8133
8134 2000-03-03  Per Bothner  <per@bothner.com>
8135
8136         * decl.c (init_decl_processing):  Initialize sizetype properly.
8137
8138 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8139
8140         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8141         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8142         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8143         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8144         (jcf_parse): New local `current'. Load innerclasses seen in outer
8145         context being processed.
8146         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8147         * jcf-write.c (append_innerclasses_attribute): New function.
8148         (append_innerclasses_attribute_entry): Likewise.
8149         (get_access_flags): Handle static classes. Set anonymous and local
8150         classes to be private.
8151         (generate_classfile): Attribute count adjusted. Call
8152         append_innerclasses_attribute.
8153         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8154         PURE_INNER_CLASS_TYPE_P.
8155         * parse.y (parser_qualified_classname): New parameter `is_static',
8156         produce non qualified name accordingly.
8157         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8158         (create_interface): Added argument to parser_qualified_classname.
8159         (create_class): Added argument to parser_qualified_classname. Setup
8160         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8161         (add_inner_class_fields): Fixed indentation.
8162         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8163         (method_declarator): Fixed typo in comment.
8164         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8165         (build_current_thisn): Likewise.
8166         (patch_method_invocation): Likewise.
8167
8168 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8169
8170         * decl.c (current_function_decl): Move to toplev.c.
8171
8172 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8173
8174         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8175         (DECL_BIT_INDEX): Use underlying representation.
8176         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8177
8178 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8179
8180         * expr.c (build_java_ret): Pass proper type to size_binop.
8181
8182 2000-02-25  Anthony Green  <green@cygnus.com>
8183
8184         * expr.c (build_class_init): Mark the decl to be ignored by
8185         check_init.
8186         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8187         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8188         * class.c (init_test_hash_newfunc): New function.
8189         (decl_hash): New function.
8190         (decl_compare): New function.
8191         * decl.c (emit_init_test_initialization): New function.
8192         (complete_start_java_method): Traverse the init test hashtable,
8193         calling emit_init_test_initialization.
8194         (always_initialize_class_p): Define.
8195         * expr.c (build_class_init): Use initialization tests when
8196         emitting class initialization code.
8197         (always_initialize_class_p): Declare.
8198         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8199         1.
8200         * java-tree.h: Include hash.h.
8201         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8202         (struct lang_decl): Add init_test_table field.
8203         (init_test_hash_entry): Define.
8204
8205 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8206
8207         * gjavah.c (main): Avoid using `argi' to report unimplemented
8208         options.
8209
8210 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8211
8212         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8213         initialize locals to avoid warnings. Local `exception_type' moved
8214         into if statement.
8215
8216 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8217
8218         * parse.y (resolve_expression_name): Use `orig' as a second
8219         argument to resolve_field_access.
8220         (resolve_field_access): Removed unnecessary code when dealing with
8221         static fields.
8222
8223 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8224
8225         * class.c (push_super_field): Don't push the field twice.
8226         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8227         * parse.h (java_reorder_fields): Prototyped.
8228         * parse.y (java_reorder_fields): New function.
8229         (java_layout_class): Simplified not to worry about re-ordering.
8230
8231 2000-02-23  Tom Tromey  <tromey@cygnus.com>
8232
8233         * gjavah.c (print_name): In JNI case, correctly quote string.
8234         (print_method_info): Don't handle overrides in JNI mode.
8235
8236 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8237
8238         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8239         value type set to `boolean_type_node'.
8240
8241 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8242
8243         * jcf-dump.c (main): Test for correct condition after
8244         output file creation.
8245
8246 2000-02-19  Anthony Green  <green@cygnus.com>
8247
8248         * jcf-depend.c (add_entry): Fix test for first list entry.
8249
8250 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8251
8252         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8253         * constants.c (build_constants_constructor): Likewise.
8254
8255 2000-02-19  Anthony Green  <green@cygnus.com>
8256
8257         * jcf-depend.c (add_entry): Add entries to the end of the list.
8258
8259 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
8260
8261         * decl.c (INT_TYPE_SIZE): Define if necessary.
8262         (expand_java_return): Handle the case of a native integer smaller
8263         than a JVM integer.
8264
8265 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8266
8267         * gjavah.c (help): Use GCCBUGURL.
8268         * jv-scan.c (help): Likewise.
8269         * jcf-dump.c (help): Likewise.
8270
8271 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8272
8273         * jcf-write.c (generate_bytecode_insns): Don't generate empty
8274         `finally' clauses.
8275
8276 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8277
8278         * jcf-parse.c (load_class): Call `fatal' if no file containing
8279         the target class are found.
8280
8281 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
8282
8283         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8284         lex.c, lex.h, and PARSE_H to...
8285         (parse.o, parse-scan.o): ...here, respectively.
8286
8287         * lex.c: Split out code that may trigger SIGFPE from yylex()
8288         to its own function.
8289         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8290
8291 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8292
8293         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8294
8295 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8296
8297         * parse.y (outer_field_access_p): Stop in time when outer contexts
8298         are exhausted.
8299         (resolve_qualified_expression_name): Properly qualify *everything*
8300         after a package.type to be resoled as expression names.
8301         (find_applicable_accessible_methods_list): Save/restore `class' to
8302         isolate it from a possible outer context search.
8303
8304 2000-02-15  Tom Tromey  <tromey@cygnus.com>
8305
8306         * gjavah.c (jni_print_char): New function.
8307         (print_full_cxx_name): Use it.
8308         (decode_signature_piece): Likewise.
8309         (print_cxx_classname): Likewise.
8310
8311 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8312
8313         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8314         version.o.
8315         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8316
8317         * gjavah.c: Include version.h.
8318
8319         * jcf-dump.c: Likewise.
8320
8321         * jv-scan.c: Likewise.
8322
8323 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8324
8325         * parse.y (outer_field_access_fix): First parameter now a tree
8326         node. Check for assignment to final. First argument to
8327         build_outer_field_access_fix modified to accommodate prototype.
8328         (build_outer_field_access): Don't check for assignment to final
8329         here.
8330         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8331         possibly returned by outer_field_access_fix. Changed
8332         outer_field_access_fix's first argument.
8333         (check_final_assignment): $finit$'s context is OK.
8334         (patch_unaryop): Use node instead of its line/column value when
8335         calling outer_field_access_fix.
8336
8337 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8338
8339         * parse.y (interface_declaration:): No longer tagged
8340         <node>. Re-installed default action.
8341         (class_member_declaration:): Handle inner interfaces.
8342         (interface_member_declaration): Handle inner interfaces and
8343         classes.
8344         (create_interface): Push error if one seen. Suspend parsing
8345         context when processing an inner interface.
8346         (register_fields): Inner class static field limitations not to
8347         apply to inner interfaces.
8348
8349 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8350
8351         * jcf-parse.c (load_class): Update `java_error_count' when a
8352         class' file can't be found.
8353         (parse.y): Avoid (byte)code generation when errors seen.
8354
8355 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8356
8357         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8358         decodes a valid node.
8359         (patch_binop): Handle TRUNC_DIV_EXPR.
8360
8361 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8362
8363         * parse.y (resolve_package): New local `acc'. Try to progressively
8364         build and guess a package and type name.
8365
8366 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8367
8368         * parse.y (find_applicable_accessible_methods_list): Load and
8369         layout the search class if necessary.
8370         (java_complete_tree): Keep to original type of the folded initial
8371         value.
8372
8373 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8374
8375         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
8376         Generate error message if circularity is detected. New static
8377         local `list'.
8378         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
8379         * jcf-write.c (generate_bytecode_insns): Very simply handle
8380         SAVE_EXPR.
8381         * parse.y (java_check_circular_reference): Use
8382         `cyclic_inheritance_report' during report, if necessary.
8383         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
8384         walking NEW_ARRAY_INIT twice.
8385
8386 2000-02-09  Tom Tromey  <tromey@cygnus.com>
8387
8388         * parse.y (check_class_interface_creation): Allow inner classes to
8389         be `private' or `protected', check modifiers' consistency. Prevent
8390         block local classes from bearing any modifiers.
8391
8392 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8393
8394         * except.c (check_start_handlers): Re-add prototype lost in last
8395         patch.
8396         (maybe_start_try): Remove excess argument to `check_start_handlers'.
8397
8398 2000-02-09  Andrew Haley  <aph@cygnus.com>
8399
8400         * decl.c (clear_binding_level): Remove excess initializer.
8401         (maybe_poplevels): Remove unused variable.
8402         (force_poplevels): Ditto.
8403         (struct binding_level): Add comment.
8404
8405 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8406
8407         * jcf-write.c (generate_classfile): Don't consider
8408         pre-initialization with reference value (use <clinit> instead.)
8409         * parse.y (java_fix_constructors): No generated constructor for
8410         interfaces.
8411         (build_outer_field_access): Removed debug message.
8412         (outer_field_expanded_access_p): Adapted to bytecode generation.
8413         (build_outer_field_access_method): Use fix_method_argument_names.
8414         (build_outer_method_access_method): Fixed indentation. Added
8415         comment. Handle access method generation for static and also void
8416         methods.
8417         (build_access_to_thisn): Inserted debug message.
8418         (maybe_build_thisn_access_method): Use fix_method_argument_names.
8419         (resolve_qualified_expression_name): Fixed comment.
8420         (not_accessible_p): Adapted to bytecode generation. Added comment.
8421         (patch_method_invocation): Added comment.
8422         (maybe_use_access_method): Fixed leading comment. Handle static
8423         methods.
8424         (java_complete_lhs): Don't shortcut handling of initialized upon
8425         declaration String type static fields when generating bytecode.
8426         (patch_unaryop): Handle outer field access when generating
8427         bytecode.
8428
8429 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8430
8431         * java-tree.h (FIELD_THISN): New macro.
8432         * jcf-write.c (append_synthetic_attribute): New function.
8433         (generate_classfile): Set "Synthetic" attribute on this$<n>,
8434         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
8435         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
8436         this$<n> fields.
8437         (build_outer_field_access): Turned on access functions usage and
8438         generation when compiling to bytecode.
8439         (maybe_use_access_method): Likewise.
8440
8441 2000-01-25  Andrew Haley  <aph@cygnus.com>
8442
8443         * java-except.h (struct eh_range): Add `expanded' field.
8444         (maybe_start_try): Add end_pc arg.
8445         (maybe_end_try): Ditto.
8446         * java-tree.h (force_poplevels): new function.
8447         * expr.c (expand_byte_code): Don't call maybe_start_try or
8448         maybe_end_try.
8449         * except.c (add_handler): Reset expanded.
8450         (expand_start_java_handler): Set expanded.
8451         (check_start_handlers): Don't expand a start handler that's
8452         already been expanded.
8453         (maybe_start_try): Add end_pc arg.  Only expand a handler which
8454         ends after end_pc.
8455         (expand_end_java_handler): call force_poplevels.
8456         (force_poplevels): new function.
8457         * decl.c (binding_level): Add start_pc of binding level.
8458         (maybe_pushlevels): Call maybe_start_try when pushing binding
8459         levels.
8460         (maybe_poplevels): Call maybe_end_try when popping binding levels.
8461         (LARGEST_PC): Define.
8462         (clear_binding_level): Use LARGEST_PC.
8463
8464         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
8465         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
8466         (binding_depth, is_class_level, current_pc): new variables.
8467         (struct binding_level): ditto.
8468         (indent): new function.
8469         (push_jvm_slot): add debugging info.
8470         (maybe_pushlevels): ditto.
8471         (maybe_poplevels): ditto.
8472         (pushlevel): ditto.
8473         (poplevel): ditto.
8474         (start_java_method): ditto.
8475         (give_name_to_locals): comment only.
8476         * except.c (binding_depth, is_class_level, current_pc):
8477         new variables.
8478         (expand_start_java_handler): add debugging info.
8479         (expand_end_java_handler): ditto.
8480
8481 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8482
8483         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
8484         (print_name_for_stub_or_jni, process_file): Constify a char*.
8485
8486 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8487
8488         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
8489
8490 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8491
8492         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
8493         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
8494         defined to be 1.
8495
8496 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8497
8498         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
8499         * java-tree.h (TYPE_II_STMT_LIST): New macro.
8500         (struct lang_type): New field `ii_block'.
8501         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
8502         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
8503         * parse.h (struct parser_ctxt): New field `instance_initializers'.
8504         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
8505         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
8506         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
8507         macros.
8508         * parse.y (add_instance_initializer): New function.
8509         (in_instance_initializer): New static global.
8510         (class_body_declaration:): Link instance initializer block.
8511         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
8512         (array_creation_expression:): Remove unused local.
8513         (java_parser_context_push_initialized_field): Fixed leading
8514         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
8515         CPC_INSTANCE_INITIALIZER_LIST.
8516         (java_parser_context_pop_initialized_field): Likewise.
8517         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
8518         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
8519         CPC_INITIALIZER_STMT.
8520         (fix_constructors): New local `class_type'. Use it. Call
8521         add_instance_initializer.
8522         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
8523         (patch_return): Forbid return in instance initializers.
8524         (patch_throw_statement): Enforce exception handling in the context
8525         of instance initializers.
8526
8527 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8528
8529         * Make-lang.in (java.mostlyclean): Remove executables in
8530         `mostlyclean'.
8531
8532 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8533
8534         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
8535         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
8536         (java_float_finite): Convert to use union Word from javaop.h.
8537         (java_double_finite): Convert to use union DWord from javaop.h.
8538
8539 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8540
8541         * gjavah.c (options): Added `jni' entry.
8542         (help): Document -jni.
8543         (flag_jni): New global.
8544         (process_file): Handle JNI output.  Don't print text from
8545         -prepend, -add, etc, when generating stubs.  Only remove `.class'
8546         suffix if it actually exists.
8547         (main): Create a `.c' file when run with `--jni --stubs'.  Create
8548         correct output file name with `--jni'.
8549         (print_include): Mangle header name differently in JNI case.
8550         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
8551         method list.
8552         (print_method_info): Handle JNI case.  Put signature info into
8553         method name.  Handle case when STREAM is NULL.
8554         (print_name_for_stub_or_jni): New function.
8555         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
8556         (print_cxx_classname): Handle JNI.
8557         (print_full_cxx_name): Likewise.
8558         (decode_signature_piece): Likewise.
8559         (overloaded_jni_method_exists_p): New function.
8560         (struct method_name): Added `signature' and `sig_length' fields.
8561         (HANDLE_END_FIELD): Do nothing in JNI mode.
8562
8563 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8564
8565         * jv-scan.c: Include version.c, <getopt.h>.
8566         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
8567         (options): New array.
8568         (usage): New function.
8569         (version): New function.
8570         (main): Use getopt_long to parse command line.
8571         * jcf-dump.c: Include version.c, <getopt.h>.
8572         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
8573         OPT_JAVAP): New macros.
8574         (options): New array.
8575         (usage): Return `void'.  Changed message.
8576         (help): New function.
8577         (version): New function.
8578         (main): Use getopt_long_only to parse command line.
8579         * gjavah.c: Include <getopt.h>.
8580         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
8581         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
8582         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
8583         (options): New array.
8584         (java_no_argument): Removed.
8585         (help): Updated with missing options.
8586         (main): Use getopt_long_only to parse command line.
8587         (usage): Changed message.
8588
8589 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8590
8591         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
8592         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
8593         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
8594         * parse.y (array_creation_expression:): Handle anonymous arrays.
8595         (build_array_from_name): Don't set `ret_name' if null.
8596         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
8597         (qualify_ambiguous_name): Likewise.
8598         (java_complete_expand_class): Likewise.
8599
8600 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8601
8602         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
8603         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
8604         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
8605         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
8606         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
8607         AIPL_FUNCTION_COMPLETED_INVOCATION.
8608         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
8609         AIPL_FUNCTION_INVOCATION_READY.
8610         (AIPL_FUNCTION_DECLARATION): New enum entry.
8611         * parse.y (reorder_static_initialized): New function.
8612         (java_parser_context_pop_initialized_field): Use it.
8613         (add_inner_class_fields): Use
8614         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
8615         augmented. Install marker after last alias initializer, if any.
8616         (generate_finit): Fixed typo. Don't try to retain only the used
8617         fields.
8618         (method_header): Compute and set DECL_FUNCTION_NAP.
8619         (method_declarator): Fixed comment. Insert alias initializer in
8620         parameter list.
8621         (build_alias_initializer_parameter_list): Fixed leading
8622         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
8623         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
8624         (java_complete_expand_class): Code to retain only used aliases
8625         removed.
8626         (java_complete_expand_methods): New local `first_decl'. Generate
8627         $finit$ first, then expand the constructors, regular methods and
8628         <clinit>.
8629         (java_complete_expand_method): Don't report error on missing
8630         return statement if previously detected bogus.
8631         (fix_constructors): Don't patch constructor parameters list.
8632         (patch_method_invocation): Use new AIPL enum values. Reverse
8633         alias initializer list for anonymous classes.
8634
8635 2000-01-30  Anthony Green  <green@redhat.com>
8636
8637         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
8638         determine how many stack slots to pop.
8639
8640 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8641
8642         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
8643         error handling/recovery.
8644         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
8645
8646 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8647
8648         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
8649         FIELD_LOCAL_ALIAS_USED): New macros.
8650         (DECL_FUNCTION_NAP): New macro.
8651         (struct lang_decl): New field `nap'.
8652         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
8653         (struct lang_type): New fields `finit_stmt_list' and
8654         `clinit_stmt_list'.
8655         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
8656         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
8657         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
8658         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
8659         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
8660         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
8661         (BUILD_THROW): Macro line separator re-indented.
8662         * parse.y (end_class_declaration): New function.
8663         (maybe_generate_pre_expand_clinit): New name for
8664         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
8665         pre-expand static fields.
8666         (maybe_generate_clinit): Function deleted.
8667         (check_for_static_method_reference): Prototype's parameter list
8668         indented.
8669         (generate_finit): New name for maybe_generate_finit. Changed
8670         leading comment. Function rewritten to use
8671         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
8672         (build_alias_initializer_parameter_list): New function.
8673         (java_parser_context_pop_initialized_field): Likewise.
8674         (add_inner_class_fields): Likewise.
8675         (type_declaration:): Call end_class_declaration.
8676         (class_member_declaration:): Likewise.
8677         (formal_parameter_list:): Fixed typos.
8678         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
8679         element. Improved error handling.
8680         (block_statement:): Call end_class_declaration.
8681         (anonymous_class_creation:): Likewise.
8682         (create_anonymous_class): Fixed comments.
8683         (create_class): Call add_inner_class_fields.
8684         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
8685         (method_header): Use MARK_FINAL_PARMS.
8686         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
8687         (method_declarator): Propagate final argument flag.
8688         (craft_constructor): New local `artificial'. Call
8689         build_alias_initializer_parameter_list. Use
8690         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
8691         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
8692         necessary.
8693         (complete_expand_class): Get rid of unused outer context local
8694         alias fields.
8695         (java_complete_expand_methods): Fixed leading
8696         comment. Generate/pre-expand <clinit> first. Changed method
8697         expansion order to regular, $finit$, constructors, <clinit>.
8698         (java_complete_expand_method): Set current_function_decl.
8699         (fix_constructors): Fix constructor parameter list to account for
8700         outer context local alias initializers.
8701         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8702         (resolve_expression_name): Lookup outer context local aliases. New
8703         local `access', use it.
8704         (patch_method_invocation): Patch inner class ctor invocation with
8705         outer context local aliases initialization values. $finit$
8706         invocation patching now includes things generated with
8707         build_alias_initializer_parameter_list.
8708         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8709         (build_super_invocation): Likewise.
8710         (patch_assignment): Changed comment.
8711
8712 2000-01-27  Andrew Haley  <aph@cygnus.com>
8713
8714         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
8715         (emit_if): Ditto.
8716         (emit_jsr): Ditto.
8717
8718 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8719
8720         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
8721         concatenation.
8722         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
8723
8724         * parse.y (register_fields): Don't pass a format specifier to
8725         OBSOLETE_MODIFIER_WARNING.
8726         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
8727         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
8728         specifier.
8729         (check_modifiers): Change function into a macro.
8730         (check_class_interface_creation): Pass a literal format string.
8731
8732 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8733
8734         * buffer.h: PROTO -> PARAMS.
8735         * check-init.c: Likewise.
8736         * class.c: Likewise.
8737         * constants.c: Likewise.
8738         * convert.h: Likewise.
8739         * decl.c: Likewise.
8740         * except.c: Likewise.
8741         * expr.c: Likewise.
8742         * gjavah.c: Likewise.
8743         * java-except.h: Likewise.
8744         * java-tree.h: Likewise.
8745         * jcf-depend.c: Likewise.
8746         * jcf-dump.c: Likewise.
8747         * jcf-parse.c: Likewise.
8748         * jcf-path.c: Likewise.
8749         * jcf-reader.c: Likewise.
8750         * jcf-write.c: Likewise.
8751         * jcf.h: Likewise.
8752         * jv-scan.c: Likewise.
8753         * jvgenmain.c: Likewise.
8754         * jvspec.c: Likewise.
8755         * lang.c: Likewise.
8756         * lex.c: Likewise.
8757         * lex.h: Likewise.
8758         * parse-scan.y: Likewise.
8759         * parse.h: Likewise.
8760         * parse.y: Likewise.
8761         * typeck.c: Likewise.
8762         * verify.c: Likewise.
8763         * xref.c: Likewise.
8764         * xref.h: Likewise.
8765         * zextract.c: Likewise.
8766         * zipfile.h: Likewise.
8767
8768 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8769
8770         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8771         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
8772         * constants.c (build_constant_data_ref): Check for cached
8773         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
8774         in TYPE_CPOOL_DATE_REF.
8775         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
8776         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
8777         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
8778         (LOCAL_FINAL): New macro.
8779         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
8780         constant pool -- don't try to reuse.
8781         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
8782         TYPE_LANG_SPECIFIC.
8783         (find_in_current_zip): Use TYPE_JCF.
8784         * parse.h (java_check_final): Prototype removed.
8785         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
8786         (maybe_create_class_interface_decl,
8787         check_class_interface_creation): Likewise.
8788         (java_expand_finals): Function removed.
8789         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
8790         (block_statement:): Fixed comment.
8791         (anonymous_class_creation:): Likewise.
8792         (check_class_interface_creation): Reversed Jan 12, 2000 extra
8793         argument patch.
8794         (check_class_interface_creation): Loosened error report on (inner)
8795         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
8796         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
8797         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
8798         argument patch.
8799         (create_interface): Likewise.
8800         (anonymous_class_counter): New static global.
8801         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
8802         patch. Fixed comments.
8803         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
8804         anonymous_class_counter when declaring a toplevel class.
8805         (craft_constructor): Fixed constructor name when handling
8806         anonymous classes. Anonymous class constructors to feature hidden
8807         this$<n> parameter.
8808         (java_fix_constructors): Added comment.
8809         (java_check_final): Function removed.
8810         (java_complete_expand_methods): Fixed comment. Don't generate
8811         class data, save its outgoing constant pool instead.
8812         (verify_constructor_super): Skip anonymous class constructor
8813         hidden this$<n> parameter.
8814         (java_expand_classes): New local `saved_ctxp'. Removed call to
8815         java_expand_finals and java_check_final. Expand anonymous class
8816         constructors. Generate class data.
8817         (build_super_invocation): Skip anonymous class hidden this$<n>
8818         parameter.
8819         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
8820         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8821         (set_java_signature): Likewise.
8822
8823 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8824
8825         * gjavah.c: Delete ACC_VISIBILITY define.
8826         * jcf.h: Add ACC_VISIBILITY define.
8827         * parse.y: final: rule tagged <value>.
8828         (java_check_regular_methods): Use ACC_VISIBILITY define for
8829         default package access check.
8830         (local_variable_declaration_statement): Use final: rule.
8831
8832 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8833
8834         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
8835         (final:): New rule.
8836
8837 2000-01-17  Tom Tromey  <tromey@cygnus.com>
8838
8839         * gjavah.c (print_field_info): Allow non-static final fields.
8840
8841 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8842
8843         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
8844         * parse.y (patch_anonymous_class): New function.
8845         (create_anonymous_class): Register incomplete type when the
8846         class/interface to extends/implement isn't known yet.
8847         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
8848         (verify_constructor_super): Tuned error message.
8849
8850 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8851
8852         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
8853         (ANONYMOUS_CLASS_P): New macro.
8854         (TYPE_SIGNATURE, TYPE_JCF): New macros.
8855         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
8856         * parse.y (create_class): Added leading argument.
8857         (maybe_create_class_interface_decl,
8858         check_class_interface_creation): Likewise.
8859         (craft_constructor): New function.
8860         (verify_constructor_super): Added argument in prototype.
8861         (class_declaration:): Inserted leading argument.
8862         (for_begin:): Use FOR_LOOP_P.
8863         (anonymous_class_creation): Create WFL of the anonymous class to
8864         instantiate. Call build_new_invocation. Added comments.
8865         (check_class_interface_creation): Handle parameter `anonymous' in
8866         verbose mode class creation announce.
8867         (link_nested_class_to_enclosing): Exclude anonymous classes.
8868         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
8869         anonymous class, even though they appear to have an enclosing
8870         context.
8871         (create_interface): Pass extra argument to
8872         check_class_interface_creation.
8873         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
8874         (create_class): Call check_class_interface_creation and
8875         maybe_create_class_interface_decl with extra new argument. Don't
8876         add private this$<n> to anonymous classes.
8877         (method_declarator): Insert hidden this$<n> to anonymous class
8878         constructors.
8879         (java_fix_constructors): Deleted code creating default
8880         constructor. Call craft_constructor instead.
8881         (java_check_regular_methods): Set `saw_constructor' to 1 for
8882         anonymous classes.
8883         (fix_constructors): Pass extra argument to verify_constructor_super.
8884         (verify_constructor_super): New local `sdecl', use it. Search for
8885         matching constructor (possibly featuring arguments) in super
8886         class.
8887         (lookup_method_invoke): Craft constructor according to arguments
8888         list when dealing with anonymous class constructors.
8889         (build_super_invocation): Pass arguments to anonymous class super
8890         constructors.
8891         (search_loop): Use FOR_LOOP_P.
8892         (labeled_block_contains_loop_p): Likewise.
8893
8894 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8895
8896         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
8897         (enclosing_context_p): New function.
8898         (get_access_flags_from_decl): Handle CLASS_STATIC.
8899         (maybe_layout_super_class): Extra first argument passed to
8900         do_resolve_class.
8901         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
8902         ID_INIT_P.
8903         * decl.c (access0_identifier_node): New global.
8904         (init_decl_processing): access0_identifier_node initialized.
8905         (pushdecl): Set DECL_CONTEXT only on non type decls.
8906         * expr.c (lookup_field): Lookup inner class fields in enclosing
8907         contexts.
8908         (expand_invoke): Use ID_INIT_P.
8909         (expand_java_field_op): Use DECL_CLINIT_P.
8910         * java-tree.def (CLASS_LITERAL): New tree code.
8911         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
8912         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
8913         (struct lang_decl): New field `inner_access'.
8914         (enclosing_context_p): Prototyped.
8915         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
8916         ID_CLINIT_P): New macros.
8917         (CLASS_STATIC): New macro.
8918         (CLASS_ACCESS0_GENERATED_P): New macro.
8919         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
8920         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
8921         INNER_CLASS_P): New macros.
8922         (DECL_INNER_CLASS_LIST): New macro.
8923         * jcf-parse.c (yyparse): Avoid the use of ANSI string
8924         concatenation.
8925         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
8926         the shift value to int. Fixed typo in comment.
8927         * lex.c (inst_id, wpv_id): Initialize.
8928         * mangle.c (unicode_mangling_length): Take `$' into account.
8929         * parse.h (DRECOVER, RECOVER): Terminate properly.
8930         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
8931         (typedef struct _jdep): New field `enclosing'.
8932         (JDEP_ENCLOSING): New macro.
8933         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
8934         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
8935         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
8936         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
8937         GET_ENCLOSING_CPC_CONTEXT): New macros.
8938         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
8939         (do_resolve_class): Added extra argument in prototype.
8940         * parse.y (resolve_class): Added extra argument in prototype.
8941         (maybe_create_class_interface_decl): Likewise.
8942         (maybe_use_access_method, build_wfl_wrap): New functions.
8943         (java_complete_expand_classes, java_complete_expand_class):
8944         Likewise.
8945         (java_parser_context_push_initialized_field,
8946         java_parser_context_suspend, java_parser_context_resume):
8947         Likewise.
8948         (maybe_make_nested_class_name, make_nested_class_name,
8949         set_nested_class_simple_name_value,
8950         link_nested_class_to_enclosing, find_as_inner_class,
8951         find_as_inner_class_do, check_inner_class_redefinition,
8952         build_thisn_assign, build_current_thisn, build_access_to_thisn,
8953         maybe_build_thisn_access_method, build_outer_field_access,
8954         build_outer_field_access_methods, build_outer_field_access_expr,
8955         build_outer_method_access_method, build_new_access_id,
8956         build_outer_field_access_method, outer_field_access_p,
8957         outer_field_expanded_access_p, outer_field_access_fix,
8958         build_incomplete_class_ref, patch_incomplete_class_ref,
8959         create_anonymous_class): Likewise.
8960         (inst_id, wpv_id): New static global variables.
8961         (synchronized:): New rule, tagged <node>.
8962         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
8963         rules.
8964         (anonymous_class_creation:): New rule, tagged <node>.
8965         (NEW_TK): Tagged <node>.
8966         (type_literals, array_type_literal): New rules, tagged <node>.
8967         (class_declaration:): Removed action when reducing by class_body:
8968         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
8969         using GET_CPC in sub-rules.
8970         (class_member_declaration): Handle inner classes.
8971         (method_declaration): When reducing method_header:, reset
8972         current_function_decl when appropriate.
8973         (method_declarator:): Set the number of formal parameter to 0 for
8974         method declared without arguments.
8975         (constructor_declarator:): Likewise.
8976         (static_initializer:): List of elements kept in a list.
8977         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
8978         use of the keyword `static' for type declarations.
8979         (block_statement:): Handle inner class declarations.
8980         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
8981         type qualified `this'.
8982         (class_instance_creation_expression): Use anonymous_class_creation:
8983         to handle inner class instances creation. Handle qualified `new'.
8984         (something_dot_new): Added appropriate actions.
8985         (create_new_parser_context): New function.
8986         (java_push_parser_context, java_parser_context_save_global,
8987         java_parser_context_suspend): Use create_new_parser_context.
8988         (check_modifiers): Changed leading comment.
8989         (check_class_interface_creation): Handle interclasses.
8990         (add_superinterfaces): Fixed comment.
8991         (create_interface): Build qualified name from the raw_name instead
8992         of its matching WFL. Push the initialized fields list. raw_name added
8993         as an extra argument to maybe_create_class_interface_decl.
8994         (create_class): Build qualified name from the raw_name instead of
8995         its matching WFL. Removed assignment to current_parsed_class_un.
8996         Call PUSH_ERROR before returning an error. Suspend the current
8997         parser context when processing an inner class. Push the
8998         initialized fields list. raw_name added as an extra argument to
8999         maybe_create_class_interface_decl. Add the private this$<n>
9000         field.
9001         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9002         (register_fields): Get the class type from GET_CPC and handle
9003         previous errors.  Added code to handle the creation of static
9004         fields in inner classes. Initialized fields initialization
9005         statements kept in a list of lists.
9006         (maybe_generate_finit): Initialized fields initialization
9007         statements kept in a list of lists. Use GET_CPC.
9008         (maybe_generate_clinit): Likewise.
9009         (method_header): Use GET_CPC and GET_CPC_UN.
9010         (parser_qualified_classname): Handle inner classes.
9011         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9012         (java_fix_constructors): Hide pointer to enclosing context
9013         instance in constructor list when dealing with inner classes.
9014         (jdep_resolve_class): Call resolve_class with extra first argument
9015         JDEP_ENCLOSING.
9016         (resolve_class): Add enclosing context as a first extra argument
9017         to do_resolve_class.
9018         (do_resolve_class): Call find_as_inner_class. Handle WFLs
9019         properly.
9020         (resolve_no_layout): Extra argument added to resolve_class
9021         invocation.
9022         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9023         (java_get_real_method_name): Use GET_CPC_UN.
9024         (check_abstract_method_definitions): Use DECL_CLINIT_P.
9025         (java_check_abstract_methods): Handle static method declared in
9026         inner classes by an error.
9027         (java_check_regular_methods): Use DECL_CLINIT_P.
9028         (source_start_java_method): Also set DECL_MAX_LOCALS.
9029         (create_artificial_method): Call java_parser_context_save_global
9030         and java_parser_context_restore_global instead of saving/restoring
9031         the context by hand.
9032         (expand_start_java_method): Improved verbose mode message.
9033         (java_complete_expand_methods): Fixed leading comment. Use
9034         DECL_CLINIT_P.
9035         (fix_constructors): Added assignment to this$<n> if necessary.
9036         (java_expand_classes): Call java_complete_expand_classes instead
9037         of java_complete_expand_methods.
9038         (make_qualified_primary): Simplified.
9039         (merge_qualified_name): Optimized for missing left or right parts.
9040         (resolve_expression_name): Handle access to outer class fields from
9041         interclasses.
9042         (resolve_qualified_expression_name): New macro
9043         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9044         classes. Report error on non appropriate qualification of
9045         `new'. Handle qualified `this'.
9046         (not_accessible_p): Allow access to outer class private fields from
9047         inner classes.
9048         (patch_method_invocation): Handle method invocations through
9049         access methods and inner class constructor invocations.
9050         (find_applicable_accessible_methods_list): Search enclosing
9051         contexts of an inner class.
9052         (search_applicable_methods_list): Fixed typo.
9053         (argument_types_convertible): Handle inner class constructors'
9054         hidden outer context reference argument.
9055         (qualify_ambiguous_name): Handle qualified `this'.
9056         (java_complete_lhs): Handle use of field accessed through
9057         artificial access methods in various cases of assignments. Handle
9058         CLASS_LITERAL node.
9059         (check_final_assignment): Use DECL_CLINIT_P.
9060         (valid_ref_assignconv_cast_p): Handle the destination being an
9061         enclosing context of the source.
9062         (patch_unaryop): Handle use of field accessed through artificial
9063         access methods.
9064         (patch_return): Use DECL_CLINIT_P.
9065         (patch_throw_statement): Use DECL_CLINIT_P.
9066         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9067         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9068         ID_INIT_P.
9069
9070 2000-01-16  Anthony Green  <green@cygnus.com>
9071
9072         * parse.y (build_string_concatenation): Only use
9073         StringBuffer(String) shortcut if String arg is constant.
9074
9075 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9076
9077         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9078         the shift value to int. Fixed typo in comment.
9079
9080 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9081
9082         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9083         * jcf-write.c: Likewise.
9084         * parse.y: Likewise.
9085         * parse.c: Regenerate.
9086
9087 2000-01-09  Anthony Green  <green@cygnus.com>
9088
9089         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9090         bytecodes in the correct order.
9091
9092 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9093
9094         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9095
9096 2000-01-06  Anthony Green  <green@cygnus.com>
9097
9098         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9099         before building constant array decl.
9100
9101 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9102
9103         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9104         method invocation and typo in conditional expression.
9105         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9106         the appropriate NOTE_POP.
9107         * parse.y (patch_binop): Shift value mask to feature the right
9108         type.
9109
9110 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9111
9112         * class.c (assume_compiled, assume_compiled_node): Add static
9113         prototype.
9114         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9115
9116         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9117
9118         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9119
9120         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9121         to `__modifier' to avoid stringifying it.
9122
9123         * parse.y (verify_constructor_circularity): Don't call a variadic
9124         function with a non-literal format string.
9125         (java_check_abstract_methods): Move unreachable code inside
9126         `continue' statement.
9127         (lookup_method_invoke): Call xstrdup, not strdup.
9128
9129         * expr.c (expand_java_field_op): Avoid the use of ANSI string
9130         concatenation.
9131
9132         * jcf-parse.c (yyparse): Likewise.
9133
9134         * jv-scan.c (main): Likewise.
9135
9136 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9137
9138         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9139         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9140         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9141         concatenation.
9142
9143         * parse.y (synchronized, variable_redefinition_error,
9144         check_class_interface_creation, create_interface, create_class,
9145         method_header, finish_method_declaration,
9146         check_modifiers_consistency, method_declarator,
9147         complete_class_report_errors, check_abstract_method_definitions,
9148         java_check_regular_methods, check_throws_clauses,
9149         java_check_abstract_methods, read_import_dir,
9150         check_pkg_class_access, declare_local_variables, fix_constructors,
9151         cut_identifier_in_qualified, resolve_expression_name,
9152         resolve_qualified_expression_name, patch_method_invocation,
9153         java_complete_lhs, patch_assignment, try_builtin_assignconv,
9154         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9155         patch_exit_expr, patch_exit_expr, patch_switch_statement,
9156         patch_try_statement, patch_synchronized_statement,
9157         patch_throw_statement, check_thrown_exceptions,
9158         patch_conditional_expr): Likewise.
9159
9160 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9161
9162         * Makefile.in (LIBDEPS): Added gcc's errors.o
9163         (../jcf-dump$(exeext):): Link with gcc's errors.o
9164         (../gcjh$(exeext):): Likewise.
9165         * expr.c (expand_java_NEW): Layout the entire target type instead of
9166         laying out its methods only.
9167         (lookup_field): Layout the class after having loaded it.
9168         * java-tree.h (java_debug_context): Declared.
9169         * jcf-io.c (toplev.h): Included.
9170         (find_class): Removed assignment to jcf's outofsynch
9171         field. Force source file to be read if newer than its matching
9172         class file. Tweaked debug messages.
9173         * jcf-parse.c (jcf_out_of_synch): Deleted.
9174         (read_class): Call to jcf_out_of_synch removed.
9175         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9176         (jcf_out_of_synch): Prototype deleted.
9177         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9178         `deprecated' and `class_err': integer turned into bit-fields.
9179         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9180         * parse.y (package_list): New global.
9181         (package_declaration:): Record newly parsed package name.
9182         (extra_ctxp_pushed_p): Static global deleted.
9183         (java_parser_context_save_global): Create buffer context for the
9184         purpose of saving globals, if necessary.
9185         (java_parser_context_restore_global): Pop context pushed for the
9186         purpose of saving globals, if necessary.
9187         (java_debug_context_do): New prototype and function.
9188         (java_debug_context): Likewise.
9189         (do_resolve_class): Use already parsed package names to qualify
9190         and lookup class candidate.
9191         (java_pre_expand_clinit): Removed unnecessary local variable.
9192
9193 1999-12-17  Tom Tromey  <tromey@cygnus.com>
9194
9195         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
9196         fixes PR gcj/119.
9197         (process_file): Use `\n\' at end of each line in string.
9198
9199 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9200
9201         * expr.c (expand_invoke): Layout the loaded class before
9202         attempting to use it.
9203         (expand_java_field_op): Allow final field assignments to take
9204         place in $finit$.
9205         * typeck.c (convert): Return error_mark_node if expr is null.
9206
9207 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9208
9209         * class.c (class_depth): Return -1 if the class doesn't load
9210         properly.
9211         * expr.c (can_widen_reference_to): Check for errors during depth
9212         computation and return 0 accordingly.
9213         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9214         create default constructors and add an other error check.
9215         * parse.h (java_fix_constructors): Prototyped.
9216         * parse.y (java_pre_expand_clinit): Likewise.
9217         (build_super_invocation): Re-prototyped to feature one argument.
9218         (java_check_circular_reference): Directly use `current'.
9219         (java_fix_constructors): New function.
9220         (java_check_regular_methods): Don't create default constructors
9221         here, but abort if none were found.
9222         (java_complete_expand_methods): Pre-process <clinit> calling
9223         java_pre_expand_clinit.
9224         (java_pre_expand_clinit): New function.
9225         (fix_constructors): build_super_invocation invoked with the
9226         current method declaration as an argument.
9227         (build_super_invocation): Use the context of the processed method
9228         decl argument instead of current_class.
9229         * typeck.c (lookup_java_method): Take WFLs in method names into
9230         account.
9231
9232 1999-12-14  Per Bothner  <per@bothner.com>
9233
9234         * class.c (make_class_data): flag_keep_inline_functions to keep
9235         private methods in the method array.
9236
9237 1999-12-15  Anthony Green  <green@cygnus.com>
9238
9239         * check-init.c (check_init): Take into account both types of
9240         `throw's when checking for uninitialized variables.
9241
9242 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9243
9244         * parse.y (java_complete_lhs): Force conversion of array
9245         dimensions to int_type_node, that's what runtime's ABI expects.
9246
9247 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9248
9249         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9250         operand of a WFL, until the Java front-end gets fixed with regard
9251         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9252
9253 1999-12-10  Andrew Haley  <aph@cygnus.com>
9254
9255         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9256         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9257         expr.c (build_java_athrow): Add support for sjlj-exceptions.
9258         java-tree.h: Ditto.
9259         jcf-write.c: Ditto.
9260
9261 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9262
9263         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9264         before calling expand_eh_region_start and expand_start_all_catch.
9265         * except.c (expand_start_java_handler): Switch to permanent
9266         obstack before calling expand_eh_region_start.
9267         (expand_end_java_handler): Switch to permanent obstack before
9268         calling expand_start_all_catch.
9269
9270 1999-12-5  Anthony Green  <green@cygnus.com>
9271
9272         * decl.c (init_decl_processing): Mark throw_node as a noreturn
9273         function with side effects.
9274         (init_decl_processing): Mark all memory allocating DECLs with
9275         DECL_IS_MALLOC.
9276
9277 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9278
9279         * except.c (expand_end_java_handler): Call
9280         expand_resume_after_catch and end_catch_handler.
9281
9282 1999-11-30  Anthony Green  <green@cygnus.com>
9283
9284         * verify.c (verify_jvm_instructions): Create new return label
9285         chain if non existent (don't rely on the verified state of the jsr
9286         target.)
9287
9288 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9289
9290         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9291         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9292
9293         * parse.y (patch_assignment): Removed bogus final class test on
9294         lhs when checking on whether to emit an ArrayStoreException runtime
9295         check.
9296         * expr.c (expand_java_arraystore): Likewise.
9297
9298 1999-11-28 Anthony Green <green@cygnus.com>
9299
9300         * decl.c (find_local_variable): Reuse single slot decls when
9301           appropriate.
9302
9303 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9304
9305         * jcf-parse.c (saw_java_source): Global variable removed.
9306         (read_class): Don't use `saw_java_source'. Added extra braces.
9307         (yyparse): Code setting `saw_java_source' removed.
9308
9309 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
9310
9311         * except.c (emit_handlers): Zero catch_clauses after emitting them.
9312
9313 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9314
9315         * verify.c (merge_type_state): Non verified subroutines being
9316         considered more than once to trigger passive type merge.
9317
9318 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9319
9320         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9321         in case of error. Error message tuned.
9322
9323 1999-11-21  Anthony Green  <green@cygnus.com>
9324
9325         * constants.c (find_methodref_index): Unwrap method names before
9326         inserting them in the constant pool.
9327
9328         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9329
9330         * class.c (assume_compiled_node): New typedef.
9331         (assume_compiled_tree): New static data.
9332         (find_assume_compiled_node): New function.
9333         (add_assume_compiled): New function.
9334         (assume_compiled): New function.
9335         * class.c (make_class_data): Use assume_compiled.
9336         (is_compiled_class): Use assume_compiled.
9337
9338         * java-tree.h (add_assume_compiled): Declare.
9339
9340         * lang.c (lang_decode_option): Parse new options.
9341
9342 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9343
9344         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9345         int_type_node: that's what `_Jv_AllocObject' expects.
9346
9347 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9348
9349         * parse.y (lookup_method_invoke): Use lang_printable_name to
9350         reliably build the type name during error report. Fixes PR gcj/97.
9351
9352 1999-11-09  Tom Tromey  <tromey@cygnus.com>
9353
9354         * jcf-path.c: Include <sys/stat.h>.
9355         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
9356         (DIR_UP): New macro.
9357
9358 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9359
9360         * parse.y (source_end_java_method): Resume permanent allocation,
9361         reversing Apr 27 1998 patch.
9362         (patch_string_cst): Pop obstacks after having pushed the permanent
9363         ones.
9364
9365 1999-11-05  Tom Tromey  <tromey@cygnus.com>
9366
9367         * class.c (finish_class): Emit inlined methods if any native
9368         methods exist in the class.  Fixes PR gcj/85.
9369
9370 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9371
9372         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
9373         (qualify_ambiguous_name): Likewise.
9374
9375 1999-11-03  Godmar Back <gback@cs.utah.edu>
9376
9377         * typeck.c: (lookup_java_method):  search all inherited
9378         interfaces when looking up interface method.
9379
9380 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9381
9382         * parse.y (method_header:): Issue error message for rule `type
9383         error'.
9384         (synchronized:): Error report when not using synchronized.
9385
9386 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9387
9388         * parse.y (resolve_qualified_expression_name): Prevent `this' from
9389         being used before the superclass constructor has been called.
9390         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
9391         instead of `CALL_THIS_CONSTRUCTOR_P'.
9392
9393 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
9394
9395         * check-init.c: Fix typo in comment.
9396
9397 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9398
9399         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
9400         and final method.
9401
9402 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9403
9404         * parse.y (expression_statement:): Call function to report
9405         improper invocation of a constructor.
9406         (parse_ctor_invocation_error): New function.
9407
9408 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
9409
9410         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
9411         remember_end_note.
9412
9413 1999-10-21  Tom Tromey  <tromey@cygnus.com>
9414
9415         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
9416         in generated `main'.
9417
9418 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9419
9420         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
9421         (qualify_ambiguous_name): Likewise.
9422
9423 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9424
9425         * parse.y (java_complete_tree): fold_constant_for_init to work on
9426         permanent_obstack.
9427         (java_complete_lhs): Likewise.
9428         (array_constructor_check_entry): Complete an initializer element
9429         on permanent_obstack.
9430
9431 1999-10-19  Tom Tromey  <tromey@cygnus.com>
9432
9433         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
9434         From Mike Moreton <mike@pillim.demon.co.uk>.
9435
9436 1999-10-15  Greg McGary  <gkm@gnu.org>
9437
9438         * java-tree.h (flag_bounds_check): Remove extern decl.
9439         * lang.c (flag_bounds_check): Remove global variable.
9440         (lang_f_options): Remove "bounds-check" entry.
9441         (lang_init_options): Default flag_bounds_check to "on".
9442
9443 1999-10-14  Tom Tromey  <tromey@cygnus.com>
9444
9445         * jvgenmain.c (usage): New function.
9446         (main): Use it.  Also, handle `-D' options.
9447         * jvspec.c (lang_specific_driver): Recognize -D.
9448         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
9449
9450         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
9451
9452 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9453
9454         * jcf-dump.c (print_constant, disassemble_method): Don't call a
9455         variadic function with a non-literal format string.
9456
9457         * parse-scan.y (report_main_declaration): Likewise.
9458
9459         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
9460
9461         * parse.y (read_import_dir, patch_assignment, patch_binop,
9462         patch_array_ref): Likewise.
9463
9464         * typeck.c (build_java_array_type): Likewise.
9465
9466         * verify.c (verify_jvm_instructions): Likewise.
9467
9468 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9469
9470         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
9471
9472 1999-10-07  Anthony Green  <green@cygnus.com>
9473
9474         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
9475         where CHECK_PUT may fail for valid reasons.
9476
9477         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
9478         UNSAFE_PUTN): New macros.
9479
9480 1999-10-04  Tom Tromey  <tromey@cygnus.com>
9481
9482         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
9483         well.  Fixes Java PR gcj/59.
9484         * parse-scan.y (yyerror): Report errors.
9485
9486 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
9487
9488         * decl.c (insert_block): Remove unconditional `abort'.
9489
9490 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
9491
9492         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
9493         FUNCTION_CODE now of type int.  All callers changed.
9494         Set the builtin's DECL_BUILT_IN_CLASS.
9495
9496 1999-09-23  Tom Tromey  <tromey@cygnus.com>
9497
9498         * jvspec.c (lang_specific_driver): Don't read spec file if
9499         -fsyntax-only given.
9500
9501 1999-09-22  Tom Tromey  <tromey@cygnus.com>
9502
9503         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
9504
9505         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
9506         (WORDS_TO_LONG): Likewise.
9507         (WORDS_TO_DOUBLE): Likewise.
9508
9509 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9510
9511         * jcf-write.c (RELOCATION_VALUE_0): New macro.
9512         (RELOCATION_VALUE_1): Likewise.
9513         (emit_iinc, emit_reloc, push_constant1, push_constant2,
9514         push_in_const, push_long_const): Prototyped.
9515         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
9516         (push_constant2): Likewise.
9517         (push_int_const): Cast find_constant1's integer arguments to `jword'.
9518         (find_constant_wide): Cast find_constant2's integer arguments to
9519         `jword'.
9520         (find_constant_index): Cast find_constant2's and find_constant2's
9521         integer arguments to `jword'.
9522         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
9523         (emit_switch_reloc): Use RELOCATION_VALUE_0.
9524         (emit_if): Use RELOCATION_VALUE_1.
9525         (emit_goto): Likewise.
9526         (emit_jsr): Likewise.
9527         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
9528         argument to push_long_const to HOST_WIDE_INT.
9529
9530 1999-09-15  Andreas Schwab  <schwab@suse.de>
9531
9532         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
9533
9534 1999-09-20  Nick Clifton  <nickc@cygnus.com>
9535
9536         * lang.c (lang_decode_option): Extend comment.
9537
9538 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9539
9540         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
9541         instead of fndecl.
9542
9543 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9544
9545         * gjavah.c (get_field_name, print_method_info, print_include,
9546         add_namelet): Use xmalloc, not malloc.
9547
9548         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
9549         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
9550         NULL pointer.
9551
9552         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
9553
9554         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
9555
9556         * jcf-path.c (add_entry): Likewise.
9557
9558         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
9559
9560         * jv-scan.c (xmalloc): Remove definition.
9561
9562         * jvgenmain.c (xmalloc): Likewise.
9563
9564         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
9565
9566         * lex.c (java_store_unicode): Use xrealloc, not realloc.
9567
9568         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
9569         concat, not xmalloc/sprintf.
9570         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
9571         (xstrdup): Remove definition.
9572
9573         * parse.y (duplicate_declaration_error_p,
9574         constructor_circularity_msg, verify_constructor_circularity,
9575         check_abstract_method_definitions, java_check_regular_methods,
9576         java_check_abstract_methods, patch_method_invocation,
9577         check_for_static_method_reference, patch_assignment, patch_binop,
9578         patch_cast, array_constructor_check_entry, patch_return,
9579         patch_conditional_expr): Use xstrdup, not strdup.
9580
9581         * zextract.c (ALLOC): Use xmalloc, not malloc.
9582
9583 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9584
9585         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
9586
9587         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
9588         (do_spec, lang_specific_pre_link, lang_specific_driver,
9589         input_filename, input_filename_length): Don't declare.
9590         (main_class_name, jvgenmain_spec, lang_specific_driver):
9591         Constify a char*.
9592         (lang_specific_driver): All calls to the function pointer
9593         parameter now explicitly call `fatal'.
9594
9595 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9596
9597         * parse.y (find_applicable_accessible_methods_list): Search
9598         abstract classes as interfaces.
9599
9600 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9601
9602         * class.c (finish_class): We're now outside a valid method
9603         declaration. Tell the rest of gcc so.
9604
9605 1999-09-08  Bruce Korb  autogen@linuxbox.com
9606
9607         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
9608
9609 1999-09-07  Tom Tromey  <tromey@cygnus.com>
9610
9611         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
9612         java-array.h.
9613         (decode_signature_piece): Don't emit "::" in JArray<>.
9614         (print_namelet): Only print trailing `;' when printing a class.
9615
9616 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
9617
9618         * java-tree.h: Delete declarations for all tree nodes now moved to
9619         global_trees.
9620         * decl.c: Delete their definitions.
9621
9622 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
9623
9624         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
9625         * Makefile.in (OBJS): Add ggc-callbacks.o.
9626         (OBJDEPS): Likewise.
9627
9628 1999-09-03  Tom Tromey  <tromey@cygnus.com>
9629
9630         * parse.y (strip_out_static_field_access_decl): Return operand if
9631         it satisfies JDECL_P.
9632
9633 1999-09-02  Tom Tromey  <tromey@cygnus.com>
9634
9635         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
9636         Handle nested arrays, like `[[I'.
9637
9638 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9639
9640         * class.c (finish_class): Remove unused parameter, all callers
9641         changed.
9642
9643         * expr.c (build_java_athrow): Change return type to void.
9644         (java_lang_expand_expr): Make sure each case in switch returns a
9645         value.
9646
9647         * java-tree.h (finish_class): Fix prototype to take void args.
9648
9649         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
9650         (main): Issue return from main, not exit.
9651
9652         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
9653
9654         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
9655
9656         * jv-scan.c (main): Issue return from main, not exit.
9657
9658         * parse.y (check_abstract_method_definitions,
9659         java_check_abstract_method_definitions): Add static prototypes.
9660         (java_complete_expand_methods): Fix call to `finish_class'.
9661
9662         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
9663         and `prevpc'.
9664
9665 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9666
9667         * lang.c (language_string): Constify.
9668
9669 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9670
9671         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
9672         Remove hacks for stuff which comes from libiberty.
9673
9674         * Make-lang.in: Likewise.
9675
9676 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
9677
9678         * Makefile.in (xref.o): Depend on xref.c explicitly.
9679
9680 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9681
9682         * java-tree.h (lang_printable_name): Constify a char*.
9683
9684         * lang.c (lang_printable_name): Likewise.
9685
9686 1999-08-27  Jeffrey A Law  (law@cygnus.com)
9687
9688         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
9689         comments in C code.
9690
9691 1999-08-26  Tom Tromey  <tromey@cygnus.com>
9692
9693         * gjavah.c (print_cxx_classname): Print "::" before qualified
9694         name.
9695
9696 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9697
9698         * parse.y (lookup_cl): Changed leading comment. Now does its best
9699         to set the column number.
9700         (qualify_ambiguous_name): Take WFL wrappers into account.
9701
9702 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
9703
9704         * verify.c (verify_jvm_instructions): Don't check instruction
9705         validity beyond end of method.
9706
9707 1999-08-25  Tom Tromey  <tromey@cygnus.com>
9708
9709         * jvspec.c (lang_specific_driver): Correctly handle --help again.
9710
9711 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9712
9713         * gjavah.c (print_name, print_base_classname, utf8_cmp,
9714         cxx_keyword_subst, generate_access, name_is_method_p,
9715         get_field_name, print_field_name, super_class_name, print_include,
9716         decode_signature_piece, print_class_decls, usage, help,
9717         java_no_argument, version, add_namelet, print_namelet): Add static
9718         prototype.
9719         (print_base_classname, utf8_cmp, cxx_keyword_subst,
9720         name_is_method_p): Constify a char*.
9721         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
9722         Provide a final else clause in an if-else-if.
9723         (print_field_info): Add missing final arg in function call to
9724         `print_field_name'.
9725         (print_method_info, decompile_method, decode_signature_piece,
9726         print_c_decl, print_full_cxx_name, print_stub,
9727         print_mangled_classname, super_class_name, print_include,
9728         add_namelet, add_class_decl, print_class_decls, process_file,
9729         help): Constify a char*.
9730
9731         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
9732         push_int_const, find_constant_wide, find_constant_index,
9733         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
9734         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
9735         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
9736         emit_if, emit_goto, emit_jsr, call_cleanups,
9737         make_class_file_name): Add static prototypes.
9738         (generate_bytecode_return, generate_bytecode_insns): Pass a
9739         NULL_PTR, not a NULL_TREE.
9740
9741         * jv-scan.c: Include "jcf.h".
9742         (main): Declare using DEFUN macro.
9743
9744         * jvspec.c (find_spec_file, lang_specific_pre_link,
9745         lang_specific_driver): Add prototypes.
9746         (find_spec_file): Constify a char*.
9747
9748         * keyword.gperf (hash, java_keyword): Add prototypes.
9749
9750         * lang.c (lang_print_error): Add static prototype.
9751         (lang_init): Prefer memcpy over bcopy to avoid casts.
9752
9753         * lex.c (yylex): Add static prototype.
9754
9755         * parse-scan.y: Include "lex.c" earlier.
9756
9757         * parse.h: Remove redundant declaration for `yylex'.
9758
9759         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
9760         labeled_block_contains_loop_p): Add static prototypes.
9761         (not_accessible_p): Make static to match prototype.
9762
9763         * verify.c (start_pc_cmp): Don't needlessly cast away const.
9764
9765 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9766
9767         * parse.y (check_method_redefinition): Changed leading comment.
9768         (check_abstract_method_definitions): New function.
9769         (java_check_abstract_method_definitions): New function.
9770         (java_check_regular_methods): Call it.
9771         (verify_constructor_super): Fixed indentation.
9772         (lookup_method_invoke): Likewise.
9773
9774 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9775
9776         * parse.y (method_header): Return a null pointer if the current
9777         class node is null.
9778         (finish_method_declaration): Return if the current function decl
9779         is null.
9780         (source_start_java_method): Likewise.
9781         (java_method_add_stmt): Likewise.
9782
9783 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9784
9785         * class.c (emit_register_class): Removed unnecessary call to
9786         start_sequence.
9787         * parse.y (labeled_block_contains_loop_p): Removed unused local
9788         variable.
9789
9790 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9791
9792         * parse.y (java_refold): Added prototype.
9793
9794 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9795
9796         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
9797         (java_stabilize_reference): Removed unnecessary `else'.
9798         (java_complete_lhs): Set flag to remember boolean. Call
9799         java_refold. Added comments.
9800         (java_decl_equiv): New function.
9801         (binop_compound_p): Likewise.
9802         (java_refold): Likewise.
9803         (patch_unaryop): Striped static field access assigned to decl and
9804         op. Changed promotion scheme for ++/-- operators.
9805         (search_loop): New function.
9806         (labeled_block_contains_loop_p): Likewise.
9807         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
9808         comment.
9809         (patch_bc_statement): Call search_loop. Fixed comment.
9810
9811 1999-08-14  Anthony Green  <green@cygnus.com>
9812
9813         * expr.c (java_lang_expand_expr): Mark static array data as
9814         referenced.
9815
9816 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9817
9818         * jvgenmain.c (main): NUL-terminate name_obstack.
9819
9820 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9821
9822         * check-init.c (check_bool2_init, done_alternative): Add static
9823         prototypes.
9824
9825         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
9826         (add_method, build_utf8_ref, build_class_ref,
9827         append_gpp_mangled_type, layout_class_method): Constify a char*.
9828
9829         * decl.c (push_promoted_type, make_binding_level): Add static
9830         prototypes.
9831         (push_promoted_type, pushdecl): Constify a char*.
9832
9833         * except.c (find_handler_in_range, link_handler,
9834         check_start_handlers): Add static prototypes.
9835
9836         * expr.c (process_jvm_instruction): Constify a char*.
9837
9838         * gjavah.c (main): Constify a char*.
9839
9840         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
9841         Constify a char*.
9842
9843         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
9844         static prototypes.
9845         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
9846         munge, print_ents): Constify a char*.
9847
9848         * jcf-dump.c (disassemble_method): Constify a char*.
9849         (print_constant_pool, print_exception_table): Add static prototypes.
9850         (print_constant, print_exception_table, main, disassemble_method):
9851         Constify a char*.
9852
9853         * jcf-io.c (find_classfile, find_class): Likewise.
9854
9855         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
9856         (set_source_filename, predefined_filename_p): Add static prototypes.
9857         (set_source_filename, get_constant, get_class_constant,
9858         find_in_current_zip): Constify a char*.
9859
9860         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
9861         static prototypes.
9862         (add_entry, add_path, jcf_path_classpath_arg,
9863         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
9864
9865         * jcf-reader.c (get_attribute, jcf_parse_preamble,
9866         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
9867         jcf_parse_one_method, jcf_parse_methods,
9868         jcf_parse_final_attributes): Add static prototypes.
9869         (get_attribute): Constify a char*.
9870
9871         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
9872         jcf_dependency_add_target, jcf_path_classpath_arg,
9873         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
9874
9875         * jv-scan.c (main): Constify a char*.
9876         (gcc_obstack_init): Add prototype arguments.
9877
9878         * jvgenmain.c (gcc_obstack_init): Likewise.
9879         (main): Constify a char*.
9880
9881         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
9882         static prototypes.
9883         (put_decl_string, lang_print_error): Constify a char*.
9884         (lang_init): Remove redundant extern prototype.
9885
9886         * mangle.c (emit_unicode_mangled_name): Constify a char*.
9887
9888         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
9889         Add static prototypes.
9890         (get_type_from_signature): Constify a char*.
9891
9892         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
9893         Add static prototypes.
9894         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
9895         (verify_jvm_instructions): Constify a char*.
9896
9897         * xref.c (xref_flag_value): Likewise.
9898
9899         * xref.h (xref_flag_value): Likewise.
9900
9901         * zextract.c (makeword, makelong): Add static prototypes.
9902         (makeword, makelong): Constify a uch*.
9903
9904 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9905
9906         * lang.c (java_dummy_print): Constify a char*.
9907         (lang_print_error): Likewise.
9908         (lang_init): Remove redundant prototype for `print_error_function'.
9909         (lang_init_source): Likewise.
9910         (lang_identify): Constify a char*.
9911
9912 1999-08-09  Tom Tromey  <tromey@cygnus.com>
9913
9914         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
9915         (WORDS_TO_LONG): Likewise.
9916         (WORDS_TO_DOUBLE): Likewise.
9917
9918 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9919
9920         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
9921
9922         * expr.c (java_stack_pop, java_array_data_offset,
9923         build_java_throw_out_of_bounds_exception, case_identity,
9924         build_java_check_indexed_type): Add static prototypes.
9925         (linenumber_table, expand_invoke, expand_java_field_op,
9926         build_primtype_type_ref, expand_byte_code): Constify a char*.
9927
9928         * java-tree.h (build_primtype_type_ref, linenumber_table):
9929         Constify a char*.
9930         (java_lang_expand_expr): Add prototype.
9931
9932         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
9933         `java_lang_expand_expr'.
9934
9935         * lex.c (java_lex_error): Constify a char*.
9936         (java_get_unicode, java_read_char, java_allocate_new_line,
9937         java_unget_unicode, java_sneak_unicode): Prototype.
9938
9939         * parse-scan.y (current_class, package_name, method_declarator,
9940         report_class_declaration, yyerror): Constify a char*.
9941
9942         * parse.h (java_report_errors): Prototype.
9943         (yyerror): Constify a char*.
9944
9945         * parse.y (classitf_redefinition_error, check_modifiers,
9946         parse_jdk1_1_error, lookup_package_type,
9947         lookup_package_type_and_set_next, get_printable_method_name,
9948         purify_type_name): Constify a char*.
9949         (build_super_invocation, maybe_generate_finit,
9950         verify_constructor_super, parser_add_interface,
9951         add_superinterfaces, jdep_resolve_class, note_possible_classname,
9952         java_complete_expand_methods, java_expand_finals,
9953         cut_identifier_in_qualified, java_stabilize_reference,
9954         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
9955         merge_string_cste): Prototype.
9956         (single_type_import_declaration, yyerror,
9957         variable_redefinition_error, build_array_from_name,
9958         build_unresolved_array_type, check_class_interface_creation,
9959         resolve_class, complete_class_report_errors,
9960         note_possible_classname, read_import_dir,
9961         find_in_imports_on_demand, resolve_package, fix_constructors,
9962         check_deprecation, lookup_method_invoke,
9963         maybe_build_primttype_type_ref, array_constructor_check_entry):
9964         Constify a char*.
9965         (java_complete_expand_methods, java_expand_finals): Make static.
9966         (convert_narrow): Remove static prototype.
9967
9968 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
9969
9970         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
9971
9972 1999-08-02  Richard Henderson  <rth@cygnus.com>
9973
9974         * decl.c: Include defaults.h instead of expr.h.
9975         * parse.y: Likewise.
9976
9977 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
9978
9979         * java/decl.c (start_java_method): Change all uses of
9980         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
9981         Ensure expr.h is included.
9982         * java/expr.c (pop_arguments): Ditto.
9983         * java/parse.y (expand_start_java_method): Ditto.
9984
9985 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9986
9987         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9988
9989 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
9990
9991         * decl.c: Include "function.h".
9992         * except.c: Likewise.
9993         * parse.y: Likewise.
9994         * Makefile.in: Update dependencies.
9995
9996 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9997
9998         * expr.c (build_java_soft_divmod): Provide a default case in switch.
9999         (java_lang_expand_expr): Mark parameters `target', `tmode' and
10000         `modifier' with ATTRIBUTE_UNUSED.
10001
10002         * gjavah.c (process_file): Add braces around ambiguous `else'.
10003
10004         * jcf-dump.c (print_access_flags, localvar_free): Change return
10005         type to void.
10006
10007         * parse.y (java_complete_expand_method): Initialize variable
10008         `exception_copy'.
10009         (resolve_qualified_expression_name): Likewise for `field_decl'.
10010         (patch_method_invocation): Likewise for `class_to_search'.
10011         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10012         (patch_assignment): Likewise for `lhs_type'.
10013
10014         * verify.c (verify_jvm_instructions): Remove unused variable
10015         `caller'.
10016
10017 1999-07-25  Richard Henderson  <rth@cygnus.com>
10018
10019         * decl.c (va_list_type_node): New.
10020
10021 1999-07-25  Anthony Green  <green@cygnus.com>
10022
10023         * gjavah.c (print_stub): New function.
10024         (METHOD_IS_NATIVE): New macro.
10025         (print_mangled_classname): Make static.
10026         (HANDLE_END_FIELD): Don't emit fields during stub generation.
10027         (process_file): Perform stub generation.
10028         (HANDLE_METHOD): Don't emit class decls during stub
10029         generation.
10030         (HANDLE_END_METHOD): Take into account stub generation.
10031         (print_method_info): Handle stub generation.
10032         (print_stub): New function.
10033         (print_cxx_classname): Make signature consistant with others.
10034         (help): Describe -stubs option.
10035         (main): Create stub file.
10036         (version): Use version.c.
10037         (print_full_cxx_name): New function.
10038         (print_c_decl): Use print_full_cxx_name.
10039
10040 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10041
10042         * check-init.c (check_init): Handle MAX_EXPR.
10043
10044 1999-07-15  Andrew Haley  <aph@cygnus.com>
10045
10046         * lang.c (flag_use_divide_subroutine): New variable.
10047         * typeck.c: (convert_ieee_real_to_integer): Bounds check
10048         fp-to-integer conversion.
10049         (convert): Call convert_ieee_real_to_integer when flag_fast_math
10050         is not set.
10051
10052         * expr.c (build_java_soft_divmod): New function.
10053         (build_java_binop): Call build_java_soft_divmod if
10054         flag_use_divide_subroutine is set.
10055         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10056         soft_lrem_node: new builtin functions.
10057         (init_decl_processing) Initialize the new builtins.
10058         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10059         soft_lrem_node: new builtin functions.
10060         (build_java_soft_divmod): New function.
10061         * parse.y: Call build_java_soft_divmod if
10062         flag_use_divide_subroutine is set.
10063         * parse.c: Rebuilt.
10064
10065         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10066         a --specs= arg) even if not linking.
10067         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10068         -fuse-divide-subroutine
10069
10070 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10071
10072         * parse.y (resolve_and_layout): Check methods only once.
10073         (resolve_qualified_expression_name): Verify thrown exceptions
10074         compatibility.
10075         (check_thrown_exceptions): Reject exceptions thrown in
10076         initializer. Error message tuned.
10077
10078 1999-07-14  Andrew Haley  <aph@cygnus.com>
10079
10080         * expr.c (expand_expr): Do not return the last statement in a
10081         block as the block's value.
10082
10083 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10084
10085         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10086         CALL_EXPR, to avoid order of evaluation changes.
10087
10088 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10089
10090         * parse.y (qualify_ambiguous_name): Do not use
10091         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10092
10093 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10094
10095         * check-init.c (check_init): Handle MAX_EXPR.
10096         * expr.c (force_evaluation_order): Force method call arguments to
10097         be evaluated in left-to-right order.
10098         * parse.y (qualify_ambiguous_name): Loop again to qualify
10099         NEW_ARRAY_EXPR properly.
10100
10101 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10102
10103         * parse.y (patch_invoke): Resolve unresolved invoked method
10104         returned type.
10105         (qualify_ambiguous_name): STRING_CST to qualify expression for
10106         type name resolution.
10107
10108 1999-06-24  Andrew Haley  <aph@cygnus.com>
10109
10110         * class.c (finish_class): Whenever a deferred method is
10111         output, rescan the list of methods to see if a new candidate for
10112         output can be found.
10113
10114 1999-06-28  Tom Tromey  <tromey@cygnus.com>
10115
10116         * jvspec.c (lang_specific_driver): Recognize --help.
10117
10118 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10119
10120         * parse.y (resolve_package): Fixed bogus return statement.
10121         (patch_method_invocation): Resolve method invocation beginning with
10122         a package name qualifier.
10123
10124 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10125
10126         * Make-lang.in (java.stage1): Depend on stage1-start.
10127         (java.stage2): Likewise for stage2-start.
10128         (java.stage3): Likewise for stage3-start.
10129         (java.stage4): Likewise for stage4-start.
10130
10131 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10132
10133         * parse.y (java_complete_lhs): When doing cross referencing, don't
10134         try to keep file location on a WFL expanded as a CALL_EXPR.
10135
10136 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10137
10138         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10139         compiling to class file a void method with an empty method body.
10140         As a side effect, the bytecode backend will generate the
10141         appropriate `return' instruction.
10142
10143 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10144
10145         * parse.y (lookup_package_type_and_set_next): New function prototype.
10146         (resolve_package): Search current and imported packages.
10147         (lookup_package_type_and_set_next): New function.
10148
10149 1999-06-22  Andrew Haley  <aph@cygnus.com>
10150
10151         * verify.c (verify_jvm_instructions): Check for pending blocks
10152         before invalid PC test and opcode switch, not after.
10153
10154 1999-06-21  Andrew Haley  <aph@cygnus.com>
10155
10156         * except.c (find_handler_in_range): The upper limit for exception
10157         ranges is exclusive, not inclusive: (start <= pc < end).
10158         (link_handler): find child pointer which points to outer by
10159         searching sibling list: previous code incorrectly assumed that
10160         outer->outer->first_child must point to outer.
10161         * verify.c (verify_jvm_instructions): FIXME added to code for
10162         `athrow'.
10163         (verify_jvm_instructions): Do not assume that the last block
10164         processed in a subroutine is a block which ends with a `ret'
10165         instruction.  With some control flows it is possible that the last
10166         block ends with an `athrow'.
10167
10168 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10169
10170         * parse.y (qualify_ambiguous_name): Reorganized the post
10171         evaluation of non WFL leading expression nodes.
10172
10173 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10174
10175         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10176         CONVERT_EXPR.
10177
10178 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10179
10180         * parse.y (qualify_ambiguous_name): Handle qualified expression
10181         beginning with a STRING_CST.
10182
10183 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10184
10185         * parse.y (register_fields): Set DECL_INITIAL on both
10186         pre-initialized static and public fields.
10187         (resolve_field_access): Static field access expressions to always
10188         use pointer types.
10189         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10190         qualification. CONVERT_EXPR to be resolved as an expression name.
10191         (java_complete_lhs): Identify and access qualified final
10192         initialized field in switch statement case expression.
10193         (fold_constant_for_init): Pre-initialized field decl constant to
10194         be folded.
10195
10196 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10197
10198         * parse.y (note_possible_classname): Mark returned node with
10199         QUALIFIED_P only if the original class name contained a '/'.
10200
10201 1999-06-05  Anthony Green  <green@cygnus.com>
10202
10203         * Make-lang.in (gcjh): More parallel build fixes.
10204
10205 1999-06-03  Mike Stump  <mrs@wrs.com>
10206
10207         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10208
10209 1999-06-02  Anthony Green  <green@cygnus.com>
10210
10211         * except.c (link_handler): Chain exception handlers in order.
10212
10213 1999-06-02  Anthony Green  <green@cygnus.com>
10214
10215         * expr.c (expand_byte_code): Fill unreachable bytecode regions
10216         with nops and process as usual in order to always set correct EH
10217         ranges.  Emit detailed warnings about unreachable bytecodes.
10218
10219 1999-06-02  Anthony Green  <green@cygnus.com>
10220
10221         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10222         constant.
10223
10224 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10225
10226         * parse.y (lookup_field_wrapper): Unified returned value to NULL
10227           or the searched field decl.
10228
10229 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10230
10231         * parse.y (fold_constant_for_init): Convert numerical constant
10232         values to the type of the assigned field.
10233
10234 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10235
10236         * expr.c (lookup_field): Relaxed the test on class loading error
10237         detection.
10238         * parse.y (fold_constant_for_init): Enabeled old code.
10239
10240 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10241
10242         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10243         decide the validity of the cast of a java.lang.Cloneable reference
10244         to an array.
10245         (patch_conditional_expr): Fixed first argument passed to
10246         binary_numeric_promotion.
10247
10248 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10249
10250         * parse.y (qualify_ambiguous_name): Take into account that a
10251         CONVERT_EXPR might specify a type as a WFL.
10252
10253 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10254
10255         * parse.y (patch_assignment): Save the rhs before using it as an
10256         argument to _Jv_CheckArrayStore.
10257
10258 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10259
10260         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10261
10262 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10263
10264         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10265         floating point literal only when the exponent indicator has been
10266         parsed.
10267
10268 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10269
10270         * parse.y (formal_parameter:): Construct argument tree list
10271         element even if a yet unsupported final parameter was encountered.
10272
10273 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10274
10275         * parse.y (finish_method_declaration): Issue errors for native or
10276         abstract methods declared with a method body, as well as for non
10277         native or non abstract methods with no method body.
10278
10279 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10280
10281         * class.c (build_utf8_ref): Initialize variable `field'.
10282
10283         * decl.c (init_decl_processing): Initialize variable `field'.
10284
10285         * expr.c (build_known_method_ref): Mark parameters `method_type',
10286         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10287         (process_jvm_instruction): Likewise for parameter `length'.
10288
10289         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10290         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10291         ATTRIBUTE_UNUSED.
10292
10293         * parse.y (maybe_generate_clinit): Remove unused variable
10294         `has_non_primitive_fields'.
10295         (find_in_imports_on_demand): Initialize variables `node_to_use'
10296         and `cl'.
10297         (patch_binop): Likewise for variable `prom_type'.
10298         (patch_unaryop): Likewise for variable `prom_type'.
10299
10300         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10301
10302         * xref.c (xref_table): Add missing initializer.
10303
10304 1999-05-14  Tom Tromey  <tromey@cygnus.com>
10305
10306         * java-except.h (struct eh_range): Removed unused `next' member.
10307         * verify.c (verify_jvm_instructions): Call check_nested_ranges
10308         after adding all exception handlers.  Sort exception ranges in
10309         order of start PC.
10310         (struct pc_index): New structure.
10311         (start_pc_cmp): New function.
10312         * except.c (add_handler): Return `void'.  Don't call link_handler;
10313         instead construct an ordinary linked list and do range
10314         coalescing.
10315         (check_nested_ranges): New function.
10316         (link_handler): Changed interface to allow merging of eh_ranges.
10317         Split overlapping ranges.  Return `void'.
10318
10319 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10320
10321         * parse.y (constructor_block_end:): New rule, tagged <node>.
10322         (constructor_body:): Use `constructor_block_end' instead of
10323         `block_end'.
10324
10325 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10326
10327         * parse.y (statement_nsi:): Pop `for' statement block.
10328         (java_complete_lhs): Labeled blocks containing no statement are
10329         marked as completing normally.
10330
10331 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10332
10333         * xref.c (xref_set_current_fp): New function, defined.
10334         * xref.h (xref_set_current_fp): New function, prototyped.
10335
10336 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10337
10338         * check-init.c (check_init): Take into account that
10339         LABELED_BLOCK_STMT can be empty.
10340
10341 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10342
10343         * parse.y (java_check_regular_methods): Warning check on not
10344         overriding methods with default access in other packages does not
10345         apply to `<clinit>'.
10346         (java_complete_lhs): If block body is an empty_stmt_node, replace
10347         it by NULL_TREE. This prevents gcc from generating an irrelevant
10348         warning.
10349
10350 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10351
10352         * check-init.c (check_init): Removed code accepting to see things
10353         falling through default:, when doing xrefs.
10354         * java-tree.h (do_not_fold): New global variable, declared.
10355         * parse.y (do_not_fold): New global variable, defined.
10356         (java_complete_expand_method): Set `do_not_fold' to the value of
10357         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10358         and reinstall them after them have been purged; do not check for
10359         initializations; do not issue missing return errors.
10360         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10361         when doing xrefs.
10362         (patch_binop): Skip the fold part when doing xrefs.
10363         (build_string_concatenation): Skip the concatenation part when
10364         doing xrefs.
10365         (patch_synchronized_statement): Do not generate a try-finally when
10366         doing xrefs.
10367         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
10368         and keep the location where the throw was seen.
10369         * typeck.c (convert): When `do_not_fold' is set, do not attempt
10370         any treatment on the converted node an simply return a NOP_EXPR of
10371         the targeted type.
10372         * xref.c (xref_get_data): New function, defined.
10373         * xref.h (xref_get_data): New function, declared.
10374         (XREF_GET_DATA): Use xref_get_data.
10375
10376 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10377
10378         * gjavah.c (print_include): Cast the result of `strlen' to int
10379         when comparing against a signed value.
10380         (add_namelet): Likewise.
10381
10382 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10383
10384         * expr.c (expand_invoke): Mark parameter `nargs' with
10385         ATTRIBUTE_UNUSED.
10386         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
10387
10388         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
10389         ATTRIBUTE_UNUSED.
10390
10391         * jcf-reader.c (get_attribute): Cast a value to long
10392         when comparing against a signed expression.  Likewise.
10393
10394         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
10395         HOST_BITS_PER_CHAR.
10396
10397 1999-05-11  Andrew Haley  <aph@cygnus.com>
10398
10399         * parse.y (source_end_java_method): If the current method contains
10400         any exception handlers, force asynchronous_exceptions: this is
10401         necessary because signal handlers in libjava may throw exceptions.
10402         * decl.c (end_java_method): Ditto.
10403
10404 1999-05-11  Tom Tromey  <tromey@cygnus.com>
10405
10406         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
10407         flags.
10408         * jvspec.c (THREAD_NAME): Removed.
10409         (GC_NAME): Likewise.
10410         (MATHLIB): Likewise.
10411         (WITHLIBC): Likewise.
10412         (GCLIB): Likewise.
10413         (THREADLIB): Likewise.
10414         (MATH_LIBRARY): Likewise.
10415         (lang_specific_driver): Don't add `-l' options to command line.
10416         Instead, add a single --specs option.  Recognize `-L' options and
10417         use them to search for spec file.
10418         (find_spec_file): New function.
10419         (SPEC_FILE): New define.
10420
10421 1999-05-11  Dave Brolley  <brolley@cygnus.com>
10422
10423         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
10424         cpplib-enabled build.
10425
10426 1999-05-05  Per Bothner  <bothner@cygnus.com>
10427
10428         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
10429         temporarily zero it while calling rest_of_decl_compilation.
10430
10431         * java-tree.h (string_ptr_type_node):  Add declaration.
10432         * decl.c:  Define and initialize string_ptr_type_node.
10433         * parse.y (patch_string_cst):  Use string_ptr_type_node.
10434
10435         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
10436         * parse.y (for_statement):  Now unconditionally exit_block.
10437         (finish_labeled_statement):  No longer exit_block if for-loop.
10438         (patch_loop_statement):  Check harder if the loop is already labeled.
10439
10440         * parse.y (patch_initialized_static_field):  Removed function.
10441         (maybe_generate_clinit):  Removed special handling for interfaces.
10442         (java_complete_expand_methods):  Do a preliminary java_complete_tree
10443         on <clinit> to determine if it can be removed.
10444         (java_complete_expand_method):  Remove special handling for <clinit>.
10445         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
10446         optimize if we get back empty_stmt_node.
10447         For MODIFY_EXPR, re-do checking of static initializers.
10448         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
10449         For VAR_DECL, pass correct context.
10450
10451         * verify.c (verify_jvm_instructions):  Better error messages.
10452
10453 1999-05-03  Tom Tromey  <tromey@cygnus.com>
10454
10455         * parse-scan.y (interface_declaration): Call
10456         report_class_declaration for interfaces.
10457
10458 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
10459
10460         * Makefile.in: Remove -v from bison command lines.
10461
10462 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10463
10464         * check-init.c (check_init): Exclude a case of error when doing
10465         xrefs.
10466         * class.c (layout_class_method): Don't generate the error message
10467         twice when compiling from source.
10468         * lang-options.h: Added `-Wredundant-modifers' and
10469         `-Wunusupported-jdk11' flags and help text.
10470         * lang.c (lang_decode_option): Added support for
10471         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
10472         flag_static_local_jdk11 and flag_redundant set accordingly.
10473         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
10474         * parse.h (EXPR_WFL_ADD_COL): New macro.
10475         (DECL_END_SOURCE_LINE): Likewise.
10476         (DECL_INHERITED_SOURCE_LINE): Likewise.
10477         * parse.y (static_ref_err): New function, prototyped.
10478         (CCB_TK): Now tagged <operator>.
10479         (class_body:): Remember the location of the closing '}' of a class
10480         definition when doing xrefs.
10481         (block:): Likewise.
10482         (block_end:): Likewise.
10483         (create_class): Remember the location of the inherited class
10484         identifier when doing xrefs.
10485         (register_fields): Added test on first operand of `init' before
10486         testing it TREE_CODE.
10487         (method_header): Store the location of the class identifier in the
10488         class decl when doing xrefs.
10489         (finish_method_declaration): Don't combine first/last method line
10490         when doing xref.
10491         (java_check_regular_methods): Warning check on not overriding
10492         methods with default access on other packages move before check on
10493         static methods. Initialization of `aflags' also moved up.
10494         (resolve_expression_name): Call static_ref_err to report the error.
10495         (static_ref_err): New function, implemented.
10496         (resolve_field_access): Returned simplified static field access
10497         when doing xrefs.
10498         (resolve_qualified_expression_name): Check for illegal use of
10499         static fields in a non static context. Call static_ref_err to
10500         report error in various places.
10501         (java_complete_tree): Do not fold initialized static fields when
10502         doing xrefs.
10503         (java_complete_lhs): Likewise.
10504
10505 1999-04-29  Anthony Green  <green@cygnus.com>
10506
10507         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
10508         create internal labels.
10509         (lookup_label): Ditto.
10510
10511 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10512
10513         * class.c (layout_class_method): Generate <clinit>'s rtl for
10514         interfaces.
10515         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10516         for interfaces' <clinit>.
10517         * expr.c (lookup_field): Search for fields in interfaces.
10518         (expand_invoke): Fixed indentation.
10519         (expand_java_field_op): Likewise. Use IS_CLINIT.
10520         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
10521         (IS_CLINIT): New macro.
10522         * parse.y (type_declaration:): Call maybe_generate_clinit after an
10523         interface was parsed.
10524         (maybe_generate_clinit): Don't generate if the current class is an
10525         interface with only fields of primitive types.
10526         (reset_method_name): Use IS_CLINIT.
10527         (java_complete_expand_method): Expand <clinit> when it exists for
10528         interfaces. Use IS_CLINIT.
10529         (resolve_expression_name): Use DECL_CONTEXT instead of
10530         current_class to build static field references.
10531         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
10532         ARRAY_REF when doing xreferencing.
10533         (check_final_assignment): Fixed typo in leading comment. Use
10534         IS_CLINIT.
10535         (patch_array_ref): Don't fully expand array references when
10536         xreferencing.
10537         (patch_return): Use IS_CLINIT.
10538         (patch_throw_statement): Likewise.
10539
10540 1999-04-22  Tom Tromey  <tromey@cygnus.com>
10541
10542         * Make-lang.in (JAVA_SRCS): Added check-init.c.
10543
10544 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10545
10546         * decl.c (predef_filenames, predef_filenames_size): New globals
10547         (init_decl_processing): predef_filenames and predef_filenames_size
10548         initialized.
10549         * java-tree.h (predef_filenames, predef_filenames_size): Declared
10550         extern.
10551         * jcf-parse.c (predefined_filename_p): New function.
10552         (yyparse): Check that files on the command line are specified only
10553         once and issue a warning otherwise.
10554         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
10555         * parse.y (source_end_java_method): Nullify NOP method bodies, to
10556         avoid a gcc warning with -W -Wall turned on.
10557         (java_expand_classes): Abort if errors were encountered.
10558         (java_complete_lhs): If the cross reference flag is set, wrap
10559         field DECL node around a WFL when resolving expression name.
10560
10561 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10562
10563         * lang.c (lang_decode_option): Fixed returned value when parsing
10564         `-fxref=...' and `-Wall'.
10565         * parse.y (source_end_java_method): Do not generate code when
10566         flag_emit_xref is set.
10567         (resolve_expression_name): Do not build static field access when
10568         flag_emit_xref is set.
10569         (resolve_field_access): No special treatment on `length' when
10570         flag_emit_xref is set. Do not build qualified static field access
10571         when flag_emit_xref is set.
10572         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
10573         when flag_emit_xref is set.
10574         (patch_assignment): Do not generate array store runtime check when
10575         flag_emit_xref is set.
10576         * xref.c (xref_flag_value): Fixed function declaration
10577         indentation.
10578         (xset_set_data): New function.
10579         * xref.h (xref_set_data): Added prototype for new function.
10580         (typedef struct xref_flag_table): New field data.
10581         (XREF_GET_DATA): New macro.
10582
10583 1999-04-19  Tom Tromey  <tromey@cygnus.com>
10584
10585         * xref.h (enum): Removed trailing comma.
10586
10587         * parse.y (resolve_qualified_expression_name): Added missing
10588         `break'.
10589
10590 1999-04-15  Anthony Green  <green@cygnus.com>
10591
10592         * gjavah.c: New prototypes for java_float_finite and
10593         java_double_finite.
10594
10595 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10596
10597         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
10598         references.
10599
10600 1999-04-06  Jeffrey A Law  (law@cygnus.com)
10601
10602         * Makefile.in (TREE_H): Add tree-check.h.
10603         (RTL_H): Add genrtl.h.
10604
10605 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10606
10607         * parse.y (patch_assignment): Added ArrayStoreException runtime
10608         check.
10609
10610 1999-04-06  Per Bothner  <bothner@cygnus.com>
10611
10612         * expr.c (pop_type_0):  New function.
10613         (pop_type):  Use pop_type_0.
10614         * java-tree.h (pop_type_0):  New declaration.
10615         * verify.c (verify_jvm_instructions):  Check return instructions.
10616
10617         * parse.y (patch_binop):  Don't fold if non-constant and emiting
10618         class files.
10619
10620 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10621
10622         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
10623
10624         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
10625         (main_jcf): Don't define.
10626         (process_file): Don't set `main_jcf'.
10627
10628         * java-tree.h (main_jcf): Don't declare.
10629
10630         * jcf-parse.c (main_jcf): Add static definition.
10631
10632         * lang.c (main_jcf): Don't define.
10633
10634 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10635
10636         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
10637
10638         * decl.c (copy_lang_decl): Likewise for `bcopy'.
10639
10640         * jcf-depend.c: Include "config.h", not <config.h>.
10641
10642         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
10643         `bcopy' to PTR.
10644
10645         * jcf-path.c: Include "config.h", not <config.h>.
10646
10647         * lex.c: Don't include various system header files.
10648         (java_init_lex): Cast the argument of `bzero' to PTR
10649
10650         * parse-scan.y (java_push_parser_context): Likewise.
10651
10652         * parse.y (java_push_parser_context): Likewise.
10653         (patch_bc_statement): Match format specifier to variable argument.
10654
10655         * xref.c: Don't include <stdio.h>.
10656
10657 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10658
10659         * parse.y (struct parser_ctxt *ctxp): Now global.
10660         (declare_local_variables): Use WFL compound value for the
10661         declaration source line value, when doing cross-referencing.
10662
10663 1999-03-31  Tom Tromey  <tromey@cygnus.com>
10664
10665         * gjavah.c (print_field_info): Allow constants of other types.
10666         (print_include): Generate include when new name is proper prefix
10667         of already printed name.
10668         (add_namelet): Likewise.
10669         (cxx_keyword_subst): New function.
10670         (print_method_info): Use it.
10671         (print_field_name): New function.
10672         (get_field_name): New function.
10673         (print_field_info): Use get_field_name and print_field_name.
10674
10675 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10676
10677         * Makefile.in (keyword.h): Generate using gperf language 'C', not
10678         'KR-C', so gperf uses the `const' keyword on strings.
10679
10680         * keyword.gperf (java_keyword): Const-ify a char*.
10681
10682 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10683
10684         * parse.y (patch_bc_statement): Fixed identation and a bogus
10685         `printf' format.
10686
10687 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10688
10689         * parse.y (patch_assignment): Allow static variables in other
10690         classes to be assigned.
10691
10692 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10693
10694         * class.c (maybe_add_interface): Remove unused variable
10695         `interface_binfo'.
10696         (make_class_data): Use = for assignment, not ==.  Likewise.
10697         (emit_register_classes): Remove unused variable `decl'.
10698
10699         * lex.c: Fix comment so as not to contain an embedded `/*'.
10700
10701         * verify.c (verify_jvm_instructions): Remove unused variable
10702         `self_type'.
10703
10704 1999-03-27  Per Bothner  <bothner@cygnus.com>
10705
10706         * parse.y (complete_loop_body):  Rename to finish_loop_body.
10707         (complete_labeled_statement):  Rename to finish_labeled_statement.
10708         (complete_for_loop):  Rename to finish_for_loop.
10709         (complete_method_declaration):  Rename to finish_method_declaration.
10710
10711         * java-tree.h (continue_identifier_node):  New global node.
10712         * decl.c:  Define and initialize continue_identifier_node.
10713         * parse.y (generate_labeled_block):  Remove - no longer needed.
10714         (build_loop_body):  Use continue_identifier_node for continue block.
10715         (finish_labeled_statement):  Also do pop_labeled_block actions.
10716         (java_complete_lhs):  POP_LOOP even if error.
10717         (build_labeled_block):  Special handling for continue_identifier_node.
10718         (patch_loop_statement):  Re-organize.
10719         (patch_bc_statement):  Re-write.
10720
10721 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10722
10723         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
10724         using a WFL compound value.
10725         * parse.y (xref.h): Include.
10726         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
10727         WFL compound value.
10728         (register_fields): Set WFL compound value to lineno if doing
10729         xrefs.
10730         (java_complete_expand_method): Call expand_xref if flag_emit_xref
10731         is set.
10732         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
10733         * xref.h (expand_xref): Prototype renamed from xref_generate.
10734
10735 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10736
10737         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
10738         (GET_CURRENT_BLOCK): New macro.
10739         * parse.y (current_static_block): New global variable.
10740         (method_body:): Define action.
10741         (complete_method_declaration): Set current_function_decl to NULL
10742         when work on the current method is done.
10743         (declare_local_variables): Use GET_CURRENT_BLOCK.
10744         (java_method_add_stmt): Likewise.
10745         (java_complete_expand_method): Disable the use of `this' when
10746         expanding <clinit>.
10747         (enter_a_block): If no current method exist, use
10748         current_static_block to link static initializer blocks.
10749         (exit_block): Rewritten to use current_static_block when no current
10750         method decl exists.
10751         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
10752         (patch_return): Forbid the use of `return' in static initializers.
10753         (patch_throw_statement): Fixed indentation. Issue specific error
10754         for uncaught thrown checked exception in static initializer
10755         blocks. Removed FIXME.
10756
10757 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
10758
10759         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
10760         Link gcj from gcc.o.
10761
10762 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10763
10764         * parse.y (find_applicable_accessible_methods_list): When dealing
10765         with interface: ensure that a given interface or java.lang.Object
10766         are searched only once.
10767
10768 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10769
10770         * gjavah.c (print_c_decl): Remove unused argument `flags'.
10771
10772         * jcf-dump.c (print_access_flags): Add braces around if-else.
10773
10774         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
10775         COMBINE_INPUTS.
10776
10777         * lex.c (build_wfl_node): Add static prototype.
10778
10779         * lex.h (build_wfl_node): Remove static prototype.
10780
10781         * parse.y: Include lex.c early enough to declare everything needed.
10782         Ensure calls to `build_wfl_node' pass the proper arguments.
10783         (create_class): Remove unused variable `super_decl'.
10784         (get_printable_method_name): Initialize variable `name'.
10785
10786 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10787
10788         * Changelog: Fixed 1999-03-22 typos.
10789         * lang.c (lang_decode_option): Fixed typo in error string in the
10790         XARG section.
10791
10792 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10793
10794         * Makefile.in (JAVA_OBJS): Added entry xref.o.
10795         (xref.o): New rule.
10796         * java-tree.h (flag_emit_xref): Declared extern.
10797         * lang.c (xref.h): Included.
10798         (flag_emit_xref): New global variable.
10799         (lang_decode_option): Added support for -fxref.
10800         * xref.c: Created.
10801         * xref.h: Likewise.
10802
10803 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
10804
10805         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
10806         linked with.
10807
10808 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10809
10810         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
10811         $(srcdir)/../system.h and $(JAVA_TREE_H).
10812         (jcf-io.o): Depend on $(JAVA_TREE_H).
10813         (mangle.o): Likewise.
10814
10815         * check-init.c (check_cond_init): Add static prototype.
10816
10817         * class.c (build_java_method_type, hashUtf8String,
10818         make_field_value, get_dispatch_vector, get_dispatch_table,
10819         append_gpp_mangled_type, mangle_static_field): Likewise.
10820         (strLengthUtf8): Hide unused definition.
10821         (hashUtf8String): Const-ify.
10822         (make_field_value): Un-ANSI-fy.
10823
10824         * constants.c: Move inclusion of jcf.h above java-tree.h.
10825         (set_constant_entry, find_class_or_string_constant,
10826         find_name_and_type_constant, get_tag_node,
10827         build_constant_data_ref): Add static prototype.
10828
10829         * decl.c (push_jvm_slot, builtin_function,
10830         lookup_name_current_level): Likewise.
10831         (builtin_function): Const-ify.
10832
10833         * except.c (expand_start_java_handler, expand_end_java_handler):
10834         Add static prototype.
10835
10836         * expr.c (flush_quick_stack, push_value, pop_value,
10837         java_stack_swap, java_stack_dup, build_java_athrow,
10838         build_java_jsr, build_java_ret, expand_java_multianewarray,
10839         expand_java_arraystore, expand_java_arrayload,
10840         expand_java_array_length, build_java_monitor, expand_java_pushc,
10841         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
10842         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
10843         expand_compare, expand_test, expand_cond, expand_java_goto,
10844         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
10845         expand_java_field_op, java_push_constant_from_pool): Likewise.
10846
10847         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
10848         (build_java_arraynull_check): Mark parameters `node' and `type'
10849         with ATTRIBUTE_UNUSED.
10850         (note_label): Likewise for parameter `current_pc'.
10851         (expand_java_call, expand_java_ret): Hide unused definition.
10852
10853         * java-tree.h (make_class, build_constants_constructor,
10854         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
10855         init_outgoing_cpool, register_class, emit_register_classes,
10856         java_layout_seen_class_methods): Prototype.
10857         (unicode_mangling_length): Const-ify.
10858         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10859         emit_unicode_mangled_name, format_int, format_uint,
10860         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
10861         jcf_print_utf8_replace, open_class): Prototype.
10862
10863         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
10864         <stdio.h>.  Include tree.h/java-tree.h.
10865         (utf8_equal_string usage, process_class): Add static prototype.
10866         (open_class): Don't prototype this here.
10867         (utf8_equal_string): Match arguments to format specifiers.
10868         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
10869         TABLE_SWITCH, disassemble_method): Likewise.
10870
10871         * jcf-io.c: Include tree.h/java-tree.h.
10872         (open_class, find_classfile, jcf_print_utf8,
10873         jcf_print_utf8_replace): Const-ify.
10874
10875         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
10876         parse_class_file): Add static prototype.
10877         (find_in_current_zip): Match definition to existing static
10878         prototype.
10879
10880         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
10881         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
10882         finish_jcf_block, define_jcf_label, get_jcf_label_here,
10883         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
10884         write_chunks, adjust_typed_op, generate_bytecode_conditional,
10885         generate_bytecode_return, perform_relocations, init_jcf_state,
10886         init_jcf_method, release_jcf_state, generate_classfile):
10887         Add static prototype.
10888         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
10889         (make_class_file_name): Const-ify.
10890
10891         * jcf.h (find_classfile): Const-ify.
10892
10893         * jv-scan.c (reset_report): Remove prototype.
10894
10895         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
10896         (error): Rewrite to allow varargs.
10897
10898         * lang.c (lang_f_options): Const-ify.
10899
10900         * lex.c (java_parse_escape_sequence): Add static prototype.
10901         (java_allocate_new_line): Match definition to existing static
10902         prototype.
10903
10904         * mangle.c Include tree.h/java-tree.h.
10905         (unicode_mangling_length, emit_unicode_mangled_name,
10906         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
10907
10908         * parse.h (jdep_code): Remove trailing comma in enumeration.
10909         (java_get_line_col): Move prototype outside of !JC1_LITE test.
10910         (reset_report): Add prototype.
10911
10912         * verify.c (push_pending_label, merge_types): Add static
10913         prototypes.
10914
10915         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
10916
10917 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10918
10919         * parse.y (find_applicable_accessible_methods_list): Extend the
10920         search to superinterfaces when relevant.
10921         (search_applicable_methods_list): New function.
10922
10923 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10924
10925         * class.c (unmangle_classname): Implemented stricter testing
10926         before setting the QUALIFIED_P flag on an identifier.
10927
10928 1999-03-16  Per Bothner  <bothner@cygnus.com>
10929
10930         * parse.y (java_complete_lhs):  Call force_evaluation_order
10931         after patch_newarray.
10932         (patch_binop):  Don't call fold if there are side effects.
10933
10934 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10935
10936         * parse.y (java_stabilize_reference): Use save_expr instead of
10937         building a SAVE_EXPR node.
10938         (java_complete_lhs): Patch the resulting string of the `+='
10939         operator (if necessary) and complete the RHS after having built
10940         the cast.
10941
10942 1999-03-15  Per Bothner  <bothner@cygnus.com>
10943
10944         * class.c (make_class):  Don't set CLASS_P here (because
10945         this function is also called by build_java_array_type).
10946         (push_class):  Set CLASS_P here instead.
10947         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
10948
10949         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
10950         context.  If the context is class, perfer "super" over "synchronized".
10951         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
10952
10953         * parse.y (create_class):  Don't call parser_check_super here;
10954         it is not robust.  Always wait until later.
10955
10956         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
10957         match what JDK 1.2 does), but don't set ACC_PUBLIC.
10958
10959 1999-03-13  Per Bothner  <bothner@cygnus.com>
10960
10961         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
10962         * lex.h (UNGETC):  Change misleading macro.
10963
10964 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10965
10966         * parse.y (java_stabilize_reference): Return NODE when patching a
10967         COMPOUND_EXPR.
10968         (java_complete_lhs): Put parenthesis around truth values.
10969
10970 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10971
10972         * class.c (layout_class_method): Don't make rtl for interface
10973         methods.
10974         * parse.h (GET_TYPE_NAME): New macro.
10975         * parse.y (if_then_statement:): Fixed indentation.
10976         (if_then_else_statement:): Likewise.
10977         (for_statement:): Fixed spacing.
10978         (try_statement:): Fixed indentation.
10979         (create_interface): Don't force interfaces to be abstract.
10980         (method_header): Abstract methods are OK in interfaces.
10981         (declare_local_variables): Fixed typo in comment.
10982         (java_complete_expand_method): Fixed indentation.
10983         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
10984         non accessible fields.
10985         (java_stabilize_reference): New function.
10986         (java_complete_lhs): Fixed indentation. Use
10987         java_stabilize_reference in compound assignment. Insert the
10988         cast. If not processing `+' fix string constants before processing
10989         binop.
10990
10991 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10992
10993         * constants.c (find_class_or_string_constant): Cast variable `j'
10994         to a `jword' when comparing against one.
10995
10996         * expr.c (java_lang_expand_expr): Remove unused variables
10997         `has_finally_p' and `op0'.
10998
10999         * gjavah.c (print_field_info): Cast a value to jint when comparing
11000         against one.  Likewise for a jlong.
11001         (add_namelet): Likewise cast a `sizeof' to an int when comparing
11002         against a signed quantity.
11003
11004         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11005         (print_signature): Don't needlessly dereference variable `str'
11006
11007         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11008         `max_locals' with ATTRIBUTE_UNUSED.
11009         (jcf_parse_class): Likewise for variable `index'.
11010
11011         * parse.h (reverse_jdep_list): Remove static prototype.
11012
11013         * parse.y (build_jump_to_finally): Remove prototype and definition.
11014         (reverse_jdep_list): Add static prototype.
11015
11016         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11017         `assignment' and `expr_decl'.
11018
11019         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11020
11021 1999-03-12  Andrew Haley  <aph@cygnus.com>
11022
11023         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11024         we'll need a directory separator and a null character.
11025
11026 1999-03-10  Per Bothner  <bothner@cygnus.com>
11027
11028         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
11029
11030   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11031
11032         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11033         interfaces.
11034
11035 1999-03-05  Per Bothner  <bothner@cygnus.com>
11036
11037         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
11038
11039         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
11040
11041         * class.c (layout_class_method):  A static method in a base class
11042         is never overridden, so treat it like it doesn't exist.
11043         However, do complain about private non-static method overriding
11044         public static method.
11045
11046         * parse.y:  Don't set unused INITIALIZED_P flag.
11047         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
11048
11049         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
11050         (build_array_from_name):  Re-order &index[string] to &string[index].
11051
11052         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
11053         error_mark (it might catch more errors, but it is more likely to lose).
11054
11055 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11056
11057         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11058         (parse-scan.o): Depend on toplev.h.
11059
11060         * class.c (make_method_value): Add prototype.  Make it static.
11061         Remove unused second argument, caller changed.
11062
11063         * expr.c (java_lang_expand_expr): Remove unused variable
11064         `return_label'.
11065
11066         * java-tree.h: Don't prototype find_in_current_zip.
11067         Add prototypes for verify_constant_pool, start_java_method,
11068         end_java_method, give_name_to_locals, expand_byte_code,
11069         open_in_zip, set_constant_value, find_constant1, find_constant2,
11070         find_utf8_constant, find_string_constant, find_class_constant,
11071         find_fieldref_index, find_methodref_index, write_constant_pool,
11072         count_constant_pool_bytes and encode_newarray_type.
11073
11074         * jcf-dump.c: Remove unused variable `LONG_temp'.
11075
11076         * jcf-parse.c: Include parse.h.
11077         (jcf_parse_source): Remove unused parameter, all callers changed.
11078         (jcf_figure_file_type): Add static prototype.
11079         (find_in_current_zip): Likewise.  Also remove unused parameter,
11080         all callers changed.
11081         (read_class): Initialize variable `saved_pos'.
11082
11083         * jcf-reader.c (jcf_parse_preamble): Mark variables
11084         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11085
11086         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11087         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11088         (java_parse_doc_section): Initialize variable `seen_star'.
11089         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11090         (java_lex_error): Mark parameters `msg' and `forward' with
11091         ATTRIBUTE_UNUSED.
11092         (java_get_line_col): Mark parameters `filename' and `line' with
11093         ATTRIBUTE_UNUSED.
11094
11095         * parse-scan.y: Include toplev.h.
11096         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11097
11098         * parse.h: use `struct JCF', not plain `JCF'.
11099         (java_parser_context_save_global, java_expand_classes
11100         java_parser_context_restore_global, java_parse): Add prototypes.
11101
11102         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11103         `node'.
11104
11105 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
11106
11107         *  check-init.c (check_init):  COPYN takes word count, not bit count.
11108
11109 1999-02-26  Per Bothner  <bothner@cygnus.com>
11110
11111         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
11112         explicit build_decl.  (Avoids crash in reload when optimizing.)
11113
11114 1999-02-25  Per Bothner  <bothner@cygnus.com>
11115
11116         * decl.c (complete_start_java_method):  Handle synchronized method
11117         even when compiling from bytecode.
11118
11119 1999-02-26  Tom Tromey  <tromey@cygnus.com>
11120
11121         * gjavah.c (add_class_decl): Only generate `#include' if outer
11122         class is not the name of the class we are processing.  Correctly
11123         append `.h' in #include.
11124         (process_file): Clean up newlines around generated `#include's.
11125         (decode_signature_piece): Correctly handle inner classes.
11126         (struct include): New structure.
11127         (all_includes): New global.
11128         (print_include): New function.
11129         (add_class_decl): Use it.
11130         (process_file): Likewise.
11131         (add_class_decl): Generate include for java-array.h if array
11132         seen.
11133         (process_file): Don't generate java-array.h include.
11134
11135         * gjavah.c (add_namelet): Check for standard package names here.
11136         (add_class_decl): Don't check for standard package names here.
11137
11138 1999-02-25  Tom Tromey  <tromey@cygnus.com>
11139
11140         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11141         When reading a zip file, only use strncmp if both strings are
11142         bigger than the buffer length.  Initialize `k' when looping
11143         through zip file.
11144
11145 1999-02-24  Tom Tromey  <tromey@cygnus.com>
11146
11147         * gjavah.c (struct namelet): New structure.
11148         (add_namelet): New function.
11149         (print_namelet): New function.
11150         (print_class_decls): Use add_namelet and print_namelet to generate
11151         namespaces and not classes.
11152         (method_printed): New global.
11153         (HANDLE_END_METHOD): Examine method_printed.
11154         (print_method_info): Set method_printed when required.  Print
11155         error if function to be ignored is marked virtual.  Handle $finit$
11156         method.
11157         (METHOD_IS_FINAL): New macro.
11158         (print_field_info): Use it.
11159         (HANDLE_METHOD): Clear method_printed.
11160         (method_pass): New global.
11161         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11162         (process_file): Do two passes over both fields and methods.
11163         (HANDLE_METHOD): Examine method_pass.
11164         (root): New global.
11165         (add_class_decl): New function.
11166         (print_class_decls): Don't scan over entire constant pool.
11167
11168 1999-02-23  Tom Tromey  <tromey@cygnus.com>
11169
11170         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11171         disable linking in that case.
11172
11173 1999-02-20  Tom Tromey  <tromey@cygnus.com>
11174
11175         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11176         not 0x1f.
11177
11178 1999-02-21  Per Bothner  <bothner@cygnus.com>
11179
11180         * decl.c (build_result_decl), java-tree.h:  New method.
11181         (complete_start_java_method):  Handle synchronized methods.
11182         Don't build DECL_RESULT here.  (Ordering dependency problem.)
11183         (start_java_method):  Call build_result_decl here instead  ...
11184         * parse.y (java_complete_expand_method):  ... and here.
11185         (expand_start_java_method): Don't call complete_start_java_method here.
11186         (java_complete_expand_method):  Call it here instead.
11187         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
11188         * java-tree.h:  ... here.
11189
11190         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
11191         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
11192         for ARRAY_REF - it doesn't work when array bounds are checked.
11193         (patch_array_ref):  Handle it here instead.
11194
11195         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
11196
11197 1999-02-19  Per Bothner  <bothner@cygnus.com>
11198
11199         Force left-to-right evaluation of binary operations etc.
11200         * expr.c (force_evaluation_order), java-tree.h:  New function.
11201         * parse.y (java_complete_lhs):  Pass binary operations, procedure
11202         calls, and ARRAY_REFs to force_evaluation_order.
11203         (various):  Set TREE_SIDE_EFFECTS more carefully.
11204
11205         Tolerate random (non-UTF8) encoding in comments without complaining.
11206         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
11207         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
11208
11209         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
11210         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
11211
11212         * parse.y (java_complete_lhs):  Ignore an empty statement in a
11213         COMPOUND_EXPR.  Don't complain about empty statement after return.
11214
11215 1999-02-19  Per Bothner  <bothner@cygnus.com>
11216
11217         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
11218         in TREE_LIST - just chain the POINTER_TYPEs together.
11219         (resolve_class):  If type already resolved, return decl.
11220         After resolving, update TREE_TYPE(class_type), and name (if array).
11221         * parse.h (do_resolve_class), parse.y:  Make non-static.
11222         * class.c (maybe_layout_super_class):  Take this_class argument.
11223         Do do_resolve_class if necessary.
11224         (layout_class, layout_class_methods): Adjust calls appropriately.
11225         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11226         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
11227         * typeck.c (build_java_array_type):  Don't call layout_class.
11228
11229 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11230
11231         * parse.y (check_pkg_class_access): Allow private class access
11232         within the same package.
11233         (strip_out_static_field_access_decl): New function.
11234         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11235         operator argument before testing its nature.
11236
11237 1999-02-03  Per Bothner  <bothner@cygnus.com>
11238
11239         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
11240         (TRY_EXPR):  Simplify - it no longer has a finally clause.
11241         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
11242         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11243         * expr.c (java_lang_expand_expr):  Likewise.
11244         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
11245         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
11246         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
11247         (build_try_statement):  Remove finally parameter and handling.
11248         (build_try_finally_statement):  New function.
11249         (patch_try_statement):   No longer need to support finally clause.
11250         (try_statement):  Update grammar action rules.
11251         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
11252         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11253
11254 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
11255
11256         * jcf-parse.c (get_constant): Add braces around computation of 'd'
11257         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
11258
11259 1999-02-17  Andrew Haley  <aph@cygnus.com>
11260
11261         * class.c (build_utf8_ref): Back out broken patch which was
11262         intended to to output signatures using '.' as a separator.
11263
11264         * class.c (make_class_data): Output signatures using '.' as a
11265         separator, rather than '/'.
11266         (mangled_classname): Likewise.
11267         (make_field_value): Likewise.
11268         (make_method_value): Likewise.
11269         * constants.c (alloc_class_constant): Likewise.
11270         * expr.c (build_invokeinterface): Likewise.
11271
11272 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11273
11274         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11275         of an ancient workaround.
11276
11277 1999-02-10  Jeffrey A Law  (law@cygnus.com)
11278
11279         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
11280         here anymore.
11281
11282 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11283
11284         * lex.c (yylex): Encode \0 as UTF8.
11285
11286 1999-02-10  Tom Tromey  <tromey@cygnus.com>
11287
11288         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11289         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11290         (libgcj_zip): Renamed.
11291         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11292         LIBJAVA_ZIP_FILE.
11293         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11294
11295         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11296         (GC_NAME): Renamed -lgc to -lgcjgc.
11297
11298 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11299
11300         * lex.c (java_lang_cloneable): Initialize.
11301         * parse.y (java_lang_cloneable): New static variable.
11302         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11303         doing one more qualification round.
11304         (valid_ref_assignconv_cast_p): Reject null source or
11305         destination. Allow an array to be cast into java.lang.Cloneable.
11306         (patch_cast): Swapped two first arguments to first call to
11307         valid_ref_assignconv_cast_p.
11308
11309 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11310
11311         * parse.h: DECL_P renamed JDECL_P.
11312         * parse.y: DECL_P replaced by JDECL_P.
11313         (build_array_from_name): Always use pointer's type.
11314         (patch_bc_statement): Extra code to search continue target in a
11315         for loop. Fixed comments. Continue target is current loop when
11316         unlabeled.
11317
11318 1999-02-05  Andrew Haley  <aph@cygnus.com>
11319
11320         * class.c (make_class_data): The superclass of an interface should
11321         be null, not class Object.
11322
11323         * lex.c (java_lex): Sign extend hex literals.
11324
11325 1999-02-04  Andrew Haley  <aph@cygnus.com>
11326
11327         * class.c (build_utf8_ref): Output signatures using '.' as a
11328         separator, rather than '/'.
11329         (make_class_data): Likewise.
11330
11331 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
11332
11333         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11334         mkstemp.o.  Get them from libiberty now.
11335
11336 1999-02-02  Jeffrey A Law  (law@cygnus.com)
11337
11338         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11339
11340 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11341
11342         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11343         from libiberty.h
11344
11345 1999-02-02  Per Bothner  <bothner@cygnus.com>
11346
11347         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11348         * jcf-write.c (generate_bytecode_return):  New function.
11349         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
11350
11351         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
11352         generate special [fd]const_[01] instructions.
11353
11354         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
11355
11356         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
11357         handling OPCODE_lookupswitch or OPCODE_tableswitch.
11358
11359 1999-02-01  Per Bothner  <bothner@cygnus.com>
11360
11361         * parse.y (patch_method_invocation):  Handle calling static methods,
11362         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11363
11364         * parse.y (java_complete_lhs):  Don't complain about unreachable
11365         exit condition in a do-while statement.
11366
11367 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11368
11369         * lex.c (java_read_char): Fixed utf8 decoding.
11370         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
11371         range.
11372         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
11373         comments. Local variable `all_primitive' is gone. Broadened
11374         acceptance of `0' to floating point targets. `long' can now be
11375         widened to `double' or `float'.
11376         (valid_method_invocation_conversion_p): Added leading
11377         comment. Fixed tabulation.
11378         (build_string_concatenation): Optimize out left or right empty
11379         string constants.
11380
11381 1999-01-28  Per Bothner  <bothner@cygnus.com>
11382
11383         * jcf-write.c (localvar_alloc):  Only emit entry for
11384         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
11385         (generate_bytecode_insns):  Only call put_linenumber if
11386         debug_info_level > DINFO_LEVEL_NONE.
11387         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
11388         is specified, add -g1 (for compatibility wih javac).
11389
11390 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
11391
11392         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
11393         gjavah.o, check-init.o, jv-scan.o
11394
11395 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11396
11397         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
11398
11399         * gjavah.c: Include config.h and system.h.
11400
11401         * javaop.h (inline): Don't define, its handled by system.h.
11402         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
11403         from `inline' to `static inline'.
11404
11405         * jcf.h (inline): Don't define, its handled by system.h.
11406
11407         * lex.c (inline): Likewise.
11408
11409 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
11410
11411         * lang-specs.h: Map -Qn to -fno-ident.
11412
11413 1999-01-29  Richard Henderson  <rth@cygnus.com>
11414
11415         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
11416
11417 1999-01-29  Tom Tromey  <tromey@cygnus.com>
11418
11419         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
11420         then cast it to Object before calling `append' method.
11421
11422 1999-01-28  Per Bothner  <bothner@cygnus.com>
11423
11424         * check-init.c (check_bool2_init, check_bool_init, check_init):
11425         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
11426         * jcf-write.c (generate_bytecode_insns):  Likewise.
11427
11428 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11429
11430         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
11431         * parse.y (patch_cast): Allow a boolean to be cast into a
11432         boolean.
11433
11434 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11435
11436         * parse.y: (class_declaration:): Fixed indentation.
11437         (class_member_declaration:): Extra `;' after field declaration now
11438         accepted.
11439         (interface_declaration:): Removed debug messages in error reports.
11440         (patch_binop): Nodes created and returned inherit the orignal
11441         node's COMPOUND_ASSIGN_P flag value.
11442         (patch_cast): Fix cast from char to floating point.
11443
11444 1999-01-25  Andrew Haley  <aph@cygnus.com>
11445
11446         * except.c, java-except.h (expand_resume_after_catch): new
11447         function.
11448         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
11449         to branch back to main flow of control after a catch block.
11450
11451 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11452
11453         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
11454         $(srcdir)/../system.h.
11455         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
11456         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
11457         (jcf-write.o): Likewise.
11458         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11459         (mangle.o): Depend on $(srcdir)/../toplev.h.
11460         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11461         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11462
11463         * class.c: Include output.h and parse.h.
11464         (mangled_classname): Add the `const' keyword to a char*.
11465         (find_named_method): Hide unused function definition.
11466         (build_utf8_ref): Change type of variable `c' to unsigned char.
11467         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
11468         (build_class_ref): Add the `const' keyword to a char*.
11469         (layout_class_method): Remove unused variable `buf'.
11470
11471         * decl.c (find_local_variable): Remove unused variable `rtl'.
11472         (pushdecl): Likewise for variables `different_binding_level' and
11473         `oldglobal'.
11474         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
11475         (maybe_build_cleanup): Likewise for parameter `decl'.
11476
11477         * except.c (expand_start_java_handler): Mark parameter `range'
11478         with ATTRIBUTE_UNUSED.
11479
11480         * expr.c: Include except.h.
11481         (pop_type): Remove unused variable `i'.
11482         (pop_value): Likewise for variables `n_words' and `i'.
11483         (expand_java_arrayload): Likewise for variable `convert'.
11484         (java_lang_expand_expr): Likewise for variables `op0', `type',
11485         `mode', `unsignedp', `node' and `elements'.
11486         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
11487         `eh_ranges'.
11488         (process_jvm_instruction): Add a `const' qualifier to a char*.
11489
11490         * gjavah.c (output_directory): Add the `const' keyword to a char*.
11491         (temp_directory): Likewise.
11492         (print_c_decl): Likewise.
11493         (print_method_info): Likewise.
11494         (decode_signature_piece): Likewise.
11495         (print_mangled_classname): Likewise.
11496
11497         * java-except.h: Provide prototypes for maybe_start_try,
11498         maybe_end_try and add_handler.
11499
11500         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
11501         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
11502         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
11503         init_expr_processing, push_super_field, init_class_processing,
11504         can_widen_reference_to, class_depth, verify_jvm_instructions,
11505         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
11506         set_local_type, merge_type_state, push_type, load_type_state,
11507         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
11508         emit_unicode_mangled_name): Add prototypes.
11509
11510         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
11511         (print_signature_type): Use ISDIGIT, not isdigit.
11512         (print_signature): Remove unused variable `j'.
11513
11514         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
11515         int when comparing against one.
11516
11517         * jcf-parse.c: Include toplev.h.
11518
11519         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
11520         (localvar_free): Remove unused variable `i'.
11521         (generate_bytecode_conditional): Likewise for variable `kind'.
11522
11523         * jv-scan.c: Include config.h and system.h.  Remove redundant
11524         OS header and gansidecl.h includes.
11525         (warning): Add the `const' keyword to a char*.  Also add
11526         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
11527         __STDC__, when determining whether to use ANSI-isms.
11528         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
11529         (xmalloc): Don't redundantly prototype here.
11530         (main): Remove unused parameter `envp'.  Also fix the arguments
11531         passed to function `fatal' to match the format specifier.
11532
11533         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
11534
11535         * mangle.c: Include toplev.h.
11536         (emit_unicode_mangled_name): Declare parameter `len'.
11537
11538         * parse.y (parse_warning_context): Add the `const' keyword to a
11539         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
11540         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
11541         (issue_warning_error_from_context): Add the `const' keyword to
11542         a char*.
11543         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
11544         not `__STDC__' for whether to use ANSI-isms.
11545
11546         * typeck.c (incomplete_type_error): Mark parameters `value' and
11547         `type' with ATTRIBUTE_UNUSED.
11548         (parse_signature_type): Use ISDIGIT, not isdigit.
11549
11550         * verify.c (check_pending_block): Add the `const' keyword to a char*.
11551         (verify_jvm_instructions): Likewise.  Remove unused variables
11552         `field_name' and `default_val'.
11553
11554         * zextract.c: Include config.h and system.h.  Remove redundant
11555         OS header includes.
11556
11557         * zipfile.h: Prototype `read_zip_archive'.
11558
11559 1999-01-21  Andrew Haley  <aph@cygnus.com>
11560
11561         * typeck.c (convert): Allow conversions to void type: some
11562         optimizations in gcc do this.
11563
11564 1999-01-21  Andrew Haley  <aph@cygnus.com>
11565
11566         * typeck.c (convert_ieee_real_to_integer): New function.
11567         (convert): When not using fast-math and using hardware fp, convert
11568         an IEEE NaN to zero.
11569
11570 1999-01-18  Andrew Haley  <aph@cygnus.com>
11571
11572         * parse.y (patch_binop): Do a type conversion from signed to
11573         unsigned and then back to signed when a ">>>" is found.
11574
11575 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11576
11577         * java-tree.h: (check_for_initialization): Added prototype.
11578         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
11579         * parse.y (do_resolve_class): Removed unused locals.
11580         (read_import_dir): Likewise.
11581         (resolve_qualified_expression_name): Array creation
11582         expressions are valid primary expressions.
11583         (qualify_ambiguous_name): Likewise.
11584         (patch_synchronized_statement): Removed unused local.
11585
11586 1999-01-17  Jeffrey A Law  (law@cygnus.com)
11587
11588         * Makefile.in (zextract.o): Add dependencies.
11589
11590         * Makefile.in: Do not put ^Ls at the start of a line.
11591
11592 1999-01-15  Per Bothner  <bothner@cygnus.com>
11593
11594         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
11595         sub-type the result of the call that gets the exception value.
11596
11597         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
11598         don't call finish_class.
11599
11600         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
11601         clear found before continuing.
11602
11603         * verify.c (verify_jvm_instructions):  On an array load, allow
11604         and handle top of stack to be TYPE_NULL.
11605
11606         * gjavah.c (generate_access):  Translate Java package private or
11607         protected access to C++ public, but with a comment.
11608
11609 1999-01-13  Andrew Haley  <aph@cygnus.com>
11610
11611         * expr.c (generate_name): Name prefix changed to avoid clashes
11612         with assembler temp labels.
11613
11614         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
11615         MODIFY_EXPR.  Without this, code for the assignment may not be
11616         generated at all and the synchronized statement will read an
11617         uninitialized variable.
11618
11619 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11620
11621         * class.c (maybe_layout_super_class): Fixed returned value.
11622         * lex.c: Added 1999 to the copyright.
11623         (java_init_lex): Initialize java_lang_imported.
11624         * lex.h: Added 1999 to the copyright.
11625         * parse.h: Added 1999 to the copyright.
11626         (REGISTER_IMPORT): Fixed typo in trailing macro.
11627         (CURRENT_OSB): New macro.
11628         (struct parser_ctxt): New fields osb_depth, osb_limit.
11629         * parse.y (java_lang_id): New global variable.
11630         (type_import_on_demand_declaration): Don't import java.lang.* twice.
11631         (array_creation_expression:): Use CURRENT_OSB.
11632         (dims:): Uses a stack to keep track of array dimensions.
11633         (cast_expression:): Use CURRENT_OSB.
11634         (find_expr_with_wfl): Return NULL if node found doesn't meet the
11635         conditions.
11636         (register_fields): Fixed typos in comment.
11637         (check_method_redefinition): Fixed comment indentation.
11638         (java_check_regular_methods): Set saved found wfl to NULL after
11639         having reinstalled it in the previously found DECL_NAME.
11640
11641 1999-01-10  Richard Henderson  <rth@cygnus.com>
11642
11643         * gjavah.c (java_float_finite): Use a union to do type punning.
11644         (java_double_finite): Likewise.
11645
11646 1999-01-09  Per Bothner  <bothner@cygnus.com>
11647
11648         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
11649         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
11650         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
11651         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
11652         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
11653         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
11654
11655 1999-01-08  Per Bothner  <bothner@cygnus.com>
11656
11657         * check-init.c (check_init):  If compiling to native, we don't
11658         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
11659
11660 1999-01-08  Tom Tromey  <tromey@cygnus.com>
11661
11662         * parse-scan.y (variable_declarator_id): Set or increment
11663         bracket_count.
11664         (bracket_count): New global.
11665         (formal_parameter): Handle case where bracket pairs trail variable
11666         declarator id.
11667
11668 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
11669
11670         * jcf-parse.c (yyparse): variable len changed from a char to an
11671         int to prevent overflow.
11672
11673 1999-01-06  Per Bothner  <bothner@cygnus.com>
11674
11675         * java-tree.h:  Declare read_class.
11676         * jcf-parse.c (read_class):  New function.
11677         (load_class):  Now just call read_class.
11678
11679         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
11680         * jcf-parse.c (parse_source_file):  Declare save_error_count,
11681         which is needed by java_parse_abort_on_error macro,
11682         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
11683
11684         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
11685         constructor, if initializing a static field.
11686         (patch_new_array_init):  Set TREE_CONSTANT if it is.
11687         * expr.c (java_lang_expand_expr):  For a static array constructor
11688         of primitive elements, allocate the array itself statically.
11689         Disabled until we can set the vtable field statically.
11690
11691         * check-init.c:  New file.  Checks for definite assignment.
11692         * Makefile.in (JAVA_OBJS):  Add check-init.o.
11693         * parse.y (java_complete_expand_method): Call check_for_initialization.
11694         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
11695
11696 1999-01-06  Graham <grahams@rcp.co.uk>
11697
11698         * parse.y : include system.h instead of including
11699         standard headers directly with the exception of <dirent.h>.
11700
11701 1999-01-06  Per Bothner  <bothner@cygnus.com>
11702
11703         * lex.h:  Moved static function declarations to lex.c,
11704         to shut up some -Wall warnings.
11705         * lex.c:  Static function declarations moved here.
11706         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
11707
11708 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11709
11710         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
11711
11712 1998-12-22  Per Bothner  <bothner@cygnus.com>
11713
11714         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
11715         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
11716
11717         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
11718         (localvar_alloc):  Change return type to void,
11719         (emit_unop):  Remove unused variable size.
11720
11721         * jcf-write.c (struct jcf_block):  Add new union.
11722         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
11723         (call_cleanups):  New functions.
11724         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
11725         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
11726         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
11727         * lang.c (lang_init):  Call using_eh_for_cleanups.
11728         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
11729         completing operands to patch_synchronized_statement.
11730         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
11731         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
11732         WITH_CLEANUP_EXPR instead of TRY_EXPR.
11733
11734 1998-12-20  John F. Carr  <jfc@mit.edu>
11735
11736         * Make-lang.in: Comment out control-Ls; they upset some makes.
11737
11738 1998-12-18  Tom Tromey  <tromey@cygnus.com>
11739
11740         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
11741         consistently.
11742
11743 1998-12-17  Tom Tromey  <tromey@cygnus.com>
11744
11745         * parse.y (DIR_SEPARATOR): New define.
11746         (check_class_interface_creation): Use it.
11747
11748         * parse-scan.y (report_main_declaration): Recognize
11749         `java.lang.String' in argument to main.
11750
11751 1998-12-16  Per Bothner  <bothner@cygnus.com>
11752
11753         * parse.y (create_interface):  Remove bogus test.
11754
11755 1998-12-16  Per Bothner  <bothner@cygnus.com>
11756
11757         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
11758         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
11759
11760 1998-12-16  Tom Tromey  <tromey@cygnus.com>
11761
11762         * parse-scan.y (qualified_name): Use correct sprintf format.
11763
11764 1998-12-15  Tom Tromey  <tromey@cygnus.com>
11765
11766         * gjavah.c (print_field_info): Changed how most negative number is
11767         printed.
11768
11769 1998-12-14  Per Bothner  <bothner@cygnus.com>
11770
11771         * parse.y (fold_constant_for_init):  New function.
11772         (resolve_expression_name):  Don't replace static final
11773         constant-initialized fields by its value.
11774         (java_complete_lhs):  New.  Same as java_complete_tree, except does
11775         not replace static final constant-initialized fields by their values.
11776         (register_fields):  If there is an initializer, set DECL_INITIAL and
11777         MODIFY_EXPR_FROM_INITIALIZATION_P.
11778         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
11779         Only call patch_initialized_static_field if
11780         MODIFY_EXPR_FROM_INITIALIZATION_P.
11781         (patch_initialized_static_field):  If not valid constant, clear
11782         DECL_INITIAL.
11783
11784         * parse.y (lookup_field_wrapper):  Fix thinko.
11785
11786         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
11787         set and restore global lineno.
11788
11789 1998-12-14  Tom Tromey  <tromey@cygnus.com>
11790
11791         * gjavah.c (print_field_info): If value to print is the smallest
11792         value of its size, then print as hex to avoid later warnings from
11793         C++ compiler.
11794
11795 1998-12-14  Tom Tromey  <tromey@cygnus.com>
11796
11797         * gjavah.c (decompile_method): Decompile `return null'.
11798         (process_file): Generate `#pragma interface'.
11799         (method_declared): New global.
11800         (print_method_info): Set it.
11801         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
11802         (print_method_info): Handle abstract methods.
11803
11804 1998-12-13  Per Bothner  <bothner@cygnus.com>
11805
11806         * parse.y (patch_method_invocation):  If class_decl is null
11807         (e.g. an array type), use original type.
11808
11809         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
11810         errors about uncaught exception from clone (of array, specifically).
11811
11812 1998-12-13  Tom Tromey  <tromey@cygnus.com>
11813
11814         * gjavah.c (decompile_method): Handle all types of `return'
11815         opcode.  Decompile `return this' and `return'.
11816         (method_access): New global.
11817         (print_method_info): Set it.
11818         (decompile_method): Don't decompile a synchronized method.
11819
11820 1998-12-13  Tom Tromey  <tromey@cygnus.com>
11821
11822         * jcf-reader.c (jcf_parse_one_method): Recognize
11823         HANDLE_END_METHOD.
11824         * gjavah.c (HANDLE_END_METHOD): New macro.
11825         (HANDLE_CODE_ATTRIBUTE): New macro.
11826         (decompile_method): New function.
11827         (print_method_info): Don't print `;\n' at end of function decl.
11828         Include java-opcodes.h.
11829         (decompiled): New global.
11830
11831 1998-12-12  Per Bothner  <bothner@cygnus.com>
11832
11833         * class.c (build_class_ref):  Handle PRIMTYPE.class if
11834         flag_emit_class_files.
11835         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
11836         if flag_emit_class_files.
11837         * parse.y (java_complete_tree):  Pre-liminary support for
11838         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
11839
11840         * parse.y (patch_synchronized_statement):   Don't call monitorexit
11841         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
11842
11843         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
11844
11845         * zipfile.h (opendir_in_zip):  New declaration.
11846         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
11847         (opendir_in_zip):  New function, using code from open_in_zip.
11848         (open_in_zip):  Call opendir_in_zip.
11849         (find_class):  Remove no-longer-used do_class_file parameter,
11850         but add source_ok parameter.  Change logic so if we find a .java file,
11851         we don't look for .class in later classpath emtries.
11852         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
11853         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
11854         * gjavah.c: Update call to find_class.
11855         * jcf-dump.c:  Likewise.
11856
11857         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
11858         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
11859         nothing if body is empty_stmt_node.
11860         Various little fixes so SP gets correctly adjusted.
11861         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
11862         For CALL_EXPR, test if static first.
11863         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
11864         such as the ones we create for Object and Class.
11865         Set and restore current_function_decl.
11866         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
11867         (note_possible_classname):  New function.
11868         (read_import_entry):  Removed.  Merged with read_import_dir.
11869         (read_import_dir):  Don't call find_class - that only gives us
11870         the first classpath entry having the needed package.
11871         Use the struct buffer data structure from buffer.h.
11872         (read_import_dir, find_in_imports_on_demand):  The remembered
11873         class names now use '.' (not '/') as package separator.
11874
11875         * parse.y (java_complete_expand_methods):  Call write_classfile
11876         here, and not in java_expand_classes (which only gets first class).
11877
11878 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11879
11880         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
11881         (register_fields):  If a static fields has an initializer, just
11882         chain it on ctxp->static_initialized, and handle later.
11883         (java_complete_expand_methods):  Force <clinit> first.
11884         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
11885         - it's already been completed.
11886         (patch_initialized_static_field):  New function.
11887         (java_complete_field):  Call it.
11888
11889 1998-12-12  Per Bothner  <bothner@cygnus.com>
11890
11891         * expr.c (encode_newarray_type, build_new_array):  New functions.
11892         * java-tree.h:  Declare build_new_array.
11893         * jcf-write.c (patch_newarray):  Use build_new_array.
11894
11895         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
11896         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
11897
11898         * parse.y (patch_new_array_init):  Re-organize.
11899         Now is passed the actual array (pointer) type of the value.
11900         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
11901         (patch_array_constructor):  Removed - merged into patch_new_array_init.
11902         (java_complete_tree):  Update patch_new_array_init.
11903
11904         * jcf-write.c (find_constant_index):  New function.
11905         (generate_bytecode_insns):  Use find_constant_index.
11906         (generate_classfile):  Use find_constant_index for ConstantValue.
11907
11908 1998-12-11  Tom Tromey  <tromey@cygnus.com>
11909
11910         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
11911         * decl.c (init_decl_processing): Renamed dtable -> vtable.
11912         * class.c (make_class_data): Renamed dtable -> vtable, and
11913         dtable_method_count -> vtable_method_count.
11914
11915 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11916
11917         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
11918         global variables, initialized.
11919         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
11920         Declared new global variables.
11921         * lex.c (java_lex): Return long_zero_node, float_zero_node,
11922         double_zero_node, integer_zero_node upon direct matching.
11923         * parse.y (purify_type_name): Added function prototype.
11924         (duplicate_declaration_error_p): Consider new_type as potentially
11925         being a incomplete type. Use purify_type_name on type string.
11926         (method_header): saved_type: unused variable removed. Don't figure
11927         return type if method name is invalid.
11928         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
11929         processed by patch_unaryop.
11930         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
11931         increment/decrement node into its original type after binary
11932         numeric promotion on its operands.
11933
11934 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11935
11936         * parse.y (array_initializer:): Array init operand is NULL_TREE
11937         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
11938         now an error. Fixed indentation problems.
11939         (patch_string): Handle error_mark_node as an argument.
11940         (patch_new_array_init): Fixed indentation problems.
11941         (array_constructor_check_entry): Removed check on null wfl_value.
11942         Return an error if wfl_value's walk returns an error.
11943
11944 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11945
11946         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
11947         * lex.c (java_lex): Remember column position before advancing one
11948         token. Retain location information on OCB_TK.
11949         * lex.h (typedef struct java_lc): Added new field.
11950         * parse.h (GET_SKIP_TYPE): New macro.
11951         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
11952         * parse.y (build_new_array_init, patch_new_array_init,
11953         patch_array_constructor, maybe_build_array_element_wfl,
11954         array_constructor_check_entry): New function prototypes.
11955         (switch_block:): Tagged <node>.
11956         (OCB_TK): Tagged <operator>.
11957         (array_initializer:): Installed actions.
11958         (variable_initializer): Build location information on element if
11959         necessary.
11960         (switch_statement:): Fixed indentation typo.
11961         (switch_block:): Redefined default action.
11962         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
11963         (patch_assignment): Removed duplicate code.
11964         (maybe_build_array_element_wfl, build_new_array_init,
11965         patch_new_array_init, patch_array_constructor,
11966         array_constructor_check_entry): New functions.
11967
11968 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11969
11970         * parse.y (array_initializer): Tagged <node>.
11971         (variable_initializer:): Use default rule.
11972         (array_initializer:): Defined actions.
11973         (variable_initializers:): Likewise.
11974         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
11975         non-static field accesses.
11976         (patch_invoke): Fixed indentation typo.
11977         (java_complete_tree): Likewise.
11978         (build_labeled_block): Changed leading comment. Generate an error
11979         in case of duplicate loop labels.
11980         (patch_conditional_expr): Patch results of string concatenation
11981         operations.
11982
11983 1998-12-06  Per Bothner  <bothner@cygnus.com>
11984
11985         * constants.c (find_methodref_index):  When the class is an interface,
11986         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
11987
11988         * decl.c (finit_identifier_node):  Use "$finit$", rather than
11989         "<finit>" (which Sun's verifier rejects).
11990         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
11991         (generate_field_initialization_code):  Removed.
11992         (fix_constructors)  Don't add call to $finit$ here (wrong order).
11993         (patch_method_invocation):  Add $finit$ call here.
11994
11995         * java-tree.h (CALL_USING_SUPER):  New macro.
11996         * parse.y (patch_invoke):  Remove im local variable.
11997         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
11998         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
11999         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
12000
12001         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
12002
12003         * parse.y (java_complete_tree):  Don't complain about unreachable
12004         statement if it is empty_stmt_node.
12005
12006         * jcf-write.c (find_constant_wide):  New function.
12007         (push_long_const):  Use find_constant_wide.
12008
12009         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
12010         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
12011         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12012         Emit invokeinterface when calling an interface method.
12013         Emit invokespecial also when calling super or private methods.
12014
12015         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
12016
12017 1998-12-06  Per Bothner  <bothner@cygnus.com>
12018
12019         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
12020
12021 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12022
12023         * java-tree.h (java_layout_seen_class_methods): New function
12024         prototype.
12025         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12026         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12027         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12028         * parse.y (method_declarator:): Defined action.
12029         (issue_warning_error_from_context): input_filename saved, set to
12030         the appropriate value and restored after java_error is called.
12031         (build_unresolved_array_type): Fixed comment.
12032         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12033         (method_header): Deal with return type the same way type are
12034         handled for fields and method's parameters and local variables
12035         types are handled.
12036         (check_method_redefinition): Removed extra CR.
12037         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12038         (java_layout_seen_class_methods): New function.
12039         (java_layout_classes): Call java_layout_seen_class_methods.
12040
12041 1998-12-03  Per Bothner  <bothner@cygnus.com>
12042
12043         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
12044
12045 1998-12-03  Per Bothner  <bothner@cygnus.com>
12046
12047         * jcf-dump.c (main):  Fix error message.
12048         * jcf-path.c (add_entry):  Style fix.
12049
12050 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12051
12052         * class.c (layout_class_method): Call build_java_argument_signature
12053         on constructors too.
12054         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12055         (patch_method_invocation): Define a primary when resolving an
12056         expression name. Augmented comment on code checking illegal `this'
12057         usage. Loosened it test by accepting NEW_CLASS_EXPR.
12058
12059 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12060
12061         * class.c (layout_class_method): Don't report error on non-static
12062         overriding static if the method is private.
12063         * java-tree.h (finish_class): Prototype added.
12064         * lex.c (java_get_line_col): Handle col argument -2 value.
12065         * parse.h: All static method declarations moved to parse.y.
12066         * parse.y: Now contains all static method declarations previously
12067         found in parse.h.
12068         (find_expr_with_wfl, missing_return_error,
12069         unreachable_stmt_error): New functions.
12070         (java_get_real_method_name): Identify constructors bearing class
12071         names in source code compiled classes only.
12072         (java_complete_expand_methods): Call missing_return_error.
12073         (invocation_mode): Private methods invoked as static methods.
12074         (java_complete_tree): Call unreachable_stmt_error.
12075
12076 1998-12-01  Tom Tromey  <tromey@cygnus.com>
12077
12078         * Makefile.in (+target): Removed.
12079         (+xmake_file): Likewise.
12080         (+tmake_file): Likewise.
12081         (.NOEXPORT): Removed duplicate.
12082
12083 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12084
12085         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12086
12087         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
12088
12089         * jvgenmain.c: Remove the xmalloc prototype, we get it from
12090         libiberty.h.  Provide an xmalloc definition.
12091
12092         * jvspec.c: Remove the xmalloc prototype.
12093
12094         * parse-scan.y: Include config.h and system.h.  Don't include
12095         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
12096         Provide an xstrdup definition.
12097
12098 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
12099
12100         * jcf-path.c (add_entry): Recognize ".jar" too.
12101         * lang-specs.h: Likewise.
12102
12103 1998-11-26  Per Bothner  <bothner@cygnus.com>
12104
12105         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
12106         soft_monitorenter_node, soft_monitorexit_node, throw_node.
12107
12108         * jcf-write.c (generate_bytecode_insns):
12109         Handle pre/post-increment/decrement of long.
12110
12111         * jcf-write.c (generate_bytecode_insns):
12112         Handle missing exception handler (finally for synchronized).
12113
12114 1998-11-25  Per Bothner  <bothner@cygnus.com>
12115
12116         * java-tree.h (end_params_node):  Declare global.
12117         * decl.c (end_params_node):  New global.
12118         (init_decl_processing, start_java_method):  Use end_params_node for
12119         end of list of parameter types.  Follows correct gcc conventions.
12120         * expr.c (pop_argument_types, pop_arguments):  Likewise.
12121         * lang.c (put_decl_node):  Likewise.
12122         * typeck.c (various places):  Likewise.
12123         * class.y (various places):  Likewise.
12124         * parse.y (various places):  Likewise.
12125
12126         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
12127         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
12128
12129         * class.c:  Add #include flags.h, remove no-longer needed declaration.
12130
12131         * class.c (layout_class_method):  Remove commented-out code, re-format.
12132         Don't add vtable entry (or index) for private methods.
12133         * expr.c (expand_invoke):  A private method is implicitly final.
12134         * class.c (make_class_data):  If inlining or optimizing,
12135         skip private methods.
12136
12137         * class.c (finish_class):  New function.  Calls existing methods,
12138         but alls emits deferred inline functions.
12139         * jcf-parse.c (parse_class_file):  Call finish_class.
12140         * parse.y (java_complete_expand_methods):  Likewise.
12141
12142         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
12143
12144         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
12145
12146 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
12147
12148         * jcf-write.c (generate_bytecode_conditional): Fix typo.
12149
12150 1998-11-24  Per Bothner  <bothner@cygnus.com>
12151
12152         * (generate_classfile): Always write class access flag with
12153         ACC_SUPER set.
12154
12155 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12156
12157         * class.c (maybe_layout_super_class): New function.
12158         (layout_class): Reorganized. Loop on class methods dispatched into
12159         a new function. Call maybe_layout_super_class.
12160         (layout_class_methods, layout_class_method): New functions.
12161         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12162         class.
12163         (expand_invoke): Likewise.
12164         * java-tree.h (all_class_list): New global variable declared.
12165         (layout_class_methods, layout_class_method): New function
12166         prototypes.
12167         (LAYOUT_SEEN_CLASS_METHODS): New macro.
12168         * jcf-parse.c (all_class_list): New global variable.
12169         (load_class): Extended what class_or_name can be. Use parser
12170         context mechanism to save globals before calling jcf_parse.
12171         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12172         is set on the file name.
12173         (jcf_parse): Layout class methods when Object is loaded, otherwise
12174         record class in all_class_list for delayed method layout.
12175         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12176         * lang.c (put_decl_node): Decode <init> into the decl context
12177         class name.
12178         * lex.c (java_allocate_new_line): Use xmalloc.
12179         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12180         pointers, not TREE_LIST elements.
12181         (struct parser_ctxt): Fixed comment indentations, added comments
12182         and reordered some fields.
12183         (java_check_methods): Function prototype removed.
12184         * parse.y (java_push_parser_context): Use xmalloc.
12185         (java_parser_context_restore_global): Pop extra pushed ctxp only
12186         when there's nothing next.
12187         (maybe_create_class_interface_decl): Fixed comment, add new
12188         created class decl to all_class_list.
12189         (method_header): Use GET_REAL_TYPE on argument's types.
12190         (method_declarator): Use GET_REAL_TYPE, change type to the real
12191         type in TREE_LIST dependency node. Build argument list with the
12192         real type.
12193         (create_jdep_list): Use xmalloc. Removed allocation error message.
12194         (obtain_incomplete_type): Fixed leading comment. Broadened
12195         incoming argument meaning.
12196         (register_incomplete_type): Use xmalloc. Removed allocation error
12197         message.
12198         (safe_layout_class): Fixed leading comment.
12199         (jdep_resolve_class): Reversed if statement condition and switch
12200         if and else bodies.
12201         (resolve_and_layout): Fixed leading comment. Broadened incoming
12202         argument meaning.
12203         (complete_class_report_errors): New local variable name, for
12204         clarity. purify_type_name used for all error cases.
12205         (java_get_real_method_name): Stricter check on constructors.
12206         (java_check_regular_methods): Reverse methods list only if not
12207         already laid out. Layout artificial constructor.
12208         (java_check_methods): Deleted.
12209         (source_start_java_method): Obtain incomplete type for patchable
12210         method arguments.
12211         (java_layout_classes): Fixed leading comment. Use
12212         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12213         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12214         before returning. Fixed comments.
12215         (java_expand_classes): Check for errors up front.
12216         (patch_method_invocation): Class to search is resolved and laid
12217         out.
12218
12219 1998-11-24  Per Bothner  <bothner@cygnus.com>
12220
12221         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
12222
12223         * javaop.h (int8):  Removed - not used.
12224         (jbyte):  Redefine portably with correct signedness.
12225
12226         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
12227
12228         * jcf-write.c (generate_bytecode_insns):  Fix typo
12229         OPCODE_getstatic to OPCODE_getfield.
12230
12231         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
12232         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
12233         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12234
12235 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12236
12237         * jcf-parse.c (jcf_parse_source): Function returned type is
12238         void. Added prototype.
12239         (jcf_parse): Function returned type is void.
12240         (yyparse): Remove call to fclose on the last parsed file.
12241
12242         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12243
12244 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12245
12246         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12247         (layout_class): Cope with methods featuring WFL in decl names.
12248         * decl.c (unqualified_object_id_node): New global variable,
12249         initialized.
12250         (build_decl_no_layout): Removed.
12251         * expr.c (build_primtype_type_ref): Handle Double.
12252         (java_lang_expand_expr): Fixed indentations.
12253         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12254         (flag_wall, flag_redundant, flag_not_overriding,
12255         flag_static_local_jdk1_1, unqualified_object_id_node): Global
12256         variable declarations.
12257         (build_decl_no_layout): Removed prototype.
12258         (java_get_real_method_name): Added prototype.
12259         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12260         (java_parse_abort_on_error): Macro now just returns.
12261         * jcf-parse.c (jcf_parse_source): Check fclose returned
12262         value. Call emit_register_classes if java_report_errors returns
12263         zero.
12264         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12265         flag_static_local_jdk1_1): New integer flags.
12266         (lang_decode_option): New flags set here.
12267         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12268         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12269         the flag_redundant variable.
12270         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12271         when parsing java.lang.Object class.
12272         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12273         NULL_TREE to build.
12274         (resolve_qualified_expression_name): Fixed indentation.
12275         (patch_array_ref): Changed prototype.
12276         (not_initialized_as_it_should_p): Prototype removed.
12277         (java_report_errors): Added function prototype.
12278         * parse.y (formal_parameter:): Changed error message for not yet
12279         supported final parameters.
12280         (class_type_list:): Set both PURPOSE and VALUE of created
12281         TREE_LIST to be class_type.
12282         (primary_no_new_array:): Handle class literals on primitive types.
12283         (parse_warning_context): Reinstalled correct force_error and
12284         do_warning flags setups.
12285         (java_report_errors): Changed prototype. Return java_error_count
12286         value.
12287         (variable_redefinition_error): Consider treating variable type as
12288         a fake pointer.
12289         (create_interface): Warn about redundant abstract modifier if
12290         flag_redundant is set. Changed error message.
12291         (lookup_field_wrapper): Save/restore globals before/after looking
12292         up field.
12293         (duplicate_declaration_error_p): Consider treating declaration
12294         type as a fake pointer.
12295         (register_fields): Extract real type from dependency node. Check
12296         for duplicate field declaration after type adjustment. Use
12297         DECL_INITIAL to store static final initialized values.
12298         (method_header): Extract real function type from dependency node.
12299         (check_abstract_method_header): Use GET_METHOD_NAME.
12300         (obtain_incomplete_type): Layout fake pointer type.
12301         (safe_layout_class): Don't try to check for methods before layout.
12302         (java_complete_class): Don't check for correct throws clause
12303         elements inheritance here.
12304         (resolve_and_layout): Broadened name parameter meaning.
12305         (reset_method_name): Use GET_METHOD_NAME.
12306         (java_get_real_method_name): New function.
12307         (java_check_regular_methods): Don't check methods in
12308         java.lang.Object.  Verify lineage of throws clause elements. Use
12309         flag_no_overriding in warning report.
12310         (check_throws_clauses): Don't check if class was from
12311         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12312         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12313         (declare_local_variables): Use flag_static_local_jdk1_1 to report
12314         warning on unsupported final local variables. Use build_decl
12315         instead of build_decl_no_layout. Get real local variable type from
12316         dependency node.
12317         (source_start_java_method): Get real parameter type from
12318         dependency node. Call build_decl instead of build_decl_no_layout.
12319         (java_layout_classes): Reverse tree and layout type and class as
12320         required. Mark class as loaded when done.
12321         (resolve_field_access): Fixed indentation. Restricted condition
12322         leading to static field access code generation. Set field_type
12323         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12324         (resolve_qualified_expression_name): Initialize type_found to
12325         null. Handle static field resolved during qualification. Fixed
12326         layout on non primitive field decl types.
12327         (not_accessible_p): Fixed typo in comment.
12328         (patch_method_invocation): Resolve and layout class to search from
12329         type.
12330         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12331         layout non primitive type, if necessary. Make method node only to
12332         report errors.
12333         (find_applicable_accessible_methods_list): Consider WFL'ed method
12334         decl names. Fixed indentation.
12335         (argument_types_convertible): Resolve and layout target type if
12336         necessary.
12337         (java_complete_tree): Fixed indentation problems. Rewrote
12338         CALL_EXPR thrown exceptions check. Re-installed further processing
12339         of the assignment in certain cases.
12340         (patch_assignment): Call maybe_build_primttype_type_ref to perform
12341         inlining on class literals.
12342         (valid_builtin_assignconv_identity_widening_p): Cope with constant
12343         0 literal.
12344         (valid_method_invocation_conversion_p): Likewise.
12345         (patch_string): Temporary disable forbidden use of `this' in
12346         explicit constructor invocations when doing string concatenation
12347         within their scope.
12348         (patch_unaryop): Added comment. Reinstalled code to disable
12349         further check on assignment operation with cast expression RHS.
12350         (patch_switch_statement): Fixed indentation.
12351         (build_try_statement): Call build_decl instead of
12352         build_decl_no_layout.
12353         (patch_synchronized_statement): Likewise.
12354         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12355         IS_UNCHECKED_EXPRESSION_P.
12356         (check_thrown_exceptions_do): Changed leading comment. Resolve and
12357         layout argument exception type.
12358         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12359         of IS_UNCHECKED_EXPRESSION_P.
12360
12361 1998-11-18  Anthony Green  <green@cygnus.com>
12362
12363         * jcf-parse.c (yyparse): Open class file in binary mode.
12364
12365 1998-11-15  Per Bothner  <bothner@cygnus.com>
12366
12367         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
12368
12369         * jcf-write.c (perform_relocations):  Move check out one loop.
12370
12371 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
12372
12373         * Make-lang.in: Fix reference to srcdir.
12374         * jv-scan.c: Add missing xmalloc prototype.
12375         * jvgenmain.c: Ditto.
12376
12377 1998-11-15  Per Bothner  <bothner@cygnus.com>
12378
12379         * decl.c (error_mark_node), java-tree.h:  New global.
12380         * parse.y:  Use empty_stmt_node instead of size_zero_node.
12381         (build_if_else_statement):  If missing else, use empty_stmt_node.
12382
12383         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
12384         (java_complete_expand_method):  Complain if return is missing.
12385         (java_check_regular_methods):  Comment out incorrect error check.
12386         (not_accessible_p):  Fix incorrect handling of protected methods.
12387         (patch_method_invocation):  Pass correct context to not_accessible_p.
12388         (find_applicable_accessible_methods_list):  Likewise.
12389         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
12390         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
12391         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
12392         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
12393
12394         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
12395         (push_int_const):  Remove reundant NOTE_PUSH.
12396         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
12397         (- case SWITCH_EXPR):  Fix code generation bug.
12398         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
12399         (generate_classfile):  More robust for abstract methods.
12400
12401 1998-11-15  Anthony Green  <green@cygnus.com>
12402
12403         * Makefile.in: jv-scan and jvgenmain all require libiberty.
12404         * Make-lang.in: Ditto.
12405
12406         * jv-scan.c: Remove xmalloc and xstrdup definitions.
12407         * jvgenmain: Ditto.
12408
12409 1998-11-15  Per Bothner  <bothner@cygnus.com>
12410
12411         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
12412
12413         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
12414
12415 1998-11-14  Per Bothner  <bothner@cygnus.com>
12416
12417         Allow uses of interface types to verify.  This is not really
12418         type-safe, but it matches what Sun does, and is OK as long as
12419         there are appropriate run-time checks.
12420         * verify.c (merge_types):  If merging two interface types,
12421         just set the result to java.lang.Object.
12422         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
12423
12424 1998-11-13  Tom Tromey  <tromey@cygnus.com>
12425
12426         * gjavah.c (main): Handle --output-class-directory argument.
12427         * jvspec.c (lang_specific_driver): Translate `-d' into
12428         -foutput-class-dir.
12429         * jcf.h (jcf_write_base_directory): Declare.
12430         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
12431         * lang-options.h: Mention -foutput-class-dir.
12432         * jcf-write.c (jcf_write_base_directory): New global.
12433         (make_class_file_name): Put generated .class file into `-d'
12434         directory, or into source directory if -d not given.  Function now
12435         static.
12436         (write_classfile): Free class file name.  Handle case where class
12437         file name is NULL.
12438         (DIR_SEPARATOR): New macro.
12439         Include <sys/stat.h>
12440
12441         * Makefile.in (prefix): New macro.
12442
12443 1998-11-12  Per Bothner  <bothner@cygnus.com>
12444
12445         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
12446         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
12447         here (done in patch_invoke instead).
12448         (case_identity):  Moved here from parse.y.
12449
12450         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
12451         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
12452         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
12453         so they can be efficiently scanned without recursion.
12454         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
12455         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
12456         in BLOCK iteratively, rather than recursively.
12457
12458         * parse.y (do_unary_numeric_promotion):  New function.
12459         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
12460
12461         * parse.y (patch_newarray):  Various fixes.
12462
12463         Re-do handling of switch statements (for proper block scoping).
12464         * parse.y:  Add just a single block for the enture switch block,
12465         but don't create any "case blocks".
12466         (group_of_labels):  Rmeoved unneeded non-terminal.
12467         CASE_EXPR and DEFAULT_EXPR are added to current block.
12468         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
12469         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
12470         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
12471         * parse.y (wfl_operator, print_int_node): Make non-static.
12472         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
12473         as part of recursive scan of block.
12474         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
12475         (patch_switch_statement):  Most tests move dinto java_complete_tree.
12476
12477         * parse.y:  Make various production be non-typed (void).
12478         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
12479         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
12480         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
12481
12482         * jcf-write.c (struct jcf_handler):  New type.
12483         (struct jcf_switch_state):  New type.
12484         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
12485         (alloc_handler, emit_unop, emit_reloc):  New functions.
12486         (adjust_typed_op):  Add extra parameter ("max type" offset).
12487         (emit_switch_reloc, emit_case-reloc):  New function.
12488         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
12489         (generate_bytecode_insns):  Support REAL_CST, switch statements,
12490         exception handling, method calls, object/array creation, and more.
12491
12492         * class.c:  Remove some unused variables.
12493         * constants.c (find_string_constant):  New function.
12494         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
12495         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
12496         if flag_emit_class_files.
12497
12498 1998-11-12  Tom Tromey  <tromey@cygnus.com>
12499
12500         * jcf-io.c (find_class): Added explanatory comment.
12501
12502         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
12503         trailing slash to `.zip' entries.
12504
12505         * jvspec.c (lang_specific_driver): Correctly handle case where
12506         GC_NAME not defined.
12507
12508 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12509
12510         * jvspec.c (GC_NAME): New define.
12511         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
12512         if required.
12513         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
12514
12515 1998-11-11  Per Bothner  <bothner@cygnus.com>
12516
12517         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
12518
12519 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12520
12521         * jcf-dump.c (main): Correctly recognize `--'-style long options.
12522
12523 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12524
12525         * class.c (is_compiled_class): Call safe_layout_class for class
12526         compiled from source.
12527         * conver.h (convert_to_integer, convert_to_real,
12528         convert_to_pointer): Added prototypes.
12529         * decl.c (init_decl_processing): Non longer push the decls of
12530         `methodtable', `constants', `Class', `Field', `dispatchTable'
12531         `jexception' and `Method'.
12532         * expr.c (build_invokeinterface): New function.
12533         (expand_invoke): static variable CLASS_IDENT now in
12534         build_invokeinterface. Use build_invokeinterface.
12535         (expand_java_field_op): Moved code to inline
12536         java.lang.PRIMTYPE.TYPE into a function.
12537         (build_primtype_type_ref): New function.
12538         * java-tree.def (INSTANCEOF_EXPR): New tree code.
12539         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
12540         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
12541         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
12542         (DECL_LOCAL_STATIC_VALUE): New macro.
12543         (build_invokeinterface, build_primtype_type_ref): New function
12544         prototypes.
12545         (java_parse_abort_on_error): Macro rewritten.
12546         * jcf-parse.c (current_method): Add comment to declaration.
12547         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
12548         Function prototypes fixed.
12549         (jcf_parse_source): push/pop parser context. save/restore global.
12550         (parse_source_file): Fixed leading comment. Now take a
12551         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
12552         classes and pop the parser context anymore.
12553         (yyparse): Push parser context, save globals, parse the source
12554         file, restore globals and pop the parser context when processing a
12555         source file.
12556         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
12557         * lex.c (java_parse_doc_section): New function.
12558         (java_lex): Call java_parse_doc_section when appropriate. Build an
12559         operator around INSTANCEOF_TK.
12560         * lex.h (java_lineterminator, java_sprint_unicode,
12561         java_unicode_2_utf8, java_lex_error, java_store_unicode):
12562         Prototypes rewritten.
12563         (java_parse_escape_sequence, java_letter_or_digit_p,
12564         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
12565         java_read_unicode, java_store_unicode, java_read_char,
12566         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
12567         Added function prototypes.
12568         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
12569         define.
12570         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
12571         New macros
12572         (struct parser_ctxt): New fields: deprecated,
12573         current_parsed_class_un, gclass_list.
12574         (fix_method_argument_names, issue_warning_error_from_context,
12575         resolve_package, lookup_package_type): New function prototypes.
12576         (resolve_expression_name): Fixed function prototype.
12577         (find_applicable_accessible_methods_list): Fixed indentation, added
12578         extra argument in prototype.
12579         (check_final_assignment, build_null_of_type, check_deprecation,
12580         check_method_redefinition, reset_method_name,
12581         java_check_regular_methods, java_check_abstract_methods,
12582         maybe_build_primttype_type_ref): New function prototype.
12583         * parse.y (conver.h): Include.
12584         (INSTANCEOF_TK): Tagged <operator>.
12585         (single_type_import_declaration): Use REGISTER_IMPORT macro.
12586         (relational_expression:): Build binop for instanceof.
12587         (java_push_parser_context): Remember ctxp->gclass_list across
12588         contexts.
12589         (java_pop_parser_context): Simply return if no context
12590         exists. Remember gclass_list across contexts.
12591         (issue_warning_error_from_context): New function.
12592         (parse_error_context): Don't setup ctxp->elc here. Call
12593         issue_warning_error_from_context instead.
12594         (parse_warning_context): Likewise.
12595         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
12596         setup. Link new class/interface to ctxp->gclass_list.
12597         (add_superinterfaces): Register interface as incomplete if not
12598         loaded.
12599         (create_class): Remember class unqualified name in
12600         ctxp->current_parsed_class_un. Check class deprecation.
12601         (register_fields): Check field deprecation. Remember static final
12602         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
12603         processing INIT.
12604         (method_header): New local variable ORIG_ARG. Use unqualified
12605         current class name for check on constructor errors. Promote return
12606         type if of record type. Argument list fix moved in
12607         fix_method_argument_names, called here. Check method deprecation.
12608         (fix_method_argument_names): New function.
12609         (method_declarator): Promote record typed arguments.
12610         (safe_layout_class): Check class methods before layout.
12611         (java_complete_class): Compute field layout when patched.
12612         (do_resolve_class): Try to load class after having it renamed
12613         after the package name.
12614         (get_printable_method_name): Use DECL_CONTEXT.
12615         (reset_method_name): New function.
12616         (check_method_redefinition): Use reset_method_name.
12617         (java_check_regular_methods): New local variable
12618         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
12619         names for error report. Check for compile-time error when method
12620         found has default (package) access.
12621         (java_check_abstract_methods): Now takes an interface DECL node as
12622         an argument. Also reinstall real name on unchecked
12623         overriding/hiding methods for error report.
12624         (java_check_methods): Fixed leading comment. Get classes to verify
12625         from ctxp->gclass_list. Use CHECK_METHODS macro and set
12626         CLASS_METHOD_CHECKED_P on class verification.
12627         (lookup_java_method2): Get real method name if necessary.
12628         (find_in_imports): Don't check package class access here.
12629         (resolve_package, lookup_package_type): New functions.
12630         (java_layout_classes): Fixed leading comment. Take classes to be
12631         laid out from ctxp->gclass_list.
12632         (java_complete_expand_methods): Don't expand native and abstract
12633         methods.
12634         (java_expand_classes): New function.
12635         (resolve_expression_name): Use additional argument ORIG.  Retrieve
12636         values of static final field of primitive types.
12637         (resolve_field_access): Handles static final field of promotive
12638         type.
12639         (resolve_qualified_expression_name): Handle STRING_CST as
12640         primaries and package name resolution. Check deprecation on found
12641         decls. Set where_found and type_found on non static field resolved
12642         during qualification. Layout non primitive field decl types.
12643         (check_deprecation): New function.
12644         (maybe_access_field): Simplified.
12645         (patch_method_invocation_stmt): Local variable CLASS_TYPE
12646         removed. Reverse method's argument when primary is a type. Don't
12647         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
12648         instead. Include abstract class in the list of class searchable
12649         for constructors. Use DECL_CONTEXT of found method for access
12650         checks. Check method deprecation.
12651         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
12652         converting arguments. Handle INVOKE_INTERFACE.
12653         (lookup_method_invoke): Search constructor using existing
12654         infrastructure (don't rely on lookup_java_constructor anymore).
12655         (find_applicable_accessible_methods_list): Extra argument flag
12656         LC. Now include constructor in the search.
12657         (qualify_ambiguous_name): Conditional expression are primaries.
12658         (not_initialized_as_it_should_p): static final are always
12659         initialized.
12660         (java_complete_tree): Pass extra NULL argument to
12661         resolve_expression_name. Stricter test to carry on patching
12662         assignments. New case for INSTANCEOF_EXPR.
12663         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
12664         (check_final_assignment, maybe_build_primttype_type_ref): New
12665         functions.
12666         (patch_assignment): Detect resolved static finals and carry normal
12667         assignment error check on them. Inline PRIMTYPE.TYPE read access.
12668         (try_builtin_assignconv): Access constant 0 on all primitive
12669         types.
12670         (valid_builtin_assignconv_identity_widening_p): Accept identical
12671         types. Accept all promoted type on int type.
12672         (valid_ref_assignconv_cast_p): Accept a null pointer to be
12673         assigned to a reference.
12674         (valid_method_invocation_conversion_p): Accept to check null
12675         pointers.
12676         (build_binop): Merge declaration and initialization of local
12677         variable BINOP.
12678         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
12679         numeric types. Improved validity test for qualify operators on
12680         references.
12681         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
12682         and PREINCREMENT_EXPR. Also detect resolved static finals of a
12683         primitive type and issue the appropriate error message.
12684         (resolve_type_during_patch): Mark class loaded when resolved.
12685         (patch_cast): Allow null to be cased to reference types.
12686         (build_null_of_type): New function.
12687         (patch_array_ref): Handle array on references correctly.
12688         (patch_return): Removed unused local variable MODIFY. Force
12689         boolean to be returned as integers. Allows null to be returned by
12690         a function returning a reference.
12691         * typeck.c (convert_to_integer, convert_to_real,
12692         convert_to_pointer): Prototypes moved to convert.h
12693         (lookup_argument_method): Use method real name, if necessary.
12694
12695 1998-10-30  Tom Tromey  <tromey@cygnus.com>
12696
12697         * class.c (build_class_ref): Changed name of primitive classes to
12698         start with `_Jv_'.
12699
12700         * class.c (make_class_data): Renamed fields: nmethods to
12701         method_count, method_count to dtable_method_count.  Always set
12702         `state' field to 0.
12703         * decl.c (init_decl_processing): Likewise.
12704
12705 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12706
12707         * class.c (layout_class): Don't mangle <finit>, produce
12708         __finit<class> instead. Don't verify artificial methods.
12709         * decl.c (finit_identifier_node): New declared global.
12710         (init_decl_processing): finit_identifier_node initialized.
12711         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
12712         * java-tree.h (finit_identifier_node): Declared as extern.
12713         (struct lang_decl): New field called_constructor.
12714         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
12715         (CLASS_HAS_FINIT_P): New macro.
12716         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
12717         explicit constructor invocation.
12718         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
12719         CALL_SUPER_CONSTRUCTOR_P): New macros.
12720         (write_classfile): Added prototype.
12721         * jcf-parse.c (jcf_parse_source): Parse and remember for
12722         generation if the file was seen on the command line.
12723         (parse_source_file): Don't write the class file here.
12724         (yyparse): Loop on files rewritten. Set current_jcf.
12725         (parse_zip_file_entries): Parse class file only if it was found.
12726         * lang.c (init_parse): Don't open command line provided filename
12727         here.
12728         (lang_parse): Don't set main_jcf anymore.
12729         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
12730         (JCONSTRUCTOR_CHECK): New macro.
12731         (JBSC_TYPE_P): New macro.
12732         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
12733         (COMPLETE_CHECK_OP_2): New macro.
12734         (struct parse_ctxt): New field explicit_constructor_p.
12735         (check_class_interface_creation): Fixed prototype indentation.
12736         (patch_method_invocation_stmt): Prototype reflects added argument.
12737         (patch_invoke): Likewise.
12738         (complete_method_declaration, build_super_invocation,
12739         verify_constructor_circularity,
12740         build_this_super_qualified_invocation, get_printable_method_name,
12741         patch_conditional_expr, maybe_generate_finit, fix_constructors,
12742         verify_constructor_super, create_artificial_method,
12743         start_artificial_method_body, end_artificial_method_body,
12744         generate_field_initialization_code): New function prototypes.
12745         * parse.y: Fixed leading comment
12746         (constructor_header:, constructor_body:, block_end:): Rules tagged
12747         <node>.
12748         (type_declaration:): Call maybe_generate_finit.
12749         (method_declaration:): Action for method_body: placed in new
12750         function complete_method_declaration, called here.
12751         (constructor_declaration:): Defined actions. Removed leading
12752         FIXME.
12753         (constructor_header:): New rule with action.
12754         (constructor_body:): Rule rewritten using block_begin: and
12755         block_end:. Defined actions.
12756         (constructor_declarator:, explicit_constructor_invocation:):
12757         Defined actions.
12758         (block:): Use new rules block_begin: block_end:.
12759         (block_begin:, block_end:): New rules and actions.
12760         (block_statements:): Fixed error message for explicit
12761         constructors.
12762         (method_invocation:): Call build_this_super_qualified_invocation
12763         if primary is `this' or `super' was seen.
12764         (conditional_expression:): Action defined.
12765         (extra_ctxp_pushed_p): New static global flag.
12766         (java_parser_context_save_global): Create parser context if
12767         necessary. Use extra_ctxp_pushed_p to remember it.
12768         (java_parser_context_restore_global): Pop extra parser context if
12769         one exists.
12770         (build_array_from_name): Array on primitive types are marked
12771         loaded.
12772         (register_fields): Restore new name in field initializer
12773         expression if type was altered. Non static fields initialized upon
12774         declaration marked initialized.
12775         (maybe_generate_finit): New function.
12776         (maybe_generate_clinit): Use create_artificial_method,
12777         start_artificial_method_body, end_artificial_method_body. Generate
12778         debug info for enclosed initialization statements.
12779         (method_header): Fixed leading comment. Check constructor
12780         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
12781         accordingly.
12782         (complete_method_declaration, constructor_circularity_msg,
12783         verify_constructor_circularity): New functions.
12784         (get_printable_method_name): New function.
12785         (check_method_redefinition): Don't rename <finit> methods. Fix
12786         declared constructor names. Error message for
12787         constructors modified.
12788         (java_check_regular_methods): Local variable seen_constructor
12789         renamed saw_constructor. Skip verification on constructors. Create
12790         default constructor with create_artificial_method.
12791         (java_check_methods): Removed unnecessary empty line.
12792         (create_artificial_method, start_artificial_method_body,
12793         end_artificial_method_body): New functions.
12794         (java_layout_classes): Changed leading comment. Reverse fields
12795         list if necessary. Always layout java.lang.Object if being
12796         defined.
12797         (java_complete_expand_methods): Verify constructor circularity.
12798         (java_complete_expand_method): Call fix_constructor on
12799         constructors.  Local variable no_ac_found removed. Restore
12800         bindings if method body expansion failed.
12801         (fix_constructors, verify_constructor_super,
12802         generate_field_initialization_code): New function.
12803         (java_expand_classes): Fixed leading comment. Write class file
12804         here.
12805         (resolve_expression_name): Check for illegal instance variable
12806         usage within the argument scope of an explicit constructor
12807         invocation.
12808         (resolve_qualified_expression_name): Pass extra from_super flag
12809         when invoking patch_method_invocation_stmt. New case for
12810         conditional expression when used as a primary. Check for error
12811         when acquiring super.
12812         (patch_method_invocation_stmt): Added extra argument super. New
12813         local variable is_static_flag. Set class_to_search according to
12814         the nature of the constructor invocation. Don't add `this'
12815         argument when expanding NEW_CLASS_EXPR. Check for illegal method
12816         invocation within the argument scope of explicit constructor
12817         invocation. Set is_static according to is_static_flag. Provide
12818         extra `super' argument to patch_invoke invocation.
12819         (patch_invoke): New argument from_super. Loop on arguments
12820         indentation fixed. Pass from_super to invocation_mode. New switch
12821         case INVOKE_SUPER. Fixed error message in switch default case.
12822         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
12823         value.
12824         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
12825         (lookup_method_invoke): Fixed prototypes in candidates list. Error
12826         message takes constructors into account.
12827         (find_applicable_accessible_methods_list): Fixed indentation.
12828         (qualify_ambiguous_name): Take explicit constructor invocation
12829         into account. Deal with a conditional expression as a primary to
12830         a method call.
12831         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
12832         case. Added extra argument to patch_method_invocation_stmt.
12833         Register calls made to explicit constructor `this'. Don't call
12834         save_expr in ARRAY_REF case when emitting class files. Check for
12835         illegal use of this when expanding explicit constructor invocation
12836         arguments.
12837         (complete_function_arguments): Set and reset parser context
12838         explicit_constructor_p field value when appropriate.
12839         (build_super_invocation, build_this_super_qualified_invocation):
12840         New functions.
12841         (patch_assignment): Fixed typo.
12842         (patch_unaryop): Check on final fields occurs only when a decl
12843         exits.
12844         (patch_return): Take constructors into account.
12845         (patch_conditional_expr): New function.
12846         * typeck.c (build_java_signature): Removed unnecessary empty line.
12847
12848 1998-10-28  Jeffrey A Law  (law@cygnus.com)
12849
12850         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
12851
12852 1998-10-28  Tom Tromey  <tromey@cygnus.com>
12853
12854         * decl.c (init_decl_processing): Renamed fields.
12855         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
12856         interface_len, msize fields.
12857
12858         * class.c (make_class_data): Removed subclass_head and
12859         subclass_next fields.
12860         * decl.c (init_decl_processing): Removed subclass_head and
12861         subclass_next fields.
12862
12863 1998-10-28  Jeffrey A Law  (law@cygnus.com)
12864
12865         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
12866         * mangle.c (emit_unicode_mangled_name): Similarly.
12867
12868 1998-10-26  Nick Clifton  <nickc@cygnus.com>
12869
12870         * jcf-parse.c (get_constant): Place braces around code to compute
12871         'd' when REAL_ARITHMETIC is not defined.
12872
12873 1998-10-25  H.J. Lu  (hjl@gnu.org)
12874
12875         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
12876         dependency.
12877
12878 1998-10-23  Tom Tromey  <tromey@cygnus.com>
12879
12880         * lang-specs.h: `.zip' files are input to jc1.
12881
12882 1998-10-22  Per Bothner  <bothner@cygnus.com>
12883
12884         * jvspecs.c:  Add (but don't enable) support for combining multiple
12885         .class and .java input filenames to a single jc1 invocation.
12886         Add support for -C flag (copile to .class files).
12887         Translate -classpath and -CLASSPATH arguments.
12888         * lang-specs.h:  Don't set %2 spec.
12889
12890 1998-10-22  Tom Tromey  <tromey@cygnus.com>
12891
12892         * jcf-path.c (add_entry): Don't add trailing separator if entry is
12893         a .zip file.
12894         (add_path): Don't add trailing separator to non-empty path
12895         elements.
12896
12897         * lang.c (lang_decode_option): Check for -fclasspath and
12898         -fCLASSPATH before examining other `-f' options.
12899
12900         * java-tree.h (finalize_identifier_node): Don't declare.
12901         * class.c (make_class_data): Don't push "final" field.
12902         * decl.c (init_decl_processing): Don't push "final" field.
12903         (finalize_identifier_node): Removed.
12904         (init_decl_processing): Don't set finalize_identifier_node.
12905
12906         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
12907
12908 1998-10-11  Anthony Green  <green@cygnus.com>
12909
12910         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
12911         (JV_SCAN_SOURCES): New macro.
12912         (JCF_DUMP_SOURCES): Likewise.
12913         (jcf-dump$(exeext)): New target.
12914         (jv-scan$(exeext)): New target.
12915
12916 1998-10-22  Tom Tromey  <tromey@cygnus.com>
12917
12918         * Makefile.in (LEX): Removed.
12919         (LEXFLAGS): Likewise.
12920         (SET_BISON): New macro.
12921         (BISON): Removed.
12922         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
12923         spurious diffs in parse.c.
12924         ($(PARSE_SCAN_C)): Likewise.
12925         (PARSE_DIR): New macro.
12926         (PARSE_C): Use it.
12927         (PARSE_SCAN_C): Likewise.
12928         (PARSE_RELDIR): New macro.
12929
12930         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
12931
12932         * jcf-io.c (find_class): Use saw_java_source to determine when to
12933         look for `.java' file.
12934         * jcf-parse.c (saw_java_source): New global.
12935         (yyparse): Set it if `.java' file seen.
12936
12937         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
12938         (GCJH_SOURCES): Likewise.
12939         * Makefile.in (datadir): New macro.
12940         (libjava_zip): Likewise.
12941         (JAVA_OBJS): Added jcf-path.o.
12942         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
12943         (../gcjh$(exeext)): Likewise.
12944         (jcf-path.o): New target.
12945         * java-tree.h (fix_classpath): Removed decl.
12946         * jcf-parse.c (fix_classpath): Removed.
12947         (load_class): Don't call fix_classpath.
12948         * parse.y (read_import_dir): Don't call fix_classpath.
12949         * lex.h: Don't mention classpath.
12950         * lex.c (java_init_lex): Don't initialize classpath.
12951         * jcf-io.c (classpath): Removed global.
12952         (find_class): Use jcf_path iteration functions.  Correctly search
12953         class path for .java file.
12954         (open_in_zip): New argument `is_system'.
12955         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
12956         classpath-related options.
12957         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
12958         and -I.
12959         (lang_init): Call jcf_path_init.
12960         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
12961         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
12962         Correctly put braces around second string in each entry.
12963         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
12964         classpath-related options.
12965         (help): Updated for new options.
12966         * jcf.h: Declare functions from jcf-path.c.  Don't mention
12967         `classpath' global.
12968         * jcf-path.c: New file.
12969
12970         * jcf-depend.c: Include jcf.h.
12971
12972         * jcf-write.c (localvar_alloc): Returns `void'.
12973         (localvar_free): Removed unused variable.
12974
12975         * lang.c (OBJECT_SUFFIX): Define if not already defined.
12976         (init_parse): Use OBJECT_SUFFIX, not ".o".
12977
12978 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12979
12980         * class.c (emit_register_classes): Renamed from
12981         emit_register_class.
12982         * java-tree.h (emit_register_classes): Prototype renamed from
12983         emit_register_class.
12984         * jcf-parse.c (yyparse): Call emit_register_classes once before
12985         returning.
12986         * parse.y (java_expand_classes): No longer register classes.
12987
12988 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12989
12990         * class.c (is_compiled_class): New local variable
12991         seen_in_zip. Identify classes found in currently compiled source
12992         file(s).
12993         * decl.c (complete_start_java_method): Fixed typo.
12994         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
12995         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
12996         (CLASS_P): Moved around.
12997         (java_parse_abort_on_error): Macro moved from jcf-parse.c
12998         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
12999         java-parse.h
13000         (jcf_parse_source): Changed leading comment. Removed unnecessary
13001         fclose and CLASS_FROM_SOURCE_P marking.
13002         (parse_source_file): New local variables remember_for_generation
13003         and filename. Mark parsed file name identifier node. Removed block
13004         executed when parse_only was null. Set remember_for_generation.
13005         Use it as an argument to java_pop_parser_context.
13006         (yyparse): New local variables several_files, list, next node and
13007         current_file_list. Split ampersand separated file names into
13008         current_file_list. Iterate through the list and parse accordingly.
13009         * parse.h (java_pop_parser_context): New function prototype.
13010         * parse.y (ctxp_for_generation): New static global variable.
13011         (java_pop_parser_context): New argument generate. Link popped ctxp
13012         to ctxp_for_generation list accordingly.
13013         (java_complete_expand_methods): Fixed indentation.
13014         (java_expand_classes): New function.
13015
13016 1998-10-17  Per Bothner  <bothner@cygnus.com>
13017
13018         * Makefile.in:  Link with libiberty.a instead of memmove.o.
13019
13020 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13021
13022         * lex.c (setjmp.h): No longer included.
13023         * lex.h (setjmp.h): Included.
13024         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13025         (duplicate_declaration_error_p): Renamed from
13026         duplicate_declaration_error.
13027         (build_array_from_name): New function prototype.
13028         * parse.y (setjmp.h): No longer included.
13029         (variable_declarator_id): Define action.
13030         (build_array_from_name): New function.
13031         (duplicate_declaration_error_p): Renamed from
13032         duplicate_declaration_error.  Fixed leading comment.
13033         (register_fields): Main `for' loop reorganized. Uses
13034         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13035         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13036         build_array_from_name.
13037         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13038         types.
13039         (read_import_dir): Don't try to skip `.' and `..'.
13040         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13041         build_array_from_name. Main `for' loop reorganized.
13042         (resolve_qualified_expression_name): When building access to a
13043         field, use the type where the field was found, not its own type.
13044         (maybe_access_field): Use field DECL_CONTEXT if the type where the
13045         field was found is null.
13046         (qualify_ambiguous_name): Sweep through all successive array
13047         dimensions.
13048
13049 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13050
13051         * java-tree.h (pop_labeled_block, lang_printable_name,
13052         maybe_add_interface, set_super_info, get_access_flags_from_decl,
13053         interface_of_p, inherits_from_p, fix_classpath,
13054         complete_start_java_method, emit_handlers, init_outgoing_cpool,
13055         make_class_data, register_class, alloc_name_constant): New
13056         function prototypes.
13057         * lang.c (lang_decode_option): Set argc argument unused. Fixed
13058         indentation. Added cast to remove warning.
13059         (lang_printable_name): Set v argument unused.
13060         (lang_print_error): Added argument to lang_printable_name call.
13061         (java_dummy_print, print_lang_decl, print_lang_type,
13062         print_lang_identifier, lang_print_xnode): All argument marked
13063         unused.
13064         * lex.c (java_unget_unicode): Removed unnecessary argument.
13065         (java_allocate_new_line): Unused local variable is gone.
13066         (java_read_char): Added parenthesis in expressions to remove
13067         warnings.  Added final return statement.
13068         (java_read_unicode): Added parenthesis in expression to remove
13069         warning.
13070         (java_parse_end_comment): Fixed java_unget_unicode invocation.
13071         (java_parse_escape_sequence): Likewise.
13072         (java_lex): Unused local variables are gone. Fixed
13073         java_unget_unicode invocation.
13074         * lex.h (set_float_handler): Prototype added when JC1_LITE not
13075         defined.
13076         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13077         lang_printable_name invocation in macro.
13078         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13079         Likewise.
13080         (duplicate_declaration_error): Suppressed unused argument in
13081         prototype.
13082         (identical_subpath_p): Function declaration is gone.
13083         (patch_invoke): Suppressed unused argument in prototype.
13084         (patch_cast, build_labeled_block, check_thrown_exceptions):
13085         Likewise.
13086         * parse.y (setjmp.h): Included
13087         (toplev.h): Likewise.
13088         (field_declaration:): Suppressed unused local
13089         (label_decl:): Fixed build_labeled_block invocation.
13090         (java_pop_parser_context): Put extra parenthesis around assignment
13091         in if.
13092         (yyerror): Suppressed unused local variables.
13093         (variable_redefinition_error): Fixed lang_printable_name
13094         invocation.
13095         (create_interface): Suppressed unused local variables.
13096         (create_class): Likewise.
13097         (duplicate_declaration_error): Suppressed unused argument. Fixed
13098         lang_printable_name invocation.
13099         (register_fields): Suppressed unused local variable. Fixed
13100         duplicate_declaration_error invocation.
13101         (method_header): Suppressed unused local variable.
13102         (method_declarator, parser_check_super): Likewise.
13103         (java_complete_class): Suppressed unused local variable. Fixed
13104         fatal error message.
13105         (complete_class_report_errors): Added default: in switch.
13106         (java_check_regular_methods): Fixed lang_printable_name
13107         invocations.
13108         (check_throws_clauses): Likewise.
13109         (java_check_abstract_methods): Suppressed unused local
13110         variable. Fixed lang_printable_name invocation.
13111         (read_import_entry): Added supplemental return statement.
13112         (read_import_dir): Suppressed unused local variables.
13113         (check_pkg_class_access, declare_local_variables): Likewise.
13114         (source_start_java_method): Suppressed unused extern variable
13115         declarations
13116         (expand_start_java_method): Suppressed unused extern and local
13117         variable declarations.
13118         (java_complete_expand_methods): Likewise.
13119         (java_complete_expand_method): Suppressed unused local variables.
13120         (make_qualified_name): Likewise.
13121         (resolve_qualified_expression_name): Added default: in
13122         switch. Fixed lang_printable_name invocation.
13123         (class_instance_creation_expression): Added parenthesis around
13124         expressions.
13125         (patch_method_invocation_stmt): Fixed lang_printable_name and
13126         patch_invoke invocations.
13127         (check_for_static_method_reference): Fixed lang_printable_name
13128         invocation.
13129         (patch_invoke): Suppressed unused arguments and local variables.
13130         (lookup_method_invoke): Suppressed unused local variables.
13131         (qualify_ambiguous_name): Added default: in switch.
13132         (identical_subpath_p): Function removed.
13133         (patch_assignment): Suppressed unused local variables. Suppressed
13134         unnecessary if statement. Fixed lang_printable_name invocations.
13135         (try_builtin_assignconv): Fixed lang_printable_name invocations.
13136         (valid_ref_assignconv_cast_p): Parenthesis around
13137         expression. Suppressed unused local variables.
13138         (build_binop): Suppressed unused local variables. fixed
13139         lang_printable_name invocations.
13140         (string_constant_concatenation): Suppressed unused local
13141         variables.
13142         (patch_unaryop): Fixed lang_printable_name invocation.
13143         (patch_cast): Suppressed unnecessary argument. Fixed
13144         lang_printable_name invocation.
13145         (patch_array_ref): Fixed lang_printable_name invocation.
13146         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13147         (build_labeled_block): Suppressed unused argument.
13148         (generate_labeled_block): Fixed build_labeled_block invocation.
13149         (build_loop_body): Suppressed unused local variables.
13150         (patch_loop_statement): Likewise.
13151         (patch_exit): Fixed lang_printable_name invocation.
13152         (patch_switch_statement): Likewise.
13153         (case_identity): First argument marked unused.
13154         (patch_try_statement): Fixed lang_printable_name invocations.
13155         (patch_synchronized_statement, patch_throw_statement): Likewise.
13156         (check_thrown_exceptions): Fixed check_thrown_exceptions and
13157         lang_printable_name invocations.
13158         (check_thrown_exceptions_do): Suppressed unused argument.
13159
13160 1998-10-14  Tom Tromey  <tromey@cygnus.com>
13161
13162         * jcf-write.c (write_classfile): Add output class file as target.
13163         * lang-options.h: Added -MD, -MMD, -M, and -MM.
13164         * jcf.h: Added declarations for dependency-tracking functions.
13165         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13166         * lang.c (lang_decode_option): Recognize -MD and -MMD.
13167         (finish_parse): Call jcf_dependency_write.
13168         (dependency_tracking): New global.
13169         (DEPEND_SET_FILE): New define.
13170         (DEPEND_ENABLE): New define.
13171         (init_parse): Enable dependency tracking if required.
13172         Include "flags.h".
13173         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13174         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13175         (../gcjh$(exeext)): Likewise.
13176         (jcf-depend.o): New target.
13177         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13178         (GCJH_SOURCES): Likewise.
13179         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
13180         dep_name argument.
13181         (find_classfile): Added dep_name argument.
13182         (find_class): Compute name of dependency.
13183         (open_in_zip): Call jcf_dependency_add_file.
13184         * gjavah.c (output_file): No longer global.
13185         (usage): Don't mention "gjavah".
13186         (help): Likewise.
13187         (java_no_argument): Likewise.
13188         (version): Likewise.
13189         (main): Recognize and handle -M family of options.
13190         (print_mangled_classname): Return is void.
13191         (process_file): Handle case where output is suppressed.
13192         (HANDLE_END_FIELD): Likewise.
13193         (HANDLE_METHOD): Likewise.
13194         * jcf-depend.c: New file.
13195
13196 1998-10-13  Jeffrey A Law  (law@cygnus.com)
13197
13198         * java-tree.def: Add missing newline at EOF.
13199
13200 1998-10-13  Tom Tromey  <tromey@cygnus.com>
13201
13202         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13203         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
13204         function.
13205         Include <config.h> and "system.h".
13206         (disassemble_method): Undefine RET to avoid clash with
13207         config/i386/i386.h.
13208
13209 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13210
13211         * decl.c (runtime_exception_type_node, error_exception_type_node):
13212         New global variables.
13213         (init_decl_processing): Initialized.
13214         * expr.c (java_lang_expand_expr): Set caught exception type to
13215         null if catch handler argument doesn't exit.
13216         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13217         tree codes.
13218         * java-tree.h (runtime_exception_type_node,
13219         error_exception_type_node): Global variables declared.
13220         (DECL_FUNCTION_THROWS): New macro.
13221         (DECL_FUNCTION_BODY): Modified comment.
13222         (DECL_SPECIFIC_COUNT): Likewise.
13223         (struct lang_decl): New field throws_list.
13224         (IS_UNCHECKED_EXPRESSION_P): New macro.
13225         * lex.c (java_lex): Generate location information for THROW_TK.
13226         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13227         EXCEPTIONS_P): New macros.
13228         (enum jdep_code): New value JDEP_EXCEPTION.
13229         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13230         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13231         PATCH_METHOD_RETURN_ERROR): New macros.
13232         (patch_method_invocation_stmt): Added new argument to prototype.
13233         (patch_synchronized_statement, patch_throw_statement,
13234         check_thrown_exceptions, check_thrown_exceptions_do,
13235         purge_unchecked_exceptions, check_throws_clauses): New function
13236         prototypes.
13237         * parse.y Fixed typo in keyword section.
13238         (throw:): Rule tagged <node>.
13239         (THROW_TK): Keyword tagged <operator>.
13240         (method_header:): Last argument to call to method_header passed
13241         from throws: rule.
13242         (throws:, class_type_list:, throw_statement:,
13243         synchronized_statement:, synchronized:): Defined actions.
13244         (method_header): New local variable current. Register exceptions
13245         from throws clause.
13246         (java_complete_tree): Complete and verify exceptions from throws
13247         clause.
13248         (complete_class_report_errors): Error message on exceptions not
13249         found
13250         (java_check_regular_methods): Fixed typo. Shortcut on private
13251         overriding methods. Changed error message on method
13252         redefinition. Check for throws clause compatibility.
13253         (check_throws_clauses): New function.
13254         (java_check_abstract_methods): Use DECL_NAME for wfl or current
13255         method. Changed error message on method redefinition.
13256         (currently_caught_type_list): New static variable.
13257         (java_complete_expand_methods): Purge unchecked exceptions from
13258         throws clause list. Call PUSH_EXCEPTIONS before walk and
13259         POP_EXCEPTIONS after.
13260         (resolve_qualified_expression_name): Pass new argument as NULL to
13261         patch_method_invocation_stmt.
13262         (patch_method_invocation_stmt): New argument ref_decl. Invoke
13263         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13264         argument list when appropriate. Use new argument if non null to
13265         store selected method decl.
13266         (patch_invoke): Convert if necessary args of builtin types before
13267         forming CALL_EXPR. Argument list no longer reversed here.
13268         (invocation_mode): Treat final methods as static methods.
13269         (java_complete_tree): New cases for THROW_EXPR: and
13270         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13271         function call.
13272         (complete_function_arguments): No more RECORD_TYPE
13273         conversion. Function parameter nodes no longer saved.
13274         (valid_ref_assignconv_cast_p): Avoid handling null type.
13275         (patch_binop): Fixed null constant reference handling.
13276         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13277         BUILD_THROW macros.
13278         (patch_try_statement): Fixed comments. Record caught types in
13279         list, push the list, expand try block and pop the list.
13280         (patch_synchronized_statement, patch_throw_statement,
13281         check_thrown_exceptions, check_thrown_exceptions_do,
13282         purge_unchecked_exceptions): New functions.
13283         * typeck.c (lookup_argument_method): Allow WFL in place of method
13284         DECL_NAME during method definition check
13285
13286 1998-10-09  Tom Tromey  <tromey@cygnus.com>
13287
13288         * gjavah.c (decode_signature_piece): New function.
13289         (print_c_decl): Use it.  Added `name_override' argument.
13290         (print_method_info): Use name_override argument to print_c_decl.
13291         (seen_fields): Removed.
13292         (print_field_info): Don't update seen_fields.
13293         (struct method_name): New structure.
13294         (method_name_list): New global.
13295         (print_method_info): Add new method to list of methods.
13296         (name_is_method_p): New function.
13297         (print_field_info): If field name has same name as method, then
13298         change field name.
13299         (process_file): Parse methods before fields.
13300         (field_pass): New global.
13301         (HANDLE_END_FIELD): Take field_pass into account.
13302
13303 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13304
13305         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13306         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13307
13308 1998-10-03  Anthony Green  <green@cygnus.com>
13309
13310         * jvspec.c: Fix bug in jvgenmain_spec patch.
13311
13312 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13313
13314         * Makefile.in (lang.o:): Install dependency on java-tree.def.
13315         * decl.c (soft_exceptioninfo_call_node): New global variable.
13316         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13317         takes extra integer argument. soft_exceptioninfo_call_node
13318         initialized.
13319         * except.c (java_set_exception_lang_code): New function
13320         (method_init_exceptions): Called here.
13321         (prepare_eh_table_type): New function.
13322         (expand_end_java_handler): Called here.
13323         * expr.c (build_java_throw_out_of_bounds_exception): Now features
13324         one argument. Modified generation of call to
13325         soft_badarrayindex_node to use new argument.
13326         (build_java_arrayaccess): Pass faulty index value to
13327         build_java_throw_out_of_bounds_exception.
13328         (generate_name): New function.
13329         (java_lang_expand_expr): New local variables node, current,
13330         has_finally_p. Expand TRY_EXPR node.
13331         (process_jvm_instruction): Replace top of the stack with thrown
13332         object reference when entering exception handler.
13333         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13334         specific tree codes.
13335         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13336         global.
13337         (DECL_SPECIFIC_COUNT): New macro.
13338         (prepare_eh_table_type, java_set_exception_lang_code,
13339         generate_name): New function declarations.
13340         (match_java_method): Declaration deleted.
13341         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13342         macros.
13343         * lex.c (TRY_TK, CATCH_TK): Generate location information.
13344         * parse.h (redefinition_error, refine_accessible_methods_list,
13345         can_cast_to_p): Function declaration removed.
13346         (classitf_redefinition_error, variable_redefinition_error,
13347         parse_jdk1_1_error, find_applicable_accessible_methods_list,
13348         find_most_specific_methods_list, argument_types_convertible,
13349         enter_a_block, valid_builtin_assignconv_identity_widening_p,
13350         valid_cast_to_p, valid_method_invocation_conversion_p,
13351         try_reference_assignconv, add_stmt_to_compound,
13352         build_jump_to_finally, build_tree_list, patch_try_statement,
13353         java_get_catch_block): New function declarations.
13354         * parse.y (string_buffer_type): Global variable deleted.
13355         (group_of_labels, catches, catch_clause, catch_clause_parameter,
13356         finally): Rules tagged <node>.
13357         (TRY_TK, CATCH_TK): Token tagged <operator>.
13358         (class_body_declaration:, class_member_declaration:,
13359         formal_parameter:, explicit_constructor_invocation:,
13360         interface_member_declaration:, constant_declaration:,
13361         primary_no_new_array:, class_instance_creation_expression:,
13362         array_creation_expression:): Issue error on unsuported JDK1.1
13363         features.
13364         (try_statement:, catches:, finally:): Define actions.
13365         (catch_clause_parameter): New rule.
13366         (catch_clause:): Use new rule catch_clause_parameter.
13367         (parse_jdk1_1_error): New function.
13368         (redefinition_error): Renamed classitf_redefinition_error.
13369         (variable_redefinition_error): New function.
13370         (check_class_interface_creation): Call
13371         classitf_redefinition_error.
13372         (java_complete_tree): Added error message on JDEP_TYPE: case.
13373         (complete_class_report_errors): Fixed indentation.
13374         (declare_local_variables): Call variable_redefinition_error.
13375         (source_end_java_method): Call java_set_exception_lang_code and
13376         emit_handlers where appropriate.
13377         (java_method_add_stmt): Call add_stmt_to_block.
13378         (add_stmt_to_block): New function.
13379         (lookup_method_invoke): Fixed outside comment. new local variable
13380         candicates.  Call find_applicable_accessible_methods_list and
13381         find_most_specific_methods_list when searching for a
13382         method. Modified error report to list possible candidates when
13383         applicable.
13384         (find_applicable_accessible_methods_list,
13385         find_most_specific_methods_list, argument_types_convertible): New
13386         function.
13387         (refine_accessible_methods_list): Function deleted.
13388         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
13389         expr (if applicable) before calling patch_array_ref.
13390         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
13391         (enter_block): Fixed comment.
13392         (enter_a_block): New function.
13393         (patch_assignment): Reorganized. Call try_reference_assignconv for
13394         references. Call valid_cast_to_p instead of can_cast_to_p.
13395         (try_reference_assignconv,
13396         valid_builtin_assignconv_identity_widening_p): New functions.
13397         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
13398         (valid_cast_to_p, valid_method_invocation_conversion_p): New
13399         functions.
13400         (build_string_concatenation): Don't resolve StringBuffer.
13401         (patch_cast): Fixed inverted arguments.
13402         (patch_array_ref): Code to save array expr deleted. Call
13403         valid_cast_to_p instead of can_cast_to_p.
13404         (generate_labeled_block): Call generate_name.
13405         (build_jump_to_finally, build_try_statement, java_get_catch_block,
13406         patch_try_statement): New functions.
13407         * typeck.c (match_java_method): Function deleted.
13408
13409 1998-10-02  Anthony Green  <green@cygnus.com>
13410
13411         * jvspec.c: jvgenmain_spec uses different temporary file names.
13412
13413 1998-10-02  Anthony Green  <green@cygnus.com>
13414
13415         * jvspec.c (lang_specific_driver): Fail if user specifies
13416         --main= when not linking.
13417
13418 1998-09-28  Tom Tromey  <tromey@cygnus.com>
13419
13420         * class.c (make_class_data): Push value for `thread' field.
13421         * decl.c (init_decl_processing): Added `thread' field to class.
13422
13423         * class.c (add_field): Always make static fields externally
13424         visible.
13425
13426 1998-09-26  Anthony Green  <green@cygnus.com>
13427
13428         * expr.c (build_java_athrow,
13429         build_java_throw_out_of_bounds_exception, expand_invoke,
13430         build_newarray, expand_java_multianewarray, build_java_monitor):
13431         Update comments to reflect _Jv_* function names.
13432
13433 1998-09-25  Per Bothner  <bothner@cygnus.com>
13434
13435         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
13436         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
13437         * parse.y (expand_start_java_method):  Likewise.
13438
13439 1998-09-24  Per Bothner  <bothner@cygnus.com>
13440
13441         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
13442
13443         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
13444         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
13445         * expr.c:  Remove no-longer-needed calls to promote_type.
13446         * decl.c (give_name_to_locals):  Liekwise.
13447         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
13448         * parse.y:  Add/remove promote_type calls as appropriate.
13449         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
13450         (parse_signature_string):  Likewise.
13451         (build_java_array_type):  Fix for now signature convenions.
13452
13453         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
13454
13455 1998-09-23  Tom Tromey  <tromey@cygnus.com>
13456
13457         * class.c (init_class_processing): libjava function renamed to
13458         _Jv_RegisterClass.
13459
13460 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13461
13462         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
13463         * java-tree.def: Fixed DEFTREECODE third argument.
13464         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
13465         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
13466         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
13467         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13468         JAVA_THIS_EXPR): Now replaced by tree code definitions.
13469         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
13470         * lang.c (java_tree_code_type, java_tree_code_length,
13471         java_tree_code_name): New arrays.
13472         (lang_init): Append Java tree node definitions to Gcc ones.
13473         * lex.c (expression_obstack): Declared as extern when JC1_LITE
13474         defined.
13475         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
13476         wfl_to_string.
13477         (java_lex): Allow declaration of empty string constants. Retain
13478         location information on CASE_TK and DEFAULT_TK.
13479         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
13480         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
13481         Modified to be more robust.
13482         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
13483         (build_new_invocation, try_builtin_assignconv,
13484         patch_switch_statement, string_constant_concatenation,
13485         build_string_concatenation, patch_string_cst, patch_string,
13486         java_expand_switch): New function declarations.
13487         * parse.y: Rules related to switch and EH tagged <node>.
13488         (label_id): Set to NULL_TREE
13489         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
13490         tree nodes.
13491         (this_or_super:): Fixed indentation.
13492         (statement:, statement_nsi:, statement_without_trailing_substatement:,
13493         statement_expression:): Removed call to RULE on all sub-rules.
13494         (switch_expression:, switch_labels:): New rules.
13495         (switch_statement:, switch_block:, switch_block_statement_groups:,
13496         switch_block_statement_group:, switch_labels:, switch_label:):
13497         Defined actions.
13498         (throw_statement:, synchronized_statement:, try_statement:):
13499         Defined temporary actions.
13500         (class_instance_creation_expression:): Call
13501         build_new_invocation. Fixed indentation.
13502         (field_access): Fixed indentation.
13503         (method_invocation): Likewise.
13504         (make_qualified_primary): Use THIS_EXPR.
13505         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
13506         resolving from SUPER, set *type_found.
13507         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
13508         (java_complete_tree): Removed unused local variable `location'. Case
13509         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
13510         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
13511         on MODIFY_EXPR: and all binary operator tree code cases. Removed
13512         STRING_CST: case. default: checks for patchable strings.
13513         (complete_function_arguments): Transform string constant or
13514         crafted StringBuffer if necessary.
13515         (build_method_invocation): Fixed comments.
13516         (build_new_invocation): New function.
13517         (patch_assignment): Call try_builtin_assignconv to figure a valid
13518         assignment conversion between builtin types.
13519         (try_builtin_assignconv): New function.
13520         (build_binop): Use URSHIFT_EXPR directly to call build.
13521         (operator_string): Use UNARY_PLUS_EXPR.
13522         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
13523         operator.
13524         (do_merge_string_cste, merge_string_cste,
13525         string_constant_concatenation, build_string_concatenation,
13526         patch_string, patch_string_cst): New function.
13527         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
13528         (patch_unaryop): Likewise. New test of valid ++/-- operands.
13529         (build_newarray_node): Use NEW_ARRAY_EXPR.
13530         (build_this): Use THIS_EXPR.
13531         (build_return): Enable debug information on return statement.
13532         (build_if_else_statement): Likewise.
13533         (complete_labeled_statement): Fixed related comment.
13534         (build_loop_body): Fixed comment.
13535         (build_bc_statement): Enable debug information on break/continue
13536         statements.
13537         (patch_bc_statement): Fixed typos. Handle SWITCH statement
13538         context.
13539         (patch_switch_statement, case_identity, java_expand_switch): New
13540         functions.
13541
13542 1998-09-21  Per Bothner  <bothner@cygnus.com>
13543
13544         * buffer.h (BUFFER_INIT):  New macro.
13545         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
13546         Pass (struct jcf_partial *state) to most functions.
13547         (jcf_block, jcf_relocation):  New types.
13548         Support labels, branches, conditionals, loops.
13549
13550 1998-09-21  Tom Tromey  <tromey@cygnus.com>
13551
13552         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
13553
13554 1998-09-21  Per Bothner  <bothner@cygnus.com>
13555
13556         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
13557         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
13558         not integer_type_node (INT_TYPE_SIZ bits).
13559
13560         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
13561
13562         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
13563         * jcf-dump.c (print_exception_table):  New function.
13564         (disassemble_method):  Better handling of wide instructions.
13565         Make more robust for bad input.
13566
13567 1998-09-30  Jeffrey A Law  (law@cygnus.com)
13568
13569         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
13570         FreeBSD.
13571
13572 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13573
13574         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
13575
13576 1998-09-17  Tom Tromey  <tromey@cygnus.com>
13577
13578         * Makefile.in ($(PARSE_H)): Removed target.
13579
13580 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13581
13582         * Makefile.in (JAVA_OBJS): Add memmove.o
13583         (memmove.o): New target & rules.
13584
13585 1998-09-15  Tom Tromey  <tromey@cygnus.com>
13586
13587         * expr.c (expand_invoke): Don't generate a call to the class init
13588         code.
13589
13590 1998-09-14  Jeffrey A Law  (law@cygnus.com)
13591
13592         * Makefile.in: Add many missing dependencies.
13593         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
13594         as appropriate.
13595         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
13596         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
13597
13598 1998-09-11  Per Bothner  <bothner@cygnus.com>
13599
13600         * decl.c (complete_start_java_method):  If method is static (and
13601         not private) call _Jv_InitClass.
13602         * expr.c (expand_invoke):  Don't call build_class_init.
13603
13604         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
13605
13606 1998-09-10  Jeffrey A Law  (law@cygnus.com)
13607
13608         * Make-lang.in (GCJ): Define before using.
13609
13610 1998-09-09  Jeffrey A Law  (law@cygnus.com)
13611
13612         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
13613         losing due to namespace pollution in GNU getopt.h
13614
13615 1998-09-09  Tom Tromey  <tromey@cygnus.com>
13616
13617         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
13618         (java.all.cross): Likewise.
13619         (java.rest.encap): Likewise.
13620
13621 1998-09-08  Jeffrey A Law  (law@cygnus.com)
13622
13623         * gjavah.c (print_class_decls): Fix thinko in arglist
13624         * jcv-io.c (find_classfile): Similarly.
13625
13626 1998-09-07  Jeffrey A Law  (law@cygnus.com)
13627
13628         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
13629
13630 1998-09-05  Tom Tromey  <tromey@cygnus.com>
13631
13632         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
13633         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
13634         * Makefile.in (PARSE_C): New macro.
13635         (PARSE_H): Likewise.
13636         (PARSE_SCAN_C): Likewise.
13637         ($(PARSE_C)): Target renamed from parse.c.
13638         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
13639         (clean): Remove parse-scan.c as well.
13640         (parse.o): Depend on $(PARSE_C).
13641
13642 1998-09-05  Anthony Green  <green@cygnus.com>
13643
13644         * README, license.terms: Removed.
13645
13646         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
13647         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
13648         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
13649         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
13650         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
13651         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
13652         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
13653         and Java trademark attribution.
13654
13655 1998-09-04  Tom Tromey  <tromey@cygnus.com>
13656
13657         * Makefile.in: Use gcjh, not gjavah.
13658         * config-lang.in (stagestuff): Use gcjh, not gjavah.
13659         * Make-lang.in: Changed gjavah to gcjh everywhere.
13660
13661 1998-09-03  Per Bothner  <bothner@cygnus.com>
13662
13663         * gjavah.c:  Support new -prepend -add -append flags.
13664         (print_method_info):  Method is not virtual if class is final.
13665
13666 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13667
13668         * jv-scan.c: Fixed copyright assignment.
13669         * keyword.gperf: Likewise.
13670         * keyword.h: Likewise.
13671         * lex.c: Fixed copyright assignment.
13672         (java_lex): Push unicode back when parsing '<'.
13673         * lex.h: Fixed copyright assignment.
13674         * parse-scan.y: Likewise.
13675         * parse.h: Fixed copyright assignment.
13676         (build_debugable_stmt, complete_for_loop): New function prototypes.
13677         * parse.y: Fixed copyright assignment.
13678         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
13679         size_zero_node when completing a loop with no exit condition.
13680         (for_statement_nsi:): Define action.
13681         (for_init:, for_update:): Return size_zero_node when empty.
13682         (declare_local_variables): Call build_debugable_stmt.
13683         (build_debugable_stmt): New function.
13684         (build_loop_body): Build debugable statement around loop
13685         condition part.
13686         (complete_loop_body): Take into account the debugable statement
13687         around the EXIT_EXPR.
13688         (complete_loop_body): New function.
13689         (patch_exit_expr): Fixed condition inversion.
13690
13691 1998-09-02  Tom Tromey  <tromey@cygnus.com>
13692
13693         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
13694         name of thread define.
13695         * jvspec.c (THREAD_NAME): New macro.
13696         (GCLIB): Likewise.
13697         (THREADLIB): Likewise.
13698         (lang_specific_driver): Recognize attempt to link with thread
13699         library or gc library.  Recognize -ljava on command line so it
13700         isn't linked against more than once.
13701
13702 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13703
13704         * parse-scan.y (report_main_declaration): Name of the class
13705         containing `main' can be a qualified name.
13706
13707 1998-08-31  Tom Tromey  <tromey@cygnus.com>
13708
13709         * config-lang.in: Changed gjavac to gjc everywhere.
13710         * Make-lang.in: Changed gjavac to gjc everywhere.
13711
13712 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13713
13714         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
13715         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
13716         and install the files.
13717         * Makefile.in (JAVA_OBJS_LITE): New variable.
13718         (compiler:): Now include jv-scan as a dependency.
13719         (../jv-scan$(exeext), parse-scan.c): New targets.
13720         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
13721         * config-lang.in (compilers): Removed gcj, gjavah from the list.
13722         * jcf-parse.c (parse_source_file): Call java_layout_classes and
13723         check for errors even if parse_only.
13724         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
13725         defined.
13726         (yylex): New function. Uses java_lex body.
13727         (java_lex): Removed commented out statement. Remove local variable
13728         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
13729         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
13730         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
13731         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
13732         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
13733         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
13734         where appropriate.
13735         (java_lex_error): Empty if JC1_LITE is defined.
13736         (java_get_line_col): Return 0 if JC1_LITE is defined.
13737         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
13738         SET_MODIFIER_CTX): Moved into the section containing the macros
13739         conditionally defined by JC1_LITE.
13740         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
13741         argument if JC1_LITE is defined.
13742         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
13743         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
13744         is defined.
13745         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
13746         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
13747         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
13748         to different values according to JC1_LITE.
13749         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
13750         declared if JC1_LITE set.
13751         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
13752         defined if JC1_LITE not set.
13753         (struct parser_ctx): Reorganized and skip the jc1 front end part
13754         if JC1_LITE set.
13755         (java_layout_classes): New function definition.
13756         (java_push_parser_context, java_init_lex, yyparse, yylex,
13757         yyerror): Prototype always declared. All other static function
13758         prototypes declared only if JC1_LITE is not set.
13759         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
13760         declared in parse.h.
13761         (java_layout_classes): New function.
13762         (java_complete_expand_methods): No longer layout the class here.
13763         * parse-scan.y: New file.
13764         * jv-scan.c: New file.
13765
13766 1998-08-25  Tom Tromey  <tromey@cygnus.com>
13767
13768         * gjavah.c (main): Handle -friend option.
13769         (friend_specs): New global.
13770         (generate_access): Handle friend_specs.
13771         (process_file): Likewise.
13772         (MAX_FRIENDS): New macro.
13773         (friend_count): New global.
13774         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
13775         Changed all callers.
13776
13777 1998-08-24  Per Bothner  <bothner@cygnus.com>
13778
13779         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
13780         (main):  Handle processing all the entries of a named .zip archive.
13781         * jcf-io.c (jcf_trim_old_input):  New function.
13782         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
13783
13784 1998-08-24  Per Bothner  <bothner@cygnus.com>
13785
13786         * lang.c (flag_assume_compiled):  Make default be on.
13787
13788 1998-08-21  Per Bothner  <bothner@cygnus.com>
13789
13790         * jcf-dump.c:  Add bunches of flags to control output more.
13791         (process_class):  New function;  support printing more than one class.
13792         (main): Support new --print-main and --javap flags.
13793         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
13794         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
13795
13796 1998-08-20  Per Bothner  <bothner@cygnus.com>
13797
13798         Change mangling of dispatch table to match C++ vtable (w/thunks).
13799         * class.c (build_dtable_decl), java-tree.h:  New function.
13800         (make_class_data):  Call it.
13801         * decl.c (init_decl_processing):  Likewise.
13802
13803 1998-08-19  Warren Levy  <warrenl@cygnus.com>
13804
13805         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
13806         soft_anewarray; adjust args passed.
13807         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
13808         match _Jv_NewObjectArray.
13809
13810 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13811
13812         * decl.c (push_labeled_block, pop_labeled_block): New functions.
13813         * expr.c (loopup_label): Call create_label_decl.
13814         (create_label_decl): New function.
13815         (java_lang_expand_expr): Call expand_start_bindings with argument
13816         set to zero.
13817         * java-tree.h Added space after PROTO in function declarations
13818         when necessary.
13819         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
13820         (create_label_decl, push_labeled_block): New function
13821         declarations.
13822         * lex.c (label_id): Initialize.
13823         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
13824         switch.
13825         * parse.h Added space after PROTO in function declarations when
13826         necessary.
13827         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
13828         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
13829         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
13830         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
13831         macros.
13832         (struct parser_ctxt): New fields current_loop,
13833         current_labeled_block.
13834         (build_if_else_statement, patch_if_else_statement,
13835         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
13836         generate_labeled_block, complete_labeled_statement,
13837         build_bc_statement, patch_bc_statement, patch_loop_statement,
13838         build_new_loop, build_loop_body, complete_loop_body): New function
13839         declarations.
13840         * parse.y (java_warning_count): New global variable.
13841         (label_id): New static variable.
13842         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
13843         (block:): Return size_zero_node when block is empty.
13844         (empty_statement:): Return size_zero_node.
13845         (statement:): Implement supplemental action when for_statement: is
13846         reduced.
13847         (label_decl:): New rule.
13848         (labeled_statement:): Rewritten using label_decl. Actions
13849         implemented.
13850         (labeled_statement_nsi:): Likewise.
13851         (if_then_statement): Actions implemented.
13852         (while_expression): New rule.
13853         (while_statement:): Rewritten using while_expression. Actions
13854         implemented.
13855         (while_statement_nsi:): Likewise.
13856         (do_statement_begin:): New rule.
13857         (do_statement:): Rewritten using do_statement_begin. Actions
13858         implemented.
13859         (for_statement:): Rewritten using for_begin. Actions implemented.
13860         (for_statement_nsi:): Likewise.
13861         (for_header:, for_begin:): New rules.
13862         (for_init:): Actions implemented.
13863         (statement_expression_list:, break_statement:,
13864         continue_statement:): Likewise.
13865         (yyerror): Count number of issued warning(s).
13866         (java_report_errors): Report error(s) and/or warning(s).
13867         (java_complete_class): Use build_java_argument_signature to
13868         recompute completed method signature.
13869         (java_check_regular_methods): New locals method_wfl and aflags.
13870         Use method_wfl instead of lookup_cl during error reports. Fixed
13871         indentation and modified some error messages. Use
13872         lang_printable_name in method instead of the DECL_NAME. New code
13873         to issue warnings on methods not overriding corresponding methods
13874         private to a different package.
13875         (java_method_add_stmt): Call add_stmt_to_compound.
13876         (add_stmt_to_compound): New function.
13877         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
13878         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
13879         (build_if_else_statement, patch_if_else_statement,
13880         build_labeled_block, generate_labeled_block,
13881         complete_labeled_statement, build_new_loop, build_loop_body,
13882         complete_loop_body, patch_loop_statement, build_bc_statement,
13883         patch_bc_statement, patch_exit_expr): New functions.
13884         * typeck.c (build_java_signature): Build argument signature before
13885         enclosing it in between parenthesis.
13886
13887 1998-08-17  Warren Levy  <warrenl@cygnus.com>
13888
13889         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
13890         (JAVA_OBJS): Added reminder comment
13891
13892 1998-08-13  Nick Clifton  <nickc@cygnus.com>
13893
13894         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
13895         be interpreted as a long long.
13896
13897 1998-08-13  Warren Levy  <warrenl@cygnus.com>
13898
13899         * decl.c (init_decl_processing): Use _Jv_InitClass, not
13900         soft_initialise_class.  Use _Jv_NewMultiArray, not
13901         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
13902         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
13903         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
13904         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
13905
13906 1998-08-12  Per Bothner  <bothner@cygnus.com>
13907
13908         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
13909         length_identifier_node):  New global tree node constants.
13910         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
13911         Replace uses by super_identifier_node etc.
13912         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
13913
13914         * parse.y (resolve_field_access):  Don't special-case ".length" if
13915         flag_emit_class_files.
13916         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
13917         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
13918         and ARRAY.length.
13919
13920 1998-08-11  Per Bothner  <bothner@cygnus.com>
13921
13922         * decl.c (init_decl_processing): Remove unused method_type_node fields.
13923         * class.c (make_method_value):  Remove init for removed fields.
13924
13925         * class.c (layout_class):  Use build_java_argument_signature.
13926         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
13927
13928         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
13929         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
13930         (build_java_signature):  Don't use push_java_argument_signature.
13931
13932         * typeck.c (lookup_argument_method):  New function.
13933         * parse.y (java_check_regular_methods):  Use lookup_argument_method
13934         instead of lookup_java_method2 followed by lookup_java_method.
13935
13936         * parse.y (check_method_redefinition):  Minor optimization.
13937
13938         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
13939         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
13940
13941 1998-08-10  Tom Tromey  <tromey@cygnus.com>
13942
13943         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
13944         c-pragma.o.
13945
13946         * gjavah.c (java_float_finite): Use K&R-style definition.
13947         (java_double_finite): Likewise.
13948         (generate_access): Now returns void.  Changed all callers.
13949         (last_access_generated): Removed.
13950         (process_file): Only make a single pass over the .class file.
13951
13952 1998-07-29  Per Bothner  <bothner@cygnus.com>
13953
13954         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
13955         for compatibility for G++ (with -fvtable-thunks).
13956         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
13957
13958         * gjavah.c (process_file):  Use public inheritance for super-class.
13959
13960 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13961
13962         * lex.c (java_init_lex): Initialize ctxp->package.
13963         * parse.h (struct parser_ctxt): package and package_len replaced
13964         by tree package, an identifier node. Field method_decl_list is
13965         gone. Fixed comments.
13966         (lookup_field_wrapper, merge_qualified_name, not_accessible,
13967         class_in_current_package): New function prototypes.
13968         * parse.y (array_type:): Set class loaded flag on primitive type
13969         arrays.
13970         (package_declaration:): Assign ctxp->package to the
13971         identifier node.
13972         (method_invocation:): Handle invocation of method qualified by
13973         `super'.
13974         (single_type_import_declaration:): Removed ambiguity check.
13975         (java_pop_parser_context): New local variable `next'. Reset and
13976         set IMPORT_CLASSFILE_NAME flags on current and previous import
13977         list.
13978         (java_accstring_lookup): Use new local macro COPY_RETURN.
13979         (lookup_field_wrapper): New function.
13980         (parser_qualified_classname): Use merge_qualified_name.
13981         (parser_check_super_interface): Broaden error message.
13982         (do_resolve_class): Check for qualified class name in the current
13983         compilation unit if appropriate.
13984         (process_imports): Check for already defined classes.
13985         (check_pkg_class_access): Got rid of call to
13986         get_access_flags_from_decl.
13987         (java_complete_expand_methods): Call safe_layout_class based on
13988         the current class size.
13989         (make_qualified_primary): Build a WFL qualification on primary if
13990         none exists.
13991         (merge_qualified_name): New function.
13992         (make_qualified_name): Use merge_qualified_name.
13993         (resolve_expression_name): Use safe_lookup_field.
13994         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
13995         (resolve_qualified_expression_name): Likewise. Check on resolved
13996         element accessibility.
13997         (not_accessible_p, class_in_current_package): New functions.
13998         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
13999         (patch_method_invocation_stmt): Merged common pieces. Check
14000         accessibility of invoked method.
14001         (check_for_static_method_reference): Add returned type in error
14002         message.
14003         (invocation_mode): Get rid of bogus check on PRIVATE methods.
14004         (refine_accessible_methods_list): Merged two conditions in test.
14005         (java_complete_class): Sanity check on stabilize_ref gone.
14006         * zextract.c (read_zip_archive): Cast lseek second argument to long.
14007
14008 1998-07-28  Per Bothner  <bothner@cygnus.com>
14009
14010         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
14011
14012 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14013
14014         * gjavah.c (F_NAN): Removed.
14015         (F_NAN_MASK): New macro.
14016         (F_POSITIVE_INFINITY): Removed.
14017         (F_NEGATIVE_INFINITY): Likewise.
14018         (java_float_finite): Rewrote.
14019         (D_NAN_MASK): Renamed.
14020         (java_double_finite): Rewrote.
14021         (D_POSITIVE_INFINITY): Removed.
14022         (D_NEGATIVE_INFINITY): Likewise.
14023
14024         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14025         If verbose, print underlying representation of value in hex.
14026
14027 1998-07-24  Per Bothner  <bothner@cygnus.com>
14028
14029         * buffer.h, buffer.c:  New files.
14030         * Makefile.in (JAVA_OBJS):  Add buffer.o.
14031
14032         Support locals variables and writing their debug entries to .class.
14033         * jcf-write.c:  Simplify some by user new buffer type.
14034         (vode_buffer_grow):  Removed.
14035         (struct localvar_info):  New type.
14036         (localsvars, localvartable):  New buffers.
14037         (localvar_alloc, localvar_free):  New functions.
14038         (generate_bytecode_insns):  Handle local variables.
14039         (generate_classfile):  Write LocalVariableTable attribute.
14040
14041 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14042
14043         * jcf-io.c (open_in_zip): Check the zipfile magic number.
14044         * zipfile.h (ZIPMAGIC): New macro.
14045
14046 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14047
14048         * Makefile.in (gjavah.o): Updated dependencies.
14049         (jcf-dump.o): Likewise.
14050         (all.indirect): Use ../gjavah.
14051         (../gjavah$(exeext)): Likewise.
14052         (clean): Don't remove gjavah.
14053         (clean): Remove parse.c, not java/parse.c.
14054         * Make-lang.in (java): Added gjavah.
14055         (gjavah$(exeext)): New target.
14056         (GJAVAH_SOURCES): New macro.
14057         (java.all.build): Added gjavah.
14058         (java.all.cross): Likewise.
14059         (java.rest.encap): Likewise.
14060         * config-lang.in (compilers, stagestuff): Added gjavah.
14061
14062 1998-07-23  Tom Tromey  <tromey@cygnus.com>
14063
14064         * gjavah.c (java_float_finite): New function.
14065         (java_double_finite): Likewise.
14066         (F_POSITIVE_INFINITY): New macro.
14067         (F_NEGATIVE_INFINITY): Likewise.
14068         (F_NAN): Likewise.
14069         (D_POSITIVE_INFINITY): Likewise.
14070         (D_NEGATIVE_INFINITY): Likewise.
14071         (D_NAN): Likewise.
14072         (print_field_info): Use java_float_finite and java_double_finite.
14073
14074 1998-07-23  Per Bothner  <bothner@cygnus.com>
14075
14076         * parse.y (method_header):  Name "this" implicit argument.
14077
14078 1998-07-22  Per Bothner  <bothner@cygnus.com>
14079
14080         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
14081         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
14082         (put_linenumber):  New function.
14083         (generate_bytecode_insns, generate_classfile):  Write line numbers.
14084
14085 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14086
14087         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14088         (lookup_name, build_known_method_ref, build_class_init,
14089         build_invokevirtual, invoke_build_dtable, match_java_method,
14090         build_field_ref, pushdecl_force_head, build_java_binop,
14091         binary_numeric_promotion, build_decl_no_layout,
14092         build_java_arrayaccess, build_newarray, build_anewarray,
14093         build_java_array_length_access, build_java_arraynull_check): New
14094         extern function prototypes.
14095         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14096         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14097         java-tree.h.
14098         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14099         to NULL
14100         * jcf.h (jcf_out_of_synch): New extern function prototype.
14101         * parse.h: Static/global function implemented in parse.y
14102         prototyped and declarations moved at the end of the file.
14103         (DECL_P): Check that the argument isn't null.
14104         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14105         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14106         (QUAL_DECL_TYPE): New macro.
14107         (PARAMS): Macro definition removed.
14108         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14109         (return_statement:): Call build_return.
14110         (field_access:): Call make_qualified_primary in sub rule.
14111         (method_invocation:): Build method invocation and call
14112         make_qualified_primary when processing primaries.
14113         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14114         get_type_from_signature.
14115         (java_check_regular_method): Extra integer 0 argument when calling
14116         lookup_java_method2.
14117         (lookup_java_interface_method2): Extra method DECL argument when
14118         calling lookup_java_interface_method2.
14119         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14120         COMPOUND_EXPR node.
14121         (java_complete_expand_method): Layout current class iff not
14122         already done. Don't process interface's methods.
14123         (java_complete_expand_method): Use super class only if it
14124         exists. Use current class otherwise.
14125         (make_qualified_primary): New function.
14126         (resolve_expression_name): Process qualified expression or
14127         expression from primary the same way.
14128         (resolve_expression_name): Two last arguments to
14129         resolve_field_access are now NULL_TREEs.
14130         (resolve_field_access): New variable is_static. Local field must
14131         be DECLs. is_static computed on field DECLs only. Append code in
14132         where_found to the field access if necessary. Use QUAL_DECL_TYPE
14133         to initialize field_type.
14134         (resolve_qualified_expression_name): New local variable,
14135         previous_call_static and is_static. Handle primaries with function
14136         calls, casts, array references and `this'. `super' now handled as
14137         `(super_class)this'. Use is_static to clarify boolean expressions.
14138         Added code to handle case where a proper handle is required to
14139         access a field. Use QUAL_DECL_TYPE where applicable.
14140         (maybe_access_field): New function.
14141         (patch_method_invocation_stmt): New arguments primary, where,
14142         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14143         deleted. Use `where' as a type to search from if specified. Check
14144         for static method reference where forbidden. Append primary or
14145         current_this to the argument list if not calling constructor nor
14146         static methods.
14147         (check_for_static_method_reference): New function.
14148         (patch_invoke): Layout the class on which new is done if
14149         necessary.
14150         (lookup_method_invoke): Changed format to report errors on
14151         methods.
14152         (qualify_ambiguous_name): New local variable this_found. Now
14153         handle things from primaries. Method call are considered
14154         expression names.
14155         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14156         changed into NULLs.
14157         (not_initialized_as_it_should_p): Comply with the new DECL_P.
14158         (java_complete_tree): New case fo RETURN_EXPR. Process function
14159         call arguments in separate function.
14160         (complete_function_arguments): New function.
14161         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14162         anymore.
14163         (patch_assignment): Take the return function slot into account as
14164         a RHS. Distinguish assignment from a return.
14165         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14166         when checking methods in interfaces.
14167         (resolve_type_during_patch): NULL argument to unresolve_type_p
14168         instead of NULL_TREE.
14169         (patch_newarray): Fixed typo in comment.
14170         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14171         (build_return, patch_return): New functions.
14172         * typeck.c (lookup_java_constructor): Fixed typo in comment.
14173
14174 1998-07-21  Per Bothner  <bothner@cygnus.com>
14175
14176         * constants.c (find_name_and_type_constant, find_fieldref_index,
14177         find_methodref_index):  New methods.
14178         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
14179         just return given method.  Also, rename to build_known_method_ref.
14180         (expand_invoke):  Rename call to build_invoke_non_interface.
14181         * java-tree.h, parse.h:  Update prototype.
14182         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
14183         (such as expand_expr_stmt) if flag_emit_class_files.
14184         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14185         STACK_TARGET, IGNORE_TARGET):  New macros.
14186         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
14187         (generate_bytecode_insn):  New function to generate method's bytecode.
14188         (generate_classfile):  Node generate Code attribute for a method.
14189         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14190         push_long_const, field_op, adjust_typed_op, maybe_wide):
14191         New functions used by generate_bytecode_insn.
14192
14193         * typeck.c (signature_include_return):  Remove variable.
14194         (push_java_argument_signature, build_java_argument_signature):  New.
14195         (build_java_signature):  Use push_java_argument_signature.
14196         * parse.y:  Use build_java_argument_signature instead of fiddling
14197         with signature_include_return.
14198
14199 1998-07-17  Tom Tromey  <tromey@cygnus.com>
14200
14201         * gjavah.c (print_c_decl): Always generate JArray<>* for array
14202         types.
14203
14204         * Makefile.in (all.indirect): Added gjavah$(exeext).
14205         (gjavah$(exeext)): Added $(exeext).
14206         (clean): Likewise.
14207
14208 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14209
14210         * class.c (layout_class): Call to java_layout_parsed_class replace
14211         by safe_layout_class.
14212         * expr.c (build_java_array_length_access): Removed static storage
14213         class in the function definition.
14214         (build_java_arraynull_check): Likewise.
14215         Also fixed typos in two comments.
14216         * lex.c (java_init_lex): Initialize static global kw_length.
14217         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14218         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14219         java_lex_error.
14220         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14221         * parse.h (resolve_no_layout): New static function declaration.
14222         (get_identifier_in_static): Declaration removed.
14223         (java_layout_parsed_class): Function name declaration changed to
14224         safe_layout_class.
14225         (build_newarray_node, patch_newarray, resolve_type_during_patch,
14226         not_initialized_as_it_should_p, build_this): New static function
14227         declarations.
14228         (pushdecl_force_head, build_java_binop, int_fits_type_p,
14229         binary_numeric_promotion, stabilize_reference,
14230         build_decl_no_layout, build_java_arrayaccess): Extern function
14231         declarations moved into their own section.
14232         (build_newarray, build_anewarray, build_java_array_length_access,
14233         build_java_arraynull_check): New extern function declarations.
14234         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14235         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14236         fake tree codes.
14237         (CALL_CONSTRUCTOR_P): New macro.
14238         * parse.y (kw_length): New static global tree node.
14239         (return_statement): Tagged <node>.
14240         (RETURN_TK): Tagged <operator>.
14241         (variable_declarator_id:): Build variable declaration with an
14242         empty initialization value if a syntax error was found in the
14243         initialization part of the variable declaration.
14244         (statement_without_trailing_substatement:): return_statement: now
14245         uses the default rule.
14246         (return_statement:): Temporarily fixed to return NULL_TREE.
14247         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14248         (class_instance_creation_expression:): Class creation rules now
14249         call build_method_invocation upon reduction.
14250         (array_creation_expression:): Rules call build_newarray_node upon
14251         reduction.
14252         (dim_exprs:): Build a list of dimension expressions.
14253         (dim_expr:): Store location of the OSB_TK in the dimension
14254         expression node.
14255         (method_invocation:): Added a new error rule.
14256         (build_unresolved_array_type): WFL argument may also be an array
14257         on a primitive type. Name of the argument changed to reflect this.
14258         (method_declarator): Insert argument type at the beginning of the
14259         argument type list and later reverse the list.
14260         (unresolved_type_p): Argument 'returned' may be optionally
14261         NULL_TREE.
14262         (java_layout_class_from_source): Function renamed
14263         safe_layout_class.
14264         (resolve_and_layout): Now call resolve_no_layout and
14265         safe_layout_class.
14266         (resolve_no_layout): New function.
14267         (purify_type_name): New function.
14268         (complete_class_report_errors): Call purify_type_name during error
14269         report on a type not found.
14270         (process_imports): error_found local variable doesn't need to be
14271         initialized to zero.
14272         (declare_local_variables): New local type_wfl. Fixed typo in error
14273         message. type_wfl assigned to unresolved type and used to register
14274         incomplete type. Build a WFL around the variable initialization
14275         statement so that debug info can be generated on it.
14276         (source_start_java_method): Reverse argument list after they've
14277         been processed.
14278         (current_this): New static global variable.
14279         (java_complete_expand_methods): Set current_this when appropriate.
14280         (resolve_expression_name): Build correct static and non static
14281         field access bearing a simple name.
14282         (resolve_field_access): Resolve the length field of arrays. Handle
14283         f.m() cases.
14284         (patch_method_invocation_stmt): Set the type of the method
14285         invocation to error_mark_node. This value is later overridden by a
14286         valid type, if any. Don't handle qualified constructor invocation
14287         as qualified method invocation. Call lookup_method_invoke with its
14288         new flag. It's no longer necessary to access the selected method
14289         as the value of a tree list. Handle constructor invocation.
14290         (patch_invoke): Reverse argument list when invoking non interface
14291         methods. Insert call to new as the first argument of the
14292         constructor.
14293         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14294         defined within a final class. Return INVOKE_STATIC if the invoked
14295         method is a constructor.
14296         (lookup_method_invoke): New lc argument is a flag to indicate a
14297         constructor lookup. Now handle constructor lookup. Choose the most
14298         specific method in case several were matching the invocation
14299         requirements. Return a method decl instead of a tree list featuring
14300         one single method decl element.
14301         (refine_accessible_methods_list): New lc flag argument to
14302         indicate that a constructor is being looked up.
14303         (not_initialized_as_it_should_p): New function.
14304         (java_complete_tree): Now process fake tree codes
14305         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14306         save_expr on resolved function call arguments. Case on
14307         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14308         (patch_assignment): LHS can be a field access expression. When
14309         dealing with reference, lhs_type is the promoted type of the
14310         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14311         applicable.
14312         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14313         (patch_binop): Use not_initialized_as_it_should_p where
14314         applicable.
14315         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14316         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14317         where applicable.
14318         (resolve_type_during_patch): New function.
14319         (patch_cast): Call resolve_type_during_patch to resolve type and
14320         report error accordingly.
14321         (patch_array_ref): Use not_initialized_as_it_should_p where
14322         applicable. Array base expression is saved before being
14323         used. Promote the type of an array elements if it contains non
14324         builtin types.
14325         (build_newarray_node, patch_newarray, build_this): New functions.
14326
14327 1998-07-16  Tom Tromey  <tromey@cygnus.com>
14328
14329         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14330         increment it in `for' statement.
14331         (print_field_info): If number is inf or nan, don't print it.
14332         (print_method_info): If method name is `delete', just ignore it.
14333         (print_c_decl): Special-case jstringArray.
14334
14335         * gjavah.c (help): New function.
14336         (no_argument): New function.
14337         (usage): Changed text.
14338         (main): Rewrote argument handling.  Now handles -v, --help,
14339         --version.
14340         (version): New function.
14341         (found_error): New global.
14342         (main): Return found_error.
14343         (generate_access): Set found_error.
14344         (print_c_decl): Likewise.
14345
14346 1998-07-15  Tom Tromey  <tromey@cygnus.com>
14347
14348         * gjavah.c (print_c_decl): Don't print "," when examining field.
14349         Skip type name when looking at "[L" types.
14350         (process_file): Now static.
14351         (generate_access): Now returns int.
14352         (last_access_generated): New global.
14353         (process_file): Clear last_access_generated; make multiple passes
14354         over the class.
14355         (print_field_info): Just return if generate_access returns true.
14356         (print_method_info): Likewise.  Also, allow <init> functions to
14357         pass through.
14358         (print_c_decl): Added is_init argument.  Print constructors
14359         properly.
14360         (print_cxx_classname): Use UTF8_GET to extract characters from
14361         string.
14362         (print_base_classname): New function.
14363         (print_class_decls): New function.
14364         (process_file): Use it.
14365         (utf8_cmp): New function.
14366
14367 1998-07-13  Nick Clifton  <nickc@cygnus.com>
14368
14369         * lang-options.h: Format changed to match changes in gcc/toplev.c
14370         to implement a --help option.
14371
14372 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
14373
14374         * decl.c (init_decl_processing): Revert change to dtable_type.
14375
14376 1998-07-09  Per Bothner  <bothner@cygnus.com>
14377
14378         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
14379
14380 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
14381
14382         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
14383
14384         * lang.c (lang_init): Default flag_exceptions to 1, without
14385         checking to see if it's 2 first.
14386
14387 1998-07-08  Jeffrey A Law  (law@cygnus.com)
14388
14389         * constants.c: Include "system.h".
14390         * decl.c: Likewise.
14391         * lang.c (flag_new_exceptions): Get via extern now.
14392         (lang_init_options): New functions.  Turn on flag_new_exceptions.
14393
14394 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14395
14396         * lex.c (java_lex): Return 0 when we see an invalid character in
14397         the input.
14398
14399         * lex.c (java_read_char): Specify extra argument when calling
14400         java_lex_error.
14401         (java_read_unicode, java_parse_end_comment,
14402         java_parse_escape_sequence): Likewise,
14403         (java_lex): Specify extra argument when calling
14404         java_lex_error. Test that IDs are beginning with a legal character
14405         for IDs. Handle invalid characters with an error message and a
14406         call to java_lex_error.
14407         (java_lex_error): Adjust column position by new argument
14408         `forward'. Issue an error even if in the middle of reporting an
14409         other error.
14410
14411 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
14412
14413         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
14414         we don't explicitly put a null pointer when we're copying it.
14415
14416 1998-07-07  Tom Tromey  <tromey@cygnus.com>
14417
14418         * gjavah.c (print_cxx_classname): New function.
14419         (super_class_name): Likewise.
14420         (print_super_fields): Removed.
14421         (in_super): Removed.
14422         (print_field_info): Never generate #defines.
14423         (print_c_decl): Changed generated types to match JNI.  No longer
14424         print class name before method name.
14425         (print_method_info): Print "static" before static methods.
14426         Print "virtual" before non-final methods.
14427         (usage): Use exit(1), not exit(-1).
14428         (main): Likewise.
14429         (print_field_info): Use %.17g to print a double.
14430         (last_access): New globals.
14431         (process_file): Initialize last_access.
14432         (usage): Now static.
14433         (ACC_VISIBILITY): New define.
14434         (generate_access): New function.
14435         (print_field_info): Call it.
14436         (print_method_info): Likewise.  Also, generate information for all
14437         methods, not just native methods.  Return void.
14438         (print_c_decl): Return void.
14439         (print_field_info): Return void.
14440
14441 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14442
14443         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
14444         processing the jc1 grammar file. Prefix bison functions and
14445         variables with java_.
14446         (parse.c): Dependencies on parse.h and lex.h
14447         * expr.c (build_java_arrayaccess): Function now global.
14448         * java-tree.h: Comment reorganized to carry on previous
14449         classification effort.
14450         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
14451         RESOLVE_TYPE_NAME_P): New flags on WFLs.
14452         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
14453         java_parse (new prefix java_ generated by bison).
14454         (java_layout_parsed_class, java_register_parsed_class): Function
14455         call removed.
14456         (yyparse): Removed unnecessary call to init_outgoing_cpool.
14457         * lex.c (static tree wfl_op): Variable deleted.
14458         (java_init_lex): Initialize kw_super and kw_this. Initialize more
14459         ctxp fields to NULL_TREE.
14460         (java_lex): No longer create WFL for operators. Filename caching
14461         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
14462         created as STRING_CST and later expanded. Removed extra argument
14463         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
14464         and SUPER.
14465         (build_wfl_node): Removed code in comments.
14466         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
14467         store token and location data in the current bison token.
14468         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
14469         static/extern function declaration at the beginning of the file.
14470         (struct qualification): Data structure definition deleted.
14471         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
14472         (qualify_ambiguous_name): Function declaration modified. Function
14473         now returns nothing.
14474         (build_array_ref, patch_array_ref, make_qualified_name,
14475         resolve_qualified_expression_name, maybe_generate_clinit,
14476         resolve_field_access): New static function declarations.
14477         (build_java_arrayaccess): New extern function declaration.
14478         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
14479         (CALL_EXPR_PRIMARY): Macro deleted.
14480         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
14481         (struct parser_ctxt): Field initialized_final
14482         removed. non_static_initialized, static_initialized: New fields.
14483         * parse.y (static tree kw_super, static tree kw_this): New global
14484         static.
14485         (%union): tree wfl field of operator member replaced by int
14486         location. WFLs are non longer created for operators.
14487         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
14488         (qualified_name:): Now calls make_qualified_name to build the
14489         identifier.
14490         (type_declaration:): Consider generating <clinit> when class
14491         parsing completed.
14492         (variable_declarator:): Directly build an assignment node when the
14493         variable is initialized when declared.
14494         (this_or_super:): Build a WFL and set current location when THIS
14495         or SUPER are parsed.
14496         (expression_statement:): Wrap statement around a WFL.
14497         (primary_no_new_array:): Fixed typo. Changed value returned by
14498         THIS_TK because of its new type (temporary).
14499         (dim_exprs:): Temporary fix because of OSB_TK's new type.
14500         (field_access:): Build qualified name with SUPER.
14501         (method_invocation:): Fixed returned value because of SUPER's new
14502         type.
14503         (array_access:): Use OSB_TK location information.
14504         (post_increment_expression:, post_decrement_expression:,
14505         unary_expression:, pre_increment_expression:,
14506         pre_decrement_expression:, unary_expression_not_plus_minus:,
14507         cast_expression:, multiplicative_expression:,
14508         additive_expression:, shift_expression:, relational_expression:,
14509         equality_expression:, and_expression:, exclusive_or_expression:,
14510         inclusive_or_expression:, conditional_and_expression:,
14511         conditional_or_expression:, assignment:): Use new location/token
14512         information available on operators.
14513         (create_class): Set super_decl_type to NULL_TREE when processing
14514         java.lang.Object.
14515         (register_fields): Field initialization is now a MODIFY_EXPR
14516         node. Chain initialization code to the matching lists (according
14517         the the field declaration modifiers).
14518         (maybe_generate_clinit): New function.
14519         (method_header): Don't set method's DECL_NAME to a WFL when adding
14520         methods to java.lang.Object.
14521         (resolve_and_layout): Now can return NULL_TREE if the type
14522         resolution fails. Otherwise, return the class DECL instead of its
14523         TYPE.
14524         (check_method_redefinition): Don't patch method DECL_NAME if it
14525         belongs to java.lang.Object.
14526         (process_imports): Simply assign error_found to the value returned
14527         by check_pkg_class_access.
14528         (declare_local_variables): Don't use their init statements (if
14529         any) when parsing error were previously found. Reuse MODIFY_EXPR
14530         build during parsing as an init statement.
14531         (java_method_add_stmt): Now return the current method body.
14532         (java_layout_parsed_class, java_register_parsed_class): Functions
14533         removed.
14534         (java_complete_expand_methods): Initialize the constant pool on a
14535         per class basis. Layout the classes before expanding their method
14536         bodies. Don't try expand artificial constructor code if error were
14537         found. Make the classes data and register them if no error were
14538         found.
14539         (java_complete_expand_method): Retrieve an artificial constructor
14540         argument list before entering its body. Assign the top block to
14541         the artificial constructor function body and set types of declared
14542         blocks and compound statements to void. Walk method body if not an
14543         artificial constructor.
14544         (make_qualified_name, cut_identifier_in_qualified): New functions.
14545         (resolve_expression_name): Fixed comments. Save/restore the
14546         current class CLASS_LOADED_P flag value. Build non qualified
14547         static field access and handle qualified expression names.
14548         (resolve_field_access, resolve_qualified_expression_name): New
14549         functions.
14550         (patch_method_invocation_stmt): Use the new expression resolution
14551         scheme, calling resolve_field_access when the function call is
14552         resolved as an expression.
14553         (qualify_ambiguous_name): Function rewritten to work on qualified
14554         expression produced by make_qualified_name.
14555         (java_complete_tree): Promote type when function's argument are
14556         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
14557         the assignment to discover further errors if RHS is a expression
14558         name that fails to evaluate. Declare LHS initialized even though
14559         the assignment failed. Don't use the location variable and removed
14560         extra argument in patch function calls. Now handle the ARRAY_REF
14561         case and build internal string representation when STRING_CSTs are
14562         walked.
14563         (build_method_invocation): Don't wrap function call around a WFL.
14564         (build_assignment): Likewise. Use the operator location
14565         information.
14566         (patch_assignment): Handle array access LHSs. Handle error
14567         provenance, resulting in a better error report.
14568         (build_binop): Use op_location from operator as binop location
14569         information.
14570         (build_unaryop, build_incdec, build_cast): Likewise.
14571         (patch_binop): Extract location information from the node. Fixed
14572         typo in error message.
14573         (patch_unary_op): Extract location information from the node.
14574         (build_array_ref, patch_array_ref): New functions.
14575
14576 1998-07-01  Tom Tromey  <tromey@cygnus.com>
14577
14578         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
14579         match _Jv_IsInstanceOf.
14580         * decl.c (init_decl_processing): Use _Jv_NewArray, not
14581         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
14582
14583 1998-06-30  Tom Tromey  <tromey@cygnus.com>
14584
14585         * decl.c (init_decl_processing): Functions are now named
14586         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
14587
14588 1998-06-29  Per Bothner  <bothner@cygnus.com>
14589
14590         * java-tree.h (load_class):  Add prototype.
14591         * class.c (is_compiled_class):  Add missing arg to load_class.
14592         * expr.c (expand_java_NEW):  Call load_class.
14593         * parse.y (process_import):  Removed bogus use of void return value.
14594
14595 1998-06-25  Per Bothner  <bothner@cygnus.com>
14596
14597         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
14598         Function name is "_Jv_Throw" instead of "soft_athrow".
14599         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
14600         Function name is "_Jv_AllocObject" instead of "soft_new".
14601         Takes an extra parameter (object size).
14602         * expr.c:  Update calls.
14603
14604 1998-06-24  Per Bothner  <bothner@cygnus.com>
14605
14606         * lex.c (java_get_line_col):  Handle end-of-file.
14607         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
14608
14609 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
14610
14611         * lang.c (lang_init): Make -fexceptions the default.
14612         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
14613         exception handling is not turned on.
14614
14615 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14616
14617         * lang.c (flag_new_exceptions): Make this this default.
14618         * decl.c (end_java_method): Call emit_handlers.
14619         * except.c (method_init_exceptions): Set language code and version.
14620         (expand_start_java_handler): Enable exception, and call
14621         expand_eh_region_start.
14622         (expand_end_java_handler): Enable exception, and set up catch blocks.
14623         (emit_handlers): New routine to generate the saved handlers.
14624         * java-except.h (emit_handlers): Add prototype.
14625
14626 1998-06-12  Per Bothner  <bothner@cygnus.com>
14627
14628         We used to have three different representations of the constant pool:
14629         the CPool structure, the tree_constant_pool, and the constructures
14630         used to build the Class object (which may need class and string
14631         constants) in compiled code.  None were appropriate for compiling
14632         to .class files, so I did a major overhaul.
14633
14634         First, the tree_constant_pool array was removed.  Things were
14635         modified to the CPool structure in the JCF could be used.
14636         Second, a "capacity" field was added to the CPool, and functions
14637         written to search for a matching constant, adding one if not found.
14638         The code that generated the Class object was changed to use a CPool.
14639         The actual TREE_LISTs used to build the CONSTRUCTORs used for
14640         the static Class object are now only in build_constants_constructor.
14641         Finally, I wrote code which can generate a .class file (including its
14642         constant pool) from the RECORD_TYPE of a class.  This is a big step
14643         on the way to compiling Java source into .class files.
14644
14645         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
14646         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
14647
14648         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
14649         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
14650         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
14651         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
14652         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
14653         (lang_type):  Removed constant_pool field.
14654         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
14655         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
14656         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
14657         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
14658
14659         * constants.c (current_constant_pool_tags, current_constant_pool_data,
14660         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
14661         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
14662         (set_constant_entry, find_constant1, find_constant2,
14663         find_class_constant, count_constant_pool_bytes, write_constant_pool,
14664         find_utf8_constant, find_class_or_string_constant):  New functions.
14665
14666         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
14667         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
14668         (give_name_to_class, get_class_constant):  Likewise.
14669         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
14670         (get_name_and_type_constant, get_ref_constant):  Removed.
14671         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
14672         * parse.y:  Don't save/restore tree_constant_pool.
14673         * verify.c (verify_jvm_instructions):  Update for new approach.
14674         * expr.c (expand_invoke, expand_java_field_op): Likewise.
14675
14676         * lang-options.h:  Added -femit-class-file, -femit-class-files.
14677         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
14678         (lang_f_options):  Added "emit-class-file(s)".
14679
14680         * expr.c (build_java_arrayaccess):  Generate more efficient array
14681         bounds checking, by using unsigned compare.
14682
14683         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
14684
14685 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14686
14687         * parse.h: New comment on the handling of unresolved type
14688         identifiers. JDEPs are now part of the jdep_code enum.
14689         (typedef struct jdep): Now use enum jdep_code or int, depending on
14690         availability. Both are narrowed down to an 8 bits bitfield.
14691         (CALL_EXPR_PRIMARY): Fixed comment.
14692
14693 1998-06-10  Tom Tromey  <tromey@cygnus.com>
14694
14695         * Make-lang.in (java): Added gjavac and jvgenmain.
14696         (java.start.encap): Depend on gjavac.
14697         (java.rest.encap): Depend on jvgenmain.
14698
14699         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
14700         (JAVA_CROSS_NAME): Likewise.
14701         (java.all.build): Depend on jvgenmain and gjavac.
14702         (java.all.cross): Depend on jvgenmain and gjavac-cross.
14703         (jvgenmain$(exeext)): New target.
14704         (java.install-common): Wrote.
14705         * config-lang.in (compilers, stagestuff): Added gjavac and
14706         jvgenmain.
14707
14708 1998-06-10  Dave Brolley  <brolley@cygnus.com>
14709
14710         * lang.c (lang_decode_option): New argc/argv interface.
14711
14712 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14713
14714         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
14715         * decl.c (build_decl_no_layout): New function.
14716         * expr.c (java_lang_expand_expr): Layout declarations found in
14717         blocks before they're pushed.
14718         * jcf-parse.c (load_class): Save current line when parsing class
14719         file.
14720         (parse_source_file): Register class before expanding their
14721         methods.
14722         * lang.c (put_decl_node): Produce `null' when `void *' is
14723         processed.
14724         * lex.c (static tree wfl_op): New static global, for error report
14725         on casts.
14726         (java_init_lex): wfl_operator and wfl_op initialized
14727         here. Filename caching added for wfl_op. Return wfl_op when `(' is
14728         parsed.
14729         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
14730         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
14731         build_unresolved_array_type): New static function definitions.
14732         (build_decl_no_layout): New extern function declared.
14733         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
14734         faulty modifier exists.
14735         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
14736         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
14737         (UNARY_PLUS_EXPR): New fake operator.
14738         (struct parser_ctxt): New field osb_number.
14739         * parse.y (static tree wfl_operator): New static WFL for operator
14740         bound error messages.
14741         (DECR_TK, INCR_TK): Moved.
14742         (OP_TK): Tagged <operator>.
14743         (array_type:): Now call build_unresolved_array_type.
14744         (dim_expr:): Count the number of '[' seen.
14745         (post_increment_expression, post_decrement_expression,
14746         pre_increment_expression, pre_decrement_expression,
14747         unary_expression_not_plus_minus, unary_expression:): Actions are
14748         now building the corresponding unary expressions.
14749         (cast_expression:): Actions are now building cast expressions.
14750         (build_unresolved_array_type): New function.
14751         (create_interface): Reset the number of declared interfaces.
14752         (create_class): Likewise.
14753         (method_header): Methods declared within the scope of an interface
14754         are now implicitly set public and abstract.
14755         (java_complete_class): Variable's and parameter's type are patched
14756         with a promoted type.
14757         (declare_local_variables): Resolved non builtin types are promoted
14758         before being used to build a variable decl. Removed type patch
14759         posted on variable initialization statement.
14760         (source_start_java_method): Use build_decl_no_layout to build the
14761         decl of a parameter of incomplete type.
14762         (java_register_parsed_class): Process interfaces too. Call
14763         rest_of_decl_compilation on each processed class declarations.
14764         (java_complete_expand_methods): Don't attempt to expand things in
14765         interfaces.
14766         (java_complete_tree): Process CONVERT_EXPR, even though it always
14767         has a type. Propagate error_mark_node to node's type too. Promote
14768         method's call argument type and return error_mark_node if
14769         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
14770         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
14771         handle unary operator nodes.
14772         (build_assignment): Added comment.
14773         (print_int_node): New function.
14774         (patch_assignment): New second argument. New error handling. Use
14775         print_int_node. Handle references. Use can_cast_to_p to issue
14776         different error message according to the context and check upon
14777         the initialization of the RHS.
14778         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
14779         (operator_string): Handle more operators.
14780         (patch_binop): No longer use a function static
14781         wfl_operator. Improved error message on shift distance.
14782         (build_unaryop, build_incdec, build_cast, patch_unaryop,
14783         patch_cast): New functions.
14784
14785 1998-06-05  Per Bothner  <bothner@cygnus.com>
14786
14787         * jvspec.c:  New file.
14788         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
14789
14790         * java-tree.h (identifier_subst):  Add declaration.
14791
14792 1998-06-04  Tom Tromey  <tromey@cygnus.com>
14793
14794         * jvgenmain.c (main): Generate call to JvRunMain.
14795
14796         * class.c (make_class_data): Push value for "sync_info" field.
14797         * decl.c (init_decl_processing): Push "sync_info" field.
14798
14799 1998-06-03  Per Bothner  <bothner@cygnus.com>
14800
14801         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
14802         Java (source) name, not signature.
14803         Set TYPE_ALIGN to (at least) that of element_type.
14804
14805 1998-06-02  Per Bothner  <bothner@cygnus.com>
14806
14807         * class.c:  Moved classname-mangling-rekated code to ...
14808         * mangle.c:  ... this new file.
14809         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
14810         * Makefile.in:  Update for above changes.
14811
14812 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14813
14814         * expr.c (truthvalue_conversion): Convert integer and floating
14815         point value to their truth value.
14816         * lex.c (java_lex): Handle the `null' literal.
14817         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
14818         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14819         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
14820         New macros.
14821
14822         * parse.y: Reorganization/documentation on token declaration.
14823         (binop_lookup[]): New added new tree codes.
14824         (relational_expression): Build corresponding binary operators.
14825         (equality_expression, conditional_and_expression,
14826         conditional_or_expression): Likewise.
14827         (java_complete_class): Fix crash in debug message.
14828         (java_complete_tree): Check initialization of method call
14829         arguments. Further bogus node evaluation to detect more error
14830         during assignments. Handles more binary operators.
14831         (patch_assignment): Use DECL_P.
14832         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
14833         code.
14834         (operator_string): Handle more case. Compacted source.
14835         (patch_binop): Changed function comment. Checking for
14836         uninitialized first operand takes the compound assignment into
14837         account and uses DECL_P. Checking for uninitialized second operand
14838         delayed to routine's end. Use macros to issue type bound error
14839         messages and issue messages on both operands if their types are
14840         different. Force fixed type into node. Handle all binary
14841         operators.
14842
14843 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14844
14845         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
14846         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
14847         build operator node and return tokens.
14848         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
14849         * parse.h (java_complete_tree): Changed returned type in prototype.
14850         (build_method_invocation, build_assignment, patch_assignment,
14851         patch_binop): New static function declarations.
14852         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
14853         BUILD_EXPR_WFL): New macros.
14854         * parse.y (enum tree_code binop_lookup[]): New static for token to
14855         TREE_CODE lookup.
14856         (%union): Parser union has new sub-structure `operator'.
14857         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
14858         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
14859         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
14860         ASSIGN_ANY_TK): Tokens tagged `operator'.
14861         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
14862         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
14863         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
14864         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
14865         (assignment_operator:): Rule tagged `operator'.
14866         (expression_statement:): Re-installed default rule.
14867         (method_invocation:): Sub rules call build_method_invocation.
14868         (postfix_expression:): Don't attempt to resolve name here. Just
14869         return an ID.
14870         (multiplicative_expression:): Sub-rules build corresponding binop
14871         expression node.
14872         (additive_expression:, shift_expression:, and_expression:,
14873         exclusive_or_expression:, inclusive_or_expression:): Likewise.
14874         (assignment:): Sub rule invoke build_assignment.
14875         (assignment_operator:): Default rules on sub rules.
14876         (force_error): Added documentation on this variable.
14877         (declare_local_variables): Build initialization calling
14878         build_assignment.
14879         (expand_start_java_method): Removed unused rtx declaration. Mark
14880         arguments as already initialized.
14881         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
14882         (java_complete_expand_methods): Don't process next method if
14883         completion of the previous one triggered errors.
14884         (java_complete_expand_method): Call source_end_java_method if no
14885         error were found during completion.
14886         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
14887         locals declaratilon. Handle names found within a class. Return
14888         error_mark_node when things aren't found.
14889         (patch_method_invocation_stmt): Return error_mark_node on failures.
14890         (patch_invoke): Removed unused local. Return the correct node.
14891         (java_complete_tree): Now returns a value. The BLOCK section binds
14892         local identifiers and the type of a BLOCK is now void. Assign the
14893         result of operand completion on COMPOUND_EXPR. Assign the
14894         encapsulated node of a WFL to the result of its completion, except
14895         when the node is an identifier. Now handle MODIFY_EXPR and several
14896         binary operators. Return error_mark_node on errors.
14897         (build_method_invocation, build_assignment, patch_assignment,
14898         build_binop, operator_string, patch_binop): New functions.
14899         * typeck.c (binary_numeric_promotion): New function.
14900
14901 1998-05-21  Per Bothner  <bothner@cygnus.com>
14902
14903         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
14904         Replace most uses of ident_subst by identifier_subst.
14905
14906         * class.c (push_class_static_dummy_field):  Removed function.
14907         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
14908         instead of looking got "class" static field.  Create that decl here.
14909         (class_identifier_node):  Removed;  no longer needed.
14910         (init_class_processing):  Don't init class_identifier_node.
14911         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
14912         Do nreverse 0 times (instead of twice) for Object and Class.
14913         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
14914
14915 1998-05-20  Per Bothner  <bothner@cygnus.com>
14916
14917         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
14918         while initializing linenumber_count and linenumber_table.
14919         Do it before init_function_start (which calls emit_line_note).
14920         * expr.c (expand_byte_code):  Don't need to clear lineno here.
14921
14922 1998-05-18  Tom Tromey  <tromey@cygnus.com>
14923
14924         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
14925         then mangle number as _N_.
14926
14927         * class.c (mangle_class_field): New function.
14928         (build_class_ref): Set assembler name of class reference using
14929         mangle_class_field.
14930         (push_class_static_dummy_field): Likewise.
14931
14932 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
14933
14934         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
14935         of assigning to TREE_CODE.  The latter method exploits a feature
14936         of GCC that is not ANSI compliant.
14937
14938 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14939
14940         * decl.c (pushdecl_force_head): New function.
14941         (pushlevel): Removed conditional printf.
14942         (complete_start_java_method): Don't enter local variable scope if
14943         function is compiled from source code.
14944         * expr.c: parse.h now included
14945         (java_lang_expand_expr): New function.
14946         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
14947         printf. Terminate buffer when doing directories.
14948         * jcf-parse.c (parse_source_file): Call lang_init_source before
14949         parsing and before code generation.
14950         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
14951         use printf if the macro is defined.
14952         * lang.c (lang_init): Install lang_expand_expr hook on
14953         java_lang_expand_expr.
14954         (java_dummy_print): New function.
14955         (lang_init_source): New function.
14956         * lex.c (java_lex): Remember location of an opening brace at the
14957         second nesting level.
14958         (java_is_eol): Unget character seen after a CR if it is EOF.
14959         * parse.h: Now includes lex.h
14960         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
14961         printf if the macro is defined.
14962         (expand_start_java_method, build_expr_block, enter_block,
14963         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
14964         New static function declarations.
14965         (pushdecl_force_head): New extern function declaration.
14966         (INCOMPLETE_TYPE_P): New macro.
14967         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
14968         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
14969         BLOCK_EXPR_ORIGIN): New macros.
14970         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
14971         DECL_SOURCE_LINE_LAST): New macros.
14972         (struct parser_ctxt): Removed field current_method_decl, redundant
14973         with the field current_function_decl. Added fields
14974         first_ccb_indent1 and pending_block.
14975         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
14976         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
14977         tagged <node>
14978         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
14979         (compilation_unit:): Cosmetic on sub rule.
14980         (type_declaration:): Cosmetic on sub rules. Added an error rule.
14981         (variable_initializer:): Installed default rule on expression:.
14982         (method_declaration:): method_header: starts a new
14983         method. method_body: installs the function body, absorbs blocks
14984         emitted for temporary variable scopings, pops function's body block
14985         and merges function's last statement lineno in DECL_SOURCE_LINE.
14986         (method_body:): Installed default rules.
14987         (block:): Call enter_block when an opening brace is seen.  Absorb
14988         scoping blocks and call exit_block when a closing brace is seen.
14989         (block_statement:): Cosmetic changes.
14990         (method_invocation:): Create WFL around CALL_EXPR node.
14991         (patch_stage): Added comment around definition.
14992         (method_header): Try to use first_ccb_indent1 as the first line of
14993         the method, so BP debug info are emitted at the first opening
14994         brace of the function. If the function has no body, use the
14995         location of the function's name. Override currently defined method
14996         name with the matching WFL so we can point redefinition errors
14997         using the location where the function's name was declared.
14998         (check_abstract_method_header): Interprets DECL_NAME as an
14999         identifier or as a WFL, accordingly.
15000         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15001         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15002         location and name information out of it and reinstall DECL_NAME to
15003         its original identifier node value.
15004         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15005         function's source code).
15006         (read_import_dir): Test the value returned by find_class and issue
15007         a fatal accordingly.
15008         (declare_local_variables): Push a new block for the scope of the
15009         new variable(s) if code has been already generated at that nesting
15010         level. Pinpoint redefinition errors using the variable id
15011         WFLs. Generate initialization code if necessary. If the variable
15012         type is incomplete, register a patch on its decl.
15013         (source_start_java_method): Rewritten. Define a new block for the
15014         function's parameters. Build parameter decl out of function's
15015         arguments and register them for a patch if their types are
15016         incomplete.
15017         (expand_start_java_method): Includes the part of
15018         source_start_java_method that was pushing the parameter decls and
15019         completing the method start code.
15020         (source_end_java_method): Removed call the expand_end_bindings and
15021         poplevel (already taken care of). Reinstall function's arguments
15022         and get function's last line of code before calling
15023         expand_function_end.
15024         (java_method_add_stmt): New comment before the function's
15025         code. Complement the second operand of the current COMPOUND_EXPR
15026         if necessary.
15027         (java_complete_expand_methods): Don't generate debug info on line
15028         zero when expanding a generated constructor.
15029         (java_complete_expand_method): Set start and end line numbers for
15030         a artificially generated constructor to one and manually call
15031         enter_block and exit_block when defining it. For all methods:
15032         expand function's start calling the new expand_start_java_method
15033         and invoke java_complete_tree on the effective method's body, if
15034         any.
15035         (resolve_expression_name): Now use lookup_name_in_blocks to search
15036         local variable decls and print out an error when variables are
15037         undefined.
15038         (patch_method_invocation_stmt): Inserted comment before the
15039         function's code.
15040         (lookup_method_invoke): Chain method's arguments using chainon
15041         with the current arg list as a second argument. Inserted missing
15042         IDENTIFIER_POINTER when reporting an error on methods not found.
15043         (refine_accessible_methods_list): Don't retain constructors.
15044         (patch_arguments): Function removed.
15045         (java_complete_tree): Inserted comment before the function's
15046         code. New case for BLOCKs. Moved the WFL case a bit
15047         further. Complete function's arguments.
15048         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15049         maybe_absorb_scoping_blocks): New functions.
15050
15051 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15052
15053         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15054         previously set.
15055         * jcf-parse.c (parse_source_file, java_error_count): New forward
15056         and extern declarations.
15057         (java_parse_abort_on_error): Macro moved.
15058         (jcf_parse_source): fatal called if fopen fails. Now calls
15059         parse_source_file.
15060         (parse_source_file): New parse_only parameter. Reflects the
15061         elimination of the second pass.
15062         (yyparse): parse_source_file called with argument set to 0.
15063         * jcf.h (JCF_ZERO): Sets java_source to zero.
15064         * lex.c (java_init_lex): pass argument is gone. Function modified
15065         to be called once during the analysis of a file.
15066         (java_unget_unicode): Fixed typo in fatal message.
15067         (java_get_line_col): Likewise.
15068         (java_lval): Likewise. String literals no longer built during
15069         second pass.
15070         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15071         account.
15072         * parse.h (MODIFIER_WFL): New macro.
15073         (parse_check_super, parser_check_super_interface): Now return int.
15074         (parser_chain_incomplete_item, not_builtin_p,
15075         complete_method_decl): Declarations removed.
15076         (build_method_invocation_stmt, build_invoke): Renamed using the
15077         `patch' instead of `build'
15078         (register-incomplete_type, obtain_incomplete_type,
15079         java_complete_tree, java_complete_expand_method,
15080         unresolved_type_p, create_jdep_list): New function declarations.
15081         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15082         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15083         (jdep): New typedef on new struct _jdep.
15084         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15085         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15086         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15087         JDEP_RESOLVED_P): New macros.
15088         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15089         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15090         JDEP_VARIABLE): New enum values and jdep kinds.
15091         (jdeplist): New typedef on struct _jdeplist.
15092         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15093         macros.
15094         (CALL_EXPR_PRIMARY): New macro.
15095         (struct parser_ctxt): Fields java_pass, current_method_decl,
15096         method_decl_list deleted. New field jdeplist.
15097         (INCOMPLETE_P): Macro deleted.
15098         * parse.y (single_type_import_declaration:): Removed pass switch.
15099         (type_import_on_demand_declaration): Likewise.
15100         (field_declaration:): Removed pass switch on all sub rules.
15101         (class_declaration:): Call the complete_class_decl removed on
15102         class_body rules.
15103         (method_declaration:): Removed second pass switch. No longer chain
15104         methods decl when method_header reduced.
15105         (method_header:): Sub rules no longer depend on pass switch.
15106         (method_declarator:): Likewise.
15107         (method_body:): Likewise.
15108         (abstract_method_declaration:): Likewise.
15109         (block_statement:): Likewise.
15110         (local_variable_declaration:): Likewise.
15111         (argument_list:): Likewise.
15112         (method_invocation:): Likewise. Call to build_method_invocation_stmt
15113         removed. Partial CLASS_EXPR tree node built instead.
15114         (postfix_expression:): Removed pass switch on all sub rules.
15115         (java_pop_parser_context): Free classd_list content.
15116         (yyerror): Call obstrack_grow0 to finalize error message.
15117         (check_class_interface_creation): Comment modified to reflect new
15118         returned value meaning. Removed second pass switch. Return 1 if an
15119         error was found, 0 otherwise. Adjust pointer on filename if a
15120         leading path separator was found.
15121         (maybe_create_class_interface_decl): Removed first pass switch
15122         when linking the class decl to the class_list. Install a new
15123         jdep_list for the class.
15124         (add_superinterfaces): List of unresolved interfaces is
15125         gone. Unresolved interfaces are directly added to the current
15126         dependencies list.
15127         (create_interface): Second pass shortcut removed.
15128         ctpx->modifier_ctx access through MODIFIER_WFL.
15129         (create_class): Second pass shortcut removed. Call to
15130         register_incomplete_type replaces the call to
15131         parser_chain_incomplete_item.
15132         (complete_class_decl): Function removed.
15133         (duplicate_declaration_error): New way of retrieving redeclared
15134         item type.
15135         (register_fields): Call to lookup_modifier_cl replaced by
15136         MODIFIER_WFL. New way of handling unresolved type, using
15137         unresolved_type_p and obtain_incomplete_type.
15138         register_incomplete_type replaces call to parser_chain_incomplete_item.
15139         (patch_stage): New static global variable.
15140         (method_header): New way of handling unresolved type, using
15141         unresolved_type_p and obtain_incomplete_type. patch_stage used to
15142         indicates that the method decl needs to be patched.
15143         (check_abstract_method_header): Call to lookup_modifier_cl
15144         replaced by MODIFIER_WFL.
15145         (method_declarator): Incomplete argument type are registered
15146         calling register_incomplete_type. Patch on the declared method is
15147         issued in that case.
15148         (unresolved_type_p): New function.
15149         (parser_check_super_interface): New comment to reflect function's
15150         modified returned type (int). Function and has a new argument
15151         this_wfl. Call to parse_error_context uses this_wfl instead of
15152         relying on lookup_cl.
15153         (parser_check_super): Comment reflects function's new returned
15154         type (int). Function returns nonzero value on error.
15155         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15156         register_incomplete_type, jdep_resolve_class): New functions to
15157         handle incomplete types in declarations.
15158         (java_complete_class): Rewritten to work with the new incomplete
15159         type handling scheme.
15160         (complete_class_report_errors): Likewise.
15161         (complete_method_decl): Removed: it jobs is now handled by
15162         java_complete_class.
15163         (do_resolve_class): Class loaded in not already loaded and not
15164         found in Java source code.
15165         (java_check_regular_methods, java_check_abstract_methods): Don't
15166         call complete_method_decl anymore.
15167         (lookup_modifier_cl, not_builtin_p): Functions deleted.
15168         (read_import_dir): Got rid of the pass number dependency.
15169         (declare_local_variables): New handling of unresolved types (patch
15170         issued).
15171         (source_start_java_method): New parameter level. Function called
15172         with level set to 1 when argument types are potentially
15173         unresolved.  Called to complete the job with level set to 2 once
15174         types are complete.
15175         (source_end_java_method): Call to permanent_allocation
15176         removed. Waiting to be replaced by a more suitable obstack
15177         management.
15178         (java_complete_expand_methods, java_complete_expand_method,
15179         java_expand_finals): New functions.
15180         (build_method_invocation_stmt): Renamed
15181         patch_method_invocation_stmt. Extracts function call expression
15182         (wfl) and arguments (args) from CALL_EXPR tree operands.
15183         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15184         call. Patch the function and argument operand of the CALL_EXPR
15185         tree argument.
15186         (patch_argument, java_complete_tree): New functions.
15187
15188 1998-04-20  Per Bothner  <bothner@cygnus.com>
15189
15190         Recover from missing fields and methods (i.e. error instead of fatal).
15191         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
15192         * expr.c (expand_invoke):  Recover from missing method.
15193         (expand_java_field_op):  Recover from missing field.
15194         Inline references to java.lang.{Integer,Char,...}.TYPE.
15195         * typeck.c (get_type_from_signature), java-tree.h:  New function.
15196         * class.c (add_method):  Use get_type_from_signature.
15197         (build_class_ref):  Handle a class that was not found.
15198         * typeck.c (convert):  Handle conversion to pointers (for convenience).
15199         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
15200         instead of lookup_field to handle missing fields.
15201
15202         * jcf-parse.c (process_zip_dir):  Set java_source.
15203
15204 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
15205
15206         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15207
15208 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15209
15210         * jcf-parse.c (load_class): Don't change input_filename before
15211         calling jcf_parse_source (but still do it before calling
15212         jcf_parse).
15213         (jcf_parse_source): Assign input_filename after having saved the
15214         parser context.
15215         * lex.c (java_init_lex): Chain a WFL node to the import on demand
15216         list. ctxp->modifier_ctx zeroed according to its new
15217         definition. ctxp->filename initialized. Removed
15218         JAVA_MODIFIER_CTX_UNMARK.
15219         (java_unget_unicode): Update the character based column position.
15220         (java_allocate_new_line): ref_count not used anymore. Always free
15221         ctxp->p_line. Initialize c_line->char_col to 0.
15222         (java_get_unicode): Update the character based column position.
15223         (java_lex): Use ctxp->elc to store current position in source
15224         file, at the beginning of the parsed token. Set modifier_ctx entry
15225         corresponding to the parse modifier to a WFL node. Return a WFL
15226         node when an identifier is parsed.
15227         (java_lex_error): Now uses ctxp->elc to store current position in
15228         source.
15229         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15230         * lex.h (build_wfl_node): New function definitions.
15231         (struct java_line): ref_count and next fields are gone. New field
15232         char_col.
15233         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15234         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15235         (JAVA_COLUMN_DELTA): New macro.
15236         (java_lc): New typedef on new struct _java_lc.
15237         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15238         (parse_error_context, parse_warning_context): Changed prototypes.
15239         (java_get_line_col): Added as an available global function.
15240         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15241         (IC_DECL): Replaced by macro IC_TYPE
15242         (DEPEND_WFL): New macro.
15243         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15244         wrong modifier.
15245         (exit_java_complete_class): Removed a commented out statement.
15246         (struct parser_ctxt): Added comments on fields. modifier_ctx is
15247         now an array of tree nodes. Deleted fields line_list and
15248         e_line. New field elc, to replace e_line.
15249         * parse.y (array_type:): Build WFL node.
15250         (qualified_name:): Build a single WFL node out of two. Retain
15251         the location information of the first node in the resulting node.
15252         (package_declaration:): Use package name as a WFL node
15253         (single_type_import_declaration:): Use imported name as a WFL node.
15254         (type_import_on_demand_declaration:): Use root of the imported
15255         packages as a WFL node.
15256         (field_declaration:): Removed unused local variable cl.
15257         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15258         (yyerror): New static elc. Removed static error_line, error_pos.
15259         New local code_from_source. Save ctxp->elc into elc at the first
15260         pass. Call java_get_line_col to get a string of the line where
15261         the error occurred.
15262         (debug_line): Removed static function.
15263         (parse_error_context, parse_warning_context): Parameter cl is now
15264         a WFL node. Use its value to initialize ctxp->elc.
15265         (redefinition_error): Parameter cl is now a WFL node.
15266         (parse_add_interface): New parameter wfl. No longer call
15267         lookup_cl, use wfl instead.
15268         (check_class_interface_creation): Parameter cl is now a WFL node.
15269         (maybe_create_class_interface_decl): Likewise.
15270         (add_superinterfaces): New function.
15271         (create_interface): Removed local cl, node, super_decl,
15272         super_decl_type.  Function now uses id as a WFL node. Better
15273         warning/error report on obsolete or forbidden mix of
15274         modifiers. Now calls add_superinterfaces to register interfaces.
15275         (create_class): Removed local cl, node. Local variable id is used
15276         as a WFL node. Better error report on forbidden modifier
15277         mix. Uses add_superinterfaces to register interfaces.
15278         (find_field): Argument cl is now a WFL node. Now store the WFL
15279         node of a fields that needs to be checked for their
15280         initialization.
15281         (method_header): Local variable node non longer used. Local
15282         variable id replaces cl.
15283         (check_modifiers_consistency): Local variable cl is now a WFL
15284         node.
15285         (method_declarator): Local variable cl replaced by parameter id.
15286         (parser_qualified_name): Now uses parameter name as a WFL node.
15287         (parser_check_super_interface): New parameter wfl, for achieve
15288         greater accuracy during error reports.
15289         (parser_chain_incomplete_item): New parameter named location. Used,
15290         along the decl, to construct the incomplete item node.
15291         (java_complete_class): resolve_class now uses WFL node extracted
15292         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15293         where appropriate.
15294         (complete_method_decl): Unresolved function's argument types are WFL.
15295         (resolve_class): Parameter cl is now a WFL node.
15296         (resolve_and_layout): Likewise.
15297         (do_resolve_class): Likewise. Try first to use cl and then do the
15298         lookup on the decl when calling check_pkg_class_access.
15299         (complete_class_report_errors): Use IC_TYPE in place of
15300         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15301         instead of doing a lookup over the decl.
15302         (java_check_final): Use WFL info from field tree list.
15303         (lookup_cl): Rewritten and returns a statically defined WFL node.
15304         (lookup_modifier_cl): Now uses information from WFL nodes.
15305         (process_imports): Likewise.
15306         (read_import_dir): name and cl arguments replaced by a single WFL
15307         node. Function modified accordingly.
15308         (find_in_imports_on_demand): Now uses WFL node.
15309         (check_pkg_class_access): cl argument is now a WFL node.
15310         (declare_local_variables): Fixed to use WFL nodes.
15311         (resolve_expression_name): Likewise.
15312         (build_method_invocation_stmt): name_combo argument renamed
15313         wfl. Function modified to use WFL nodes.
15314         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15315         (lookup_method_invoke): cl is now a WFL node. Added missing
15316         IDENTIFIER_POINTER to class type decl name.
15317
15318 1998-04-14  Dave Brolley  <brolley@cygnus.com>
15319
15320         * lang.c (init_parse): Now returns char* containing the filename.
15321
15322 1998-04-10  Per Bothner  <bothner@cygnus.com>
15323
15324         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
15325
15326         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
15327         * class.c (make_class_data):  If flag_assume_compiled, initial class
15328         state is CSTATE_PREPARED; make superclass and interfaces direct
15329         references, rather than constant pool indexes.
15330
15331 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15332
15333         * parser.y: Include flags.h. Removed debug variable pl.
15334         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15335         (block:): Likewise.
15336         (labeled_statement_nsi:): Generate debug info when reducing
15337         expression_statement:.
15338         (check_pkg_class_access): get_access_flags_from_decl invocation
15339         fixed for new CLASS_* flags location.
15340         (source_end_java_method): Save/restore parser context when
15341         entering/leaving this routine. Restore lineno to its right value
15342         before calling expand_end_bindings.
15343         (build_method_invocation_stmt): build_invoke called with the
15344         current line information.
15345         (build_invoke): New argument cl. Wrap the function call around a
15346         wfl node.
15347         (refine_accessible_methods_list): Changed comment, removed
15348         unnecessary code.
15349         * parse.h: Fixed typo in comments.
15350         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15351         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15352         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15353         parser_ccb_indent.
15354         * lex.c (java_lex): Record the last closing curly bracket of a
15355         function.
15356         * jcf-parse.c (jcf_parse_source): Now calls
15357         java_check_methods. Clarified comment, fixed typo.
15358
15359 1998-04-09  Dave Brolley  <brolley@cygnus.com>
15360
15361         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15362         (finish_parse): Expose for non USE_CPPLIB builds.
15363
15364 1998-04-08  Jeffrey A Law  (law@cygnus.com)
15365
15366         * lang.c (lang_print_xnode): New function.
15367
15368 1998-04-03  Per Bothner  <bothner@cygnus.com>
15369
15370         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
15371         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
15372         used to build a class's dispatch table.
15373         (make_class_data):  Generate dispatch table if flag_assume_compiled.
15374         Set dtable of class object to address of class_dtable_decl.
15375
15376         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
15377         be volatile and have side effects - generates better code.
15378
15379         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
15380         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
15381
15382         * expr.c (expand_invoke):  If class is final, method is
15383         effectively final, so can call it directly.
15384
15385         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
15386
15387         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
15388
15389 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15390
15391         * parse.y (build_method_invocation_stmt): Removed extra argument
15392         to build_invoke.
15393
15394 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15395
15396         * expr.c (dtable_indent): Now static global.
15397         (expand_invoke): Now call invoke_build_dtable and
15398         build_invokevirtual.
15399         (invoke_build_dtable, build_invokevirtual): New functions.
15400         * jcf-io.c (find_class): Defer issuing a warning by setting
15401         jcf->outofsynch to 1.
15402         * jcf-parse.c (jcf_out_of_synch): New function.
15403         (load_class): Test this_jcf.outofsynch flag and call
15404         jcf_out_of_synch accordingly.
15405         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
15406         comment indentation.
15407         * lex.c (java_get_unicode): Fixed code indentation.
15408         (java_lex): Create string literal. Fixed typo. Removed several
15409         premature obstack_free.
15410         * parse.h: New enums for name resolution and invocation mode.
15411         (struct qualification): New data structure.
15412         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
15413         (do_resolve_class, build_method_invocation_stmt,
15414         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
15415         debug_line, identical_subpath_p, invocation_mode,
15416         refine_accessible_methods_list, build_invoke,
15417         lookup_method_invoke): New functions declared.
15418         (build_invokevirtual, invoke_build_dtable, match_java_method,
15419         build_field_ref, jcf_out_of_synch): New references to external
15420         functions.
15421         (struct parse_ctxt): Removed artificial_constructor field.
15422         * parse.y: (array_type:): Type defined for this rule.
15423         (class_type:): Installed default rule for interface_type:.
15424         (array_type:): Now build Java array type.
15425         (qualified_name:): Now use obstack_grow0.
15426         (method_declaration:): Skip the artificial constructor added to
15427         the list, if any.
15428         (abstract_method_declaration:): Execute the code only during pass 1.
15429         (block:): Installed default rule in block_statements:.
15430         (block_statement:): Add the statement to the method during pass 2.
15431         (statement_expression): Installed default rule for
15432         method_invocation:.
15433         (argument_list:): Added code to build the argument list.
15434         (method_invocation:): Added call to create the method invocation
15435         node.
15436         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
15437         (debug_line): New function for debug.
15438         (complete_class_decl): No longer do something during pass 1.
15439         (method_header): Use BUILD_PTR_FROM_NAME.
15440         (parser_qualified_classname): Use obstack_grow0. Removed bogus
15441         obstack_free.
15442         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
15443         function's main comment.
15444         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
15445         classes.
15446         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
15447         (resolve_class): Now works with arrays.
15448         (do_resolve_class, resolve_and_layout): New functions.
15449         (java_check_regular_methods): Reverse method list before and after
15450         having processed it. No longer set ctxp->artificial_constructor.
15451         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
15452         accordingly. Fixed typo in issued error message. Now use
15453         obstack_grow0.
15454         (find_in_imports_on_demand): Now use obstack_grow0.
15455         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
15456         (source_end_java_method): Call expand_expr_stmt instead of
15457         expand_expr. Calls it before calling expand_function_end.
15458         (java_method_add_stmt): Do nothing if errors were found during
15459         parsing.
15460         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
15461         (build_method_invocation_stmt, build_invoke, invocation_mode,
15462         lookup_method_invoke, refine_accessible_methods_list,
15463         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
15464         New functions.
15465         * typeck.c (build_java_signature): Properly end method signature
15466         if return type skipped.
15467         (match_java_method): New function.
15468
15469 1998-03-16  Per Bothner  <bothner@cygnus.com>
15470
15471         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
15472
15473 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15474
15475         * expr.c (build_invoke_non_interface): New function.
15476         (methods_ident, ncode_ident): Now static globals.
15477         (expand_invoke): Use build_invoke_non_interface.
15478         * java-tree.h (struct lang_decl): New field function_decl_body.
15479         (DECL_FUNCTION_BODY): New macro.
15480         * jcf-parse.c (jcf_parse_source): Deeper check before setting
15481         CLASS_FROM_SOURCE_P.
15482         (parse_source_file): Fixed typos. Call java_layout_parsed_class
15483         before starting pass 2. Call to java_generate_parsed_class replaced
15484         by java_register_parsed_class.
15485         * lex.c: Fixed typo in header. Some line width related formating.
15486         * lex.h: Some line width related formating.
15487         * parse.h (source_end_java_method, resolve_expression_name,
15488         complete_class_decl, maybe_create_class_interface_decl,
15489         check_class_interface_creation): New static function declarations.
15490         (java_layout_parsed_class, java_method_add_stmt): New function
15491         declarations.
15492         (struct parser_ctxt): Field mark_class_generate removed. New
15493         fields class_list and artificial_constructor.
15494         * parse.y: Fixed typo in header.
15495         (class_declaration:): Call complete_class_decl when class body
15496         parsed.
15497         (method_declaration:): Call source_end_java_method in pass 2 when
15498         the method body is defined.
15499         (postfix_expression:): Do expression name resolution on sub-rule
15500         name during pass 2.
15501         (create_class, create_interface): Merged common pieces.
15502         (check_class_interface_creation, maybe_create_class_interface_decl):
15503         New functions.
15504         (complete_class_decl): New function.
15505         (register_fields): Fixed line width related typo.
15506         (method_header): Correctly skip first argument when fixing
15507         argument line. Changed the loop.
15508         (java_check_circular_reference): Now use ctxp->class_list.
15509         (java_complete_class): Removed start/stop marking.
15510         (java_check_regular_methods): Now takes a class decl as an
15511         argument.  Add default constructor if none were encountered.
15512         (java_check_methods): Now use ctxp->class_list. Changed call to
15513         java_check_regular_methods.
15514         (source_start_java_method): Set DECL_ARG_TYPE for each function
15515         arguments.
15516         (source_end_java_method, java_method_add_stmt): New functions.
15517         (java_generate_parsed_class): No longer exists.
15518         (java_layout_parsed_class, java_register_parsed_class): New functions.
15519         (resolve_expression_name): New function.
15520
15521 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15522
15523         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
15524         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
15525         until pass initializations are done. Call read_import_dir with
15526         pass set to 0.
15527         * parse.h: (lookup_modifier_cl): New function declared.
15528         (INTERFACE_FIELD_MODIFIERS): New macro.
15529         (OBSOLETE_MODIFIER_WARNING): New macro.
15530         * parse.y: (register_fields): Class type and current field name in
15531         local variables. Check modifier(s) if adding field(s) to an interface.
15532         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
15533         and report errors using the faulty modifier line context.
15534         (lookup_modifier_cl): New function.
15535         (read_import_dir): Detect and report default import processing
15536         failure.
15537
15538 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
15539
15540         Add a pair of -fassume-compiled/-fno-assume-compiled options.
15541         * class.c (is_compiled_class): Return 1 after making sure it
15542         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
15543         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
15544         * java-tree.h (flag_assume_compiled): Add decl.
15545         * lang.c (lang_f_options): Add the flag.
15546         (flag_assume_compiled): Add decl, default to 0.
15547
15548 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15549
15550         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
15551         (is_compiled_class): Likewise.
15552         (layout_class): Likewise.
15553         (layout_class): Detect and lay out classes defined in source code.
15554         (interface_of_p, add_interface_do, may_add_interface): New
15555         function.
15556         (add_interface): Now use add_interface_do.
15557         (add_method_1): New function.
15558         (add_method): Now use add_method_1.
15559         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
15560         (complete_start_java_method): New function.
15561         (start_java_mehod): Now call complete_start_java_method.
15562         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
15563         (expand_invoke): Likewise and fixed typo.
15564         *gjava.c: (print_super_field): Use new argument to find_class
15565         DO_CLASS_FILE.
15566         (main): Likewise.
15567         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
15568         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
15569         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
15570         IDENTIFIER_NODE.
15571         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
15572         (add_method_1, push_class): New prototypes.
15573         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
15574         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
15575         directory where the class was found.
15576         (find_class): New argument DO_CLASS_FILE. Function find_class
15577         modified accordingly.
15578         *jcf-parse.c: (fix_class_path): New function.
15579         (load_class): Use new VERBOSE argument. load_class now finds and
15580         loads/parses .class/.java files. Save read_state of current_jcf
15581         if necessary.
15582         (java_parser_abort_on_error): New macro.
15583         (jcf_parse_source, parse_source_file): New function.
15584         (jcf_parse): Fixed typo.
15585         (yyparse): Call parse_source_file () only.
15586         (process_zip_dir): Fixed typo, fix zdir->filename_length when
15587         writing the real class name back in the zip directory entry.
15588         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
15589         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
15590         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
15591         (find_class): Prototype fixed.
15592         *lex.c: Added 1998 time stamp.
15593         Removed all static global variables, moved into the parser
15594         context data structure.. Now include unistd.h if SEEK_SET not
15595         defined.
15596         (java_init_lex): Rewritten.
15597         (java_sneak_unicode): Modified current unicode access in current line.
15598         (java_unget_unicode): Likewise.
15599         (java_allocate_new_line): New allocation management.
15600         (java_read_char): Modified access and storage of unget_utf8_value.
15601         New way of processing current unicode.
15602         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
15603         (java_get_unicode): Now use the parser context.
15604         (java_lineterminator): Likewise.
15605         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
15606         of the reentrant parser implementation. Function now use the
15607         parser context data structure and java_lval. Fixed production of
15608         the float and double constant "out of range" error message. Fixed
15609         obstack use. Return integer value when hitting a modifier. Now
15610         return type for TRUE, FALSE and other predefined types. Return
15611         identifier as a TREE_LIST list containing the current line context
15612         as the TREE_VALUE sub-node.
15613         (java_unicode_2_utf8): Fixed typo in declaration.
15614         (java_lex_error): Now use the parser context data structure.
15615         *lex.h: Added 1998 time stamp.
15616         (struct java_line): New fields ref_count and next.
15617         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15618         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
15619         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
15620         *parse.h: Added 1998 time stamp.
15621         (java_parse_source_file): Renamed from parse_source_file.
15622         (YYERROR_NOW, YYNOT_TWICE): Fixed.
15623         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
15624         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
15625         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
15626         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
15627         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
15628         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
15629         (struct parser_ctxt): New data structure to keep the parser context.
15630         *parse.y: Added 1998 time stamp, got rid of static global variables.
15631         (java_error_count, ctxp): New global variables.
15632         (%union): New value field.
15633         (numeric_type, integral_type): Rules removed.
15634         (primitive_type): Rule defined to handle integral, float, double and
15635         boolean types.
15636         (qualified_name, package_declaration,
15637         single_type_import_declaration, type_import_on_demand_declaration,
15638         modifiers, class_declaration, super, interfaces,
15639         interface_type_list, class_body, field_declaration,
15640         field_declaration, variable_declarators, variable_declarator,
15641         variable_declarator_id, method_declaration, method_header,
15642         formal_parameter_list, formal_parameter, method_body, block,
15643         static, interface_declaration, extends_interfaces,
15644         abstract_method_declaration, local_variable_declarators): Rules now
15645         define actions.
15646         (force_error, do_warning): New global statics.
15647         (push_parser_context, parser_context_save_global,
15648         parser_context_restore_global, pop_parser_context): New functions.
15649         (yyerror): Now uses the global parser context. Fixed use of obstack.
15650         (parse_error, parse_error_context, parse_warning_context,
15651         java_accstring_lookup, redefinition_error, check_modifiers,
15652         parser_add_interface, create_interface, create_class, find_field,
15653         duplicate_declaration_error, register_fields, method_header,
15654         check_modifiers_consistency, check_abstract_method_header,
15655         method_declarator, parser_qualified_classname,
15656         parser_check_super_interface, parser_check_super,
15657         parser_chain_incomplete_item, java_check_circular_reference,
15658         layout_class_from_source, java_complete_class,
15659         complete_method_decl, resolve_class, complete_class_report_errors,
15660         java_check_final, check_method_redefinition,
15661         java_check_regular_methods, java_check_abstract_methods,
15662         java_check_methods, lookup_java_interface_method2,
15663         lookup_java_method2, lookup_cl, find_name_in_single_imports,
15664         process_imports, find_in_imports, read_import_entry,
15665         read_import_dir, find_in_imports_on_demand,
15666         check_pkg_class_access, not_builtin_p, declare_local_variables,
15667         source_start_java_method, java_generate_parsed_class): New
15668         functions.
15669         *typeck.c: (signature_include_return): New global variable.
15670         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
15671         to add the function returned type in the signature.
15672
15673 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
15674
15675         * jcf-io.c (open_in_zip): Use strncmp and LEN.
15676
15677 1998-01-29  Dave Brolley  <brolley@cygnus.com>
15678
15679         * Make-lang.in (java.info): Added.
15680         (java.install-info): Added
15681
15682 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
15683
15684         * Makefile.in (clean): Also remove java/parse.c.
15685
15686 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
15687
15688         Add a pair of -fbounds-check/-fno-bounds-check options.
15689         * lang.c (lang_decode_option): Add code to grok arguments.
15690         (flag_bounds_check): Add decl.
15691         (lang_f_options): New array w/ the option in it.
15692         * java-tree.h (flag_bounds_check): Add decl.
15693         * lang-options.h: New file.
15694         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
15695         of a static macro value.
15696         (JAVA_ARRAY_EXCEPTION): Delete macro.
15697
15698 1998-01-23  Per Bothner  <bothner@cygnus.com>
15699
15700         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
15701         * expr.c (build_anewarray):  Add missing promote_type.
15702
15703 1998-01-22  Per Bothner  <bothner@cygnus.com>
15704
15705         Add array types with known length to optimize bounds checking.
15706         * typeck.c (build_java_array_type):  Take length parameter.
15707         (java_array_type_length, build_prim_array_type):  New functions.
15708         * java-tree.h:  Update for new functions.
15709         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
15710         * class.c:  Use build_prim_array_type.
15711         * expr.c (can_widen_reference_to):  Handle known-length array types.
15712         (verify_jvm_instructions):  Keep track of integer push instructions
15713         followed by newarray/anewarray, so we can build known-length arrays.
15714         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
15715         (java_array_data_offset):  New function.
15716         (build_java_array_length_access):  New function.  Optimize if constant.
15717         (build_java_arrayaccess):  Constant fold bounds check.
15718         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
15719         (build_newarray, build_anewarray):  New functions.
15720         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
15721         * verify.c (merge_types):  Handle known-lengh array types.
15722
15723 1998-01-19  Per Bothner  <bothner@cygnus.com>
15724
15725         * expr.c (expand_byte_code):  Fix performace bug, which caused
15726         searching linenumber_table to be linear rather than constant.
15727
15728 1997-12-12  Per Bothner  <bothner@cygnus.com>
15729
15730         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
15731
15732         * decl.c, java-tree.h (soft_fmod_node):  New global.
15733         * decl.c (init_decl_processing):  Define __builtin_fmod.
15734         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
15735         using __builtin_fmod.
15736
15737 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15738
15739         * keyword.h: New file, output of keyword.gperf as processed by
15740         gperf.
15741         * lex.c (java_lex_init): Initialize java_error_flag.
15742         * parse.c (YYERROR_NOW): Uses java_error_flag.
15743         * parse.y: New static java_error_flag. Useless definition of
15744         buffer_error gone.
15745         * parse.y (java_error): Portable error recovery using
15746         java_error_flag (not yet completely tuned).
15747
15748 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
15749
15750         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
15751
15752 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15753
15754         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
15755         (parse.c, lex.c, keyword.h): New rules for Java source code
15756         front-end.
15757         * parse.c: Renamed into jcf-parse.c.
15758         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
15759         * keyword.gperf: New file, Java keywords.
15760         * parse.y: New file, Java language grammar.
15761         * parse.h: New file, Java language grammar definitions.
15762         * lex.c: New file, Java language lexer.
15763         * lex.h: New file, Java language lexer definitions.
15764
15765 1997-12-03  Per Bothner  <bothner@cygnus.com>
15766
15767         * decl.c (clinit_identifier_node), java-tree.h:  New global.
15768         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
15769         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
15770         * expr.c (expand_java_field_op):  Check for invalid assignment
15771         to final field.
15772
15773         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
15774
15775 1997-10-27  Per Bothner  <bothner@cygnus.com>
15776
15777         * verify.c (verify_jvm_instructions):  When processing a handler,
15778         attempt to set the current_subr to the right value.
15779         (More complicated code combines Sep 17 and Oct 22 versions.)
15780
15781 1997-10-24  Per Bothner  <bothner@cygnus.com>
15782
15783         * class.c (push_class):  Figure out (guess) name of source file.
15784         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
15785         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
15786         (parse_class_file):  Change return type from int to void.
15787         Call debug_start_source_file/debug_end_source_file.
15788
15789         * expr.c (build_java_binop):  Fix masking 2nd operand.
15790         * decl.c (init_decl_processing):  Set sizetype first.
15791
15792 1997-10-22  Per Bothner  <bothner@cygnus.com>
15793
15794         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
15795         (Revert Sep 17 change.)
15796
15797 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15798
15799         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
15800         .class extension in their name and fix thing so we don't process
15801         them parse_zip_file_entries().
15802         (parse_zip_file_entries): Cleaned unused local variables.
15803
15804 1997-10-20  Per Bothner  <bothner@cygnus.com>
15805
15806         * expr.c (can_widen_reference_to):  Allows equal array element types.
15807         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
15808         * jcf-dump.c (RET):  Get (and print) index.
15809
15810         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
15811         Promote element type to POINTER_TYPE.
15812
15813 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15814
15815         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
15816         find_in_current_zip, jcf_figure_file_type): Moved from
15817         jcf-reader.c to parse.c.
15818         * zextract.c: (read_zip_archive): takes file_comment_length possible
15819         field into account.
15820
15821 1997-10-20  Per Bothner  <bothner@cygnus.com>
15822
15823         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
15824
15825         * verify.c (merge_types):  Handle array types even better ...
15826
15827 1997-10-17  Per Bothner  <bothner@cygnus.com>
15828
15829         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
15830
15831         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
15832         * class.c (make_class_data):  Don't build fields_decl if no fields.
15833         When building fields_decl, skip if DECL_ARTIFICIAL.
15834
15835         * expr.c (java_stack_swap):  Update stack_type_map.
15836         * verify.c (merge_types):  Handle array types better.
15837
15838 1997-10-15  Per Bothner  <bothner@cygnus.com>
15839
15840         * class.c (add_field):  Don't promote short integral fields to
15841         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
15842         * expr.c (push_value):  Promote and convert short integral values.
15843
15844         * decl.c, java-tree.h (integer_two_node):  New constant node.
15845         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
15846
15847 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15848
15849         * class.c (append_gpp_mangled_type): Use function argument
15850         unpromoted type to generate mangled name.
15851
15852 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15853
15854         * constants.c (build_constant_data_ref): Now uses current_class
15855         instead of main_class.
15856         (build_constants_constructor): Now uses current_class instead of
15857         main_class.
15858         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
15859         of the global variable SeepZipFiles done here.
15860         * zextract.c (read_zip_archive): extra_field optional field taken
15861         into account while computing the position of the class file in the
15862         archive.
15863         * verify.c (verify_jvm_instructions): Use current_jcf to search
15864         the constant pool.
15865         * parse.c (load_class): First search for the class to load in the
15866         current zip file. Saves current_jcf (restored before returning
15867         from that function). Don't call JCF_FINISH in the class was found
15868         in the current ZIP file.
15869         (jcf_parse): If the class was found in the current ZIP file, save
15870         its tree_constant_pool (for later reuse).
15871         (parse_class_file): New function. Process each method defined in
15872         the current class and record the class as to be later registered.
15873         (yyparse): Rewritten. Figure the type of the current file and switch
15874         accordingly.
15875         * lang.c: New global variable current_jcf.
15876         (lang_init): Removed compiling_from_source test (done later, in
15877         yyparse). Removed call the jcf_parse ().
15878         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
15879         (typedef struct JCF): New fields seen_in_zip (to mark a class found
15880         in the current ZIP file) and zip_offset (offset to the class data in
15881         the current zip file).
15882         * jcf-reader.c: zipfile.h included.
15883         localToFile: New ZipFileCache static global variable
15884         (parse_zip_file_entries): New function. Browse the current ZIP
15885         file directory and process each class found.
15886         (process_zip_dir): New function. Register each class found in the
15887         ZIP file directory. The class aren't parsed but a valid JCF is
15888         link to each of them.
15889         (find_in_current_zip): New function. Search for a class in the
15890         current ZIP file directory. If found, prepare the class so that it
15891         can be loaded.
15892         (jcf_figure_file_type): New function. Examine the file structure
15893         to figure a class file, a ZIP file. If none of these categories are
15894         matched, a source file is assumed.
15895         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
15896         SeenZipFile: New global variable.
15897         (open_in_zip): Use zipmember's length to accelerate the search for
15898         a member. If zipmember was NULL and zip file successfully read,
15899         return 0.
15900         * java-tree.h: New global variable current_jcf declared.  Added
15901         declaration for current_constant_pool_tags, current_constant_pool_data,
15902         current_constant_pool_length, current_constant_pool_data_ref.
15903         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
15904         store the JCF of classes seen in a zip file) and tree *constant_pool
15905         (to save a loaded class constant pool). current_class declared here.
15906         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
15907         retrieve method_ref_constant.
15908         (PUSHC): java_push_constant_from_pool now uses current_jcf.
15909         (OBJECT): get_class_constant now uses current_jcf.
15910         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
15911         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
15912         (expand_invoke): Now uses current_class instead of main_class
15913         (build_class_init): Now uses current_class instead of main_class
15914         * class.c: New static global variable registered_class.
15915         (register_class): New function.
15916         (emit_register_class): Modified to use registered_class instead of
15917         main_class
15918         (is_compiled_class): Now take into account class seen in the archive.
15919
15920 1997-10-06  Per Bothner  <bothner@cygnus.com>
15921
15922         * except.h:  Renamed to: java-except.h.
15923         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
15924         * except.c:  Add semi-working (commented out) implementation.
15925
15926         * expr.c (expand_iinc):  Add needed flush_quick_stack.
15927         * parse.c (set_source_filename):  New function.
15928         (give_name_to_class):  Set input_filename from package.classname.java.
15929
15930         * jcf-io.c (find_class):  Don't look first in ".".
15931
15932 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15933
15934         * zextract.c (read_zip_archive): Now takes into account the
15935         extra_field field.
15936         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
15937
15938 1997-09-20  Per Bothner  <bothner@cygnus.com>
15939
15940         * constants.c, java-tree.h (build_internal_class_name):  New function.
15941         (alloc_class_constant):  Re-implement using build_internal_class_name.
15942         * class.c (make_class_data):  Likewise.
15943         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
15944
15945 1997-09-17  Per Bothner  <bothner@cygnus.com>
15946
15947         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
15948         to NULL before pushing an exception handler target.
15949
15950         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
15951         (java_stack_swap, java_stack_dup):  Re-write to be safe from
15952         clobbering registers.
15953         (build_class_init):  New function.
15954
15955 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15956
15957         * typeck.c (build_java_array_type): Temporary use
15958         permanent_obstack to create the array 'length' field.
15959         * expr.c (lookup_label): Temporay use permanent_obstack to create
15960         label if not found.
15961         * class.c (push_super_field): Tempory use permanent_obstack.
15962
15963 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15964
15965         * typeck.c (type_for_mode): Now handles double_type_node and
15966         float_type_node.
15967         * verify.c (verify_jvm_instructions): The instruction following
15968         the wide bytecode is checked. OPCODE_ret added to the list of
15969         wide.
15970
15971 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15972
15973         * class.c (make_class): Temporary use permanent_obstack. Set the
15974         class CLASS_P field to 1.
15975         (push_class): Temporary use permanent_obstack.
15976         (set_super_info): Temporary use permanent_obstack.
15977         (add_method): Temporary use permanent_obstack, set
15978         METHOD_TRANSIENT().
15979         (add_field): Temporary use permanent_obstack. Sets
15980         FIELD_VOLATILE() and FIELD_TRANSIENT().
15981         (build_class_ref): Temporary use permanent_obstack if the class
15982         isn't compiled.
15983         (build_static_field_ref): Temporary use permanent_obstack when
15984         creating field's rtl.
15985         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
15986         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
15987         and fields. Function finalized, as far as flag handling.
15988         (push_class_static_dummy_field): Temporary use permanent_obstack.
15989         (emit_register_class): Force generation of class registration at
15990         -O3 or deeper.
15991         * decl.c (end_java_method): Call permanent_allocation() before
15992         returning.
15993         * expr.c (can_widen_reference_to): Added comment to interface
15994         handling, fixed typo.
15995         (lookup_field): Now uses CLASS_P() to correct FIXME
15996         (expand_invoke): Verification on public && !static &&
15997         !abstract moved into soft_lookupinterfacemethod (kaffe).
15998         Use Object class dtable if objectref is an array when expanding
15999         invokeinterface.
16000         (java_push_constant_from_pool): Temporary use permanent_obstack
16001         for CONSTANT_string
16002         * parse.c (get_ref_constant): Temporary use permanent_obstack to
16003         create constant references.
16004         (get_constant): Temporary use permanent_obstack to create constant.
16005         (load_class): Temporary use permanent_obstack to load class.
16006         (jcf_parse): Temporary use permanent_obstack to perform class
16007         layout.
16008         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16009         (build_java_signature): Temporary use permanent_obstack.
16010         * verify.c: (verify_jvm_instruction): removed unnecessary verification
16011         on ACC_SUPER flag.
16012         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16013         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16014         (CLASS_P): Defined
16015
16016 1997-09-11  Per Bothner  <bothner@cygnus.com>
16017
16018         * class.c (append_gpp_mangled_type):  Fix typo.
16019         (emit_register_class):  Use main_class to get class object, rather
16020         than looking for no-longer-existing static decl starting with _CL.
16021         * typeck.c (parse_signature_type):  Promote array element type
16022         if it is a RECORD_TYPE.
16023
16024 1997-09-10  Per Bothner  <bothner@cygnus.com>
16025
16026         * class.c (push_class_static_dummy_field):  New function.
16027         (mangle_static_field):  New. Do G++-style mangling of static fields.
16028         (layout_class):  Mandle static fields here, not in add_field.
16029         (build_class_ref):  The class object is now a dummy static field.
16030         * decl.c (find_local_variable):  Look for best, instead of first match.
16031         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
16032         (build_java_athrow):  Don't check here if exception is Throwable.
16033         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
16034         (TYPE_USED):  Removed.  No longer used ...
16035         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
16036         * verify.c (push_pending_label):  New function.
16037         (push_pending_block):  Renamed to check_pending_block.
16038         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
16039         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
16040         re-checking possible handlers) after a store (less wasted work).
16041         Check for null handler (finally) before calling add_handler.
16042         Various changes to (finally?) correctly handle try/finally.
16043
16044 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16045
16046         * class.c: Include stdio.h.
16047
16048 1997-09-04  Per Bothner  <bothner@cygnus.com>
16049
16050         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16051         to make sure class is initialized before static/special invoke.
16052
16053         * verify.c (verify_jvm_instructions):  On a store instruction,
16054         call find_local_variable to force pre-allocation of decl and rtx.
16055         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
16056
16057 1997-09-03  Per Bothner  <bothner@cygnus.com>
16058
16059         * class.c (build_class_ref):   Strip off "promoted_" if need be.
16060         (make_field_value): Call build_java_signature when needed.
16061         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
16062         * expr.c (build_java_athrow):  Don't push_value of exception.
16063         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16064         match specification of [fd]cmp[lg] for NaNs.
16065         (expand_byte_code):  Add support for exception handler ranges.
16066         * except.c:  Add skeleton for EH code-generation.
16067         * verify.c (merge_types):  Treat all promoted integral types as equal.
16068         * constants.c (build_constants_constructor):  To force creation of
16069         current_constant_pool_data_ref, call build_constant_data_ref.
16070
16071         * javaop.def (lload):  Fix typo.
16072         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
16073
16074 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
16075
16076         * parse.c: Don't include function.h.
16077
16078 1997-08-27  Per Bothner  <bothner@cygnus.com>
16079
16080         * except.[ch]:  New files.
16081         * Makefile.in (JAVA_OBJS):  Add except.o
16082         * expr.c:  Temporary warning about unimplemented exceptions.
16083         * verify.c:  Verify exception handlers.
16084
16085         * jcf-dump.c (disassemble_method):  Print exception table.
16086
16087 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16088
16089         * expr.c (verify_jvm_instructions): Started a thorough
16090         verification of invoke* bytecodes.
16091         (expand_byte_code): flush quick stack if PC is the target of a
16092         branch.  and undef RET (conflicting with config/i386/i386.h).
16093         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16094         used.
16095         (expand_invoke): Now handles invokeinterface and do more
16096         verification according to the bytecode.
16097         (lookup_field): Don't try to load the class if processing
16098         dtable_type.
16099         (can_widen_reference_to): Now handles interfaces.
16100         * decl.c (init_decl_processing): New global variable
16101         soft_lookupinterfacemethod_node, declared in java-tree.h.
16102         Call set_super_info on string_type_node.
16103         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16104         defined.
16105         * class.c (set_super_info): Fills the CLASS_* flags according to
16106         access_flags.
16107         (get_access_flags_from_decl): Handles all class flags.
16108
16109 1997-08-26  Per Bothner  <bothner@cygnus.com>
16110
16111         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
16112         * parse.c (yyparse):  Check for abstract method, and missing code.
16113         * expr.c (expand_byte_code):  Change interface.
16114         * lang.c (put_decl_node):  Print promoted types prettier.
16115         * verify.c (verify_jvm_instruction):  Change interface.
16116         Partial support for scanning exception table.
16117         For load instructions, handle promoted integral types.
16118
16119 1997-08-21  Per Bothner  <bothner@cygnus.com>
16120
16121         * verify.c:  New file, with contents moved from expr.c.
16122         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
16123         * typeck.c (is_array_type_p):  Moved here from expr.c.
16124         * java-tree.h:  Add some now-needed function declarations.
16125         * Makefile.in (JAVA_OBJS): Added verify.o.
16126
16127 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16128
16129         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16130         METHOD_ABSTRACT flag.
16131
16132         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16133         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16134         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16135
16136         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16137         variables.
16138         (start_java_method): Hook for SYNCHRONIZED methods.
16139
16140         * expr.c (build_java_jsr, build_java_ret): New functions
16141         (JSR,PRE): New macros
16142         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16143         (verify_jvm_instructions): tableswitch, lookupswitch,
16144         monitorenter, monitorexit, goto_w: verified.
16145         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16146         (build_java_monitor): New function.
16147         (MONITOR_OPERATION): Modified to call build_java_monitor()
16148         (verify_jvm_instructions): Started a thorough verification of
16149         invoke* bytecodes.
16150
16151 1997-08-19  Per Bothner  <bothner@cygnus.com>
16152
16153         Support verification of jsr/ret subroutines (used for try/finally).
16154         * decl.c (return_address_type_node):  New type node.
16155         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16156         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16157         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
16158         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16159         TYPE_USED):  New macros for special types in type_map.
16160
16161         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
16162         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
16163         BCODE_JUMP_TARGET.
16164         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
16165
16166         * expr.c (can_widen_reference_to):  New function.
16167         (pop_type):  Use it.
16168         (merge_type_state):  Support handling start of subroutine.
16169         (push_pending_block):  Return char* error message, instead of calling
16170         fatal on an error.  Also handle subroutines.
16171         (verify_jvm_instructions):  Handle errors from push_poending_block.
16172         Support jsr and ret instructions.
16173
16174 1997-08-19  Per Bothner  <bothner@cygnus.com>
16175
16176         * jcf-io.c (find_classfile):  Fix thinko.
16177         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
16178
16179 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
16180
16181         * Makefile.in (BISON): Remove.
16182
16183 1997-08-07  Per Bothner  <bothner@cygnus.com>
16184
16185         * Makefile.in:  Convert to autoconf.
16186         * config-lang.in (outputs):  Added java/Makefile.
16187
16188         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16189         Rename cc1java to jc1.
16190
16191         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
16192         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
16193
16194         * class.c (class_depth):  Do load_class if needed.
16195
16196         Mostly better verification.
16197         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
16198         (init_decl_processing):  Change return type of soft_checkcast.
16199         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
16200         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16201         lang_print_error):  New functions.
16202         (lang_init):  Set global hook print_error_function to lang_print_error.
16203         * expr.c:  In the type_map ptr_type_node is only used for null now.
16204         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
16205         (merge_types):  Dererence pointer to record types before comparing.
16206         (decode_newarray_type, merge_types):  On error just return NULL.
16207         (build_java_binop):  Add preliminary implementation (with warning)
16208         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16209         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
16210         (expand_compare, expand_java_goto, expand_java_call):  Don't
16211         push_pending_block, since that only makes sense when verifying.
16212         (merge_type_state):  Different return codes.
16213         (push_pending_block):  A block may need to be verified more than once.
16214         (expand_byte_code):  Warn about unused code at code generation time.
16215         (verify_jvm_instruction):  Changed logic, since code may need to be
16216         re-verified if type-state has changed.  Also, better error handling.
16217         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16218         Improve newarray, anewarray, ?aload, athrow,
16219         * java-tree.h (LABEL_CHANGED):  New macro.
16220
16221 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16222
16223         * decl.c (soft_athrow_node): New global variable initialized.
16224         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16225         * typeck.c (convert): Added support for REAL_TYPE.
16226         (convert_to_char): New function.
16227         (convert): Handle CHAR_TYPE.
16228         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16229         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16230         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16231         promoted type.
16232         (verify_jvm_instructions): Added break a the end of bogus unop: label.
16233         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16234         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16235         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16236         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16237         to Use The Right Things.
16238         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16239         compatible with INT. BOOLEAN is made equivalent to BYTE.
16240         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16241         OPCODE_ifnonnull): Now supported.
16242         (build_java_athrow): New function.
16243
16244 1997-08-04  Per Bothner  <bothner@cygnus.com>
16245
16246         Rename method name <init> to match G++ (and fix mangling).
16247         * class.c (layout_class):  Replace method name of <init> by class name.
16248         (make_method_value):  Do inverse renaming of constructor from <init>.
16249         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
16250         * typeck.c (lookup_java_constructor):  New function.
16251         * expr.c (expand_invoke):  If method_name is <init>, call
16252         lookup_java_constructor to find constructor.
16253
16254         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
16255
16256 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16257
16258         * parse.c (get_class_constant): Modified to handle array "classes"
16259         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16260         wide type.
16261         (convert): Modified to handle real type.
16262         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16263         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16264         variables declared.
16265         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16266         soft_multianewarray, soft_newarray_node, soft_throw_node): New
16267         global variables initialized.
16268         (find_local_variable): Handles the case of a pointer
16269         (end_java_method): Restore the use of one more scope
16270         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16271         build_java_array_length_access, expand_java_arrayload,
16272         expand_java_arraystore, expand_java_array_length,
16273         expand_java_multianewarray, expand_java_anewarray,
16274         build_java_check_indexed_type, is_array_type_p,
16275         build_java_throw_out_of_bound_exception): New functions.
16276         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16277         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16278         OPCODE_<t>aload): Implemented code for verification.
16279         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16280         ARRAY_NEW_MULTI): Macro defined.
16281         (CONVERT): Modified to invoke convert().
16282         (case OPCODE_aload2): Fixed index typo from 2 to 1.
16283
16284 1997-07-31  Per Bothner  <bothner@cygnus.com>
16285
16286         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
16287         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
16288         (make_class_data):  Field name needs '/' as package prefix.
16289         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
16290
16291 1997-07-25  Per Bothner  <bothner@cygnus.com>
16292
16293         Implement debug information for local variables.
16294         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16295         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16296         DECL_LOCAL_SLOT_CHAIN):  New macros.
16297         (struct lang_decl_var):  New type.
16298         * parse.c (give_name_to_locals):  Move to decl.c.
16299         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
16300         (start_java_method):  Re-write parameter handling.
16301         (pending_local_decls):  New global variable.
16302         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
16303         (find_local_variable):  Accept pc so we can skips decls not in range.
16304         (struct binding_level):  Add end_pc field.
16305         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16306         (various):  Change so current pc gets passed to find_local_variable.
16307
16308         * decl.c (init_decl_processing):  Re-arrange fields in
16309         class_type_node and and method_type_node to match kaffe 0.9.1.
16310         * class.c (make_method_value, make_class_data):  Update
16311         initializations to match.
16312
16313 1997-07-16  Per Bothner  <bothner@cygnus.com>
16314
16315         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16316         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
16317         (push_super_field):  New function.
16318         (make_class_data):  Handle inheritance of class static initializer.
16319         (layout_class):  New name mangling.
16320         * constants.c (build_constant_data_ref):  Init type of data array
16321         to a one-element array.
16322         (build_constants_constructor):  Set DECL_SIZE from complete array type.
16323         * decl.c:  Rename class_type, object_type etc to class_type_node,
16324         object_type_node etc.  Make former inherit from latter.
16325         * expr.c (expand_invoke):  Add cast of function address.
16326         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
16327         * parse.c (yyparse):  Don't call layout_class here.
16328         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
16329
16330 1997-06-14  Per Bothner  <bothner@cygnus.com>
16331
16332         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
16333         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
16334         (alloc_class_constant):  New.
16335         * expr.c (expand_invoke):  Make sure method's class is initialized.
16336         * class.c (interits_from_p, emit_register_class):  New functions.
16337         * parse.c (yyparse):  Call emit_register_class.
16338
16339 1997-06-09  Per Bothner  <bothner@cygnus.com>
16340
16341         * constants.c:  New file, to handle constant pool.
16342         * Makefile.in (JAVA_OBJS):  Add constants.o.
16343         * decl.c (init_decl_processing):  Update, fix, finish various structs.
16344         (pushdecl_top_level):  New.
16345         * parse.c (layout_class):  Moved to class.c.
16346         * expr.c (java_push_constant_from_pool):  New function.
16347         * class.c (build_class_ref):  Make work fully
16348         (make_class_data):  Emit super-class, constant pool, interface vector.
16349
16350 1997-06-03  Per Bothner  <bothner@cygnus.com>
16351
16352         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
16353         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
16354         * class.c (class_depth):  New function.
16355         (lookup_named_class):  Replaced by new function lookup_class.
16356         * decl.c (object_type_node, string_type_node):  New.
16357         Remove various types that we no longer need.
16358         * expr.c (verify_jvm_instructions):  New separate verifier pass.
16359         (push_type, pop_type):  New functions for verifier.
16360         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
16361         (expand_byte_code):  Simplify, since we assume already verified.
16362         (expand_invoke):  Now mostly works.
16363         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16364         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
16365         * parse.c:  Wait to allocate class object until we know its name.
16366         (layout_class):  Calculate DECL_VINDEX for each virtual method.
16367         * typeck.c (get_array_type):  Rename to ...
16368         (build_java_array_type):  ... and provide working implementation.
16369         (build_java_signature):  New function - build Java signature of type.
16370         (set_java_signature):  New function - cache signature with type.
16371         (lookup_java_method):  New function.
16372
16373 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
16374
16375         * class.c (ident_subst):  Take extra SUFFIX parameter.
16376         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
16377         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
16378         (build_class_ref):  Actually implement.
16379         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
16380         * decl.c (builtin_function):  New.
16381         (init_decl_processing):  Update for current Kaffe.  Declare some
16382         builtin Kaffe functions.
16383         * expr.c (build_address_of):  New.
16384         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
16385         Renamed (from expand_java_new etc), and added working implementations.
16386         (build_field_ref):  Now also handle static fields.
16387         (expand_invoke):  Implement invokestatic, and start implement rest.
16388         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
16389         * javaop.def:  Rename invokevirt -> invokevirtual.
16390         * lang.c (use_handles):  Removed.
16391         * parse.c:  Add support for ConstantValue attribute.
16392         Handle nested loading of a class.  (JPOOL_UTF):  New.
16393
16394 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
16395
16396         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
16397
16398 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
16399
16400         * Make-lang.in (java.install-man):  New empty rule.
16401         * typeck.c (set_local_type):  New function.
16402         * expr.c (STORE_INTERNAL):  Call find_local_variable,
16403         not find_stack_slot.  Call set_local_type.
16404
16405 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
16406
16407         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
16408         and building RECORD_TYPE CONSTRUCTORs.
16409         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
16410
16411         * lang.c (use_handles):  Change the default to 0.
16412         * decl.c:  Define and build class_type, field_type, utf8const_type.
16413         * class.c (make_class_data, make_field_value,
16414         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
16415         hashUtf8String, strLengthUtf8, mangled_classname:
16416         Functions to build reflective data structures.
16417         * parse.c (yyparse):  Call make_class_data.
16418
16419         * jcf-io.c (open_class, find_classfile):  New functions.
16420         * jcf-dump.c:  Support reading classfile from explicitly-named
16421         class file (without CLASSPATH searching).
16422
16423 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16424
16425         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
16426         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
16427         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
16428         (get_constant):  Now trivial for CONSTANT_Utf8.
16429
16430         * jcf.h:  Make NEW_CPOOL the default.
16431         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
16432
16433 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16434
16435         New directory.