OSDN Git Service

* jcf-write.c (get_classfile_modifiers): Formatting fixes.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
2
3         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4
5 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
6
7         Formatting fixes.
8         * expr.c (class_has_finalize_method): Fix method name indentation.
9         (expand_java_call): Remove K&R style parameter declaration.
10         (expand_invoke): Fix statement indentation.
11         (expand_java_field_op): Likewise.
12         * parse-scan.y: Fix typo.
13         (reset_report): Fix method name indentation.
14         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
15         line. Fix typos.
16         * verify.c (verify_jvm_instructions): Document parameters, insert
17         page break.
18         * lang.c (lang_init_source): Fix method name indentation.
19         * class.c (common_enclosing_context_p): Likewise.
20         (emit_symbol_table): Fix parameter list indentation.
21         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
22         parameter declaration.
23         * constants.c: Fix copyright notice indentation.
24         * typeck.c (find_method_in_superclasses): Fix parameter list
25         indentation.
26         (find_method_in_interfaces): Likewise.
27         * zextract.c (makelong): Fix method name indentation.
28
29 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
30
31         PR java/15715.
32         * parse.y (create_interface): Set correct access modifiers for
33         interfaces.
34         * jcf-write.c (get_classfile_modifiers): New function.
35         (generate_classfile): Use get_classfile_modifiers, not 
36         get_access_flags.
37
38 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
39
40         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
41         dependency to current parser context, not NULL_TREE, for top-level
42         classes.
43         (jdep_resolve_class): Enable member access check for all inner
44         class dependencies.
45
46 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
47
48         * parse.y (qualify_and_find): Pass type decl, not identifier, to 
49         load_class.
50
51 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
52
53         PR java/15734
54         * expr.c (expand_java_field_op): Ensure that target class for static
55         field access has been loaded.
56
57 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
58             Ranjit Mathew  <rmathew@hotmail.com>
59
60         PR java/1207, java/16178
61         * jcf-parse.c (load_class): Return immediately if passed a type decl
62         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
63         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
64         before calling load_class.
65         (qualify_and_find): Likewise.
66         (find_in_imports_on_demand): Likewise.
67         (find_applicable_accessible_methods_list): Likewise.
68
69 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
70
71         * parse.y (java_layout_seen_class_methods): Don't call load_class
72         on class defined by source parser.
73
74 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
75
76         * parse.y (set_nested_class_simple_name_value): Removed.
77         (java_complete_expand_class): Remove calls to
78         set_nested_class_simple_name_value.
79
80 2004-06-22  Andrew Haley  <aph@redhat.com>
81             Ranjit Mathew  <rmathew@hotmail.com>
82         
83         Fixes PR java/16113.
84         * decl.c (force_poplevels): Remove call to expand_end_bindings.
85
86 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
87
88         * parse.y (create_class): Correct diagnostic message about
89         java.lang.Object extending anything else.
90
91 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
92
93         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
94         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
95         * constants.c (build_ref_from_constant_pool): Likewise.
96         * expr.c (build_java_array_length_access): Likewise.
97         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
98         (invoke_build_dtable, build_invokevirtual): Likewise.
99         (build_invokeinterface, java_expand_expr): Likewise.
100         (emit_init_test_initialization): Likewise.
101         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
102         * parse.y (make_qualifed_name, build_array_ref): Likewise.
103         
104 2004-06-21  Andrew Haley  <aph@redhat.com>
105
106         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
107         block.
108
109 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
110
111         * jcf.h (struct JCF): Change java_source, right_zip and finished
112         to unsigned int.
113         * lex.h (struct java_lexer): Change hit_eof, read_anything,
114         byte_swap and use_fallback to unsigned int.
115         * parse.h (struct _jdep): Change flag0 to unsigned int.
116
117 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
118
119         Fixes PR java/13948
120         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
121         before trying to lay out its methods.
122         * jcf-parse.c (read_class): Track parsed files using canonical paths
123         obtained via lrealpath from libiberty.
124         (java_parse_file): Likewise.
125         (parse_source_file_1): Rename formal parameter to reflect its
126         modified purpose. Minor formatting fix.
127
128 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
129
130         * class.c (emit_register_classes): Make the function uninlinable,
131         do not set current_function_cannot_inline.
132         * resource.c (write_resource_constructor): Do not reset
133         flag_inline_functions around rest_of_compilation.
134         
135 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
136
137         PR java/15769
138         * expr.c (java_truthvalue_conversion): Handle
139         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
140         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
141         i.e. return the expression.
142
143 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
144
145         * gjavah.c: Include version.h
146
147 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
148
149         * jcf-write.c (generate_bytecode_conditional): Correct handling
150         of unordered conditionals. Add comment.
151
152 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
153             Per Bothner  <per@bothner.com>
154
155         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
156         local variable was initialised upon declaration.
157         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
158         variable was final and initialised upon declaration.
159         * check-init.c (check_final_reassigned): Give error only if a blank
160         final is not definitely unassigned or if an initialised final is
161         reassigned.
162         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
163         assignment expressions. Remove case MODIFY_EXPR, label do_default.
164         (check_init): Perform initialised-variable-removing-optimisation
165         only on non-final local variables.
166
167 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
168
169         * jcf-write.c (generate_bytecode_conditional): Handle binops 
170         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, 
171         and LTGT_EXPR.
172         (generate_bytecode_insns): Likewise.
173
174 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
175
176         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
177         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
178
179 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
180
181         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
182         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
183
184 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
185
186         * decl.c (struct binding_level): Add GTY marker. Compile
187         binding_depth unconditionally.
188         (current_binding_level, free_binding_level, global_binding_level):
189         Likewise.
190         (clear_binding_level): Unconditionally set binding_depth.
191         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
192
193 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
194
195         * lex.c (java_new_lexer): Set 'encoding'.
196         (java_read_char): Improve error message for unrecognized characters.
197         * lex.h (struct java_lexer): New field 'encoding'.
198
199 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
200
201         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
202
203 2004-05-21  Mark Wielaard  <mark@klomp.org>
204
205         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
206         extern.
207
208 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
209
210         * typeck.c: Remove non-printable character 160.
211
212 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
213
214         * check-init.c: Correct minor typos.
215
216 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
217
218         * Make-lang.in, expr.c, java-gimplify.c: Rename
219         tree-simple.[ch] to tree-gimple.[ch].
220
221 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
222
223         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
224
225 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
226
227         Merge from tree-ssa-20020619-branch.  See
228         ChangeLog.tree-ssa for details.
229
230         * Make-lang.in, builtins.c, check-init.c, class.c,
231         constants.c, decl.c, except.c, expr.c, java-except.h,
232         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
233         lang.c, lang.opt, parse.y, resource.c: Merged.
234         * java-gimplify.c: New file.
235
236 2004-05-10  Andrew Haley  <aph@redhat.com>
237
238         * parse.y (create_class): Set TYPE_VFIELD.
239         * decl.c (java_init_decl_processing): Likewise.
240
241         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
242         * class.c (make_method_value): Replace DECL_VINDEX with call to
243         get_method_index().
244         (get_dispatch_vector): Likewise.
245         (layout_class_method): Likewise.
246         Replace set of DECL_VINDEX with call to set_method_index().
247         (set_method_index): New function.
248         (get_method_index): New function.
249         * java-tree.h (set_method_index): New function decl.
250         (get_method_index): New function decl.
251
252 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
253
254         * parse.y (check_pkg_class_access): Add new argument
255         and use it when cl is NULL to call lookup_cl on it.
256         (parser_check_super_interface): Do not call lookup_cl.
257         Pass this_decl to check_pkg_class_access and NULL
258         instead of lookup_cl.
259         (parser_check_super): Update for change in
260         check_pkg_class_access.
261         (do_resolve_class): Likewise.
262         (process_imports): Likewise.
263         (find_in_imports_on_demand): Likewise.
264         (resolve_qualified_expression_name): Likewise.
265
266 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
267
268         Fixes PR java/9685, PR java/15073
269         * parse.y (accessibility_string): New method.
270         (not_accessible_field_error): Use accessibility_string()
271         instead of java_accstring_lookup().
272         (resolve_qualified_expression_name): Check with
273         check_pkg_class_access() before allowing access using
274         qualified names.
275         Fix comment typo.
276         Use check_pkg_class_access() instead of not_accessible_p()
277         for unqualified types.
278         (not_accessible_p): Use DECL_CONTEXT (member) instead of 
279         REFERENCE for package-private access checking.
280         (patch_method_invocation): Use accessibility_string() instead
281         of java_accstring_lookup().
282
283 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
284
285         Fixes PR java/15133
286         * gjavah.c (struct method_name): Add member is_native.
287         (overloaded_jni_method_exists_p): Match candidate method only if
288         it is native.
289         (print_method_info): Initialise is_native flag from the method's
290         access flags.
291
292 2004-04-30  Roger Sayle  <roger@eyesopen.com>
293
294         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
295         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
296
297 2004-04-22  Roger Sayle  <roger@eyesopen.com>
298
299         * resource.c (write_resource_constructor): Guard call to possibly
300         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
301
302 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
303
304         * class.c (make_class_data): Add new field aux_info.
305         * decl.c (java_init_decl_processing): Push type and decl for 
306         `aux_info'.
307
308 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
309
310         * expr.c (expand_java_NEW): Don't use size argument for 
311         _Jv_AllocObject calls.
312         * parse.y (patch_invoke): Likewise.
313
314 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
315
316         * expr.c (build_invokeinterface): Remove unused variables to
317         fix warnings.
318
319 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
320
321         * class.c (get_interface_method_index): New function. Return dispatch 
322         index for interface method.
323         (make_method_value): For interface methods, set index field to
324         iface dispatch index, not DECL_VINDEX.
325         * expr.c (build_invokeinterface): Use get_interface_method_index.
326
327 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
328
329         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
330
331 2004-03-31  Andrew Haley  <aph@redhat.com>
332
333         PR java/14104
334         * jcf-io.c (opendir_in_zip): Tidy up error handling.
335
336 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
337
338         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
339         form of GTY markers.
340
341 2004-03-25  Marcus Meissner  <meissner@suse.de>
342
343         PR java/14689:
344         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
345
346 2004-03-23  Tom Tromey  <tromey@redhat.com>
347
348         PR java/14315:
349         * jcf-write.c (make_class_file_name): Don't report if mkdir
350         failed with EEXIST.
351
352 2004-03-23  Tom Tromey  <tromey@redhat.com>
353
354         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
355
356 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
357
358         * class.c, gjavah.c, lang.c: Fix comment typos.
359         * gcj.texi: Fix typos.
360
361 2004-03-19  Per Bothner  <per@bothner.com>
362
363         * gcj.texi (Code Generation):  Document new flags and assert defaults.
364
365         * class.c (assume_compiled_node_struct):  Rename type to
366         class_flag_node_struct, as it is now also used for enable_assertions.
367         Rename assume_compiled_node typedef.  Rename excludep field to value.
368         (find_assume_compiled_node):  Rename function to find_class_flag_node.
369         Minor optimization - avoid needless strlen.
370         (add_assume_compiled):  Some tweaking and optimization.
371         Rename and generalize to add_class_flag takem an extra parameter.
372         (add_assume_compled):  New just calls add_class_flag.
373         (add_enable_assert, enable_assertions):  New functions.
374         (enable_assert_tree):  New static.
375         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
376         * lang.opt (fenable-assertions, fenable-assertions=,
377         fdisable-assertions, fdisable-assertions=):  New options.
378         * lang.c (java_handle_option):  Handle new options.
379         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
380         class in an interface - create helper class nested in outer interface.
381         (build_assertion):  Short-circuit if enable_assertions is false.
382
383 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
384
385         * java-tree.h: Changes throughout to add checking to macros
386         and numerous whitespace changes.
387         (VAR_OR_FIELD_CHECK): New macro.
388         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
389         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
390
391 2004-03-16  Per Bothner  <per@bothner.com>
392
393         * jcf-jump.c (options):  New --print-constants option.
394         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
395
396         * jcf-dump.c (flag_print_constant_pool):  Default to off.
397         (print_constant_terse_with_index):  New helper function.
398         (various places):  Check flag_print_constant_pool where missing.
399         (main):  If verbose set flag_print_constant_pool.
400         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
401
402 2004-03-15  Andrew Haley  <aph@redhat.com>
403
404         PR java/14581
405         * parse.y (java_complete_lhs): Check that final variable has an
406         initializer.
407
408 2004-03-12  Andrew Haley  <aph@redhat.com>
409
410         PR java/14551
411         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
412         conversion.
413
414 2004-02-29  Roger Sayle  <roger@eyesopen.com>
415
416         * jcf-parse.c (java_parse_file): Handle the case that input_filename
417         is NULL.
418
419 2004-02-27  Per Bothner  <per@bothner.com>
420
421         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
422         suggestion:  Use build_incomplete_class_ref.
423         This fixes PR java/13508, java/11714.
424
425 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
426
427         * java/parse.h: Update copyright.
428
429 2004-02-26  Andrew Haley  <aph@redhat.com>
430
431         PR java/14231:
432         * parse.y (check_interface_throws_clauses): Check for
433         !METHOD_INVISIBLE (iface_method).
434         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
435         well as CLASS_ABSTRACT.
436
437 2004-02-25  Per Bothner  <per@bothner.com>
438
439         * parse.y (build_assertion):  If we're in an inner class, create the
440         class$ helper routine in the outer class.
441
442 2004-02-19  Richard Henderson  <rth@redhat.com>
443
444         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
445
446 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
447
448         * Make-lang.in (java.install-man): Add extra dependencies.
449
450 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
451
452         * Make-lang.in: Install man pages under the same names
453         (possibly transformed) as the program they document.
454
455 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
456
457         * gjavah.c: Include "intl.h".
458         (error): New function.
459         (main): Call gcc_init_libintl.
460         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
461         print_stub_or_jni, process_file, main): Use error rather than
462         fprintf.
463         (print_method_info, usage, help, version, main): Mark strings for
464         translation with _.  Avoid splitting up sentences.  Send
465         information messages to stdout.
466         * jcf-dump.c: Include "intl.h".
467         (main): Call gcc_init_libintl.
468         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
469         Mark error, usage and version messages for translation with _.
470         Avoid splitting up sentences.
471         * jv-scan.c: Include "intl.h".
472         (fatal_error, warning): Change parameter s to msgid.  Translate
473         messages.
474         (main): Call gcc_init_libintl.
475         (usage, help, version): Mark error, usage and version messages for
476         translation with _.  Avoid splitting up sentences.
477         * jvgenmain.c: Include "intl.h".
478         (main): Call gcc_init_libintl.
479         (usage, main): Mark error messages for translation with _.
480         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
481         JVGENMAIN_OBJS): Add intl.o.
482         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
483         java/jvgenmain.o): Update dependencies.
484
485 2004-02-08  Per Bothner  <per@bothner.com>
486
487         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
488         class don't use not_accessible_field_error, which can get confused.
489
490 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
491
492         Make-lang.in (po-generated):  Delete.
493
494 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
495
496         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
497         Depend on target.h.
498         * decl.c: Include target.h.
499         (start_java_method): Replace PROMOTE_PROTOTYPES with
500         targetm.calls.promote_prototypes.
501         * expr.c: Include target.h.
502         (pop_arguments): Replace PROMOTE_PROTOTYPES with
503         targetm.calls.promote_prototypes.
504         * parse.y: Include target.h.
505         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
506         with targetm.calls.promote_prototypes.
507
508 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
509
510         * typeck.c: Update copyright.
511
512 2004-02-02  Tom Tromey  <tromey@redhat.com>
513
514         * decl.c (java_init_decl_processing): Remove duplicate
515         gnu/gcj/RawData.
516
517 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
518
519         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
520
521 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
522
523         * expr.c (build_field_ref): Move variable
524         definition up.
525
526 2004-01-28  Andrew Haley  <aph@redhat.com>
527
528         * expr.c (build_field_ref): Widen field offset.
529
530 2004-01-27  Andrew Haley  <aph@redhat.com>
531
532         java/13273
533         * parse.y (check_interface_throws_clauses): Make sure class_decl
534         has been loaded.
535
536 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
537
538         PR java/13733
539         * parse.y (patch_assignment): Don't modify lhs_type for
540         reference assignments.
541
542 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
543
544         * Make-lang.in: Replace $(docdir) with doc.
545         (java.info, java.srcinfo, java.man, java.srcman): New rules.
546         (java.install-man): Revamp rule.
547
548 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
549
550         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
551         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
552         instead of deferred backquote.
553
554 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
555
556         * typeck.c (find_method_in_interfaces): Move variable
557         definition up.
558
559 2004-01-16  Andrew Haley  <aph@redhat.com>
560
561         PR java/13273:
562         * typeck.c (shallow_find_method): New.
563         (find_method_in_superclasses): New.
564         (find_method_in_interfaces): New.
565         (lookup_do): Rewrite.
566         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
567
568         * jcf-parse.c (read_class): Save and restore output_class.
569         * decl.c (java_expand_body): Set output_class from fndecl.
570
571 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
572
573         * class.c (gen_indirect_dispatch_tables): Fix string length
574         calculations.
575
576 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
577
578         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
579         (java.srcextra): Copy above back to source directory if requested.
580         (po-generated): Delete reference to $(parsedir).
581         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
582         Use implicit rule.
583
584 2004-01-14  Jan Hubicka  <jh@suse.cz>
585
586         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
587         estimation.
588
589 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
590
591         * java-tree.h (java_expand_expr): Change prototype.
592         * expr.c (java_expand_expr): Add alt_rtl parameter.
593
594 2004-01-09  Andrew Haley  <aph@redhat.com>
595
596         PR java/12755:
597         * parse.y (java_fix_constructors):  Set output_class.
598         (java_reorder_fields): Likewise.
599         (java_layout_classes): Likewise.
600         (java_expand_classes): Generate indirect dispatch tables.
601         (java_expand_classes): Set output_class.
602         (java_finish_classes): Likewise.
603         * lang.c (java_init): Turn on always_initialize_class_p if we're
604         using indirect dis[atch.
605         (java_decl_ok_for_sibcall): Use output_class, not current_class.
606         (java_get_callee_fndecl): Use class local atable.
607         * jcf-parse.c
608         (always_initialize_class_p): Decl moved to java-tree.h.
609         (HANDLE_CLASS_INFO): Set output_class.
610         (read_class): Likewise.
611         (parse_class_file): Call gen_indirect_dispatch_tables.
612         (parse_zip_file_entries): Set output_class.
613         (java_parse_file): Set output_class.  Don't emit symbol tables.
614         * java-tree.h (output_class): New.
615         Remove global declarations for otable, atable, and ctable.
616         (always_initialize_class_p): moved here from decl.c.
617         (DECL_OWNER): New.
618         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
619         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
620         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
621         (struct lang_type): Add otable_methods, otable_decl,
622         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
623         ctable_decl, catch_classes, type_to_runtime_map.
624         * expr.c (build_field_ref): Make otable, atable, and ctable class
625         local rather than global.
626         (build_known_method_ref): Likewise.
627         (build_invokeinterface): Likewise.
628         (java_expand_expr): Pass runtime type (rather than actual type) to
629         expand_start_catch.
630         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
631         this class.  Look up each class in that map to delete duplicates.
632         (expand_end_java_handler): Pass runtime type (rather than actual
633         type) to expand_start_catch.
634         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
635         (do_nothing): New.
636         (java_init_decl_processing): Rearrange things.  Remove global
637         declarations of otable, atable, and ctable.
638         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
639         (java_expand_body): Set output_class.
640         * constants.c (build_constant_data_ref): Use output_class, not
641         current_class.
642         (alloc_name_constant): Likewise.
643         * class.c (gen_indirect_dispatch_tables): New.
644         (build_class_ref): Generate hard reference to superclass, even if
645         using indirect dispatch.
646         (build_static_field_ref): Use class local atable.
647         (make_class_data): Generate hard reference to superclass, even if
648         using indirect dispatch.
649         Generate symbolic references to interfaces when using indirect
650         dispatch.
651         (make_class_data): Emit otable, atable, and ctable.
652         Make otable, atable, and ctable class local rather than global.
653         (emit_catch_table): Make otable, atable, and ctable class local
654         rather than global.
655
656 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
657
658         * parse.y (catch_clause_parameter): Fix typo.
659
660         PR java/13404
661         * parse.y: (catch_clause_parameter): Return early if $3, aka
662         formal_parameter, is null.
663
664 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
665
666         * class.c: Remove uses of "register" specifier in
667         declarations of arguments and local variables.
668         * decl.c: Likewise.
669         * expr.c: Likewise.
670         * gjavah.c: Likewise.
671         * jcf-dump.c: Likewise.
672         * jcf-io.c: Likewise.
673         * jcf-parse.c: Likewise.
674         * jcf-write.c: Likewise.
675         * keyword.h: Likewise.
676         * parse.y: Likewise.
677         * typeck.c: Likewise.
678         * verify.c: Likewise.
679
680 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
681
682         * Make-lang.in (GCJ_CROSS_NAME): Delete.
683         (java.install_common, java.install-man): Adjust for above.
684         (java.uninstall): Likewise.
685
686 2003-12-03  Michael Koch  <konqueror@gmx.de>
687
688         * class.c (make_class_data):
689         Push field value to 'hack_signers' instead of 'signers'.
690         * decl.c (java_init_decl_processing):
691         Push field 'hack_signers' instead of 'signers'.
692
693 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
694
695         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
696         including iconv.h.
697
698 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
699
700         PR java/12374:
701         * parse.y (qualify_ambiguous_name): Remove lots of broken
702         field access processing - there's no need to do that here,
703         because we have resolve_field_access.  Remove
704         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
705         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
706         used.
707
708 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
709
710         Fix PR java/13237
711         * parse.y (java_complete_lhs): Save location prior to patching
712         CALL_EXPR.
713
714 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
715
716         PR java/12548
717         * resource.c (write_resource_constructor): Append
718         "_resource" to constructor identifier name.
719
720 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
721
722         Fix PR java/13183.
723         * constants.c (cpool_for_class): New function.
724         (outgoing_cpool): Remove global variable.
725         (alloc_name_constant): Use cpool_for_class.
726         (build_constants_constructor): Likewise.
727         * decl.c (java_expand_body): Set current_class.
728         * java-tree.h (outgoing_cpool) Remove declaration.
729         (init_outgoing_cpool): Likewise.
730         * jcf-parse.c (init_outgoing_cpool): Remove function.
731         (parse_class_file): Don't call init_outgoing_cpool.
732         * parse.y (java_complete_expand_methods): Don't call
733         init_outgoing_cpool.  Don't save outgoing_cpool.
734         (java_expand_classes): Don't restore outgoing_cpool.
735         (java_finish_classes): Likewise.
736
737 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
738
739         * Make-lang.in: (java.install-common) Add
740         symlink for $(target_noncanonical)-gcjh for
741         native builds.
742
743 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
744
745         * Make-lang.in (java.extraclean): Delete.
746
747 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
748
749         * Make-lang.in (check-java): Add.
750
751 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
752
753         Fix PR java/13024.
754         * except.c (prepare_eh_table_type): Allocate variable-sized
755         buffer `buf' with alloca.
756
757 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
758
759         Fix PR java/12857.
760
761         decl.c (java_init_decl_processing): Don't initialize
762         class_not_found_type_node, no_class_def_found_type_node.
763
764         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
765         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
766         (class_not_found_type_node, no_class_def_found_type_node):
767         Don't define.
768
769         parse.y (build_dot_class_method_invocation): Add this_class
770         argument.  Qualify method invocations to a different class.
771         (create_new_parser_context): Initialize saved_data_ctx to 0.
772         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
773         (build_dot_class_method): Don't load classes.  Register
774         incomplete types.
775         (build_incomplete_class_ref): Special cases for interfaces
776         and inner classes.  Move build_dot_class_method call to here...
777         (patch_incomplete_class_ref): ...from here.  Pass current_class
778         to build_dot_class_method_invocation.
779         (build_assertion): Pass class_type to
780         build_dot_class_method_invocation.
781         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
782
783 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
784
785         Fix PR java/12739.
786         * java-tree.h (BLOCK_EMPTY_P): Define.
787         * parse.y (java_complete_lhs): Check for empty blocks
788         in TRY_FINALLY_EXPR case.
789
790 2003-11-17  Andrew Haley  <aph@redhat.com>
791
792         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
793         (struct lang_decl_var:freed): New variable.
794         * decl.c (poplevel): Mark local vars that have gone out of scope.
795         (push_jvm_slot): Don't use the RTL of a var that has gone out of
796         scope.
797
798 2003-11-16  Jason Merrill  <jason@redhat.com>
799
800         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
801         and TAGS files that include them for each front end.
802
803 2003-11-15  Tom Tromey  <tromey@redhat.com>
804
805         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
806
807 2003-11-12  Jason Merrill  <jason@redhat.com>
808
809         PR optimization/12547
810         * lang.c (java_tree_inlining_walk_subtrees): Just walk
811         BLOCK_EXPR_BODY directly.
812
813 2003-11-12  Andrew Haley  <aph@redhat.com>
814
815         PR java/11045
816         * parse.y (fold_constant_for_init): Check that we really do have a
817         constant.
818
819         PR java/11533
820         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
821         init_test_decls being inlined.
822
823         PR java/12890:
824         * parse.y (do_resolve_class): Check return value from
825         breakdown_qualified().
826
827 2003-11-11  Tom Tromey  <tromey@redhat.com>
828
829         PR java/12915:
830         * parse.y (merge_string_cste): Handle case where we have a
831         pointer that happens to be zero, not null_pointer_node.
832
833 2003-11-10  Tom Tromey  <tromey@redhat.com>
834
835         * jcf-parse.c (classify_zip_file): Correctly compare
836         filename_length against length of manifest file's name.
837
838 2003-11-08  Tom Tromey  <tromey@redhat.com>
839
840         PR java/12894:
841         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
842
843 2003-11-06  Andrew Haley  <aph@redhat.com>
844
845         * expr.c (java_stack_swap): Make sure destination stack slots are
846         of the correct type.
847
848 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
849
850         * Make-lang.in (dvi): Move targets to $(docobjdir).
851         (gcj.dvi): Simplify rule and adjust target.
852         (gcj.info): Simplify rule.
853         (gcj.pod): New intermediate rule.
854         (gcjh.pod): Likewise.
855         (jv-scan.pod): Likewise.
856         (jcf-dump.pod): Likewise.
857         (gij.pod): Likewise.
858         (jv-convert.pod): Likewise.
859         (rmic.pod): Likewise.
860         (rmiregistry.pod): Likewise.
861         (gcj.1): Delete.
862         (gcjh.1): Delete.
863         (jv-scan.1): Delete.
864         (jcf-dump.1): Delete.
865         (gij.1): Delete.
866         (jv-convert.1): Delete.
867         (rmic.1): Delete.
868         (rmiregistry.1): Delete.
869
870 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
871
872         Fixes PR java/12866.
873         * parse.y (resolve_qualified_expression_name): Move test
874         for outer field access methods from here...
875         (check_thrown_exceptions) ...to here.
876
877 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
878
879         * .cvsignore: Delete.
880
881 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
882
883         * verify.c (verify_jvm_instructions): Don't warn about legal
884         eh binding regions generated for example by jdk 1.4.1.
885
886 2003-10-24  David S. Miller  <davem@redhat.com>
887
888         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
889
890 2003-10-22  Andrew Haley  <aph@redhat.com>
891
892         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
893         (java_get_callee_fndecl): New.
894
895         * jcf-parse.c (java_parse_file): Call emit_catch_table().
896
897         * java-tree.h (ctable_decl): New.
898         (catch_classes):  New.
899         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
900
901         * decl.c (java_init_decl_processing): Add catch_class_type.
902         Add ctable_decl.
903         Add catch_classes field.
904
905         * class.c (build_indirect_class_ref): Break out from
906         build_class_ref.
907         (make_field_value): Check flag_indirect_dispatch.
908         (make_class_data): Ditto.
909         Tidy uses of PUSH_FIELD_VALUE.
910         Add field catch_classes.
911         (make_catch_class_record): New.
912
913         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
914
915 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
916
917         * jcf-write.c: Follow spelling conventions.
918         * parse.y: Likewise.
919
920 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
921
922         * ChangeLog: Fix typos.
923         * expr.c: Fix comment typos.
924         * jcf-write.c: Likewise.
925         * lang.c: Likewise.
926         * lex.c: Likewise.
927         * mangle.c: Likewise.
928         * parse-scan.y: Likewise.
929         * parse.y: Likewise.
930
931 2003-10-22  Tom Tromey  <tromey@redhat.com>
932
933         * expr.c (expand_byte_code): Only warn about dead bytecode when
934         extra_warnings is set.
935
936 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
937
938         Fix for PR java/12586.
939         * mangle.c (find_compression_record_match): Don't iterate through
940         package namespace elements unless they all match compression_table
941         entries.
942
943 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
944
945         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
946         (generate-manpages): Likewise.
947         (java.maintainer-clean): Likewise.
948         (gcj.info): Likewise.
949         (gcj.1): Likewise.
950         (gcjh.1): Likewise.
951         (jv-scan.1): Likewise.
952         (jcf-dump.1): Likewise.
953         (gij.1): Likewise.
954         (jv-convert.1): Likewise.
955         (rmic.1): Likewise.
956         (rmiregistry.1): Likewise.
957         (java.install-man): Likewise.
958         (parse-scan.o): Move and define complete compile line.
959         (parse.o): Likewise.
960         (jcf-tree-inline.o): Move.
961
962 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
963
964         * Make-lang.in (info): Update dependencies.
965         (java.install-info): Remove.
966         ($(srcdir)/java/gcj.info): Replace with ...
967         ($(docobjdir)/gcj.info): ... this.
968
969 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
970
971         * Make-lang.in: Replace uses of $(target_alias) with
972         $(target_noncanonical).
973
974 2003-10-09  Tom Tromey  <tromey@redhat.com>
975
976         * decl.c (java_init_decl_processing): Declare signers field.
977         * class.c (make_class_data): Set signers field.
978
979 2003-10-09  Jason Merrill  <jason@redhat.com>
980
981         * parse.y (patch_assignment): Use make_node to create a BLOCK.
982         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
983         POINTER_TYPE.
984
985 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
986
987         * Make-lang.in (java.info): Replace with ...
988         (info): ... this.
989         (java.dvi): Replace with ...
990         (dvi): ... this.
991         (java.generated-manpages): Replace with ...
992
993 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
994
995         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
996
997 2003-10-01  Andrew Haley  <aph@redhat.com>
998
999         * jcf-parse.c (java_parse_file): Write otable and atable.
1000         * java-tree.h (atable_methods): New.
1001         (atable_decl): New.
1002         (atable_syms_decl): New.
1003         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1004         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1005         (symbol_*type): Rename method_symbol* to symbol*type.
1006         (emit_offset_symbol_table): Delete.
1007         (emit_symbol_table): New.
1008         (get_symbol_table_index): New.
1009         (atable_type): New.
1010         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1011         (build_known_method_ref): Likewise.
1012         (get_symbol_table_index): Rename from get_offset_table_index.
1013         Parameterize to allow re-use by differing types of symbol table.
1014         (build_invokevirtual): Pass table to get_offset_table_index.
1015         * decl.c (java_init_decl_processing): Push types and decls for
1016         atable and atable_syyms.
1017         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1018         (make_class_data): Add new fields atable and atable_syms.
1019         (emit_symbol_table): Rename from emit_offset_symbol_table.
1020         Parameterize to allow re-use by different types of symbol table.
1021         (build_symbol_entry): Renamed from build_method_symbols_entry.
1022
1023 2003-09-30  Roger Sayle  <roger@eyesopen.com>
1024
1025         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1026         semantics for SAVE_EXPR, by caching the result in a temporary.
1027
1028 2003-09-28  Richard Henderson  <rth@redhat.com>
1029
1030         * check-init.c (check_init): Save and restore input_location
1031         instead of file and line separately.
1032         * decl.c (java_expand_body): Likewise.
1033         * jcf-write.c (generate_bytecode_insns): Likewise.
1034         * parse.y (safe_layout_class): Likewise.
1035         * jcf-parse.c (read_class, parse_class_file): Likewise.
1036         (java_parse_file): Use %H for warning locator.
1037
1038 2003-09-28  Roger Sayle  <roger@eyesopen.com>
1039
1040         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1041         with void-type branches instead of using a COMPOUND_EXPR.
1042
1043 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
1044
1045         * decl.c (java_optimize_inline, dump_function): Remove.
1046         * java-tree.h (java_optimize_inline): Remove declaration.
1047         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1048         * parse.y (source_end_java_method, java_expand_classes):
1049         Likewise.  Remove dead code.
1050
1051 2003-09-27  Roger Sayle  <roger@eyesopen.com>
1052
1053         * lang.c (java_init_options): Set flag_evaluation_order.
1054         * expr.c (force_evaluation_order): Don't attempt to force
1055         evaluation order of binary operations using save_expr.
1056         * parse.y (java_complete_lhs): No longer need to call
1057         force_evaluation_order when constructing binary operators.
1058
1059 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1060             Bryce McKinlay  <bryce@mckinlay.net.nz>
1061
1062         PR java/1333:
1063         * parse.y (not_accessible_field_error): New function.
1064         (resolve_expression_name): Check field access permissions.
1065         (resolve_qualified_expression_name): Use
1066         not_accessible_field_error.
1067         (resolve_qualified_expression_name): Likewise.
1068
1069 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1070
1071         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1072
1073 2003-09-23  Roger Sayle  <roger@eyesopen.com>
1074
1075         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1076         with equal operands without side-effects.
1077
1078 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
1079
1080         * decl.c (java_init_decl_processing): Don't emit otable decls
1081         if flag_indirect_dispatch is not set.
1082
1083 2003-09-21  Richard Henderson  <rth@redhat.com>
1084
1085         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1086         resource.c: Revert.
1087
1088 2003-09-21  Richard Henderson  <rth@redhat.com>
1089
1090         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1091         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1092
1093 2003-09-20  Richard Henderson  <rth@redhat.com>
1094
1095         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1096
1097 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1098
1099         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1100         * check-init.c (check_init): Likewise.
1101
1102 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1103
1104         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1105
1106 2003-09-16  Andrew Haley  <aph@redhat.com>
1107
1108         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1109
1110 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
1111
1112         Fixes PR java/9577
1113         * mangle.c (find_compression_record_match): Skip
1114         over a "6JArray" (the array template mangled string)
1115         IDENTIFIER_NODE.
1116         (mangle_array_type): Correct minor typo.
1117         (atms): Move definition to the beginning.
1118
1119 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
1120
1121         * class.c (add_miranda_methods): Ensure super-interfaces are laid
1122         out. Fix for PR java/12254.
1123
1124 2003-09-11  Richard Henderson  <rth@redhat.com>
1125
1126         * parse.y (source_end_java_method): Update for new
1127         cgraph_finalize_function argument.
1128
1129 2003-09-09  Richard Henderson  <rth@redhat.com>
1130
1131         * parse.y (source_end_java_method): Update call to
1132         cgraph_finalize_function.
1133
1134 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
1135
1136         * decl.c (java_expand_body): New function.
1137         * expr.c (build_class_init): Set DECL_IGNORED_P.
1138         * java-tree.h (start_complete_expand_method,
1139         java_expand_body): Declare.
1140         * jcf-parse.c (cgraph.h): Include.
1141         (java_parse_file): Handle flag_unit_at_a_time.
1142         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1143         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1144         (java_estimate_num_insns): Use walk_tree_without_duplicates.
1145         (java_start_inlining): New function.
1146         * parse.h (java_finish_classes): Declare.
1147         * parse.y: Include cgraph.h.
1148         (block): Don't special-case empty block production.
1149         (craft_constructor): Set DECL_INLINE.
1150         (source_end_java_method): Handle flag_unit_at_a_time.
1151         Replace inline code with call to java_expand_body.
1152         (start_complete_expand_method): Remove static modifier.
1153         (java_expand_method_bodies): Patch function tree for
1154         class initialization and/or synchronization as needed.
1155         Don't begin RTL expansion yet.
1156         (java_expand_classes): Check flag_unit_at_a_time before
1157         calling finish_class.
1158         (java_finish_classes): New function.
1159         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1160         (patch_assignment): Set DECL_CONTEXT on temporary variable.
1161         (emit_test_initialization): Set DECL_IGNORED_P.
1162
1163 2003-09-03  Roger Sayle  <roger@eyesopen.com>
1164
1165         * builtins.c (enum builtin_type): Delete unused enumeration.
1166         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1167
1168 2003-08-28  Tom Tromey  <tromey@redhat.com>
1169
1170         * gcj.texi (Extensions): Document gcjlib URLs.
1171
1172 2003-08-20  Tom Tromey  <tromey@redhat.com>
1173
1174         * gcj.texi (Extensions): Added xref.
1175         (libgcj Runtime Properties): Document
1176         gnu.gcj.runtime.VMClassLoader.library_control.
1177
1178 2003-08-20  Andrew Haley  <aph@redhat.com>
1179
1180         * except.c (prepare_eh_table_type): Use new encoding for exception
1181         handlers when using -fno-assume-compiled.
1182
1183 2003-08-13  Tom Tromey  <tromey@redhat.com>
1184
1185         * gcj.texi (Invoking gij): Document -X and -?.
1186
1187 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
1188
1189         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1190         GCJH_OBJS, JCFDUMP_OBJS
1191         * win32-host.c: Removed the unnecessary and broken dependency
1192         on jcf.h
1193
1194 2003-08-11  Tom Tromey  <tromey@redhat.com>
1195
1196         * parse.y (java_check_regular_methods): Typo fixes.  Call
1197         check_interface_throws_clauses.  Use
1198         check_concrete_throws_clauses.
1199         (check_interface_throws_clauses): New function.
1200         (check_concrete_throws_clauses): New function.
1201         (hack_is_accessible_p): New function.
1202         (find_most_specific_methods_list): Added FIXME.
1203         * typeck.c (lookup_do): Use `flags' argument to decide what to
1204         do.  Reimplemented.
1205         (lookup_argument_method_generic): New function.
1206         (lookup_argument_method2): Removed.
1207         * jcf.h (ACC_INVISIBLE): New define.
1208         * jcf-write.c (generate_classfile): Skip invisible methods.
1209         * class.c (add_miranda_methods): New function.
1210         (layout_class_methods): Use it.
1211         (get_access_flags_from_decl): Use ACC_INVISIBLE.
1212         * java-tree.h (METHOD_INVISIBLE): New define.
1213         (lang_decl_func) [invisible]: New field.
1214         (lookup_argument_method_generic): Declare.
1215         (SEARCH_INTERFACE): New define.
1216         (SEARCH_SUPER): Likewise.
1217         (SEARCH_ONLY_INTERFACE): Likewise.
1218         (SEARCH_VISIBLE): Likewise.
1219         (lookup_argument_method2): Removed declaration.
1220
1221 2003-08-05  Tom Tromey  <tromey@redhat.com>
1222
1223         Fix for PR java/11600:
1224         * parse.y (java_complete_lhs): See whether we're calling a method
1225         on an array.
1226         (check_thrown_exceptions): Added `is_array_call' argument;
1227         fixed `clone' checking; updated all callers.
1228
1229 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1230
1231         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1232
1233 2003-08-03  Tom Tromey  <tromey@redhat.com>
1234
1235         * java-tree.h (METHOD_TRANSIENT): Removed.
1236         * decl.c (pushdecl): Removed some dead code.
1237         * class.c (get_access_flags_from_decl): Can't have transient
1238         method.
1239         (add_method_1): Can't have a transient method.
1240
1241 2003-07-28  Andreas Jaeger  <aj@suse.de>
1242
1243         * jvspec.c: Convert to ISO C90 prototypes.
1244
1245 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1246
1247         * decl.c (force_poplevels): Fix warning call.
1248
1249 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1250
1251         * expr.c (expand_java_field_op): Don't use xxx_with_decl
1252         (expand_java_field_op): Likewise.
1253         * class.c (layout_class_method): Likewise
1254         (emit_register_classes): Likewise.
1255         * decl.c (pushdecl): Likewise.
1256         (poplevel): Likewise.
1257         (force_poplevels): Likewise.
1258         (give_name_to_locals): Likewise.
1259         * check-init.c (check_for_initialization): Likewise.
1260
1261 2003-07-24  Jason Merrill  <jason@redhat.com>
1262
1263         * java-tree.h: Move boolean_type_node et al to the back end.
1264
1265 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1266
1267         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1268         casts.
1269
1270 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
1271
1272         * lang.opt: Don't show -MD_ and -MDD_.
1273
1274 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
1275
1276         * lang-options.h: Remove.
1277         * lang.opt: Add help text.
1278
1279 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
1280
1281         * expr.c: Remove the last argument to expand_assignment().
1282
1283 2003-07-09  Jan Hubicka  <jh@suse.cz>
1284
1285         * java-tree.h (DECL_NUM_STMTS): Rename to...
1286         (DECL_ESTIMATED_INSNS): ... this.
1287         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1288         New static functions.
1289         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1290         * parser.y (add_stmt_to_compound): Do not account statements.
1291
1292 2003-07-08  Mark Wielaard  <mark@klomp.org>
1293
1294         * gcj.texi: CNI now expands to Compiled Native Interface.
1295
1296 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1297
1298         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1299
1300 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1301
1302         * expr.c (expand_byte_code): Adjist emit_line_note call.
1303
1304 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1305
1306         * lang.c (java_handle_option): Don't handle filenames.
1307
1308 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
1309
1310         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1311         DIR_SEPARATOR.
1312         Use FILENAME_CMP.
1313         * jcf-write.c: Don't default-define DIR_SEPARATOR.
1314         * jcf.h: Delete COMPARE_FILENAMES definition.
1315
1316 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
1317
1318         * lang.c (java_init_options): Update prototype.
1319
1320 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1321
1322         * decl.c (poplevel): Adjust define_label call.
1323
1324 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1325
1326         * gjavah.c (flag_jni): Make non-static.
1327         * parse-scan.y (ctxp): Make non-static.
1328
1329         * class.c (build_method_symbols_entry)
1330         * expr.c (get_offset_table_index)
1331         * jcf-parse.c (jcf_parse):
1332         Mark the definition static, matching the forward declaration.
1333
1334 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
1335
1336         * lang.c (java_handle_option): Don't check for missing arguments.
1337
1338 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1339
1340         * class.c (push_class): Use a location_t to save place.
1341         (emit_register_classes): Set input_location. Adjust
1342         expand_function_end call.
1343         * resource.c (write_resource_constructor): Likewise.
1344         * decl.c (end_java_method): Adjust expand_function_end call.
1345         * parse.y (source_end_java_method): Likewise.
1346
1347 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1348
1349         * lang.c (java_handle_option): Likewise.
1350
1351 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
1352
1353         * lang.c (java_handle_option): Special-casing of optional
1354         joined arguments no longer needed.
1355         * lang.opt: Update switches that take optional argument.
1356
1357 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1358
1359         * lang.opt: Declare Java.
1360         * lang.c (java_init_options): Update.
1361
1362 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1363
1364         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1365
1366 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1367
1368         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1369         * lang.c (java_handle_option): -MD and -MMD have an underscore.
1370         * lang.opt: -MD and -MMD have an underscore.
1371
1372 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1373
1374         * class.c (emit_register_classes): Adjust init_function_start
1375         call.
1376         * decl.c (complete_start_java_method): Likewise.
1377         * resource.c (write_resource_constructor): Likewise.
1378
1379 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1380
1381         * Make-lang.in: Update to use options.c and options.h.
1382         * lang.c: Include options.h not j-options.h.
1383         (java_handle_option): Abort on unrecognized option.
1384         (java_init_options): Request Java switches.
1385
1386 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
1387
1388         * Make-lang.in: Handle mostlyclean.
1389
1390 2003-06-11  Tom Tromey  <tromey@redhat.com>
1391
1392         * lang.c (java_handle_option): Update dependency_tracking for
1393         OPT_MF case.
1394
1395         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1396         empty argument.
1397
1398 2003-06-10  Andrew Haley  <aph@redhat.com>
1399
1400         * resource.c (write_resource_constructor): Use expand_expr to
1401         generate the address of the label attached to a resource.
1402         * Make-lang.in (java/resource.o): Add expr.h
1403
1404 2003-06-10  Andrew Haley  <aph@redhat.com>
1405
1406         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1407         (java_decl_ok_for_sibcall): New.
1408
1409 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
1410
1411         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1412         (java/j-options.c, java/j-options.h): New.
1413         * java-tree.h (resource_name, compile_resource_file,
1414         compile_resource_data): Constify.
1415         * jcf-write.c (jcf_write_base_directory): Similarly.
1416         * jcf.h (jcf_write_base_directory): Similarly.
1417         * lang.c: Include j-options.h.
1418         (cl_options_count, cl_options, string_option, java_decode_option,
1419         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1420         process_option_with_no): Remove.
1421         (resource_name): Constify.
1422         (LANG_HOOKS_HANDLE_OPTION): Override.
1423         (java_handle_option): New.
1424         (java_init): Don't call jcf_path_init.
1425         (java_init_options): Call jcf_path_init.
1426         * lang.opt: New.
1427         * resource.c (compile_resource_data, compile_resource_file): Constify.
1428
1429 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
1430
1431         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1432         (struct lang_decl_func): Add last_line field.
1433         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1434         DECL_SOURCE_LINE_LAST): Remove.
1435         * parse.y (missing_return_error, finish_method_declaration,
1436         lookup_cl, start_artificial_method_body, source_end_java_method,
1437         start_complete_expand_method): Adjust.
1438
1439 2003-06-08  Tom Tromey  <tromey@redhat.com>
1440
1441         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1442         fno-assume-compiled.
1443
1444 2003-06-08  Roger Sayle  <roger@eyesopen.com>
1445
1446         * builtins.c (define_builtin_type, builtin_types): Delete.
1447         (define_builtin): Rewritten to take just the built-in code,
1448         the function's name, type and fallback library function name.
1449         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1450         (initialize_builtins): Overhaul to define the GCC builtins
1451         used by gcj manually, providing the Java run-time's
1452         implementations as the fallback library function.
1453
1454 2003-06-08  Anthony Green  <green@redhat.com>
1455
1456         * parse.y (patch_cast): Fix conversions from floating-point to
1457         integral types.
1458
1459 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
1460
1461         * Make-lang.in: Update.
1462         * lang.c: Include opts.h. Define cl_options_count and cl_options.
1463
1464 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1465
1466         * lang.c (java_init_options): Update.
1467
1468 2003-06-05  Jan Hubicka  <jh@suse.cz>
1469
1470         * Make-lang.in:  Add support for stageprofile and stagefeedback
1471
1472 2003-05-31  Roger Sayle  <roger@eyesopen.com>
1473
1474         * lang.c (java_init_options): Prescribe wrap-around two's
1475         complement arithmetic overflow by setting flag_wrapv.
1476
1477 2003-05-29  Roger Sayle  <roger@eyesopen.com>
1478
1479         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1480         (builtin_record): Add an additional builtin_code field to
1481         record which GCC built-in corresponds to the Java function.
1482         (java_builtins):  Add new entries for atan, atan2, exp, log,
1483         pow and tan.
1484         (max_builtin, min_builtin, abs_builtin): Perform constant
1485         folding on the resulting tree.
1486         (java_build_function_call_expr): Likewise, perform constant
1487         folding on the resulting tree.
1488         (initialize_builtins): The NULL creators are now allowed in
1489         the java_builtins table, which is now terminated by an entry
1490         with builtin_code == END_BUILTINS.
1491         (check_for_builtin): Likewise.  If the matching creator is
1492         NULL, construct the call using java_build_function_call_expr
1493         directly with the decl for the corresponding builtin_code.
1494
1495 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1496
1497         * win32-host.c: Normalize copyright boilerplate.
1498
1499 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1500
1501         * parse.y (print_int_node): Use string concatentation on
1502         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1503         function calls into one.
1504
1505 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
1506
1507         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1508         fatal_io_error with calls to fatal_error; add ": %m" to the end of
1509         all the affected error messages.
1510
1511 2003-05-13  Richard Henderson  <rth@redhat.com>
1512
1513         * class.c (layout_class_method): Set DECL_EXTERNAL.
1514         * decl.c (java_mark_decl_local, java_mark_class_local): New.
1515         * java-tree.h (java_mark_class_local): Declare.
1516         * jcf-parse.c (parse_class_file): Use it.
1517         * parse.y (java_expand_classes): Likewise.
1518
1519 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
1520
1521         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1522         * lex.h: #include input.h.
1523         * jv-scan.c (input_filename): Remove.
1524
1525 2003-05-02  Tom Tromey  <tromey@redhat.com>
1526
1527         PR java/10491:
1528         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1529         (handle_inner_classes): New function.
1530
1531 2003-05-01  Tom Tromey  <tromey@redhat.com>
1532
1533         PR java/10459:
1534         * parse.y (finish_for_loop): Do nothing if update expression is a
1535         EXPR_WFL_NODE wrapping nothing.
1536         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1537
1538 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
1539
1540         * lex.h (input_lineno): Remove declaration.
1541         * parse-scan.y: #include input.h.
1542         (input_filename): Remove declaration.
1543         (input_location): Add definition.
1544         (input_line): Remove definition.
1545
1546 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1547
1548         * lex.h (lineno): Rename to ...
1549         (input_line): ... here
1550         * parse-scan.y (lineno): Rename to ...
1551         (input_line): ... here.
1552         (reset_report): Rename lineno to input_line.
1553         * check-init.c (check_init): Likewise.
1554         * class.c (push_class): Likewise.
1555         * decl.c (complete_start_java_method, end_java_method): Likewise.
1556         * expr.c (expand_byte_code): Likewise.
1557         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1558         * jcf-write.c (generate_bytecode_insns): Likewise.
1559         * lex.c (java_init_lex, java_allocate_new_line,
1560         do_java_lex): Likewise.
1561         * parse.h (YYNOT_TWICE): Likewise.
1562         * parse.y (empty_statement, expression_statement,
1563         java_pop_parser_context, java_parser_context_save_global,
1564         yyerror, register_fields, method_header, safe_layout_class,
1565         find_in_imports_on_demand, create_artificial_method,
1566         source_end_java_method, start_complete_expand_method,
1567         build_thisn_assign, java_complete_lhs,
1568         maybe_absorb_scoping_block): Likewise.
1569
1570 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
1571
1572         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1573         '/' when computing java source filename
1574
1575 2003-04-13  Tom Tromey  <tromey@redhat.com>
1576
1577         * gjavah.c (print_c_decl): Indentation fix.
1578
1579 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1580
1581         * class.c (make_field_value, make_method_value, get_dispatch_table)
1582         (make_class_data, emit_offset_symbol_table)
1583         * constants.c (build_constants_constructor)
1584         * java-tree.h (START_RECORD_CONSTRUCTOR)
1585         * parse.y (maybe_build_array_element_wfl):
1586         Use build_constructor.
1587
1588 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
1589
1590         PR java/10253:
1591         * parse.y (string_convert_int_cst): Always use at least one digit
1592         in string conversion. Remove ASCII dependence.
1593         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
1594
1595 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
1596
1597         * Make-lang.in: added win32-host.c
1598         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
1599         resolves to open() on non-Win32 platforms and
1600         Win32-specific jcf_open_exact_case() on Win32
1601         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
1602         when trying .java and .class files
1603         * win32-host.c: added to repository. Defines
1604         Win32-specific jcf_open_exact_case()
1605
1606 2003-04-10  Andrew Haley  <aph@redhat.com>
1607
1608         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
1609         (maybe_free_localvar): Renamed from localvar_free.
1610         Add new arg, really.
1611         (generate_bytecode_insns): Set new variable, jsrs.
1612         Only free local vars if no jsr insns have been emittted.
1613         Call maybe_free_localvar, not localvar_free.
1614
1615 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
1616
1617         * gcj.texi: Remove @ at start of file.
1618
1619 2003-03-25  Tom Tromey  <tromey@redhat.com>
1620
1621         * parse.y (create_interface): Call CHECK_DEPRECATED.
1622
1623 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
1624
1625         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
1626
1627 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1628
1629         * javaop.h (jfloat, jdouble): Make them structures mirroring
1630         the bit fields of IEEE float and double respectively.
1631         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
1632         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
1633         (union Word, union DWord): Delete.
1634         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
1635
1636         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
1637         D_NAN_MASK): Delete.
1638         (jni_print_float, jni_print_double): New.  Generate
1639         hexadecimal floating constants.
1640         (print_field_info): Use jni_print_float/double.
1641
1642         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
1643         finite floating point numbers for output; special case
1644         non-finite floats.
1645
1646 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1647
1648         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
1649         Replace 0 and 1 with true and false in return statements.
1650
1651 2003-03-19  Tom Tromey  <tromey@redhat.com>
1652
1653         * lex.c (do_java_lex): Renamed from java_lex.
1654         (java_lex): New function.
1655         Include timevar.h.
1656
1657 2003-03-13  Tom Tromey  <tromey@redhat.com>
1658
1659         * parse.y (resolve_inner_class): Error if qualifier is a primitive
1660         type.
1661
1662 2003-03-04  Andrew Haley  <aph@redhat.com>
1663
1664         * gjavah.c (is_first_data_member): New global variable.
1665         (print_c_decl): If it's the first data member, align it as the
1666         superclass.
1667         (process_file): Set is_first_data_member.
1668
1669 2003-03-11  Tom Tromey  <tromey@redhat.com>
1670
1671         * parse.y (resolve_field_access): Initialize class if field is
1672         found in another static field.
1673         * expr.c (build_class_init): Don't optimize out initialization of
1674         implemented interface.
1675
1676 2003-03-11  Andrew Haley  <aph@redhat.com>
1677
1678         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
1679         warning.
1680
1681 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1682
1683         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
1684         and DIR_SEPARATOR_2 for a target.
1685         Correct minor typos.
1686
1687         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
1688         and DIR_SEPARATOR_2 for a target into account.
1689
1690 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1691
1692         * lang.c (java_init): Update prototype, move code to java_post_options.
1693         (java_post_options): Similarly.
1694
1695 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
1696
1697         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
1698         compare file name components depending on the case-sensitivity
1699         or otherwise of the host file system.
1700
1701         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
1702         "strcmp" to compare file name components.
1703         Use IS_DIR_SEPARATOR instead of comparing directly against
1704         DIR_SEPARATOR.
1705         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
1706         comparing directly against DIR_SEPARATOR.
1707
1708 2003-03-04  Tom Tromey  <tromey@redhat.com>
1709
1710         * Make-lang.in (java.tags): New target.
1711
1712 2003-03-01  Roger Sayle  <roger@eyesopen.com>
1713
1714         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
1715         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
1716
1717 2003-03-01  Tom Tromey  <tromey@redhat.com>
1718
1719         * parse.y (jdep_resolve_class): Only check deprecation if we found
1720         a decl.
1721
1722 2003-02-28  Tom Tromey  <tromey@redhat.com>
1723
1724         PR java/9695:
1725         * class.c (maybe_layout_super_class): Always pass a WFL to
1726         do_resolve_class.
1727         * parse.y (do_resolve_class): Updated comment to explain
1728         parameters.
1729
1730 2003-02-26  Tom Tromey  <tromey@redhat.com>
1731
1732         * jcf-write.c (generate_classfile): Check whether class is
1733         deprecated before writing attribute count.
1734
1735 2003-02-25  Roger Sayle  <roger@eyesopen.com>
1736
1737         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
1738         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
1739
1740 2003-02-23  Tom Tromey  <tromey@redhat.com>
1741
1742         * lang-options.h: Added -Wdeprecated.
1743         * gcj.texi (Warnings): Document -Wdeprecated.
1744         * java-tree.h (flag_deprecated): Declare.
1745         * lang.c (lang_W_options): Added deprecated.
1746         (flag_deprecated): New global.
1747         * chartables.h: Rebuilt.
1748         * gen-table.pl (process_one): Look at whitespace.
1749         (print_tables): Define LETTER_SPACE, LETTER_MASK.
1750         * parse.h (CLEAR_DEPRECATED): New macro.
1751         (CHECK_DEPRECATED_NO_RESET): New macro.
1752         * jcf-parse.c (handle_deprecated): New function.
1753         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
1754         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
1755         * parse.y (resolve_type_during_patch): Check deprecation.
1756         (jdep_resolve_class): Likewise.
1757         (process_imports): Likewise.
1758         (resolve_expression_name): Likewise.
1759         (check_deprecation): Strip arrays from decl.  Check
1760         flag_deprecated.
1761         (patch_method_invocation): Also check the particular constructor
1762         for deprecation.
1763         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
1764         * jcf-write.c (append_deprecated_attribute): New function.
1765         (generate_classfile): Generate deprecated attribute when
1766         appropriate.
1767         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
1768         (java_lex) [case '*']: Simplify logic.
1769         (java_start_char_p): Use LETTER_MASK.
1770         (java_part_char_p): Likewise.
1771         (java_space_char_p): New function.
1772
1773 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1774
1775         Change base class access representation.
1776         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
1777         (add_interface_do): Likewise.
1778
1779 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
1780
1781         * decl.c (java_init_decl_processing): Change
1782         soft_lookupjnimethod_node to reflect the change in
1783         signature of _Jv_LookupJNIMethod in libjava/jni.cc
1784         * expr.c (build_jni_stub): Calculate and pass the size
1785         on the stack of the arguments to a JNI function. Use
1786         new target macro MODIFY_JNI_METHOD_CALL to allow a
1787         target to modify the call to a JNI method.
1788
1789 2003-02-08  Roger Sayle  <roger@eyesopen.com>
1790
1791         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
1792         instead of basename to avoid compiler warnings on Tru64.
1793
1794 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1795
1796         * gcj.texi: Update to GFDL 1.2.
1797
1798 2003-01-31  Andrew Haley  <aph@redhat.com>
1799
1800         * parse.y (java_expand_classes): Scan the whole class list looking
1801         for access methods that haven't yet been expanded.
1802
1803 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
1804
1805         Fix for java/4269:
1806
1807         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
1808         to fix bootstrap on sparc-unknown-netbsdelf1.5.
1809         * jcf-parse.c: Likewise.
1810
1811 2003-01-31  Mark Wielaard  <mark@klomp.org>
1812
1813         * gjavah.c (throwable_p): Allocate 1 more byte for string.
1814
1815 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1816
1817         * class.c (make_class): Use BINFO_ELTS.
1818         (set_super_info): Likewse.
1819         (add_interface_do): Likewise.
1820
1821 2003-01-30  Tom Tromey  <tromey@redhat.com>
1822
1823         * jcf-parse.c (read_class): Update identifier's class value if it
1824         changed during parsing.
1825
1826 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
1827
1828         * Make-lang.in (po-generated): Find the targets in $(parsedir).
1829         Propagate change to all other rules as required.
1830         (java/parse-scan.o): Add explicit dependency on
1831         $(parsedir)/java/parse-scan.c .
1832
1833 2003-01-29  Tom Tromey  <tromey@redhat.com>
1834
1835         * parse.y (patch_assignment): Only transform the rhs of an
1836         assignment when compiling to native.
1837
1838 2003-01-28  Tom Tromey  <tromey@redhat.com>
1839
1840         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
1841
1842 2003-01-28  Tom Tromey  <tromey@redhat.com>
1843
1844         * lex.c (java_lex): Don't include UEOF as part of token.
1845         (java_read_unicode): Error if \u sequence prematurely terminated.
1846
1847 2003-01-27  Tom Tromey  <tromey@redhat.com>
1848
1849         * parse.y (java_check_regular_methods): Check for construct after
1850         checking types in throws clause.
1851
1852 2003-01-24  Tom Tromey  <tromey@redhat.com>
1853
1854         * class.c (build_static_field_ref): Only a String or numeric field
1855         can fold to a constant.
1856
1857 2003-01-23  Tom Tromey  <tromey@redhat.com>
1858
1859         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
1860         file name in resource buffer.
1861
1862 2003-01-23  Tom Tromey  <tromey@redhat.com>
1863
1864         * expr.c (build_known_method_ref): Use method's context to find
1865         method table index.
1866
1867 2003-01-23  Tom Tromey  <tromey@redhat.com>
1868
1869         * constants.c (set_constant_entry): Allocated cleared memory.
1870
1871 2003-01-22  Tom Tromey  <tromey@redhat.com>
1872
1873         * java-tree.h: Don't use PARAMS.
1874         * resource.c: Add prototypes for all functions.
1875         (write_resource_constructor): Use `const char *' to avoid
1876         warning.
1877
1878 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
1879
1880         * jcf-parse.c (process_zip_dir): Remove unused variable.
1881
1882 2003-01-22  Tom Tromey  <tromey@redhat.com>
1883
1884         * expr.c (build_invokeinterface): Abort if method's context is not
1885         an interface.
1886
1887 2003-01-22  Tom Tromey  <tromey@redhat.com>
1888
1889         * gcj.texi (Input and output files): Mention non-class entries.
1890         * decl.c (java_init_decl_processing): Call
1891         init_resource_processing.
1892         * java-tree.h (compile_resource_data, write_resource_constructor,
1893         compile_resource_file, init_resource_processing): Declare.
1894         * config-lang.in (gtfiles): Added resource.c.
1895         * Make-lang.in (gt-java-resource.h): New target.
1896         (JAVA_OBJS): Added resource.o.
1897         (java/resource.o): New target.
1898         * resource.c: New file.
1899         * class.c (compile_resource_file): Moved to resource.c.
1900         (registerResource_libfunc): Likewise.
1901         (utf8_decl_list): Mark with GTY; now static.
1902         * jcf-parse.c (classify_zip_file): New function.
1903         (parse_zip_file_entries): Use it; compile .properties files.
1904         (process_zip_dir): Use classify_zip_file and compute_class_name.
1905         Don't write class name into zip directory.
1906         (java_parse_file): Call write_resource_constructor.
1907         (compute_class_name): New function.
1908         * jcf-io.c (read_zip_member): Reindented.
1909
1910 2003-01-21  Tom Tromey  <tromey@redhat.com>
1911
1912         * class.c (supers_all_compiled): New function.
1913         (make_class_data): Use it.
1914
1915 2003-01-21  Tom Tromey  <tromey@redhat.com>
1916
1917         * parse.y (method_header): Native method can't be strictfp.
1918         No method can be transient or volatile.
1919
1920 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1921
1922         Make-lang.in (jvspec.o-warn): Add -Wno-error.
1923
1924 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1925
1926         * check-init.c: Fix comment typos.
1927         * class.c: Likewise.
1928         * constants.c: Likewise.
1929         * decl.c: Likewise.
1930         * except.c: Likewise.
1931         * expr.c: Likewise.
1932         * java-except.h: Likewise.
1933         * java-tree.h: Likewise.
1934         * javaop.h: Likewise.
1935         * jcf-dump.c: Likewise.
1936         * jcf-io.c: Likewise.
1937         * jcf-parse.c: Likewise.
1938         * jcf-write.c: Likewise.
1939         * lang.c: Likewise.
1940         * mangle.c: Likewise.
1941         * typeck.c: Likewise.
1942         * verify.c: Likewise.
1943
1944 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1945
1946         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
1947         * jcf-write.c: Include "tm_p.h".
1948
1949 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1950
1951         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
1952
1953 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1954
1955         * builtins.c (java_build_function_call_expr): Renamed from
1956         build_function_call_expr.  All callers changed.
1957
1958         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
1959         * jcf-parse.c: Include tm_p.h.
1960
1961         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
1962         warning.
1963
1964 2003-01-14  Tom Tromey  <tromey@redhat.com>
1965
1966         * class.c (make_class_data): Check that super is compiled before
1967         building class reference to it.
1968
1969 2003-01-14  Andrew Haley  <aph@redhat.com>
1970
1971         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1972         varargs function -- correct.
1973
1974 2003-01-14  Andrew Haley  <aph@redhat.com>
1975
1976         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
1977
1978 2003-01-14  Andrew Haley  <aph@redhat.com>
1979
1980         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1981         varargs function -- correct.
1982
1983         * parse.y (patch_assignment): Copy the rhs of an assignment into a
1984         temporary if the RHS is a reference.
1985
1986 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1987
1988         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
1989         * keyword.h: Regenerated.
1990
1991         * All Files: Convert to ISO C style function definitions.
1992
1993 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1994
1995         * parse.y (check_pkg_class_access): ANSIfy definition.
1996
1997 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1998
1999         * decl.c, parse-scan.y, parse.y: Don't cast return value of
2000         xmalloc et al.
2001
2002         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2003
2004 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2005
2006         Merge from pch-branch:
2007
2008         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
2009
2010         * Make-lang.in (java/gjavah.o): Update dependencies.
2011         * gjavah.c: Include ggc.h.
2012
2013         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
2014
2015         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2016         (JCFDUMP_OBJS): Add ggc-none.o.
2017         (java/jcf-dump.o): Depend on GGC_H.
2018         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2019         CPool substructures.
2020         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2021         * jcf-dump.c: Include ggc.h.
2022
2023         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2024
2025         * jcf.h (union cpool_entry): New.
2026         (struct CPool): Use gengtype to mark.  Change field 'data' to be
2027         an array of unions.
2028         (struct JCF): Use gengtype to mark.
2029         (CPOOL_UINT): Update for new cpool_entry type.
2030         (CPOOL_USHORT1): Likewise.
2031         (CPOOL_USHORT2): Likewise.
2032         (CPOOL_FINISH): Use GC to free cpool subfields.
2033         * parse.h (struct parser_ctxt): Mark field current_jcf.
2034         * lex.c (java_init_lex): Use GC to allocate struct JCF.
2035         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2036         (main_jcf): Use gengtype to mark.
2037         (ggc_mark_jcf): Delete.
2038         (get_constant): Update for new cpool_entry type.
2039         (give_name_to_class): Likewise.
2040         (get_class_constant): Likewise.
2041         (init_outgoing_cpool): Use GGC to allocate struct CPool.
2042         (java_parse_file): Use GGC to allocate struct JCF.
2043         (init_jcf_parse): Don't call ggc_add_root.
2044         * jcf-reader.c (jcf_parse_constant_pool): Update for new
2045         cpool_entry type.
2046         * java-tree.h (current_jcf): Use gengtype to mark.
2047         (CPOOL_UTF): Update for new cpool_entry type.
2048         (outgoing_cpool): Use gengtype to mark.
2049         (struct lang_type): GC struct JCF and struct CPool.
2050         * config-lang.in (gtfiles): Add jcf.h.
2051         * constants.c (find_tree_constant): New.
2052         (set_constant_entry): Allocate cpool subfields using GGC.  Update
2053         for new cpool_entry type.
2054         (find_constant1): Update for new cpool_entry type.
2055         (find_constant2): Likewise.
2056         (find_utf8_constant): Use find_tree_constant.
2057         (find_class_or_string_constant): Remove unnecessary cast to jword.
2058         Update for new cpool_entry type.
2059         (count_constant_pool_bytes): Update for new cpool_entry type.
2060         (write_constant_pool): Likewise.
2061         (alloc_name_constant): Use find_tree_constant.
2062         (build_constants_constructor): Update for new cpool_entry type.
2063
2064         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2065
2066         * parse.y (mark_parser_ctxt): Delete.
2067         (goal): Don't use ggc_add_root.
2068         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2069         (java_pop_parser_context): Let GC free parser_ctxt.
2070         (java_parser_context_resume): Likewise.
2071         * parse.h (struct parser_ctxt): Use gengtype to mark.
2072         (ctxp): Likewise.
2073         (ctxp_for_generation): Likewise.
2074         * lex.h (struct java_lc_s): Mark for gengtype.
2075         (java_lexer): Rearrange for gengtype.
2076         * config-lang.in (gtfiles): Add lex.h, parse.h.
2077
2078 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2079
2080         * All Files: Remove PARAMS macro.
2081
2082         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2083         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2084         `__STDC__' macros.
2085
2086         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2087         VA_CLOSE.
2088
2089 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2090
2091         * Make-lang.in (java.install-common, java.uninstall,
2092         java.install-info, java.install-man): Prepend $(DESTDIR)
2093         to destination paths in all (un)installation commands.
2094         (java.install-common): Rewrite $(LN) command to support
2095         DESTDIR with "ln" as well as with "ln -s".
2096
2097 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2098
2099         * java-tree.h: Protect against multiple inclusion.
2100
2101 2003-01-07  Tom Tromey  <tromey@redhat.com>
2102
2103         * class.c (add_assume_compiled): Don't adjust parent if we're
2104         already at the root of tree.
2105
2106 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2107
2108         * lang.c (dump_compound_expr): Prototype.
2109
2110 2003-01-03  Tom Tromey  <tromey@redhat.com>
2111
2112         Fix for PR java/8712:
2113         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2114         when simply checking against `null'.
2115
2116 2003-01-03  Tom Tromey  <tromey@redhat.com>
2117
2118         * gcj.texi (Standard Properties): Document http.proxyHost and
2119         http.proxyPort.
2120
2121         * gcj.texi (GNU Classpath Properties): Document new properties.
2122
2123 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2124
2125         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2126         java/lang-options.h, java/mangle.c, java/mangle_name.c,
2127         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2128
2129 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2130
2131         * Make-lang.in, boehm.c, buffer.c,
2132           buffer.h, builtins.c, class.c,
2133           config-lang.in, constants.c,
2134           convert.h, decl.c, except.c,
2135           expr.c, java-except.h,
2136           java-tree.h, javaop.def,
2137           jcf-parse.c, jcf-write.c,
2138           jv-scan.c, jvgenmain.c,
2139           jvspec.c, keyword.gperf,
2140           keyword.h, lang-options.h,
2141           lang-specs.h, lang.c, lex.c,
2142           lex.h, mangle.c, mangle_name.c,
2143           parse-scan.y, parse.h, parse.y,
2144           typeck.c, verify.c, xref.c,
2145           xref.h: Replace "GNU CC" with
2146           "GCC" in the copyright header.
2147
2148         * check-init.c, gjavah.c, javaop.h,
2149           jcf-depend.c, jcf-dump.c, jcf-io.c,
2150           jcf-path.c, jcf-reader.c, jcf.h,
2151           zextract.c, zipfile.h: These files are
2152           "part of GCC". Also say "GCC" not "GNU CC".
2153
2154 2002-12-30  DJ Delorie  <dj@redhat.com>
2155
2156         * Make-lang.in: Protect against texi2pod/pod2man failing.
2157
2158 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
2159
2160         * gcj.texi: Use @copying.
2161
2162 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2163
2164         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2165         print_cxx_classname.
2166         (print_cxx_classname): Add add_scope parameter.
2167         (print_class_decls): Do not emit a semicolon after the extern
2168         "Java" block.
2169         (process_file): Adjust calls to print_cxx_classname.
2170
2171 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2172
2173         * gcj.texi: Include Cover Texts in man page.
2174
2175 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
2176
2177         * class.c (build_static_field_ref): Check FIELD_FINAL.
2178
2179         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2180         instead of current_constant_pool_data_ref.
2181         * java-tree.h (current_constant_pool_data_ref): Undefine.
2182         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2183         * jcf-parse.c (init_outgoing_cpool): Don't initialize
2184         current_constant_pool_data_ref.
2185
2186         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2187         not build_internal_class_name.
2188
2189         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2190         Use it when class ref isn't certain to be compiled.
2191
2192 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2193
2194         * gcj.texi: Include gcc-common.texi.
2195         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2196         $(srcdir)/doc/include/gcc-common.texi.
2197
2198 2002-12-22  Anthony Green  <green@redhat.com>
2199
2200         * gcj.texi (Limitations): Add note about org.xml.sax and
2201         org.w3c.dom.
2202
2203 2002-12-20  Tom Tromey  <tromey@redhat.com>
2204
2205         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2206         where minimum case value is Integer.MIN_VALUE.
2207         Fixes PR java/8955.
2208
2209 2002-12-18  Andrew Haley  <aph@redhat.com>
2210
2211         * parse.y (patch_invoke): Force evaluation order when `check' is
2212         set.  For PR libgcj/8945.
2213
2214 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
2215
2216         * gcj.texi: Change version number to 3.4.
2217
2218 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
2219         Andrew Haley <aph@redhat.com>
2220
2221         * parse.y (source_end_java_method): Remove custom encoding of line
2222         numbers for a function decl before passing it to the back end.
2223
2224 2002-12-03  Andrew Haley  <aph@redhat.com>
2225
2226         * class.c (make_class_data): New field, "chain".
2227         * decl.c (java_init_decl_processing): Likewise.
2228
2229 2002-12-02  Tom Tromey  <tromey@redhat.com>
2230
2231         For PR java/8740:
2232         * parse.y (do_resolve_class): Handle qualified name via
2233         recursion.
2234
2235 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2236
2237         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2238         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2239         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2240         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2241         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2242         Include coretypes.h and tm.h.
2243         * Make-lang.in: Update dependencies.
2244
2245 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2246
2247         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2248
2249 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2250
2251         * jcf-reader.c: Don't expand JCF_readu4 inside the
2252         expansion of JCF_SKIP.
2253
2254 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2255
2256         * jcf-reader.c: Don't expand JCF_readu4 inside the
2257         expansion of JCF_SKIP.
2258
2259 2002-11-22  Tom Tromey  <tromey@redhat.com>
2260
2261         * parse.y (patch_binop): Cast right hand side of shift expression
2262         to `int'.  Fixes PR java/8676.
2263
2264 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
2265             Andrew Haley <aph@redhat.com>
2266
2267         * gcc/java/jcf-write.c (write_classfile): Remove target
2268         class file, if it exists, before renaming the temporary
2269         class file to it.
2270
2271 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2272
2273         * jvspec.c (lang_specific_spec_functions): New.
2274
2275 2002-11-18  Tom Tromey  <tromey@redhat.com>
2276
2277         Fix for PR java/7912:
2278         * expr.c (can_widen_reference_to): Allow cast of array to
2279         Cloneable or Serializable.
2280         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2281         (java_io_serializable_identifier_node): Likewise.
2282         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2283         (valid_ref_assignconv_cast_p): Use new identifier nodes.
2284         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2285         java_io_serializable.
2286         * decl.c (java_init_decl_processing): Initialize
2287         java_lang_cloneable_identifier_node and
2288         java_io_serializable_identifier_node.
2289         (java_lang_cloneable_identifier_node): New global.
2290         (java_io_serializable_identifier_node): Likewise.
2291
2292 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2293
2294         * buffer.c: Remove unnecessary casts.
2295         * check-init.c: Likewise.
2296         * class.c: Likewise.
2297         * constants.c: Likewise.
2298         * decl.c: Likewise.
2299         * except.c: Likewise.
2300         * gjavah.c: Likewise.
2301         * jcf-io.c: Likewise.
2302         * jcf-parse.c: Likewise.
2303         * jcf-path.c: Likewise.
2304         * jvspec.c: Likewise.
2305         * lang.c: Likewise.
2306         * lex.c: Likewise.
2307         * verify.c: Likewise.
2308
2309 2002-11-06  Tom Tromey  <tromey@redhat.com>
2310
2311         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2312         a JNI header.
2313
2314 2002-11-05  Tom Tromey  <tromey@redhat.com>
2315
2316         Fix for PR java/6388.
2317         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2318         * java-tree.h (enum java_tree_index): New values
2319         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2320         (decimal_int_max, decimal_long_max): New defines.
2321         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
2322         (error_if_numeric_overflow): Rewrote range checking.
2323         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2324         decimal_long_max.
2325
2326 2002-11-02  Tom Tromey  <tromey@redhat.com>
2327
2328         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2329
2330         * class.c (make_method_value): Put class name, not signature, into
2331         `throws' field.  For PR java/8415.
2332
2333 2002-10-24  Tom Tromey  <tromey@redhat.com>
2334
2335         * gcj.texi (Invoking gij): Document --showversion.
2336         (Standard Properties): java.library.path now set.
2337
2338 2002-10-23  Tom Tromey  <tromey@redhat.com>
2339
2340         * gjavah.c (decode_signature_piece): In JNI mode, print
2341         `jobjectArray' when array depth is nonzero.
2342         Fixes PR java/8296.
2343
2344 2002-10-15  Andrew Haley  <aph@redhat.com>
2345
2346         * parse.y (patch_invoke): Call force_evaluation_order on a static
2347         arg list.
2348         (resolve_qualified_expression_name): Call force_evaluation_order
2349         on a arg list that is part of a Qualified Expression Name.
2350
2351         * lang.c (dump_compound_expr): New.
2352         (java_dump_tree): New.
2353
2354 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
2355
2356         * gcj.texi: Added item describing the GCJ runtime property
2357         "gnu.gcj.progname".
2358
2359 2002-10-15  Richard Henderson  <rth@redhat.com>
2360
2361         * jcf-parse.c (get_constant): Fix type warning.
2362
2363 2002-10-15  Andrew Haley  <aph@redhat.com>
2364
2365         * java-tree.h (java_inlining_merge_static_initializers): Declare.
2366         (java_inlining_map_static_initializers): Declare.
2367
2368 2002-10-14  Andrew Haley  <aph@redhat.com>
2369
2370         * tree-inline.c (remap_block): All local class initialization
2371         flags go in the outermost scope.
2372         (expand_call_inline): Call java_inlining_map_static_initializers.
2373         (expand_call_inline): Call java_inlining_merge_static_initializers.
2374         * java/lang.c (merge_init_test_initialization): New.
2375         (java_inlining_merge_static_initializers): New.
2376         (inline_init_test_initialization): New.
2377         (java_inlining_map_static_initializers): New.
2378
2379 2002-10-11  Mark Wielaard  <mark@klomp.org>
2380
2381         * gcj.texi (Compatibility): Add Limitations and Extensions section.
2382
2383 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2384
2385         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2386
2387 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2388
2389         * parse.y (merge_string_cste): Add parentheses around & within |.
2390
2391 2002-10-08  Tom Tromey  <tromey@redhat.com>
2392
2393         * parse.y (variable_declarator_id): Simplify error path for
2394         array declarator error.  For PR java/8003.
2395
2396 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
2397
2398         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2399         bug_report_url.
2400
2401 2002-10-08  Andrew Haley  <aph@redhat.com>
2402
2403         * parse.y (attach_init_test_initialization_flags): Check for
2404         error_mark_node.
2405
2406 2002-10-07  Anthony Green  <green@redhat.com>
2407
2408         * parse.y (merge_string_cste): Fix bug in string concatenation.
2409
2410 2002-10-03  Michael Koch  <konqueror@gmx.de>
2411
2412         * gcj.texi (Standard properties):
2413         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2414
2415 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2416
2417         PR optimization/6627
2418         * lang.c (java_init): If storing the vbit in function
2419         pointers, ensure that force_align_functions_log is atleast
2420         one to aid compatability with g++ vtables.
2421
2422 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
2423
2424         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2425         foul of type-based aliasing.
2426
2427 2002-09-30  Anthony Green  <green@redhat.com>
2428
2429         * gcj.texi (Invoking jv-scan): Fix texinfo.
2430
2431 2002-09-28  Anthony Green  <green@redhat.com>
2432
2433         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2434         (Code Generation): Add -fno-assert documentation.
2435         * jv-scan.c (flag_assert): New global.
2436         (options): Add assert option.
2437         (help): Add --no-assert documentation.
2438         * parse-scan.y (flag_assert): New global.
2439         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2440         (flag_assert): New global.
2441         * java-tree.h (flag_assert): New global.
2442         * lex.c (java_lex): Obey flag_assert.
2443         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2444         calling cc1.
2445
2446 2002-09-26  Andrew Haley  <aph@redhat.com>
2447
2448         * expr.c (build_java_array_length_access): Check for null pointer.
2449         * expr.c (expand_java_arrayload): Likewise.
2450
2451 2002-09-21  Richard Henderson  <rth@redhat.com>
2452
2453         * jcf-parse.c (get_constant): Decode from IEEE no matter
2454         what the target format.
2455
2456 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
2457
2458         * ChangeLog: Follow spelling conventions.
2459         * class.c: Likewise.
2460         * decl.c: Likewise.
2461         * expr.c: Likewise.
2462         * gjavah.c: Likewise.
2463         * java-tree.h: Likewise.
2464         * jcf-dump.c: Likewise.
2465         * jcf-parse.c: Likewise.
2466         * jvspec.c: Likewise.
2467         * lang.c: Likewise.
2468         * mangle.c: Likewise.
2469         * parse.y: Likewise.
2470
2471 2002-09-17  Tom Tromey  <tromey@redhat.com>
2472
2473         * lex.c (java_read_unicode_collapsing_terminators): Handle case
2474         where \r appears at EOF.  Fixes PR java/7950.
2475
2476 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2477
2478         * jvspec.c (lang_specific_driver): Remove unused variable.
2479
2480 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2481
2482         * java-tree.h (union lang_tree_node): Add chain_next option.
2483
2484 2002-09-16  Richard Henderson  <rth@redhat.com>
2485
2486         * jcf-parse.c (get_constant): Runtime check for IEEE format;
2487         use new real.h interface.
2488         * jcf-write.c (find_constant_index): Use new real.h interface.
2489         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2490
2491 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2492
2493         * lang.c: Follow spelling conventions.
2494
2495 2002-09-11  Per Bothner  <per@bothner.com>
2496
2497         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
2498         constant to the type of the field.
2499         (java_complete_tree):  Remove now-redundant code.
2500
2501         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
2502
2503 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
2504
2505         For PR java/5794:
2506         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2507         return label if a ret instruction for the jsr has been reached.
2508
2509 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
2510
2511         * parse.y (DIR_SEPARATOR): Don't define.
2512         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2513
2514 2002-08-28  Andrew Haley  <aph@redhat.com>
2515
2516         * verify.c (verify_jvm_instructions): Allow exception handler
2517         inside code that is being protected, but generate a warning.
2518         * except.c (link_handler): Initialize `expanded' in new eh_range.
2519         (binding_depth, is_class_level, current_pc): Declare extern.
2520
2521 2002-09-01  Mark Wielaard <mark@klomp.org>
2522
2523         * gcj.texi: Add chapter about system properties.
2524         Fixed some typos.
2525
2526 2002-08-26  Tom Tromey  <tromey@redhat.com>
2527
2528         * parse.y (try_builtin_assignconv): Allow narrowing primitive
2529         conversion if RHS_TYPE is byte, short, or char.
2530
2531 2002-08-22  Tom Tromey  <tromey@redhat.com>
2532
2533         * gcj.texi (Invoking gij): Document -cp and -classpath.
2534
2535 2002-08-21  Tom Tromey  <tromey@redhat.com>
2536
2537         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2538         $(prefix)/share.  For PR libgcj/7633.
2539
2540         For PR java/6005 and PR java/7611:
2541         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2542         (java_can_use_bit_fields_p): New function.
2543
2544 2002-08-16  Tom Tromey  <tromey@redhat.com>
2545
2546         * gcj.texi (Class Initialization): Mention class initialization of
2547         arrays.
2548
2549 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
2550
2551         * Make-lang.in (java-tree-inline.o): New.
2552         (JAVA_OBJS): Add java-tree-inline.o.
2553         * parse.y (source_end_java_method): Call java_optimize_inline.
2554         (java_expand_method_bodies): Save method's tree in
2555         DECL_SAVED_TREE.
2556         (add_stmt_to_compound): Keep track of the number of statments.
2557         * lang.c (java_init): Enable flag_inline_trees.
2558         (java_post_options): If flag_inline_functions is on, enable
2559         flag_inline_trees instread.
2560         (decl_constant_value): New.
2561         (java_tree_inlining_walk_subtrees): New.
2562         * java-tree.h (DECL_NUM_STMTS): New macro.
2563         (java_optimize_inline): Declare.
2564         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2565         Handle a LABEL_EXPR.
2566         * decl.c (build_result_decl): If we already have a DECL_RESULT
2567         don't make another.
2568         (dump_function): New.
2569         (java_optimize_inline): New.
2570         (dump_function): New.
2571
2572 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
2573
2574         For PR java/7483:
2575         * parse.y (build_assertion): Invert return from
2576         desiredAssertionStatus.
2577
2578 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2579
2580         * jcf-write.c (get_access_flags): Return correct access flags for
2581         private and protected inner classes.
2582
2583 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2584
2585         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
2586
2587 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2588
2589         * mangle_name.c: Don't include obstack.h twice.
2590         * xref.c: Don't include obstack.h.
2591
2592 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2593
2594         * class.c: (permanent_obstack): Delete declaration.
2595         * constants.c: (permanent_obstack): Delete declaration.
2596         * except.c: (permanent_obstack): Delete declaration.
2597         * expr.c: (permanent_obstack): Delete declaration.
2598         * jcf-parse.c: (permanent_obstack): Delete declaration.
2599         (saveable_obstack): Delete declaration.
2600         * parse.h: (permanent_obstack): Delete declaration.
2601         * typeck.c: (permanent_obstack): Delete declaration.
2602
2603 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2604
2605         * gcj.texi (version-gcc): Increase to 3.3.
2606
2607 2002-07-22  Tom Tromey  <tromey@redhat.com>
2608
2609         * lex.c (java_lex): Check for `e' or `E' after 0.
2610
2611 2002-07-21  Richard Henderson  <rth@redhat.com>
2612
2613         * lang.c (java_unsafe_for_reeval): New.
2614         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2615
2616 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
2617
2618         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
2619         (jcf_path_init): Use GET_ENVIRONMENT.
2620
2621 2002-07-10  Roger Sayle  <roger@eyesopen.com>
2622             Zack Weinberg <zack@codesourcery.com>
2623
2624         * builtins.c (initialize_builtins): Remove defines that
2625         handled C/C++ specific junk hereby removed from builtins.def.
2626
2627 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
2628
2629         * lang.c (java_post_options): Update prototype.
2630
2631 2002-07-05  Roger Sayle  <roger@eyesopen.com>
2632
2633         * builtins.c (initialize_builtins): Ignore the additional
2634         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
2635         the builtins.def file.
2636
2637 2002-07-01  Tom Tromey  <tromey@redhat.com>
2638
2639         For PR libgcj/7073:
2640         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2641         specially.
2642
2643 2002-07-01  Roger Sayle  <roger@eyesopen.com>
2644
2645         * java/decl.c (builtin_function): Accept additional parameter.
2646         (java_init_decl_processing): Pass an additional NULL_TREE
2647         argument to builtin_function.
2648
2649 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
2650
2651         * gcj.texi: Fixed gcj invocation example so that it compiles.
2652
2653 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2654
2655         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
2656         * parse.y (mark_parser_ctxt): Likewise.
2657         (check_modifiers, declare_local_variables): Avoid incorrect
2658         hardcoded constant 10.
2659
2660         * lex.c (java_read_char): Avoid "comparison is always true"
2661         warning.
2662
2663 2002-06-25  Andreas Schwab  <schwab@suse.de>
2664
2665         * expr.c (JSR): Avoid undefined operation on PC.
2666
2667 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2668
2669         * decl.c (clear_binding_level): Const-ify.
2670
2671 2002-06-13  Akim Demaille  <akim@epita.fr>
2672
2673         * parse.y (class_declaration, interface_declaration): Make sure
2674         all their rules have an action, in order to avoid meaningless `$$
2675         = $1' and their type clashes.
2676
2677 2002-06-11  Tom Tromey  <tromey@redhat.com>
2678
2679         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
2680         * parse-scan.y (statement_without_trailing_substatement): Added
2681         assert_statement.
2682         (assert_statement): New rule.
2683         * java-tree.h (struct lang_type) [assertions]: New field.
2684         (TYPE_USES_ASSERTIONS): New macro.
2685         (CLASS_USES_ASSERTIONS): Likewise.
2686         (FIELD_SYNTHETIC): New define.
2687         * lex.c (java_lval;): Added ASSERT_TK.
2688         * parse.y (ASSERT_TK): Added.
2689         (statement_without_trailing_substatement): Added assert_statement.
2690         (assert_statement): New rule.
2691         (build_assertion): New function.
2692         (maybe_generate_pre_expand_clinit): Create and initialize
2693         $assertionsDisabled.
2694         (lookup_package_type): Removed decl.
2695         * keyword.h: Rebuilt.
2696         * keyword.gperf (assert): New token.
2697
2698 2002-06-10  Akim Demaille  <akim@epita.fr>
2699
2700         * parse.y (interface_type_list, class_member_declaration)
2701         (unary_expression_not_plus_minus): Remove duplicate %type.
2702         Whitespace changes.
2703
2704 2002-06-09  Tom Tromey  <tromey@redhat.com>
2705
2706         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
2707
2708         * parse.y (method_header): Give error message in all cases.
2709         Fixes PR java/6865.
2710
2711 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2712
2713         Don't use RTL inlining. Fix for PR java/6820.
2714         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
2715         (flag_really_inline): New.
2716         (java_decode_option): Set flag_really_inline if -finline-functions
2717         is seen.
2718         (java_post_options): New function. Turn off inlining unless
2719         flag_really_inline is set.
2720
2721 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2722
2723         * gjavah.c (throwable_p): Accept argument as either a classname or
2724         signature fragment. Create null-terminated classname string for super
2725         when calling itself recursively.
2726         (decode_signature_piece): Skip first character from class name
2727         signature when calling throwable_p.
2728
2729 2002-06-08  H.J. Lu  (hjl@gnu.org)
2730
2731         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2732
2733 2002-06-04  Tom Tromey  <tromey@redhat.com>
2734
2735         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
2736
2737 2002-06-04  Michael Koch  <konqueror@gmx.de>
2738
2739         * gcj.texi (Input Options): Fixed typo.
2740
2741 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
2742
2743         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
2744         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
2745         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
2746         and all now-pointless local variables.  Rename other local
2747         variables to reflect their not being handles.
2748
2749         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
2750         #if JCF_USE_STDIO blocks.
2751
2752         * parse.y: Add missing semicolon at end of rule.
2753
2754 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2755
2756         * check-init.c (attach_initialized_static_class): Delete, unused.
2757         * parse.y: Use htab_t instead of struct hashtable, update
2758         all uses.
2759         * java-tree.h: Include hashtab.h instead of hash.h.
2760         (struct lang_decl_func): Use htab_t, set up for gengtype.
2761         (struct init_test_hash_entry): Delete.
2762         (struct treetreehash_entry): New.
2763         (java_treetreehash_find): New
2764         (java_treetreehash_new): New prototype.
2765         (java_treetreehash_create): New prototype.
2766         (java_mark_tree): Delete prototype.
2767         (java_hash_hash_tree_node): Delete prototype.
2768         (java_hash_compare_tree_node): Delete prototype.
2769         (attach_initialized_static_class): Delete prototype.
2770         * expr.c (build_class_init): Update to use java_treetreehash
2771         functions.
2772         (java_expand_expr): Update to use htab_t.
2773         (emit_init_test_initialization): Likewise.
2774         * decl.c (java_mark_tree): Delete.
2775         * class.c (init_test_hash_newfunc): Delete.
2776         (java_hash_hash_tree_node): Delete.
2777         (java_hash_compare_tree_node): Delete.
2778         (add_method_1): Update to use java_treetreehash functions.
2779         (JAVA_TREEHASHHASH_H): New macro.
2780         (java_treetreehash_hash): New function.
2781         (java_treetreehash_compare): New function.
2782         (java_treetreehash_find): New function.
2783         (java_treetreehash_new): New function.
2784         (java_treetreehash_create): New function.
2785         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
2786
2787         * Make-lang.in (java/parse.o): Depend on debug.h.
2788         * java-tree.h (struct lang_identifier): Use gengtype.
2789         (union lang_tree_node): New.
2790         (struct lang_decl_func): Use gengtype.
2791         (struct lang_decl_var): Likewise.
2792         (struct lang_decl): Likewise.
2793         * parse.y: Include debug.h.
2794         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
2795
2796         * lang.c (struct language_function): New dummy structure.
2797
2798         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
2799         descriminator for DECL_LANG_SPECIFIC.
2800         (struct lang_decl_func): Rename from struct lang_decl.
2801         (enum lang_decl_desc): New.
2802         (struct lang_decl): Make it a union.  Update all the accessor macros.
2803         (struct lang_type): Use gengtype.
2804         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
2805         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
2806         are now the same size.
2807         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
2808         use discriminator to mark DECL_LANG_SPECIFIC.
2809
2810         * Make-lang.in (gt-java-builtins.h): New rule.
2811         (java/builtins.o): Add dependency on gt-<filename>.h.
2812         * builtins.c: Use gengtype for roots.
2813         (union string_or_tree): Use gengtype.
2814         (struct builtin_record): Use gengtype.
2815         * config-lang.in (gtfiles): Add builtins.c.
2816
2817         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
2818         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
2819         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
2820         gt-java-parse.h, gtype-java.h): Add rules to generate.
2821         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
2822         (class.o): Add dependency on gt-*.h.
2823         (constants.o): Likewise.
2824         (decl.o): Likewise.
2825         (expr.o): Likewise.
2826         (jcf-parse.o): Likewise.
2827         (jcf-write.o): Likewise.
2828         (lang.o): Likewise.
2829         * config-lang.in (gtfiles): New.
2830         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2831         * constants.c: Replace uses of ggc_add_* with GTY markers.
2832         Include gt-*.h.
2833         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2834         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2835         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
2836         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
2837         Include gt-*.h.
2838         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
2839         Include gt-*.h.
2840         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2841         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
2842         gt-*.h.
2843         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2844         Include gtype-java.h.
2845
2846 2002-06-02  Tom Tromey  <tromey@redhat.com>
2847
2848         Fix for PR java/5913:
2849         * parse.y (patch_binop): Call patch_string on op1.
2850
2851 2002-06-02  Tom Tromey  <tromey@redhat.com>
2852
2853         Fix for PR java/1343, PR java/6336:
2854         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
2855         formatting.  Changed return type.
2856         (anonymous_class_counter): Moved to top of file.
2857         (maybe_make_nested_class_name): Append number to class name for
2858         function-local classes.
2859
2860 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2861
2862         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
2863         * Make-lang.in: Update dependency lists.
2864
2865 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
2866
2867         * gjavah.c (throwable_p): Do not free the name of the class after
2868         passing it to find_class.
2869         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
2870         * jcf-io.c (dirent.h): Include it.
2871         (fnmatch.h): Likewise.
2872         (compare_path): New function.
2873         (java_or_class_file): Likewise.
2874         (memoized_dirlist_entry): New type.
2875         (memoized_dirlist_lookup_eq): New function.
2876         (memoized_dirlists): New variable.
2877         (caching_stat): New function.
2878         (memoized_class_lookup_eq): New function.
2879         (memoized_class_lookups): Likewise.
2880         (find_class): Use memoized_class_lookups and caching_stat.
2881         * jcf.h (JCF_USE_SCANDIR): Define.
2882         * parse.y (java_expand_classes): Write the class files in reverse
2883         order.
2884
2885 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2886
2887         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2888
2889 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
2890
2891         * jcf-write.c (write_classfile): Unlink the temporary file if it
2892         cannot be renamed.  Use concat to build up the name of the
2893         temporary file.
2894
2895 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
2896
2897         * jcf-write.c (write_classfile): Write the file to a
2898         temporary file and then rename it.
2899
2900 2002-05-07  Tom Tromey  <tromey@redhat.com>
2901
2902         * gjavah.c (throwable_p): Use xstrdup, not strdup.
2903
2904         Fix for PR java/1200:
2905         * gjavah.c (throwable_p): New function.
2906         (decode_signature_piece): Use it.  A `WeakReference' isn't the
2907         same as a `jweak'.
2908         Include hashtab.h.
2909         (gcjh_streq): New function.
2910
2911 2002-05-07  Andreas Jaeger  <aj@suse.de>
2912
2913         * parse.y (finish_for_loop): Fix if statement.
2914
2915 2002-05-06  Tom Tromey  <tromey@redhat.com>
2916
2917         Fix for PR java/5941:
2918         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
2919         loop update expression.
2920         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
2921         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2922
2923 2002-05-04  Mark Wielaard  <mark@klomp.org>
2924
2925         For PR java/6519:
2926         * parse.y (build_string_concatenation): Return just op1 only when op2
2927         is null and op1 is a STRING_CST, otherwise always construct a
2928         StringBuffer.
2929
2930 2002-04-27  Tom Tromey  <tromey@redhat.com>
2931
2932         For PR java/6382:
2933         * parse.y (string_convert_int_cst): New function.
2934         (merge_string_cste): Use it.
2935
2936 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2937
2938         * java-tree.h (java_parse_file): Update.
2939         (java_set_yydebug): Remove.
2940         * jcf-parse.c (yydebug): Remove.
2941         (java_set_yydebug): Die.
2942         (java_parse_file): Update.
2943         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2944
2945 2002-04-24  Tom Tromey  <tromey@redhat.com>
2946
2947         For PR java/6425:
2948         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
2949         EXPR_WFL_QUALIFICATION of qual_wfl.
2950
2951 2002-04-23  Per Bothner  <per@bothner.com>
2952
2953         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
2954         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
2955         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
2956
2957 2002-04-23  Tom Tromey  <tromey@redhat.com>
2958
2959         For PR java/6314:
2960         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
2961         recognize `-fcompile-resource='.
2962         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
2963         a bit.
2964
2965 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2966
2967         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
2968         paths. Fixes PR java/2791.
2969
2970 2002-04-19  Andrew Haley  <aph@redhat.com>
2971
2972         * jcf-write.c (push_long_const): lo, hi: New variables.
2973         Use rshift_double to extract the high part of a 64-bit long.
2974         Use WORD_TO_INT to extract the low part.
2975
2976         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
2977         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
2978         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
2979
2980 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2981
2982         * typeck.c (incomplete_type_error): Remove.
2983
2984 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2985
2986         * class.c (make_class_data): Set DECL_ALIGN on static class data,
2987         for hash synchronization.
2988         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
2989         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
2990         class_type_node.
2991
2992 2002-04-16  Mark Wielaard  <mark@klomp.org>
2993
2994         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
2995         negative zero.
2996
2997 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2998
2999         Fix for PR java/6294:
3000         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3001         interfaces.
3002
3003 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3004
3005         Fix for PR java/6085:
3006         * parse.y (patch_method_invocation): Always use build_access_to_thisn
3007         to get enclosing "this" argument for inner-class constructor
3008         invocation. Pass correct arguments to build_access_to_thisn.
3009
3010 2002-04-10  Andreas Jaeger  <aj@suse.de>
3011
3012         * gcj.texi (Input Options): Fix extdirs patch.
3013
3014 2002-04-10  Anthony Green  <green@redhat.com>
3015
3016         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3017
3018 2002-04-09  Anthony Green  <green@redhat.com>
3019
3020         * gcj.texi (Input Options): Add --extdirs documentation.
3021         * jcf-dump.c (OPT_extdirs): New macro.
3022         (options): Add extdirs option.
3023         (help): Describe --extdirs.
3024         (main): Handle OPT_extdirs.
3025         * gjavah.c (OPT_extdirs): New macro.
3026         (options): Add extdirs option.
3027         (help): Describe --extdirs.
3028         (main): Handle OPT_extdirs.
3029         * jcf-path.c (jcf_path_init): Add extdirs support.
3030         (jcf_path_extdirs_arg): New function.
3031         (extensions): New variable to hold extensions path entries.
3032         * jvspec.c: Remove -fextdirs= when compiling main().
3033         * lang.c (java_decode_option): Handle -fextdirs=.
3034         * jcf.h (jcf_path_extdirs_arg): Declare new function.
3035         * Make-lang.in: Compile jcf-path with version info for use in
3036         identifying the appropriate libgcj.jar.
3037
3038 2002-04-08  Tom Tromey  <tromey@redhat.com>
3039
3040         For PR libgcj/5303:
3041         * .cvsignore: Added rmic.1 and rmiregistry.1.
3042         * gcj.texi (Top): Link to new nodes.
3043         (Invoking rmic): New node.
3044         (Invoking rmiregistry): Likewise.
3045         * Make-lang.in (java.generated-manpages): Added rmic.1 and
3046         rmiregistry.1.
3047         (java.maintainer-clean): Likewise.
3048         ($(srcdir)/java/rmic.1): New target.
3049         ($(srcdir)/java/rmiregistry.1): Likewise.
3050         (java.install-man): Handle rmic.1 and rmiregistry.1.
3051
3052 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3053
3054         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3055         Add note about handling uncaught exceptions. Add an exception handler
3056         to example.
3057
3058 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3059
3060         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3061         after using it to patch CALL_EXPR.
3062
3063 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3064
3065         * gcj.texi (Invocation): Document CNI invocation API.
3066
3067 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3068
3069         * expr.c (truthvalue_conversion): Rename.  Update.
3070         (expand_compare): Update.
3071         * java-tree.h (java_truthvalue_conversion): New.
3072         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3073
3074 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3075
3076         * java-tree.h (java_mark_addressable): New.
3077         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3078         * typeck.c (mark_addressable): Rename, update.
3079
3080 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3081
3082         * expr.c (build_java_binop): Update.
3083         * java-tree.h (java_signed_type, java_unsigned_type,
3084         java_signed_or_unsigned_type): Update.
3085         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3086         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3087         * parse.y (patch_binop): Update.
3088         * typeck.c (signed_or_unsigned_type, unsigned_type,
3089         signed_type): Update.
3090
3091 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3092
3093         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3094         (java_dummy_print): Remove.
3095         (lang_print_error): Rename.  Exit early if inhibiting output.
3096         (inhibit_error_printing_function): New.
3097         (java_init): Don't set hook.
3098         (lang_init_source): Use new boolean.
3099
3100 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3101
3102         * parse.y (do_resolve_class): Fix infinite recursion.
3103
3104 2002-03-29  Tom Tromey  <tromey@redhat.com>
3105
3106         * parse.y (check_inner_circular_reference): Ignore incomplete
3107         types.
3108
3109 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3110
3111         * Make-lang.in (builtins.o): Update.
3112         * boehm.c (get_boehm_type_descriptor): Update.
3113         * builtins.c: Include langhooks.h.
3114         * decl.c (java_init_decl_processing): Update.
3115         * java-tree.h (java_type_for_mode, java_type_for_size): New.
3116         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3117         Redefine.
3118         * typeck.c (type_for_mode, type_for_size): Update.
3119
3120 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3121
3122         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3123
3124 2002-03-28  Tom Tromey  <tromey@redhat.com>
3125
3126         * except.c (expand_end_java_handler): If the handler type is NULL,
3127         use java.lang.Throwable.  Fixes PR java/5986.
3128
3129 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3130
3131         Fix for PR java/4715:
3132         * jcf-parse.c (parse_source_file_3): New function.
3133         (read_class): Call it.
3134         (java_parse_file): Likewise.
3135
3136 2002-03-28  Jan Hubicka  <jh@suse.cz>
3137
3138         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3139
3140 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3141
3142         * parse.y (resolve_package): Initialize "decl".
3143         (lookup_package_type): Remove unused function.
3144
3145 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3146
3147         Fix for PR java/5993:
3148         * parse.y (resolve_package): Return the decl if resolution was
3149         successful. Don't special case "java.lang" and "java.lang.reflect"
3150         packages. Set type_name to the merged identifier.
3151         (resolved_qualified_expression_name): Print error using "name" if
3152         resolve_package returns NULL_TREE.
3153
3154 2002-03-27  Tom Tromey  <tromey@redhat.com>
3155
3156         * expr.c (expand_invoke): Don't generate null pointer check if
3157         we're calling <init>.
3158
3159 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3160
3161         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3162         fix prototype.
3163         * java-tree.h (java_lang_expand_expr): Similarly.
3164         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3165         (java_init): Don't set hook.
3166
3167 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3168
3169         Fix for PR java/5850:
3170         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3171         context if field was not found in the current scope.
3172         * expr.c (lookup_field): Don't look in enclosing contexts.
3173
3174 2002-03-26  Tom Tromey  <tromey@redhat.com>
3175
3176         Fix for PR java/5942:
3177         * parse.y (init_src_parse): Added sanity check.
3178         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3179         elements, not 11.
3180
3181 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3182
3183         * decl.c (lang_mark_tree): Rename java_mark_tree.
3184         * java-tree.h (java_mark_tree): New.
3185         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3186
3187 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
3188
3189         * lex.c: Change java_perform_atof to take normal parameters
3190         instead of a pointer to a parameter block.  Call it directly
3191         from java_lex.
3192
3193 2002-03-22  Mark Wielaard  <mark@klomp.org>
3194
3195         Fix for PR java/5368:
3196         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3197         when printing error message.
3198
3199 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3200
3201         * decl.c (maybe_build_cleanup): Remove.
3202
3203 2002-03-22  Tom Tromey  <tromey@redhat.com>
3204
3205         Andrew Haley  <aph@cambridge.redhat.com>
3206
3207         * expr.c (build_field_ref): Don't build a check if the field is a
3208         member of `this'.
3209
3210 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
3211
3212         Fix for PR java/6026:
3213         * lex.c (java_lex): Fix parsing of consecutive floats.
3214
3215 2002-03-21  Tom Tromey  <tromey@redhat.com>
3216
3217         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3218         class.
3219
3220 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3221
3222         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3223         insert_block, getdecls, kept_level_p, global_bindings_p): New.
3224
3225 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3226
3227         * gcj.texi: @code{gcj} becomes @command{gcj}.
3228         @code{gcc} becomes @command{gcc}.
3229         GcjRaw changed to gnu.gcc.RawData.
3230
3231 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3232
3233         * decl.c (start_java_method): Use new hook.
3234         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3235         (java_init): Remove old hook.
3236
3237 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3238
3239         * builtins.c (define_builtin): Do nothing if `type' is null.
3240         Fixes PR java/5876.
3241
3242 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3243
3244         * parse.y (parser_check_super_interface): Fix error message
3245         grammar/order.
3246
3247 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3248
3249         * jcf-parse.c (get_constant): Delete unused variables.
3250
3251 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3252
3253         * java-tree.h (java_parse_file): New.
3254         * jcf-parse.c (yyparse): Rename java_parse_file.
3255         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3256
3257 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3258
3259         * parse.y (craft_constructor): Return the constructor decl.
3260         (java_expand_classes): Update comments.
3261         (lookup_method_invoke): Call fix_constructors immediately for
3262         anonymous class. Fixes PR java/5935.
3263
3264 2002-03-15  Anthony Green  <green@redhat.com>
3265
3266         * jcf-parse.c (yyparse): Don't emit class registration
3267         constructor when compiling resource files.
3268
3269 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3270
3271         * lang.c (java_tree_code_type, java_tree_code_length,
3272         tree_code_name): Delete.
3273         (tree_code_type, tree_code_length, tree_code_name): Define.
3274         (java_init): Don't try to copy into the various tree_code
3275         arrays.
3276
3277 2002-03-12  Tom Tromey  <tromey@redhat.com>
3278
3279         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3280         UTF-8, not UCS-2.  Fixes PR java/5923.
3281
3282         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3283         a call_expr wrapped in a convert.  Fixes PR java/5848.
3284
3285 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3286
3287         * jcf-write.c (write_classfile): Improve error strings.
3288
3289 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3290
3291         * lex.c: Adjust comments to GNU standards.
3292
3293 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3294
3295         Fix for PR java/5902:
3296         * lex.c (java_lex): Fix parsing of literals.
3297
3298 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3299
3300         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3301         to prevent it getting evaluated twice in the store checking case.
3302         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3303         examining OBJECT.
3304
3305 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3306
3307         * decl.c (java_init_decl_processing): Make sure class_type_node
3308         alignment is not less than 64 bits if hash synchronization is enabled.
3309
3310 2002-03-08  Per Bothner  <per@bothner.com>
3311
3312         * parse.y (java_complete_lhs):  Check if patch_assignment
3313         returned an error-mark.
3314
3315         * parse.y (try_builtin_assignconv):  Don't special-case zero.
3316
3317 2002-03-08  Per Bothner  <per@bothner.com>
3318
3319         Fix for PR java/5812.
3320         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
3321         here instead of in JSR macro.  Likewise with load_type_state call.
3322         Do the latter on if the return_pc has been verified (the jsr returns).
3323         (JSR):  Now just call build_java_jsr.
3324
3325 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
3326
3327         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3328         (java.install-common): Link native driver to
3329         JAVA_TARGET_INSTALL_NAME.
3330
3331 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
3332
3333         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3334         * builtins.c(sin_builtin): Likewise
3335         * builtins.c(sqrt_builtin): Likewise
3336
3337 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
3338
3339         * java/expr.c, java/jcf-parse.c, java/lex.c:
3340         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3341         REAL_ARITHMETIC blocks unconditional.  Delete some further
3342         #ifdef blocks predicated on REAL_ARITHMETIC.
3343
3344 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3345
3346         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3347         explicit sizeof/sizeof.
3348         * decl.c (java_init_decl_processing): Likewise.
3349         * jcf-parse.c (init_jcf_parse): Likewise.
3350         * parse.y (init_src_parse): Likewise.
3351
3352 2002-03-02  Per Bothner  <per@bothner.com>
3353
3354         Make --CLASSPATH by a synonym for --classpath and -classpath.
3355         Implement --bootclasspath.
3356         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
3357         (classpath_l):  Remove.
3358         (jcf_path_CLASSPATH_arg):  Remove.
3359         (jcf_path_bootclasspath_arg):  New function.
3360         (jcf_path_seal):  Simplify accordingly.
3361
3362         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
3363         (jcf_path_CLASSPATH):  Remove declaration.
3364         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
3365         (lang_specific_driver):  Translate -bootclasspath.
3366         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
3367         * lang.c (decode_lang_options):  Do jcf_path_init first.
3368         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
3369         * gjavah.c:  Also handle --bootclasspath.
3370         Handle --CLASSPATH as a synonum for --classpath.
3371         * jcf-dump.c: Likewise.
3372
3373         "." is not part of system path, but is the default for --classpath.
3374         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
3375         (jcf_path_seal):  Add "." if no CLASSPATH specified.
3376
3377         * gcj.texi:  Document changes.
3378
3379 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3380
3381         * expr.c (build_java_arraystore_check): Fix formatting.
3382
3383 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3384
3385         Fix for PR java/5758, java/5632:
3386         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3387         inner-class separator too.
3388         * parse.y (do_resolve_class): New local `decl_result.'
3389         Progressively build a name for what can have been loaded.
3390
3391 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3392
3393         * expr.c (java_array_data_offset): Removed function.
3394         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3395         (build_java_array_length_access): Obtain "length" value using a
3396         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3397         (build_java_arrayaccess): Correct comment. Access "data" using a
3398         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3399         (build_java_arraystore_check): New function.
3400         (expand_java_arraystore): Use build_java_arraystore_check.
3401         * parse.y (patch_assignment): Simplify code to insert a store check
3402         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3403         * check-init.c (check_init): Update to reflect that an array length
3404         access is now a COMPONENT_REF.
3405         * gcj.texi (Code Generation): Improve documentation of
3406         -fno-bounds-check. Add documentation for -fno-store-check.
3407         * java-tree.h (flag_store_check): Declare.
3408         (build_java_arraystore_check): Declare.
3409         * lang.c (flag_store_check): Initialize to 1.
3410         (lang_f_options): Add store-check option.
3411         * jvspec.c: Don't pass store-check option to jvgenmain.
3412         * lang-options.h: Add help string for -fno-store-check.
3413
3414 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3415
3416         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3417         * java-tree.h (java_dup_lang_specific_decl): New.
3418         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3419
3420 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3421
3422         * builtins.c, decl.c: Delete traditional-mode-related code
3423         copied from the C front end but not used, or used only to
3424         permit the compiler to link.
3425
3426 2002-02-22  Tom Tromey  <tromey@redhat.com>
3427
3428         Fix for PR java/2369:
3429         * jvspec.c (verify_class_name): New function.
3430         (lang_specific_driver): Call it.
3431         (JAVA_START_CHAR_P): New macro.
3432         (JAVA_PART_CHAR_P): Likewise.
3433
3434 2002-02-22  Per Bothner  <per@bothner.com>
3435
3436         * class.c:  Change vtable to be more compatible with g++ v3 abi.
3437         (get_dispatch_table):  Prepend offset-to-top (always 0) and
3438         type_info pointer (currently unimplemented hence NULL) to vtable.
3439         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3440         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
3441         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3442         (build_dtable_decl):  Add declarations for new fields.
3443
3444 2002-02-20  Per Bothner  <per@bothner.com>
3445
3446         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3447         to finit$ (otherwise generate_bytecode_insns drops it). However, we
3448         don't need to set it on the COMPOUND_EXPR - the caller does that.
3449
3450 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3451
3452         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3453         `--CLASSPATH' becomes `--classpath.'
3454         * gjavah.c: Likewise.
3455         * jcf-dump.c: Likewise.
3456         * lang-options.h: Likewise.
3457         * lang.c: Likewise.
3458         * jcf-path.c: Updated comment.
3459         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3460         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3461         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3462         (jcf_path_CLASSPATH_arg): Ditto.
3463         (classpath_u): Updated leading comment.
3464
3465 2002-02-20  Per Bothner  <per@bothner.com>
3466
3467         * builtins.c (check_for_builtin):  New function.
3468         (build_call_or_builtin):  Remove.
3469         * java-tree.h:  Update accordingly.
3470         * expr.c (expand_invoke):  Use build + check_for_builtin instead
3471         of build_call_or_builtin.
3472         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
3473         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3474         flag (which had caused jcf-write to incorrectly emit invokevirtual).
3475
3476 2002-02-17  Tom Tromey  <tromey@redhat.com>
3477
3478         * java-tree.h (TYPE_STRICTFP): New macro.
3479         (struct lang_type) [strictfp]: New field.
3480         (CLASS_STRICTFP): New macro.
3481         (METHOD_STRICTFP): New macro.
3482         (struct lang_decl) [strictfp]: New field.
3483         * parse.y (method_header): Disallow strictfp constructor or
3484         abstract method.
3485         (STRICT_TK): Move before MODIFIER_TK.
3486         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3487         (METHOD_MODIFIERS): Likewise.
3488         (INTERFACE_MODIFIERS): Likewise.
3489         * jcf-write.c (get_access_flags): Likewise.
3490         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3491         (add_method_1): Likewise.
3492         (get_access_flags_from_decl): Likewise.
3493         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
3494         recognize strictfp flag.
3495         * jcf.h (ACC_STRICT): New define.
3496
3497 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
3498
3499         * class.c(build_utf8_ref): Move declaration of decl_size
3500
3501 2002-02-07  Tom Tromey  <tromey@redhat.com>
3502
3503         * gcj.texi (Input Options): --CLASSPATH does not suppress system
3504         path.
3505
3506 2002-02-04  Anthony Green  <green@redhat.com>
3507
3508         * class.c (build_utf8_ref): Put UTF-8 constants into merged
3509         sections if available.
3510
3511 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3512
3513         * parse.y (java_expand_classes): Fix typo in static field loop.
3514
3515 2002-02-02  Richard Henderson  <rth@redhat.com>
3516
3517         * class.c (add_field): Mark static fields external.
3518         (build_class_ref): Remove redundant set.
3519         * parse.y (java_expand_classes): Mark static fields of classes
3520         to be compiled as local.
3521         * jcf-parse.c (parse_class_file): Likewise.
3522
3523 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3524
3525         * gcj.texi (About CNI): New node.
3526
3527 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3528
3529         PR java/5080
3530         * jcf-parse.c : Check for HAVE_LOCALE_H before using
3531         setlocale() with LC_CTYPE as a parameter.
3532         * jv-scan.c: Same.
3533
3534 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
3535
3536         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3537         Follow GNU Coding Standards for --version.
3538
3539 2002-01-28  Tom Tromey  <tromey@redhat.com>
3540
3541         * expr.c (build_jni_stub): Ensure storage for `meth' is
3542         generated.
3543         * parse.y (java_complete_expand_methods): Set
3544         current_function_decl before building JNI stub.
3545
3546 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3547
3548         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3549         BUILT_IN_SQRTF.
3550
3551 2002-01-22  Tom Tromey  <tromey@redhat.com>
3552
3553         * decl.c (java_init_decl_processing): Use add_predefined_file.
3554         Predefine RawData.java.
3555         (predef_filenames): Removed.
3556         (java_init_decl_processing): Don't register predef_filenames.
3557         * jcf-parse.c (add_predefined_file): New function.
3558         (predefined_filename_p): Rewrote.
3559         (predefined_filename_p): No longer static.
3560         * decl.c (java_init_decl_processing): Call initialize_builtins.
3561         * Make-lang.in (JAVA_OBJS): Added builtins.o.
3562         (java/builtins.o): New target.
3563         * builtins.c: New file.
3564         * parse.y (patch_invoke): Use build_call_or_builtin.
3565         * java-tree.h (build_call_or_builtin): Declare.
3566         (initialize_builtins): Declare.
3567         (java_set_exception_lang_code): Removed unused declaration.
3568         (PREDEF_FILENAMES_SIZE): Removed.
3569         (java_tree_index): Added JTI_PREDEF_FILENAMES.
3570         (predef_filenames): New define.
3571         (add_predefined_file): Declare.
3572         (predefined_filename_p): Declare.
3573         * expr.c (expand_invoke): Use build_call_or_builtin.
3574
3575 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3576
3577         * parse.y (patch_switch_statement): Fix format specifier.
3578
3579 2002-01-16  Tom Tromey  <tromey@redhat.com>
3580
3581         More for PR java/5365:
3582         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
3583         default.
3584         (process_file): Generate include for
3585         java.lang.UnsupportedOperationExceptions.
3586
3587 2002-01-15  Andreas Jaeger  <aj@suse.de>
3588
3589         * .cvsignore: Add man pages.
3590
3591 2002-01-15  Tom Tromey  <tromey@redhat.com>
3592
3593         Fix for PR java/5365:
3594         * gjavah.c (process_file): Turn class name into a file name.
3595
3596 2002-01-14  Matthias Klose  <doko@debian.org>
3597
3598         * gcj.texi: Fix whitespace and formatting errors in the
3599         synopsis of the man pages. Update copyright.
3600
3601 2002-01-14  Tom Tromey  <tromey@redhat.com>
3602
3603         For PR libgcj/5303:
3604         * Make-lang.in (java.install-man): Handle jv-convert man page.
3605         (java.generated-manpages): Added jv-convert.1.
3606         (java.uninstall): Remove jv-convert.1.
3607         (java.maintainer-clean): Likewise.
3608         ($(srcdir)/java/jv-convert.1): New target.
3609         * gcj.texi (Top): Link to jv-convert node.
3610         (Individual utilities): Likewise.
3611         (Invoking jv-convert): New node.
3612
3613 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
3614             Martin Kahlert  <martin.kahlert@infineon.com>
3615
3616         * jcf-parse.c (get_constant): Don't swap lo/hi for big
3617         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
3618
3619 2002-01-03  Graham Stott  <grahams@redhat.com>
3620
3621         * class.c (compile_resource_file): Update copyright date.
3622         Constify filename parameter.
3623         (java-tree.h): Update copyright date.
3624         (compile_resource_file): Constify filename parameter.
3625
3626 2002-01-03  Graham Stott  <grahams@redhat.com>
3627
3628         * gcc/jcf-parse.c: Update copyright date.
3629         (yyparse): Constify resource_filename.
3630
3631 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3632
3633         * parse.y (src_parse_roots): Don't needlessly zero init.
3634
3635 2001-12-31  Tom Tromey  <tromey@redhat.com>
3636
3637         * parse.y (dump_java_tree): New function.
3638         (source_end_java_method): Call it.
3639         (end_class_declaration): Likewise.
3640         * lang.c (java_decode_option): Call dump_switch_p.
3641
3642 2001-12-28  Tom Tromey  <tromey@redhat.com>
3643
3644         * gen-table.pl: Don't process characters after \uffff.  Added
3645         comment pointing to input file.
3646
3647 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3648
3649         * gen-table.pl: Const-ify output.  Document the location of a
3650         suitable unicode input file.
3651
3652         * chartables.h: Regenerate.
3653
3654 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3655
3656         * chartables.h: Const-ify.
3657         * gjavah.c (options): Likewise.
3658         * jcf-dump.c (options): Likewise.
3659         * jv-scan.c (options): Likewise.
3660         * lex.c (java_start_char_p, java_part_char_p): Likewise.
3661         * parse.y (binop_lookup): Likewise.
3662
3663 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3664
3665         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
3666         the static arrays that are output.
3667         * jvspec.c (jvgenmain_spec): Make static.
3668         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
3669         * keyword.h: Regenerate.
3670         * lang.c (string_option, process_option_with_no, lang_f_options,
3671         lang_W_options): Const-ify.
3672         * lex.c (java_lex): Likewise.
3673
3674 2001-12-21  Richard Henderson  <rth@redhat.com>
3675
3676         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
3677         (get_boehm_type_descriptor): ... here.  Arrange for the
3678         TREE_TYPE to get set properly.
3679
3680 2001-12-21  Richard Henderson  <rth@redhat.com>
3681
3682         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
3683         only if the target requires collect2.
3684
3685         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
3686
3687 2001-12-20  Tom Tromey  <tromey@redhat.com>
3688
3689         For PR java/4509:
3690         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
3691         CAN_COMPLETE_NORMALLY for the node.
3692         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
3693         generate code for second branch if first branch can't complete
3694         normally.
3695         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
3696         the loop head if the loop body can't complete normally.
3697
3698 2001-12-20  Tom Tromey  <tromey@redhat.com>
3699
3700         For PR java/4766:
3701         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
3702         case where `finally' clause can't complete normally.
3703
3704 2001-12-20  Tom Tromey  <tromey@redhat.com>
3705
3706         Fixes PR java/5057:
3707         * parse.y (analyze_clinit_body): Added this_class parameter.
3708         Check for more cases where we must keep <clinit>.
3709         (maybe_yank_clinit): Cleaned up flow control.
3710
3711 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3712
3713         * decl.c (java_init_decl_processing): Don't initialize
3714         finit_leg_identifier_node.
3715         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
3716         (finit_leg_identifier_node): Remove.
3717         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
3718
3719 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3720
3721         * mangle.c (mangle_member_name): Don't special-case for
3722         NO_DOLLAR_IN_LABEL.
3723         * mangle_name.c (unicode_mangling_length): Likewise.
3724         (append_unicode_mangled_name): Likewise.
3725         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
3726         code.
3727
3728 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3729
3730         * expr.c (build_java_array_length_access): Don't force null pointer
3731         check unless flag_check_references is set.
3732
3733 2001-12-20  Tom Tromey  <tromey@redhat.com>
3734
3735         Fix for PR java/3417:
3736         * parse.y (patch_assignment): Added special processing for
3737         `return'.
3738         (patch_return): Don't convert booleans to integers, and don't
3739         special-case `null'.
3740
3741 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
3742
3743         * config-lang.in (diff_excludes): Remove.
3744
3745 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3746
3747         * gcj.texi: Update link to GCC manual.
3748
3749 2001-12-17  Tom Tromey  <tromey@redhat.com>
3750
3751         * parse.y (link_nested_class_to_enclosing): Removed useless
3752         statement.
3753
3754 2001-12-16  Tom Tromey  <tromey@redhat.com>
3755
3756         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
3757         Fixes PR java/5088.
3758
3759 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
3760
3761         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
3762         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
3763         spelling errors.
3764
3765 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3766
3767         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
3768
3769 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3770
3771         * decl.c (java_init_decl_processing): Build otable_type correctly.
3772         otable_decl is an otable_type.
3773
3774 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3775
3776         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
3777         otable_type, otable_ptr_type, method_symbol_type,
3778         method_symbols_array_type, method_symbols_array_ptr_type): New
3779         field/global tree definitions.
3780         (flag_indirect_dispatch): New flag.
3781         * decl.c (java_init_decl_processing): Initialize new otable and
3782         otable_syms type nodes and decls. Add new field "index" to
3783         method_type_node.
3784         * class.c (build_method_symbols_entry): New function.
3785         (make_method_value): Set "index" to to method's vtable index for
3786         virtual methods when indirect-dispatch is not used.
3787         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
3788         and set vtable_method_count to -1. Set otable and otable_syms field
3789         if indirect-dispatch is used and there was something to put in them.
3790         (build_method_symbols_entry): New function.
3791         (emit_offset_symbol_table): New function.
3792         * expr.c (get_offset_table_index): New function.
3793         (build_invokevirtual): Build array reference to otable at the index
3794         returned by get_offset_table_index, and use the result as the vtable
3795         offset.
3796         (build_invokeinterface): Similar.
3797         * jcf-parse.c (yyparse): If indirect-dispatch, call
3798         emit_offset_symbol_table at the end of compilation, after all classes
3799         have been generated.
3800         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
3801         * lang.c (flag_indirect_dispatch): Define.
3802         (lang_f_options): Add indirect-dispatch flag.
3803
3804 2001-12-14  Matthias Klose  <doko@debian.org>
3805
3806         * gcj.texi: Markup for man page generation. Document missing
3807         options printed by <tool> --help.
3808         Terminate description of gij's -ms option with a dot.
3809         * Make-lang.in ($(srcdir)/java/*.1): New targets.
3810         (java.generated-manpages java.install-man, java.uninstall,
3811         java-maintainer-clean) Updated.
3812
3813 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
3814
3815         * class.c (get_dispatch_table): Fix java vtable layout
3816         for TARGET_VTABLE_USES_DESCRIPTORS.
3817         * decl.c (java_init_decl_processing): Initialize
3818         alloc_no_finalizer_node, finalize_identifier_node.
3819         * expr.c (class_has_finalize_method): New function.
3820         (expand_java_NEW): Generate calls for finalizer-free allocation.
3821         (build_invokevirtual): Fix java vtable layout for
3822         TARGET_VTABLE_USES_DESCRIPTORS.
3823         * java-tree.h (enum java_tree_index): New entries:
3824         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
3825         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
3826         (class_has_finalize_method): declare.
3827         (HAS_FINALIZER_P): New macro.
3828         * parse.y (patch_invoke): Generate calls for finalizer-free
3829         allocation.
3830
3831 2001-12-12  Matthias Klose  <doko@debian.org>
3832
3833         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
3834         whitespace at end of line.
3835
3836 2001-12-11  Tom Tromey  <tromey@redhat.com>
3837
3838         * lex.c (java_init_lex): Define wfl_to_string as
3839         gnu.gcj.runtime.StringBuffer unless generating bytecode.
3840
3841 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
3842
3843         * class.c (make_method_value): Use null_pointer_node to
3844         represent empty exception table.
3845
3846 2001-12-10  Tom Tromey  <tromey@redhat.com>
3847
3848         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
3849
3850 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
3851
3852         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
3853
3854 2001-12-09  Per Bothner  <per@bothner.com>
3855
3856         * check-init.c (current_switch_has_default):  New static field.
3857         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
3858         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
3859         DEFAULT_EXPR seen, simulate a default alternative that copies state.
3860
3861 2001-12-09  Tom Tromey  <tromey@redhat.com>
3862
3863         * check-init.c (check_init): Don't allow pre- or post- increment
3864         or decrement of final variable.
3865         (final_assign_error): Minor error message rewording.
3866
3867 2001-12-08  Tom Tromey  <tromey@redhat.com>
3868
3869         * java-tree.h: Fixed typo.
3870
3871         * gjavah.c (decompile_method): Don't decompile to `return this'
3872         for static methods.
3873
3874         * gjavah.c (cxx_keywords): Re-sorted.
3875         * lex.c (cxx_keywords): Re-sorted.
3876
3877         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
3878         else.
3879
3880         * gjavah.c (print_namelet): Clear subnamelets.
3881         (HANDLE_METHOD): Set `method_printed' earlier.
3882
3883 2001-12-07  Tom Tromey  <tromey@redhat.com>
3884
3885         * lang.c (lang_f_options): Added
3886         optimize-static-class-initialization.
3887         (java_decode_option): Removed special case.
3888
3889 2001-12-07  Per Bothner  <per@bothner.com>
3890
3891         * check-init.c (check_init):  Fix typo freeing memory twice.
3892
3893 2001-12-05  Per Bothner  <per@bothner.com>
3894
3895         Restore support for static class initialization optimization.
3896         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
3897         * check-init.c (check_int):  At end of BLOCK handle initialization
3898         blocks, which used to be done in java_complete_expand_method but did
3899         not handle the case where check_for_initialization might allocate
3900         more than a word of bits.
3901         * decl.c (lang_make_tree):  The smic field is now a tree.
3902         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
3903         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
3904
3905         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
3906
3907         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
3908         Change from a hash table to a list.
3909         (struct_lang_decl):  Change field 'smic' to match.
3910         * class.c (add_method_1):  Initialize
3911         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
3912         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
3913         (java_expand_method_bodies): -here, since 'smic' is now a list.
3914         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
3915
3916         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
3917
3918         * class.c (java_hash_compare_tree_node):  Fix casts.
3919
3920 2001-12-04  Per Bothner  <per@bothner.com>
3921
3922         * check-init.c:   Handle definite unassignment to finals in addition
3923         to definite assignment.
3924         (loop_current_locals):  New field.
3925         (num_current_locals, int start_current_locals, num_current_words):
3926         Make static.
3927         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
3928         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
3929         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
3930         (get_variable_decl, check_final_reassigned):  New functions.
3931         (check_init, check_bool_init):  Modify as needed for checking finals.
3932         (check_for_initialization):  Take extra parameter and return void.
3933         Do extra start-up logic to check final fields for assignment.
3934         * parse.y (check_static_final_variable_assignment_flag,
3935         reset_static_final_variable_assignment_flag, check_final_assignment,
3936         check_final_variable_local_assignment_flag,
3937         reset_final_variable_indirect_assignment_flag,
3938         reset_final_variable_global_assignment_flag):  Remove functions.
3939         (java_complete_expand_methods, outer_field_access_fix,
3940         patch_assignment): Remove no-longer used logic.
3941         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
3942         * parse.y (register_fields, java_complete_tree):  Update accordingly.
3943
3944         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
3945         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
3946         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
3947
3948         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
3949
3950         * java-tree.h (DECL FINAL):  New bit-field.
3951         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
3952         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
3953         (DECL_INIT_CALLS_THIS):  New macro.
3954         (struct lang_decl):  New bit-field init_calls_this.
3955         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
3956         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
3957         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
3958         use it for both local variables and final fields.
3959         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
3960         and local_final.
3961         (struct lang_type):  Remove hfv bit-field.
3962         (check_for_initialization):  Change to return void.
3963
3964         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
3965         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
3966         * check-init.c (final_assign_error):  New helper function.
3967         (check_final_reassigned, check_init):  Use it.
3968         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
3969
3970         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
3971         bit-fields to unsigned.
3972
3973 2001-12-03  Per Bothner  <per@bothner.com>
3974
3975         * parse.y (patch_binop):  Minor constant folding.
3976
3977         * parse.y (build_current_thisn):  Shorter 'buffer'.
3978
3979 2001-12-03  Per Bothner  <per@bothner.com>
3980
3981         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
3982         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
3983         * jcf-write.c (generate_bytecode_insns):  Remove support for
3984         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
3985         * check-init.c (check_init):  Likewise.
3986
3987 2001-12-03  Per Bothner  <per@bothner.com>
3988
3989         * verify.c (subroutine_nesting):  New function.
3990         (verify_jvm_instructions):  Use it to fix logic for checking that
3991         we're done with the current subroutine.
3992
3993         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
3994         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
3995
3996 2001-12-03  Per Bothner  <per@bothner.com>
3997
3998         * jcf.h:  Fix obvious typo in comment.
3999         * typeck.c (build_null_signature):  Add comment.
4000
4001 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4002
4003         * expr.c: Remove leading capital from diagnostic messages, as
4004         per GNU coding standards.
4005         * jcf-io.c: Similarly.
4006         * jcf-parse.c: Similarly.
4007         * jv-scan.c: Similarly.
4008         * jvspec.c: Similarly.
4009         * mangle.c: Similarly.
4010
4011 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
4012             Alexandre Petit-Bianco  <apbianco@redhat.com>
4013
4014         * expr.c (build_java_arrayaccess): Call save_expr on array for
4015         correct evaluation order, modified comment, fixed indentation.
4016         * parse.y: (patch_assignment): Correctly extract the array base
4017         from the tree generate by build_java_arrayaccess, added comments.
4018         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4019         Fixes PR java/3096, PR java/3803, PR java/3965.
4020
4021 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4022
4023         * expr.c (expand_byte_code): Remove trailing periods from messages.
4024         * jcf-parse.c (load_class, jcf_parse): Similarly.
4025         * jcf-write.c (generate_classfile): Similarly.
4026         * lex.c (java_lex): Similarly.
4027
4028 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4029
4030         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4031
4032 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4033
4034         * Make-lang.in (java.generated-manpages): New dummy target.
4035
4036 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4037
4038         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4039         ASM_FINAL_SPEC.
4040         (lang_specific_pre_link): Use set_input to set input_filename.
4041         Append `main' here.
4042         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4043         (main): Fix definition.
4044         Strip `main' from classname.
4045         Fixes PR java/227.
4046
4047 2001-11-18  Roger Sayle <roger@eyesopen.com>
4048
4049         * parse.h (java_expand_switch): Remove old prototype.
4050
4051 2001-11-18  Tom Tromey  <tromey@redhat.com>
4052
4053         Fix for PR java/1401:
4054         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4055         arg0 is null.
4056         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4057         correctly.
4058
4059 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4060
4061         * lang.c (finish_parse): Rename to java_finish.
4062         (LANG_HOOKS_FINISH, java_finish): New.
4063
4064 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4065
4066         * decl.c (init_decl_processing): Rename java_init_decl_processing.
4067         * java-tree.h: New prototype.
4068         * lang.c (java_init): Update prototype.  Combine with old init_parse.
4069
4070 2001-11-13  Tom Tromey  <tromey@redhat.com>
4071
4072         * gjavah.c (method_signature): New global.
4073         (HANDLE_METHOD): Set it.
4074         (decompile_return_statement): New function.
4075         (decompile_method): Use it.
4076         (print_method_info): Removed `synth' argument.
4077
4078 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4079
4080         * java-tree.h (java_set_yydebug): New.
4081         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4082         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4083         (print_lang_decl, print_lang_type, print_lang_identifier,
4084         print_lang_statistics, lang_print_xnode): Remove.
4085
4086 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4087
4088         * jcf-parse.c (init_lex): Remove.
4089         * lang.c (language_string, lang_identify): Remove.
4090         (struct lang_hooks): Constify.
4091         (LANG_HOOKS_NAME): Override.
4092         (init_parse): Update.
4093
4094 2001-11-08  Andreas Franck  <afranck@gmx.de>
4095
4096         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4097         program_transform_name the way suggested by autoconf.
4098         (java.install-common): Also transform auxiliary program names with
4099         program_transform_name.
4100
4101 2001-11-08  Tom Tromey  <tromey@cygnus.com>
4102
4103         * parse.y (trap_overflow_corner_case): New rule.
4104         (unary_expression): Use it.
4105         * lex.c (java_init_lex): Don't set minus_seen.
4106         (yylex): Don't use minus_seen.  Communicate overflow to parser for
4107         it to handle.
4108         (error_if_numeric_overflow): New function.
4109         * parse.h (minus_seen): Removed field.
4110         (JAVA_RADIX10_FLAG): New define.
4111
4112 2001-11-07  Tom Tromey  <tromey@redhat.com>
4113
4114         Patch for PR java/1414:
4115         * parse.y (case_label_list): New global.
4116         (goal): Register case_label_list with GC.
4117         (java_complete_lhs): Save new case on case_label_list.
4118         (patch_switch_statement): Check for duplicate case labels.
4119
4120 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4121
4122         * parse.y (patch_assignment): Removed unused third argument.
4123         (java_complete_lhs): Removed unused third argument to patch_assignment.
4124
4125 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4126
4127         * lang.c: Include langhooks-def.h.
4128         * Make-lang.in: Update.
4129
4130 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
4131
4132         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4133
4134 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4135
4136         * mangle.c (find_compression_record_match): Don't match compression
4137         records for package name elements unless they occur at the start of
4138         the name. Fix for PR java/4717.
4139
4140 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4141
4142         * expr.c (expand_java_field_op): Don't special-case references to
4143         java.lang.PRIMTYPE.TYPE.
4144         (build_primtype_type_ref): Removed.
4145         * java-tree.h (build_primtype_type_ref): Remove prototype.
4146         * parse.y (maybe_build_primttype_type_ref): Removed.
4147         (complete_function_arguments): Don't special-case references to
4148         java.lang.PRIMTYPE.TYPE.
4149         (patch_assignment): Likewise.
4150         (array_constructor_check_entry): Likewise.
4151
4152 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4153
4154         * mangle.c (static tree compression_table): Fixed leading comment.
4155         * parse.h (struct parser_ctxt): Fixed field comment.
4156         * parse.y (check_pkg_class_access): New prototype, fixed leading
4157         comment, new parameter used to emit error only if passed as true.
4158         (parse_check_super): Pass extra argument to check_pkg_class_access.
4159         (do_resolve_class): Likewise.
4160         (process_imports): Likewise.
4161         (read_import_dir): Fixed indentation.
4162         (find_in_imports_on_demand): New local class_type_name. Local
4163         node_to_use deleted. while loop changed into for loop. Report
4164         multiple definition only for accessible classes. Improved error
4165         message.
4166         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4167         assigned to parameter list, fixed indentation. while loop changed
4168         into for loop, restore TREE_CHAIN on local `tem' before the next
4169         iteration.
4170
4171 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4172
4173         * lang.c (lang_get_alias_set): Deleted.
4174
4175 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4176
4177         * gjavah.c (jni_print_char): Fix thinko in last change.
4178
4179         * gjavah.c (jni_print_char, decode_signature_piece): Use
4180         safe-ctype macros and/or fold extra calls into fewer ones.
4181         * lex.c (java_read_unicode, java_lex): Likewise.
4182         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4183         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4184         * mangle_name.c (append_unicode_mangled_name,
4185         unicode_mangling_length): Likewise.
4186
4187 2001-10-17  Richard Henderson  <rth@redhat.com>
4188
4189         * Make-lang.in (java/lang.o): Depend on langhooks.h.
4190
4191 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4192
4193         * lang.c (langhooks.h): Included.
4194         (LANG_HOOKS_INIT): Redefined.
4195         (LANG_HOOKS_INIT_OPTIONS): Likewise.
4196         (LANG_HOOKS_DECODE_OPTION): Likewise.
4197         (struct lang_hooks lang_hooks): New initialization.
4198
4199 2001-10-11  Per Bothner  <per@bothner.com>
4200
4201         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
4202         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4203         The former is simpler, and jcf-write.c handles it better.
4204         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
4205         or WITH_CLEANUP_EXPR.
4206         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
4207         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4208
4209         * parse.y (patch_if_else_statement):  If the condition is constant,
4210         optimize away the test.
4211
4212 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4213
4214         * parse.y (patch_cast): Call patch_string on the first operand of
4215         the incoming node, update it if necessary. Fixes PR java/4510.
4216
4217 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4218
4219         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4220         when name qualifier matches a package name.
4221
4222 2001-10-08  Tom Tromey  <tromey@redhat.com>
4223
4224         Fix for PR java/4489:
4225         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4226         force a new label when computing `body_block'.
4227
4228 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4229
4230         * jcf-io.c (format_uint): Const-ify.
4231         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4232         * lex.c (java_get_line_col): Likewise.
4233         * parse.y (build_incdec): Likewise.
4234
4235 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4236
4237         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4238         a NULL enclosing context if appropriate. Fixes PR java/4466.
4239
4240 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4241
4242         * parse.y (patch_assignment): Use lvalue's original TYPE when
4243         building the final COMPOUND_EXPR.
4244         (try_reference_assignconv): Fixed leading comment.
4245
4246 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4247
4248         * parse.y (check_final_variable_indirect_assignment): For
4249         COMPOUND_EXPR, return only if finals were found initialized
4250         properly, if not, keep on checking.
4251         (check_final_variable_global_assignment_flag): New local
4252         error_found, set when appropriate and used to decide whether to
4253         report uninitialized finals. Fixed typo in comment.
4254
4255 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4256
4257         * decl.c (init_decl_processing): Fixed typo in predef_filenames
4258         last three initializations. Fixes PR java/4360.
4259
4260 2001-09-21  Richard Henderson  <rth@redhat.com>
4261
4262         * class.c (get_dispatch_table): Handle function descriptors.
4263         (build_dtable_decl): Likewise.
4264         * expr.c (build_invokevirtual): Likewise.
4265
4266 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4267
4268         * parse.y (patch_method_invocation): Build class initialization
4269         when static finals are used to qualify method invocation.
4270         Fixes PR java/4366.
4271
4272 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
4273
4274         * parse.h: (WFL_STRIP_BRACKET): Re-written using
4275         build_type_name_from_array_name.
4276         (STRING_STRIP_BRACKETS): New macro.
4277         * parse.y (build_type_name_from_array_name): New function.
4278         (array_creation_expression:): Accumulate []s instead of [s.
4279         (cast_expression:): Accumulate []s instead of [s after cast type
4280         name.
4281         (build_array_from_name): Local string deleted, use
4282         build_type_name_from_array_name.
4283         (build_unresolved_array_type): Accumulate []s instead of [s after
4284         type name.
4285         (register_fields): Fixed comment.
4286         (resolve_class): Local name, base deleted, new locals tname and
4287         array_dims. Use build_type_name_from_array_name. Use array_dims to
4288         build array type.
4289         (purify_type_name): Use STRING_STRIP_BRACKETS.
4290
4291 2001-09-18  Andreas Jaeger  <aj@suse.de>
4292
4293         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4294         * jv-scan.c: Likewise.
4295
4296 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4297
4298         * parse.y (patch_method_invocation): Inner class creation context
4299         check not enforced within constructors. Fixes PR java/1873.
4300
4301 2001-09-16  Tom Tromey  <tromey@redhat.com>
4302
4303         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4304         NOTE_PUSH for single-case push.  Fixes PR java/4189.
4305
4306 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4307
4308         * java-tree.h (TYPE_IMPORT_LIST): New macro.
4309         (TYPE_IMPORT_DEMAND_LIST): Likewise.
4310         (struct lang_type): New fields import_list and import_demand_list.
4311         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4312         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4313         (do_resolve_class): New local saved_enclosing_type, initialized,
4314         passed as parameter to find_in_imports and find_in_imports_on_demand.
4315         (find_in_imports): Added paramater enclosing_type, use its
4316         TYPE_IMPORT_LIST when applicable.
4317         (find_in_imports_on_demand): Added parameter enclosing_type, use
4318         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4319         declaration and initialization.
4320         (fold_constant_for_init): Switch/restore current_class to the
4321         appropriate context.
4322
4323 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
4324
4325         * verify.c (verify_jvm_instructions): Fix typo.
4326
4327 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4328
4329         * expr.c (expand_invoke): Const-ification.
4330         * parse.y (patch_method_invocation): Likewise.
4331
4332 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4333
4334         * gjavah.c (cxx_keywords): Const-ification.
4335         * keyword.gperf (java_keyword): Likewise.
4336         * lang.c (java_tree_code_name): Likewise.
4337         * lex.c (cxx_keywords): Likewise.
4338         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4339
4340 2001-09-11  Richard Henderson  <rth@redhat.com>
4341
4342         * parse.h (ctxp_for_generation): Mark extern.
4343
4344 2001-09-10  Richard Henderson  <rth@redhat.com>
4345
4346         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4347
4348 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4349
4350         * typeck.c (java_array_type_length, build_prim_array_type):
4351         Represent empty arrays by NULL index.
4352
4353 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
4354
4355         * java-tree.h (compile_resource_file): Grouped with other prototypes.
4356         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4357
4358 2001-09-06  Anthony Green  <green@redhat.com>
4359
4360         * class.c (O_BINARY): Define if necessary.
4361         (registerResource_libfunc): Declare.
4362         (init_class_processing): Initilize registerResource_libfunc.
4363         (compile_resource_file): New function.
4364         * java-tree.h (resource_name): Declare.
4365         (compile_resource_file): Declare.
4366         * jcf-parse.c (yyparse): Handle compiling java resource files.
4367         * lang.c (java_decode_option): Handle -fcompile-resource option.
4368         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4369         resource files.
4370         * gcj.texi (Code Generation): Add documentation for -R flag.
4371
4372 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
4373
4374         * jcf-write.c (generate_classfile): Issue an error in case of
4375         field/initial value mismatch.
4376         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4377         being initialized and we're generating bytecode.
4378         (java_complete_lhs): In MODIFY_EXPR section: added comments,
4379         set DECL_INITIAL properly when appropriate.
4380         Fixes PR java/4230
4381         Fixes PR java/4204
4382
4383 2001-09-01  Per Bothner  <per@bothner.com>
4384
4385         * parse.y (maybe_yank_clinit):  A field without an initializer is not
4386         relevant.  All initializers except static final and constant require
4387         <clinit>, regardless of flag_emit_class_files.
4388
4389 2001-08-31  Per Bothner  <per@bothner.com>
4390
4391         * class.c (set_constant_value):  When not emitting class files, then a
4392         String ConstantValue is a utf8const_ptr_type.
4393
4394 2001-08-30  Per Bothner  <per@bothner.com>
4395
4396         * jcf-write.c (generate_classfile):  Check that field is primitive
4397         or string before emitting ConstantValue attribute.
4398
4399 2001-08-30  Per Bothner  <per@bothner.com>
4400
4401         * parse.y (resolve_qualified_expression_name):  If creating a
4402         COMPOUND_EXPR, set it's type correctly.
4403
4404 2001-08-30  Per Bothner  <per@bothner.com>
4405
4406         * jcf-io.c (open_class):  Set filename field.
4407
4408         * jcf-parse,c (parse_class_file):  Set current_function_decl
4409         for better error message when Code attribute is missing.
4410
4411         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
4412         better diagnostics, especially for constructors.
4413
4414 2001-08-30  Per Bothner  <per@bothner.com>
4415
4416         * jcf-write.c (generate_classfile):  Don't write ConstantValue
4417         attribute if field is not final, for compatibility with jdk.
4418
4419         * jcf-write.c (generate_classfile):  Convert ConstantValue values
4420         to correct type.  Work-around for front-end bug.
4421         * class.c (set_constant_value):  Error if constant has wrong type.
4422
4423 2001-08-30  Per Bothner  <per@bothner.com>
4424
4425         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
4426         "Double" are printed at verbosity 1.
4427
4428         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
4429
4430         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
4431
4432 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4433
4434         * parse.y (patch_assignment): Don't verify final re-assignment here.
4435         (java_complete_lhs): Verify assignments to finals calling
4436         patch_assignment. Verify re-assignments to finals before calling
4437         patch_assignment.
4438
4439 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
4440
4441         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4442         Fixes PR java/1413
4443
4444 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4445
4446         * lex.c (java_lex): new local found_hex_digits. Set and then used
4447         in test to reject invalid hexadecimal numbers.
4448         * parse.y (java_complete_tree): Prevent unwanted cast with
4449         initialized floating point finals.
4450         (patch_binop): Emit a warning when detecting a division by zero,
4451         mark result not constant, don't simplify non integer division.
4452
4453 2001-08-28  Per Bothner  <per@bothner.com>
4454
4455         * jcf-write.c  (generate_bytecode_insns):  For increments and
4456         decrements just recurse to push constant.  Improvement on Mark's patch.
4457
4458 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
4459
4460         * jcf-write.c (generate_bytecode_insns): Generate an integer to
4461         real conversion for increments and decrements of reals.
4462
4463 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4464
4465         * parse.y (resolve_qualified_expression_name): Handle unresolved
4466         qualified expressions, prevent numerical qualifiers, fixed typo.
4467         Fixes PR java/4141
4468
4469 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4470
4471         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4472         don't report anything but deprecated class when marked so. Handle
4473         VAR_DECL.
4474         (patch_method_invocation): Check deprecation on methods and types.
4475         (patch_binop): code becomes an enum tree_code, added default: to
4476         switch to handle that. Detect division by zero, try to fold and
4477         return before using a subroutine.
4478
4479 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4480
4481         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4482         file smaller than 4 bytes.
4483         * parse.y (check_inner_circular_reference): New function.
4484         (check_circular_reference): Likewise.
4485         (array_initializer:): Accept {,}.
4486         (java_check_circular_reference): Rewritten using
4487         check_circular_reference and check_inner_circular_reference.
4488         (java_complete_expand_method): Unconditionally save and restore
4489         the unpurged exception list.
4490         (build_dot_class_method_invocation): Unmangle signature parameter.
4491
4492 2001-08-21  Tom Tromey  <tromey@redhat.com>
4493
4494         * decl.c (init_decl_processing): Add `throws' field to method
4495         descriptor.
4496         * class.c (make_method_value): Compute `throws' field for method.
4497
4498 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4499
4500         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4501         circularity is detected.
4502         (ctors_unchecked_throws_clause_p): Fixed leading comment.
4503
4504 2001-08-17  Richard Henderson  <rth@redhat.com>
4505
4506         * class.c (emit_register_classes): Add align parameter to
4507         call to assemble_integer.
4508
4509 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
4510
4511         * jcf-parse.c (load_class): New locals saved and class_loaded. If
4512         loading a class_or_name fails, try considering an innerclass name
4513         and load the enclosing context.
4514         * parse.y (resolve_inner_class): New function.
4515         (find_as_inner_class): Added leading comment.
4516         (register_incomplete_type): Keep the current context as enclosing
4517         context for JDEP_FIELD dependencies.
4518         (do_resolve_class): Locals new_class_decl and super initialized to
4519         NULL. Call resolve_inner_class, explore the enclosing context
4520         superclass if necessary.
4521         Fixes PR java/4007
4522
4523 2001-08-16  Tom Tromey  <tromey@redhat.com>
4524
4525         * jcf-dump.c (main): Updated for change to jcf_path_seal.
4526         * gjavah.c (main): Updated for change to jcf_path_seal.
4527         * lang.c (version_flag): New global.
4528         (java_decode_option): Recognize `-version'.
4529         (java_init): Update for change to jcf_path_seal.
4530         * jcf.h (jcf_path_seal): Added `print' argument.
4531         * jcf-path.c (jcf_path_seal): Added `print' argument.
4532
4533 2001-08-13  Zack Weinberg  <zackw@panix.com>
4534
4535         * Make-lang.in (java/decl.o): Update dependencies.
4536         * decl.c: Include libfuncs.h, don't include toplev.h.
4537
4538 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4539
4540         * decl.c (init_decl_processing): exception_type_node,
4541         class_not_found_type_node, and no_class_def_found_type_node
4542         initialized. predef_filenames augmented accordingly.
4543         instinit_identifier_node initialized.
4544         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4545         * java-tree.h (enum java_tree_index): New entries
4546         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4547         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4548         (exception_type_node): New macro.
4549         (class_not_found_type_node): Likewise.
4550         (no_class_def_found_type_node): Likewise.
4551         (instinit_identifier_node): Likewise.
4552         (PREDEF_FILENAMES_SIZE): Adjusted.
4553         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4554         (struct lang_type): Fixed typo in bitfield name.
4555         (DECL_INSTINIT_P): New macro.
4556         (ID_INSTINIT_P): Likewise.
4557         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4558         attribute.
4559         * parse.y (encapsulate_with_try_catch): New function.
4560         (generate_instinit): Likewise.
4561         (build_instinit_invocation): Likewise.
4562         (ctors_unchecked_throws_clause_p): Likewise.
4563         (add_instance_initializer): Deleted.
4564         (build_instance_initializer): Likewise.
4565         (in_instance_initializer): Likewise.
4566         (check_method_redefinition): instinit$ not to be verified.
4567         (java_complete_expand_methods): Generate instinit$, simplified code.
4568         (build_dot_class_method): Eliminated unnecessary locals. Use
4569         encapsulate_with_try_catch, removed unnecessary code.
4570         (fix_constructors): New local iii. Use build_instinit_invocation.
4571         (patch_method_invocation): Added comment.
4572         (maybe_use_access_method): Don't consider instinit$.
4573         (find_applicable_accessible_methods_list): Shorten the search for
4574         instinit$ too.
4575         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4576         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4577         (patch_throw_statement): Likewise. Fixed typo.
4578
4579 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
4580
4581         Revert:
4582         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4583         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4584         ASM_FINAL_SPEC.
4585         (lang_specific_pre_link): Use set_input to set input_filename.
4586         Append `main' here.
4587         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4588         (main): Fix definition.
4589         Strip `main' from classname.
4590         Fixes PR java/227.
4591
4592 2001-08-11  Zack Weinberg  <zackw@panix.com>
4593
4594         * lex.h: Don't include setjmp.h.  Don't define
4595         SET_FLOAT_HANDLER or prototype set_float_handler.
4596
4597 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4598
4599         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
4600         `poplevel' in the right order.
4601
4602 2001-08-09  Richard Henderson  <rth@redhat.com>
4603
4604         * Make-lang.in (class.o): Depend on TARGET_H.
4605         * class.c (emit_register_classes): Use target hooks instead of
4606         assemble_constructor and assemble_destructor.
4607
4608 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
4609
4610         * check-init.c (flags.h): Include
4611         (check_init): Don't report uninitialized static class
4612         initialization flags, don't free bit index when doing static class
4613         initialization optimization.
4614         (check_for_initialization): Return type changed to `unsigned int.'
4615         (attach_initialized_static_class): New function.
4616         * class.c (add_method_1): Create the initialized static class
4617         table if necessary.
4618         (finish_class): Always emit deferred inline methods.
4619         * decl.c (emit_init_test_initialization): Moved to expr.c
4620         (complete_start_java_method): Don't traverse
4621         DECL_FUNCTION_INIT_TEST_TABLE.
4622         (lang_mark_tree): Mark hash tables in function decls.
4623         * expr.c (emit_init_test_initialization): Moved from decl.c.
4624         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
4625         initialization flag, set DECL_CONTEXT and
4626         LOCAL_CLASS_INITIALIZATION_FLAG.
4627         (java_lang_expand_expr): Emit initialization code for static class
4628         initialized flags when entering block, if necessary.
4629         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
4630         * java-tree.h (flag_optimize_sci): New global variable declaration.
4631         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
4632         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
4633         (LOCAL_FINAL_P): Fixed typo in comment.
4634         (FINAL_VARIABLE_P): Likewise.
4635         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
4636         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
4637         (struct lang_decl): New fields `ict', `smic' and `cif.'
4638         (check_for_initialization): New returned value for global.
4639         (attach_initialized_static_class): New global function.
4640         (STATIC_CLASS_INIT_OPT_P): New macro.
4641         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
4642         * lang.c (java_decode_option): Handle
4643         `-fno-optimize-static-class-initialization'
4644         * parse.y (start_complete_expand_method): New function.
4645         (java_expand_method_bodies): Likewise.
4646         (attach_init_test_initialization_flags): Likewise.
4647         (adjust_init_test_initialization): Likewise.
4648         (emit_test_initialization): Likewise.
4649         (java_complete_expand_methods): Nullify abstract and native method
4650         bodies.
4651         (java_complete_expand_method): New locals `fbody', `block_body'
4652         and `exception_copy.' Reorganized: directly return on empty method
4653         bodies, call `start_complete_expand_method', remember definitely
4654         initialized static class in function, don't expand method bodies.
4655         (java_expand_classes): Call `java_expand_method_bodies' before
4656         `finish_class' when compiling to native.
4657         (resolve_expression_name): Use `orig' after building outer class
4658         field access.
4659         (patch_invoke): Remember static method invocations.
4660
4661 2001-08-06  Richard Henderson  <rth@redhat.com>
4662
4663         * class.c (emit_register_classes): Pass a symbol_ref and priority
4664         to assemble_constructor.
4665
4666 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
4667
4668         * java-tree.h (all_class_filename): New macro.
4669         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
4670         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
4671         newly created IDENTIFIER_NODE to `all_class_filename.'
4672
4673 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
4674
4675         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
4676         Use ggc_add_tree_root to register roots.
4677
4678 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4679
4680         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
4681         second operand calling check_init.
4682         * decl.c (complete_start_java_method): Swaped second and third
4683         arguments while creating WITH_CLEANUP_EXPR node.
4684         * jcf-write.c (generate_bytecode_insns): Use second operand
4685         instead of third when handling WITH_CLEANUP_EXPR.
4686         * parse.y (java_complete_lhs): Expand second operand of
4687         WITH_CLEANUP_EXPR nodes.
4688         (patch_synchronized_statement): Swaped second and third arguments
4689         while creating WITH_CLEANUP_EXPR node.
4690
4691 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4692
4693         * parse.y (create_interface): Avoid cyclic inheritance report when
4694         syntax error encountered during class definition.
4695         Fixes PR java/2956
4696
4697 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4698
4699         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4700         ASM_FINAL_SPEC.
4701         (lang_specific_pre_link): Use set_input to set input_filename.
4702         Append `main' here.
4703         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4704         (main): Fix definition.
4705         Strip `main' from classname.
4706         Fixes PR java/227.
4707
4708 2001-07-18  Tom Tromey  <tromey@redhat.com>
4709
4710         For PR java/2812:
4711         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
4712         * lex.c (java_new_lexer): Use ICONV_CONST.
4713         (java_read_char): Likewise.
4714         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
4715         (jv-scan$(exeext)): Likewise.
4716
4717 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4718
4719         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
4720         * parse.y (check_class_interface_creation): Allow `private' if the
4721         enclosing is not an interface.
4722         (create_interface): Interface tagged public if the enclosing
4723         context is an interface.
4724         (create_class): Class tagged public if the enclosing context
4725         is an interface.
4726         Fixes PR java/2959
4727
4728 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4729
4730         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
4731         Fixes PR java/2665
4732
4733 2001-07-14  Tim Josling  <tej@melbpc.org.au>
4734
4735         * check-init.c (check_init): Remove references to EXPON_EXPR.
4736
4737 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4738
4739         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
4740         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
4741         Fixes PR java/3602
4742
4743 2001-07-13  Tom Tromey  <tromey@redhat.com>
4744
4745         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
4746         invocation.
4747
4748 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4749
4750         * parse.y (patch_method_invocation): Don't override primary if one
4751         is already provided, but let this$<n> be built. Fixed comment.
4752
4753 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4754
4755         * parse.y (empty_statement:): Report empty statement error only
4756         when found at class declaration level.
4757         Fixes PR java/3635
4758
4759 2001-07-12  Tom Tromey  <tromey@redhat.com>
4760
4761         * expr.c (expand_load_internal): New function.
4762         (LOAD_INTERNAL): Use it.
4763
4764 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
4765
4766         * parse.y (verify_constructor_super): Compare anonymous class ctor
4767         args with `valid_method_invocation_conversion_p.'
4768         Fixes PR java/3285
4769
4770 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4771
4772         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
4773         `-fsyntax-only.' Fixes PR java/3248
4774
4775 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4776
4777         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
4778
4779 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4780
4781         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
4782         current function is static. Fixes PR java/1970
4783
4784 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4785
4786         * parse.y (patch_method_invocation): Add enclosing context to ctor
4787         calls if necessary. Fixes PR java/2953
4788
4789 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4790
4791         * parse.y (resolve_package): Abort if qualified expression member
4792         isn't right.
4793         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
4794         Fixes PR java/1391
4795
4796 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
4797
4798         * verify.c: Don't use // comments.
4799
4800 2001-07-05  Tom Tromey  <tromey@redhat.com>
4801
4802         * lang.c (flag_assume_compiled): Removed.
4803         * java-tree.h (flag_assume_compiled): Removed.
4804         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
4805         -fhash-synchronization, -fuse-divide-subroutine,
4806         -fcheck-references, -femit-class-file, -femit-class-files,
4807         -fassume-compiled.  Updated --encoding information.  Changed
4808         -foutput-class-dir to `-d'.
4809
4810 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
4811
4812         * jcf-parse.c (parse_class_file): Add lineno parameter to
4813         debug_start_source_file call.
4814
4815 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4816
4817         * gcj.texi: Use gpl.texi.
4818         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
4819         dependencies and use doc/include in search path.
4820
4821 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
4822
4823         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
4824         `this'.  If so, don't build instance initializers.
4825
4826 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4827
4828         * parse.y (resolve_expression_name): Improved error message for
4829         inner class cases. Fixes PR java/1958
4830
4831 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4832
4833         * lang.c: #include diagnostic.h
4834         (lang_print_error): Add a `diagnostic_context *' parameter.
4835         (java_dummy_print): Likewise.
4836         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
4837
4838 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4839
4840         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
4841         * jcf.h (typedef struct JCF): New bitfield `finished.'
4842         (JCF_FINISH): Set `finished.'
4843         (JCF_ZERO): Reset `finished.'
4844         Fixes PR java/2633
4845
4846 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4847
4848         * parse.y (class_body_declaration:): Don't install empty instance
4849         initializers.
4850         Fixes PR java/1314
4851
4852 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4853
4854         * class.c (set_super_info): Call `set_class_decl_access_flags.'
4855         (set_class_decl_access_flags): New function.
4856         * java-tree.h (set_class_decl_access_flags): New prototype.
4857         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
4858         (parse_class_file): New local `decl_max_locals.' Take wide types
4859         into account to compute DECL_MAX_LOCALS.
4860         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
4861         imports on demand.
4862
4863 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
4864
4865         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
4866
4867 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4868
4869         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
4870         * parse.y (do_resolve_class): Moved comments out to leading comment
4871         section. Removed local `start', New local `_ht' and
4872         `circularity_hash.'  Record `enclosing' in hash table and search
4873         it to detect circularity.  Use `enclosing' as an argument to
4874         `lookup_cl.' Free the hash table when done.
4875
4876 2001-06-19  Tom Tromey  <tromey@redhat.com>
4877
4878         * lex.c (java_read_char): Disallow invalid and overlong
4879         sequences.  Fixes PR java/2319.
4880
4881 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
4882
4883         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
4884
4885 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4886
4887         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
4888         arguments accordingly.
4889
4890 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4891
4892         * gcj.texi: Move contents to just after title page.
4893
4894 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
4895
4896         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
4897         builtin type.
4898         (patch_incomplete_class_ref): Build the class ref, build the class
4899         init if necessary, complete the tree.
4900         Fixes PR java/2605
4901
4902 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4903
4904         * parse.y (lookup_field_wrapper): Test `name' code.
4905         (resolve_qualified_expression_name): Test `qual_wfl' code.
4906         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
4907         handle `qual_wfl' by code.
4908         (maybe_build_primttype_type_ref): Test `wfl' code.
4909
4910 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4911
4912         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
4913         fdl.texi.
4914         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
4915         the dvi file in the java directory.
4916
4917 2001-05-25  Sam TH  <sam@uchicago.edu>
4918
4919         * gen-table.pl javaop.h jcf.h lex.h,
4920         parse.h: Fix header include guards.
4921
4922 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
4923
4924         * jv-scan.c (version): Update copyright year.
4925
4926 2001-05-21  Per Bothner  <per@bothner.com>
4927
4928         * jcf-parse.c (read_class):  If class is from .class or .zip file
4929         and it's already been read, don't push/pop parser context.
4930
4931 2001-05-18  Per Bothner  <per@bothner.com>
4932
4933         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
4934         command line so the jvgenmain-generated main program comes first.
4935
4936 2001-05-15  Tom Tromey  <tromey@redhat.com>
4937
4938         * class.c (build_utf8_ref): Don't generate identifier based on
4939         utf8const contents.
4940
4941 2001-05-12  Richard Henderson  <rth@redhat.com>
4942
4943         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
4944         * expr.c (java_lang_expand_expr): Expand it.
4945         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
4946         calling build_exception_object_ref.
4947         * parse.y (catch_clause_parameter): Likewise.
4948         (build_dot_class_method): Likewise.
4949         (try_reference_assignconv): Likewise.
4950         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
4951         * jcf-write.c (generate_bytecode_insns): Likewise.
4952
4953 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4954
4955         * parse.y (build_unresolved_array_type): Set
4956         EXPR_WFL_QUALIFICATION on the newly created wfl.
4957         Fixes PR java/2538. Fixes PR java/2535.
4958
4959 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4960
4961         * parse.y (fix_constructors): Removed unnecessary assignment to
4962         local. Moved assignment to `this$<n>', fixed comments and
4963         indentation.
4964         (build_wfl_wrap): Fixed indentation.
4965         Fixes PR java/2598, java/2579 and java/2658.
4966
4967 2001-05-03  Mo DeJong  <mdejong@redhat.com>
4968
4969         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4970         check for byte swap.
4971
4972 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
4973
4974         * expr.c (build_class_init): Move MODIFY_EXPR
4975         outside of COND_EXPR.  Remove variable `call'.
4976
4977 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4978
4979         * decl.c: NULL_PTR -> NULL.
4980         * jcf-write.c: Likewise.
4981
4982 2001-05-01  Tom Tromey  <tromey@redhat.com>
4983
4984         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
4985         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
4986         * gcj.texi: Updated copyright text.  Include fdl.texi.
4987         (Top): Link to new node.
4988
4989 2001-05-01  Per Bothner  <per@bothner.com>
4990
4991         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
4992
4993 2001-05-01  Per Bothner  <per@bothner.com>
4994
4995         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
4996         import_list contains the name, not the TREE_PURPOSE.
4997
4998 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4999
5000         * jcf-io.c (read_zip_member): Cast to long in comparison with
5001         signed value.
5002
5003         * jvspec.c (lang_specific_driver): Initialize variables.
5004
5005         * mangle.c (find_compression_record_match): Likewise.
5006
5007         * typeck.c (build_null_signature): Provide static prototype.  Mark
5008         parameter with ATTRIBUTE_UNUSED.
5009
5010         * verify.c (verify_jvm_instructions): Initialize variable.
5011
5012 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5013
5014         * parse.y (do_resolve_class): Check for cyclic inheritance during
5015         inner class resolution.
5016
5017 2001-04-27  Per Bothner  <per@bothner.com>
5018
5019         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
5020         while iterating, since that could cause gc to lose stuff.
5021
5022 2001-04-26  Per Bothner  <per@bothner.com>
5023
5024         Fix method search wrt scope of inner classes to match JLS2.
5025         * typeck.c (build_null_signature):  New static function.
5026         (has_method):  New function.  Uses build_null_signature and lookup_do.
5027         * java-tree.h (has_method):  New declaration.
5028         * parse.y (find_applicable_accessible_methods_list):  Do not search
5029         context of inner classes here.
5030         (patch_method_invocation):  Search scope, ie. current and outer clases,
5031         for method matching simple name, to find class.
5032
5033 2001-04-26  Per Bothner  <per@bothner.com>
5034
5035         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5036         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
5037
5038         * constants.c (find_methodref_with_class_index):  New function.
5039         (find_methodref_index):  Use find_methodref_with_class_index.
5040         * java-tree.h (find_methodref_with_class_index):  New declaration.
5041         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
5042         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5043         If context changed from interface to class, don't use invokeinterface.
5044
5045 2001-04-25  Per Bothner  <per@bothner.com>
5046
5047         * verify.c (verify_jvm_instructions):  For field instructions,
5048         check that field index is valid.  For invoke instructions, check that
5049         method index is valid.
5050
5051 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
5052
5053         * config-lang.in (target_libs): Copy from $libgcj_saved.
5054
5055 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5056
5057         * decl.c (init_decl_processing): Add new class "protectionDomain"
5058         field.
5059         * class.c (make_class_data): Set initial value for "protectionDomain".
5060
5061 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5062
5063         * jvspec.c (lang_specific_driver): Fix memory allocation
5064         deficit, by using concat in lieu of xmalloc/sprintf.
5065
5066 2001-04-20  Per Bothner  <per@bothner.com>
5067
5068         Fixes to compile multiple .class files at once.
5069         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
5070         * java-tree.h (CLASS_PARSED_P):  New macro.
5071         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5072         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
5073         (read_class):  Avoid some code duplication.
5074         Don't call JCF_FINISH for a .class file - might be needed later.
5075         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
5076         rather than CLASS_LOADED_P, since latter implies class laid out.
5077         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
5078         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
5079
5080 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5081
5082         * Make-lang.in (java/boehm.o): Depend on toplev.h.
5083
5084         * boehm.c: Include toplev.h.
5085
5086 2001-04-06  Tom Tromey  <tromey@redhat.com>
5087             Alexandre Petit-Bianco  <apbianco@redhat.com>
5088
5089         Fix for PR gcj/1404 and PR gcj/2332:
5090         * parse.y (build_array_from_name): If we use the type_wfl then
5091         accumulate dimensions from the original type as well.
5092         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5093
5094 2001-04-06  Tom Tromey  <tromey@redhat.com>
5095
5096         * parse.y (analyze_clinit_body): Return true if the second operand
5097         of a METHOD_EXPR is nonzero.
5098
5099 2001-04-06  Tom Tromey  <tromey@redhat.com>
5100
5101         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5102         directory.
5103         ($(srcdir)/java/parse.c): Likewise.
5104
5105 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5106
5107         * gcj.texi: Use `which-gcj' instead of `which-g77.'
5108         (version-gcc): Initialized.
5109         (which-gcj): Likewise.
5110
5111 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5112
5113         * java-tree.h (struct lang_decl): New macro
5114         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5115         * parse.y (build_instance_initializer): New function.
5116         (add_instance_initializer): Use it.
5117         (java_fix_constructors): Set `current_class' before fix pass.
5118         (fix_constructors): Just return if already fixed. Move `super()'
5119         invocation ahead. Use `build_instance_initializer.'
5120         Fixes PR java/1315.
5121
5122 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5123
5124         * parse.y (resolve_qualified_expression_name): Pass field's
5125         DECL_CONTEXT to `not_accessible_p.'
5126         (not_accessible_p): Changed parameters order in `inherits_from_p'
5127         invocation.
5128
5129 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
5130
5131         * lang-options.h: Add flag_check_references.
5132
5133 2001-04-04  Per Bothner  <per@bothner.com>
5134
5135         * java-tree.h (CONSTANT_VALUE_P):  New macro.
5136         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
5137         * parse.y (maybe_build_class_init_for_field):  New static function.
5138         (resolve_expression_name, resolve_field_access):  Use
5139         maybe_build_class_init_for_field instead of build_class_init
5140         This does not do the init if the field is compile-time-constant.
5141         (resolve_field_access):  Simplify.
5142
5143         * parse.y (fold_constant_for_init):  Merge test into switch.
5144
5145 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
5146
5147         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5148         on gansidecl.h.
5149         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5150
5151 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
5152
5153         * expr.c (pop_type_0): Save the result of the first
5154         lang_printable_name call in a scratch buffer, so it
5155         won't be clobbered by the second call.
5156
5157 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
5158
5159         * parse-scan.y (array_type:): Rewritten.
5160         (type_declaration:): `empty_statement' replaces `SC_TK.'
5161         (class_member_declaration:): `empty statement' added.
5162         (method_body:): Simplified.
5163         (static_initializer:): Likewise.
5164         (primary_no_new_array:): Use `type_literals.'
5165         (type_literals:): New rule.
5166         (dims:): Set and update `bracket_count.'
5167         Fixes PR java/1074. Fixes PR java/2412.
5168
5169 2001-03-28  Hans Boehm  <boehm@acm.org>
5170
5171         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5172         (get_boehm_type_descriptor): Set type on returned value to be a
5173         pointer length integer.
5174
5175 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5176
5177         * expr.c (pop_type_0): Call `concat' rather than building the
5178         string manually.
5179         (pop_type): Add format specifier in call to `error'.
5180
5181         * parse.y (patch_method_invocation): Avoid casting away
5182         const-ness.
5183
5184 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
5185
5186         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5187
5188 2001-03-28  Richard Henderson  <rth@redhat.com>
5189
5190         IA-64 ABI Exception Handling:
5191         * Make-lang.in (except.o): Don't depend on eh-common.h.
5192         * check-init.c (check_init): Handle EXC_PTR_EXPR.
5193         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5194         [soft_exceptioninfo_call_node]: Remove.
5195         [eh_personality_libfunc, lang_eh_runtime_type]: New.
5196         (end_java_method): No emit_handlers.
5197         * except.c (java_set_exception_lang_code): Remove.
5198         (method_init_exceptions): Don't call it.
5199         (prepare_eh_table_type): No CATCH_ALL_TYPE.
5200         (build_exception_object_ref): New.
5201         (expand_end_java_handler): Update for except.h name changes.
5202         (emit_handlers, expand_resume_after_catch): Remove.
5203         * expr.c (java_lang_expand_expr): Update for except.h name changes.
5204         (process_jvm_instruction): Use build_exception_object_ref.
5205         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5206         (soft_exceptioninfo_call_node): Remove.
5207         (build_exception_object_ref): Declare.
5208         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5209         soft_exceptioninfo_call_node.  Move processing ...
5210         [EXC_PTR_EXPR]: ... here.
5211         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5212         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5213         (source_end_java_method): No java_set_exception_lang_code or
5214         emit_handlers.
5215         (build_dot_class_method): Use build_exception_object_ref.
5216         (try_reference_assignconv): Check EXC_PTR_EXPR not
5217         soft_exceptioninfo_call_node.
5218
5219 2001-03-28  Richard Henderson  <rth@redhat.com>
5220
5221         * java-tree.h (throw_node): Define as a single member of
5222         java_global_trees instead of a separate array.
5223         (JTI_THROW_NODE): New.
5224         * decl.c (throw_node): Don't declare.
5225         (init_decl_processing): Init a scalar throw_node.
5226         Don't register it for gc.
5227         * check-init.c (check_init): Reference scalar throw_node.
5228         * expr.c (build_java_athrow): Likewise.
5229         * jcf-write.c (generate_bytecode_insns): Likewise.
5230         * parse.h (BUILD_THROW): Likewise.
5231
5232 2001-03-28  Richard Henderson  <rth@redhat.com>
5233
5234         * decl.c (end_java_method): Do not save and restore
5235         flag_non_call_exceptions.
5236         * parse.y (source_end_java_method): Likewise.
5237         * lang.c (flag_exceptions): Don't declare.
5238         (java_init_options): Set flag_non_call_exceptions.  Set
5239         flag_exceptions here ...
5240         (java_init): ... not here.
5241
5242 2001-03-27  Richard Henderson  <rth@redhat.com>
5243
5244         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5245         exceptions_via_longjmp.
5246
5247         * lang.c (flag_new_exceptions): Don't declare it.
5248         (java_init_options): Or set it.
5249
5250 2001-03-27  Richard Henderson  <rth@redhat.com>
5251
5252         * decl.c (end_java_method): Rename asynchronous_exceptions to
5253         flag_non_call_exceptions.
5254         * parse.y (source_end_java_method): Likewise.
5255
5256 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5257
5258         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5259
5260 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5261
5262         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5263
5264 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5265
5266         * parse.y (find_as_inner_class): Follow current package
5267         indications not to mistakingly load an unrelated class.
5268
5269 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5270
5271         * constants.c (PUTN): Use memcpy, not bcopy.
5272
5273         * lex.c (java_read_char): Use memmove, not bcopy.
5274
5275         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5276
5277 2001-03-23  Per Bothner  <per@bothner.com>
5278
5279         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
5280         macro for better error pin-pointing.
5281         * java-tree.h:  Fix typo in comment.
5282
5283         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
5284         Don't include jsr/goto in exception range.
5285         Check if start and end of exception range are the same (also TRY_EXPR).
5286         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5287         However, do emit the following goto even if try_block is empty.
5288         Defer freeing exception_decl until after the finalizer, to make
5289         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
5290
5291         * parse.y (java_complete_lhs):  If the try-clause is empty, just
5292         return the finally-clause and vice versa.
5293
5294 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5295
5296         * gcj.texi (Input Options): documented the check for attribute
5297         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5298         * java-tree.h (flag_force_classes_archive_check): Declared extern.
5299         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5300         (jcf_parse): Check for the right classes archive if necessary.
5301         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5302         (jcf_parse_fields): Fixed indentation.
5303         * jcf-write.c (append_gcj_attribute): New function.
5304         (generate_classfile): Compute the attribute count, invoke
5305         `append_gcj_attribute'.
5306         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5307         turned into bit-fields. New bit-field `right_zip.'
5308         (JCF_ZERO): Set `right_zip' to zero.
5309         * lang-options.h (-fforce-classes-archive-check): Added flag.
5310         * lang.c (flag_force_classes_archive_check): New flag.
5311         (lang_f_options): New entry `force-classes-archive-check.'
5312         Fixes PR java/1213.
5313
5314 2001-02-07  Andrew Haley  <aph@redhat.com>
5315
5316         * gcj.texi (Configure-time Options): Add -fcheck-references.
5317         * expr.c (build_java_indirect_ref): New function.
5318         (java_check_reference): New function.
5319         (build_java_array_length_access): Use build_java_indirect_ref to
5320         check for null references.
5321         (build_java_arrayaccess): Likewise.
5322         (build_get_class): Likewise.
5323         (build_field_ref): Likewise.
5324         (invoke_build_dtable): Likewise.
5325         (build_invokeinterface): Likewise.
5326         * lang.c (lang_f_options): Add flag_check_references.
5327         * jvspec.c (jvgenmain_spec): Add flag_check_references.
5328         * java-tree.h (flag_check_references): New variable.
5329         * lang.c (flag_check_references): Likewise.
5330         * parse.y (patch_invoke): Use java_check_reference.
5331         (patch_assignment): Allow for extra nesting in
5332         _Jv_CheckArrayStore.
5333
5334 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
5335
5336         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5337         * lex.c (cxx_keywords): Likewise.
5338
5339 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5340
5341         * parse.y (qualify_ambiguous_name): Broaden `length'
5342         recognition. Help MODIFY_EXPR be resolved as expression names.
5343         Fixes PR java/2066. Fixes PR java/2400.
5344
5345 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
5346
5347         * gjavah.c (process_file): Mark interface definitions with
5348         "__attribute__ ((java_interface))".
5349
5350 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5351
5352         * class.c (layout_class): Fixed push_super_field's second
5353         argument. Fixes PR java/2333.
5354         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5355         too early to lay innerclasses out.
5356
5357 2001-03-20  Tom Tromey  <tromey@redhat.com>
5358             Alexandre Petit-Bianco <apbianco@redhat.com>
5359
5360         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5361         inside an array reference. Insertion of the array store check
5362         rewritten. Fixes PR java/2299.
5363
5364 2001-03-20  Tom Tromey  <tromey@redhat.com>
5365
5366         * lex.c (java_read_unicode): Only accept leading `u's.
5367
5368 2001-03-20  Tom Tromey  <tromey@redhat.com>
5369
5370         * jcf-parse.c (read_class): Initialize `class'.
5371
5372 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5373
5374         * jcf_parse.c (jcf_parse): Eliminate unused variable.
5375
5376 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5377
5378         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5379         (layout_class): Likewise.
5380         (layout_class_method): Likewise.
5381         (emit_register_classes): Likewise.
5382         * decl.c (builtin_function): Likewise.
5383         (give_name_to_locals): Likewise.
5384
5385 2001-03-19  Per Bothner  <per@bothner.com>
5386
5387         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
5388         before trying to load an inner class.
5389
5390         Fixes to process to command-line .class files in two passes.
5391         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
5392         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
5393         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
5394         * class.c (is_compiled_class):  Fix for renamed flag.
5395         * parse.y (maybe_create_class_interface_decl):  Likewise.
5396         * jcf-parse.c (yyparse):  Also set if compiling .class files.
5397         * jcf-parse.c (read_class);  Read current_class.
5398         (jcf_parse):  Make static.
5399         (load_inner_classes):  New function, with code moved from jcf_parse,
5400         because we need to inner classes after the command-line files are read.
5401         (yyparse):  Set finput to NULL when it doesn't need to be closed.
5402         Reduce use of main_jcf (basically only for archive) and
5403         use finput instead of main_jcf->read_state.
5404         Inline jcf_figure_file_type into yyparse.
5405         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5406         Defer load_inner_classes and parse_class_file to a second pass,
5407         after we've correctly mapped command-line .clas fiels to classes.
5408         (jcf_figure_file_type):  Removed.
5409         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
5410         (JCF_ZERO):  Also clear zipd field.
5411         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
5412
5413 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5414
5415         * jcf-parse.c (yyparse): Change ch from char * to char.
5416
5417 2001-03-19  Per Bothner  <per@bothner.com>
5418
5419         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
5420         Add constructed filelist-file at end, following -xjava.  Thus any .o
5421         and library files are not affected by the -xjava.  Also wrap
5422         explicit @FILE with -xjava and -xnone.
5423
5424 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
5425
5426         * class.c (build_static_field_ref): Call make_decl_rtl() after
5427         setting the DECL_EXTERNAL flag.
5428
5429 2001-03-17  Per Bothner  <per@bothner.com>
5430
5431         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
5432
5433         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
5434         when result is is needed (target is STACK_TARGET).
5435
5436         * parse.h (JDEP_SOLV):  Removed.
5437         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
5438
5439         * parse.y (incomplete_class_list): Removed.
5440         (obtain_incomplete_type): Don't use or set incomplete_class_list.
5441         It doesn't work if resolve_class changes the name of an array type
5442         that is on the list and then someone else looks for the modified name.
5443         Also, seems liable to break when compiling multiple source files at
5444         once.  So the simplest is to just remove incomplete_class_list -
5445         it is only a minor space win and it is not even clear it saves time.
5446
5447         * parse.y (resolve_class):  Remove unneeded promote_type.
5448
5449 2001-03-15  Per Bothner  <per@bothner.com>
5450
5451         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
5452         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
5453         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5454         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5455
5456         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
5457         * parse.y (java_expand_classes):  Likewise.
5458
5459         * parse.y (expand_start_java_method):  Was only called once and had a
5460         misleading name, so inline in caller java_complete_expand_method.
5461         (enter_a_block):  Likewise inline in enter_block and remove.
5462
5463         Remove junk from when gcc/java was created (by copying from C/C++).
5464         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
5465         (struct binding_level):  Remove fields keep, keep_if_subblocks,
5466         more_cleanups_ok, have_cleanups (which have never been used).
5467         (pushlevel, poplevel):  Remove related useless code.
5468
5469         * class.c (make_class_data):  The class_dtable_decl (i.e. the
5470         vtable for Class) should be external, except when compiling Class.
5471
5472         * jvspec.c (lang_specific_driver):  Fix -C handling.
5473         Check -save-temps to see if temp @FILE should be deleted.
5474         Follow-up to/fix for February 16 patch.
5475
5476         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
5477         (type_stack_dup):  Remove no-longer neded error check.
5478
5479 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
5480
5481         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5482         to 'for_pointer'. If this type is for a pointer (argument) mangling,
5483         don't surround the element with 'N..E' if the type name is
5484         unqualified.
5485
5486 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5487
5488         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5489         DECL_RTL_SET_P, etc.
5490         (make_method_value): Likewise.
5491         (get_dispatch_table): Likewise.
5492
5493         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5494
5495 2001-03-07  Tom Tromey  <tromey@redhat.com>
5496
5497         * config-lang.in (lang_requires): Define.
5498
5499 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
5500
5501         * typeck.c (convert): Check flag_unsafe_math_optimizations,
5502         not flag_fast_math.
5503
5504 2001-03-05  Per Bothner  <per@bothner.com>
5505
5506         Fix a problem where rest_of_decl_compilation applied to
5507         class_dtable_decl causes problems because it was done too early,
5508         before output file was opened.
5509         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
5510         * class.c (class_dtable_decl):  Add macro - element of class_roots.
5511         (make_class_data):  Define class_dtable_decl.
5512         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
5513
5514 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5515
5516         * java/class.c, java/decl.c, java/java-tree.h: Replace all
5517         uses of 'boolean' with 'bool'.
5518
5519 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5520
5521         * lang-specs.h: Add zero initializer for cpp_spec field to all
5522         array elements.
5523
5524 2001-02-16  Per Bothner  <per@bothner.com>
5525
5526         Handle compiling multiple input files at once, and @FILE syntax.
5527         * gcj.texi:  Updated documentation to match.
5528         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
5529         * jcf-parse.c (parse_source_file):  Split into ...
5530         (parse_source_file_1):  New function - and:
5531         (parse_source_file_2):  New function.
5532         (yyparse):  On -ffilelist-file, open and scan named file.
5533         On first pass over files, only do parse_source_file_1.
5534         A new second pass calls parse_source_file_2 for each file to compile.
5535         (init_jcf_parse):  Call init_src_parse.
5536         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
5537         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
5538         as multiple input file combined in one compilation.
5539         * lang-options.h:  Add -ffilelist-file
5540         * lang.c (flag_filelist_file):  New flag variable.
5541         (lang_f_options):  Handle -ffilelist-file.
5542         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5543         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
5544         gclass_list - use global fields of src_parse_roots instead.
5545         * parse.y (src_parse_roots):  New array.
5546         (incomplete_class_list, gclass_list):  New macros.
5547         (push_parser_context, java_pop_parser_context,
5548         java_parser_context_resume):  Don't fiddle with deleted fields.
5549         (various):  Use incomplete_class gclass_list and global macros
5550         instead of parse_ctxt fields - the lists are global.
5551         (init_src_parse):  New function.
5552
5553 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5554
5555         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5556
5557 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5558
5559         * parse.y (check_inner_class_access): Moved declaration of local
5560         `enclosing_decl_type' to the right location.
5561
5562 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
5563
5564         * parse.y (parser_check_super_interface): Don't call
5565         check_pkg_class_access for an inner interface.
5566         (parser_check_super): Don't call check_pkg_class_access for inner
5567         class.
5568         (do_resolve_class): Simplify enclosing type loop. Don't call
5569         check_pkg_class_access if CL and DECL are not set.
5570         (find_in_imports_on_demand): Set DECL if class_type needed to be
5571         loaded. Don't call check_pkg_class_access for an inner class.
5572         (check_inner_class_access): Rewritten to implement member access
5573         rules as per spec 6.6.1.
5574         (check_pkg_class_access): Handle the empty package correctly.
5575         (in_same_package): New function. Determine if two classes are in the
5576         same package.
5577
5578 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
5579
5580         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
5581         method into array types.
5582         * parse.y (patch_method_invocation): Bypass access check on clone call
5583         to array instance.
5584
5585 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5586
5587         * expr.c (build_instanceof): Check for arrays when trying fold to
5588         false.
5589
5590 2001-02-15  Jim Meyering  <meyering@lucent.com>
5591
5592         * Make-lang.in (java.install-common): Depend on `installdirs'.
5593         (java.install-info): Likewise.
5594
5595 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
5596
5597         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
5598
5599 2001-02-14  Tom Tromey  <tromey@redhat.com>
5600             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5601
5602         Fix for PR java/1261.
5603         * typeck.c (build_java_array_type): Add public `clone' method to
5604         arrays.
5605         * parse.y (resolve_qualified_expression_name): Use current_class
5606         when checking for inaccessibility.
5607         (patch_method_invocation): Fixed error message when accessibility
5608         denied.  Added `from_super' argument.
5609
5610 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5611
5612         * parse.y (resolve_class): Don't build a fake decl. Use the one
5613         already built.
5614         * typeck.c (build_java_array_type): Build and assign decl to array
5615         type.
5616
5617 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5618
5619         * parse.y (not_accessible_p): Changed leading comment. Added extra
5620         `where' argument. Use it to enforce protected access rules.
5621         (resolve_qualified_expression_name): Added extra argument to
5622         not_accessible_p.
5623         (patch_method_invocation): Use argument `primary' to provide
5624         not_accessible_p with an extra argument.
5625         (lookup_method_invoke): Added extra argument to not_accessible_p.
5626         (search_applicable_method_list): Likewise.
5627
5628 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5629
5630         * parse.y (resolve_qualified_expression_name): Try to resolve as
5631         an inner class access only if `decl' is a TYPE_DECL.
5632
5633 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5634
5635         * decl.c (classdollar_identifier_node): Initialize.
5636         * java-tree.h (enum java_tree_index): New entry
5637         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
5638         (classdollar_identifier_node): New macro.
5639         (ID_CLASSDOLLAR_P): Likewise.
5640         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
5641         (build_dot_class_method_invocation): Likewise.
5642         (find_applicable_accessible_methods_list): `class$' can't be
5643         inherited.
5644
5645 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
5646
5647         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
5648
5649 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5650
5651         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
5652         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
5653         gone.
5654
5655 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5656
5657         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
5658         outside of the `__U' sequence too.
5659         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
5660         sequence too.
5661
5662 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5663
5664         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
5665
5666 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5667
5668         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
5669         (JVGENMAIN_OBJS): Likewise.
5670         * java-tree.h (append_gpp_mangled_name): New prototype.
5671         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
5672         Removed cast calling `gcc_add_root.'
5673         * jvgenmain.c (mangle_obstack): New global, initialized.
5674         (main): Use it.
5675         (do_mangle_class): Constify local `ptr.'
5676         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
5677         append_gpp_mangle_name and update `count' if necessary.
5678         Use `mangle_obstack.'
5679         * mangle.c (append_unicode_mangled_name): Removed.
5680         (append_gpp_mangled_name): Likewise.
5681         (unicode_mangling_length): Likewise.
5682         (mangle_member_name): Return type set to `void.'
5683         (mangle_field_decl): Don't append `U' in escaped names.
5684         (mangle_method_decl): Likewise.
5685         (mangle_member_name): Just use `append_gpp_mangled_name.'
5686         * mangle_name.c: New file.
5687
5688 2001-02-07  Per Bothner  <per@bothner.com>
5689
5690         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
5691
5692         * check-init.c (check_init):  Don't call done_alternative after
5693         processing loop code, as a LOOP_EXPR never terminates normally.
5694
5695 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5696
5697         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
5698
5699 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5700
5701         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
5702         DECLs.
5703
5704 2001-02-06  Tom Tromey  <tromey@redhat.com>
5705
5706         * lex.c (java_new_lexer): Longer error message.
5707
5708 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
5709             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5710
5711         * typeck.c (build_prim_array_type): Added leading comment.
5712         (build_java_array_type): Moved locals out of
5713         block. Always create the `data' field, fixed alignment to match
5714         C++.
5715
5716 2001-02-04  Tom Tromey  <tromey@redhat.com>
5717
5718         * expr.c (java_lang_expand_expr): Don't bother recomputing
5719         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
5720         Fixes PR java/1866.
5721
5722 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5723
5724         * parse.y (process_imports): Save the original name of the import
5725         for better error report.
5726
5727 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
5728
5729         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
5730         of macros used when compiling jvspec.c.
5731         * jvspec.c (lang_specific_driver): Link with the shared
5732         libgcc by default.
5733
5734 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5735
5736         * check-init.c (check_init): Call internal_error instead of fatal.
5737         * expr.c (java_lang_expand_expr): Likewise.
5738         * jcf-parse.c (get_constant): Likewise.
5739         * mangle.c (java_mangle_decl): Likewise.
5740         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
5741         (operator_string): Likewise.
5742         * check-init.c (check_init): Call abort instead of fatal.
5743         * class.c (build_class_ref): Likewise.
5744         * constants.c (write_constant_pool): Likewise.
5745         * decl.c (start_java_method): Likewise.
5746         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
5747         (java_stack_dup, encode_newarray_type): Likewise.
5748         (build_java_array_length_access): Likewise.
5749         (build_java_check_indexed_type, expand_java_pushc): Likewise.
5750         (build_java_soft_divmod, build_invokeinterface): Likewise.
5751         * java-tree.h (INNER_CLASS_P): Likewise.
5752         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
5753         (give_name_to_class, get_class_constant): Likewise.
5754         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
5755         (find_constant_index, generate_bytecode_conditional): Likewise.
5756         (generate_bytecode_insns, perform_relocations): Likewise.
5757         * lex.c (java_unget_unicode, java_lex): Likewise.
5758         * mangle.c (mangle_type, mangle_record_type): Likewise.
5759         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
5760         (finish_mangling): Likewise.
5761         * parse.h (MARK_FINAL_PARMS): Likewise.
5762         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
5763         (obtain_incomplete_type, java_complete_class): Likewise.
5764         (java_check_regular_methods, java_complete_expand_method): Likewise.
5765         (cut_identifier_in_qualified, check_deprecation): Likewise.
5766         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
5767         (java_complete_lhs, lookup_name_in_blocks): Likewise.
5768         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
5769         * typeck.c (set_local_type, parse_signature_type): Likewise.
5770         (parse_signature_string, build_java_signature): Likewise;
5771         (set_java_signature): Likewise.
5772         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
5773         * class.c (add_method): Call fatal_error instead of fatal.
5774         (build_static_field_ref): Likewise.
5775         * expr.c (build_known_method_ref, expand_invoke): Likewise.
5776         * jcf-parse.c (get_constant, jcf_parse): Likewise.
5777         * lex.c (java_new_new_lexer): Likewise.
5778         * jv-scan.c (main): Likewise.
5779         (fatal_error): Renamed from fatal.
5780         * jcf-parse.c (yyparse): Call fatal_io_error instead of
5781         pfatal_with_name.
5782         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
5783         (yyparse): Likewise.
5784         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
5785         * lex.c (java_get_line_col): Likewise.
5786         * jcf-parse.c (load_class): Make errors non-fatal.
5787         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
5788
5789 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
5790
5791         * jvgenmain.c (class_mangling_suffix): Remove unused string.
5792         (error): Remove unused function.
5793         (main): Don't use "__attribute__ alias" on generated class symbol.
5794
5795 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5796
5797         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
5798         argument.
5799         * parse.y (finish_method_declaration): Code accounting for WFLed
5800         method DECL_NAMEs deleted.
5801         (check_abstract_method_definitions): Likewise.
5802         (resolve_type_during_patch): Layout resolved type.
5803         * typeck.c (lookup_do): Removed unused local.
5804
5805 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
5806
5807         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
5808         * decl.c (init_decl_processing): Use integer_minus_one_node, not
5809         integer_negative_one_node.
5810         * expr.c (build_java_binop): Likewise.
5811
5812 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
5813
5814         * zextract.c (read_zip_archive): Read file_offset before writing
5815         zipd and consequently clobbering the header contents.
5816
5817 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5818
5819         * Make-lang.in: Remove all dependencies on defaults.h.
5820         * decl.c: Don't include defaults.h.
5821         * expr.c: Likewise.
5822         * parse.y: Likewise.
5823
5824 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5825
5826         * ChangeLog (2001-01-21): Fixed typo.
5827         * class.c (layout_class_method): Code accounting for WFLed
5828         method DECL_NAMEs deleted.
5829         * constant.c (find_methodref_index): Likewise.
5830         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
5831         * java-tree.h (DECL_FUNCTION_WFL): New macro.
5832         (struct lang_decl): New field `wfl'.
5833         (java_get_real_method_name): Prototype deleted.
5834         * mangle.c (mangle_method_decl): Code accounting for WFLed
5835         method DECL_NAMEs deleted.
5836         * parse.h (GET_METHOD_NAME): Macro deleted.
5837         * parse.y (reset_method_name): Deleted.
5838         (method_header): Set DECL_FUNCTION_WFL.
5839         (check_abstract_method_header): Code accounting for WFLed method
5840         DECL_NAMEs deleted.
5841         (java_get_real_method_name): Deleted.
5842         (check_method_redefinition): Code accounting for WFLed method
5843         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
5844         (java_check_regular_methods): Likewise.
5845         (java_check_abstract_methods): Likewise.
5846         (java_expand_classes): Don't call `reset_method_name.'
5847         (search_applicable_method_list): Use DECL_NAMEs instead of
5848         GET_METHOD_NAME.
5849         * typeck.c (lookup_do): Code accounting for WFLed method
5850         DECL_NAMEs deleted.
5851
5852 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
5853
5854         * lex.c (java_read_char): Check for EOF from getc first.
5855
5856 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5857
5858         * class.c (layout_class): Don't lay the superclass out if it's
5859         already being laid out.
5860         * jcf-parse.c (handle_innerclass_attribute): New function.
5861         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
5862         handle_innerclasses_attribute.
5863         (jcf_parse): Don't load an innerclasses if it's already being
5864         laid out.
5865         * jcf-write.c (append_innerclass_attribute_entry): Static
5866         `anonymous_name' and its initialization deleted. `ocii' and `ini'
5867         to be zero for anonymous classes.
5868
5869 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5870
5871         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
5872         necessary.
5873         * jcf-parse.c (set_source_filename): Use
5874         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
5875
5876 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5877
5878         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
5879         gets a unique asm name.
5880
5881 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5882
5883         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
5884         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5885         if necessary.
5886         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
5887         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
5888         * parse.y (lookup_package_type_and_set_next): Deleted.
5889         (resolve_package): Removed unnecessary code.
5890         (find_applicable_accessible_methods_list): `finit$' can't be
5891         inherited.
5892         * verify.c (pop_argument_types): Added missing prototype.
5893
5894 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
5895
5896         * config-lang.in: Disable java by default.
5897
5898 2001-01-23  Tom Tromey  <tromey@redhat.com>
5899
5900         * gcj.texi (Copying): New node.
5901         Added copyright information.
5902
5903 2001-01-21  Per Bothner  <per@bothner.com>
5904
5905         Various fixes to allow compiling a compressed .jar/.zip archive.
5906         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
5907         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
5908         (struct ZipDirectory):  New field zipf points to owning ZipFile.
5909         * jcf.h (struct ZipDirectory):  Add forward declaration.
5910         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
5911         Remove seen_in_zip and zip_offset fields.
5912         (JCF_SEEN_IN_ZIP):  New macro.
5913         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
5914         * jcf-io.c:  Change all ZipFileCache to ZipFile.
5915         (read_zip_member):  New function.
5916         (open_in_zip):  Call read_zip_member.
5917         * jcf-parse.c (find_in_current_zip):  Remove function.
5918         (read_class):  Merge in find_in_current_zip functionality.
5919         Call read_zip_member if needed.
5920         (parse_zip_file_entries):  Use read_zip_member.
5921         (process_zip_dir):  Update for removed and added JCF fields.
5922         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
5923
5924 2001-01-21  Per Bothner  <per@bothner.com>
5925
5926         Minor optimization of static ggc roots.
5927         * jcf-parse.c (parse_roots):  New static field.
5928         (current_field, current_method, current_file_list):  Replace by macros
5929         naming fields of parse_roots.
5930         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
5931         * class.c (class_roots):  New static field.
5932         (registered_class, fields_ident, info_ident, class_list):
5933         New macros naming fields of parse_roots.
5934         (build_static_field_ref):  Don't register roots here.
5935         (layout_class):  Static field list replaced by macro class_list.
5936         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
5937         Initialize fields_ident and info_ident here.
5938
5939 2001-01-21  Per Bothner  <per@bothner.com>
5940
5941         * jcf-parse.c (ggc_mark_jcf):  New function.
5942         (init_jcf_parse):  Register current_jcf as ggc root.
5943
5944 2001-01-21  Per Bothner  <per@bothner.com>
5945
5946         * lang.c (put_decl_node):  Print method's name.
5947
5948 2001-01-21  Per Bothner  <per@bothner.com>
5949
5950         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
5951         (verify_jvm_instructions):  Use it, for better error messages on loads.
5952
5953 2001-01-21  Per Bothner  <per@bothner.com>
5954
5955         * verify.c (merge_type_state):  Still may have to merge even if
5956         LABEL_VERIFIED (label).
5957
5958 2001-01-21  Per Bothner  <per@bothner.com>
5959
5960         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
5961         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
5962
5963 2001-01-19  Per Bothner  <per@bothner.com>
5964
5965         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
5966         if expeting an interface type.  Refines Tom's change of 2000-09-12.
5967
5968 2001-01-18  Per Bothner  <per@bothner.com>
5969
5970         * gcj.texi (Input Options): Mention .java files.
5971
5972 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5973
5974         * lang-options.h (-Wunsupported-jdk11): Removed.
5975         * lang.c (flag_not_overriding): Deleted.
5976         (flag_static_local_jdk1_1): Likewise.
5977         (lang_W_options): Removed "unsupported-jdk11" entry.
5978         * parse.y (java_check_methods): Removed dead code.
5979
5980 2001-01-17  Tom Tromey  <tromey@redhat.com>
5981
5982         Changes suggested by Per Bothner:
5983         * gcj.texi (Input Options): Don't mention input files.
5984         (Code Generation): Updated --main information.
5985         (Invoking jcf-dump): Mention that --javap is incomplete.
5986         From Alexandre Petit-Bianco:
5987         (Warnings): Don't mention -Wunsupported-jdk11.
5988         My stuff:
5989         (Compatibility): Mention JDK 1.2-ness of libraries.
5990         (Resources): Mention resources used when writing gcj.
5991
5992 2001-01-17  Tom Tromey  <tromey@redhat.com>
5993
5994         * gcj.texi: New file.
5995         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
5996         (java.info): Depend on gcj.info.
5997         (java/gcj.dvi): New target.
5998         (java.dvi): Depend on gcj.dvi.
5999         (java.install-info): Wrote.
6000
6001 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
6002
6003         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6004         having called make_decl_rtl.
6005
6006 2001-01-14  Per Bothner  <per@bothner.com>
6007
6008         Various patches to emit better messages on verification errors.
6009         * expr.c (push_type_0):  Return error indication on stack overflow,
6010         instead of callinfg fatal.
6011         (push_type):  Now just call push_type_0 (nd fatal on overflow).
6012         (pop_type_0):  Return detailed error message (in a char** argument).
6013         (pop_type):  If pop_type_0 fails, print error message.
6014         (pop_argument_types):  Moved to verify.c.
6015         * verify.c (pop_argument_types):  Moved from expr.c.
6016         Return a (possible) error message, rather than void.
6017         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
6018         (verify_jvm_instruction):  Use new macros, improving error messages.
6019         For case OPCODE_astore use object_ptr_type_node.
6020         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
6021         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
6022
6023         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6024         constant, return body without wrapper.  (Improves constant folding.)
6025         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
6026
6027 2001-01-13  Per Bothner  <per@bothner.com>
6028
6029         * expr.c (expand_java_field_op):  Assigning to a final field outside
6030         an initializer does not violate JVM spec, so should be warning, not
6031         error.  (Sun's verifier does not complain - though MicroSoft's does.)
6032
6033 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
6034
6035         * gjavah.c (version), jcf-dump.c (version): Update copyright year
6036         to 2001.
6037
6038 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
6039
6040         * parse.y (resolve_expression_name): Permit instance variables from
6041         enclosing context in super constructor call.
6042         (resolve_qualified_expression_name): Permit enclosing class's qualified
6043         "this" in super constructor call.
6044
6045 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6046
6047         * class.c (build_utf8_ref): Remove last argument in call to
6048         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6049         (build_class_ref): Likewise.
6050         (build_static_field_ref): Likewise.
6051         (get_dispatch_table): Likewise.
6052         (layout_class_method): Likewise.
6053         (emit_register_classes): Likewise.
6054         * constants.c (build_constant_data_ref): Likewise.
6055         * decl.c (builtin_function): Likewise.
6056         (create_primitive_vtable): Likewise.
6057         * expr.c (build_known_method_def): Likewise.
6058         (build_jni_stub): Likewise.
6059         (java_lang_expand_expr): Likewise.
6060
6061 2001-01-10  Tom Tromey  <tromey@redhat.com>
6062
6063         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6064
6065 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6066
6067         * java-tree.h (lang_printable_name_wls): New prototype.
6068         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6069         rather than `current_class' to print type name. Don't prepend type
6070         names when printing constructor names.
6071         (lang_printable_name_wls): New function.
6072         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6073         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6074         * parse.y (patch_method_invocation): Message tuned for constructors.
6075         (not_accessible_p): Grant `private' access from within
6076         enclosing contexts.
6077
6078 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6079
6080         All files with updated copyright when applicable.
6081         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6082         * class.c (mangle_class_field): Function removed.
6083         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6084         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6085         (build_class_ref): Call `java_mangle_class_field' instead of
6086         `mangle_class_field.'
6087         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6088         (layout_class): Call `java_mangle_decl' instead of
6089         `mangle_static_field.'
6090         (cxx_keywords): Initialized static array moved to `lex.c.'
6091         (layout_class_method): Changed leading comment. Simplified to
6092         call `java_mangle_decl.' Local `ptr' moved in for loop body.
6093         * decl.c (lang_mark_tree): Mark field `package_list.'
6094         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6095         (struct lang_type): New field `package_list.'
6096         (unicode_mangling_length): Prototype removed.
6097         (append_gpp_mangled_name, append_gpp_mangled_classtype,
6098         emit_unicode_mangled_name): Likewise.
6099         (cxx_keyword_p): New prototype.
6100         (java_mangle_decl, java_mangle_class_field,
6101         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6102         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6103         `build_expr_wfl.'
6104         * jvgenmain.c (main_method_prefix): Global variable removed.
6105         (main_method_suffix): Likewise.
6106         (do_mangle_classname): New function.
6107         (main): Call it. Format changed to accommodate new mangling scheme.
6108         * lex.c: (utf8_cmp): Conditionally prototyped.
6109         (cxx_keywords): Moved from class.c, conditionally defined.
6110         (utf8_cmp, cxx_keyword_p): Likewise.
6111         * mangle.c (obstack.h, ggc.h): Included.
6112         (mangle_field_decl): New function.
6113         (mangle_method_decl, mangle_type, mangle_pointer_type,
6114         mangle_array_type, mangle_record_type,
6115         find_compression_pointer_match, find_compression_array_match,
6116         find_compression_record_match,
6117         find_compression_array_template_match, set_type_package_list,
6118         entry_match_pointer_p, emit_compression_string, init_mangling,
6119         finish_mangling, compression_table_add, mangle_member_name): Likewise.
6120         (mangle_obstack): New global.
6121         (MANGLE_RAW_STRING): New macro.
6122         (unicode_mangling_length): Turned static.
6123         (append_unicode_mangled_name): Renamed from
6124         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
6125         replaces `obstack', removed from the parameter list.
6126         (append_gpp_mangled_name): Turned static. `mangle_obstack'
6127         replaces parameter `obstack', removed from the parameter list. Call
6128         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6129         (append_gpp_mangled_classtype): Removed.
6130         (compression_table, compression_next): New static variables.
6131         * parse.y (temporary_obstack): Extern declaration removed.
6132
6133 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6134
6135         * parse.y (patch_binop): Compute missing type in error situations.
6136
6137 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6138
6139         * class.c (make_class_data): Push initial value for "arrayclass".
6140         * decl.c (init_decl_processing): Add new class field "arrayclass".
6141
6142 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6143
6144         From patha@softlab.ericsson.se:
6145         * parse.y (switch_label): Use build, not build1, to construct
6146         DEFAULT_EXPR.
6147
6148 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6149
6150         * lang.c (lang_decode_option): Change -MA to -MP.
6151         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6152         Update to new prototype; do quote targets.
6153         (jcf_dependency_write): Update.
6154
6155 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
6156
6157         Shorten primitive array allocation path:
6158         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6159         to create new primitive arrays.
6160         * expr.c (build_newarray): If generating native code, call
6161         soft_newarray_node with a reference to the primitive TYPE identifier
6162         instead of type_value.
6163
6164 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
6165
6166         Fix for PRs gcj/312 and gcj/253:
6167         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6168         dest if they arn't already.
6169         * class.c (layout_class): Call maybe_layout_super_class on
6170         superinterfaces also, but only if compiling from bytecode.
6171
6172         Fix for PR gcj/373:
6173         * parse.y (create_class): Set ACC_STATIC if class is declared in an
6174         interface.
6175
6176 2000-12-15  Tom Tromey  <tromey@redhat.com>
6177
6178         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6179         set.
6180
6181 2000-12-14  Andrew Haley  <aph@redhat.com>
6182
6183         * boehm.c (mark_reference_fields): Change test to correctly detect
6184         bitmap overflow.
6185
6186 2000-12-15  Andreas Jaeger  <aj@suse.de>
6187
6188         * config-lang.in (lang_dirs): Added.
6189
6190 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6191
6192         * parse.y (end_artificial_method_body): Fixed undefined behavior.
6193         Credits go to rth for finding it.
6194
6195 2000-12-13  Mike Stump  <mrs@wrs.com>
6196
6197         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6198
6199 2000-11-07  Tom Tromey  <tromey@cygnus.com>
6200
6201         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6202         * lex.c (java_ignorable_control_p): Removed.
6203         (java_letter_or_digit_p): Removed.
6204         (java_start_char_p): New function.
6205         (java_read_char): Return `int', not `unicode_t'.  Changed
6206         callers.
6207         (java_read_unicode): Likewise.
6208         (java_read_unicode_collapsing_terminators): Likewise.
6209         (java_get_unicode): Likewise.
6210         (java_new_lexer): Initialize hit_eof.
6211         (java_parse_end_comment): Take `int' argument.
6212         (java_parse_doc_section): Likewise.
6213         (java_parse_escape_sequence): Don't allow backlash-newline.
6214         Return `int'.
6215         * lex.h (JAVA_DIGIT_P): Removed.
6216         (_JAVA_LETTER_OR_DIGIT_P): Removed.
6217         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6218         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6219         (JAVA_PART_CHAR_P): New macro.
6220         (UEOF): Now -1.
6221         (JAVA_CHAR_ERROR): Now -2.
6222         (java_lexer): New field `hit_eof'.
6223         * chartables.h: New file.
6224         * gen-table.pl: new file.
6225
6226 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6227             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6228
6229         * parse.y (java_complete_lhs): Only allow compound assignment of
6230         reference type if type is String.
6231
6232 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6233
6234         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6235         jcf-path.c: Likewise.
6236
6237 2000-12-09  Anthony Green  <green@redhat.com>
6238
6239         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6240         filestart and filename_length as int values.
6241
6242 2000-12-07  Mo DeJong  <mdejong@redhat.com>
6243
6244         * jcf-io.c (find_class): Correct the logic that tests to see if a
6245         .java file is newer than its .class file. The compiler was
6246         incorrectly printing a warning when file mod times were equal.
6247
6248 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
6249
6250         * jvgenmain.c: Use ISPRINT not isascii.
6251
6252 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6253
6254         * parse.y (end_artificial_method_body): Fixed typo.
6255
6256 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6257
6258         * parse.y (patch_method_invocation): Pick the correct enclosing
6259         context when creating inner class instances.
6260         Fixes gcj/332.
6261
6262 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
6263
6264         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6265         Update copyright year to 2000.
6266
6267 2000-11-23  Anthony Green  <green@redhat.com>
6268
6269         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6270         Move current_file_list out of yyparse and make it static.
6271
6272         * expr.c: Declare quick_stack and tree_list_free_list as static
6273         (init_expr_processing): Register quick_stack and
6274         tree_list_free_list roots.
6275
6276 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6277
6278         * parse.y (build_outer_field_access): New local `decl_ctx', use
6279         it. Check for field's context and current class immediate outer
6280         context inheritance.
6281         (outer_field_access_p): Consider fields inherited from the last
6282         enclosing context.
6283         (build_access_to_thisn): Stop at the last enclosing context if
6284         necessary.
6285         Fixes gcj/367.
6286
6287 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
6288
6289         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6290
6291 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
6292
6293         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6294         scratch buffer.
6295
6296 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6297
6298         * jv-scan.c (help): Document --complexity.
6299         (options): Added --complexity.
6300         (flag_complexity): New global.
6301         (main): Call `report'.
6302         * parse-scan.y (complexity): New global.
6303         (if_then_statement, if_then_else_statement,
6304         if_then_else_statement_nsi, switch_block_statement_group,
6305         while_expression, do_statement, for_begin, continue_statement,
6306         throw_statement, catch_clause, finally, method_invocation,
6307         conditional_and_expression, conditional_or_expression,
6308         conditional_expression): Update complexity.
6309         (reset_report): Reset complexity.
6310         (report): New function.
6311
6312 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6313
6314         * lex.c (yylex): Added STRICT_TK case.
6315         * parse.y (STRICT_TK): Added.
6316         * parse-scan.y (STRICT_TK): Added.
6317         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6318         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
6319         file.
6320         * keyword.h: Rebuilt.
6321         * keyword.gperf (strictfp): Added.
6322
6323 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6324
6325         * lex.c (yylex): Recognize floating point constants with leading
6326         0.
6327
6328 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6329
6330         * java-tree.h (cyclic_inheritance_report): Constify.
6331         * parse.y (cyclic_inheritance_report): Likewise.
6332
6333 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6334
6335         * parse.y (goal): Remove call to ggc_add_string_root.
6336
6337 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6338
6339         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6340         Create string in scratch buffer, then pass to build_string.
6341
6342 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6343
6344         * parse.y (issue_warning_error_from_context): Add
6345         ATTRIBUTE_PRINTF.
6346
6347 2000-11-11  Anthony Green  <green@redhat.com>
6348
6349         * jcf-parse.c (process_zip_dir): Add finput parameter.
6350         (jcf_figure_file_type): Call process_zip_dir with appropriate
6351         argument.
6352
6353 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6354
6355         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6356         * jcf-parse.c (jcf_figure_file_type): Likewise.
6357
6358 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6359
6360         * parse.y (create_new_parser_context): Use memset () instead of
6361         bzero ().
6362
6363 2000-11-08  Tom Tromey  <tromey@cygnus.com>
6364
6365         * gjavah.c (process_file): Only include gcj/cni.h when generating
6366         CNI stubs.
6367
6368 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6369
6370         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6371         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6372         instead of bzero ().
6373
6374 2000-11-05  Tom Tromey  <tromey@cygnus.com>
6375
6376         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6377         * lex.c (IS_ZERO): New define.
6378         (java_perform_atof): Error on floating point underflow.
6379
6380 2000-11-04  Tom Tromey  <tromey@cygnus.com>
6381
6382         * lex.c (java_parse_escape_sequence): Only read two octal
6383         characters if the first one is greater than 3.  Don't allow
6384         "octal" numbers to include the digits 8 or 9.
6385
6386 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6387
6388         * Make-lang.in (java.distdir): Remove.
6389
6390 2000-11-03  Tom Tromey  <tromey@cygnus.com>
6391
6392         * Make-lang.in (java.dvi): New target.
6393         Partial fix for PR other/567.
6394
6395         * lang-options.h: Mention -Wout-of-date.
6396         * jcf-dump.c (flag_newer): New global.
6397         * gjavah.c (flag_newer): New global.
6398         * jcf-io.c (find_class): Only warn when flag_newer set.
6399         * lang.c (flag_newer): New global.
6400         (struct string_option): New declaration.
6401         (lang_W_options): New global.
6402         (process_option_with_no): New function.
6403         (lang_decode_option): Use it.
6404
6405         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6406         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6407         `$'.
6408
6409         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6410         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6411         * lex.c (java_read_unicode): Removed `term_context' argument.
6412         Recognize any number of `u' in `\u'.
6413         (java_read_unicode_collapsing_terminators): New function.
6414         (java_get_unicode): Use it.
6415         (java_lineterminator): Removed.
6416         (yylex): Produce error if character literal is newline or single
6417         quote.  Return if eof found in middle of `//' comment.  EOF in
6418         `//' comment is only an error if pedantic.
6419         (java_ignorable_control_p): New function.
6420         (java_parse_end_comment): Return if eof found in middle of
6421         comment.
6422         Include flags.h.
6423         * jv-scan.c (pedantic): New global.
6424
6425 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6426
6427         * parse.y (outer_field_access_p): Inherited fields aren't
6428         consider outer fields.
6429         (maybe_build_thisn_access_method): Use
6430         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6431         (resolve_expression_name): Trigger an error if a static field
6432         is being accessed as an outer field.
6433
6434 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6435
6436         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6437         Fixes gcj/365.
6438
6439 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6440
6441         * Make-lang.in: Move all build rules here from Makefile.in,
6442         adapt to new context.  Wrap all rules that change the current
6443         directory in parentheses.  Expunge all references to $(P).
6444         When one command depends on another and they're run all at
6445         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6446         all object-file generation rules.  Delete obsolete variables.
6447
6448         * Makefile.in: Delete.
6449         * config-lang.in: Delete outputs= line.
6450
6451 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6452
6453         * parse.y (patch_method_invocation): NULLify this_arg when already
6454         inserted.
6455         (maybe_use_access_method): Handle call to methods unrelated to the
6456         current class. Fixed comment.
6457         Fixes gcj/361.
6458
6459 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6460
6461        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6462        scope.
6463
6464 2000-10-24  Tom Tromey  <tromey@cygnus.com>
6465
6466         * lex.c (java_new_lexer): Initialize new fields.  Work around
6467         broken iconv() implementations.
6468         (java_read_char): Swap bytes if required.  Use fallback decoder if
6469         required.
6470         (byteswap_init, need_byteswap): New globals.
6471         (java_destroy_lexer): Only close iconv handle if it is in use.
6472         * lex.h (java_lexer): New fields read_anything, byte_swap,
6473         use_fallback.
6474         Made out_buffer unsigned.
6475
6476 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6477
6478         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6479         where an enclosing context can be set on the jdep.
6480         (do_resolve_class): Fixed identation.
6481
6482 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6483
6484         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6485
6486         * jcf-reader.c (peek_attribute, skip_attribute): Only define
6487         when requested.
6488
6489         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6490
6491         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6492
6493 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6494
6495         * jcf-write.c (OP1): Update `last_bc'.
6496         (struct jcf_block): Fixed indentation and typo in comments.  New
6497         field `last_bc'.
6498         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6499         follows `monitorenter'.
6500         * parse.y (patch_synchronized_statement): New local `tmp'. Call
6501         `patch_string'.
6502         Fixes gcj/232.
6503
6504 2000-10-16  Tom Tromey  <tromey@cygnus.com>
6505
6506         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6507         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6508         * lang-options.h: Added -MA, -MT, -MF..
6509         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6510         (DEPEND_TARGET_SET): New macro.
6511         (DEPEND_FILE_ALREADY_SET): Likewise.
6512         (init_parse): Handle new flags.
6513         * jcf.h (jcf_dependency_print_dummies): Declare.
6514         * Make-lang.in (s-java): Added mkdeps.o.
6515         * Makefile.in (BACKEND): Added mkdeps.o.
6516         (../gcjh$(exeext)): Added mkdeps.o.
6517         (../jcf-dump$(exeext)): Added mkdeps.o.
6518         * jcf-depend.c: Include mkdeps.h.
6519         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6520         add_entry): Removed.
6521         (jcf_dependency_reset): Rewrote.
6522         (dependencies): New global.
6523         (jcf_dependency_set_target): Rewrote.
6524         (jcf_dependency_add_target): Likewise.
6525         (jcf_dependency_add_file): Likewise.
6526         (munge): Removed.
6527         (print_ents): Removed.
6528         (jcf_dependency_write): Rewrote.
6529         (print_dummies): New global.
6530         (jcf_dependency_print_dummies): New function
6531         (jcf_dependency_write): Call deps_dummy_targets if required.
6532
6533 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6534
6535         * gjavah.c (add_class_decl): Removed unused variables `tname',
6536         `tlen' and `name_index'.
6537         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6538         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6539         in `wfl_operator' with value.
6540         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6541         (jcf_figure_file_type): Fixed identation.
6542         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6543         * parse.y (analyze_clinit_body): New function.
6544         (static_initializer:): Reset `current_static_block'.
6545         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6546         `wfl_operator' with new value.
6547         (lookup_cl): Use EXPR_WFL_FILENAME.
6548         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6549         analyze_clinit_body.
6550         (build_outer_field_access): Access to this$<n> built from
6551         current_class, not its outer context.
6552         (build_access_to_thisn): Fixed leading comment. Tidied things up.
6553         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6554         (patch_method_invocation): Use `is_static_flag' when already
6555         initialized.
6556         (patch_newarray): Removed assignment in ternary operator.
6557
6558 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6559
6560         * except.c (free_eh_ranges): Don't free `whole_range'.
6561
6562 2000-10-15  Anthony Green  <green@redhat.com>
6563
6564         * decl.c (init_decl_processing): Call init_class_processing before
6565         anything else.
6566
6567 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6568
6569         * check-init.c (check_init): Fixed leading comment. Use
6570         LOCAL_FINAL_P.
6571         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6572         (give_name_to_locals): Likewise.
6573         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6574         fields in lang_decl_var.
6575         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6576         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6577         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
6578         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
6579         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
6580         (LOCAL_FINAL): Rewritten.
6581         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
6582         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
6583         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
6584         `init_final' fields.
6585         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
6586         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
6587         (TYPE_HAS_FINAL_VARIABLE): New macro.
6588         (struct lang_type): Added `afv' field.
6589         * parse.y (check_static_final_variable_assignment_flag): New function.
6590         (reset_static_final_variable_assignment_flag): Likewise.
6591         (check_final_variable_local_assignment_flag): Likewise.
6592         (reset_final_variable_local_assignment_flag): Likewise.
6593         (check_final_variable_indirect_assignment): Likewise.
6594         (check_final_variable_global_assignment_flag): Likewise.
6595         (add_inner_class_fields): Use LOCAL_FINAL_P.
6596         (register_fields): Handle local finals and final variables.
6597         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
6598         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6599         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6600         on local finals.
6601         (java_complete_expand_methods): Loop to set
6602         TYPE_HAS_FINAL_VARIABLE. Call
6603         `reset_final_variable_local_assignment_flag' and
6604         `check_final_variable_local_assignment_flag' accordingly before
6605         and after constructor expansion. Call
6606         `reset_static_final_variable_assignment_flag'
6607         before expanding <clinit> and after call
6608         `check_static_final_variable_assignment_flag' if the
6609         current_class isn't an interface. After all methods have been
6610         expanded, call `check_final_variable_global_assignment_flag' and
6611         `check_static_final_variable_assignment_flag' if the current class
6612         is an interface.
6613         (maybe_yank_clinit): Fixed typo in comment.
6614         (build_outer_field_access_methods): Removed old sanity check. Use
6615         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6616         Don't create access methods for finals.
6617         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
6618         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
6619         existing DECL_INIT has been processed.
6620         (java_complete_lhs): Likewise.
6621         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
6622         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
6623         logic.
6624         (patch_assignment): Use LOCAL_FINAL_P.
6625         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
6626         DECL_INITIAL is nullified.
6627         Fixes gcj/163.
6628
6629 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6630
6631         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
6632
6633         * Makefile.in (parse.c, parse-scan.c): Likewise.
6634
6635 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6636
6637         * class.c (temporary_obstack): Remove.
6638         (make_class): Don't mess with obstascks.
6639         (push_class): Likewise.
6640         (set_super_info): Likewise.
6641         (add_method_1): Likewise.
6642         (add_method): Likewise.
6643         (add_field): Likewise.
6644         (build_utf8_ref): Likewise.
6645         (build_class_ref): Likewise.
6646         (build_static_field_ref): Likewise.
6647         (finish_class): Likewise.
6648         (push_super_field): Likewise.
6649         (layout_class): Likewise.
6650         (layout_class_methods): Likewise.
6651         (init_class_processing): Likewise.
6652         * constants.c (get_tag_node): Likewise.
6653         (build_constant_data_ref): Likewise.
6654         * decl.c (ggc_p): Remove.
6655         (copy_lang_decl): Use ggc_alloc.
6656         (complete_start_java_method): Don't mess with obstacks.
6657         (start_java_method): Likewise.
6658         (end_java_method): Likewise.
6659         * except.c (link_handler): Use xmalloc.
6660         (free_eh_ranges): New function.
6661         (method_init_exceptions): Use it.
6662         (add_handler): Use xmalloc.
6663         (expand_start_java_handler): Don't mess with obstacks.
6664         (prepare_eh_table_type): Likewise.
6665         (expand_end_java_handler): Likewise.
6666         * expr.c (push_value): Likewise.
6667         (create_label_decl): Likewise.
6668         (build_jni_stub): Likewise.
6669         (java_lang_expand_expr): Likewise.
6670         (note_instructions): Use xrealloc.
6671         (java_push_constant_from_pool): Don't mess with obstacks.
6672         (process_jvm_instruction): Likewise.
6673         * java-tree.h (cyclic_inheritance_report): Remove duplicate
6674         declaration.
6675         * jcf-parse.c (get_constant): Don't mess with obstacks.
6676         (read_class): Likewise.
6677         (jcf_parse): Likewise.
6678         * lex.c (expression_obstack): Remove.
6679         (java_lex): Don't use obstack_free.
6680         * parse.h (exit_java_complete_class): Don't mess with obstacks.
6681         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
6682         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
6683         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
6684         * parse.y (gaol): Add more GC roots.
6685         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
6686         (lookup_field_wrapper): Likewise.
6687         (obtain_incomplete_type): Don't mess with obstacks.
6688         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
6689         macros.
6690         (craft_constructor): Don't mess with obstacks.
6691         (safe_layout_class): Likewise.
6692         (java_complete_class): Likewise.
6693         (source_end_java_method): Likewise.
6694         (build_outer_field_access_methods): Likewise.
6695         (build_outer_method_access_method): Likewise.
6696         (maybe_build_thisn_access_method): Likewise.
6697         (build_dot_class_method_invocation): Likewise.
6698         (java_complete_tree): Likewise.
6699         (java_complete_lhs): Likewise.
6700         (do_merge_string_cste): Likewise.
6701         (patch_string_cst): Likewise.
6702         (array_constructor_check_entry): Likewise.
6703         * typeck.c (build_java_array_type): Likewise.
6704         (parse_signature_string): Likewise.
6705         (build_java_signature): Likewise.
6706
6707 2000-10-12  Tom Tromey  <tromey@cygnus.com>
6708
6709         Fix for PR gcj/356:
6710         * gjavah.c (add_class_decl): Don't special-case inner classes.
6711         (add_namelet): Likewise.
6712
6713 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
6714
6715         * java-tree.h: Constify current_encoding.
6716         * lang.c: Constify current_encoding.
6717
6718 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
6719
6720         * jvgenmain.c (class_mangling_suffix): Omit `.'.
6721         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
6722
6723 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6724
6725         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
6726         patch. Fixes gcj/340.
6727
6728 2000-10-10  Tom Tromey  <tromey@cygnus.com>
6729
6730         * lex.c (java_new_lexer): Initialize out_first and out_last
6731         fields.
6732         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
6733
6734 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6735
6736         * parse.y (pop_current_osb): New function.
6737         (array_type:): Use `dims:', changed actions
6738         accordingly. Suggested by Anthony Green.
6739         (array_creation_expression:): Used pop_current_osb.
6740         (cast_expression:): Likewise.
6741         (search_applicable_method_list): Fixed indentation.
6742
6743 2000-10-08  Anthony Green  <green@redhat.com>
6744
6745         * parse.y (array_type_literal): Remove production.
6746         (type_literals): Refer to array_type, not array_type_literal.
6747
6748 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6749
6750         Patch contributed by Corey Minyard.
6751         * decl.c (check_local_named_variable): New function.
6752         (tree check_local_unnamed_variable): Likewise.
6753         (find_local_variable): Splitted. Call check_local_{un}named_variable.
6754
6755 2000-10-07  Anthony Green  <green@redhat.com>
6756
6757         * class.c (layout_class): Handle case where superclass can't be
6758         layed out yet.
6759
6760 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6761
6762         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
6763         gperf.
6764
6765 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6766
6767         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
6768         * jvgenmain.c (class_mangling_prefix): Removed.
6769         (class_mangling_suffix): New global.
6770         (main): Use it.
6771         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
6772         `$'.
6773         (print_method_info): Handle overrides for static and final
6774         methods.
6775         (process_file): Generate declaration for class object field.
6776         * class.c (cxx_keywords): New array.
6777         (utf8_cmp): New function.
6778         (cxx_keyword_p): New function.
6779         (layout_class_method): Mangle C++ keywords by appending `$'.
6780         (mangle_field): New function.
6781         (mangle_class_field): Use mangle_field.  Mangle class name as
6782         `class$'.
6783         (mangle_static_field): Use mangle_field.
6784
6785 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6786
6787         * decl.c (find_local_variable): Removed uncessary type check and
6788         fixed range check typo. From Corey Minyard.
6789
6790 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6791
6792         * decl.c (give_name_to_locals): New local `code_offset'. Call
6793         `maybe_adjust_start_pc'.
6794         * expr.c (note_instructions): New function.
6795         (expand_byte_code): Don't collect insn starts here.
6796         (peek_opcode_at_pc): New function.
6797         (maybe_adjust_start_pc): Likewise.
6798         * java-tree.h (maybe_adjust_start_pc): Declare.
6799         (note_instructions): Likewise.
6800         * jcf-parse.c (parse_class_file): Call `note_instructions'.
6801
6802 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6803
6804         * parse.y (field_access:): Fixed indentation.
6805         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
6806
6807 2000-09-07  Tom Tromey  <tromey@cygnus.com>
6808
6809         Fix for PR gcj/307:
6810         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
6811         JPRIMITIVE_TYPE_P, for arithmetic operators.
6812         (patch_method_invocation): Indentation fix.
6813         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
6814         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
6815         (do_unary_numeric_promotion): Cleaned up code.
6816         (valid_cast_to_p): Handle boolean correctly.
6817
6818 2000-09-27  Tom Tromey  <tromey@cygnus.com>
6819
6820         * lex.c (java_read_unicode): Reset bs_count when finished with
6821         `\u' sequence.
6822
6823 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6824
6825         Convert to GC.
6826         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
6827         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
6828         (typeck.o): Depend on ggc.h.
6829         * class.c (add_method_1): Use GC functions for allocation.
6830         (init_class_processing): Register roots.
6831         * decl.c (ggc_p): Set to 1.
6832         (pending_local_decls): Make it static.
6833         (push_jvm_slot): Use GC functions for allocation.
6834         (init_decl_processing): Register roots.
6835         (give_name_to_locals): Use GC functions for allocation.
6836         (lang_mark_tree): New function.
6837         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
6838         functions for allocation.
6839         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
6840         * lex.c (java_lex): Use build_string, rather than replicating it
6841         inline.
6842         * parse.y (goal): Add more roots.
6843         (mark_parser_ctxt): New function.
6844         * typeck.c: Include ggc.h.
6845
6846 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6847
6848         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
6849         contains something else than MODIFY_EXPR.
6850
6851 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
6852
6853         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
6854         * Makefile.in (parse.o): Depend on ggc.h.
6855         (class.o): Likewise.
6856         (constants.o): Likewise.
6857         (decl.o): Likewise.
6858         (expr.o): Likewise.
6859         (jcf-parse.o): Likewise.
6860         (jcf-write.o): Likewise.
6861         (mangle.o): Likewise.
6862         * class.c: Include ggc.h.
6863         (build_static_field_ref): Register GC roots.
6864         (layout_class): Likewise.
6865         (init_class_processing): Likewise.
6866         * constants.c: Include ggc.h.
6867         (current_constant_pool_data_ref): Remove.
6868         (tag_nodes): Move it to ...
6869         (get_tag_node): ... here.  Register GC roots.
6870         * decl.c: Include ggc.h.  Remove many global tree definitions.
6871         (throw_node): Define.
6872         (java_global_trees): Likewise.
6873         (predef_filenames): Make the size a constant.
6874         (init_decl_processing): Adjust accordingly.
6875         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
6876         * expr.c: Include ggc.h.
6877         (init_expr_processing): Register GC roots.
6878         (build_invokeinterface): Likewise.
6879         * java-tree.h: Replace extern tree declarations with macros.
6880         (java_global_trees): New variable.
6881         (java_tree_index): New enumeration.
6882         (init_jcf_parse): Declare.
6883         * jcf-parse.c: Include ggc.h.
6884         (current_class): Remove declaration.
6885         (main_class): Likewise.
6886         (all_class_list): Likewise.
6887         (predefined_filename_p): Adjust for constant size of
6888         predef_filenames.
6889         (init_jcf_parse): New function.
6890         * jcf-write.c: Include ggc.h.
6891         (generate_classfile): Register GC roots.
6892         (append_synthetic_attribute): Likewise.
6893         (append_innerclass_attribute_entry): Likewise.
6894         * lang.c: Include ggc.h.
6895         (lang_print_error): Register GC roots.
6896         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
6897         with macros.
6898         * parse.y: Include ggc.h.
6899         (wfl_operator): Remove.
6900         (goal): Register GC roots.
6901         (java_pop_parser_context): Adjust for new field names.
6902         (java_parser_context_save_global): Likewse.
6903         (java_parser_context_restore_global): Likewise.
6904         (java_parser_context_suspend): Likewise.
6905         (java_parser_context_resume): Likewise.
6906         (verify_constructor_circularity): Register GC roots.
6907         (lookup_cl): Likewise.
6908         (java_reorder_fields): Likewise.
6909         (build_current_this): Likewise.
6910         (class_in_current_package): Likewise.
6911         (argument_types_convertible): Likewise.
6912         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
6913
6914 2000-09-14  Tom Tromey  <tromey@cygnus.com>
6915
6916         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
6917
6918 2000-09-13  Tom Tromey  <tromey@cygnus.com>
6919
6920         * jcf-parse.c: Include <locale.h>.
6921         * jv-scan.c: Include <locale.h>.
6922
6923 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6924
6925         * expr.c (pop_type_0): Return `Object' if trying to merge two
6926         interface types.
6927         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
6928         interface types; `Object' is always a valid supertype.
6929
6930 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6931
6932         Fix for PR gcj/33:
6933         * jv-scan.c (help): Document --encoding.
6934         (options): Added `encoding' entry.
6935         (OPT_ENCODING): New define.
6936         (main): Handle --encoding.
6937         Include <langinfo.h> if nl_langinfo exists.
6938         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
6939         --encoding.
6940         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
6941         (parse_source_file): Correctly call java_init_lex.  Added `finput'
6942         argument.  Use nl_langinfo to determine default encoding.
6943         * java-tree.h (current_encoding): Declare.
6944         * parse.y (java_parser_context_restore_global): Don't restore
6945         `finput'.
6946         (java_parser_context_save_global): Don't set `finput' field.
6947         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
6948         if required.
6949         * lang.c (current_encoding): New global.
6950         (lang_decode_option): Recognize `-fencoding='.
6951         (finish_parse): Don't close finput.
6952         * parse.h (struct parser_ctxt): Removed `finput' and
6953         `unget_utf8_value' fields.  Added `lexer' field.
6954         (java_init_lex): Fixed declaration.
6955         * lex.c (java_new_lexer): New function.
6956         (java_destroy_lexer): Likewise.
6957         (java_read_char): Added `lex' argument.  Handle iconv case.
6958         (java_read_unicode): Added `lex' argument.  Count backslashes in
6959         lexer structure.
6960         (java_init_lex): Added `finput' and `encoding' arguments.  Set
6961         `lexer' field in ctxp.
6962         (BAD_UTF8_VALUE): Removed.
6963         (java_lex): Handle seeing UEOF in the middle of a string literal.
6964         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
6965         (java_lexer): New structure.
6966         (UNGETC): Removed.
6967         (GETC): Removed.
6968         (DEFAULT_ENCODING): New define.
6969         (java_destroy_lexer): Declare.
6970
6971 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6972
6973         Fix for PR gcj/343:
6974         * lex.c (java_init_lex): Initialize java_io_serializable.
6975         * parse.y (java_io_serializable): New global.
6976         (valid_ref_assignconv_cast_p): An array can be cast to
6977         serializable.
6978
6979 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6980
6981         * decl.c, expr.c: Include defaults.h if not already included.
6982         Don't define the *_TYPE_SIZE macros.
6983
6984 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
6985
6986         * typeck.c (build_java_array_type): Correct first parameter
6987         in ADJUST_FIELD_ALIGN invocation.
6988
6989 2000-09-06  Tom Tromey  <tromey@cygnus.com>
6990
6991         * lang-specs.h: Also recognize `-femit-class-files'.
6992
6993 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6994
6995         * verify.c (merge_types): Load the types to merge if necessary.
6996
6997 2000-09-02  Anthony Green  <green@redhat.com>
6998
6999         * jcf-io.c: Include zlib.h.
7000         (open_in_zip): Read compressed class file archives.
7001         * zipfile.h (ZipDirectory): Add uncompressed_size and
7002         compression_method fields.
7003         * zextract.c (read_zip_archive): Collect file compression info.
7004
7005 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
7006
7007         * parse.y (do_resolve_class): Also explore superclasses of
7008         intermediate enclosing contexts when searching for inner classes.
7009
7010 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7011
7012         * parse.y (variable_declarator_id:): Better error message.
7013         (expression_statement:): Use YYNOT_TWICE.
7014         (cast_expression:): Likewise.
7015         (assignment:): Likewise.
7016
7017 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7018
7019         * parse.y (do_merge_string_cste): New locals. Create new
7020         STRING_CSTs each time, use memcpy. Fixes gcj/311.
7021
7022 2000-08-07  Hans Boehm  <boehm@acm.org>
7023
7024         * boehm.c (mark_reference_fields): Set marking bits for all words in
7025         a multiple-word record.
7026         (get_boehm_type_descriptor): Use the procedure marking descriptor for
7027         java.lang.Class.
7028
7029 2000-08-31  Mike Stump  <mrs@wrs.com>
7030
7031         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7032         jcf-dump$(exeext)): Make parallel safe.
7033
7034 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7035
7036         * jcf-parse.c (set_source_filename): Constify a char *.
7037         * jcf-write.c (append_innerclasses_attribute,
7038         make_class_file_name): Constify a char *.  Don't recycle a
7039         variable for an unrelated purpose.
7040         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7041         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7042
7043 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7044
7045         * expr.c (can_widen_reference_to): Fixed indentation.
7046         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7047         * parse.y: `finit$' replaces `$finit$' in comments.
7048         (try_builtin_assignconv): Fixed leading comment.
7049
7050 2000-08-25  Greg McGary  <greg@mcgary.org>
7051
7052         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7053
7054 2000-08-24  Greg McGary  <greg@mcgary.org>
7055
7056         * lang.c (lang_decode_option): Use ARRAY_SIZE.
7057         * parse.y (BINOP_LOOKUP): Likewise.
7058
7059 2000-08-22  Andrew Haley  <aph@cygnus.com>
7060
7061         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7062         sign extending. Fixes gcj/321.
7063         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7064         combining to make a jlong. Fixes gcj/321.
7065
7066 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7067
7068         * lang-specs.h: Do not process -o or run the assembler if
7069         -fsyntax-only.
7070
7071 2000-08-16  Andrew Haley  <aph@cygnus.com>
7072
7073         * typeck.c (build_java_array_type): Rewrite code to do array
7074         alignment.  Take into account back-end macros when aligning array
7075         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7076         user to set alignment. Fixes gcj/252 and 160.
7077
7078 2000-08-09  Tom Tromey  <tromey@cygnus.com>
7079
7080         * parse.y (check_abstract_method_definitions): Now return `int'.
7081         Check implemented interfaces.  Fixes PR gcj/305.
7082
7083         * parse.y (patch_switch_statement): Disallow `long' in switch
7084         expressions.  Fixes PR gcj/310.
7085
7086 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7087
7088         * decl.c (finit_leg_identifier_node): New global.
7089         (init_decl_processing): Use `finit$' to initialize
7090         finit_identifier_node. Use `$finit$' to initialize
7091         finit_leg_identifier_node.
7092         * expr.c (expand_java_field_op): Use ID_FINIT_P.
7093         * java-tree.h (finit_identifier_node): Changed attached comment.
7094         (finit_leg_identifier_node): New declaration.
7095         (ID_FINIT_P): Take finit_identifier_node and
7096         finit_leg_identifier_node into account. This is a backward
7097         compatibility hack.
7098
7099 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7100
7101         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7102         Jan 6 2000 patch.
7103         (generate_bytecode_insns): Check `nargs' before emitting it.
7104         * verify.c (merge_type_state): Fixed typo.
7105         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7106         generate_bytecode_{conditional,insns}.
7107
7108 2000-08-13  Anthony Green  <green@redhat.com>
7109
7110         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7111         for -pg builds).
7112
7113 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7114
7115         * class.c (maybe_layout_super_class): Fixed indentation.
7116         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7117         (java_check_methods): New function declaration.
7118         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7119         instead of `str_ptr'.
7120         * jcf-write.c (generate_bytecode_insns): Emit number the of args
7121         of a `invokeinterface' at the right time.
7122         * parse.h (WFL_STRIP_BRACKET): New macro.
7123         (SET_TYPE_FOR_RESOLUTION): Use it.
7124         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7125         (check_class_interface_creation): Don't check for cross package
7126         innerclass name clashes.
7127         (method_header): Behave properly if MDECL is `error_mark_node'.
7128         (method_declarator): Return `error_mark_node' if bogus current
7129         class.
7130         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7131         (resolve_and_layout): New local `decl_type', set and used. Call
7132         java_check_methods.
7133         (java_check_methods): New method.
7134         (java_layout_classes): Use it.
7135         (resolve_qualified_expression_name): No EH check necessary in
7136         access$<n>.
7137         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7138         `case' statement.
7139         (patch_assignment): Set DECL_INITIAL on integral final local.
7140
7141 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7142
7143         * java-tree.h (flag_extraneous_semicolon): New extern.
7144         * lang-options.h: (-Wextraneous-semicolon): New option.
7145         * lang.c (flag_redundant): Fixed typo in leading comment.
7146         (flag_extraneous_semicolon): New global.
7147         (lang_decode_option): Set `flag_extraneous_semicolon' when
7148         -Wall. Decode `-Wextraneous-semicolon'.
7149         * parse.y (type_declaration:): Removed `SC_TK' hack, added
7150         `empty_statement' rule.
7151         (class_body_declaration): Likewise.
7152         (method_body:): Accept `;' as a method body.
7153         (static_initializer:): Removed `SC_TK' hack.
7154         (constructor_block_end:): Likewise.
7155         (empty_statement:): Report deprecated empty declaration. Fixes
7156         gcj/295
7157
7158 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7159
7160         * parse.y (build_dot_class_method_invocation): Changed parameter
7161         name to `type'. Build signature from `type' and convert it to a
7162         STRING_CST if it's an array.
7163         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7164         to use `ref_type' directly.
7165
7166 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
7167
7168         * lang-options.h: Added a comma after the last element to avoid
7169         syntax errors when other languages define additional options.
7170
7171 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7172
7173         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7174         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7175         (jc1): Link with $(BACKEND).
7176         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7177
7178 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7179
7180         * jvspec.c: Adjust type of second argument to
7181         lang_specific_driver, and update code as necessary.
7182
7183         * class.c (build_dtable_decl): Initialize dummy.
7184
7185 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7186
7187         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7188         method bodies not to rule out discarding `<clinit>'; don't use
7189         <clinit> to initialize static fields with constant initializers.
7190
7191 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7192
7193         * gjavah.c (print_method_info): Added `synth' parameter. Skip
7194         synthetic methods.
7195         (method_synthetic): New global.
7196         (HANDLE_METHOD): Recognize synthetic method and tell
7197         `print_method_info' about it.
7198         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7199         processing a synthetic method.
7200         * jcf-reader.c (skip_attribute): New function.
7201         ( skip_attribute): Likewise.
7202
7203 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7204
7205         * parse.y (build_outer_field_access): Fixed comments.
7206         (fix_constructors): Emit the initialization of this$<n> before
7207         calling $finit$.
7208         (resolve_qualified_expression_name): Build an access to `decl' if
7209         necessary.
7210
7211 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7212
7213         * parse-scan.y (curent_class): Non longer const.
7214         (inner_qualifier, inner_qualifier_length): Deleted.
7215         (current_class_length): New global.
7216         (bracket_count): Fixed typo in leading comment.
7217         (anonymous_count): New global.
7218         (class_instance_creation_expression:): Handle anonymous classes.
7219         (anonymous_class_creation:): New rule.
7220         (push_class_context): Rewritten.
7221         (pop_class_context): Likewise.
7222         (INNER_QUALIFIER): Macro deleted.
7223         (report_class_declaration): call `push_class_context' when
7224         entering the function. `fprintf' format modified not to use
7225         INNER_QUALIFIER.
7226         (report_class_declaration): Assign `package_name' and
7227         `current_class' to NULL separately.
7228
7229 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7230
7231         * expr.c (build_invokeinterface): Call layout_class_methods on
7232         target interface.
7233
7234 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7235             Anthony Green  <green@cygnus.com>
7236             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7237
7238         * class.c (make_class_data): Create vtable for abstract classes.
7239         (get_dispatch_table): Changed to cope with abstract classes.
7240
7241 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7242
7243         * parse.y (patch_method_invocation): Don't reverse the argument
7244         list when dealing with anonymous class constructors. Fixed typo in
7245         comment.
7246
7247 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7248
7249         * parse.y (build_alias_initializer_parameter_list): Reverse
7250         crafted list when building aliases for anonymous class
7251         constructors.
7252
7253 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7254
7255         * parse.y (jdep_resolve_class): Don't bother checking potential
7256         innerclass access if `decl' is NULL.
7257         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7258         WFL.
7259
7260 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7261
7262         * parse.c: Remove (again.)
7263
7264 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7265
7266         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7267         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7268         outside the `if' statement, alias to innerclass removed, `decl'
7269         used to mark the class complete.
7270
7271 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7272
7273         * parse.y (simple_name:): Fixed typo in error message.
7274
7275 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7276
7277         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7278         or its first operand can be error marks.
7279
7280 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7281
7282         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7283         * parse.y (method_header): Likewise.
7284
7285 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7286
7287         * parse.y (process_imports): Consider that one might be trying to
7288         import an innerclass. Fixes gcj/254
7289
7290 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7291
7292         * parse.y (find_as_inner_class): Handle the case where the
7293         enclosing context of an innerclass has been loaded as bytecode.
7294
7295 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7296
7297         * parse.y (simple_name:): Reject `$' in type names.
7298         (resolve_type_during_patch): Use `type' as a second
7299         argument to resolve_no_layout. Fixes gcj/257.
7300
7301 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
7302
7303         * parse.y (find_most_specific_methods_list): Select the only
7304         non-abstract method even if max has been set.
7305         Fixes gcj/285, gcj/298.
7306
7307 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
7308
7309         * lang-specs.h: Added %(jc1) to java compiler options.
7310
7311 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7312
7313         * .cvsignore: New file.
7314
7315 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7316
7317         * parse.y (not_accessible_p): Access granted to innerclasses
7318         (indirectly) extending the reference type. Fixes gcj/249.
7319
7320 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7321
7322         * parse.y (patch_method_invocation): Fixed comment.
7323         (maybe_use_access_method): Build this$<n>s to the context of the
7324         target method, or a type that extends it. Fixes gcj/242.
7325
7326 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7327
7328         * parse.c: Remove.
7329
7330 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7331
7332         * parse.y (fold_constant_for_init): Avoid bullish conversion.
7333
7334 2000-07-13  Tom Tromey  <tromey@cygnus.com>
7335
7336         * lang-specs.h: Added %{I*}.
7337
7338 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7339
7340         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7341
7342 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7343
7344         * parse-scan.c: Remove.
7345
7346 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7347
7348         * class.c (set_super_info): Handled protected inner classes.
7349         (common_enclosing_context_p): Bail early if arguments aren't both
7350         inner classes.
7351         (get_access_flags_from_decl): Handle private and protected inner
7352         classes.
7353         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7354         (CLASS_PROTECTED): Likewise.
7355         (struct lang_type): New bitfield `poic'.
7356         * parse.y (jdep_resolve_class): Call check_inner_class_access on
7357         inner classes only.
7358         (check_inner_class_access): Renamed arguments, added
7359         comments. Handles protected inner classes (fixes gcj/225)
7360         (not_accessible_p): Fixed comments. Avoid handling inner classes.
7361
7362 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7363
7364         * parse.y (resolve_qualified_expression_name): Verify qualified
7365         access to `this'. Fixes gcj/239.
7366
7367 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7368
7369         * jcf-write.c (generate_classfile): Don't install ConstantValue
7370         for null pointers.
7371
7372 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7373
7374         * parse.y (resolve_qualified_expression_name): Handle inner class
7375         access. Fixes gcj/256.
7376
7377 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7378
7379         * jcf-write.c (generate_classfile): Properly install the
7380         ConstantValue attribute and the initial value constant pool index
7381         on string constants.
7382         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7383         class files.
7384
7385 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7386
7387         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7388         construct.
7389         * parse.y (find_as_inner_class): Fixed typo.
7390         (do_resolve_class): Explore enclosing contexts when searching for
7391         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7392         (check_inner_class_access): Check `decl' which can be null in case
7393         of previous errors.
7394
7395 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7396
7397         * java-tree.h (java_debug_context): Declared `extern'.
7398         (safe_layout_class): Likewise.
7399         * parse.y (resolve_field_access): Field must be `static' in order
7400         to be replaced by its initial value. Added comments.
7401         (find_applicable_accessible_methods_list): Fixed typo.
7402         (find_most_specific_methods_list): Methods found in innerclasses
7403         take over methods founds in the enclosing contexts.
7404         (java_complete_tree): Loosen restrictions on the type of DECLs
7405         that can be replaced by their initialization values.
7406         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7407
7408 2000-07-05  Tom Tromey  <tromey@cygnus.com>
7409
7410         * Make-lang.in (PARSE_DIR): New macro.
7411         (PARSE_RELDIR): Likewise.
7412         (PARSE_C): Likewise.
7413         (PARSE_SCAN_C): Likewise.
7414         ($(PARSE_C)): New target.
7415         ($(PARSE_SCAN_C)): Likewise.
7416         (SET_BISON): New macro.
7417         (BISONFLAGS): Likewise.
7418         (JAVABISONFLAGS): Likewise.
7419
7420 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
7421
7422         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7423         argument on the first pass for CNI as well as JNI.
7424         (print_method_info): Set up method name on the first pass only.
7425
7426 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7427
7428         * parse.y (parser_qualified_classname): Removed parameter
7429         `is_static'.
7430         (create_interface): Removed first passed parameter to
7431         parser_qualified_classname.
7432         (create_class): Likewise. Don't install alias on static
7433         innerclasses. Fixes gcj/275.
7434
7435 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7436
7437         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7438         debugable statement with empty_stmt_node. Fixes gcj/272
7439
7440 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7441
7442         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7443         gcj/271.
7444
7445 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7446
7447         * jcf-write.c (push_long_const): Appropriately cast short negative
7448         constant to jword.
7449
7450 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7451
7452         * parse.y (verify_constructor_super): Use loop variable
7453         `m_arg_type' initialized with `mdecl_arg_type'.
7454
7455 2000-06-29  Tom Tromey  <tromey@cygnus.com>
7456
7457         * parse.y (resolve_field_access): Handle case where `type_found'
7458         is NULL.
7459
7460 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7461
7462         * expr.c (lookup_field): The same field can be found through two
7463         different interface. Don't declare it ambiguous in that case.
7464
7465 2000-06-27  Tom Tromey  <tromey@cygnus.com>
7466
7467         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
7468         follows \r, then unget it at a lower level.
7469
7470 2000-06-26  Tom Tromey  <tromey@cygnus.com>
7471
7472         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7473         java_complete_tree.
7474
7475 2000-06-25  Tom Tromey  <tromey@cygnus.com>
7476
7477         * parse.y (for_statement): Wrap expression in a WFL if it is a
7478         constant.  For PR gcj/268.
7479
7480 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7481
7482         * parse.y (do_resolve_class): Minor optimiztion in the package
7483         list search. Removed unnecessary test and return statement.
7484         (valid_ref_assignconv_cast_p): Order of arguments to
7485         enclosing_context_p fixed.
7486
7487 2000-06-24  Tom Tromey  <tromey@cygnus.com>
7488
7489         * expr.c (lookup_field): Print error and return error_mark_node if
7490         field reference is ambiguous.
7491
7492         * parse.y (check_abstract_method_definitions): Also check if
7493         `other_method' is abstract.
7494
7495 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7496
7497         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7498         classes.
7499         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7500         (struct lang_type): New field `pic'.
7501         (CLASS_PRIVATE): New macro.
7502         * parse.y (check_inner_class_access): New function.
7503         (jdep_resolve_class): Call it.
7504
7505 2000-06-23  Tom Tromey  <tromey@cygnus.com>
7506
7507         * parse.y (patch_incomplete_class_ref): Initialize the returned
7508         class.  For PR gcj/260.
7509
7510 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7511
7512         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7513
7514 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7515
7516         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7517         Java specific checks.
7518         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7519         screened by DECL_P.
7520         * java-tree.def (CASE_EXPR): Marked 'e'.
7521         (DEFAULT_EXPR): Likewise.
7522         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7523         screened by DECL_P.
7524         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7525         Java specific checks.
7526         (generate_bytecode_insns): Test try_block for BLOCK before using
7527         BLOCK_EXPR_BODY.
7528         * parse.y (build_wfl_wrap): Added `location' argument. Set
7529         EXPR_WFL_LINECOL accordingly.
7530         (dim_expr:): Wrap constants with WFLs.
7531         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7532         (resolve_package): Check for `stmt' not being a BLOCK before
7533         building a debuggable statement with it.
7534         (make_qualified_primary): Added extra parameter to build_wfl_wrap
7535         invocation.
7536         (resolve_field_access): Make sure `decl' is a DECL before treating
7537         it as such.
7538         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7539         IDENTIFIER_NODE before treating it as such.
7540         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7541         treating it as such.
7542         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7543         to be applied only on non array types.
7544
7545 2000-06-16  Per Bothner  <per@bothner.com>
7546
7547         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
7548         define in terms of DECL_RESULT, as that fails when --enable-checking.
7549
7550 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7551
7552         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
7553         types the same in comparison.
7554         (CHECK_OP): Add static prototype.
7555
7556 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7557
7558         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7559         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7560         * parse.c: Rebuilt.
7561
7562 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7563
7564         * decl.c (create_primitive_vtable): Prototype.
7565
7566         * jcf-write.c (generate_bytecode_insns): Initialize variable
7567         `saved_context'.
7568
7569         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7570
7571 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7572
7573         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7574         to track searched classes, and do not search the same class more than
7575         once. Call find_applicable_accessible_methods_list on immediate
7576         superclass, instead of search_applicable_method_list on all ancestors.
7577         Fix for PR gcj/238.
7578
7579 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7580
7581         * parse.y (register_fields): Permit static fields in inner classes
7582         if they are final. Fix for PR gcj/255.
7583
7584 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7585
7586         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
7587         * parse.y (find_in_imports): Returned type changed to void,
7588         leading comment fixed.
7589         (register_package): New function.
7590         (qualify_and_find): Likewise.
7591         (package_declaration:): Use `register_package'.
7592         (single_type_import_declaration:): Removed local variable
7593         `node'. Added missing `;' for consistency.
7594         (type_import_on_demand_declaration:): Use `chainon' to link new
7595         entries.
7596         (lookup_field_wrapper): Lookup local variables defined in outer
7597         contexts first.
7598         (java_complete_class): Don't reverse the list of imported on demand.
7599         (do_resolve_class): Reorganized. Removed local variable
7600         `original_name'. Call `qualify_and_find' with the current package
7601         name, invoke `find_in_imports_on_demand' right after. Call
7602         `qualify_and_find' with the packages we've seen so far. Fixed
7603         operations numbering in comments.
7604         (java_expand_class): Don't reverse `package_list'.
7605         (find_most_specific_methods_list): New local variables `abstract'
7606         and `candidates'. Use them to pick the right method.
7607
7608 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
7609
7610         * parse.y (check_modifiers_consistency): Don't subtract out
7611         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
7612
7613 2000-06-04  Philipp Thomas  <pthomas@suse.de>
7614
7615         * Makefile.in (INTLLIBS): New.
7616         (LIBS): Add above.
7617         (DEPLIBS): Ditto.
7618
7619 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7620
7621         * class.c (get_dispatch_table): Build the vtable dummy entry list
7622         element with a null purpose. Fixed leading comment.
7623         (build_dtable_decl): Build an accurate dtable type when appropriate
7624         and use it.
7625
7626 2000-06-02  Richard Henderson  <rth@cygnus.com>
7627
7628         * lang.c (lang_get_alias_set): New.
7629
7630 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7631
7632         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
7633         before using it as the accessed field.
7634
7635 2000-05-31  Tom Tromey  <tromey@cygnus.com>
7636
7637         * java-tree.h (boolean_array_vtable, byte_array_vtable,
7638         char_array_vtable, short_array_vtable, int_array_vtable,
7639         long_array_vtable, float_array_vtable, double_array_vtable):
7640         Declare.
7641         * expr.c (get_primitive_array_vtable): New function.
7642         (create_primitive_vtable): New function.
7643         (java_lang_expand_expr): Enable code to statically generate
7644         arrays.
7645         * decl.c (init_decl_processing): Create primitive vtables.
7646         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
7647         short_array_vtable, int_array_vtable, long_array_vtable,
7648         float_array_vtable, double_array_vtable): Define.
7649
7650 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
7651
7652         * java/parse.y (find_applicable_accessible_methods_list):
7653         Don't add an uninitialized value to the list.
7654
7655 2000-05-25  Tom Tromey  <tromey@cygnus.com>
7656
7657         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
7658         when trying to see if field's class should be initialized.  Always
7659         initialize field's declaring class, not qualified class.
7660         For PR gcj/162.
7661
7662         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
7663         `wfl_operator', to maybe_build_primttype_type_ref.
7664         Fixes PR gcj/235.
7665
7666 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
7667
7668        * parse.y (patch_method_invocation): Don't try to lookup methods
7669        in primitive types.
7670
7671 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7672
7673         * parse.y (resolve_field_access): Call the appropriate <clinit>
7674         before accessing the length of a static array. Craft a decl for
7675         the field while its time. Fixes PR gcj/129.
7676
7677 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7678
7679         * parse.y (resolve_package): Correctly set `*next' (was off by
7680         one.)
7681         (resolve_qualified_expression_name): Fixed comment.
7682
7683 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7684
7685         * jcf-parse.c (jcf_parse_source): Reset current_class and
7686         current_function_decl to NULL before parsing a new file.
7687
7688 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7689
7690         * parse.y (block_end:): If the collected block doesn't feature a
7691         statement, insert an empty statement.
7692
7693 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7694
7695         * parse.y (maybe_yank_clinit): New function.
7696         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
7697         end of the list of methods belonging to a class.
7698         (java_complete_expand_method): Check whether <clinit> is really
7699         necessary and expand it accordingly.
7700
7701 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7702
7703         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
7704         processed by the method's switch statement.
7705
7706 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7707
7708         * java-tree.h: Added init state enum.
7709         * decl.c (emit_init_test_initialization): Initialize class
7710         initialization check variable by looking at class' state.
7711
7712 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7713
7714         * java-tree.h (build_instanceof): Declare.
7715         (build_get_class): Declare.
7716         * parse.y (patch_binop): Use build_instanceof.
7717         * expr.c (build_instanceof): New function.  If class is final,
7718         don't make a function call.
7719         (expand_java_INSTANCEOF): Use it.
7720         (build_get_class): New function.
7721
7722 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
7723
7724         * jcf-write.c (generate_classfile): Scan the source_file for
7725         slashes with the right pointer variable.
7726
7727 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
7728
7729         * lang.c (lang_decode_option): Update -Wunused flags by calling
7730         set_Wunused.
7731         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
7732
7733 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7734
7735         * check_init.c (check_init): Constify local char *.
7736         * class.c (push_class): Constify local char *.
7737         * java_tree.h: Update prototypes.
7738         * jcf-io.c (open_class): Constify filename parameter and
7739         return value.
7740         (find_class): Remove redundant string copy.  Cast return from
7741         open_class.
7742         * jcf-parse.c (read_class, parse_class_file, yyparse):
7743         Constify local char *.
7744         * jcf-write.c (generate_bytecode_insns, generate_classfile):
7745         Constify local char *.
7746         * jcf.h (JCF): Constify filename and classname.
7747         (JCF_FINISH): Cast args to FREE to char * when appropriate.
7748         * lang.c (init_parse): Constify parameter and return value.
7749         * lex.c (java_get_line_col): Constify filename parameter.
7750         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
7751         * parse.y (java_parser_context_suspend,
7752         issue_warning_error_from_context, safe_layout_class): Constify
7753         local char *.
7754         * parse.c: Regenerate.
7755
7756 2000-05-08  Tom Tromey  <tromey@cygnus.com>
7757
7758         * expr.c (build_jni_stub): Cache the result of
7759         _Jv_LookupJNIMethod.
7760
7761 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7762
7763         * decl.c (predef_filenames_size): Now 7.
7764         (predef_filenames): New seventh entry.
7765
7766 2000-05-04  Tom Tromey  <tromey@cygnus.com>
7767
7768         * boehm.c (mark_reference_fields): Don't mark RawData fields.
7769         Keep track of when we've seen a reference field after a
7770         non-reference field.
7771         (get_boehm_type_descriptor): Handle case where we see
7772         non-reference fields but no trailing reference field.
7773         * decl.c (rawdata_ptr_type_node): Define.
7774         (init_decl_processing): Initialize rawdata_ptr_type_node.
7775         * java-tree.h (rawdata_ptr_type_node): Declare.
7776
7777 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7778
7779         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
7780         specifiers in calls to fprintf.
7781
7782 2000-05-03  Andrew Haley  <aph@cygnus.com>
7783
7784         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
7785
7786         * javaop.h (WORD_TO_INT): New function.
7787         (IMMEDIATE_s4): Use WORD_TO_INT.
7788         * jcf.h (JPOOL_INT): Ditto.
7789
7790         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
7791         separator.
7792
7793 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7794
7795         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
7796         on native function.
7797         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
7798         JNI methods.
7799         * expr.c (build_jni_stub): New function.
7800         * lang-specs.h: -fjni and -femit-class-file are incompatible.
7801         * parse.c: Rebuilt.
7802         * parse.y (java_complete_expand_methods): Expand a native method
7803         and call build_jni_stub if -fjni given.
7804         * lang-options.h: Document -fjni.
7805         * lang.c (flag_jni): New global.
7806         (lang_f_options): Added `jni' entry.
7807         * java-tree.h (soft_lookupjnimethod_node,
7808         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
7809         Declare.
7810         (flag_jni): Declare.
7811         (build_jni_stub): Declare.
7812         (struct lang_decl): Added `native' flag.
7813         (METHOD_NATIVE): Redefined to use `native' field of lang specific
7814         structure.
7815         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
7816         soft_jnipopsystemframe_node): New globals.
7817         (init_decl_processing): Set them.  _Jv_InitClass only takes one
7818         argument.
7819
7820         * java-tree.def: Put into `C' mode.
7821
7822 2000-04-27  Tom Tromey  <tromey@cygnus.com>
7823
7824         Fix for PR gcj/2:
7825         * expr.c (expand_invoke): Generate check to see if object pointer
7826         is null in nonvirtual invocation case.
7827         * java-tree.h (soft_nullpointer_node): Declare.
7828         * decl.c (soft_nullpointer_node): New global.
7829         (init_decl_processing): Initialize soft_nullpointer_node.
7830         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7831         or `private' methods.
7832         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7833
7834 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7835
7836         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
7837         from <clinit>
7838
7839 2000-04-26  Tom Tromey  <tromey@cygnus.com>
7840
7841         * zextract.c (find_zip_file_start): New function.
7842         (read_zip_archive): Use it.
7843
7844 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7845
7846         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
7847
7848 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7849
7850         * class.c (common_enclosing_context_p): New function.
7851         * java-tree.h (common_enclosing_context_p): Added prototype.
7852         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
7853         classes sharing an outer context with the current instance.
7854         * parse.y (build_access_to_thisn): Fixed leading comment.
7855         (verify_constructor_super): New local `supper_inner'. Skip
7856         enclosing context argument in the case of inner class constructors.
7857         (patch_method_invocation): Insert proper context as second
7858         parameter to pure inner class constructor super invocations.
7859
7860 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7861
7862         * parse.y (end_class_declaration): Reset the interface number
7863         counter.
7864
7865 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7866
7867         * parse.y (source_start_java_method): Deleted unnecessary code.
7868         (patch_method_invocation): Fixed comment.
7869
7870 2000-04-24  Robert Lipe <robertlipe@usa.net>
7871
7872         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
7873
7874 2000-04-23  Tom Tromey  <tromey@cygnus.com>
7875
7876         * boehm.c (mark_reference_fields): Use int_byte_position.
7877
7878 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7879
7880         * boehm.c (mark_reference_fields): Only call byte_position on
7881         non-static fields.
7882
7883 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7884
7885         * boehm.c (mark_reference_fields): Added `last_view_index'
7886         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
7887
7888 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
7889
7890         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
7891         * parse.y (check_class_interface_creation): Fixed comments. Select
7892         permitted modifiers for (inner) interfaces. Changed error message
7893         to report rejected modifiers used with local classes.
7894
7895 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7896
7897         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
7898         of directly inherited type considered in scope.
7899         * parse.y (do_resolve_class): Search inherited classes for inner
7900         classes.
7901
7902 2000-04-20  Tom Tromey  <tromey@cygnus.com>
7903
7904         * parse.y (not_accessible_p): Use member's class, not current
7905         class, when doing inheritance check for protected reference.
7906         Fixes PR gcj/124.
7907
7908 2000-04-20  Jason Schroeder  <shrode@subnature.com>
7909
7910         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
7911
7912 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7913
7914         * parse.y (lookup_field_wrapper): Search for final local aliases.
7915         (resolve_expression_name): Let lookup_field_wrapper search for
7916         final local aliases. Force the value of `name' if one is found.
7917         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
7918         an expression name. Fixed comments.
7919
7920 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7921
7922         * parse.y (yyerror): `msg' can be null, don't use it in that case.
7923
7924 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7925
7926         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
7927
7928 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7929
7930         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
7931
7932 2000-04-18  Tom Tromey  <tromey@cygnus.com>
7933
7934         PR gcj/211:
7935         * gjavah.c (utf8_cmp): Changed return value.
7936         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
7937         result.
7938         (cxx_keywords): New global.
7939         (get_field_name): Handle new result of cxx_keyword_subst.
7940         (print_method_info): Likewise.
7941
7942 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
7943
7944         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
7945         with a newline, for CNI.
7946         (print_stub_or_jni): Print a space or newline before method name for
7947         CNI as well as JNI.
7948         (print_cxx_classname): Don't write leading "::" in CNI stub method.
7949         (process_file): Include gcj/cni.h if generating CNI stubs.
7950
7951 2000-04-16  Tom Tromey  <tromey@cygnus.com>
7952
7953         * gjavah.c (decompile_method): Use print_field_name.
7954         Fixes PR gcj/205.
7955
7956 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7957
7958         * parse.y (java_expand_classes): Reverse the package list once.
7959         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
7960         reduction.
7961         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
7962         the `==' and `!=' operators.
7963
7964 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7965
7966         * jcf-write.c (generate_bytecode_insns): At invocation time,
7967         always relate an interface method to the type of its selector.
7968
7969 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7970
7971         Fix for PR gcj/2:
7972         * expr.c (expand_invoke): Generate check to see if object pointer
7973         is null in nonvirtual invocation case.
7974         * java-tree.h (soft_nullpointer_node): Declare.
7975         * decl.c (soft_nullpointer_node): New global.
7976         (init_decl_processing): Initialize soft_nullpointer_node.
7977         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7978         or `private' methods.
7979         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7980
7981 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7982
7983         Fix for PR gcj/140:
7984         * parse.y (check_final_assignment): Recognize assignments to the
7985         `length' field of an array when generating class files.
7986
7987 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7988
7989         * class.c (decl_hash): Prototype removed.
7990         (decl_compare): Likewise.
7991
7992 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7993
7994         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
7995         * parse.y (check_modifiers_consistency): Check for final/volatile
7996         clash.  Fixes PR gcj/164.
7997
7998 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7999
8000         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8001         made global.
8002         (java_hash_compare_tree_node): Renamed from `decl_compare, made
8003         global.
8004         (add_method_1): Use `java_hash_hash_tree_node' and
8005         `java_hash_compare_tree_node'.
8006         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8007         (java_hash_compare_tree_node): Likewise.
8008         * parse.y (find_applicable_accessible_methods_list): Create,
8009         delete and use a hash table to remember already searched interfaces.
8010
8011 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
8012
8013         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8014         with latest entry.
8015
8016 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8017
8018         * boehm.c (mark_reference_fields, set_bit): Prototype.
8019         (set_bit): Un-ANSI-fy definition.
8020
8021         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8022         Prototype.
8023
8024         * decl.c (emit_init_test_initialization): Likewise.
8025
8026         * gjavah.c (jni_print_char): Likewise.
8027
8028         * parse.y (create_new_parser_context): Likewise.
8029
8030 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8031
8032         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8033         patch missing hunk. Fixed indentation.
8034
8035 2000-03-30  Tom Tromey  <tromey@cygnus.com>
8036
8037         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8038         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8039
8040 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8041
8042         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8043         when negative *before* using it as an array index.
8044         * ChangeLog: Fixed typo.
8045
8046 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8047
8048         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8049         to 0 when it reaches -1.
8050
8051 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8052
8053         * jcf-parse.c (get_constant): Properly cast `num' during the
8054         invocation of `add_double'.
8055         * jcf-write.c (push_long_const): Properly cast `lo' before
8056         comparing it to short bounds.
8057         * parse-scan.y (interface_declaration:): Rule re-arrange so that
8058         `interface_body:' is reduced after the current interface is
8059         pushed.
8060
8061 2000-03-26  Tom Tromey  <tromey@cygnus.com>
8062
8063         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8064         Java-specific `-f' option.
8065
8066 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8067
8068         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8069         Adjust order of making types.
8070         Make bitsize_*_node values.
8071
8072 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8073
8074         * class.c (make_field_value): Use byte_position.
8075         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8076         (java_array_data_offset): Likewise.
8077         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8078         bzero call.
8079
8080 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8081
8082         * parse.y (check_abstract_method_definitions): New local
8083         `end_type_reached'. Make sure we also consider `end_type'.
8084         (java_check_abstract_method_definitions): Make sure we eventually
8085         consider `java.lang.Object'.
8086         (maybe_use_access_method): Don't use access method if not in the
8087         context of a pure inner class or if the method's context is right.
8088         (find_applicable_accessible_methods_list): New static flag
8089         `object_done'. Don't search abstract classes as interfaces. Fixed
8090         indentation. Fixed the `java.lang.Object' only search. Search
8091         class interface(s) first, then fully search enclosing contexts.
8092         (find_most_specific_methods_list): Pick the closest candidate when
8093         they're all abstract.
8094
8095 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8096
8097         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8098         properly initialize `finished_label'. Don't emit gotos for empty
8099         try statements.
8100
8101 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8102
8103         * except.c (emit_handlers): Clear catch_clauses_last.
8104
8105 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8106
8107         * parse.y (check_method_types_complete): New function.
8108         (create_class): Reset anonymous class counter only when seeing an
8109         non inner classe.
8110         (java_complete_class): JDEP_METHOD: Don't recompute signature
8111         if incomplete.
8112
8113 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8114
8115         * class.c (build_static_ref): Fixed indentation in comment.
8116         * java-tree.def (TRY_EXPR): Fixed typo in name.
8117         (CLASS_LITERAL): Likewise.
8118         * java-tree.h: (TYPE_DOT_CLASS): New macro.
8119         (struct lang_type): New field `dot_class'.
8120         * jcf-write.c (generate_bytecode_insns): Fixed error message.
8121         (generate_classfile): Method `class$' is synthetic.
8122         * parse.y (build_do_class_method): New function.
8123         (build_dot_class_method_invocation): Likewise.
8124         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8125         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8126         (qualify_ambiguous_name): Likewise.
8127         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8128         (build_try_statement): Fixed leading comment.
8129
8130 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8131
8132         * class.c (make_field_value): Properly handle sizes.
8133         (get_dispatch_vector): Use tree_low_cst and host_integerp.
8134         (layout_class_method): Count using trees.
8135         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8136         * expr.c (java_array_data_offset): Use int_bit_position.
8137         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8138         (build_invokevirtual): Use tree_low_cst and do computations with trees.
8139
8140 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8141
8142         * lang.c (flag_hash_synchronization): New global.
8143         (lang_f_options): Added `hash-synchronization'.
8144         * lang-options.h: Mention -fhash-synchronization.
8145         * java-tree.h (flag_hash_synchronization): Declare.
8146         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8147         hash table synchronization is disabled.
8148         * decl.c (init_decl_processing): Only push `sync_info' value when
8149         hash table synchronization is disabled.
8150         * class.c (make_class_data): Only push `sync_info' field when hash
8151         table synchronization is disabled.  Removed dead code.
8152
8153 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8154
8155         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8156
8157 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8158
8159         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8160         classes.
8161         * parse.y (patch_method_invocation): Handle anonymous classes
8162         creation in static context.
8163
8164 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8165
8166         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8167         * parse.y (resolve_qualified_expression_name): Use it.
8168         (patch_method_invocation): Likewise.
8169
8170 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8171
8172         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8173         depending on the type of dependency which dictates what the
8174         current class is.
8175         (unresolved_type_p): Resolved types limited to the current class.
8176
8177 2000-03-15  Tom Tromey  <tromey@cygnus.com>
8178
8179         * decl.c (init_decl_processing): Set type of `sync_info' to be
8180         pointer to Object.
8181
8182         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8183         Correctly compute bit number for current slot.  Zero `high' and
8184         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
8185         mark_reference_fields.
8186         (mark_reference_fields): New function.
8187
8188 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8189
8190         * parse.y (register_incomplete_type): Fixed initialization of
8191         JDEP_ENCLOSING.
8192
8193 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8194
8195         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8196         static globals.
8197         (push_class_context, pop_class_context): New function.
8198         (class_body:): Call pop_class_context.
8199         (interface_body:): Likewise.
8200         (INNER_QUALIFIER): New macro.
8201         (report_class_declaration): Changed output format and use
8202         INNER_QUALIFIER. Call push_class_context.
8203
8204 2000-02-14  Andrew Haley  <aph@cygnus.com>
8205
8206         * check-init.c (check_init): Add new cases for unary and binary
8207         tree nodes.
8208
8209 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8210
8211         * parse.y (resolve_package): Set `next' once a type name has been
8212         progressively discovered.
8213         (resolve_qualified_expression_name): Propagate resolution only if
8214         there are remaining qualifiers. Take into account `q' might have
8215         been cleared after re-qualification.
8216         * parse.y (patch_method_invocation): New local `resolved'.
8217         Section dealing with qualified expression rewritten to use
8218         resolve_field_access.
8219
8220 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8221
8222         * parse.h (PUSH_CPC): Fixed indentation.
8223         (DEBUG_CPC): New macro.
8224         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8225         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8226         * parse.y (class_body_declaration:): Use
8227         SET_CPC_INSTANCE_INITIALIZER_STMT.
8228         (method_declaration:): Check for null current_function_decl.
8229         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8230         (java_parser_context_pop_initialized_field): Better handling of
8231         empty lists.
8232         (maybe_make_nested_class_name): Mark nested class name as
8233         qualified when necessary.
8234         (end_class_declaration): Don't call java_parse_context_resume when
8235         one or more error occurred.
8236         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8237         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8238         SET_CPC_INITIALIZER_STMT.
8239         (method_header): Check for inner classes declaring static methods.
8240         (resolve_qualified_expression_name): Handle situation where `this'
8241         is implied.
8242
8243 2000-03-13  Hans Boehm <boehm@acm.org>
8244
8245         * typeck.c (build_prim_array_type): Correctly set the high word too.
8246
8247 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8248
8249         * parse.y (java_complete_expand_methods): Leave <clinit> out of
8250         ordinary methods.
8251         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8252         list of methods for interfaces.
8253
8254 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8255
8256         * parse.y (qualify_ambiguous_name): Properly handle expressions
8257         using `null'.
8258
8259 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8260
8261         * parse.y (check_final_assignment): Extended to process
8262         COMPOUND_EXPR.
8263         (patch_assignment): Have check_final_assignment called only once.
8264
8265 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8266
8267         * java-tree.h (IS_INIT_CHECKED): New flag.
8268         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8269         * parse.y (patch_string): Call force_evaluation_order on the
8270         completed string concatenation tree.
8271         * expr.c (force_evaluation_order): Call force_evaluation_order on
8272         function's arguments too.
8273
8274 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8275
8276         * decl.c (emit_init_test_initialization): Mark KEY as unused.
8277         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8278         (build_anewarray): Likewise.
8279         * parse.y (patch_newarray): Likewise.
8280         * parse.c: Regenerated.
8281
8282 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
8283
8284         * decl.c (init_decl_processing): Added new class fields `depth',
8285         `ancestors', and `idt' to class_type_node. Use
8286         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8287         * class.c (make_class_data): Push initial values for new fields.
8288         * java-tree.h: Updated prototype for `build_invokeinterface'.
8289         * expr.c (build_invokeinterface): Changed parameters to accept
8290         `method' tree. Calculate index of `method' in its declaring
8291         interface. Build call to _Jv_LookupInterfaceMethodIdx.
8292         (expand_invoke): Call `build_invokeinterface' with new parameters.
8293         * parse.y (patch_invoke): Call `build_invokeinterface' with new
8294         parameters.
8295
8296 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
8297
8298         * typeck.c (lookup_do): Search superinterfaces first
8299         when looking up an interface method. From Godmar Back
8300         <gback@cs.utah.edu>
8301
8302 2000-03-06  Tom Tromey  <tromey@cygnus.com>
8303
8304         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8305
8306 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8307
8308         * java-tree.h (lookup_argument_method2): Declared.
8309         (safe_layout_class): Prototype moved from parse.h.
8310         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8311         * parse.y (java_check_regular_methods): Local `super_class' gone.
8312         Call lookup_argument_method2 instead of lookup_argument_method.
8313         Perform modifier match for methods found declared in implemented
8314         interfaces. Fixed indentation problem. Overriding/hiding error
8315         report to take place only for methods found in classes.
8316         * typeck.c (lookup_argument_method): Changed leading
8317         comment. Re-written by calling lookup_do.
8318         (lookup_argument_method2): New function.
8319         (lookup_java_method): Re-written by calling lookup_do.
8320         (lookup_do): New function.
8321
8322 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8323
8324         * check-init.c (check_init): Removed dead code. Handle (blank)
8325         final variables.
8326         * parse.y (declare_local_variables): New local `final_p', set it
8327         and use it to initialize LOCAL_FINAL.
8328         (check_final_assignment): Only check FIELD_DECLs.
8329
8330 2000-02-17  Tom Tromey  <tromey@cygnus.com>
8331
8332         * Makefile.in (JAVA_OBJS): Added boehm.o.
8333         (boehm.o): New target.
8334         * Make-lang.in (JAVA_SRCS): Added boehm.c.
8335         * java-tree.h (flag_use_boehm_gc): Declare.
8336         (get_boehm_type_descriptor): Declare.
8337         * lang.c (lang_f_options): Added `use-boehm-gc'.
8338         (flag_use_boehm_gc): New global.
8339         * lang-options.h: Added -fuse-boehm-gc.
8340         * boehm.c: New file.
8341         * class.c (get_dispatch_table): If class uses a Boehm type
8342         descriptor, put it in the vtable.
8343         (make_class_data): Removed dead code.
8344
8345 2000-03-03  Per Bothner  <per@bothner.com>
8346
8347         * decl.c (init_decl_processing):  Initialize sizetype properly.
8348
8349 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8350
8351         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8352         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8353         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8354         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8355         (jcf_parse): New local `current'. Load innerclasses seen in outer
8356         context being processed.
8357         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8358         * jcf-write.c (append_innerclasses_attribute): New function.
8359         (append_innerclasses_attribute_entry): Likewise.
8360         (get_access_flags): Handle static classes. Set anonymous and local
8361         classes to be private.
8362         (generate_classfile): Attribute count adjusted. Call
8363         append_innerclasses_attribute.
8364         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8365         PURE_INNER_CLASS_TYPE_P.
8366         * parse.y (parser_qualified_classname): New parameter `is_static',
8367         produce non qualified name accordingly.
8368         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8369         (create_interface): Added argument to parser_qualified_classname.
8370         (create_class): Added argument to parser_qualified_classname. Setup
8371         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8372         (add_inner_class_fields): Fixed indentation.
8373         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8374         (method_declarator): Fixed typo in comment.
8375         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8376         (build_current_thisn): Likewise.
8377         (patch_method_invocation): Likewise.
8378
8379 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8380
8381         * decl.c (current_function_decl): Move to toplev.c.
8382
8383 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8384
8385         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8386         (DECL_BIT_INDEX): Use underlying representation.
8387         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8388
8389 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8390
8391         * expr.c (build_java_ret): Pass proper type to size_binop.
8392
8393 2000-02-25  Anthony Green  <green@cygnus.com>
8394
8395         * expr.c (build_class_init): Mark the decl to be ignored by
8396         check_init.
8397         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8398         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8399         * class.c (init_test_hash_newfunc): New function.
8400         (decl_hash): New function.
8401         (decl_compare): New function.
8402         * decl.c (emit_init_test_initialization): New function.
8403         (complete_start_java_method): Traverse the init test hashtable,
8404         calling emit_init_test_initialization.
8405         (always_initialize_class_p): Define.
8406         * expr.c (build_class_init): Use initialization tests when
8407         emitting class initialization code.
8408         (always_initialize_class_p): Declare.
8409         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8410         1.
8411         * java-tree.h: Include hash.h.
8412         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8413         (struct lang_decl): Add init_test_table field.
8414         (init_test_hash_entry): Define.
8415
8416 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8417
8418         * gjavah.c (main): Avoid using `argi' to report unimplemented
8419         options.
8420
8421 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8422
8423         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8424         initialize locals to avoid warnings. Local `exception_type' moved
8425         into if statement.
8426
8427 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8428
8429         * parse.y (resolve_expression_name): Use `orig' as a second
8430         argument to resolve_field_access.
8431         (resolve_field_access): Removed unnecessary code when dealing with
8432         static fields.
8433
8434 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8435
8436         * class.c (push_super_field): Don't push the field twice.
8437         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8438         * parse.h (java_reorder_fields): Prototyped.
8439         * parse.y (java_reorder_fields): New function.
8440         (java_layout_class): Simplified not to worry about re-ordering.
8441
8442 2000-02-23  Tom Tromey  <tromey@cygnus.com>
8443
8444         * gjavah.c (print_name): In JNI case, correctly quote string.
8445         (print_method_info): Don't handle overrides in JNI mode.
8446
8447 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8448
8449         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8450         value type set to `boolean_type_node'.
8451
8452 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8453
8454         * jcf-dump.c (main): Test for correct condition after
8455         output file creation.
8456
8457 2000-02-19  Anthony Green  <green@cygnus.com>
8458
8459         * jcf-depend.c (add_entry): Fix test for first list entry.
8460
8461 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8462
8463         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8464         * constants.c (build_constants_constructor): Likewise.
8465
8466 2000-02-19  Anthony Green  <green@cygnus.com>
8467
8468         * jcf-depend.c (add_entry): Add entries to the end of the list.
8469
8470 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
8471
8472         * decl.c (INT_TYPE_SIZE): Define if necessary.
8473         (expand_java_return): Handle the case of a native integer smaller
8474         than a JVM integer.
8475
8476 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8477
8478         * gjavah.c (help): Use GCCBUGURL.
8479         * jv-scan.c (help): Likewise.
8480         * jcf-dump.c (help): Likewise.
8481
8482 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8483
8484         * jcf-write.c (generate_bytecode_insns): Don't generate empty
8485         `finally' clauses.
8486
8487 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8488
8489         * jcf-parse.c (load_class): Call `fatal' if no file containing
8490         the target class are found.
8491
8492 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
8493
8494         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8495         lex.c, lex.h, and PARSE_H to...
8496         (parse.o, parse-scan.o): ...here, respectively.
8497
8498         * lex.c: Split out code that may trigger SIGFPE from yylex()
8499         to its own function.
8500         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8501
8502 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8503
8504         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8505
8506 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8507
8508         * parse.y (outer_field_access_p): Stop in time when outer contexts
8509         are exhausted.
8510         (resolve_qualified_expression_name): Properly qualify *everything*
8511         after a package.type to be resoled as expression names.
8512         (find_applicable_accessible_methods_list): Save/restore `class' to
8513         isolate it from a possible outer context search.
8514
8515 2000-02-15  Tom Tromey  <tromey@cygnus.com>
8516
8517         * gjavah.c (jni_print_char): New function.
8518         (print_full_cxx_name): Use it.
8519         (decode_signature_piece): Likewise.
8520         (print_cxx_classname): Likewise.
8521
8522 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8523
8524         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8525         version.o.
8526         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8527
8528         * gjavah.c: Include version.h.
8529
8530         * jcf-dump.c: Likewise.
8531
8532         * jv-scan.c: Likewise.
8533
8534 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8535
8536         * parse.y (outer_field_access_fix): First parameter now a tree
8537         node. Check for assignment to final. First argument to
8538         build_outer_field_access_fix modified to accommodate prototype.
8539         (build_outer_field_access): Don't check for assignment to final
8540         here.
8541         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8542         possibly returned by outer_field_access_fix. Changed
8543         outer_field_access_fix's first argument.
8544         (check_final_assignment): $finit$'s context is OK.
8545         (patch_unaryop): Use node instead of its line/column value when
8546         calling outer_field_access_fix.
8547
8548 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8549
8550         * parse.y (interface_declaration:): No longer tagged
8551         <node>. Re-installed default action.
8552         (class_member_declaration:): Handle inner interfaces.
8553         (interface_member_declaration): Handle inner interfaces and
8554         classes.
8555         (create_interface): Push error if one seen. Suspend parsing
8556         context when processing an inner interface.
8557         (register_fields): Inner class static field limitations not to
8558         apply to inner interfaces.
8559
8560 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8561
8562         * jcf-parse.c (load_class): Update `java_error_count' when a
8563         class' file can't be found.
8564         (parse.y): Avoid (byte)code generation when errors seen.
8565
8566 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8567
8568         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8569         decodes a valid node.
8570         (patch_binop): Handle TRUNC_DIV_EXPR.
8571
8572 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8573
8574         * parse.y (resolve_package): New local `acc'. Try to progressively
8575         build and guess a package and type name.
8576
8577 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8578
8579         * parse.y (find_applicable_accessible_methods_list): Load and
8580         layout the search class if necessary.
8581         (java_complete_tree): Keep to original type of the folded initial
8582         value.
8583
8584 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8585
8586         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
8587         Generate error message if circularity is detected. New static
8588         local `list'.
8589         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
8590         * jcf-write.c (generate_bytecode_insns): Very simply handle
8591         SAVE_EXPR.
8592         * parse.y (java_check_circular_reference): Use
8593         `cyclic_inheritance_report' during report, if necessary.
8594         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
8595         walking NEW_ARRAY_INIT twice.
8596
8597 2000-02-09  Tom Tromey  <tromey@cygnus.com>
8598
8599         * parse.y (check_class_interface_creation): Allow inner classes to
8600         be `private' or `protected', check modifiers' consistency. Prevent
8601         block local classes from bearing any modifiers.
8602
8603 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8604
8605         * except.c (check_start_handlers): Re-add prototype lost in last
8606         patch.
8607         (maybe_start_try): Remove excess argument to `check_start_handlers'.
8608
8609 2000-02-09  Andrew Haley  <aph@cygnus.com>
8610
8611         * decl.c (clear_binding_level): Remove excess initializer.
8612         (maybe_poplevels): Remove unused variable.
8613         (force_poplevels): Ditto.
8614         (struct binding_level): Add comment.
8615
8616 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8617
8618         * jcf-write.c (generate_classfile): Don't consider
8619         pre-initialization with reference value (use <clinit> instead.)
8620         * parse.y (java_fix_constructors): No generated constructor for
8621         interfaces.
8622         (build_outer_field_access): Removed debug message.
8623         (outer_field_expanded_access_p): Adapted to bytecode generation.
8624         (build_outer_field_access_method): Use fix_method_argument_names.
8625         (build_outer_method_access_method): Fixed indentation. Added
8626         comment. Handle access method generation for static and also void
8627         methods.
8628         (build_access_to_thisn): Inserted debug message.
8629         (maybe_build_thisn_access_method): Use fix_method_argument_names.
8630         (resolve_qualified_expression_name): Fixed comment.
8631         (not_accessible_p): Adapted to bytecode generation. Added comment.
8632         (patch_method_invocation): Added comment.
8633         (maybe_use_access_method): Fixed leading comment. Handle static
8634         methods.
8635         (java_complete_lhs): Don't shortcut handling of initialized upon
8636         declaration String type static fields when generating bytecode.
8637         (patch_unaryop): Handle outer field access when generating
8638         bytecode.
8639
8640 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8641
8642         * java-tree.h (FIELD_THISN): New macro.
8643         * jcf-write.c (append_synthetic_attribute): New function.
8644         (generate_classfile): Set "Synthetic" attribute on this$<n>,
8645         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
8646         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
8647         this$<n> fields.
8648         (build_outer_field_access): Turned on access functions usage and
8649         generation when compiling to bytecode.
8650         (maybe_use_access_method): Likewise.
8651
8652 2000-01-25  Andrew Haley  <aph@cygnus.com>
8653
8654         * java-except.h (struct eh_range): Add `expanded' field.
8655         (maybe_start_try): Add end_pc arg.
8656         (maybe_end_try): Ditto.
8657         * java-tree.h (force_poplevels): new function.
8658         * expr.c (expand_byte_code): Don't call maybe_start_try or
8659         maybe_end_try.
8660         * except.c (add_handler): Reset expanded.
8661         (expand_start_java_handler): Set expanded.
8662         (check_start_handlers): Don't expand a start handler that's
8663         already been expanded.
8664         (maybe_start_try): Add end_pc arg.  Only expand a handler which
8665         ends after end_pc.
8666         (expand_end_java_handler): call force_poplevels.
8667         (force_poplevels): new function.
8668         * decl.c (binding_level): Add start_pc of binding level.
8669         (maybe_pushlevels): Call maybe_start_try when pushing binding
8670         levels.
8671         (maybe_poplevels): Call maybe_end_try when popping binding levels.
8672         (LARGEST_PC): Define.
8673         (clear_binding_level): Use LARGEST_PC.
8674
8675         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
8676         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
8677         (binding_depth, is_class_level, current_pc): new variables.
8678         (struct binding_level): ditto.
8679         (indent): new function.
8680         (push_jvm_slot): add debugging info.
8681         (maybe_pushlevels): ditto.
8682         (maybe_poplevels): ditto.
8683         (pushlevel): ditto.
8684         (poplevel): ditto.
8685         (start_java_method): ditto.
8686         (give_name_to_locals): comment only.
8687         * except.c (binding_depth, is_class_level, current_pc):
8688         new variables.
8689         (expand_start_java_handler): add debugging info.
8690         (expand_end_java_handler): ditto.
8691
8692 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8693
8694         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
8695         (print_name_for_stub_or_jni, process_file): Constify a char*.
8696
8697 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8698
8699         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
8700
8701 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8702
8703         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
8704         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
8705         defined to be 1.
8706
8707 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8708
8709         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
8710         * java-tree.h (TYPE_II_STMT_LIST): New macro.
8711         (struct lang_type): New field `ii_block'.
8712         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
8713         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
8714         * parse.h (struct parser_ctxt): New field `instance_initializers'.
8715         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
8716         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
8717         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
8718         macros.
8719         * parse.y (add_instance_initializer): New function.
8720         (in_instance_initializer): New static global.
8721         (class_body_declaration:): Link instance initializer block.
8722         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
8723         (array_creation_expression:): Remove unused local.
8724         (java_parser_context_push_initialized_field): Fixed leading
8725         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
8726         CPC_INSTANCE_INITIALIZER_LIST.
8727         (java_parser_context_pop_initialized_field): Likewise.
8728         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
8729         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
8730         CPC_INITIALIZER_STMT.
8731         (fix_constructors): New local `class_type'. Use it. Call
8732         add_instance_initializer.
8733         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
8734         (patch_return): Forbid return in instance initializers.
8735         (patch_throw_statement): Enforce exception handling in the context
8736         of instance initializers.
8737
8738 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8739
8740         * Make-lang.in (java.mostlyclean): Remove executables in
8741         `mostlyclean'.
8742
8743 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8744
8745         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
8746         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
8747         (java_float_finite): Convert to use union Word from javaop.h.
8748         (java_double_finite): Convert to use union DWord from javaop.h.
8749
8750 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8751
8752         * gjavah.c (options): Added `jni' entry.
8753         (help): Document -jni.
8754         (flag_jni): New global.
8755         (process_file): Handle JNI output.  Don't print text from
8756         -prepend, -add, etc, when generating stubs.  Only remove `.class'
8757         suffix if it actually exists.
8758         (main): Create a `.c' file when run with `--jni --stubs'.  Create
8759         correct output file name with `--jni'.
8760         (print_include): Mangle header name differently in JNI case.
8761         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
8762         method list.
8763         (print_method_info): Handle JNI case.  Put signature info into
8764         method name.  Handle case when STREAM is NULL.
8765         (print_name_for_stub_or_jni): New function.
8766         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
8767         (print_cxx_classname): Handle JNI.
8768         (print_full_cxx_name): Likewise.
8769         (decode_signature_piece): Likewise.
8770         (overloaded_jni_method_exists_p): New function.
8771         (struct method_name): Added `signature' and `sig_length' fields.
8772         (HANDLE_END_FIELD): Do nothing in JNI mode.
8773
8774 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8775
8776         * jv-scan.c: Include version.c, <getopt.h>.
8777         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
8778         (options): New array.
8779         (usage): New function.
8780         (version): New function.
8781         (main): Use getopt_long to parse command line.
8782         * jcf-dump.c: Include version.c, <getopt.h>.
8783         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
8784         OPT_JAVAP): New macros.
8785         (options): New array.
8786         (usage): Return `void'.  Changed message.
8787         (help): New function.
8788         (version): New function.
8789         (main): Use getopt_long_only to parse command line.
8790         * gjavah.c: Include <getopt.h>.
8791         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
8792         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
8793         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
8794         (options): New array.
8795         (java_no_argument): Removed.
8796         (help): Updated with missing options.
8797         (main): Use getopt_long_only to parse command line.
8798         (usage): Changed message.
8799
8800 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8801
8802         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
8803         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
8804         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
8805         * parse.y (array_creation_expression:): Handle anonymous arrays.
8806         (build_array_from_name): Don't set `ret_name' if null.
8807         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
8808         (qualify_ambiguous_name): Likewise.
8809         (java_complete_expand_class): Likewise.
8810
8811 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8812
8813         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
8814         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
8815         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
8816         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
8817         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
8818         AIPL_FUNCTION_COMPLETED_INVOCATION.
8819         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
8820         AIPL_FUNCTION_INVOCATION_READY.
8821         (AIPL_FUNCTION_DECLARATION): New enum entry.
8822         * parse.y (reorder_static_initialized): New function.
8823         (java_parser_context_pop_initialized_field): Use it.
8824         (add_inner_class_fields): Use
8825         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
8826         augmented. Install marker after last alias initializer, if any.
8827         (generate_finit): Fixed typo. Don't try to retain only the used
8828         fields.
8829         (method_header): Compute and set DECL_FUNCTION_NAP.
8830         (method_declarator): Fixed comment. Insert alias initializer in
8831         parameter list.
8832         (build_alias_initializer_parameter_list): Fixed leading
8833         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
8834         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
8835         (java_complete_expand_class): Code to retain only used aliases
8836         removed.
8837         (java_complete_expand_methods): New local `first_decl'. Generate
8838         $finit$ first, then expand the constructors, regular methods and
8839         <clinit>.
8840         (java_complete_expand_method): Don't report error on missing
8841         return statement if previously detected bogus.
8842         (fix_constructors): Don't patch constructor parameters list.
8843         (patch_method_invocation): Use new AIPL enum values. Reverse
8844         alias initializer list for anonymous classes.
8845
8846 2000-01-30  Anthony Green  <green@redhat.com>
8847
8848         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
8849         determine how many stack slots to pop.
8850
8851 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8852
8853         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
8854         error handling/recovery.
8855         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
8856
8857 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8858
8859         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
8860         FIELD_LOCAL_ALIAS_USED): New macros.
8861         (DECL_FUNCTION_NAP): New macro.
8862         (struct lang_decl): New field `nap'.
8863         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
8864         (struct lang_type): New fields `finit_stmt_list' and
8865         `clinit_stmt_list'.
8866         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
8867         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
8868         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
8869         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
8870         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
8871         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
8872         (BUILD_THROW): Macro line separator re-indented.
8873         * parse.y (end_class_declaration): New function.
8874         (maybe_generate_pre_expand_clinit): New name for
8875         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
8876         pre-expand static fields.
8877         (maybe_generate_clinit): Function deleted.
8878         (check_for_static_method_reference): Prototype's parameter list
8879         indented.
8880         (generate_finit): New name for maybe_generate_finit. Changed
8881         leading comment. Function rewritten to use
8882         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
8883         (build_alias_initializer_parameter_list): New function.
8884         (java_parser_context_pop_initialized_field): Likewise.
8885         (add_inner_class_fields): Likewise.
8886         (type_declaration:): Call end_class_declaration.
8887         (class_member_declaration:): Likewise.
8888         (formal_parameter_list:): Fixed typos.
8889         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
8890         element. Improved error handling.
8891         (block_statement:): Call end_class_declaration.
8892         (anonymous_class_creation:): Likewise.
8893         (create_anonymous_class): Fixed comments.
8894         (create_class): Call add_inner_class_fields.
8895         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
8896         (method_header): Use MARK_FINAL_PARMS.
8897         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
8898         (method_declarator): Propagate final argument flag.
8899         (craft_constructor): New local `artificial'. Call
8900         build_alias_initializer_parameter_list. Use
8901         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
8902         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
8903         necessary.
8904         (complete_expand_class): Get rid of unused outer context local
8905         alias fields.
8906         (java_complete_expand_methods): Fixed leading
8907         comment. Generate/pre-expand <clinit> first. Changed method
8908         expansion order to regular, $finit$, constructors, <clinit>.
8909         (java_complete_expand_method): Set current_function_decl.
8910         (fix_constructors): Fix constructor parameter list to account for
8911         outer context local alias initializers.
8912         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8913         (resolve_expression_name): Lookup outer context local aliases. New
8914         local `access', use it.
8915         (patch_method_invocation): Patch inner class ctor invocation with
8916         outer context local aliases initialization values. $finit$
8917         invocation patching now includes things generated with
8918         build_alias_initializer_parameter_list.
8919         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8920         (build_super_invocation): Likewise.
8921         (patch_assignment): Changed comment.
8922
8923 2000-01-27  Andrew Haley  <aph@cygnus.com>
8924
8925         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
8926         (emit_if): Ditto.
8927         (emit_jsr): Ditto.
8928
8929 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8930
8931         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
8932         concatenation.
8933         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
8934
8935         * parse.y (register_fields): Don't pass a format specifier to
8936         OBSOLETE_MODIFIER_WARNING.
8937         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
8938         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
8939         specifier.
8940         (check_modifiers): Change function into a macro.
8941         (check_class_interface_creation): Pass a literal format string.
8942
8943 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8944
8945         * buffer.h: PROTO -> PARAMS.
8946         * check-init.c: Likewise.
8947         * class.c: Likewise.
8948         * constants.c: Likewise.
8949         * convert.h: Likewise.
8950         * decl.c: Likewise.
8951         * except.c: Likewise.
8952         * expr.c: Likewise.
8953         * gjavah.c: Likewise.
8954         * java-except.h: Likewise.
8955         * java-tree.h: Likewise.
8956         * jcf-depend.c: Likewise.
8957         * jcf-dump.c: Likewise.
8958         * jcf-parse.c: Likewise.
8959         * jcf-path.c: Likewise.
8960         * jcf-reader.c: Likewise.
8961         * jcf-write.c: Likewise.
8962         * jcf.h: Likewise.
8963         * jv-scan.c: Likewise.
8964         * jvgenmain.c: Likewise.
8965         * jvspec.c: Likewise.
8966         * lang.c: Likewise.
8967         * lex.c: Likewise.
8968         * lex.h: Likewise.
8969         * parse-scan.y: Likewise.
8970         * parse.h: Likewise.
8971         * parse.y: Likewise.
8972         * typeck.c: Likewise.
8973         * verify.c: Likewise.
8974         * xref.c: Likewise.
8975         * xref.h: Likewise.
8976         * zextract.c: Likewise.
8977         * zipfile.h: Likewise.
8978
8979 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8980
8981         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8982         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
8983         * constants.c (build_constant_data_ref): Check for cached
8984         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
8985         in TYPE_CPOOL_DATE_REF.
8986         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
8987         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
8988         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
8989         (LOCAL_FINAL): New macro.
8990         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
8991         constant pool -- don't try to reuse.
8992         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
8993         TYPE_LANG_SPECIFIC.
8994         (find_in_current_zip): Use TYPE_JCF.
8995         * parse.h (java_check_final): Prototype removed.
8996         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
8997         (maybe_create_class_interface_decl,
8998         check_class_interface_creation): Likewise.
8999         (java_expand_finals): Function removed.
9000         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9001         (block_statement:): Fixed comment.
9002         (anonymous_class_creation:): Likewise.
9003         (check_class_interface_creation): Reversed Jan 12, 2000 extra
9004         argument patch.
9005         (check_class_interface_creation): Loosened error report on (inner)
9006         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9007         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9008         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9009         argument patch.
9010         (create_interface): Likewise.
9011         (anonymous_class_counter): New static global.
9012         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9013         patch. Fixed comments.
9014         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9015         anonymous_class_counter when declaring a toplevel class.
9016         (craft_constructor): Fixed constructor name when handling
9017         anonymous classes. Anonymous class constructors to feature hidden
9018         this$<n> parameter.
9019         (java_fix_constructors): Added comment.
9020         (java_check_final): Function removed.
9021         (java_complete_expand_methods): Fixed comment. Don't generate
9022         class data, save its outgoing constant pool instead.
9023         (verify_constructor_super): Skip anonymous class constructor
9024         hidden this$<n> parameter.
9025         (java_expand_classes): New local `saved_ctxp'. Removed call to
9026         java_expand_finals and java_check_final. Expand anonymous class
9027         constructors. Generate class data.
9028         (build_super_invocation): Skip anonymous class hidden this$<n>
9029         parameter.
9030         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9031         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9032         (set_java_signature): Likewise.
9033
9034 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9035
9036         * gjavah.c: Delete ACC_VISIBILITY define.
9037         * jcf.h: Add ACC_VISIBILITY define.
9038         * parse.y: final: rule tagged <value>.
9039         (java_check_regular_methods): Use ACC_VISIBILITY define for
9040         default package access check.
9041         (local_variable_declaration_statement): Use final: rule.
9042
9043 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9044
9045         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9046         (final:): New rule.
9047
9048 2000-01-17  Tom Tromey  <tromey@cygnus.com>
9049
9050         * gjavah.c (print_field_info): Allow non-static final fields.
9051
9052 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9053
9054         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9055         * parse.y (patch_anonymous_class): New function.
9056         (create_anonymous_class): Register incomplete type when the
9057         class/interface to extends/implement isn't known yet.
9058         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9059         (verify_constructor_super): Tuned error message.
9060
9061 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9062
9063         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9064         (ANONYMOUS_CLASS_P): New macro.
9065         (TYPE_SIGNATURE, TYPE_JCF): New macros.
9066         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9067         * parse.y (create_class): Added leading argument.
9068         (maybe_create_class_interface_decl,
9069         check_class_interface_creation): Likewise.
9070         (craft_constructor): New function.
9071         (verify_constructor_super): Added argument in prototype.
9072         (class_declaration:): Inserted leading argument.
9073         (for_begin:): Use FOR_LOOP_P.
9074         (anonymous_class_creation): Create WFL of the anonymous class to
9075         instantiate. Call build_new_invocation. Added comments.
9076         (check_class_interface_creation): Handle parameter `anonymous' in
9077         verbose mode class creation announce.
9078         (link_nested_class_to_enclosing): Exclude anonymous classes.
9079         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9080         anonymous class, even though they appear to have an enclosing
9081         context.
9082         (create_interface): Pass extra argument to
9083         check_class_interface_creation.
9084         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9085         (create_class): Call check_class_interface_creation and
9086         maybe_create_class_interface_decl with extra new argument. Don't
9087         add private this$<n> to anonymous classes.
9088         (method_declarator): Insert hidden this$<n> to anonymous class
9089         constructors.
9090         (java_fix_constructors): Deleted code creating default
9091         constructor. Call craft_constructor instead.
9092         (java_check_regular_methods): Set `saw_constructor' to 1 for
9093         anonymous classes.
9094         (fix_constructors): Pass extra argument to verify_constructor_super.
9095         (verify_constructor_super): New local `sdecl', use it. Search for
9096         matching constructor (possibly featuring arguments) in super
9097         class.
9098         (lookup_method_invoke): Craft constructor according to arguments
9099         list when dealing with anonymous class constructors.
9100         (build_super_invocation): Pass arguments to anonymous class super
9101         constructors.
9102         (search_loop): Use FOR_LOOP_P.
9103         (labeled_block_contains_loop_p): Likewise.
9104
9105 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9106
9107         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9108         (enclosing_context_p): New function.
9109         (get_access_flags_from_decl): Handle CLASS_STATIC.
9110         (maybe_layout_super_class): Extra first argument passed to
9111         do_resolve_class.
9112         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9113         ID_INIT_P.
9114         * decl.c (access0_identifier_node): New global.
9115         (init_decl_processing): access0_identifier_node initialized.
9116         (pushdecl): Set DECL_CONTEXT only on non type decls.
9117         * expr.c (lookup_field): Lookup inner class fields in enclosing
9118         contexts.
9119         (expand_invoke): Use ID_INIT_P.
9120         (expand_java_field_op): Use DECL_CLINIT_P.
9121         * java-tree.def (CLASS_LITERAL): New tree code.
9122         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9123         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9124         (struct lang_decl): New field `inner_access'.
9125         (enclosing_context_p): Prototyped.
9126         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9127         ID_CLINIT_P): New macros.
9128         (CLASS_STATIC): New macro.
9129         (CLASS_ACCESS0_GENERATED_P): New macro.
9130         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9131         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9132         INNER_CLASS_P): New macros.
9133         (DECL_INNER_CLASS_LIST): New macro.
9134         * jcf-parse.c (yyparse): Avoid the use of ANSI string
9135         concatenation.
9136         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9137         the shift value to int. Fixed typo in comment.
9138         * lex.c (inst_id, wpv_id): Initialize.
9139         * mangle.c (unicode_mangling_length): Take `$' into account.
9140         * parse.h (DRECOVER, RECOVER): Terminate properly.
9141         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9142         (typedef struct _jdep): New field `enclosing'.
9143         (JDEP_ENCLOSING): New macro.
9144         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9145         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9146         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9147         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9148         GET_ENCLOSING_CPC_CONTEXT): New macros.
9149         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9150         (do_resolve_class): Added extra argument in prototype.
9151         * parse.y (resolve_class): Added extra argument in prototype.
9152         (maybe_create_class_interface_decl): Likewise.
9153         (maybe_use_access_method, build_wfl_wrap): New functions.
9154         (java_complete_expand_classes, java_complete_expand_class):
9155         Likewise.
9156         (java_parser_context_push_initialized_field,
9157         java_parser_context_suspend, java_parser_context_resume):
9158         Likewise.
9159         (maybe_make_nested_class_name, make_nested_class_name,
9160         set_nested_class_simple_name_value,
9161         link_nested_class_to_enclosing, find_as_inner_class,
9162         find_as_inner_class_do, check_inner_class_redefinition,
9163         build_thisn_assign, build_current_thisn, build_access_to_thisn,
9164         maybe_build_thisn_access_method, build_outer_field_access,
9165         build_outer_field_access_methods, build_outer_field_access_expr,
9166         build_outer_method_access_method, build_new_access_id,
9167         build_outer_field_access_method, outer_field_access_p,
9168         outer_field_expanded_access_p, outer_field_access_fix,
9169         build_incomplete_class_ref, patch_incomplete_class_ref,
9170         create_anonymous_class): Likewise.
9171         (inst_id, wpv_id): New static global variables.
9172         (synchronized:): New rule, tagged <node>.
9173         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9174         rules.
9175         (anonymous_class_creation:): New rule, tagged <node>.
9176         (NEW_TK): Tagged <node>.
9177         (type_literals, array_type_literal): New rules, tagged <node>.
9178         (class_declaration:): Removed action when reducing by class_body:
9179         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9180         using GET_CPC in sub-rules.
9181         (class_member_declaration): Handle inner classes.
9182         (method_declaration): When reducing method_header:, reset
9183         current_function_decl when appropriate.
9184         (method_declarator:): Set the number of formal parameter to 0 for
9185         method declared without arguments.
9186         (constructor_declarator:): Likewise.
9187         (static_initializer:): List of elements kept in a list.
9188         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9189         use of the keyword `static' for type declarations.
9190         (block_statement:): Handle inner class declarations.
9191         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9192         type qualified `this'.
9193         (class_instance_creation_expression): Use anonymous_class_creation:
9194         to handle inner class instances creation. Handle qualified `new'.
9195         (something_dot_new): Added appropriate actions.
9196         (create_new_parser_context): New function.
9197         (java_push_parser_context, java_parser_context_save_global,
9198         java_parser_context_suspend): Use create_new_parser_context.
9199         (check_modifiers): Changed leading comment.
9200         (check_class_interface_creation): Handle interclasses.
9201         (add_superinterfaces): Fixed comment.
9202         (create_interface): Build qualified name from the raw_name instead
9203         of its matching WFL. Push the initialized fields list. raw_name added
9204         as an extra argument to maybe_create_class_interface_decl.
9205         (create_class): Build qualified name from the raw_name instead of
9206         its matching WFL. Removed assignment to current_parsed_class_un.
9207         Call PUSH_ERROR before returning an error. Suspend the current
9208         parser context when processing an inner class. Push the
9209         initialized fields list. raw_name added as an extra argument to
9210         maybe_create_class_interface_decl. Add the private this$<n>
9211         field.
9212         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9213         (register_fields): Get the class type from GET_CPC and handle
9214         previous errors.  Added code to handle the creation of static
9215         fields in inner classes. Initialized fields initialization
9216         statements kept in a list of lists.
9217         (maybe_generate_finit): Initialized fields initialization
9218         statements kept in a list of lists. Use GET_CPC.
9219         (maybe_generate_clinit): Likewise.
9220         (method_header): Use GET_CPC and GET_CPC_UN.
9221         (parser_qualified_classname): Handle inner classes.
9222         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9223         (java_fix_constructors): Hide pointer to enclosing context
9224         instance in constructor list when dealing with inner classes.
9225         (jdep_resolve_class): Call resolve_class with extra first argument
9226         JDEP_ENCLOSING.
9227         (resolve_class): Add enclosing context as a first extra argument
9228         to do_resolve_class.
9229         (do_resolve_class): Call find_as_inner_class. Handle WFLs
9230         properly.
9231         (resolve_no_layout): Extra argument added to resolve_class
9232         invocation.
9233         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9234         (java_get_real_method_name): Use GET_CPC_UN.
9235         (check_abstract_method_definitions): Use DECL_CLINIT_P.
9236         (java_check_abstract_methods): Handle static method declared in
9237         inner classes by an error.
9238         (java_check_regular_methods): Use DECL_CLINIT_P.
9239         (source_start_java_method): Also set DECL_MAX_LOCALS.
9240         (create_artificial_method): Call java_parser_context_save_global
9241         and java_parser_context_restore_global instead of saving/restoring
9242         the context by hand.
9243         (expand_start_java_method): Improved verbose mode message.
9244         (java_complete_expand_methods): Fixed leading comment. Use
9245         DECL_CLINIT_P.
9246         (fix_constructors): Added assignment to this$<n> if necessary.
9247         (java_expand_classes): Call java_complete_expand_classes instead
9248         of java_complete_expand_methods.
9249         (make_qualified_primary): Simplified.
9250         (merge_qualified_name): Optimized for missing left or right parts.
9251         (resolve_expression_name): Handle access to outer class fields from
9252         interclasses.
9253         (resolve_qualified_expression_name): New macro
9254         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9255         classes. Report error on non appropriate qualification of
9256         `new'. Handle qualified `this'.
9257         (not_accessible_p): Allow access to outer class private fields from
9258         inner classes.
9259         (patch_method_invocation): Handle method invocations through
9260         access methods and inner class constructor invocations.
9261         (find_applicable_accessible_methods_list): Search enclosing
9262         contexts of an inner class.
9263         (search_applicable_methods_list): Fixed typo.
9264         (argument_types_convertible): Handle inner class constructors'
9265         hidden outer context reference argument.
9266         (qualify_ambiguous_name): Handle qualified `this'.
9267         (java_complete_lhs): Handle use of field accessed through
9268         artificial access methods in various cases of assignments. Handle
9269         CLASS_LITERAL node.
9270         (check_final_assignment): Use DECL_CLINIT_P.
9271         (valid_ref_assignconv_cast_p): Handle the destination being an
9272         enclosing context of the source.
9273         (patch_unaryop): Handle use of field accessed through artificial
9274         access methods.
9275         (patch_return): Use DECL_CLINIT_P.
9276         (patch_throw_statement): Use DECL_CLINIT_P.
9277         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9278         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9279         ID_INIT_P.
9280
9281 2000-01-16  Anthony Green  <green@cygnus.com>
9282
9283         * parse.y (build_string_concatenation): Only use
9284         StringBuffer(String) shortcut if String arg is constant.
9285
9286 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9287
9288         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9289         the shift value to int. Fixed typo in comment.
9290
9291 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9292
9293         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9294         * jcf-write.c: Likewise.
9295         * parse.y: Likewise.
9296         * parse.c: Regenerate.
9297
9298 2000-01-09  Anthony Green  <green@cygnus.com>
9299
9300         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9301         bytecodes in the correct order.
9302
9303 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9304
9305         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9306
9307 2000-01-06  Anthony Green  <green@cygnus.com>
9308
9309         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9310         before building constant array decl.
9311
9312 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9313
9314         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9315         method invocation and typo in conditional expression.
9316         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9317         the appropriate NOTE_POP.
9318         * parse.y (patch_binop): Shift value mask to feature the right
9319         type.
9320
9321 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9322
9323         * class.c (assume_compiled, assume_compiled_node): Add static
9324         prototype.
9325         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9326
9327         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9328
9329         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9330
9331         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9332         to `__modifier' to avoid stringifying it.
9333
9334         * parse.y (verify_constructor_circularity): Don't call a variadic
9335         function with a non-literal format string.
9336         (java_check_abstract_methods): Move unreachable code inside
9337         `continue' statement.
9338         (lookup_method_invoke): Call xstrdup, not strdup.
9339
9340         * expr.c (expand_java_field_op): Avoid the use of ANSI string
9341         concatenation.
9342
9343         * jcf-parse.c (yyparse): Likewise.
9344
9345         * jv-scan.c (main): Likewise.
9346
9347 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9348
9349         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9350         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9351         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9352         concatenation.
9353
9354         * parse.y (synchronized, variable_redefinition_error,
9355         check_class_interface_creation, create_interface, create_class,
9356         method_header, finish_method_declaration,
9357         check_modifiers_consistency, method_declarator,
9358         complete_class_report_errors, check_abstract_method_definitions,
9359         java_check_regular_methods, check_throws_clauses,
9360         java_check_abstract_methods, read_import_dir,
9361         check_pkg_class_access, declare_local_variables, fix_constructors,
9362         cut_identifier_in_qualified, resolve_expression_name,
9363         resolve_qualified_expression_name, patch_method_invocation,
9364         java_complete_lhs, patch_assignment, try_builtin_assignconv,
9365         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9366         patch_exit_expr, patch_exit_expr, patch_switch_statement,
9367         patch_try_statement, patch_synchronized_statement,
9368         patch_throw_statement, check_thrown_exceptions,
9369         patch_conditional_expr): Likewise.
9370
9371 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9372
9373         * Makefile.in (LIBDEPS): Added gcc's errors.o
9374         (../jcf-dump$(exeext):): Link with gcc's errors.o
9375         (../gcjh$(exeext):): Likewise.
9376         * expr.c (expand_java_NEW): Layout the entire target type instead of
9377         laying out its methods only.
9378         (lookup_field): Layout the class after having loaded it.
9379         * java-tree.h (java_debug_context): Declared.
9380         * jcf-io.c (toplev.h): Included.
9381         (find_class): Removed assignment to jcf's outofsynch
9382         field. Force source file to be read if newer than its matching
9383         class file. Tweaked debug messages.
9384         * jcf-parse.c (jcf_out_of_synch): Deleted.
9385         (read_class): Call to jcf_out_of_synch removed.
9386         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9387         (jcf_out_of_synch): Prototype deleted.
9388         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9389         `deprecated' and `class_err': integer turned into bit-fields.
9390         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9391         * parse.y (package_list): New global.
9392         (package_declaration:): Record newly parsed package name.
9393         (extra_ctxp_pushed_p): Static global deleted.
9394         (java_parser_context_save_global): Create buffer context for the
9395         purpose of saving globals, if necessary.
9396         (java_parser_context_restore_global): Pop context pushed for the
9397         purpose of saving globals, if necessary.
9398         (java_debug_context_do): New prototype and function.
9399         (java_debug_context): Likewise.
9400         (do_resolve_class): Use already parsed package names to qualify
9401         and lookup class candidate.
9402         (java_pre_expand_clinit): Removed unnecessary local variable.
9403
9404 1999-12-17  Tom Tromey  <tromey@cygnus.com>
9405
9406         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
9407         fixes PR gcj/119.
9408         (process_file): Use `\n\' at end of each line in string.
9409
9410 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9411
9412         * expr.c (expand_invoke): Layout the loaded class before
9413         attempting to use it.
9414         (expand_java_field_op): Allow final field assignments to take
9415         place in $finit$.
9416         * typeck.c (convert): Return error_mark_node if expr is null.
9417
9418 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9419
9420         * class.c (class_depth): Return -1 if the class doesn't load
9421         properly.
9422         * expr.c (can_widen_reference_to): Check for errors during depth
9423         computation and return 0 accordingly.
9424         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9425         create default constructors and add an other error check.
9426         * parse.h (java_fix_constructors): Prototyped.
9427         * parse.y (java_pre_expand_clinit): Likewise.
9428         (build_super_invocation): Re-prototyped to feature one argument.
9429         (java_check_circular_reference): Directly use `current'.
9430         (java_fix_constructors): New function.
9431         (java_check_regular_methods): Don't create default constructors
9432         here, but abort if none were found.
9433         (java_complete_expand_methods): Pre-process <clinit> calling
9434         java_pre_expand_clinit.
9435         (java_pre_expand_clinit): New function.
9436         (fix_constructors): build_super_invocation invoked with the
9437         current method declaration as an argument.
9438         (build_super_invocation): Use the context of the processed method
9439         decl argument instead of current_class.
9440         * typeck.c (lookup_java_method): Take WFLs in method names into
9441         account.
9442
9443 1999-12-14  Per Bothner  <per@bothner.com>
9444
9445         * class.c (make_class_data): flag_keep_inline_functions to keep
9446         private methods in the method array.
9447
9448 1999-12-15  Anthony Green  <green@cygnus.com>
9449
9450         * check-init.c (check_init): Take into account both types of
9451         `throw's when checking for uninitialized variables.
9452
9453 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9454
9455         * parse.y (java_complete_lhs): Force conversion of array
9456         dimensions to int_type_node, that's what runtime's ABI expects.
9457
9458 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9459
9460         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9461         operand of a WFL, until the Java front-end gets fixed with regard
9462         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9463
9464 1999-12-10  Andrew Haley  <aph@cygnus.com>
9465
9466         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9467         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9468         expr.c (build_java_athrow): Add support for sjlj-exceptions.
9469         java-tree.h: Ditto.
9470         jcf-write.c: Ditto.
9471
9472 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9473
9474         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9475         before calling expand_eh_region_start and expand_start_all_catch.
9476         * except.c (expand_start_java_handler): Switch to permanent
9477         obstack before calling expand_eh_region_start.
9478         (expand_end_java_handler): Switch to permanent obstack before
9479         calling expand_start_all_catch.
9480
9481 1999-12-5  Anthony Green  <green@cygnus.com>
9482
9483         * decl.c (init_decl_processing): Mark throw_node as a noreturn
9484         function with side effects.
9485         (init_decl_processing): Mark all memory allocating DECLs with
9486         DECL_IS_MALLOC.
9487
9488 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9489
9490         * except.c (expand_end_java_handler): Call
9491         expand_resume_after_catch and end_catch_handler.
9492
9493 1999-11-30  Anthony Green  <green@cygnus.com>
9494
9495         * verify.c (verify_jvm_instructions): Create new return label
9496         chain if non existent (don't rely on the verified state of the jsr
9497         target.)
9498
9499 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9500
9501         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9502         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9503
9504         * parse.y (patch_assignment): Removed bogus final class test on
9505         lhs when checking on whether to emit an ArrayStoreException runtime
9506         check.
9507         * expr.c (expand_java_arraystore): Likewise.
9508
9509 1999-11-28 Anthony Green <green@cygnus.com>
9510
9511         * decl.c (find_local_variable): Reuse single slot decls when
9512           appropriate.
9513
9514 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9515
9516         * jcf-parse.c (saw_java_source): Global variable removed.
9517         (read_class): Don't use `saw_java_source'. Added extra braces.
9518         (yyparse): Code setting `saw_java_source' removed.
9519
9520 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
9521
9522         * except.c (emit_handlers): Zero catch_clauses after emitting them.
9523
9524 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9525
9526         * verify.c (merge_type_state): Non verified subroutines being
9527         considered more than once to trigger passive type merge.
9528
9529 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9530
9531         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9532         in case of error. Error message tuned.
9533
9534 1999-11-21  Anthony Green  <green@cygnus.com>
9535
9536         * constants.c (find_methodref_index): Unwrap method names before
9537         inserting them in the constant pool.
9538
9539         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9540
9541         * class.c (assume_compiled_node): New typedef.
9542         (assume_compiled_tree): New static data.
9543         (find_assume_compiled_node): New function.
9544         (add_assume_compiled): New function.
9545         (assume_compiled): New function.
9546         * class.c (make_class_data): Use assume_compiled.
9547         (is_compiled_class): Use assume_compiled.
9548
9549         * java-tree.h (add_assume_compiled): Declare.
9550
9551         * lang.c (lang_decode_option): Parse new options.
9552
9553 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9554
9555         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9556         int_type_node: that's what `_Jv_AllocObject' expects.
9557
9558 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9559
9560         * parse.y (lookup_method_invoke): Use lang_printable_name to
9561         reliably build the type name during error report. Fixes PR gcj/97.
9562
9563 1999-11-09  Tom Tromey  <tromey@cygnus.com>
9564
9565         * jcf-path.c: Include <sys/stat.h>.
9566         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
9567         (DIR_UP): New macro.
9568
9569 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9570
9571         * parse.y (source_end_java_method): Resume permanent allocation,
9572         reversing Apr 27 1998 patch.
9573         (patch_string_cst): Pop obstacks after having pushed the permanent
9574         ones.
9575
9576 1999-11-05  Tom Tromey  <tromey@cygnus.com>
9577
9578         * class.c (finish_class): Emit inlined methods if any native
9579         methods exist in the class.  Fixes PR gcj/85.
9580
9581 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9582
9583         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
9584         (qualify_ambiguous_name): Likewise.
9585
9586 1999-11-03  Godmar Back <gback@cs.utah.edu>
9587
9588         * typeck.c: (lookup_java_method):  search all inherited
9589         interfaces when looking up interface method.
9590
9591 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9592
9593         * parse.y (method_header:): Issue error message for rule `type
9594         error'.
9595         (synchronized:): Error report when not using synchronized.
9596
9597 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9598
9599         * parse.y (resolve_qualified_expression_name): Prevent `this' from
9600         being used before the superclass constructor has been called.
9601         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
9602         instead of `CALL_THIS_CONSTRUCTOR_P'.
9603
9604 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
9605
9606         * check-init.c: Fix typo in comment.
9607
9608 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9609
9610         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
9611         and final method.
9612
9613 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9614
9615         * parse.y (expression_statement:): Call function to report
9616         improper invocation of a constructor.
9617         (parse_ctor_invocation_error): New function.
9618
9619 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
9620
9621         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
9622         remember_end_note.
9623
9624 1999-10-21  Tom Tromey  <tromey@cygnus.com>
9625
9626         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
9627         in generated `main'.
9628
9629 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9630
9631         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
9632         (qualify_ambiguous_name): Likewise.
9633
9634 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9635
9636         * parse.y (java_complete_tree): fold_constant_for_init to work on
9637         permanent_obstack.
9638         (java_complete_lhs): Likewise.
9639         (array_constructor_check_entry): Complete an initializer element
9640         on permanent_obstack.
9641
9642 1999-10-19  Tom Tromey  <tromey@cygnus.com>
9643
9644         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
9645         From Mike Moreton <mike@pillim.demon.co.uk>.
9646
9647 1999-10-15  Greg McGary  <gkm@gnu.org>
9648
9649         * java-tree.h (flag_bounds_check): Remove extern decl.
9650         * lang.c (flag_bounds_check): Remove global variable.
9651         (lang_f_options): Remove "bounds-check" entry.
9652         (lang_init_options): Default flag_bounds_check to "on".
9653
9654 1999-10-14  Tom Tromey  <tromey@cygnus.com>
9655
9656         * jvgenmain.c (usage): New function.
9657         (main): Use it.  Also, handle `-D' options.
9658         * jvspec.c (lang_specific_driver): Recognize -D.
9659         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
9660
9661         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
9662
9663 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9664
9665         * jcf-dump.c (print_constant, disassemble_method): Don't call a
9666         variadic function with a non-literal format string.
9667
9668         * parse-scan.y (report_main_declaration): Likewise.
9669
9670         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
9671
9672         * parse.y (read_import_dir, patch_assignment, patch_binop,
9673         patch_array_ref): Likewise.
9674
9675         * typeck.c (build_java_array_type): Likewise.
9676
9677         * verify.c (verify_jvm_instructions): Likewise.
9678
9679 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9680
9681         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
9682
9683 1999-10-07  Anthony Green  <green@cygnus.com>
9684
9685         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
9686         where CHECK_PUT may fail for valid reasons.
9687
9688         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
9689         UNSAFE_PUTN): New macros.
9690
9691 1999-10-04  Tom Tromey  <tromey@cygnus.com>
9692
9693         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
9694         well.  Fixes Java PR gcj/59.
9695         * parse-scan.y (yyerror): Report errors.
9696
9697 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
9698
9699         * decl.c (insert_block): Remove unconditional `abort'.
9700
9701 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
9702
9703         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
9704         FUNCTION_CODE now of type int.  All callers changed.
9705         Set the builtin's DECL_BUILT_IN_CLASS.
9706
9707 1999-09-23  Tom Tromey  <tromey@cygnus.com>
9708
9709         * jvspec.c (lang_specific_driver): Don't read spec file if
9710         -fsyntax-only given.
9711
9712 1999-09-22  Tom Tromey  <tromey@cygnus.com>
9713
9714         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
9715
9716         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
9717         (WORDS_TO_LONG): Likewise.
9718         (WORDS_TO_DOUBLE): Likewise.
9719
9720 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9721
9722         * jcf-write.c (RELOCATION_VALUE_0): New macro.
9723         (RELOCATION_VALUE_1): Likewise.
9724         (emit_iinc, emit_reloc, push_constant1, push_constant2,
9725         push_in_const, push_long_const): Prototyped.
9726         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
9727         (push_constant2): Likewise.
9728         (push_int_const): Cast find_constant1's integer arguments to `jword'.
9729         (find_constant_wide): Cast find_constant2's integer arguments to
9730         `jword'.
9731         (find_constant_index): Cast find_constant2's and find_constant2's
9732         integer arguments to `jword'.
9733         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
9734         (emit_switch_reloc): Use RELOCATION_VALUE_0.
9735         (emit_if): Use RELOCATION_VALUE_1.
9736         (emit_goto): Likewise.
9737         (emit_jsr): Likewise.
9738         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
9739         argument to push_long_const to HOST_WIDE_INT.
9740
9741 1999-09-15  Andreas Schwab  <schwab@suse.de>
9742
9743         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
9744
9745 1999-09-20  Nick Clifton  <nickc@cygnus.com>
9746
9747         * lang.c (lang_decode_option): Extend comment.
9748
9749 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9750
9751         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
9752         instead of fndecl.
9753
9754 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9755
9756         * gjavah.c (get_field_name, print_method_info, print_include,
9757         add_namelet): Use xmalloc, not malloc.
9758
9759         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
9760         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
9761         NULL pointer.
9762
9763         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
9764
9765         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
9766
9767         * jcf-path.c (add_entry): Likewise.
9768
9769         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
9770
9771         * jv-scan.c (xmalloc): Remove definition.
9772
9773         * jvgenmain.c (xmalloc): Likewise.
9774
9775         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
9776
9777         * lex.c (java_store_unicode): Use xrealloc, not realloc.
9778
9779         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
9780         concat, not xmalloc/sprintf.
9781         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
9782         (xstrdup): Remove definition.
9783
9784         * parse.y (duplicate_declaration_error_p,
9785         constructor_circularity_msg, verify_constructor_circularity,
9786         check_abstract_method_definitions, java_check_regular_methods,
9787         java_check_abstract_methods, patch_method_invocation,
9788         check_for_static_method_reference, patch_assignment, patch_binop,
9789         patch_cast, array_constructor_check_entry, patch_return,
9790         patch_conditional_expr): Use xstrdup, not strdup.
9791
9792         * zextract.c (ALLOC): Use xmalloc, not malloc.
9793
9794 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9795
9796         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
9797
9798         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
9799         (do_spec, lang_specific_pre_link, lang_specific_driver,
9800         input_filename, input_filename_length): Don't declare.
9801         (main_class_name, jvgenmain_spec, lang_specific_driver):
9802         Constify a char*.
9803         (lang_specific_driver): All calls to the function pointer
9804         parameter now explicitly call `fatal'.
9805
9806 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9807
9808         * parse.y (find_applicable_accessible_methods_list): Search
9809         abstract classes as interfaces.
9810
9811 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9812
9813         * class.c (finish_class): We're now outside a valid method
9814         declaration. Tell the rest of gcc so.
9815
9816 1999-09-08  Bruce Korb  autogen@linuxbox.com
9817
9818         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
9819
9820 1999-09-07  Tom Tromey  <tromey@cygnus.com>
9821
9822         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
9823         java-array.h.
9824         (decode_signature_piece): Don't emit "::" in JArray<>.
9825         (print_namelet): Only print trailing `;' when printing a class.
9826
9827 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
9828
9829         * java-tree.h: Delete declarations for all tree nodes now moved to
9830         global_trees.
9831         * decl.c: Delete their definitions.
9832
9833 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
9834
9835         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
9836         * Makefile.in (OBJS): Add ggc-callbacks.o.
9837         (OBJDEPS): Likewise.
9838
9839 1999-09-03  Tom Tromey  <tromey@cygnus.com>
9840
9841         * parse.y (strip_out_static_field_access_decl): Return operand if
9842         it satisfies JDECL_P.
9843
9844 1999-09-02  Tom Tromey  <tromey@cygnus.com>
9845
9846         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
9847         Handle nested arrays, like `[[I'.
9848
9849 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9850
9851         * class.c (finish_class): Remove unused parameter, all callers
9852         changed.
9853
9854         * expr.c (build_java_athrow): Change return type to void.
9855         (java_lang_expand_expr): Make sure each case in switch returns a
9856         value.
9857
9858         * java-tree.h (finish_class): Fix prototype to take void args.
9859
9860         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
9861         (main): Issue return from main, not exit.
9862
9863         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
9864
9865         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
9866
9867         * jv-scan.c (main): Issue return from main, not exit.
9868
9869         * parse.y (check_abstract_method_definitions,
9870         java_check_abstract_method_definitions): Add static prototypes.
9871         (java_complete_expand_methods): Fix call to `finish_class'.
9872
9873         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
9874         and `prevpc'.
9875
9876 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9877
9878         * lang.c (language_string): Constify.
9879
9880 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9881
9882         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
9883         Remove hacks for stuff which comes from libiberty.
9884
9885         * Make-lang.in: Likewise.
9886
9887 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
9888
9889         * Makefile.in (xref.o): Depend on xref.c explicitly.
9890
9891 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9892
9893         * java-tree.h (lang_printable_name): Constify a char*.
9894
9895         * lang.c (lang_printable_name): Likewise.
9896
9897 1999-08-27  Jeffrey A Law  (law@cygnus.com)
9898
9899         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
9900         comments in C code.
9901
9902 1999-08-26  Tom Tromey  <tromey@cygnus.com>
9903
9904         * gjavah.c (print_cxx_classname): Print "::" before qualified
9905         name.
9906
9907 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9908
9909         * parse.y (lookup_cl): Changed leading comment. Now does its best
9910         to set the column number.
9911         (qualify_ambiguous_name): Take WFL wrappers into account.
9912
9913 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
9914
9915         * verify.c (verify_jvm_instructions): Don't check instruction
9916         validity beyond end of method.
9917
9918 1999-08-25  Tom Tromey  <tromey@cygnus.com>
9919
9920         * jvspec.c (lang_specific_driver): Correctly handle --help again.
9921
9922 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9923
9924         * gjavah.c (print_name, print_base_classname, utf8_cmp,
9925         cxx_keyword_subst, generate_access, name_is_method_p,
9926         get_field_name, print_field_name, super_class_name, print_include,
9927         decode_signature_piece, print_class_decls, usage, help,
9928         java_no_argument, version, add_namelet, print_namelet): Add static
9929         prototype.
9930         (print_base_classname, utf8_cmp, cxx_keyword_subst,
9931         name_is_method_p): Constify a char*.
9932         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
9933         Provide a final else clause in an if-else-if.
9934         (print_field_info): Add missing final arg in function call to
9935         `print_field_name'.
9936         (print_method_info, decompile_method, decode_signature_piece,
9937         print_c_decl, print_full_cxx_name, print_stub,
9938         print_mangled_classname, super_class_name, print_include,
9939         add_namelet, add_class_decl, print_class_decls, process_file,
9940         help): Constify a char*.
9941
9942         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
9943         push_int_const, find_constant_wide, find_constant_index,
9944         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
9945         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
9946         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
9947         emit_if, emit_goto, emit_jsr, call_cleanups,
9948         make_class_file_name): Add static prototypes.
9949         (generate_bytecode_return, generate_bytecode_insns): Pass a
9950         NULL_PTR, not a NULL_TREE.
9951
9952         * jv-scan.c: Include "jcf.h".
9953         (main): Declare using DEFUN macro.
9954
9955         * jvspec.c (find_spec_file, lang_specific_pre_link,
9956         lang_specific_driver): Add prototypes.
9957         (find_spec_file): Constify a char*.
9958
9959         * keyword.gperf (hash, java_keyword): Add prototypes.
9960
9961         * lang.c (lang_print_error): Add static prototype.
9962         (lang_init): Prefer memcpy over bcopy to avoid casts.
9963
9964         * lex.c (yylex): Add static prototype.
9965
9966         * parse-scan.y: Include "lex.c" earlier.
9967
9968         * parse.h: Remove redundant declaration for `yylex'.
9969
9970         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
9971         labeled_block_contains_loop_p): Add static prototypes.
9972         (not_accessible_p): Make static to match prototype.
9973
9974         * verify.c (start_pc_cmp): Don't needlessly cast away const.
9975
9976 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9977
9978         * parse.y (check_method_redefinition): Changed leading comment.
9979         (check_abstract_method_definitions): New function.
9980         (java_check_abstract_method_definitions): New function.
9981         (java_check_regular_methods): Call it.
9982         (verify_constructor_super): Fixed indentation.
9983         (lookup_method_invoke): Likewise.
9984
9985 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9986
9987         * parse.y (method_header): Return a null pointer if the current
9988         class node is null.
9989         (finish_method_declaration): Return if the current function decl
9990         is null.
9991         (source_start_java_method): Likewise.
9992         (java_method_add_stmt): Likewise.
9993
9994 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9995
9996         * class.c (emit_register_class): Removed unnecessary call to
9997         start_sequence.
9998         * parse.y (labeled_block_contains_loop_p): Removed unused local
9999         variable.
10000
10001 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10002
10003         * parse.y (java_refold): Added prototype.
10004
10005 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10006
10007         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10008         (java_stabilize_reference): Removed unnecessary `else'.
10009         (java_complete_lhs): Set flag to remember boolean. Call
10010         java_refold. Added comments.
10011         (java_decl_equiv): New function.
10012         (binop_compound_p): Likewise.
10013         (java_refold): Likewise.
10014         (patch_unaryop): Striped static field access assigned to decl and
10015         op. Changed promotion scheme for ++/-- operators.
10016         (search_loop): New function.
10017         (labeled_block_contains_loop_p): Likewise.
10018         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10019         comment.
10020         (patch_bc_statement): Call search_loop. Fixed comment.
10021
10022 1999-08-14  Anthony Green  <green@cygnus.com>
10023
10024         * expr.c (java_lang_expand_expr): Mark static array data as
10025         referenced.
10026
10027 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10028
10029         * jvgenmain.c (main): NUL-terminate name_obstack.
10030
10031 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10032
10033         * check-init.c (check_bool2_init, done_alternative): Add static
10034         prototypes.
10035
10036         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10037         (add_method, build_utf8_ref, build_class_ref,
10038         append_gpp_mangled_type, layout_class_method): Constify a char*.
10039
10040         * decl.c (push_promoted_type, make_binding_level): Add static
10041         prototypes.
10042         (push_promoted_type, pushdecl): Constify a char*.
10043
10044         * except.c (find_handler_in_range, link_handler,
10045         check_start_handlers): Add static prototypes.
10046
10047         * expr.c (process_jvm_instruction): Constify a char*.
10048
10049         * gjavah.c (main): Constify a char*.
10050
10051         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10052         Constify a char*.
10053
10054         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10055         static prototypes.
10056         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10057         munge, print_ents): Constify a char*.
10058
10059         * jcf-dump.c (disassemble_method): Constify a char*.
10060         (print_constant_pool, print_exception_table): Add static prototypes.
10061         (print_constant, print_exception_table, main, disassemble_method):
10062         Constify a char*.
10063
10064         * jcf-io.c (find_classfile, find_class): Likewise.
10065
10066         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10067         (set_source_filename, predefined_filename_p): Add static prototypes.
10068         (set_source_filename, get_constant, get_class_constant,
10069         find_in_current_zip): Constify a char*.
10070
10071         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10072         static prototypes.
10073         (add_entry, add_path, jcf_path_classpath_arg,
10074         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10075
10076         * jcf-reader.c (get_attribute, jcf_parse_preamble,
10077         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10078         jcf_parse_one_method, jcf_parse_methods,
10079         jcf_parse_final_attributes): Add static prototypes.
10080         (get_attribute): Constify a char*.
10081
10082         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10083         jcf_dependency_add_target, jcf_path_classpath_arg,
10084         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10085
10086         * jv-scan.c (main): Constify a char*.
10087         (gcc_obstack_init): Add prototype arguments.
10088
10089         * jvgenmain.c (gcc_obstack_init): Likewise.
10090         (main): Constify a char*.
10091
10092         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10093         static prototypes.
10094         (put_decl_string, lang_print_error): Constify a char*.
10095         (lang_init): Remove redundant extern prototype.
10096
10097         * mangle.c (emit_unicode_mangled_name): Constify a char*.
10098
10099         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10100         Add static prototypes.
10101         (get_type_from_signature): Constify a char*.
10102
10103         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10104         Add static prototypes.
10105         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10106         (verify_jvm_instructions): Constify a char*.
10107
10108         * xref.c (xref_flag_value): Likewise.
10109
10110         * xref.h (xref_flag_value): Likewise.
10111
10112         * zextract.c (makeword, makelong): Add static prototypes.
10113         (makeword, makelong): Constify a uch*.
10114
10115 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10116
10117         * lang.c (java_dummy_print): Constify a char*.
10118         (lang_print_error): Likewise.
10119         (lang_init): Remove redundant prototype for `print_error_function'.
10120         (lang_init_source): Likewise.
10121         (lang_identify): Constify a char*.
10122
10123 1999-08-09  Tom Tromey  <tromey@cygnus.com>
10124
10125         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10126         (WORDS_TO_LONG): Likewise.
10127         (WORDS_TO_DOUBLE): Likewise.
10128
10129 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10130
10131         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10132
10133         * expr.c (java_stack_pop, java_array_data_offset,
10134         build_java_throw_out_of_bounds_exception, case_identity,
10135         build_java_check_indexed_type): Add static prototypes.
10136         (linenumber_table, expand_invoke, expand_java_field_op,
10137         build_primtype_type_ref, expand_byte_code): Constify a char*.
10138
10139         * java-tree.h (build_primtype_type_ref, linenumber_table):
10140         Constify a char*.
10141         (java_lang_expand_expr): Add prototype.
10142
10143         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
10144         `java_lang_expand_expr'.
10145
10146         * lex.c (java_lex_error): Constify a char*.
10147         (java_get_unicode, java_read_char, java_allocate_new_line,
10148         java_unget_unicode, java_sneak_unicode): Prototype.
10149
10150         * parse-scan.y (current_class, package_name, method_declarator,
10151         report_class_declaration, yyerror): Constify a char*.
10152
10153         * parse.h (java_report_errors): Prototype.
10154         (yyerror): Constify a char*.
10155
10156         * parse.y (classitf_redefinition_error, check_modifiers,
10157         parse_jdk1_1_error, lookup_package_type,
10158         lookup_package_type_and_set_next, get_printable_method_name,
10159         purify_type_name): Constify a char*.
10160         (build_super_invocation, maybe_generate_finit,
10161         verify_constructor_super, parser_add_interface,
10162         add_superinterfaces, jdep_resolve_class, note_possible_classname,
10163         java_complete_expand_methods, java_expand_finals,
10164         cut_identifier_in_qualified, java_stabilize_reference,
10165         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10166         merge_string_cste): Prototype.
10167         (single_type_import_declaration, yyerror,
10168         variable_redefinition_error, build_array_from_name,
10169         build_unresolved_array_type, check_class_interface_creation,
10170         resolve_class, complete_class_report_errors,
10171         note_possible_classname, read_import_dir,
10172         find_in_imports_on_demand, resolve_package, fix_constructors,
10173         check_deprecation, lookup_method_invoke,
10174         maybe_build_primttype_type_ref, array_constructor_check_entry):
10175         Constify a char*.
10176         (java_complete_expand_methods, java_expand_finals): Make static.
10177         (convert_narrow): Remove static prototype.
10178
10179 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
10180
10181         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10182
10183 1999-08-02  Richard Henderson  <rth@cygnus.com>
10184
10185         * decl.c: Include defaults.h instead of expr.h.
10186         * parse.y: Likewise.
10187
10188 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
10189
10190         * java/decl.c (start_java_method): Change all uses of
10191         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10192         Ensure expr.h is included.
10193         * java/expr.c (pop_arguments): Ditto.
10194         * java/parse.y (expand_start_java_method): Ditto.
10195
10196 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10197
10198         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10199
10200 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
10201
10202         * decl.c: Include "function.h".
10203         * except.c: Likewise.
10204         * parse.y: Likewise.
10205         * Makefile.in: Update dependencies.
10206
10207 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10208
10209         * expr.c (build_java_soft_divmod): Provide a default case in switch.
10210         (java_lang_expand_expr): Mark parameters `target', `tmode' and
10211         `modifier' with ATTRIBUTE_UNUSED.
10212
10213         * gjavah.c (process_file): Add braces around ambiguous `else'.
10214
10215         * jcf-dump.c (print_access_flags, localvar_free): Change return
10216         type to void.
10217
10218         * parse.y (java_complete_expand_method): Initialize variable
10219         `exception_copy'.
10220         (resolve_qualified_expression_name): Likewise for `field_decl'.
10221         (patch_method_invocation): Likewise for `class_to_search'.
10222         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10223         (patch_assignment): Likewise for `lhs_type'.
10224
10225         * verify.c (verify_jvm_instructions): Remove unused variable
10226         `caller'.
10227
10228 1999-07-25  Richard Henderson  <rth@cygnus.com>
10229
10230         * decl.c (va_list_type_node): New.
10231
10232 1999-07-25  Anthony Green  <green@cygnus.com>
10233
10234         * gjavah.c (print_stub): New function.
10235         (METHOD_IS_NATIVE): New macro.
10236         (print_mangled_classname): Make static.
10237         (HANDLE_END_FIELD): Don't emit fields during stub generation.
10238         (process_file): Perform stub generation.
10239         (HANDLE_METHOD): Don't emit class decls during stub
10240         generation.
10241         (HANDLE_END_METHOD): Take into account stub generation.
10242         (print_method_info): Handle stub generation.
10243         (print_stub): New function.
10244         (print_cxx_classname): Make signature consistant with others.
10245         (help): Describe -stubs option.
10246         (main): Create stub file.
10247         (version): Use version.c.
10248         (print_full_cxx_name): New function.
10249         (print_c_decl): Use print_full_cxx_name.
10250
10251 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10252
10253         * check-init.c (check_init): Handle MAX_EXPR.
10254
10255 1999-07-15  Andrew Haley  <aph@cygnus.com>
10256
10257         * lang.c (flag_use_divide_subroutine): New variable.
10258         * typeck.c: (convert_ieee_real_to_integer): Bounds check
10259         fp-to-integer conversion.
10260         (convert): Call convert_ieee_real_to_integer when flag_fast_math
10261         is not set.
10262
10263         * expr.c (build_java_soft_divmod): New function.
10264         (build_java_binop): Call build_java_soft_divmod if
10265         flag_use_divide_subroutine is set.
10266         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10267         soft_lrem_node: new builtin functions.
10268         (init_decl_processing) Initialize the new builtins.
10269         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10270         soft_lrem_node: new builtin functions.
10271         (build_java_soft_divmod): New function.
10272         * parse.y: Call build_java_soft_divmod if
10273         flag_use_divide_subroutine is set.
10274         * parse.c: Rebuilt.
10275
10276         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10277         a --specs= arg) even if not linking.
10278         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10279         -fuse-divide-subroutine
10280
10281 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10282
10283         * parse.y (resolve_and_layout): Check methods only once.
10284         (resolve_qualified_expression_name): Verify thrown exceptions
10285         compatibility.
10286         (check_thrown_exceptions): Reject exceptions thrown in
10287         initializer. Error message tuned.
10288
10289 1999-07-14  Andrew Haley  <aph@cygnus.com>
10290
10291         * expr.c (expand_expr): Do not return the last statement in a
10292         block as the block's value.
10293
10294 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10295
10296         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10297         CALL_EXPR, to avoid order of evaluation changes.
10298
10299 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10300
10301         * parse.y (qualify_ambiguous_name): Do not use
10302         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10303
10304 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10305
10306         * check-init.c (check_init): Handle MAX_EXPR.
10307         * expr.c (force_evaluation_order): Force method call arguments to
10308         be evaluated in left-to-right order.
10309         * parse.y (qualify_ambiguous_name): Loop again to qualify
10310         NEW_ARRAY_EXPR properly.
10311
10312 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10313
10314         * parse.y (patch_invoke): Resolve unresolved invoked method
10315         returned type.
10316         (qualify_ambiguous_name): STRING_CST to qualify expression for
10317         type name resolution.
10318
10319 1999-06-24  Andrew Haley  <aph@cygnus.com>
10320
10321         * class.c (finish_class): Whenever a deferred method is
10322         output, rescan the list of methods to see if a new candidate for
10323         output can be found.
10324
10325 1999-06-28  Tom Tromey  <tromey@cygnus.com>
10326
10327         * jvspec.c (lang_specific_driver): Recognize --help.
10328
10329 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10330
10331         * parse.y (resolve_package): Fixed bogus return statement.
10332         (patch_method_invocation): Resolve method invocation beginning with
10333         a package name qualifier.
10334
10335 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10336
10337         * Make-lang.in (java.stage1): Depend on stage1-start.
10338         (java.stage2): Likewise for stage2-start.
10339         (java.stage3): Likewise for stage3-start.
10340         (java.stage4): Likewise for stage4-start.
10341
10342 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10343
10344         * parse.y (java_complete_lhs): When doing cross referencing, don't
10345         try to keep file location on a WFL expanded as a CALL_EXPR.
10346
10347 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10348
10349         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10350         compiling to class file a void method with an empty method body.
10351         As a side effect, the bytecode backend will generate the
10352         appropriate `return' instruction.
10353
10354 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10355
10356         * parse.y (lookup_package_type_and_set_next): New function prototype.
10357         (resolve_package): Search current and imported packages.
10358         (lookup_package_type_and_set_next): New function.
10359
10360 1999-06-22  Andrew Haley  <aph@cygnus.com>
10361
10362         * verify.c (verify_jvm_instructions): Check for pending blocks
10363         before invalid PC test and opcode switch, not after.
10364
10365 1999-06-21  Andrew Haley  <aph@cygnus.com>
10366
10367         * except.c (find_handler_in_range): The upper limit for exception
10368         ranges is exclusive, not inclusive: (start <= pc < end).
10369         (link_handler): find child pointer which points to outer by
10370         searching sibling list: previous code incorrectly assumed that
10371         outer->outer->first_child must point to outer.
10372         * verify.c (verify_jvm_instructions): FIXME added to code for
10373         `athrow'.
10374         (verify_jvm_instructions): Do not assume that the last block
10375         processed in a subroutine is a block which ends with a `ret'
10376         instruction.  With some control flows it is possible that the last
10377         block ends with an `athrow'.
10378
10379 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10380
10381         * parse.y (qualify_ambiguous_name): Reorganized the post
10382         evaluation of non WFL leading expression nodes.
10383
10384 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10385
10386         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10387         CONVERT_EXPR.
10388
10389 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10390
10391         * parse.y (qualify_ambiguous_name): Handle qualified expression
10392         beginning with a STRING_CST.
10393
10394 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10395
10396         * parse.y (register_fields): Set DECL_INITIAL on both
10397         pre-initialized static and public fields.
10398         (resolve_field_access): Static field access expressions to always
10399         use pointer types.
10400         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10401         qualification. CONVERT_EXPR to be resolved as an expression name.
10402         (java_complete_lhs): Identify and access qualified final
10403         initialized field in switch statement case expression.
10404         (fold_constant_for_init): Pre-initialized field decl constant to
10405         be folded.
10406
10407 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10408
10409         * parse.y (note_possible_classname): Mark returned node with
10410         QUALIFIED_P only if the original class name contained a '/'.
10411
10412 1999-06-05  Anthony Green  <green@cygnus.com>
10413
10414         * Make-lang.in (gcjh): More parallel build fixes.
10415
10416 1999-06-03  Mike Stump  <mrs@wrs.com>
10417
10418         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10419
10420 1999-06-02  Anthony Green  <green@cygnus.com>
10421
10422         * except.c (link_handler): Chain exception handlers in order.
10423
10424 1999-06-02  Anthony Green  <green@cygnus.com>
10425
10426         * expr.c (expand_byte_code): Fill unreachable bytecode regions
10427         with nops and process as usual in order to always set correct EH
10428         ranges.  Emit detailed warnings about unreachable bytecodes.
10429
10430 1999-06-02  Anthony Green  <green@cygnus.com>
10431
10432         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10433         constant.
10434
10435 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10436
10437         * parse.y (lookup_field_wrapper): Unified returned value to NULL
10438           or the searched field decl.
10439
10440 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10441
10442         * parse.y (fold_constant_for_init): Convert numerical constant
10443         values to the type of the assigned field.
10444
10445 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10446
10447         * expr.c (lookup_field): Relaxed the test on class loading error
10448         detection.
10449         * parse.y (fold_constant_for_init): Enabeled old code.
10450
10451 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10452
10453         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10454         decide the validity of the cast of a java.lang.Cloneable reference
10455         to an array.
10456         (patch_conditional_expr): Fixed first argument passed to
10457         binary_numeric_promotion.
10458
10459 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10460
10461         * parse.y (qualify_ambiguous_name): Take into account that a
10462         CONVERT_EXPR might specify a type as a WFL.
10463
10464 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10465
10466         * parse.y (patch_assignment): Save the rhs before using it as an
10467         argument to _Jv_CheckArrayStore.
10468
10469 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10470
10471         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10472
10473 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10474
10475         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10476         floating point literal only when the exponent indicator has been
10477         parsed.
10478
10479 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10480
10481         * parse.y (formal_parameter:): Construct argument tree list
10482         element even if a yet unsupported final parameter was encountered.
10483
10484 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10485
10486         * parse.y (finish_method_declaration): Issue errors for native or
10487         abstract methods declared with a method body, as well as for non
10488         native or non abstract methods with no method body.
10489
10490 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10491
10492         * class.c (build_utf8_ref): Initialize variable `field'.
10493
10494         * decl.c (init_decl_processing): Initialize variable `field'.
10495
10496         * expr.c (build_known_method_ref): Mark parameters `method_type',
10497         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10498         (process_jvm_instruction): Likewise for parameter `length'.
10499
10500         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10501         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10502         ATTRIBUTE_UNUSED.
10503
10504         * parse.y (maybe_generate_clinit): Remove unused variable
10505         `has_non_primitive_fields'.
10506         (find_in_imports_on_demand): Initialize variables `node_to_use'
10507         and `cl'.
10508         (patch_binop): Likewise for variable `prom_type'.
10509         (patch_unaryop): Likewise for variable `prom_type'.
10510
10511         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10512
10513         * xref.c (xref_table): Add missing initializer.
10514
10515 1999-05-14  Tom Tromey  <tromey@cygnus.com>
10516
10517         * java-except.h (struct eh_range): Removed unused `next' member.
10518         * verify.c (verify_jvm_instructions): Call check_nested_ranges
10519         after adding all exception handlers.  Sort exception ranges in
10520         order of start PC.
10521         (struct pc_index): New structure.
10522         (start_pc_cmp): New function.
10523         * except.c (add_handler): Return `void'.  Don't call link_handler;
10524         instead construct an ordinary linked list and do range
10525         coalescing.
10526         (check_nested_ranges): New function.
10527         (link_handler): Changed interface to allow merging of eh_ranges.
10528         Split overlapping ranges.  Return `void'.
10529
10530 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10531
10532         * parse.y (constructor_block_end:): New rule, tagged <node>.
10533         (constructor_body:): Use `constructor_block_end' instead of
10534         `block_end'.
10535
10536 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10537
10538         * parse.y (statement_nsi:): Pop `for' statement block.
10539         (java_complete_lhs): Labeled blocks containing no statement are
10540         marked as completing normally.
10541
10542 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10543
10544         * xref.c (xref_set_current_fp): New function, defined.
10545         * xref.h (xref_set_current_fp): New function, prototyped.
10546
10547 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10548
10549         * check-init.c (check_init): Take into account that
10550         LABELED_BLOCK_STMT can be empty.
10551
10552 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10553
10554         * parse.y (java_check_regular_methods): Warning check on not
10555         overriding methods with default access in other packages does not
10556         apply to `<clinit>'.
10557         (java_complete_lhs): If block body is an empty_stmt_node, replace
10558         it by NULL_TREE. This prevents gcc from generating an irrelevant
10559         warning.
10560
10561 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10562
10563         * check-init.c (check_init): Removed code accepting to see things
10564         falling through default:, when doing xrefs.
10565         * java-tree.h (do_not_fold): New global variable, declared.
10566         * parse.y (do_not_fold): New global variable, defined.
10567         (java_complete_expand_method): Set `do_not_fold' to the value of
10568         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10569         and reinstall them after them have been purged; do not check for
10570         initializations; do not issue missing return errors.
10571         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10572         when doing xrefs.
10573         (patch_binop): Skip the fold part when doing xrefs.
10574         (build_string_concatenation): Skip the concatenation part when
10575         doing xrefs.
10576         (patch_synchronized_statement): Do not generate a try-finally when
10577         doing xrefs.
10578         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
10579         and keep the location where the throw was seen.
10580         * typeck.c (convert): When `do_not_fold' is set, do not attempt
10581         any treatment on the converted node an simply return a NOP_EXPR of
10582         the targeted type.
10583         * xref.c (xref_get_data): New function, defined.
10584         * xref.h (xref_get_data): New function, declared.
10585         (XREF_GET_DATA): Use xref_get_data.
10586
10587 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10588
10589         * gjavah.c (print_include): Cast the result of `strlen' to int
10590         when comparing against a signed value.
10591         (add_namelet): Likewise.
10592
10593 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10594
10595         * expr.c (expand_invoke): Mark parameter `nargs' with
10596         ATTRIBUTE_UNUSED.
10597         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
10598
10599         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
10600         ATTRIBUTE_UNUSED.
10601
10602         * jcf-reader.c (get_attribute): Cast a value to long
10603         when comparing against a signed expression.  Likewise.
10604
10605         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
10606         HOST_BITS_PER_CHAR.
10607
10608 1999-05-11  Andrew Haley  <aph@cygnus.com>
10609
10610         * parse.y (source_end_java_method): If the current method contains
10611         any exception handlers, force asynchronous_exceptions: this is
10612         necessary because signal handlers in libjava may throw exceptions.
10613         * decl.c (end_java_method): Ditto.
10614
10615 1999-05-11  Tom Tromey  <tromey@cygnus.com>
10616
10617         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
10618         flags.
10619         * jvspec.c (THREAD_NAME): Removed.
10620         (GC_NAME): Likewise.
10621         (MATHLIB): Likewise.
10622         (WITHLIBC): Likewise.
10623         (GCLIB): Likewise.
10624         (THREADLIB): Likewise.
10625         (MATH_LIBRARY): Likewise.
10626         (lang_specific_driver): Don't add `-l' options to command line.
10627         Instead, add a single --specs option.  Recognize `-L' options and
10628         use them to search for spec file.
10629         (find_spec_file): New function.
10630         (SPEC_FILE): New define.
10631
10632 1999-05-11  Dave Brolley  <brolley@cygnus.com>
10633
10634         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
10635         cpplib-enabled build.
10636
10637 1999-05-05  Per Bothner  <bothner@cygnus.com>
10638
10639         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
10640         temporarily zero it while calling rest_of_decl_compilation.
10641
10642         * java-tree.h (string_ptr_type_node):  Add declaration.
10643         * decl.c:  Define and initialize string_ptr_type_node.
10644         * parse.y (patch_string_cst):  Use string_ptr_type_node.
10645
10646         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
10647         * parse.y (for_statement):  Now unconditionally exit_block.
10648         (finish_labeled_statement):  No longer exit_block if for-loop.
10649         (patch_loop_statement):  Check harder if the loop is already labeled.
10650
10651         * parse.y (patch_initialized_static_field):  Removed function.
10652         (maybe_generate_clinit):  Removed special handling for interfaces.
10653         (java_complete_expand_methods):  Do a preliminary java_complete_tree
10654         on <clinit> to determine if it can be removed.
10655         (java_complete_expand_method):  Remove special handling for <clinit>.
10656         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
10657         optimize if we get back empty_stmt_node.
10658         For MODIFY_EXPR, re-do checking of static initializers.
10659         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
10660         For VAR_DECL, pass correct context.
10661
10662         * verify.c (verify_jvm_instructions):  Better error messages.
10663
10664 1999-05-03  Tom Tromey  <tromey@cygnus.com>
10665
10666         * parse-scan.y (interface_declaration): Call
10667         report_class_declaration for interfaces.
10668
10669 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
10670
10671         * Makefile.in: Remove -v from bison command lines.
10672
10673 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10674
10675         * check-init.c (check_init): Exclude a case of error when doing
10676         xrefs.
10677         * class.c (layout_class_method): Don't generate the error message
10678         twice when compiling from source.
10679         * lang-options.h: Added `-Wredundant-modifers' and
10680         `-Wunusupported-jdk11' flags and help text.
10681         * lang.c (lang_decode_option): Added support for
10682         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
10683         flag_static_local_jdk11 and flag_redundant set accordingly.
10684         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
10685         * parse.h (EXPR_WFL_ADD_COL): New macro.
10686         (DECL_END_SOURCE_LINE): Likewise.
10687         (DECL_INHERITED_SOURCE_LINE): Likewise.
10688         * parse.y (static_ref_err): New function, prototyped.
10689         (CCB_TK): Now tagged <operator>.
10690         (class_body:): Remember the location of the closing '}' of a class
10691         definition when doing xrefs.
10692         (block:): Likewise.
10693         (block_end:): Likewise.
10694         (create_class): Remember the location of the inherited class
10695         identifier when doing xrefs.
10696         (register_fields): Added test on first operand of `init' before
10697         testing it TREE_CODE.
10698         (method_header): Store the location of the class identifier in the
10699         class decl when doing xrefs.
10700         (finish_method_declaration): Don't combine first/last method line
10701         when doing xref.
10702         (java_check_regular_methods): Warning check on not overriding
10703         methods with default access on other packages move before check on
10704         static methods. Initialization of `aflags' also moved up.
10705         (resolve_expression_name): Call static_ref_err to report the error.
10706         (static_ref_err): New function, implemented.
10707         (resolve_field_access): Returned simplified static field access
10708         when doing xrefs.
10709         (resolve_qualified_expression_name): Check for illegal use of
10710         static fields in a non static context. Call static_ref_err to
10711         report error in various places.
10712         (java_complete_tree): Do not fold initialized static fields when
10713         doing xrefs.
10714         (java_complete_lhs): Likewise.
10715
10716 1999-04-29  Anthony Green  <green@cygnus.com>
10717
10718         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
10719         create internal labels.
10720         (lookup_label): Ditto.
10721
10722 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10723
10724         * class.c (layout_class_method): Generate <clinit>'s rtl for
10725         interfaces.
10726         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10727         for interfaces' <clinit>.
10728         * expr.c (lookup_field): Search for fields in interfaces.
10729         (expand_invoke): Fixed indentation.
10730         (expand_java_field_op): Likewise. Use IS_CLINIT.
10731         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
10732         (IS_CLINIT): New macro.
10733         * parse.y (type_declaration:): Call maybe_generate_clinit after an
10734         interface was parsed.
10735         (maybe_generate_clinit): Don't generate if the current class is an
10736         interface with only fields of primitive types.
10737         (reset_method_name): Use IS_CLINIT.
10738         (java_complete_expand_method): Expand <clinit> when it exists for
10739         interfaces. Use IS_CLINIT.
10740         (resolve_expression_name): Use DECL_CONTEXT instead of
10741         current_class to build static field references.
10742         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
10743         ARRAY_REF when doing xreferencing.
10744         (check_final_assignment): Fixed typo in leading comment. Use
10745         IS_CLINIT.
10746         (patch_array_ref): Don't fully expand array references when
10747         xreferencing.
10748         (patch_return): Use IS_CLINIT.
10749         (patch_throw_statement): Likewise.
10750
10751 1999-04-22  Tom Tromey  <tromey@cygnus.com>
10752
10753         * Make-lang.in (JAVA_SRCS): Added check-init.c.
10754
10755 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10756
10757         * decl.c (predef_filenames, predef_filenames_size): New globals
10758         (init_decl_processing): predef_filenames and predef_filenames_size
10759         initialized.
10760         * java-tree.h (predef_filenames, predef_filenames_size): Declared
10761         extern.
10762         * jcf-parse.c (predefined_filename_p): New function.
10763         (yyparse): Check that files on the command line are specified only
10764         once and issue a warning otherwise.
10765         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
10766         * parse.y (source_end_java_method): Nullify NOP method bodies, to
10767         avoid a gcc warning with -W -Wall turned on.
10768         (java_expand_classes): Abort if errors were encountered.
10769         (java_complete_lhs): If the cross reference flag is set, wrap
10770         field DECL node around a WFL when resolving expression name.
10771
10772 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10773
10774         * lang.c (lang_decode_option): Fixed returned value when parsing
10775         `-fxref=...' and `-Wall'.
10776         * parse.y (source_end_java_method): Do not generate code when
10777         flag_emit_xref is set.
10778         (resolve_expression_name): Do not build static field access when
10779         flag_emit_xref is set.
10780         (resolve_field_access): No special treatment on `length' when
10781         flag_emit_xref is set. Do not build qualified static field access
10782         when flag_emit_xref is set.
10783         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
10784         when flag_emit_xref is set.
10785         (patch_assignment): Do not generate array store runtime check when
10786         flag_emit_xref is set.
10787         * xref.c (xref_flag_value): Fixed function declaration
10788         indentation.
10789         (xset_set_data): New function.
10790         * xref.h (xref_set_data): Added prototype for new function.
10791         (typedef struct xref_flag_table): New field data.
10792         (XREF_GET_DATA): New macro.
10793
10794 1999-04-19  Tom Tromey  <tromey@cygnus.com>
10795
10796         * xref.h (enum): Removed trailing comma.
10797
10798         * parse.y (resolve_qualified_expression_name): Added missing
10799         `break'.
10800
10801 1999-04-15  Anthony Green  <green@cygnus.com>
10802
10803         * gjavah.c: New prototypes for java_float_finite and
10804         java_double_finite.
10805
10806 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10807
10808         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
10809         references.
10810
10811 1999-04-06  Jeffrey A Law  (law@cygnus.com)
10812
10813         * Makefile.in (TREE_H): Add tree-check.h.
10814         (RTL_H): Add genrtl.h.
10815
10816 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10817
10818         * parse.y (patch_assignment): Added ArrayStoreException runtime
10819         check.
10820
10821 1999-04-06  Per Bothner  <bothner@cygnus.com>
10822
10823         * expr.c (pop_type_0):  New function.
10824         (pop_type):  Use pop_type_0.
10825         * java-tree.h (pop_type_0):  New declaration.
10826         * verify.c (verify_jvm_instructions):  Check return instructions.
10827
10828         * parse.y (patch_binop):  Don't fold if non-constant and emiting
10829         class files.
10830
10831 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10832
10833         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
10834
10835         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
10836         (main_jcf): Don't define.
10837         (process_file): Don't set `main_jcf'.
10838
10839         * java-tree.h (main_jcf): Don't declare.
10840
10841         * jcf-parse.c (main_jcf): Add static definition.
10842
10843         * lang.c (main_jcf): Don't define.
10844
10845 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10846
10847         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
10848
10849         * decl.c (copy_lang_decl): Likewise for `bcopy'.
10850
10851         * jcf-depend.c: Include "config.h", not <config.h>.
10852
10853         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
10854         `bcopy' to PTR.
10855
10856         * jcf-path.c: Include "config.h", not <config.h>.
10857
10858         * lex.c: Don't include various system header files.
10859         (java_init_lex): Cast the argument of `bzero' to PTR
10860
10861         * parse-scan.y (java_push_parser_context): Likewise.
10862
10863         * parse.y (java_push_parser_context): Likewise.
10864         (patch_bc_statement): Match format specifier to variable argument.
10865
10866         * xref.c: Don't include <stdio.h>.
10867
10868 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10869
10870         * parse.y (struct parser_ctxt *ctxp): Now global.
10871         (declare_local_variables): Use WFL compound value for the
10872         declaration source line value, when doing cross-referencing.
10873
10874 1999-03-31  Tom Tromey  <tromey@cygnus.com>
10875
10876         * gjavah.c (print_field_info): Allow constants of other types.
10877         (print_include): Generate include when new name is proper prefix
10878         of already printed name.
10879         (add_namelet): Likewise.
10880         (cxx_keyword_subst): New function.
10881         (print_method_info): Use it.
10882         (print_field_name): New function.
10883         (get_field_name): New function.
10884         (print_field_info): Use get_field_name and print_field_name.
10885
10886 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10887
10888         * Makefile.in (keyword.h): Generate using gperf language 'C', not
10889         'KR-C', so gperf uses the `const' keyword on strings.
10890
10891         * keyword.gperf (java_keyword): Const-ify a char*.
10892
10893 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10894
10895         * parse.y (patch_bc_statement): Fixed identation and a bogus
10896         `printf' format.
10897
10898 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10899
10900         * parse.y (patch_assignment): Allow static variables in other
10901         classes to be assigned.
10902
10903 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10904
10905         * class.c (maybe_add_interface): Remove unused variable
10906         `interface_binfo'.
10907         (make_class_data): Use = for assignment, not ==.  Likewise.
10908         (emit_register_classes): Remove unused variable `decl'.
10909
10910         * lex.c: Fix comment so as not to contain an embedded `/*'.
10911
10912         * verify.c (verify_jvm_instructions): Remove unused variable
10913         `self_type'.
10914
10915 1999-03-27  Per Bothner  <bothner@cygnus.com>
10916
10917         * parse.y (complete_loop_body):  Rename to finish_loop_body.
10918         (complete_labeled_statement):  Rename to finish_labeled_statement.
10919         (complete_for_loop):  Rename to finish_for_loop.
10920         (complete_method_declaration):  Rename to finish_method_declaration.
10921
10922         * java-tree.h (continue_identifier_node):  New global node.
10923         * decl.c:  Define and initialize continue_identifier_node.
10924         * parse.y (generate_labeled_block):  Remove - no longer needed.
10925         (build_loop_body):  Use continue_identifier_node for continue block.
10926         (finish_labeled_statement):  Also do pop_labeled_block actions.
10927         (java_complete_lhs):  POP_LOOP even if error.
10928         (build_labeled_block):  Special handling for continue_identifier_node.
10929         (patch_loop_statement):  Re-organize.
10930         (patch_bc_statement):  Re-write.
10931
10932 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10933
10934         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
10935         using a WFL compound value.
10936         * parse.y (xref.h): Include.
10937         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
10938         WFL compound value.
10939         (register_fields): Set WFL compound value to lineno if doing
10940         xrefs.
10941         (java_complete_expand_method): Call expand_xref if flag_emit_xref
10942         is set.
10943         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
10944         * xref.h (expand_xref): Prototype renamed from xref_generate.
10945
10946 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10947
10948         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
10949         (GET_CURRENT_BLOCK): New macro.
10950         * parse.y (current_static_block): New global variable.
10951         (method_body:): Define action.
10952         (complete_method_declaration): Set current_function_decl to NULL
10953         when work on the current method is done.
10954         (declare_local_variables): Use GET_CURRENT_BLOCK.
10955         (java_method_add_stmt): Likewise.
10956         (java_complete_expand_method): Disable the use of `this' when
10957         expanding <clinit>.
10958         (enter_a_block): If no current method exist, use
10959         current_static_block to link static initializer blocks.
10960         (exit_block): Rewritten to use current_static_block when no current
10961         method decl exists.
10962         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
10963         (patch_return): Forbid the use of `return' in static initializers.
10964         (patch_throw_statement): Fixed indentation. Issue specific error
10965         for uncaught thrown checked exception in static initializer
10966         blocks. Removed FIXME.
10967
10968 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
10969
10970         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
10971         Link gcj from gcc.o.
10972
10973 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10974
10975         * parse.y (find_applicable_accessible_methods_list): When dealing
10976         with interface: ensure that a given interface or java.lang.Object
10977         are searched only once.
10978
10979 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10980
10981         * gjavah.c (print_c_decl): Remove unused argument `flags'.
10982
10983         * jcf-dump.c (print_access_flags): Add braces around if-else.
10984
10985         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
10986         COMBINE_INPUTS.
10987
10988         * lex.c (build_wfl_node): Add static prototype.
10989
10990         * lex.h (build_wfl_node): Remove static prototype.
10991
10992         * parse.y: Include lex.c early enough to declare everything needed.
10993         Ensure calls to `build_wfl_node' pass the proper arguments.
10994         (create_class): Remove unused variable `super_decl'.
10995         (get_printable_method_name): Initialize variable `name'.
10996
10997 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10998
10999         * Changelog: Fixed 1999-03-22 typos.
11000         * lang.c (lang_decode_option): Fixed typo in error string in the
11001         XARG section.
11002
11003 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11004
11005         * Makefile.in (JAVA_OBJS): Added entry xref.o.
11006         (xref.o): New rule.
11007         * java-tree.h (flag_emit_xref): Declared extern.
11008         * lang.c (xref.h): Included.
11009         (flag_emit_xref): New global variable.
11010         (lang_decode_option): Added support for -fxref.
11011         * xref.c: Created.
11012         * xref.h: Likewise.
11013
11014 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
11015
11016         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11017         linked with.
11018
11019 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11020
11021         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11022         $(srcdir)/../system.h and $(JAVA_TREE_H).
11023         (jcf-io.o): Depend on $(JAVA_TREE_H).
11024         (mangle.o): Likewise.
11025
11026         * check-init.c (check_cond_init): Add static prototype.
11027
11028         * class.c (build_java_method_type, hashUtf8String,
11029         make_field_value, get_dispatch_vector, get_dispatch_table,
11030         append_gpp_mangled_type, mangle_static_field): Likewise.
11031         (strLengthUtf8): Hide unused definition.
11032         (hashUtf8String): Const-ify.
11033         (make_field_value): Un-ANSI-fy.
11034
11035         * constants.c: Move inclusion of jcf.h above java-tree.h.
11036         (set_constant_entry, find_class_or_string_constant,
11037         find_name_and_type_constant, get_tag_node,
11038         build_constant_data_ref): Add static prototype.
11039
11040         * decl.c (push_jvm_slot, builtin_function,
11041         lookup_name_current_level): Likewise.
11042         (builtin_function): Const-ify.
11043
11044         * except.c (expand_start_java_handler, expand_end_java_handler):
11045         Add static prototype.
11046
11047         * expr.c (flush_quick_stack, push_value, pop_value,
11048         java_stack_swap, java_stack_dup, build_java_athrow,
11049         build_java_jsr, build_java_ret, expand_java_multianewarray,
11050         expand_java_arraystore, expand_java_arrayload,
11051         expand_java_array_length, build_java_monitor, expand_java_pushc,
11052         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11053         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11054         expand_compare, expand_test, expand_cond, expand_java_goto,
11055         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11056         expand_java_field_op, java_push_constant_from_pool): Likewise.
11057
11058         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11059         (build_java_arraynull_check): Mark parameters `node' and `type'
11060         with ATTRIBUTE_UNUSED.
11061         (note_label): Likewise for parameter `current_pc'.
11062         (expand_java_call, expand_java_ret): Hide unused definition.
11063
11064         * java-tree.h (make_class, build_constants_constructor,
11065         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11066         init_outgoing_cpool, register_class, emit_register_classes,
11067         java_layout_seen_class_methods): Prototype.
11068         (unicode_mangling_length): Const-ify.
11069         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11070         emit_unicode_mangled_name, format_int, format_uint,
11071         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11072         jcf_print_utf8_replace, open_class): Prototype.
11073
11074         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
11075         <stdio.h>.  Include tree.h/java-tree.h.
11076         (utf8_equal_string usage, process_class): Add static prototype.
11077         (open_class): Don't prototype this here.
11078         (utf8_equal_string): Match arguments to format specifiers.
11079         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11080         TABLE_SWITCH, disassemble_method): Likewise.
11081
11082         * jcf-io.c: Include tree.h/java-tree.h.
11083         (open_class, find_classfile, jcf_print_utf8,
11084         jcf_print_utf8_replace): Const-ify.
11085
11086         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11087         parse_class_file): Add static prototype.
11088         (find_in_current_zip): Match definition to existing static
11089         prototype.
11090
11091         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11092         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11093         finish_jcf_block, define_jcf_label, get_jcf_label_here,
11094         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11095         write_chunks, adjust_typed_op, generate_bytecode_conditional,
11096         generate_bytecode_return, perform_relocations, init_jcf_state,
11097         init_jcf_method, release_jcf_state, generate_classfile):
11098         Add static prototype.
11099         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11100         (make_class_file_name): Const-ify.
11101
11102         * jcf.h (find_classfile): Const-ify.
11103
11104         * jv-scan.c (reset_report): Remove prototype.
11105
11106         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11107         (error): Rewrite to allow varargs.
11108
11109         * lang.c (lang_f_options): Const-ify.
11110
11111         * lex.c (java_parse_escape_sequence): Add static prototype.
11112         (java_allocate_new_line): Match definition to existing static
11113         prototype.
11114
11115         * mangle.c Include tree.h/java-tree.h.
11116         (unicode_mangling_length, emit_unicode_mangled_name,
11117         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11118
11119         * parse.h (jdep_code): Remove trailing comma in enumeration.
11120         (java_get_line_col): Move prototype outside of !JC1_LITE test.
11121         (reset_report): Add prototype.
11122
11123         * verify.c (push_pending_label, merge_types): Add static
11124         prototypes.
11125
11126         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11127
11128 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11129
11130         * parse.y (find_applicable_accessible_methods_list): Extend the
11131         search to superinterfaces when relevant.
11132         (search_applicable_methods_list): New function.
11133
11134 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11135
11136         * class.c (unmangle_classname): Implemented stricter testing
11137         before setting the QUALIFIED_P flag on an identifier.
11138
11139 1999-03-16  Per Bothner  <bothner@cygnus.com>
11140
11141         * parse.y (java_complete_lhs):  Call force_evaluation_order
11142         after patch_newarray.
11143         (patch_binop):  Don't call fold if there are side effects.
11144
11145 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11146
11147         * parse.y (java_stabilize_reference): Use save_expr instead of
11148         building a SAVE_EXPR node.
11149         (java_complete_lhs): Patch the resulting string of the `+='
11150         operator (if necessary) and complete the RHS after having built
11151         the cast.
11152
11153 1999-03-15  Per Bothner  <bothner@cygnus.com>
11154
11155         * class.c (make_class):  Don't set CLASS_P here (because
11156         this function is also called by build_java_array_type).
11157         (push_class):  Set CLASS_P here instead.
11158         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
11159
11160         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
11161         context.  If the context is class, perfer "super" over "synchronized".
11162         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
11163
11164         * parse.y (create_class):  Don't call parser_check_super here;
11165         it is not robust.  Always wait until later.
11166
11167         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
11168         match what JDK 1.2 does), but don't set ACC_PUBLIC.
11169
11170 1999-03-13  Per Bothner  <bothner@cygnus.com>
11171
11172         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
11173         * lex.h (UNGETC):  Change misleading macro.
11174
11175 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11176
11177         * parse.y (java_stabilize_reference): Return NODE when patching a
11178         COMPOUND_EXPR.
11179         (java_complete_lhs): Put parenthesis around truth values.
11180
11181 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11182
11183         * class.c (layout_class_method): Don't make rtl for interface
11184         methods.
11185         * parse.h (GET_TYPE_NAME): New macro.
11186         * parse.y (if_then_statement:): Fixed indentation.
11187         (if_then_else_statement:): Likewise.
11188         (for_statement:): Fixed spacing.
11189         (try_statement:): Fixed indentation.
11190         (create_interface): Don't force interfaces to be abstract.
11191         (method_header): Abstract methods are OK in interfaces.
11192         (declare_local_variables): Fixed typo in comment.
11193         (java_complete_expand_method): Fixed indentation.
11194         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11195         non accessible fields.
11196         (java_stabilize_reference): New function.
11197         (java_complete_lhs): Fixed indentation. Use
11198         java_stabilize_reference in compound assignment. Insert the
11199         cast. If not processing `+' fix string constants before processing
11200         binop.
11201
11202 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11203
11204         * constants.c (find_class_or_string_constant): Cast variable `j'
11205         to a `jword' when comparing against one.
11206
11207         * expr.c (java_lang_expand_expr): Remove unused variables
11208         `has_finally_p' and `op0'.
11209
11210         * gjavah.c (print_field_info): Cast a value to jint when comparing
11211         against one.  Likewise for a jlong.
11212         (add_namelet): Likewise cast a `sizeof' to an int when comparing
11213         against a signed quantity.
11214
11215         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11216         (print_signature): Don't needlessly dereference variable `str'
11217
11218         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11219         `max_locals' with ATTRIBUTE_UNUSED.
11220         (jcf_parse_class): Likewise for variable `index'.
11221
11222         * parse.h (reverse_jdep_list): Remove static prototype.
11223
11224         * parse.y (build_jump_to_finally): Remove prototype and definition.
11225         (reverse_jdep_list): Add static prototype.
11226
11227         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11228         `assignment' and `expr_decl'.
11229
11230         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11231
11232 1999-03-12  Andrew Haley  <aph@cygnus.com>
11233
11234         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11235         we'll need a directory separator and a null character.
11236
11237 1999-03-10  Per Bothner  <bothner@cygnus.com>
11238
11239         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
11240
11241   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11242
11243         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11244         interfaces.
11245
11246 1999-03-05  Per Bothner  <bothner@cygnus.com>
11247
11248         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
11249
11250         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
11251
11252         * class.c (layout_class_method):  A static method in a base class
11253         is never overridden, so treat it like it doesn't exist.
11254         However, do complain about private non-static method overriding
11255         public static method.
11256
11257         * parse.y:  Don't set unused INITIALIZED_P flag.
11258         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
11259
11260         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
11261         (build_array_from_name):  Re-order &index[string] to &string[index].
11262
11263         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
11264         error_mark (it might catch more errors, but it is more likely to lose).
11265
11266 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11267
11268         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11269         (parse-scan.o): Depend on toplev.h.
11270
11271         * class.c (make_method_value): Add prototype.  Make it static.
11272         Remove unused second argument, caller changed.
11273
11274         * expr.c (java_lang_expand_expr): Remove unused variable
11275         `return_label'.
11276
11277         * java-tree.h: Don't prototype find_in_current_zip.
11278         Add prototypes for verify_constant_pool, start_java_method,
11279         end_java_method, give_name_to_locals, expand_byte_code,
11280         open_in_zip, set_constant_value, find_constant1, find_constant2,
11281         find_utf8_constant, find_string_constant, find_class_constant,
11282         find_fieldref_index, find_methodref_index, write_constant_pool,
11283         count_constant_pool_bytes and encode_newarray_type.
11284
11285         * jcf-dump.c: Remove unused variable `LONG_temp'.
11286
11287         * jcf-parse.c: Include parse.h.
11288         (jcf_parse_source): Remove unused parameter, all callers changed.
11289         (jcf_figure_file_type): Add static prototype.
11290         (find_in_current_zip): Likewise.  Also remove unused parameter,
11291         all callers changed.
11292         (read_class): Initialize variable `saved_pos'.
11293
11294         * jcf-reader.c (jcf_parse_preamble): Mark variables
11295         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11296
11297         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11298         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11299         (java_parse_doc_section): Initialize variable `seen_star'.
11300         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11301         (java_lex_error): Mark parameters `msg' and `forward' with
11302         ATTRIBUTE_UNUSED.
11303         (java_get_line_col): Mark parameters `filename' and `line' with
11304         ATTRIBUTE_UNUSED.
11305
11306         * parse-scan.y: Include toplev.h.
11307         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11308
11309         * parse.h: use `struct JCF', not plain `JCF'.
11310         (java_parser_context_save_global, java_expand_classes
11311         java_parser_context_restore_global, java_parse): Add prototypes.
11312
11313         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11314         `node'.
11315
11316 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
11317
11318         *  check-init.c (check_init):  COPYN takes word count, not bit count.
11319
11320 1999-02-26  Per Bothner  <bothner@cygnus.com>
11321
11322         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
11323         explicit build_decl.  (Avoids crash in reload when optimizing.)
11324
11325 1999-02-25  Per Bothner  <bothner@cygnus.com>
11326
11327         * decl.c (complete_start_java_method):  Handle synchronized method
11328         even when compiling from bytecode.
11329
11330 1999-02-26  Tom Tromey  <tromey@cygnus.com>
11331
11332         * gjavah.c (add_class_decl): Only generate `#include' if outer
11333         class is not the name of the class we are processing.  Correctly
11334         append `.h' in #include.
11335         (process_file): Clean up newlines around generated `#include's.
11336         (decode_signature_piece): Correctly handle inner classes.
11337         (struct include): New structure.
11338         (all_includes): New global.
11339         (print_include): New function.
11340         (add_class_decl): Use it.
11341         (process_file): Likewise.
11342         (add_class_decl): Generate include for java-array.h if array
11343         seen.
11344         (process_file): Don't generate java-array.h include.
11345
11346         * gjavah.c (add_namelet): Check for standard package names here.
11347         (add_class_decl): Don't check for standard package names here.
11348
11349 1999-02-25  Tom Tromey  <tromey@cygnus.com>
11350
11351         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11352         When reading a zip file, only use strncmp if both strings are
11353         bigger than the buffer length.  Initialize `k' when looping
11354         through zip file.
11355
11356 1999-02-24  Tom Tromey  <tromey@cygnus.com>
11357
11358         * gjavah.c (struct namelet): New structure.
11359         (add_namelet): New function.
11360         (print_namelet): New function.
11361         (print_class_decls): Use add_namelet and print_namelet to generate
11362         namespaces and not classes.
11363         (method_printed): New global.
11364         (HANDLE_END_METHOD): Examine method_printed.
11365         (print_method_info): Set method_printed when required.  Print
11366         error if function to be ignored is marked virtual.  Handle $finit$
11367         method.
11368         (METHOD_IS_FINAL): New macro.
11369         (print_field_info): Use it.
11370         (HANDLE_METHOD): Clear method_printed.
11371         (method_pass): New global.
11372         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11373         (process_file): Do two passes over both fields and methods.
11374         (HANDLE_METHOD): Examine method_pass.
11375         (root): New global.
11376         (add_class_decl): New function.
11377         (print_class_decls): Don't scan over entire constant pool.
11378
11379 1999-02-23  Tom Tromey  <tromey@cygnus.com>
11380
11381         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11382         disable linking in that case.
11383
11384 1999-02-20  Tom Tromey  <tromey@cygnus.com>
11385
11386         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11387         not 0x1f.
11388
11389 1999-02-21  Per Bothner  <bothner@cygnus.com>
11390
11391         * decl.c (build_result_decl), java-tree.h:  New method.
11392         (complete_start_java_method):  Handle synchronized methods.
11393         Don't build DECL_RESULT here.  (Ordering dependency problem.)
11394         (start_java_method):  Call build_result_decl here instead  ...
11395         * parse.y (java_complete_expand_method):  ... and here.
11396         (expand_start_java_method): Don't call complete_start_java_method here.
11397         (java_complete_expand_method):  Call it here instead.
11398         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
11399         * java-tree.h:  ... here.
11400
11401         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
11402         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
11403         for ARRAY_REF - it doesn't work when array bounds are checked.
11404         (patch_array_ref):  Handle it here instead.
11405
11406         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
11407
11408 1999-02-19  Per Bothner  <bothner@cygnus.com>
11409
11410         Force left-to-right evaluation of binary operations etc.
11411         * expr.c (force_evaluation_order), java-tree.h:  New function.
11412         * parse.y (java_complete_lhs):  Pass binary operations, procedure
11413         calls, and ARRAY_REFs to force_evaluation_order.
11414         (various):  Set TREE_SIDE_EFFECTS more carefully.
11415
11416         Tolerate random (non-UTF8) encoding in comments without complaining.
11417         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
11418         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
11419
11420         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
11421         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
11422
11423         * parse.y (java_complete_lhs):  Ignore an empty statement in a
11424         COMPOUND_EXPR.  Don't complain about empty statement after return.
11425
11426 1999-02-19  Per Bothner  <bothner@cygnus.com>
11427
11428         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
11429         in TREE_LIST - just chain the POINTER_TYPEs together.
11430         (resolve_class):  If type already resolved, return decl.
11431         After resolving, update TREE_TYPE(class_type), and name (if array).
11432         * parse.h (do_resolve_class), parse.y:  Make non-static.
11433         * class.c (maybe_layout_super_class):  Take this_class argument.
11434         Do do_resolve_class if necessary.
11435         (layout_class, layout_class_methods): Adjust calls appropriately.
11436         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11437         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
11438         * typeck.c (build_java_array_type):  Don't call layout_class.
11439
11440 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11441
11442         * parse.y (check_pkg_class_access): Allow private class access
11443         within the same package.
11444         (strip_out_static_field_access_decl): New function.
11445         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11446         operator argument before testing its nature.
11447
11448 1999-02-03  Per Bothner  <bothner@cygnus.com>
11449
11450         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
11451         (TRY_EXPR):  Simplify - it no longer has a finally clause.
11452         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
11453         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11454         * expr.c (java_lang_expand_expr):  Likewise.
11455         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
11456         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
11457         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
11458         (build_try_statement):  Remove finally parameter and handling.
11459         (build_try_finally_statement):  New function.
11460         (patch_try_statement):   No longer need to support finally clause.
11461         (try_statement):  Update grammar action rules.
11462         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
11463         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11464
11465 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
11466
11467         * jcf-parse.c (get_constant): Add braces around computation of 'd'
11468         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
11469
11470 1999-02-17  Andrew Haley  <aph@cygnus.com>
11471
11472         * class.c (build_utf8_ref): Back out broken patch which was
11473         intended to to output signatures using '.' as a separator.
11474
11475         * class.c (make_class_data): Output signatures using '.' as a
11476         separator, rather than '/'.
11477         (mangled_classname): Likewise.
11478         (make_field_value): Likewise.
11479         (make_method_value): Likewise.
11480         * constants.c (alloc_class_constant): Likewise.
11481         * expr.c (build_invokeinterface): Likewise.
11482
11483 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11484
11485         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11486         of an ancient workaround.
11487
11488 1999-02-10  Jeffrey A Law  (law@cygnus.com)
11489
11490         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
11491         here anymore.
11492
11493 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11494
11495         * lex.c (yylex): Encode \0 as UTF8.
11496
11497 1999-02-10  Tom Tromey  <tromey@cygnus.com>
11498
11499         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11500         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11501         (libgcj_zip): Renamed.
11502         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11503         LIBJAVA_ZIP_FILE.
11504         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11505
11506         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11507         (GC_NAME): Renamed -lgc to -lgcjgc.
11508
11509 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11510
11511         * lex.c (java_lang_cloneable): Initialize.
11512         * parse.y (java_lang_cloneable): New static variable.
11513         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11514         doing one more qualification round.
11515         (valid_ref_assignconv_cast_p): Reject null source or
11516         destination. Allow an array to be cast into java.lang.Cloneable.
11517         (patch_cast): Swapped two first arguments to first call to
11518         valid_ref_assignconv_cast_p.
11519
11520 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11521
11522         * parse.h: DECL_P renamed JDECL_P.
11523         * parse.y: DECL_P replaced by JDECL_P.
11524         (build_array_from_name): Always use pointer's type.
11525         (patch_bc_statement): Extra code to search continue target in a
11526         for loop. Fixed comments. Continue target is current loop when
11527         unlabeled.
11528
11529 1999-02-05  Andrew Haley  <aph@cygnus.com>
11530
11531         * class.c (make_class_data): The superclass of an interface should
11532         be null, not class Object.
11533
11534         * lex.c (java_lex): Sign extend hex literals.
11535
11536 1999-02-04  Andrew Haley  <aph@cygnus.com>
11537
11538         * class.c (build_utf8_ref): Output signatures using '.' as a
11539         separator, rather than '/'.
11540         (make_class_data): Likewise.
11541
11542 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
11543
11544         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11545         mkstemp.o.  Get them from libiberty now.
11546
11547 1999-02-02  Jeffrey A Law  (law@cygnus.com)
11548
11549         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11550
11551 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11552
11553         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11554         from libiberty.h
11555
11556 1999-02-02  Per Bothner  <bothner@cygnus.com>
11557
11558         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11559         * jcf-write.c (generate_bytecode_return):  New function.
11560         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
11561
11562         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
11563         generate special [fd]const_[01] instructions.
11564
11565         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
11566
11567         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
11568         handling OPCODE_lookupswitch or OPCODE_tableswitch.
11569
11570 1999-02-01  Per Bothner  <bothner@cygnus.com>
11571
11572         * parse.y (patch_method_invocation):  Handle calling static methods,
11573         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11574
11575         * parse.y (java_complete_lhs):  Don't complain about unreachable
11576         exit condition in a do-while statement.
11577
11578 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11579
11580         * lex.c (java_read_char): Fixed utf8 decoding.
11581         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
11582         range.
11583         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
11584         comments. Local variable `all_primitive' is gone. Broadened
11585         acceptance of `0' to floating point targets. `long' can now be
11586         widened to `double' or `float'.
11587         (valid_method_invocation_conversion_p): Added leading
11588         comment. Fixed tabulation.
11589         (build_string_concatenation): Optimize out left or right empty
11590         string constants.
11591
11592 1999-01-28  Per Bothner  <bothner@cygnus.com>
11593
11594         * jcf-write.c (localvar_alloc):  Only emit entry for
11595         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
11596         (generate_bytecode_insns):  Only call put_linenumber if
11597         debug_info_level > DINFO_LEVEL_NONE.
11598         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
11599         is specified, add -g1 (for compatibility wih javac).
11600
11601 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
11602
11603         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
11604         gjavah.o, check-init.o, jv-scan.o
11605
11606 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11607
11608         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
11609
11610         * gjavah.c: Include config.h and system.h.
11611
11612         * javaop.h (inline): Don't define, its handled by system.h.
11613         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
11614         from `inline' to `static inline'.
11615
11616         * jcf.h (inline): Don't define, its handled by system.h.
11617
11618         * lex.c (inline): Likewise.
11619
11620 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
11621
11622         * lang-specs.h: Map -Qn to -fno-ident.
11623
11624 1999-01-29  Richard Henderson  <rth@cygnus.com>
11625
11626         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
11627
11628 1999-01-29  Tom Tromey  <tromey@cygnus.com>
11629
11630         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
11631         then cast it to Object before calling `append' method.
11632
11633 1999-01-28  Per Bothner  <bothner@cygnus.com>
11634
11635         * check-init.c (check_bool2_init, check_bool_init, check_init):
11636         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
11637         * jcf-write.c (generate_bytecode_insns):  Likewise.
11638
11639 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11640
11641         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
11642         * parse.y (patch_cast): Allow a boolean to be cast into a
11643         boolean.
11644
11645 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11646
11647         * parse.y: (class_declaration:): Fixed indentation.
11648         (class_member_declaration:): Extra `;' after field declaration now
11649         accepted.
11650         (interface_declaration:): Removed debug messages in error reports.
11651         (patch_binop): Nodes created and returned inherit the orignal
11652         node's COMPOUND_ASSIGN_P flag value.
11653         (patch_cast): Fix cast from char to floating point.
11654
11655 1999-01-25  Andrew Haley  <aph@cygnus.com>
11656
11657         * except.c, java-except.h (expand_resume_after_catch): new
11658         function.
11659         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
11660         to branch back to main flow of control after a catch block.
11661
11662 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11663
11664         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
11665         $(srcdir)/../system.h.
11666         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
11667         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
11668         (jcf-write.o): Likewise.
11669         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11670         (mangle.o): Depend on $(srcdir)/../toplev.h.
11671         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11672         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11673
11674         * class.c: Include output.h and parse.h.
11675         (mangled_classname): Add the `const' keyword to a char*.
11676         (find_named_method): Hide unused function definition.
11677         (build_utf8_ref): Change type of variable `c' to unsigned char.
11678         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
11679         (build_class_ref): Add the `const' keyword to a char*.
11680         (layout_class_method): Remove unused variable `buf'.
11681
11682         * decl.c (find_local_variable): Remove unused variable `rtl'.
11683         (pushdecl): Likewise for variables `different_binding_level' and
11684         `oldglobal'.
11685         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
11686         (maybe_build_cleanup): Likewise for parameter `decl'.
11687
11688         * except.c (expand_start_java_handler): Mark parameter `range'
11689         with ATTRIBUTE_UNUSED.
11690
11691         * expr.c: Include except.h.
11692         (pop_type): Remove unused variable `i'.
11693         (pop_value): Likewise for variables `n_words' and `i'.
11694         (expand_java_arrayload): Likewise for variable `convert'.
11695         (java_lang_expand_expr): Likewise for variables `op0', `type',
11696         `mode', `unsignedp', `node' and `elements'.
11697         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
11698         `eh_ranges'.
11699         (process_jvm_instruction): Add a `const' qualifier to a char*.
11700
11701         * gjavah.c (output_directory): Add the `const' keyword to a char*.
11702         (temp_directory): Likewise.
11703         (print_c_decl): Likewise.
11704         (print_method_info): Likewise.
11705         (decode_signature_piece): Likewise.
11706         (print_mangled_classname): Likewise.
11707
11708         * java-except.h: Provide prototypes for maybe_start_try,
11709         maybe_end_try and add_handler.
11710
11711         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
11712         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
11713         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
11714         init_expr_processing, push_super_field, init_class_processing,
11715         can_widen_reference_to, class_depth, verify_jvm_instructions,
11716         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
11717         set_local_type, merge_type_state, push_type, load_type_state,
11718         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
11719         emit_unicode_mangled_name): Add prototypes.
11720
11721         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
11722         (print_signature_type): Use ISDIGIT, not isdigit.
11723         (print_signature): Remove unused variable `j'.
11724
11725         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
11726         int when comparing against one.
11727
11728         * jcf-parse.c: Include toplev.h.
11729
11730         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
11731         (localvar_free): Remove unused variable `i'.
11732         (generate_bytecode_conditional): Likewise for variable `kind'.
11733
11734         * jv-scan.c: Include config.h and system.h.  Remove redundant
11735         OS header and gansidecl.h includes.
11736         (warning): Add the `const' keyword to a char*.  Also add
11737         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
11738         __STDC__, when determining whether to use ANSI-isms.
11739         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
11740         (xmalloc): Don't redundantly prototype here.
11741         (main): Remove unused parameter `envp'.  Also fix the arguments
11742         passed to function `fatal' to match the format specifier.
11743
11744         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
11745
11746         * mangle.c: Include toplev.h.
11747         (emit_unicode_mangled_name): Declare parameter `len'.
11748
11749         * parse.y (parse_warning_context): Add the `const' keyword to a
11750         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
11751         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
11752         (issue_warning_error_from_context): Add the `const' keyword to
11753         a char*.
11754         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
11755         not `__STDC__' for whether to use ANSI-isms.
11756
11757         * typeck.c (incomplete_type_error): Mark parameters `value' and
11758         `type' with ATTRIBUTE_UNUSED.
11759         (parse_signature_type): Use ISDIGIT, not isdigit.
11760
11761         * verify.c (check_pending_block): Add the `const' keyword to a char*.
11762         (verify_jvm_instructions): Likewise.  Remove unused variables
11763         `field_name' and `default_val'.
11764
11765         * zextract.c: Include config.h and system.h.  Remove redundant
11766         OS header includes.
11767
11768         * zipfile.h: Prototype `read_zip_archive'.
11769
11770 1999-01-21  Andrew Haley  <aph@cygnus.com>
11771
11772         * typeck.c (convert): Allow conversions to void type: some
11773         optimizations in gcc do this.
11774
11775 1999-01-21  Andrew Haley  <aph@cygnus.com>
11776
11777         * typeck.c (convert_ieee_real_to_integer): New function.
11778         (convert): When not using fast-math and using hardware fp, convert
11779         an IEEE NaN to zero.
11780
11781 1999-01-18  Andrew Haley  <aph@cygnus.com>
11782
11783         * parse.y (patch_binop): Do a type conversion from signed to
11784         unsigned and then back to signed when a ">>>" is found.
11785
11786 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11787
11788         * java-tree.h: (check_for_initialization): Added prototype.
11789         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
11790         * parse.y (do_resolve_class): Removed unused locals.
11791         (read_import_dir): Likewise.
11792         (resolve_qualified_expression_name): Array creation
11793         expressions are valid primary expressions.
11794         (qualify_ambiguous_name): Likewise.
11795         (patch_synchronized_statement): Removed unused local.
11796
11797 1999-01-17  Jeffrey A Law  (law@cygnus.com)
11798
11799         * Makefile.in (zextract.o): Add dependencies.
11800
11801         * Makefile.in: Do not put ^Ls at the start of a line.
11802
11803 1999-01-15  Per Bothner  <bothner@cygnus.com>
11804
11805         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
11806         sub-type the result of the call that gets the exception value.
11807
11808         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
11809         don't call finish_class.
11810
11811         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
11812         clear found before continuing.
11813
11814         * verify.c (verify_jvm_instructions):  On an array load, allow
11815         and handle top of stack to be TYPE_NULL.
11816
11817         * gjavah.c (generate_access):  Translate Java package private or
11818         protected access to C++ public, but with a comment.
11819
11820 1999-01-13  Andrew Haley  <aph@cygnus.com>
11821
11822         * expr.c (generate_name): Name prefix changed to avoid clashes
11823         with assembler temp labels.
11824
11825         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
11826         MODIFY_EXPR.  Without this, code for the assignment may not be
11827         generated at all and the synchronized statement will read an
11828         uninitialized variable.
11829
11830 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11831
11832         * class.c (maybe_layout_super_class): Fixed returned value.
11833         * lex.c: Added 1999 to the copyright.
11834         (java_init_lex): Initialize java_lang_imported.
11835         * lex.h: Added 1999 to the copyright.
11836         * parse.h: Added 1999 to the copyright.
11837         (REGISTER_IMPORT): Fixed typo in trailing macro.
11838         (CURRENT_OSB): New macro.
11839         (struct parser_ctxt): New fields osb_depth, osb_limit.
11840         * parse.y (java_lang_id): New global variable.
11841         (type_import_on_demand_declaration): Don't import java.lang.* twice.
11842         (array_creation_expression:): Use CURRENT_OSB.
11843         (dims:): Uses a stack to keep track of array dimensions.
11844         (cast_expression:): Use CURRENT_OSB.
11845         (find_expr_with_wfl): Return NULL if node found doesn't meet the
11846         conditions.
11847         (register_fields): Fixed typos in comment.
11848         (check_method_redefinition): Fixed comment indentation.
11849         (java_check_regular_methods): Set saved found wfl to NULL after
11850         having reinstalled it in the previously found DECL_NAME.
11851
11852 1999-01-10  Richard Henderson  <rth@cygnus.com>
11853
11854         * gjavah.c (java_float_finite): Use a union to do type punning.
11855         (java_double_finite): Likewise.
11856
11857 1999-01-09  Per Bothner  <bothner@cygnus.com>
11858
11859         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
11860         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
11861         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
11862         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
11863         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
11864         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
11865
11866 1999-01-08  Per Bothner  <bothner@cygnus.com>
11867
11868         * check-init.c (check_init):  If compiling to native, we don't
11869         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
11870
11871 1999-01-08  Tom Tromey  <tromey@cygnus.com>
11872
11873         * parse-scan.y (variable_declarator_id): Set or increment
11874         bracket_count.
11875         (bracket_count): New global.
11876         (formal_parameter): Handle case where bracket pairs trail variable
11877         declarator id.
11878
11879 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
11880
11881         * jcf-parse.c (yyparse): variable len changed from a char to an
11882         int to prevent overflow.
11883
11884 1999-01-06  Per Bothner  <bothner@cygnus.com>
11885
11886         * java-tree.h:  Declare read_class.
11887         * jcf-parse.c (read_class):  New function.
11888         (load_class):  Now just call read_class.
11889
11890         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
11891         * jcf-parse.c (parse_source_file):  Declare save_error_count,
11892         which is needed by java_parse_abort_on_error macro,
11893         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
11894
11895         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
11896         constructor, if initializing a static field.
11897         (patch_new_array_init):  Set TREE_CONSTANT if it is.
11898         * expr.c (java_lang_expand_expr):  For a static array constructor
11899         of primitive elements, allocate the array itself statically.
11900         Disabled until we can set the vtable field statically.
11901
11902         * check-init.c:  New file.  Checks for definite assignment.
11903         * Makefile.in (JAVA_OBJS):  Add check-init.o.
11904         * parse.y (java_complete_expand_method): Call check_for_initialization.
11905         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
11906
11907 1999-01-06  Graham <grahams@rcp.co.uk>
11908
11909         * parse.y : include system.h instead of including
11910         standard headers directly with the exception of <dirent.h>.
11911
11912 1999-01-06  Per Bothner  <bothner@cygnus.com>
11913
11914         * lex.h:  Moved static function declarations to lex.c,
11915         to shut up some -Wall warnings.
11916         * lex.c:  Static function declarations moved here.
11917         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
11918
11919 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11920
11921         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
11922
11923 1998-12-22  Per Bothner  <bothner@cygnus.com>
11924
11925         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
11926         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
11927
11928         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
11929         (localvar_alloc):  Change return type to void,
11930         (emit_unop):  Remove unused variable size.
11931
11932         * jcf-write.c (struct jcf_block):  Add new union.
11933         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
11934         (call_cleanups):  New functions.
11935         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
11936         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
11937         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
11938         * lang.c (lang_init):  Call using_eh_for_cleanups.
11939         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
11940         completing operands to patch_synchronized_statement.
11941         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
11942         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
11943         WITH_CLEANUP_EXPR instead of TRY_EXPR.
11944
11945 1998-12-20  John F. Carr  <jfc@mit.edu>
11946
11947         * Make-lang.in: Comment out control-Ls; they upset some makes.
11948
11949 1998-12-18  Tom Tromey  <tromey@cygnus.com>
11950
11951         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
11952         consistently.
11953
11954 1998-12-17  Tom Tromey  <tromey@cygnus.com>
11955
11956         * parse.y (DIR_SEPARATOR): New define.
11957         (check_class_interface_creation): Use it.
11958
11959         * parse-scan.y (report_main_declaration): Recognize
11960         `java.lang.String' in argument to main.
11961
11962 1998-12-16  Per Bothner  <bothner@cygnus.com>
11963
11964         * parse.y (create_interface):  Remove bogus test.
11965
11966 1998-12-16  Per Bothner  <bothner@cygnus.com>
11967
11968         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
11969         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
11970
11971 1998-12-16  Tom Tromey  <tromey@cygnus.com>
11972
11973         * parse-scan.y (qualified_name): Use correct sprintf format.
11974
11975 1998-12-15  Tom Tromey  <tromey@cygnus.com>
11976
11977         * gjavah.c (print_field_info): Changed how most negative number is
11978         printed.
11979
11980 1998-12-14  Per Bothner  <bothner@cygnus.com>
11981
11982         * parse.y (fold_constant_for_init):  New function.
11983         (resolve_expression_name):  Don't replace static final
11984         constant-initialized fields by its value.
11985         (java_complete_lhs):  New.  Same as java_complete_tree, except does
11986         not replace static final constant-initialized fields by their values.
11987         (register_fields):  If there is an initializer, set DECL_INITIAL and
11988         MODIFY_EXPR_FROM_INITIALIZATION_P.
11989         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
11990         Only call patch_initialized_static_field if
11991         MODIFY_EXPR_FROM_INITIALIZATION_P.
11992         (patch_initialized_static_field):  If not valid constant, clear
11993         DECL_INITIAL.
11994
11995         * parse.y (lookup_field_wrapper):  Fix thinko.
11996
11997         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
11998         set and restore global lineno.
11999
12000 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12001
12002         * gjavah.c (print_field_info): If value to print is the smallest
12003         value of its size, then print as hex to avoid later warnings from
12004         C++ compiler.
12005
12006 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12007
12008         * gjavah.c (decompile_method): Decompile `return null'.
12009         (process_file): Generate `#pragma interface'.
12010         (method_declared): New global.
12011         (print_method_info): Set it.
12012         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12013         (print_method_info): Handle abstract methods.
12014
12015 1998-12-13  Per Bothner  <bothner@cygnus.com>
12016
12017         * parse.y (patch_method_invocation):  If class_decl is null
12018         (e.g. an array type), use original type.
12019
12020         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
12021         errors about uncaught exception from clone (of array, specifically).
12022
12023 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12024
12025         * gjavah.c (decompile_method): Handle all types of `return'
12026         opcode.  Decompile `return this' and `return'.
12027         (method_access): New global.
12028         (print_method_info): Set it.
12029         (decompile_method): Don't decompile a synchronized method.
12030
12031 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12032
12033         * jcf-reader.c (jcf_parse_one_method): Recognize
12034         HANDLE_END_METHOD.
12035         * gjavah.c (HANDLE_END_METHOD): New macro.
12036         (HANDLE_CODE_ATTRIBUTE): New macro.
12037         (decompile_method): New function.
12038         (print_method_info): Don't print `;\n' at end of function decl.
12039         Include java-opcodes.h.
12040         (decompiled): New global.
12041
12042 1998-12-12  Per Bothner  <bothner@cygnus.com>
12043
12044         * class.c (build_class_ref):  Handle PRIMTYPE.class if
12045         flag_emit_class_files.
12046         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
12047         if flag_emit_class_files.
12048         * parse.y (java_complete_tree):  Pre-liminary support for
12049         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12050
12051         * parse.y (patch_synchronized_statement):   Don't call monitorexit
12052         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
12053
12054         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
12055
12056         * zipfile.h (opendir_in_zip):  New declaration.
12057         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
12058         (opendir_in_zip):  New function, using code from open_in_zip.
12059         (open_in_zip):  Call opendir_in_zip.
12060         (find_class):  Remove no-longer-used do_class_file parameter,
12061         but add source_ok parameter.  Change logic so if we find a .java file,
12062         we don't look for .class in later classpath emtries.
12063         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
12064         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
12065         * gjavah.c: Update call to find_class.
12066         * jcf-dump.c:  Likewise.
12067
12068         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
12069         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
12070         nothing if body is empty_stmt_node.
12071         Various little fixes so SP gets correctly adjusted.
12072         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12073         For CALL_EXPR, test if static first.
12074         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
12075         such as the ones we create for Object and Class.
12076         Set and restore current_function_decl.
12077         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12078         (note_possible_classname):  New function.
12079         (read_import_entry):  Removed.  Merged with read_import_dir.
12080         (read_import_dir):  Don't call find_class - that only gives us
12081         the first classpath entry having the needed package.
12082         Use the struct buffer data structure from buffer.h.
12083         (read_import_dir, find_in_imports_on_demand):  The remembered
12084         class names now use '.' (not '/') as package separator.
12085
12086         * parse.y (java_complete_expand_methods):  Call write_classfile
12087         here, and not in java_expand_classes (which only gets first class).
12088
12089 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12090
12091         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
12092         (register_fields):  If a static fields has an initializer, just
12093         chain it on ctxp->static_initialized, and handle later.
12094         (java_complete_expand_methods):  Force <clinit> first.
12095         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
12096         - it's already been completed.
12097         (patch_initialized_static_field):  New function.
12098         (java_complete_field):  Call it.
12099
12100 1998-12-12  Per Bothner  <bothner@cygnus.com>
12101
12102         * expr.c (encode_newarray_type, build_new_array):  New functions.
12103         * java-tree.h:  Declare build_new_array.
12104         * jcf-write.c (patch_newarray):  Use build_new_array.
12105
12106         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
12107         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
12108
12109         * parse.y (patch_new_array_init):  Re-organize.
12110         Now is passed the actual array (pointer) type of the value.
12111         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12112         (patch_array_constructor):  Removed - merged into patch_new_array_init.
12113         (java_complete_tree):  Update patch_new_array_init.
12114
12115         * jcf-write.c (find_constant_index):  New function.
12116         (generate_bytecode_insns):  Use find_constant_index.
12117         (generate_classfile):  Use find_constant_index for ConstantValue.
12118
12119 1998-12-11  Tom Tromey  <tromey@cygnus.com>
12120
12121         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12122         * decl.c (init_decl_processing): Renamed dtable -> vtable.
12123         * class.c (make_class_data): Renamed dtable -> vtable, and
12124         dtable_method_count -> vtable_method_count.
12125
12126 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12127
12128         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12129         global variables, initialized.
12130         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12131         Declared new global variables.
12132         * lex.c (java_lex): Return long_zero_node, float_zero_node,
12133         double_zero_node, integer_zero_node upon direct matching.
12134         * parse.y (purify_type_name): Added function prototype.
12135         (duplicate_declaration_error_p): Consider new_type as potentially
12136         being a incomplete type. Use purify_type_name on type string.
12137         (method_header): saved_type: unused variable removed. Don't figure
12138         return type if method name is invalid.
12139         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12140         processed by patch_unaryop.
12141         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12142         increment/decrement node into its original type after binary
12143         numeric promotion on its operands.
12144
12145 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12146
12147         * parse.y (array_initializer:): Array init operand is NULL_TREE
12148         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12149         now an error. Fixed indentation problems.
12150         (patch_string): Handle error_mark_node as an argument.
12151         (patch_new_array_init): Fixed indentation problems.
12152         (array_constructor_check_entry): Removed check on null wfl_value.
12153         Return an error if wfl_value's walk returns an error.
12154
12155 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12156
12157         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12158         * lex.c (java_lex): Remember column position before advancing one
12159         token. Retain location information on OCB_TK.
12160         * lex.h (typedef struct java_lc): Added new field.
12161         * parse.h (GET_SKIP_TYPE): New macro.
12162         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12163         * parse.y (build_new_array_init, patch_new_array_init,
12164         patch_array_constructor, maybe_build_array_element_wfl,
12165         array_constructor_check_entry): New function prototypes.
12166         (switch_block:): Tagged <node>.
12167         (OCB_TK): Tagged <operator>.
12168         (array_initializer:): Installed actions.
12169         (variable_initializer): Build location information on element if
12170         necessary.
12171         (switch_statement:): Fixed indentation typo.
12172         (switch_block:): Redefined default action.
12173         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12174         (patch_assignment): Removed duplicate code.
12175         (maybe_build_array_element_wfl, build_new_array_init,
12176         patch_new_array_init, patch_array_constructor,
12177         array_constructor_check_entry): New functions.
12178
12179 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12180
12181         * parse.y (array_initializer): Tagged <node>.
12182         (variable_initializer:): Use default rule.
12183         (array_initializer:): Defined actions.
12184         (variable_initializers:): Likewise.
12185         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12186         non-static field accesses.
12187         (patch_invoke): Fixed indentation typo.
12188         (java_complete_tree): Likewise.
12189         (build_labeled_block): Changed leading comment. Generate an error
12190         in case of duplicate loop labels.
12191         (patch_conditional_expr): Patch results of string concatenation
12192         operations.
12193
12194 1998-12-06  Per Bothner  <bothner@cygnus.com>
12195
12196         * constants.c (find_methodref_index):  When the class is an interface,
12197         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12198
12199         * decl.c (finit_identifier_node):  Use "$finit$", rather than
12200         "<finit>" (which Sun's verifier rejects).
12201         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
12202         (generate_field_initialization_code):  Removed.
12203         (fix_constructors)  Don't add call to $finit$ here (wrong order).
12204         (patch_method_invocation):  Add $finit$ call here.
12205
12206         * java-tree.h (CALL_USING_SUPER):  New macro.
12207         * parse.y (patch_invoke):  Remove im local variable.
12208         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
12209         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
12210         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
12211
12212         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
12213
12214         * parse.y (java_complete_tree):  Don't complain about unreachable
12215         statement if it is empty_stmt_node.
12216
12217         * jcf-write.c (find_constant_wide):  New function.
12218         (push_long_const):  Use find_constant_wide.
12219
12220         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
12221         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
12222         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12223         Emit invokeinterface when calling an interface method.
12224         Emit invokespecial also when calling super or private methods.
12225
12226         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
12227
12228 1998-12-06  Per Bothner  <bothner@cygnus.com>
12229
12230         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
12231
12232 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12233
12234         * java-tree.h (java_layout_seen_class_methods): New function
12235         prototype.
12236         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12237         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12238         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12239         * parse.y (method_declarator:): Defined action.
12240         (issue_warning_error_from_context): input_filename saved, set to
12241         the appropriate value and restored after java_error is called.
12242         (build_unresolved_array_type): Fixed comment.
12243         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12244         (method_header): Deal with return type the same way type are
12245         handled for fields and method's parameters and local variables
12246         types are handled.
12247         (check_method_redefinition): Removed extra CR.
12248         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12249         (java_layout_seen_class_methods): New function.
12250         (java_layout_classes): Call java_layout_seen_class_methods.
12251
12252 1998-12-03  Per Bothner  <bothner@cygnus.com>
12253
12254         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
12255
12256 1998-12-03  Per Bothner  <bothner@cygnus.com>
12257
12258         * jcf-dump.c (main):  Fix error message.
12259         * jcf-path.c (add_entry):  Style fix.
12260
12261 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12262
12263         * class.c (layout_class_method): Call build_java_argument_signature
12264         on constructors too.
12265         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12266         (patch_method_invocation): Define a primary when resolving an
12267         expression name. Augmented comment on code checking illegal `this'
12268         usage. Loosened it test by accepting NEW_CLASS_EXPR.
12269
12270 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12271
12272         * class.c (layout_class_method): Don't report error on non-static
12273         overriding static if the method is private.
12274         * java-tree.h (finish_class): Prototype added.
12275         * lex.c (java_get_line_col): Handle col argument -2 value.
12276         * parse.h: All static method declarations moved to parse.y.
12277         * parse.y: Now contains all static method declarations previously
12278         found in parse.h.
12279         (find_expr_with_wfl, missing_return_error,
12280         unreachable_stmt_error): New functions.
12281         (java_get_real_method_name): Identify constructors bearing class
12282         names in source code compiled classes only.
12283         (java_complete_expand_methods): Call missing_return_error.
12284         (invocation_mode): Private methods invoked as static methods.
12285         (java_complete_tree): Call unreachable_stmt_error.
12286
12287 1998-12-01  Tom Tromey  <tromey@cygnus.com>
12288
12289         * Makefile.in (+target): Removed.
12290         (+xmake_file): Likewise.
12291         (+tmake_file): Likewise.
12292         (.NOEXPORT): Removed duplicate.
12293
12294 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12295
12296         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12297
12298         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
12299
12300         * jvgenmain.c: Remove the xmalloc prototype, we get it from
12301         libiberty.h.  Provide an xmalloc definition.
12302
12303         * jvspec.c: Remove the xmalloc prototype.
12304
12305         * parse-scan.y: Include config.h and system.h.  Don't include
12306         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
12307         Provide an xstrdup definition.
12308
12309 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
12310
12311         * jcf-path.c (add_entry): Recognize ".jar" too.
12312         * lang-specs.h: Likewise.
12313
12314 1998-11-26  Per Bothner  <bothner@cygnus.com>
12315
12316         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
12317         soft_monitorenter_node, soft_monitorexit_node, throw_node.
12318
12319         * jcf-write.c (generate_bytecode_insns):
12320         Handle pre/post-increment/decrement of long.
12321
12322         * jcf-write.c (generate_bytecode_insns):
12323         Handle missing exception handler (finally for synchronized).
12324
12325 1998-11-25  Per Bothner  <bothner@cygnus.com>
12326
12327         * java-tree.h (end_params_node):  Declare global.
12328         * decl.c (end_params_node):  New global.
12329         (init_decl_processing, start_java_method):  Use end_params_node for
12330         end of list of parameter types.  Follows correct gcc conventions.
12331         * expr.c (pop_argument_types, pop_arguments):  Likewise.
12332         * lang.c (put_decl_node):  Likewise.
12333         * typeck.c (various places):  Likewise.
12334         * class.y (various places):  Likewise.
12335         * parse.y (various places):  Likewise.
12336
12337         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
12338         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
12339
12340         * class.c:  Add #include flags.h, remove no-longer needed declaration.
12341
12342         * class.c (layout_class_method):  Remove commented-out code, re-format.
12343         Don't add vtable entry (or index) for private methods.
12344         * expr.c (expand_invoke):  A private method is implicitly final.
12345         * class.c (make_class_data):  If inlining or optimizing,
12346         skip private methods.
12347
12348         * class.c (finish_class):  New function.  Calls existing methods,
12349         but alls emits deferred inline functions.
12350         * jcf-parse.c (parse_class_file):  Call finish_class.
12351         * parse.y (java_complete_expand_methods):  Likewise.
12352
12353         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
12354
12355         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
12356
12357 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
12358
12359         * jcf-write.c (generate_bytecode_conditional): Fix typo.
12360
12361 1998-11-24  Per Bothner  <bothner@cygnus.com>
12362
12363         * (generate_classfile): Always write class access flag with
12364         ACC_SUPER set.
12365
12366 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12367
12368         * class.c (maybe_layout_super_class): New function.
12369         (layout_class): Reorganized. Loop on class methods dispatched into
12370         a new function. Call maybe_layout_super_class.
12371         (layout_class_methods, layout_class_method): New functions.
12372         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12373         class.
12374         (expand_invoke): Likewise.
12375         * java-tree.h (all_class_list): New global variable declared.
12376         (layout_class_methods, layout_class_method): New function
12377         prototypes.
12378         (LAYOUT_SEEN_CLASS_METHODS): New macro.
12379         * jcf-parse.c (all_class_list): New global variable.
12380         (load_class): Extended what class_or_name can be. Use parser
12381         context mechanism to save globals before calling jcf_parse.
12382         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12383         is set on the file name.
12384         (jcf_parse): Layout class methods when Object is loaded, otherwise
12385         record class in all_class_list for delayed method layout.
12386         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12387         * lang.c (put_decl_node): Decode <init> into the decl context
12388         class name.
12389         * lex.c (java_allocate_new_line): Use xmalloc.
12390         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12391         pointers, not TREE_LIST elements.
12392         (struct parser_ctxt): Fixed comment indentations, added comments
12393         and reordered some fields.
12394         (java_check_methods): Function prototype removed.
12395         * parse.y (java_push_parser_context): Use xmalloc.
12396         (java_parser_context_restore_global): Pop extra pushed ctxp only
12397         when there's nothing next.
12398         (maybe_create_class_interface_decl): Fixed comment, add new
12399         created class decl to all_class_list.
12400         (method_header): Use GET_REAL_TYPE on argument's types.
12401         (method_declarator): Use GET_REAL_TYPE, change type to the real
12402         type in TREE_LIST dependency node. Build argument list with the
12403         real type.
12404         (create_jdep_list): Use xmalloc. Removed allocation error message.
12405         (obtain_incomplete_type): Fixed leading comment. Broadened
12406         incoming argument meaning.
12407         (register_incomplete_type): Use xmalloc. Removed allocation error
12408         message.
12409         (safe_layout_class): Fixed leading comment.
12410         (jdep_resolve_class): Reversed if statement condition and switch
12411         if and else bodies.
12412         (resolve_and_layout): Fixed leading comment. Broadened incoming
12413         argument meaning.
12414         (complete_class_report_errors): New local variable name, for
12415         clarity. purify_type_name used for all error cases.
12416         (java_get_real_method_name): Stricter check on constructors.
12417         (java_check_regular_methods): Reverse methods list only if not
12418         already laid out. Layout artificial constructor.
12419         (java_check_methods): Deleted.
12420         (source_start_java_method): Obtain incomplete type for patchable
12421         method arguments.
12422         (java_layout_classes): Fixed leading comment. Use
12423         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12424         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12425         before returning. Fixed comments.
12426         (java_expand_classes): Check for errors up front.
12427         (patch_method_invocation): Class to search is resolved and laid
12428         out.
12429
12430 1998-11-24  Per Bothner  <bothner@cygnus.com>
12431
12432         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
12433
12434         * javaop.h (int8):  Removed - not used.
12435         (jbyte):  Redefine portably with correct signedness.
12436
12437         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
12438
12439         * jcf-write.c (generate_bytecode_insns):  Fix typo
12440         OPCODE_getstatic to OPCODE_getfield.
12441
12442         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
12443         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
12444         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12445
12446 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12447
12448         * jcf-parse.c (jcf_parse_source): Function returned type is
12449         void. Added prototype.
12450         (jcf_parse): Function returned type is void.
12451         (yyparse): Remove call to fclose on the last parsed file.
12452
12453         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12454
12455 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12456
12457         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12458         (layout_class): Cope with methods featuring WFL in decl names.
12459         * decl.c (unqualified_object_id_node): New global variable,
12460         initialized.
12461         (build_decl_no_layout): Removed.
12462         * expr.c (build_primtype_type_ref): Handle Double.
12463         (java_lang_expand_expr): Fixed indentations.
12464         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12465         (flag_wall, flag_redundant, flag_not_overriding,
12466         flag_static_local_jdk1_1, unqualified_object_id_node): Global
12467         variable declarations.
12468         (build_decl_no_layout): Removed prototype.
12469         (java_get_real_method_name): Added prototype.
12470         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12471         (java_parse_abort_on_error): Macro now just returns.
12472         * jcf-parse.c (jcf_parse_source): Check fclose returned
12473         value. Call emit_register_classes if java_report_errors returns
12474         zero.
12475         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12476         flag_static_local_jdk1_1): New integer flags.
12477         (lang_decode_option): New flags set here.
12478         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12479         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12480         the flag_redundant variable.
12481         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12482         when parsing java.lang.Object class.
12483         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12484         NULL_TREE to build.
12485         (resolve_qualified_expression_name): Fixed indentation.
12486         (patch_array_ref): Changed prototype.
12487         (not_initialized_as_it_should_p): Prototype removed.
12488         (java_report_errors): Added function prototype.
12489         * parse.y (formal_parameter:): Changed error message for not yet
12490         supported final parameters.
12491         (class_type_list:): Set both PURPOSE and VALUE of created
12492         TREE_LIST to be class_type.
12493         (primary_no_new_array:): Handle class literals on primitive types.
12494         (parse_warning_context): Reinstalled correct force_error and
12495         do_warning flags setups.
12496         (java_report_errors): Changed prototype. Return java_error_count
12497         value.
12498         (variable_redefinition_error): Consider treating variable type as
12499         a fake pointer.
12500         (create_interface): Warn about redundant abstract modifier if
12501         flag_redundant is set. Changed error message.
12502         (lookup_field_wrapper): Save/restore globals before/after looking
12503         up field.
12504         (duplicate_declaration_error_p): Consider treating declaration
12505         type as a fake pointer.
12506         (register_fields): Extract real type from dependency node. Check
12507         for duplicate field declaration after type adjustment. Use
12508         DECL_INITIAL to store static final initialized values.
12509         (method_header): Extract real function type from dependency node.
12510         (check_abstract_method_header): Use GET_METHOD_NAME.
12511         (obtain_incomplete_type): Layout fake pointer type.
12512         (safe_layout_class): Don't try to check for methods before layout.
12513         (java_complete_class): Don't check for correct throws clause
12514         elements inheritance here.
12515         (resolve_and_layout): Broadened name parameter meaning.
12516         (reset_method_name): Use GET_METHOD_NAME.
12517         (java_get_real_method_name): New function.
12518         (java_check_regular_methods): Don't check methods in
12519         java.lang.Object.  Verify lineage of throws clause elements. Use
12520         flag_no_overriding in warning report.
12521         (check_throws_clauses): Don't check if class was from
12522         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12523         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12524         (declare_local_variables): Use flag_static_local_jdk1_1 to report
12525         warning on unsupported final local variables. Use build_decl
12526         instead of build_decl_no_layout. Get real local variable type from
12527         dependency node.
12528         (source_start_java_method): Get real parameter type from
12529         dependency node. Call build_decl instead of build_decl_no_layout.
12530         (java_layout_classes): Reverse tree and layout type and class as
12531         required. Mark class as loaded when done.
12532         (resolve_field_access): Fixed indentation. Restricted condition
12533         leading to static field access code generation. Set field_type
12534         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12535         (resolve_qualified_expression_name): Initialize type_found to
12536         null. Handle static field resolved during qualification. Fixed
12537         layout on non primitive field decl types.
12538         (not_accessible_p): Fixed typo in comment.
12539         (patch_method_invocation): Resolve and layout class to search from
12540         type.
12541         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12542         layout non primitive type, if necessary. Make method node only to
12543         report errors.
12544         (find_applicable_accessible_methods_list): Consider WFL'ed method
12545         decl names. Fixed indentation.
12546         (argument_types_convertible): Resolve and layout target type if
12547         necessary.
12548         (java_complete_tree): Fixed indentation problems. Rewrote
12549         CALL_EXPR thrown exceptions check. Re-installed further processing
12550         of the assignment in certain cases.
12551         (patch_assignment): Call maybe_build_primttype_type_ref to perform
12552         inlining on class literals.
12553         (valid_builtin_assignconv_identity_widening_p): Cope with constant
12554         0 literal.
12555         (valid_method_invocation_conversion_p): Likewise.
12556         (patch_string): Temporary disable forbidden use of `this' in
12557         explicit constructor invocations when doing string concatenation
12558         within their scope.
12559         (patch_unaryop): Added comment. Reinstalled code to disable
12560         further check on assignment operation with cast expression RHS.
12561         (patch_switch_statement): Fixed indentation.
12562         (build_try_statement): Call build_decl instead of
12563         build_decl_no_layout.
12564         (patch_synchronized_statement): Likewise.
12565         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12566         IS_UNCHECKED_EXPRESSION_P.
12567         (check_thrown_exceptions_do): Changed leading comment. Resolve and
12568         layout argument exception type.
12569         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12570         of IS_UNCHECKED_EXPRESSION_P.
12571
12572 1998-11-18  Anthony Green  <green@cygnus.com>
12573
12574         * jcf-parse.c (yyparse): Open class file in binary mode.
12575
12576 1998-11-15  Per Bothner  <bothner@cygnus.com>
12577
12578         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
12579
12580         * jcf-write.c (perform_relocations):  Move check out one loop.
12581
12582 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
12583
12584         * Make-lang.in: Fix reference to srcdir.
12585         * jv-scan.c: Add missing xmalloc prototype.
12586         * jvgenmain.c: Ditto.
12587
12588 1998-11-15  Per Bothner  <bothner@cygnus.com>
12589
12590         * decl.c (error_mark_node), java-tree.h:  New global.
12591         * parse.y:  Use empty_stmt_node instead of size_zero_node.
12592         (build_if_else_statement):  If missing else, use empty_stmt_node.
12593
12594         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
12595         (java_complete_expand_method):  Complain if return is missing.
12596         (java_check_regular_methods):  Comment out incorrect error check.
12597         (not_accessible_p):  Fix incorrect handling of protected methods.
12598         (patch_method_invocation):  Pass correct context to not_accessible_p.
12599         (find_applicable_accessible_methods_list):  Likewise.
12600         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
12601         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
12602         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
12603         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
12604
12605         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
12606         (push_int_const):  Remove reundant NOTE_PUSH.
12607         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
12608         (- case SWITCH_EXPR):  Fix code generation bug.
12609         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
12610         (generate_classfile):  More robust for abstract methods.
12611
12612 1998-11-15  Anthony Green  <green@cygnus.com>
12613
12614         * Makefile.in: jv-scan and jvgenmain all require libiberty.
12615         * Make-lang.in: Ditto.
12616
12617         * jv-scan.c: Remove xmalloc and xstrdup definitions.
12618         * jvgenmain: Ditto.
12619
12620 1998-11-15  Per Bothner  <bothner@cygnus.com>
12621
12622         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
12623
12624         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
12625
12626 1998-11-14  Per Bothner  <bothner@cygnus.com>
12627
12628         Allow uses of interface types to verify.  This is not really
12629         type-safe, but it matches what Sun does, and is OK as long as
12630         there are appropriate run-time checks.
12631         * verify.c (merge_types):  If merging two interface types,
12632         just set the result to java.lang.Object.
12633         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
12634
12635 1998-11-13  Tom Tromey  <tromey@cygnus.com>
12636
12637         * gjavah.c (main): Handle --output-class-directory argument.
12638         * jvspec.c (lang_specific_driver): Translate `-d' into
12639         -foutput-class-dir.
12640         * jcf.h (jcf_write_base_directory): Declare.
12641         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
12642         * lang-options.h: Mention -foutput-class-dir.
12643         * jcf-write.c (jcf_write_base_directory): New global.
12644         (make_class_file_name): Put generated .class file into `-d'
12645         directory, or into source directory if -d not given.  Function now
12646         static.
12647         (write_classfile): Free class file name.  Handle case where class
12648         file name is NULL.
12649         (DIR_SEPARATOR): New macro.
12650         Include <sys/stat.h>
12651
12652         * Makefile.in (prefix): New macro.
12653
12654 1998-11-12  Per Bothner  <bothner@cygnus.com>
12655
12656         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
12657         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
12658         here (done in patch_invoke instead).
12659         (case_identity):  Moved here from parse.y.
12660
12661         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
12662         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
12663         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
12664         so they can be efficiently scanned without recursion.
12665         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
12666         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
12667         in BLOCK iteratively, rather than recursively.
12668
12669         * parse.y (do_unary_numeric_promotion):  New function.
12670         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
12671
12672         * parse.y (patch_newarray):  Various fixes.
12673
12674         Re-do handling of switch statements (for proper block scoping).
12675         * parse.y:  Add just a single block for the enture switch block,
12676         but don't create any "case blocks".
12677         (group_of_labels):  Rmeoved unneeded non-terminal.
12678         CASE_EXPR and DEFAULT_EXPR are added to current block.
12679         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
12680         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
12681         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
12682         * parse.y (wfl_operator, print_int_node): Make non-static.
12683         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
12684         as part of recursive scan of block.
12685         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
12686         (patch_switch_statement):  Most tests move dinto java_complete_tree.
12687
12688         * parse.y:  Make various production be non-typed (void).
12689         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
12690         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
12691         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
12692
12693         * jcf-write.c (struct jcf_handler):  New type.
12694         (struct jcf_switch_state):  New type.
12695         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
12696         (alloc_handler, emit_unop, emit_reloc):  New functions.
12697         (adjust_typed_op):  Add extra parameter ("max type" offset).
12698         (emit_switch_reloc, emit_case-reloc):  New function.
12699         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
12700         (generate_bytecode_insns):  Support REAL_CST, switch statements,
12701         exception handling, method calls, object/array creation, and more.
12702
12703         * class.c:  Remove some unused variables.
12704         * constants.c (find_string_constant):  New function.
12705         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
12706         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
12707         if flag_emit_class_files.
12708
12709 1998-11-12  Tom Tromey  <tromey@cygnus.com>
12710
12711         * jcf-io.c (find_class): Added explanatory comment.
12712
12713         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
12714         trailing slash to `.zip' entries.
12715
12716         * jvspec.c (lang_specific_driver): Correctly handle case where
12717         GC_NAME not defined.
12718
12719 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12720
12721         * jvspec.c (GC_NAME): New define.
12722         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
12723         if required.
12724         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
12725
12726 1998-11-11  Per Bothner  <bothner@cygnus.com>
12727
12728         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
12729
12730 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12731
12732         * jcf-dump.c (main): Correctly recognize `--'-style long options.
12733
12734 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12735
12736         * class.c (is_compiled_class): Call safe_layout_class for class
12737         compiled from source.
12738         * conver.h (convert_to_integer, convert_to_real,
12739         convert_to_pointer): Added prototypes.
12740         * decl.c (init_decl_processing): Non longer push the decls of
12741         `methodtable', `constants', `Class', `Field', `dispatchTable'
12742         `jexception' and `Method'.
12743         * expr.c (build_invokeinterface): New function.
12744         (expand_invoke): static variable CLASS_IDENT now in
12745         build_invokeinterface. Use build_invokeinterface.
12746         (expand_java_field_op): Moved code to inline
12747         java.lang.PRIMTYPE.TYPE into a function.
12748         (build_primtype_type_ref): New function.
12749         * java-tree.def (INSTANCEOF_EXPR): New tree code.
12750         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
12751         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
12752         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
12753         (DECL_LOCAL_STATIC_VALUE): New macro.
12754         (build_invokeinterface, build_primtype_type_ref): New function
12755         prototypes.
12756         (java_parse_abort_on_error): Macro rewritten.
12757         * jcf-parse.c (current_method): Add comment to declaration.
12758         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
12759         Function prototypes fixed.
12760         (jcf_parse_source): push/pop parser context. save/restore global.
12761         (parse_source_file): Fixed leading comment. Now take a
12762         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
12763         classes and pop the parser context anymore.
12764         (yyparse): Push parser context, save globals, parse the source
12765         file, restore globals and pop the parser context when processing a
12766         source file.
12767         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
12768         * lex.c (java_parse_doc_section): New function.
12769         (java_lex): Call java_parse_doc_section when appropriate. Build an
12770         operator around INSTANCEOF_TK.
12771         * lex.h (java_lineterminator, java_sprint_unicode,
12772         java_unicode_2_utf8, java_lex_error, java_store_unicode):
12773         Prototypes rewritten.
12774         (java_parse_escape_sequence, java_letter_or_digit_p,
12775         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
12776         java_read_unicode, java_store_unicode, java_read_char,
12777         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
12778         Added function prototypes.
12779         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
12780         define.
12781         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
12782         New macros
12783         (struct parser_ctxt): New fields: deprecated,
12784         current_parsed_class_un, gclass_list.
12785         (fix_method_argument_names, issue_warning_error_from_context,
12786         resolve_package, lookup_package_type): New function prototypes.
12787         (resolve_expression_name): Fixed function prototype.
12788         (find_applicable_accessible_methods_list): Fixed indentation, added
12789         extra argument in prototype.
12790         (check_final_assignment, build_null_of_type, check_deprecation,
12791         check_method_redefinition, reset_method_name,
12792         java_check_regular_methods, java_check_abstract_methods,
12793         maybe_build_primttype_type_ref): New function prototype.
12794         * parse.y (conver.h): Include.
12795         (INSTANCEOF_TK): Tagged <operator>.
12796         (single_type_import_declaration): Use REGISTER_IMPORT macro.
12797         (relational_expression:): Build binop for instanceof.
12798         (java_push_parser_context): Remember ctxp->gclass_list across
12799         contexts.
12800         (java_pop_parser_context): Simply return if no context
12801         exists. Remember gclass_list across contexts.
12802         (issue_warning_error_from_context): New function.
12803         (parse_error_context): Don't setup ctxp->elc here. Call
12804         issue_warning_error_from_context instead.
12805         (parse_warning_context): Likewise.
12806         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
12807         setup. Link new class/interface to ctxp->gclass_list.
12808         (add_superinterfaces): Register interface as incomplete if not
12809         loaded.
12810         (create_class): Remember class unqualified name in
12811         ctxp->current_parsed_class_un. Check class deprecation.
12812         (register_fields): Check field deprecation. Remember static final
12813         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
12814         processing INIT.
12815         (method_header): New local variable ORIG_ARG. Use unqualified
12816         current class name for check on constructor errors. Promote return
12817         type if of record type. Argument list fix moved in
12818         fix_method_argument_names, called here. Check method deprecation.
12819         (fix_method_argument_names): New function.
12820         (method_declarator): Promote record typed arguments.
12821         (safe_layout_class): Check class methods before layout.
12822         (java_complete_class): Compute field layout when patched.
12823         (do_resolve_class): Try to load class after having it renamed
12824         after the package name.
12825         (get_printable_method_name): Use DECL_CONTEXT.
12826         (reset_method_name): New function.
12827         (check_method_redefinition): Use reset_method_name.
12828         (java_check_regular_methods): New local variable
12829         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
12830         names for error report. Check for compile-time error when method
12831         found has default (package) access.
12832         (java_check_abstract_methods): Now takes an interface DECL node as
12833         an argument. Also reinstall real name on unchecked
12834         overriding/hiding methods for error report.
12835         (java_check_methods): Fixed leading comment. Get classes to verify
12836         from ctxp->gclass_list. Use CHECK_METHODS macro and set
12837         CLASS_METHOD_CHECKED_P on class verification.
12838         (lookup_java_method2): Get real method name if necessary.
12839         (find_in_imports): Don't check package class access here.
12840         (resolve_package, lookup_package_type): New functions.
12841         (java_layout_classes): Fixed leading comment. Take classes to be
12842         laid out from ctxp->gclass_list.
12843         (java_complete_expand_methods): Don't expand native and abstract
12844         methods.
12845         (java_expand_classes): New function.
12846         (resolve_expression_name): Use additional argument ORIG.  Retrieve
12847         values of static final field of primitive types.
12848         (resolve_field_access): Handles static final field of promotive
12849         type.
12850         (resolve_qualified_expression_name): Handle STRING_CST as
12851         primaries and package name resolution. Check deprecation on found
12852         decls. Set where_found and type_found on non static field resolved
12853         during qualification. Layout non primitive field decl types.
12854         (check_deprecation): New function.
12855         (maybe_access_field): Simplified.
12856         (patch_method_invocation_stmt): Local variable CLASS_TYPE
12857         removed. Reverse method's argument when primary is a type. Don't
12858         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
12859         instead. Include abstract class in the list of class searchable
12860         for constructors. Use DECL_CONTEXT of found method for access
12861         checks. Check method deprecation.
12862         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
12863         converting arguments. Handle INVOKE_INTERFACE.
12864         (lookup_method_invoke): Search constructor using existing
12865         infrastructure (don't rely on lookup_java_constructor anymore).
12866         (find_applicable_accessible_methods_list): Extra argument flag
12867         LC. Now include constructor in the search.
12868         (qualify_ambiguous_name): Conditional expression are primaries.
12869         (not_initialized_as_it_should_p): static final are always
12870         initialized.
12871         (java_complete_tree): Pass extra NULL argument to
12872         resolve_expression_name. Stricter test to carry on patching
12873         assignments. New case for INSTANCEOF_EXPR.
12874         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
12875         (check_final_assignment, maybe_build_primttype_type_ref): New
12876         functions.
12877         (patch_assignment): Detect resolved static finals and carry normal
12878         assignment error check on them. Inline PRIMTYPE.TYPE read access.
12879         (try_builtin_assignconv): Access constant 0 on all primitive
12880         types.
12881         (valid_builtin_assignconv_identity_widening_p): Accept identical
12882         types. Accept all promoted type on int type.
12883         (valid_ref_assignconv_cast_p): Accept a null pointer to be
12884         assigned to a reference.
12885         (valid_method_invocation_conversion_p): Accept to check null
12886         pointers.
12887         (build_binop): Merge declaration and initialization of local
12888         variable BINOP.
12889         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
12890         numeric types. Improved validity test for qualify operators on
12891         references.
12892         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
12893         and PREINCREMENT_EXPR. Also detect resolved static finals of a
12894         primitive type and issue the appropriate error message.
12895         (resolve_type_during_patch): Mark class loaded when resolved.
12896         (patch_cast): Allow null to be cased to reference types.
12897         (build_null_of_type): New function.
12898         (patch_array_ref): Handle array on references correctly.
12899         (patch_return): Removed unused local variable MODIFY. Force
12900         boolean to be returned as integers. Allows null to be returned by
12901         a function returning a reference.
12902         * typeck.c (convert_to_integer, convert_to_real,
12903         convert_to_pointer): Prototypes moved to convert.h
12904         (lookup_argument_method): Use method real name, if necessary.
12905
12906 1998-10-30  Tom Tromey  <tromey@cygnus.com>
12907
12908         * class.c (build_class_ref): Changed name of primitive classes to
12909         start with `_Jv_'.
12910
12911         * class.c (make_class_data): Renamed fields: nmethods to
12912         method_count, method_count to dtable_method_count.  Always set
12913         `state' field to 0.
12914         * decl.c (init_decl_processing): Likewise.
12915
12916 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12917
12918         * class.c (layout_class): Don't mangle <finit>, produce
12919         __finit<class> instead. Don't verify artificial methods.
12920         * decl.c (finit_identifier_node): New declared global.
12921         (init_decl_processing): finit_identifier_node initialized.
12922         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
12923         * java-tree.h (finit_identifier_node): Declared as extern.
12924         (struct lang_decl): New field called_constructor.
12925         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
12926         (CLASS_HAS_FINIT_P): New macro.
12927         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
12928         explicit constructor invocation.
12929         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
12930         CALL_SUPER_CONSTRUCTOR_P): New macros.
12931         (write_classfile): Added prototype.
12932         * jcf-parse.c (jcf_parse_source): Parse and remember for
12933         generation if the file was seen on the command line.
12934         (parse_source_file): Don't write the class file here.
12935         (yyparse): Loop on files rewritten. Set current_jcf.
12936         (parse_zip_file_entries): Parse class file only if it was found.
12937         * lang.c (init_parse): Don't open command line provided filename
12938         here.
12939         (lang_parse): Don't set main_jcf anymore.
12940         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
12941         (JCONSTRUCTOR_CHECK): New macro.
12942         (JBSC_TYPE_P): New macro.
12943         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
12944         (COMPLETE_CHECK_OP_2): New macro.
12945         (struct parse_ctxt): New field explicit_constructor_p.
12946         (check_class_interface_creation): Fixed prototype indentation.
12947         (patch_method_invocation_stmt): Prototype reflects added argument.
12948         (patch_invoke): Likewise.
12949         (complete_method_declaration, build_super_invocation,
12950         verify_constructor_circularity,
12951         build_this_super_qualified_invocation, get_printable_method_name,
12952         patch_conditional_expr, maybe_generate_finit, fix_constructors,
12953         verify_constructor_super, create_artificial_method,
12954         start_artificial_method_body, end_artificial_method_body,
12955         generate_field_initialization_code): New function prototypes.
12956         * parse.y: Fixed leading comment
12957         (constructor_header:, constructor_body:, block_end:): Rules tagged
12958         <node>.
12959         (type_declaration:): Call maybe_generate_finit.
12960         (method_declaration:): Action for method_body: placed in new
12961         function complete_method_declaration, called here.
12962         (constructor_declaration:): Defined actions. Removed leading
12963         FIXME.
12964         (constructor_header:): New rule with action.
12965         (constructor_body:): Rule rewritten using block_begin: and
12966         block_end:. Defined actions.
12967         (constructor_declarator:, explicit_constructor_invocation:):
12968         Defined actions.
12969         (block:): Use new rules block_begin: block_end:.
12970         (block_begin:, block_end:): New rules and actions.
12971         (block_statements:): Fixed error message for explicit
12972         constructors.
12973         (method_invocation:): Call build_this_super_qualified_invocation
12974         if primary is `this' or `super' was seen.
12975         (conditional_expression:): Action defined.
12976         (extra_ctxp_pushed_p): New static global flag.
12977         (java_parser_context_save_global): Create parser context if
12978         necessary. Use extra_ctxp_pushed_p to remember it.
12979         (java_parser_context_restore_global): Pop extra parser context if
12980         one exists.
12981         (build_array_from_name): Array on primitive types are marked
12982         loaded.
12983         (register_fields): Restore new name in field initializer
12984         expression if type was altered. Non static fields initialized upon
12985         declaration marked initialized.
12986         (maybe_generate_finit): New function.
12987         (maybe_generate_clinit): Use create_artificial_method,
12988         start_artificial_method_body, end_artificial_method_body. Generate
12989         debug info for enclosed initialization statements.
12990         (method_header): Fixed leading comment. Check constructor
12991         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
12992         accordingly.
12993         (complete_method_declaration, constructor_circularity_msg,
12994         verify_constructor_circularity): New functions.
12995         (get_printable_method_name): New function.
12996         (check_method_redefinition): Don't rename <finit> methods. Fix
12997         declared constructor names. Error message for
12998         constructors modified.
12999         (java_check_regular_methods): Local variable seen_constructor
13000         renamed saw_constructor. Skip verification on constructors. Create
13001         default constructor with create_artificial_method.
13002         (java_check_methods): Removed unnecessary empty line.
13003         (create_artificial_method, start_artificial_method_body,
13004         end_artificial_method_body): New functions.
13005         (java_layout_classes): Changed leading comment. Reverse fields
13006         list if necessary. Always layout java.lang.Object if being
13007         defined.
13008         (java_complete_expand_methods): Verify constructor circularity.
13009         (java_complete_expand_method): Call fix_constructor on
13010         constructors.  Local variable no_ac_found removed. Restore
13011         bindings if method body expansion failed.
13012         (fix_constructors, verify_constructor_super,
13013         generate_field_initialization_code): New function.
13014         (java_expand_classes): Fixed leading comment. Write class file
13015         here.
13016         (resolve_expression_name): Check for illegal instance variable
13017         usage within the argument scope of an explicit constructor
13018         invocation.
13019         (resolve_qualified_expression_name): Pass extra from_super flag
13020         when invoking patch_method_invocation_stmt. New case for
13021         conditional expression when used as a primary. Check for error
13022         when acquiring super.
13023         (patch_method_invocation_stmt): Added extra argument super. New
13024         local variable is_static_flag. Set class_to_search according to
13025         the nature of the constructor invocation. Don't add `this'
13026         argument when expanding NEW_CLASS_EXPR. Check for illegal method
13027         invocation within the argument scope of explicit constructor
13028         invocation. Set is_static according to is_static_flag. Provide
13029         extra `super' argument to patch_invoke invocation.
13030         (patch_invoke): New argument from_super. Loop on arguments
13031         indentation fixed. Pass from_super to invocation_mode. New switch
13032         case INVOKE_SUPER. Fixed error message in switch default case.
13033         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13034         value.
13035         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13036         (lookup_method_invoke): Fixed prototypes in candidates list. Error
13037         message takes constructors into account.
13038         (find_applicable_accessible_methods_list): Fixed indentation.
13039         (qualify_ambiguous_name): Take explicit constructor invocation
13040         into account. Deal with a conditional expression as a primary to
13041         a method call.
13042         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13043         case. Added extra argument to patch_method_invocation_stmt.
13044         Register calls made to explicit constructor `this'. Don't call
13045         save_expr in ARRAY_REF case when emitting class files. Check for
13046         illegal use of this when expanding explicit constructor invocation
13047         arguments.
13048         (complete_function_arguments): Set and reset parser context
13049         explicit_constructor_p field value when appropriate.
13050         (build_super_invocation, build_this_super_qualified_invocation):
13051         New functions.
13052         (patch_assignment): Fixed typo.
13053         (patch_unaryop): Check on final fields occurs only when a decl
13054         exits.
13055         (patch_return): Take constructors into account.
13056         (patch_conditional_expr): New function.
13057         * typeck.c (build_java_signature): Removed unnecessary empty line.
13058
13059 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13060
13061         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13062
13063 1998-10-28  Tom Tromey  <tromey@cygnus.com>
13064
13065         * decl.c (init_decl_processing): Renamed fields.
13066         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13067         interface_len, msize fields.
13068
13069         * class.c (make_class_data): Removed subclass_head and
13070         subclass_next fields.
13071         * decl.c (init_decl_processing): Removed subclass_head and
13072         subclass_next fields.
13073
13074 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13075
13076         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13077         * mangle.c (emit_unicode_mangled_name): Similarly.
13078
13079 1998-10-26  Nick Clifton  <nickc@cygnus.com>
13080
13081         * jcf-parse.c (get_constant): Place braces around code to compute
13082         'd' when REAL_ARITHMETIC is not defined.
13083
13084 1998-10-25  H.J. Lu  (hjl@gnu.org)
13085
13086         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13087         dependency.
13088
13089 1998-10-23  Tom Tromey  <tromey@cygnus.com>
13090
13091         * lang-specs.h: `.zip' files are input to jc1.
13092
13093 1998-10-22  Per Bothner  <bothner@cygnus.com>
13094
13095         * jvspecs.c:  Add (but don't enable) support for combining multiple
13096         .class and .java input filenames to a single jc1 invocation.
13097         Add support for -C flag (copile to .class files).
13098         Translate -classpath and -CLASSPATH arguments.
13099         * lang-specs.h:  Don't set %2 spec.
13100
13101 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13102
13103         * jcf-path.c (add_entry): Don't add trailing separator if entry is
13104         a .zip file.
13105         (add_path): Don't add trailing separator to non-empty path
13106         elements.
13107
13108         * lang.c (lang_decode_option): Check for -fclasspath and
13109         -fCLASSPATH before examining other `-f' options.
13110
13111         * java-tree.h (finalize_identifier_node): Don't declare.
13112         * class.c (make_class_data): Don't push "final" field.
13113         * decl.c (init_decl_processing): Don't push "final" field.
13114         (finalize_identifier_node): Removed.
13115         (init_decl_processing): Don't set finalize_identifier_node.
13116
13117         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13118
13119 1998-10-11  Anthony Green  <green@cygnus.com>
13120
13121         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13122         (JV_SCAN_SOURCES): New macro.
13123         (JCF_DUMP_SOURCES): Likewise.
13124         (jcf-dump$(exeext)): New target.
13125         (jv-scan$(exeext)): New target.
13126
13127 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13128
13129         * Makefile.in (LEX): Removed.
13130         (LEXFLAGS): Likewise.
13131         (SET_BISON): New macro.
13132         (BISON): Removed.
13133         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
13134         spurious diffs in parse.c.
13135         ($(PARSE_SCAN_C)): Likewise.
13136         (PARSE_DIR): New macro.
13137         (PARSE_C): Use it.
13138         (PARSE_SCAN_C): Likewise.
13139         (PARSE_RELDIR): New macro.
13140
13141         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13142
13143         * jcf-io.c (find_class): Use saw_java_source to determine when to
13144         look for `.java' file.
13145         * jcf-parse.c (saw_java_source): New global.
13146         (yyparse): Set it if `.java' file seen.
13147
13148         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13149         (GCJH_SOURCES): Likewise.
13150         * Makefile.in (datadir): New macro.
13151         (libjava_zip): Likewise.
13152         (JAVA_OBJS): Added jcf-path.o.
13153         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13154         (../gcjh$(exeext)): Likewise.
13155         (jcf-path.o): New target.
13156         * java-tree.h (fix_classpath): Removed decl.
13157         * jcf-parse.c (fix_classpath): Removed.
13158         (load_class): Don't call fix_classpath.
13159         * parse.y (read_import_dir): Don't call fix_classpath.
13160         * lex.h: Don't mention classpath.
13161         * lex.c (java_init_lex): Don't initialize classpath.
13162         * jcf-io.c (classpath): Removed global.
13163         (find_class): Use jcf_path iteration functions.  Correctly search
13164         class path for .java file.
13165         (open_in_zip): New argument `is_system'.
13166         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
13167         classpath-related options.
13168         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13169         and -I.
13170         (lang_init): Call jcf_path_init.
13171         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13172         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
13173         Correctly put braces around second string in each entry.
13174         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
13175         classpath-related options.
13176         (help): Updated for new options.
13177         * jcf.h: Declare functions from jcf-path.c.  Don't mention
13178         `classpath' global.
13179         * jcf-path.c: New file.
13180
13181         * jcf-depend.c: Include jcf.h.
13182
13183         * jcf-write.c (localvar_alloc): Returns `void'.
13184         (localvar_free): Removed unused variable.
13185
13186         * lang.c (OBJECT_SUFFIX): Define if not already defined.
13187         (init_parse): Use OBJECT_SUFFIX, not ".o".
13188
13189 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13190
13191         * class.c (emit_register_classes): Renamed from
13192         emit_register_class.
13193         * java-tree.h (emit_register_classes): Prototype renamed from
13194         emit_register_class.
13195         * jcf-parse.c (yyparse): Call emit_register_classes once before
13196         returning.
13197         * parse.y (java_expand_classes): No longer register classes.
13198
13199 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13200
13201         * class.c (is_compiled_class): New local variable
13202         seen_in_zip. Identify classes found in currently compiled source
13203         file(s).
13204         * decl.c (complete_start_java_method): Fixed typo.
13205         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13206         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13207         (CLASS_P): Moved around.
13208         (java_parse_abort_on_error): Macro moved from jcf-parse.c
13209         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13210         java-parse.h
13211         (jcf_parse_source): Changed leading comment. Removed unnecessary
13212         fclose and CLASS_FROM_SOURCE_P marking.
13213         (parse_source_file): New local variables remember_for_generation
13214         and filename. Mark parsed file name identifier node. Removed block
13215         executed when parse_only was null. Set remember_for_generation.
13216         Use it as an argument to java_pop_parser_context.
13217         (yyparse): New local variables several_files, list, next node and
13218         current_file_list. Split ampersand separated file names into
13219         current_file_list. Iterate through the list and parse accordingly.
13220         * parse.h (java_pop_parser_context): New function prototype.
13221         * parse.y (ctxp_for_generation): New static global variable.
13222         (java_pop_parser_context): New argument generate. Link popped ctxp
13223         to ctxp_for_generation list accordingly.
13224         (java_complete_expand_methods): Fixed indentation.
13225         (java_expand_classes): New function.
13226
13227 1998-10-17  Per Bothner  <bothner@cygnus.com>
13228
13229         * Makefile.in:  Link with libiberty.a instead of memmove.o.
13230
13231 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13232
13233         * lex.c (setjmp.h): No longer included.
13234         * lex.h (setjmp.h): Included.
13235         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13236         (duplicate_declaration_error_p): Renamed from
13237         duplicate_declaration_error.
13238         (build_array_from_name): New function prototype.
13239         * parse.y (setjmp.h): No longer included.
13240         (variable_declarator_id): Define action.
13241         (build_array_from_name): New function.
13242         (duplicate_declaration_error_p): Renamed from
13243         duplicate_declaration_error.  Fixed leading comment.
13244         (register_fields): Main `for' loop reorganized. Uses
13245         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13246         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13247         build_array_from_name.
13248         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13249         types.
13250         (read_import_dir): Don't try to skip `.' and `..'.
13251         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13252         build_array_from_name. Main `for' loop reorganized.
13253         (resolve_qualified_expression_name): When building access to a
13254         field, use the type where the field was found, not its own type.
13255         (maybe_access_field): Use field DECL_CONTEXT if the type where the
13256         field was found is null.
13257         (qualify_ambiguous_name): Sweep through all successive array
13258         dimensions.
13259
13260 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13261
13262         * java-tree.h (pop_labeled_block, lang_printable_name,
13263         maybe_add_interface, set_super_info, get_access_flags_from_decl,
13264         interface_of_p, inherits_from_p, fix_classpath,
13265         complete_start_java_method, emit_handlers, init_outgoing_cpool,
13266         make_class_data, register_class, alloc_name_constant): New
13267         function prototypes.
13268         * lang.c (lang_decode_option): Set argc argument unused. Fixed
13269         indentation. Added cast to remove warning.
13270         (lang_printable_name): Set v argument unused.
13271         (lang_print_error): Added argument to lang_printable_name call.
13272         (java_dummy_print, print_lang_decl, print_lang_type,
13273         print_lang_identifier, lang_print_xnode): All argument marked
13274         unused.
13275         * lex.c (java_unget_unicode): Removed unnecessary argument.
13276         (java_allocate_new_line): Unused local variable is gone.
13277         (java_read_char): Added parenthesis in expressions to remove
13278         warnings.  Added final return statement.
13279         (java_read_unicode): Added parenthesis in expression to remove
13280         warning.
13281         (java_parse_end_comment): Fixed java_unget_unicode invocation.
13282         (java_parse_escape_sequence): Likewise.
13283         (java_lex): Unused local variables are gone. Fixed
13284         java_unget_unicode invocation.
13285         * lex.h (set_float_handler): Prototype added when JC1_LITE not
13286         defined.
13287         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13288         lang_printable_name invocation in macro.
13289         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13290         Likewise.
13291         (duplicate_declaration_error): Suppressed unused argument in
13292         prototype.
13293         (identical_subpath_p): Function declaration is gone.
13294         (patch_invoke): Suppressed unused argument in prototype.
13295         (patch_cast, build_labeled_block, check_thrown_exceptions):
13296         Likewise.
13297         * parse.y (setjmp.h): Included
13298         (toplev.h): Likewise.
13299         (field_declaration:): Suppressed unused local
13300         (label_decl:): Fixed build_labeled_block invocation.
13301         (java_pop_parser_context): Put extra parenthesis around assignment
13302         in if.
13303         (yyerror): Suppressed unused local variables.
13304         (variable_redefinition_error): Fixed lang_printable_name
13305         invocation.
13306         (create_interface): Suppressed unused local variables.
13307         (create_class): Likewise.
13308         (duplicate_declaration_error): Suppressed unused argument. Fixed
13309         lang_printable_name invocation.
13310         (register_fields): Suppressed unused local variable. Fixed
13311         duplicate_declaration_error invocation.
13312         (method_header): Suppressed unused local variable.
13313         (method_declarator, parser_check_super): Likewise.
13314         (java_complete_class): Suppressed unused local variable. Fixed
13315         fatal error message.
13316         (complete_class_report_errors): Added default: in switch.
13317         (java_check_regular_methods): Fixed lang_printable_name
13318         invocations.
13319         (check_throws_clauses): Likewise.
13320         (java_check_abstract_methods): Suppressed unused local
13321         variable. Fixed lang_printable_name invocation.
13322         (read_import_entry): Added supplemental return statement.
13323         (read_import_dir): Suppressed unused local variables.
13324         (check_pkg_class_access, declare_local_variables): Likewise.
13325         (source_start_java_method): Suppressed unused extern variable
13326         declarations
13327         (expand_start_java_method): Suppressed unused extern and local
13328         variable declarations.
13329         (java_complete_expand_methods): Likewise.
13330         (java_complete_expand_method): Suppressed unused local variables.
13331         (make_qualified_name): Likewise.
13332         (resolve_qualified_expression_name): Added default: in
13333         switch. Fixed lang_printable_name invocation.
13334         (class_instance_creation_expression): Added parenthesis around
13335         expressions.
13336         (patch_method_invocation_stmt): Fixed lang_printable_name and
13337         patch_invoke invocations.
13338         (check_for_static_method_reference): Fixed lang_printable_name
13339         invocation.
13340         (patch_invoke): Suppressed unused arguments and local variables.
13341         (lookup_method_invoke): Suppressed unused local variables.
13342         (qualify_ambiguous_name): Added default: in switch.
13343         (identical_subpath_p): Function removed.
13344         (patch_assignment): Suppressed unused local variables. Suppressed
13345         unnecessary if statement. Fixed lang_printable_name invocations.
13346         (try_builtin_assignconv): Fixed lang_printable_name invocations.
13347         (valid_ref_assignconv_cast_p): Parenthesis around
13348         expression. Suppressed unused local variables.
13349         (build_binop): Suppressed unused local variables. fixed
13350         lang_printable_name invocations.
13351         (string_constant_concatenation): Suppressed unused local
13352         variables.
13353         (patch_unaryop): Fixed lang_printable_name invocation.
13354         (patch_cast): Suppressed unnecessary argument. Fixed
13355         lang_printable_name invocation.
13356         (patch_array_ref): Fixed lang_printable_name invocation.
13357         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13358         (build_labeled_block): Suppressed unused argument.
13359         (generate_labeled_block): Fixed build_labeled_block invocation.
13360         (build_loop_body): Suppressed unused local variables.
13361         (patch_loop_statement): Likewise.
13362         (patch_exit): Fixed lang_printable_name invocation.
13363         (patch_switch_statement): Likewise.
13364         (case_identity): First argument marked unused.
13365         (patch_try_statement): Fixed lang_printable_name invocations.
13366         (patch_synchronized_statement, patch_throw_statement): Likewise.
13367         (check_thrown_exceptions): Fixed check_thrown_exceptions and
13368         lang_printable_name invocations.
13369         (check_thrown_exceptions_do): Suppressed unused argument.
13370
13371 1998-10-14  Tom Tromey  <tromey@cygnus.com>
13372
13373         * jcf-write.c (write_classfile): Add output class file as target.
13374         * lang-options.h: Added -MD, -MMD, -M, and -MM.
13375         * jcf.h: Added declarations for dependency-tracking functions.
13376         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13377         * lang.c (lang_decode_option): Recognize -MD and -MMD.
13378         (finish_parse): Call jcf_dependency_write.
13379         (dependency_tracking): New global.
13380         (DEPEND_SET_FILE): New define.
13381         (DEPEND_ENABLE): New define.
13382         (init_parse): Enable dependency tracking if required.
13383         Include "flags.h".
13384         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13385         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13386         (../gcjh$(exeext)): Likewise.
13387         (jcf-depend.o): New target.
13388         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13389         (GCJH_SOURCES): Likewise.
13390         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
13391         dep_name argument.
13392         (find_classfile): Added dep_name argument.
13393         (find_class): Compute name of dependency.
13394         (open_in_zip): Call jcf_dependency_add_file.
13395         * gjavah.c (output_file): No longer global.
13396         (usage): Don't mention "gjavah".
13397         (help): Likewise.
13398         (java_no_argument): Likewise.
13399         (version): Likewise.
13400         (main): Recognize and handle -M family of options.
13401         (print_mangled_classname): Return is void.
13402         (process_file): Handle case where output is suppressed.
13403         (HANDLE_END_FIELD): Likewise.
13404         (HANDLE_METHOD): Likewise.
13405         * jcf-depend.c: New file.
13406
13407 1998-10-13  Jeffrey A Law  (law@cygnus.com)
13408
13409         * java-tree.def: Add missing newline at EOF.
13410
13411 1998-10-13  Tom Tromey  <tromey@cygnus.com>
13412
13413         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13414         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
13415         function.
13416         Include <config.h> and "system.h".
13417         (disassemble_method): Undefine RET to avoid clash with
13418         config/i386/i386.h.
13419
13420 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13421
13422         * decl.c (runtime_exception_type_node, error_exception_type_node):
13423         New global variables.
13424         (init_decl_processing): Initialized.
13425         * expr.c (java_lang_expand_expr): Set caught exception type to
13426         null if catch handler argument doesn't exit.
13427         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13428         tree codes.
13429         * java-tree.h (runtime_exception_type_node,
13430         error_exception_type_node): Global variables declared.
13431         (DECL_FUNCTION_THROWS): New macro.
13432         (DECL_FUNCTION_BODY): Modified comment.
13433         (DECL_SPECIFIC_COUNT): Likewise.
13434         (struct lang_decl): New field throws_list.
13435         (IS_UNCHECKED_EXPRESSION_P): New macro.
13436         * lex.c (java_lex): Generate location information for THROW_TK.
13437         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13438         EXCEPTIONS_P): New macros.
13439         (enum jdep_code): New value JDEP_EXCEPTION.
13440         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13441         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13442         PATCH_METHOD_RETURN_ERROR): New macros.
13443         (patch_method_invocation_stmt): Added new argument to prototype.
13444         (patch_synchronized_statement, patch_throw_statement,
13445         check_thrown_exceptions, check_thrown_exceptions_do,
13446         purge_unchecked_exceptions, check_throws_clauses): New function
13447         prototypes.
13448         * parse.y Fixed typo in keyword section.
13449         (throw:): Rule tagged <node>.
13450         (THROW_TK): Keyword tagged <operator>.
13451         (method_header:): Last argument to call to method_header passed
13452         from throws: rule.
13453         (throws:, class_type_list:, throw_statement:,
13454         synchronized_statement:, synchronized:): Defined actions.
13455         (method_header): New local variable current. Register exceptions
13456         from throws clause.
13457         (java_complete_tree): Complete and verify exceptions from throws
13458         clause.
13459         (complete_class_report_errors): Error message on exceptions not
13460         found
13461         (java_check_regular_methods): Fixed typo. Shortcut on private
13462         overriding methods. Changed error message on method
13463         redefinition. Check for throws clause compatibility.
13464         (check_throws_clauses): New function.
13465         (java_check_abstract_methods): Use DECL_NAME for wfl or current
13466         method. Changed error message on method redefinition.
13467         (currently_caught_type_list): New static variable.
13468         (java_complete_expand_methods): Purge unchecked exceptions from
13469         throws clause list. Call PUSH_EXCEPTIONS before walk and
13470         POP_EXCEPTIONS after.
13471         (resolve_qualified_expression_name): Pass new argument as NULL to
13472         patch_method_invocation_stmt.
13473         (patch_method_invocation_stmt): New argument ref_decl. Invoke
13474         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13475         argument list when appropriate. Use new argument if non null to
13476         store selected method decl.
13477         (patch_invoke): Convert if necessary args of builtin types before
13478         forming CALL_EXPR. Argument list no longer reversed here.
13479         (invocation_mode): Treat final methods as static methods.
13480         (java_complete_tree): New cases for THROW_EXPR: and
13481         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13482         function call.
13483         (complete_function_arguments): No more RECORD_TYPE
13484         conversion. Function parameter nodes no longer saved.
13485         (valid_ref_assignconv_cast_p): Avoid handling null type.
13486         (patch_binop): Fixed null constant reference handling.
13487         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13488         BUILD_THROW macros.
13489         (patch_try_statement): Fixed comments. Record caught types in
13490         list, push the list, expand try block and pop the list.
13491         (patch_synchronized_statement, patch_throw_statement,
13492         check_thrown_exceptions, check_thrown_exceptions_do,
13493         purge_unchecked_exceptions): New functions.
13494         * typeck.c (lookup_argument_method): Allow WFL in place of method
13495         DECL_NAME during method definition check
13496
13497 1998-10-09  Tom Tromey  <tromey@cygnus.com>
13498
13499         * gjavah.c (decode_signature_piece): New function.
13500         (print_c_decl): Use it.  Added `name_override' argument.
13501         (print_method_info): Use name_override argument to print_c_decl.
13502         (seen_fields): Removed.
13503         (print_field_info): Don't update seen_fields.
13504         (struct method_name): New structure.
13505         (method_name_list): New global.
13506         (print_method_info): Add new method to list of methods.
13507         (name_is_method_p): New function.
13508         (print_field_info): If field name has same name as method, then
13509         change field name.
13510         (process_file): Parse methods before fields.
13511         (field_pass): New global.
13512         (HANDLE_END_FIELD): Take field_pass into account.
13513
13514 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13515
13516         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13517         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13518
13519 1998-10-03  Anthony Green  <green@cygnus.com>
13520
13521         * jvspec.c: Fix bug in jvgenmain_spec patch.
13522
13523 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13524
13525         * Makefile.in (lang.o:): Install dependency on java-tree.def.
13526         * decl.c (soft_exceptioninfo_call_node): New global variable.
13527         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13528         takes extra integer argument. soft_exceptioninfo_call_node
13529         initialized.
13530         * except.c (java_set_exception_lang_code): New function
13531         (method_init_exceptions): Called here.
13532         (prepare_eh_table_type): New function.
13533         (expand_end_java_handler): Called here.
13534         * expr.c (build_java_throw_out_of_bounds_exception): Now features
13535         one argument. Modified generation of call to
13536         soft_badarrayindex_node to use new argument.
13537         (build_java_arrayaccess): Pass faulty index value to
13538         build_java_throw_out_of_bounds_exception.
13539         (generate_name): New function.
13540         (java_lang_expand_expr): New local variables node, current,
13541         has_finally_p. Expand TRY_EXPR node.
13542         (process_jvm_instruction): Replace top of the stack with thrown
13543         object reference when entering exception handler.
13544         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13545         specific tree codes.
13546         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13547         global.
13548         (DECL_SPECIFIC_COUNT): New macro.
13549         (prepare_eh_table_type, java_set_exception_lang_code,
13550         generate_name): New function declarations.
13551         (match_java_method): Declaration deleted.
13552         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13553         macros.
13554         * lex.c (TRY_TK, CATCH_TK): Generate location information.
13555         * parse.h (redefinition_error, refine_accessible_methods_list,
13556         can_cast_to_p): Function declaration removed.
13557         (classitf_redefinition_error, variable_redefinition_error,
13558         parse_jdk1_1_error, find_applicable_accessible_methods_list,
13559         find_most_specific_methods_list, argument_types_convertible,
13560         enter_a_block, valid_builtin_assignconv_identity_widening_p,
13561         valid_cast_to_p, valid_method_invocation_conversion_p,
13562         try_reference_assignconv, add_stmt_to_compound,
13563         build_jump_to_finally, build_tree_list, patch_try_statement,
13564         java_get_catch_block): New function declarations.
13565         * parse.y (string_buffer_type): Global variable deleted.
13566         (group_of_labels, catches, catch_clause, catch_clause_parameter,
13567         finally): Rules tagged <node>.
13568         (TRY_TK, CATCH_TK): Token tagged <operator>.
13569         (class_body_declaration:, class_member_declaration:,
13570         formal_parameter:, explicit_constructor_invocation:,
13571         interface_member_declaration:, constant_declaration:,
13572         primary_no_new_array:, class_instance_creation_expression:,
13573         array_creation_expression:): Issue error on unsuported JDK1.1
13574         features.
13575         (try_statement:, catches:, finally:): Define actions.
13576         (catch_clause_parameter): New rule.
13577         (catch_clause:): Use new rule catch_clause_parameter.
13578         (parse_jdk1_1_error): New function.
13579         (redefinition_error): Renamed classitf_redefinition_error.
13580         (variable_redefinition_error): New function.
13581         (check_class_interface_creation): Call
13582         classitf_redefinition_error.
13583         (java_complete_tree): Added error message on JDEP_TYPE: case.
13584         (complete_class_report_errors): Fixed indentation.
13585         (declare_local_variables): Call variable_redefinition_error.
13586         (source_end_java_method): Call java_set_exception_lang_code and
13587         emit_handlers where appropriate.
13588         (java_method_add_stmt): Call add_stmt_to_block.
13589         (add_stmt_to_block): New function.
13590         (lookup_method_invoke): Fixed outside comment. new local variable
13591         candicates.  Call find_applicable_accessible_methods_list and
13592         find_most_specific_methods_list when searching for a
13593         method. Modified error report to list possible candidates when
13594         applicable.
13595         (find_applicable_accessible_methods_list,
13596         find_most_specific_methods_list, argument_types_convertible): New
13597         function.
13598         (refine_accessible_methods_list): Function deleted.
13599         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
13600         expr (if applicable) before calling patch_array_ref.
13601         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
13602         (enter_block): Fixed comment.
13603         (enter_a_block): New function.
13604         (patch_assignment): Reorganized. Call try_reference_assignconv for
13605         references. Call valid_cast_to_p instead of can_cast_to_p.
13606         (try_reference_assignconv,
13607         valid_builtin_assignconv_identity_widening_p): New functions.
13608         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
13609         (valid_cast_to_p, valid_method_invocation_conversion_p): New
13610         functions.
13611         (build_string_concatenation): Don't resolve StringBuffer.
13612         (patch_cast): Fixed inverted arguments.
13613         (patch_array_ref): Code to save array expr deleted. Call
13614         valid_cast_to_p instead of can_cast_to_p.
13615         (generate_labeled_block): Call generate_name.
13616         (build_jump_to_finally, build_try_statement, java_get_catch_block,
13617         patch_try_statement): New functions.
13618         * typeck.c (match_java_method): Function deleted.
13619
13620 1998-10-02  Anthony Green  <green@cygnus.com>
13621
13622         * jvspec.c: jvgenmain_spec uses different temporary file names.
13623
13624 1998-10-02  Anthony Green  <green@cygnus.com>
13625
13626         * jvspec.c (lang_specific_driver): Fail if user specifies
13627         --main= when not linking.
13628
13629 1998-09-28  Tom Tromey  <tromey@cygnus.com>
13630
13631         * class.c (make_class_data): Push value for `thread' field.
13632         * decl.c (init_decl_processing): Added `thread' field to class.
13633
13634         * class.c (add_field): Always make static fields externally
13635         visible.
13636
13637 1998-09-26  Anthony Green  <green@cygnus.com>
13638
13639         * expr.c (build_java_athrow,
13640         build_java_throw_out_of_bounds_exception, expand_invoke,
13641         build_newarray, expand_java_multianewarray, build_java_monitor):
13642         Update comments to reflect _Jv_* function names.
13643
13644 1998-09-25  Per Bothner  <bothner@cygnus.com>
13645
13646         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
13647         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
13648         * parse.y (expand_start_java_method):  Likewise.
13649
13650 1998-09-24  Per Bothner  <bothner@cygnus.com>
13651
13652         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
13653
13654         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
13655         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
13656         * expr.c:  Remove no-longer-needed calls to promote_type.
13657         * decl.c (give_name_to_locals):  Liekwise.
13658         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
13659         * parse.y:  Add/remove promote_type calls as appropriate.
13660         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
13661         (parse_signature_string):  Likewise.
13662         (build_java_array_type):  Fix for now signature convenions.
13663
13664         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
13665
13666 1998-09-23  Tom Tromey  <tromey@cygnus.com>
13667
13668         * class.c (init_class_processing): libjava function renamed to
13669         _Jv_RegisterClass.
13670
13671 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13672
13673         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
13674         * java-tree.def: Fixed DEFTREECODE third argument.
13675         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
13676         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
13677         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
13678         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13679         JAVA_THIS_EXPR): Now replaced by tree code definitions.
13680         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
13681         * lang.c (java_tree_code_type, java_tree_code_length,
13682         java_tree_code_name): New arrays.
13683         (lang_init): Append Java tree node definitions to Gcc ones.
13684         * lex.c (expression_obstack): Declared as extern when JC1_LITE
13685         defined.
13686         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
13687         wfl_to_string.
13688         (java_lex): Allow declaration of empty string constants. Retain
13689         location information on CASE_TK and DEFAULT_TK.
13690         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
13691         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
13692         Modified to be more robust.
13693         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
13694         (build_new_invocation, try_builtin_assignconv,
13695         patch_switch_statement, string_constant_concatenation,
13696         build_string_concatenation, patch_string_cst, patch_string,
13697         java_expand_switch): New function declarations.
13698         * parse.y: Rules related to switch and EH tagged <node>.
13699         (label_id): Set to NULL_TREE
13700         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
13701         tree nodes.
13702         (this_or_super:): Fixed indentation.
13703         (statement:, statement_nsi:, statement_without_trailing_substatement:,
13704         statement_expression:): Removed call to RULE on all sub-rules.
13705         (switch_expression:, switch_labels:): New rules.
13706         (switch_statement:, switch_block:, switch_block_statement_groups:,
13707         switch_block_statement_group:, switch_labels:, switch_label:):
13708         Defined actions.
13709         (throw_statement:, synchronized_statement:, try_statement:):
13710         Defined temporary actions.
13711         (class_instance_creation_expression:): Call
13712         build_new_invocation. Fixed indentation.
13713         (field_access): Fixed indentation.
13714         (method_invocation): Likewise.
13715         (make_qualified_primary): Use THIS_EXPR.
13716         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
13717         resolving from SUPER, set *type_found.
13718         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
13719         (java_complete_tree): Removed unused local variable `location'. Case
13720         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
13721         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
13722         on MODIFY_EXPR: and all binary operator tree code cases. Removed
13723         STRING_CST: case. default: checks for patchable strings.
13724         (complete_function_arguments): Transform string constant or
13725         crafted StringBuffer if necessary.
13726         (build_method_invocation): Fixed comments.
13727         (build_new_invocation): New function.
13728         (patch_assignment): Call try_builtin_assignconv to figure a valid
13729         assignment conversion between builtin types.
13730         (try_builtin_assignconv): New function.
13731         (build_binop): Use URSHIFT_EXPR directly to call build.
13732         (operator_string): Use UNARY_PLUS_EXPR.
13733         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
13734         operator.
13735         (do_merge_string_cste, merge_string_cste,
13736         string_constant_concatenation, build_string_concatenation,
13737         patch_string, patch_string_cst): New function.
13738         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
13739         (patch_unaryop): Likewise. New test of valid ++/-- operands.
13740         (build_newarray_node): Use NEW_ARRAY_EXPR.
13741         (build_this): Use THIS_EXPR.
13742         (build_return): Enable debug information on return statement.
13743         (build_if_else_statement): Likewise.
13744         (complete_labeled_statement): Fixed related comment.
13745         (build_loop_body): Fixed comment.
13746         (build_bc_statement): Enable debug information on break/continue
13747         statements.
13748         (patch_bc_statement): Fixed typos. Handle SWITCH statement
13749         context.
13750         (patch_switch_statement, case_identity, java_expand_switch): New
13751         functions.
13752
13753 1998-09-21  Per Bothner  <bothner@cygnus.com>
13754
13755         * buffer.h (BUFFER_INIT):  New macro.
13756         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
13757         Pass (struct jcf_partial *state) to most functions.
13758         (jcf_block, jcf_relocation):  New types.
13759         Support labels, branches, conditionals, loops.
13760
13761 1998-09-21  Tom Tromey  <tromey@cygnus.com>
13762
13763         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
13764
13765 1998-09-21  Per Bothner  <bothner@cygnus.com>
13766
13767         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
13768         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
13769         not integer_type_node (INT_TYPE_SIZ bits).
13770
13771         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
13772
13773         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
13774         * jcf-dump.c (print_exception_table):  New function.
13775         (disassemble_method):  Better handling of wide instructions.
13776         Make more robust for bad input.
13777
13778 1998-09-30  Jeffrey A Law  (law@cygnus.com)
13779
13780         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
13781         FreeBSD.
13782
13783 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13784
13785         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
13786
13787 1998-09-17  Tom Tromey  <tromey@cygnus.com>
13788
13789         * Makefile.in ($(PARSE_H)): Removed target.
13790
13791 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13792
13793         * Makefile.in (JAVA_OBJS): Add memmove.o
13794         (memmove.o): New target & rules.
13795
13796 1998-09-15  Tom Tromey  <tromey@cygnus.com>
13797
13798         * expr.c (expand_invoke): Don't generate a call to the class init
13799         code.
13800
13801 1998-09-14  Jeffrey A Law  (law@cygnus.com)
13802
13803         * Makefile.in: Add many missing dependencies.
13804         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
13805         as appropriate.
13806         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
13807         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
13808
13809 1998-09-11  Per Bothner  <bothner@cygnus.com>
13810
13811         * decl.c (complete_start_java_method):  If method is static (and
13812         not private) call _Jv_InitClass.
13813         * expr.c (expand_invoke):  Don't call build_class_init.
13814
13815         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
13816
13817 1998-09-10  Jeffrey A Law  (law@cygnus.com)
13818
13819         * Make-lang.in (GCJ): Define before using.
13820
13821 1998-09-09  Jeffrey A Law  (law@cygnus.com)
13822
13823         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
13824         losing due to namespace pollution in GNU getopt.h
13825
13826 1998-09-09  Tom Tromey  <tromey@cygnus.com>
13827
13828         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
13829         (java.all.cross): Likewise.
13830         (java.rest.encap): Likewise.
13831
13832 1998-09-08  Jeffrey A Law  (law@cygnus.com)
13833
13834         * gjavah.c (print_class_decls): Fix thinko in arglist
13835         * jcv-io.c (find_classfile): Similarly.
13836
13837 1998-09-07  Jeffrey A Law  (law@cygnus.com)
13838
13839         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
13840
13841 1998-09-05  Tom Tromey  <tromey@cygnus.com>
13842
13843         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
13844         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
13845         * Makefile.in (PARSE_C): New macro.
13846         (PARSE_H): Likewise.
13847         (PARSE_SCAN_C): Likewise.
13848         ($(PARSE_C)): Target renamed from parse.c.
13849         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
13850         (clean): Remove parse-scan.c as well.
13851         (parse.o): Depend on $(PARSE_C).
13852
13853 1998-09-05  Anthony Green  <green@cygnus.com>
13854
13855         * README, license.terms: Removed.
13856
13857         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
13858         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
13859         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
13860         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
13861         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
13862         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
13863         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
13864         and Java trademark attribution.
13865
13866 1998-09-04  Tom Tromey  <tromey@cygnus.com>
13867
13868         * Makefile.in: Use gcjh, not gjavah.
13869         * config-lang.in (stagestuff): Use gcjh, not gjavah.
13870         * Make-lang.in: Changed gjavah to gcjh everywhere.
13871
13872 1998-09-03  Per Bothner  <bothner@cygnus.com>
13873
13874         * gjavah.c:  Support new -prepend -add -append flags.
13875         (print_method_info):  Method is not virtual if class is final.
13876
13877 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13878
13879         * jv-scan.c: Fixed copyright assignment.
13880         * keyword.gperf: Likewise.
13881         * keyword.h: Likewise.
13882         * lex.c: Fixed copyright assignment.
13883         (java_lex): Push unicode back when parsing '<'.
13884         * lex.h: Fixed copyright assignment.
13885         * parse-scan.y: Likewise.
13886         * parse.h: Fixed copyright assignment.
13887         (build_debugable_stmt, complete_for_loop): New function prototypes.
13888         * parse.y: Fixed copyright assignment.
13889         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
13890         size_zero_node when completing a loop with no exit condition.
13891         (for_statement_nsi:): Define action.
13892         (for_init:, for_update:): Return size_zero_node when empty.
13893         (declare_local_variables): Call build_debugable_stmt.
13894         (build_debugable_stmt): New function.
13895         (build_loop_body): Build debugable statement around loop
13896         condition part.
13897         (complete_loop_body): Take into account the debugable statement
13898         around the EXIT_EXPR.
13899         (complete_loop_body): New function.
13900         (patch_exit_expr): Fixed condition inversion.
13901
13902 1998-09-02  Tom Tromey  <tromey@cygnus.com>
13903
13904         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
13905         name of thread define.
13906         * jvspec.c (THREAD_NAME): New macro.
13907         (GCLIB): Likewise.
13908         (THREADLIB): Likewise.
13909         (lang_specific_driver): Recognize attempt to link with thread
13910         library or gc library.  Recognize -ljava on command line so it
13911         isn't linked against more than once.
13912
13913 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13914
13915         * parse-scan.y (report_main_declaration): Name of the class
13916         containing `main' can be a qualified name.
13917
13918 1998-08-31  Tom Tromey  <tromey@cygnus.com>
13919
13920         * config-lang.in: Changed gjavac to gjc everywhere.
13921         * Make-lang.in: Changed gjavac to gjc everywhere.
13922
13923 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13924
13925         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
13926         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
13927         and install the files.
13928         * Makefile.in (JAVA_OBJS_LITE): New variable.
13929         (compiler:): Now include jv-scan as a dependency.
13930         (../jv-scan$(exeext), parse-scan.c): New targets.
13931         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
13932         * config-lang.in (compilers): Removed gcj, gjavah from the list.
13933         * jcf-parse.c (parse_source_file): Call java_layout_classes and
13934         check for errors even if parse_only.
13935         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
13936         defined.
13937         (yylex): New function. Uses java_lex body.
13938         (java_lex): Removed commented out statement. Remove local variable
13939         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
13940         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
13941         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
13942         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
13943         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
13944         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
13945         where appropriate.
13946         (java_lex_error): Empty if JC1_LITE is defined.
13947         (java_get_line_col): Return 0 if JC1_LITE is defined.
13948         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
13949         SET_MODIFIER_CTX): Moved into the section containing the macros
13950         conditionally defined by JC1_LITE.
13951         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
13952         argument if JC1_LITE is defined.
13953         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
13954         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
13955         is defined.
13956         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
13957         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
13958         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
13959         to different values according to JC1_LITE.
13960         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
13961         declared if JC1_LITE set.
13962         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
13963         defined if JC1_LITE not set.
13964         (struct parser_ctx): Reorganized and skip the jc1 front end part
13965         if JC1_LITE set.
13966         (java_layout_classes): New function definition.
13967         (java_push_parser_context, java_init_lex, yyparse, yylex,
13968         yyerror): Prototype always declared. All other static function
13969         prototypes declared only if JC1_LITE is not set.
13970         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
13971         declared in parse.h.
13972         (java_layout_classes): New function.
13973         (java_complete_expand_methods): No longer layout the class here.
13974         * parse-scan.y: New file.
13975         * jv-scan.c: New file.
13976
13977 1998-08-25  Tom Tromey  <tromey@cygnus.com>
13978
13979         * gjavah.c (main): Handle -friend option.
13980         (friend_specs): New global.
13981         (generate_access): Handle friend_specs.
13982         (process_file): Likewise.
13983         (MAX_FRIENDS): New macro.
13984         (friend_count): New global.
13985         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
13986         Changed all callers.
13987
13988 1998-08-24  Per Bothner  <bothner@cygnus.com>
13989
13990         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
13991         (main):  Handle processing all the entries of a named .zip archive.
13992         * jcf-io.c (jcf_trim_old_input):  New function.
13993         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
13994
13995 1998-08-24  Per Bothner  <bothner@cygnus.com>
13996
13997         * lang.c (flag_assume_compiled):  Make default be on.
13998
13999 1998-08-21  Per Bothner  <bothner@cygnus.com>
14000
14001         * jcf-dump.c:  Add bunches of flags to control output more.
14002         (process_class):  New function;  support printing more than one class.
14003         (main): Support new --print-main and --javap flags.
14004         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
14005         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
14006
14007 1998-08-20  Per Bothner  <bothner@cygnus.com>
14008
14009         Change mangling of dispatch table to match C++ vtable (w/thunks).
14010         * class.c (build_dtable_decl), java-tree.h:  New function.
14011         (make_class_data):  Call it.
14012         * decl.c (init_decl_processing):  Likewise.
14013
14014 1998-08-19  Warren Levy  <warrenl@cygnus.com>
14015
14016         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14017         soft_anewarray; adjust args passed.
14018         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14019         match _Jv_NewObjectArray.
14020
14021 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14022
14023         * decl.c (push_labeled_block, pop_labeled_block): New functions.
14024         * expr.c (loopup_label): Call create_label_decl.
14025         (create_label_decl): New function.
14026         (java_lang_expand_expr): Call expand_start_bindings with argument
14027         set to zero.
14028         * java-tree.h Added space after PROTO in function declarations
14029         when necessary.
14030         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14031         (create_label_decl, push_labeled_block): New function
14032         declarations.
14033         * lex.c (label_id): Initialize.
14034         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14035         switch.
14036         * parse.h Added space after PROTO in function declarations when
14037         necessary.
14038         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14039         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14040         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14041         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14042         macros.
14043         (struct parser_ctxt): New fields current_loop,
14044         current_labeled_block.
14045         (build_if_else_statement, patch_if_else_statement,
14046         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14047         generate_labeled_block, complete_labeled_statement,
14048         build_bc_statement, patch_bc_statement, patch_loop_statement,
14049         build_new_loop, build_loop_body, complete_loop_body): New function
14050         declarations.
14051         * parse.y (java_warning_count): New global variable.
14052         (label_id): New static variable.
14053         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14054         (block:): Return size_zero_node when block is empty.
14055         (empty_statement:): Return size_zero_node.
14056         (statement:): Implement supplemental action when for_statement: is
14057         reduced.
14058         (label_decl:): New rule.
14059         (labeled_statement:): Rewritten using label_decl. Actions
14060         implemented.
14061         (labeled_statement_nsi:): Likewise.
14062         (if_then_statement): Actions implemented.
14063         (while_expression): New rule.
14064         (while_statement:): Rewritten using while_expression. Actions
14065         implemented.
14066         (while_statement_nsi:): Likewise.
14067         (do_statement_begin:): New rule.
14068         (do_statement:): Rewritten using do_statement_begin. Actions
14069         implemented.
14070         (for_statement:): Rewritten using for_begin. Actions implemented.
14071         (for_statement_nsi:): Likewise.
14072         (for_header:, for_begin:): New rules.
14073         (for_init:): Actions implemented.
14074         (statement_expression_list:, break_statement:,
14075         continue_statement:): Likewise.
14076         (yyerror): Count number of issued warning(s).
14077         (java_report_errors): Report error(s) and/or warning(s).
14078         (java_complete_class): Use build_java_argument_signature to
14079         recompute completed method signature.
14080         (java_check_regular_methods): New locals method_wfl and aflags.
14081         Use method_wfl instead of lookup_cl during error reports. Fixed
14082         indentation and modified some error messages. Use
14083         lang_printable_name in method instead of the DECL_NAME. New code
14084         to issue warnings on methods not overriding corresponding methods
14085         private to a different package.
14086         (java_method_add_stmt): Call add_stmt_to_compound.
14087         (add_stmt_to_compound): New function.
14088         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14089         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14090         (build_if_else_statement, patch_if_else_statement,
14091         build_labeled_block, generate_labeled_block,
14092         complete_labeled_statement, build_new_loop, build_loop_body,
14093         complete_loop_body, patch_loop_statement, build_bc_statement,
14094         patch_bc_statement, patch_exit_expr): New functions.
14095         * typeck.c (build_java_signature): Build argument signature before
14096         enclosing it in between parenthesis.
14097
14098 1998-08-17  Warren Levy  <warrenl@cygnus.com>
14099
14100         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14101         (JAVA_OBJS): Added reminder comment
14102
14103 1998-08-13  Nick Clifton  <nickc@cygnus.com>
14104
14105         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14106         be interpreted as a long long.
14107
14108 1998-08-13  Warren Levy  <warrenl@cygnus.com>
14109
14110         * decl.c (init_decl_processing): Use _Jv_InitClass, not
14111         soft_initialise_class.  Use _Jv_NewMultiArray, not
14112         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
14113         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
14114         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
14115         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14116
14117 1998-08-12  Per Bothner  <bothner@cygnus.com>
14118
14119         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14120         length_identifier_node):  New global tree node constants.
14121         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
14122         Replace uses by super_identifier_node etc.
14123         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
14124
14125         * parse.y (resolve_field_access):  Don't special-case ".length" if
14126         flag_emit_class_files.
14127         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
14128         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
14129         and ARRAY.length.
14130
14131 1998-08-11  Per Bothner  <bothner@cygnus.com>
14132
14133         * decl.c (init_decl_processing): Remove unused method_type_node fields.
14134         * class.c (make_method_value):  Remove init for removed fields.
14135
14136         * class.c (layout_class):  Use build_java_argument_signature.
14137         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
14138
14139         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
14140         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
14141         (build_java_signature):  Don't use push_java_argument_signature.
14142
14143         * typeck.c (lookup_argument_method):  New function.
14144         * parse.y (java_check_regular_methods):  Use lookup_argument_method
14145         instead of lookup_java_method2 followed by lookup_java_method.
14146
14147         * parse.y (check_method_redefinition):  Minor optimization.
14148
14149         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
14150         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14151
14152 1998-08-10  Tom Tromey  <tromey@cygnus.com>
14153
14154         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14155         c-pragma.o.
14156
14157         * gjavah.c (java_float_finite): Use K&R-style definition.
14158         (java_double_finite): Likewise.
14159         (generate_access): Now returns void.  Changed all callers.
14160         (last_access_generated): Removed.
14161         (process_file): Only make a single pass over the .class file.
14162
14163 1998-07-29  Per Bothner  <bothner@cygnus.com>
14164
14165         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
14166         for compatibility for G++ (with -fvtable-thunks).
14167         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
14168
14169         * gjavah.c (process_file):  Use public inheritance for super-class.
14170
14171 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14172
14173         * lex.c (java_init_lex): Initialize ctxp->package.
14174         * parse.h (struct parser_ctxt): package and package_len replaced
14175         by tree package, an identifier node. Field method_decl_list is
14176         gone. Fixed comments.
14177         (lookup_field_wrapper, merge_qualified_name, not_accessible,
14178         class_in_current_package): New function prototypes.
14179         * parse.y (array_type:): Set class loaded flag on primitive type
14180         arrays.
14181         (package_declaration:): Assign ctxp->package to the
14182         identifier node.
14183         (method_invocation:): Handle invocation of method qualified by
14184         `super'.
14185         (single_type_import_declaration:): Removed ambiguity check.
14186         (java_pop_parser_context): New local variable `next'. Reset and
14187         set IMPORT_CLASSFILE_NAME flags on current and previous import
14188         list.
14189         (java_accstring_lookup): Use new local macro COPY_RETURN.
14190         (lookup_field_wrapper): New function.
14191         (parser_qualified_classname): Use merge_qualified_name.
14192         (parser_check_super_interface): Broaden error message.
14193         (do_resolve_class): Check for qualified class name in the current
14194         compilation unit if appropriate.
14195         (process_imports): Check for already defined classes.
14196         (check_pkg_class_access): Got rid of call to
14197         get_access_flags_from_decl.
14198         (java_complete_expand_methods): Call safe_layout_class based on
14199         the current class size.
14200         (make_qualified_primary): Build a WFL qualification on primary if
14201         none exists.
14202         (merge_qualified_name): New function.
14203         (make_qualified_name): Use merge_qualified_name.
14204         (resolve_expression_name): Use safe_lookup_field.
14205         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14206         (resolve_qualified_expression_name): Likewise. Check on resolved
14207         element accessibility.
14208         (not_accessible_p, class_in_current_package): New functions.
14209         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14210         (patch_method_invocation_stmt): Merged common pieces. Check
14211         accessibility of invoked method.
14212         (check_for_static_method_reference): Add returned type in error
14213         message.
14214         (invocation_mode): Get rid of bogus check on PRIVATE methods.
14215         (refine_accessible_methods_list): Merged two conditions in test.
14216         (java_complete_class): Sanity check on stabilize_ref gone.
14217         * zextract.c (read_zip_archive): Cast lseek second argument to long.
14218
14219 1998-07-28  Per Bothner  <bothner@cygnus.com>
14220
14221         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
14222
14223 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14224
14225         * gjavah.c (F_NAN): Removed.
14226         (F_NAN_MASK): New macro.
14227         (F_POSITIVE_INFINITY): Removed.
14228         (F_NEGATIVE_INFINITY): Likewise.
14229         (java_float_finite): Rewrote.
14230         (D_NAN_MASK): Renamed.
14231         (java_double_finite): Rewrote.
14232         (D_POSITIVE_INFINITY): Removed.
14233         (D_NEGATIVE_INFINITY): Likewise.
14234
14235         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14236         If verbose, print underlying representation of value in hex.
14237
14238 1998-07-24  Per Bothner  <bothner@cygnus.com>
14239
14240         * buffer.h, buffer.c:  New files.
14241         * Makefile.in (JAVA_OBJS):  Add buffer.o.
14242
14243         Support locals variables and writing their debug entries to .class.
14244         * jcf-write.c:  Simplify some by user new buffer type.
14245         (vode_buffer_grow):  Removed.
14246         (struct localvar_info):  New type.
14247         (localsvars, localvartable):  New buffers.
14248         (localvar_alloc, localvar_free):  New functions.
14249         (generate_bytecode_insns):  Handle local variables.
14250         (generate_classfile):  Write LocalVariableTable attribute.
14251
14252 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14253
14254         * jcf-io.c (open_in_zip): Check the zipfile magic number.
14255         * zipfile.h (ZIPMAGIC): New macro.
14256
14257 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14258
14259         * Makefile.in (gjavah.o): Updated dependencies.
14260         (jcf-dump.o): Likewise.
14261         (all.indirect): Use ../gjavah.
14262         (../gjavah$(exeext)): Likewise.
14263         (clean): Don't remove gjavah.
14264         (clean): Remove parse.c, not java/parse.c.
14265         * Make-lang.in (java): Added gjavah.
14266         (gjavah$(exeext)): New target.
14267         (GJAVAH_SOURCES): New macro.
14268         (java.all.build): Added gjavah.
14269         (java.all.cross): Likewise.
14270         (java.rest.encap): Likewise.
14271         * config-lang.in (compilers, stagestuff): Added gjavah.
14272
14273 1998-07-23  Tom Tromey  <tromey@cygnus.com>
14274
14275         * gjavah.c (java_float_finite): New function.
14276         (java_double_finite): Likewise.
14277         (F_POSITIVE_INFINITY): New macro.
14278         (F_NEGATIVE_INFINITY): Likewise.
14279         (F_NAN): Likewise.
14280         (D_POSITIVE_INFINITY): Likewise.
14281         (D_NEGATIVE_INFINITY): Likewise.
14282         (D_NAN): Likewise.
14283         (print_field_info): Use java_float_finite and java_double_finite.
14284
14285 1998-07-23  Per Bothner  <bothner@cygnus.com>
14286
14287         * parse.y (method_header):  Name "this" implicit argument.
14288
14289 1998-07-22  Per Bothner  <bothner@cygnus.com>
14290
14291         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
14292         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
14293         (put_linenumber):  New function.
14294         (generate_bytecode_insns, generate_classfile):  Write line numbers.
14295
14296 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14297
14298         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14299         (lookup_name, build_known_method_ref, build_class_init,
14300         build_invokevirtual, invoke_build_dtable, match_java_method,
14301         build_field_ref, pushdecl_force_head, build_java_binop,
14302         binary_numeric_promotion, build_decl_no_layout,
14303         build_java_arrayaccess, build_newarray, build_anewarray,
14304         build_java_array_length_access, build_java_arraynull_check): New
14305         extern function prototypes.
14306         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14307         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14308         java-tree.h.
14309         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14310         to NULL
14311         * jcf.h (jcf_out_of_synch): New extern function prototype.
14312         * parse.h: Static/global function implemented in parse.y
14313         prototyped and declarations moved at the end of the file.
14314         (DECL_P): Check that the argument isn't null.
14315         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14316         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14317         (QUAL_DECL_TYPE): New macro.
14318         (PARAMS): Macro definition removed.
14319         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14320         (return_statement:): Call build_return.
14321         (field_access:): Call make_qualified_primary in sub rule.
14322         (method_invocation:): Build method invocation and call
14323         make_qualified_primary when processing primaries.
14324         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14325         get_type_from_signature.
14326         (java_check_regular_method): Extra integer 0 argument when calling
14327         lookup_java_method2.
14328         (lookup_java_interface_method2): Extra method DECL argument when
14329         calling lookup_java_interface_method2.
14330         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14331         COMPOUND_EXPR node.
14332         (java_complete_expand_method): Layout current class iff not
14333         already done. Don't process interface's methods.
14334         (java_complete_expand_method): Use super class only if it
14335         exists. Use current class otherwise.
14336         (make_qualified_primary): New function.
14337         (resolve_expression_name): Process qualified expression or
14338         expression from primary the same way.
14339         (resolve_expression_name): Two last arguments to
14340         resolve_field_access are now NULL_TREEs.
14341         (resolve_field_access): New variable is_static. Local field must
14342         be DECLs. is_static computed on field DECLs only. Append code in
14343         where_found to the field access if necessary. Use QUAL_DECL_TYPE
14344         to initialize field_type.
14345         (resolve_qualified_expression_name): New local variable,
14346         previous_call_static and is_static. Handle primaries with function
14347         calls, casts, array references and `this'. `super' now handled as
14348         `(super_class)this'. Use is_static to clarify boolean expressions.
14349         Added code to handle case where a proper handle is required to
14350         access a field. Use QUAL_DECL_TYPE where applicable.
14351         (maybe_access_field): New function.
14352         (patch_method_invocation_stmt): New arguments primary, where,
14353         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14354         deleted. Use `where' as a type to search from if specified. Check
14355         for static method reference where forbidden. Append primary or
14356         current_this to the argument list if not calling constructor nor
14357         static methods.
14358         (check_for_static_method_reference): New function.
14359         (patch_invoke): Layout the class on which new is done if
14360         necessary.
14361         (lookup_method_invoke): Changed format to report errors on
14362         methods.
14363         (qualify_ambiguous_name): New local variable this_found. Now
14364         handle things from primaries. Method call are considered
14365         expression names.
14366         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14367         changed into NULLs.
14368         (not_initialized_as_it_should_p): Comply with the new DECL_P.
14369         (java_complete_tree): New case fo RETURN_EXPR. Process function
14370         call arguments in separate function.
14371         (complete_function_arguments): New function.
14372         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14373         anymore.
14374         (patch_assignment): Take the return function slot into account as
14375         a RHS. Distinguish assignment from a return.
14376         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14377         when checking methods in interfaces.
14378         (resolve_type_during_patch): NULL argument to unresolve_type_p
14379         instead of NULL_TREE.
14380         (patch_newarray): Fixed typo in comment.
14381         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14382         (build_return, patch_return): New functions.
14383         * typeck.c (lookup_java_constructor): Fixed typo in comment.
14384
14385 1998-07-21  Per Bothner  <bothner@cygnus.com>
14386
14387         * constants.c (find_name_and_type_constant, find_fieldref_index,
14388         find_methodref_index):  New methods.
14389         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
14390         just return given method.  Also, rename to build_known_method_ref.
14391         (expand_invoke):  Rename call to build_invoke_non_interface.
14392         * java-tree.h, parse.h:  Update prototype.
14393         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
14394         (such as expand_expr_stmt) if flag_emit_class_files.
14395         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14396         STACK_TARGET, IGNORE_TARGET):  New macros.
14397         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
14398         (generate_bytecode_insn):  New function to generate method's bytecode.
14399         (generate_classfile):  Node generate Code attribute for a method.
14400         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14401         push_long_const, field_op, adjust_typed_op, maybe_wide):
14402         New functions used by generate_bytecode_insn.
14403
14404         * typeck.c (signature_include_return):  Remove variable.
14405         (push_java_argument_signature, build_java_argument_signature):  New.
14406         (build_java_signature):  Use push_java_argument_signature.
14407         * parse.y:  Use build_java_argument_signature instead of fiddling
14408         with signature_include_return.
14409
14410 1998-07-17  Tom Tromey  <tromey@cygnus.com>
14411
14412         * gjavah.c (print_c_decl): Always generate JArray<>* for array
14413         types.
14414
14415         * Makefile.in (all.indirect): Added gjavah$(exeext).
14416         (gjavah$(exeext)): Added $(exeext).
14417         (clean): Likewise.
14418
14419 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14420
14421         * class.c (layout_class): Call to java_layout_parsed_class replace
14422         by safe_layout_class.
14423         * expr.c (build_java_array_length_access): Removed static storage
14424         class in the function definition.
14425         (build_java_arraynull_check): Likewise.
14426         Also fixed typos in two comments.
14427         * lex.c (java_init_lex): Initialize static global kw_length.
14428         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14429         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14430         java_lex_error.
14431         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14432         * parse.h (resolve_no_layout): New static function declaration.
14433         (get_identifier_in_static): Declaration removed.
14434         (java_layout_parsed_class): Function name declaration changed to
14435         safe_layout_class.
14436         (build_newarray_node, patch_newarray, resolve_type_during_patch,
14437         not_initialized_as_it_should_p, build_this): New static function
14438         declarations.
14439         (pushdecl_force_head, build_java_binop, int_fits_type_p,
14440         binary_numeric_promotion, stabilize_reference,
14441         build_decl_no_layout, build_java_arrayaccess): Extern function
14442         declarations moved into their own section.
14443         (build_newarray, build_anewarray, build_java_array_length_access,
14444         build_java_arraynull_check): New extern function declarations.
14445         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14446         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14447         fake tree codes.
14448         (CALL_CONSTRUCTOR_P): New macro.
14449         * parse.y (kw_length): New static global tree node.
14450         (return_statement): Tagged <node>.
14451         (RETURN_TK): Tagged <operator>.
14452         (variable_declarator_id:): Build variable declaration with an
14453         empty initialization value if a syntax error was found in the
14454         initialization part of the variable declaration.
14455         (statement_without_trailing_substatement:): return_statement: now
14456         uses the default rule.
14457         (return_statement:): Temporarily fixed to return NULL_TREE.
14458         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14459         (class_instance_creation_expression:): Class creation rules now
14460         call build_method_invocation upon reduction.
14461         (array_creation_expression:): Rules call build_newarray_node upon
14462         reduction.
14463         (dim_exprs:): Build a list of dimension expressions.
14464         (dim_expr:): Store location of the OSB_TK in the dimension
14465         expression node.
14466         (method_invocation:): Added a new error rule.
14467         (build_unresolved_array_type): WFL argument may also be an array
14468         on a primitive type. Name of the argument changed to reflect this.
14469         (method_declarator): Insert argument type at the beginning of the
14470         argument type list and later reverse the list.
14471         (unresolved_type_p): Argument 'returned' may be optionally
14472         NULL_TREE.
14473         (java_layout_class_from_source): Function renamed
14474         safe_layout_class.
14475         (resolve_and_layout): Now call resolve_no_layout and
14476         safe_layout_class.
14477         (resolve_no_layout): New function.
14478         (purify_type_name): New function.
14479         (complete_class_report_errors): Call purify_type_name during error
14480         report on a type not found.
14481         (process_imports): error_found local variable doesn't need to be
14482         initialized to zero.
14483         (declare_local_variables): New local type_wfl. Fixed typo in error
14484         message. type_wfl assigned to unresolved type and used to register
14485         incomplete type. Build a WFL around the variable initialization
14486         statement so that debug info can be generated on it.
14487         (source_start_java_method): Reverse argument list after they've
14488         been processed.
14489         (current_this): New static global variable.
14490         (java_complete_expand_methods): Set current_this when appropriate.
14491         (resolve_expression_name): Build correct static and non static
14492         field access bearing a simple name.
14493         (resolve_field_access): Resolve the length field of arrays. Handle
14494         f.m() cases.
14495         (patch_method_invocation_stmt): Set the type of the method
14496         invocation to error_mark_node. This value is later overridden by a
14497         valid type, if any. Don't handle qualified constructor invocation
14498         as qualified method invocation. Call lookup_method_invoke with its
14499         new flag. It's no longer necessary to access the selected method
14500         as the value of a tree list. Handle constructor invocation.
14501         (patch_invoke): Reverse argument list when invoking non interface
14502         methods. Insert call to new as the first argument of the
14503         constructor.
14504         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14505         defined within a final class. Return INVOKE_STATIC if the invoked
14506         method is a constructor.
14507         (lookup_method_invoke): New lc argument is a flag to indicate a
14508         constructor lookup. Now handle constructor lookup. Choose the most
14509         specific method in case several were matching the invocation
14510         requirements. Return a method decl instead of a tree list featuring
14511         one single method decl element.
14512         (refine_accessible_methods_list): New lc flag argument to
14513         indicate that a constructor is being looked up.
14514         (not_initialized_as_it_should_p): New function.
14515         (java_complete_tree): Now process fake tree codes
14516         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14517         save_expr on resolved function call arguments. Case on
14518         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14519         (patch_assignment): LHS can be a field access expression. When
14520         dealing with reference, lhs_type is the promoted type of the
14521         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14522         applicable.
14523         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14524         (patch_binop): Use not_initialized_as_it_should_p where
14525         applicable.
14526         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14527         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14528         where applicable.
14529         (resolve_type_during_patch): New function.
14530         (patch_cast): Call resolve_type_during_patch to resolve type and
14531         report error accordingly.
14532         (patch_array_ref): Use not_initialized_as_it_should_p where
14533         applicable. Array base expression is saved before being
14534         used. Promote the type of an array elements if it contains non
14535         builtin types.
14536         (build_newarray_node, patch_newarray, build_this): New functions.
14537
14538 1998-07-16  Tom Tromey  <tromey@cygnus.com>
14539
14540         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14541         increment it in `for' statement.
14542         (print_field_info): If number is inf or nan, don't print it.
14543         (print_method_info): If method name is `delete', just ignore it.
14544         (print_c_decl): Special-case jstringArray.
14545
14546         * gjavah.c (help): New function.
14547         (no_argument): New function.
14548         (usage): Changed text.
14549         (main): Rewrote argument handling.  Now handles -v, --help,
14550         --version.
14551         (version): New function.
14552         (found_error): New global.
14553         (main): Return found_error.
14554         (generate_access): Set found_error.
14555         (print_c_decl): Likewise.
14556
14557 1998-07-15  Tom Tromey  <tromey@cygnus.com>
14558
14559         * gjavah.c (print_c_decl): Don't print "," when examining field.
14560         Skip type name when looking at "[L" types.
14561         (process_file): Now static.
14562         (generate_access): Now returns int.
14563         (last_access_generated): New global.
14564         (process_file): Clear last_access_generated; make multiple passes
14565         over the class.
14566         (print_field_info): Just return if generate_access returns true.
14567         (print_method_info): Likewise.  Also, allow <init> functions to
14568         pass through.
14569         (print_c_decl): Added is_init argument.  Print constructors
14570         properly.
14571         (print_cxx_classname): Use UTF8_GET to extract characters from
14572         string.
14573         (print_base_classname): New function.
14574         (print_class_decls): New function.
14575         (process_file): Use it.
14576         (utf8_cmp): New function.
14577
14578 1998-07-13  Nick Clifton  <nickc@cygnus.com>
14579
14580         * lang-options.h: Format changed to match changes in gcc/toplev.c
14581         to implement a --help option.
14582
14583 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
14584
14585         * decl.c (init_decl_processing): Revert change to dtable_type.
14586
14587 1998-07-09  Per Bothner  <bothner@cygnus.com>
14588
14589         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
14590
14591 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
14592
14593         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
14594
14595         * lang.c (lang_init): Default flag_exceptions to 1, without
14596         checking to see if it's 2 first.
14597
14598 1998-07-08  Jeffrey A Law  (law@cygnus.com)
14599
14600         * constants.c: Include "system.h".
14601         * decl.c: Likewise.
14602         * lang.c (flag_new_exceptions): Get via extern now.
14603         (lang_init_options): New functions.  Turn on flag_new_exceptions.
14604
14605 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14606
14607         * lex.c (java_lex): Return 0 when we see an invalid character in
14608         the input.
14609
14610         * lex.c (java_read_char): Specify extra argument when calling
14611         java_lex_error.
14612         (java_read_unicode, java_parse_end_comment,
14613         java_parse_escape_sequence): Likewise,
14614         (java_lex): Specify extra argument when calling
14615         java_lex_error. Test that IDs are beginning with a legal character
14616         for IDs. Handle invalid characters with an error message and a
14617         call to java_lex_error.
14618         (java_lex_error): Adjust column position by new argument
14619         `forward'. Issue an error even if in the middle of reporting an
14620         other error.
14621
14622 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
14623
14624         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
14625         we don't explicitly put a null pointer when we're copying it.
14626
14627 1998-07-07  Tom Tromey  <tromey@cygnus.com>
14628
14629         * gjavah.c (print_cxx_classname): New function.
14630         (super_class_name): Likewise.
14631         (print_super_fields): Removed.
14632         (in_super): Removed.
14633         (print_field_info): Never generate #defines.
14634         (print_c_decl): Changed generated types to match JNI.  No longer
14635         print class name before method name.
14636         (print_method_info): Print "static" before static methods.
14637         Print "virtual" before non-final methods.
14638         (usage): Use exit(1), not exit(-1).
14639         (main): Likewise.
14640         (print_field_info): Use %.17g to print a double.
14641         (last_access): New globals.
14642         (process_file): Initialize last_access.
14643         (usage): Now static.
14644         (ACC_VISIBILITY): New define.
14645         (generate_access): New function.
14646         (print_field_info): Call it.
14647         (print_method_info): Likewise.  Also, generate information for all
14648         methods, not just native methods.  Return void.
14649         (print_c_decl): Return void.
14650         (print_field_info): Return void.
14651
14652 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14653
14654         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
14655         processing the jc1 grammar file. Prefix bison functions and
14656         variables with java_.
14657         (parse.c): Dependencies on parse.h and lex.h
14658         * expr.c (build_java_arrayaccess): Function now global.
14659         * java-tree.h: Comment reorganized to carry on previous
14660         classification effort.
14661         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
14662         RESOLVE_TYPE_NAME_P): New flags on WFLs.
14663         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
14664         java_parse (new prefix java_ generated by bison).
14665         (java_layout_parsed_class, java_register_parsed_class): Function
14666         call removed.
14667         (yyparse): Removed unnecessary call to init_outgoing_cpool.
14668         * lex.c (static tree wfl_op): Variable deleted.
14669         (java_init_lex): Initialize kw_super and kw_this. Initialize more
14670         ctxp fields to NULL_TREE.
14671         (java_lex): No longer create WFL for operators. Filename caching
14672         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
14673         created as STRING_CST and later expanded. Removed extra argument
14674         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
14675         and SUPER.
14676         (build_wfl_node): Removed code in comments.
14677         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
14678         store token and location data in the current bison token.
14679         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
14680         static/extern function declaration at the beginning of the file.
14681         (struct qualification): Data structure definition deleted.
14682         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
14683         (qualify_ambiguous_name): Function declaration modified. Function
14684         now returns nothing.
14685         (build_array_ref, patch_array_ref, make_qualified_name,
14686         resolve_qualified_expression_name, maybe_generate_clinit,
14687         resolve_field_access): New static function declarations.
14688         (build_java_arrayaccess): New extern function declaration.
14689         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
14690         (CALL_EXPR_PRIMARY): Macro deleted.
14691         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
14692         (struct parser_ctxt): Field initialized_final
14693         removed. non_static_initialized, static_initialized: New fields.
14694         * parse.y (static tree kw_super, static tree kw_this): New global
14695         static.
14696         (%union): tree wfl field of operator member replaced by int
14697         location. WFLs are non longer created for operators.
14698         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
14699         (qualified_name:): Now calls make_qualified_name to build the
14700         identifier.
14701         (type_declaration:): Consider generating <clinit> when class
14702         parsing completed.
14703         (variable_declarator:): Directly build an assignment node when the
14704         variable is initialized when declared.
14705         (this_or_super:): Build a WFL and set current location when THIS
14706         or SUPER are parsed.
14707         (expression_statement:): Wrap statement around a WFL.
14708         (primary_no_new_array:): Fixed typo. Changed value returned by
14709         THIS_TK because of its new type (temporary).
14710         (dim_exprs:): Temporary fix because of OSB_TK's new type.
14711         (field_access:): Build qualified name with SUPER.
14712         (method_invocation:): Fixed returned value because of SUPER's new
14713         type.
14714         (array_access:): Use OSB_TK location information.
14715         (post_increment_expression:, post_decrement_expression:,
14716         unary_expression:, pre_increment_expression:,
14717         pre_decrement_expression:, unary_expression_not_plus_minus:,
14718         cast_expression:, multiplicative_expression:,
14719         additive_expression:, shift_expression:, relational_expression:,
14720         equality_expression:, and_expression:, exclusive_or_expression:,
14721         inclusive_or_expression:, conditional_and_expression:,
14722         conditional_or_expression:, assignment:): Use new location/token
14723         information available on operators.
14724         (create_class): Set super_decl_type to NULL_TREE when processing
14725         java.lang.Object.
14726         (register_fields): Field initialization is now a MODIFY_EXPR
14727         node. Chain initialization code to the matching lists (according
14728         to the field declaration modifiers).
14729         (maybe_generate_clinit): New function.
14730         (method_header): Don't set method's DECL_NAME to a WFL when adding
14731         methods to java.lang.Object.
14732         (resolve_and_layout): Now can return NULL_TREE if the type
14733         resolution fails. Otherwise, return the class DECL instead of its
14734         TYPE.
14735         (check_method_redefinition): Don't patch method DECL_NAME if it
14736         belongs to java.lang.Object.
14737         (process_imports): Simply assign error_found to the value returned
14738         by check_pkg_class_access.
14739         (declare_local_variables): Don't use their init statements (if
14740         any) when parsing error were previously found. Reuse MODIFY_EXPR
14741         build during parsing as an init statement.
14742         (java_method_add_stmt): Now return the current method body.
14743         (java_layout_parsed_class, java_register_parsed_class): Functions
14744         removed.
14745         (java_complete_expand_methods): Initialize the constant pool on a
14746         per class basis. Layout the classes before expanding their method
14747         bodies. Don't try expand artificial constructor code if error were
14748         found. Make the classes data and register them if no error were
14749         found.
14750         (java_complete_expand_method): Retrieve an artificial constructor
14751         argument list before entering its body. Assign the top block to
14752         the artificial constructor function body and set types of declared
14753         blocks and compound statements to void. Walk method body if not an
14754         artificial constructor.
14755         (make_qualified_name, cut_identifier_in_qualified): New functions.
14756         (resolve_expression_name): Fixed comments. Save/restore the
14757         current class CLASS_LOADED_P flag value. Build non qualified
14758         static field access and handle qualified expression names.
14759         (resolve_field_access, resolve_qualified_expression_name): New
14760         functions.
14761         (patch_method_invocation_stmt): Use the new expression resolution
14762         scheme, calling resolve_field_access when the function call is
14763         resolved as an expression.
14764         (qualify_ambiguous_name): Function rewritten to work on qualified
14765         expression produced by make_qualified_name.
14766         (java_complete_tree): Promote type when function's argument are
14767         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
14768         the assignment to discover further errors if RHS is a expression
14769         name that fails to evaluate. Declare LHS initialized even though
14770         the assignment failed. Don't use the location variable and removed
14771         extra argument in patch function calls. Now handle the ARRAY_REF
14772         case and build internal string representation when STRING_CSTs are
14773         walked.
14774         (build_method_invocation): Don't wrap function call around a WFL.
14775         (build_assignment): Likewise. Use the operator location
14776         information.
14777         (patch_assignment): Handle array access LHSs. Handle error
14778         provenance, resulting in a better error report.
14779         (build_binop): Use op_location from operator as binop location
14780         information.
14781         (build_unaryop, build_incdec, build_cast): Likewise.
14782         (patch_binop): Extract location information from the node. Fixed
14783         typo in error message.
14784         (patch_unary_op): Extract location information from the node.
14785         (build_array_ref, patch_array_ref): New functions.
14786
14787 1998-07-01  Tom Tromey  <tromey@cygnus.com>
14788
14789         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
14790         match _Jv_IsInstanceOf.
14791         * decl.c (init_decl_processing): Use _Jv_NewArray, not
14792         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
14793
14794 1998-06-30  Tom Tromey  <tromey@cygnus.com>
14795
14796         * decl.c (init_decl_processing): Functions are now named
14797         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
14798
14799 1998-06-29  Per Bothner  <bothner@cygnus.com>
14800
14801         * java-tree.h (load_class):  Add prototype.
14802         * class.c (is_compiled_class):  Add missing arg to load_class.
14803         * expr.c (expand_java_NEW):  Call load_class.
14804         * parse.y (process_import):  Removed bogus use of void return value.
14805
14806 1998-06-25  Per Bothner  <bothner@cygnus.com>
14807
14808         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
14809         Function name is "_Jv_Throw" instead of "soft_athrow".
14810         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
14811         Function name is "_Jv_AllocObject" instead of "soft_new".
14812         Takes an extra parameter (object size).
14813         * expr.c:  Update calls.
14814
14815 1998-06-24  Per Bothner  <bothner@cygnus.com>
14816
14817         * lex.c (java_get_line_col):  Handle end-of-file.
14818         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
14819
14820 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
14821
14822         * lang.c (lang_init): Make -fexceptions the default.
14823         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
14824         exception handling is not turned on.
14825
14826 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14827
14828         * lang.c (flag_new_exceptions): Make this this default.
14829         * decl.c (end_java_method): Call emit_handlers.
14830         * except.c (method_init_exceptions): Set language code and version.
14831         (expand_start_java_handler): Enable exception, and call
14832         expand_eh_region_start.
14833         (expand_end_java_handler): Enable exception, and set up catch blocks.
14834         (emit_handlers): New routine to generate the saved handlers.
14835         * java-except.h (emit_handlers): Add prototype.
14836
14837 1998-06-12  Per Bothner  <bothner@cygnus.com>
14838
14839         We used to have three different representations of the constant pool:
14840         the CPool structure, the tree_constant_pool, and the constructures
14841         used to build the Class object (which may need class and string
14842         constants) in compiled code.  None were appropriate for compiling
14843         to .class files, so I did a major overhaul.
14844
14845         First, the tree_constant_pool array was removed.  Things were
14846         modified to the CPool structure in the JCF could be used.
14847         Second, a "capacity" field was added to the CPool, and functions
14848         written to search for a matching constant, adding one if not found.
14849         The code that generated the Class object was changed to use a CPool.
14850         The actual TREE_LISTs used to build the CONSTRUCTORs used for
14851         the static Class object are now only in build_constants_constructor.
14852         Finally, I wrote code which can generate a .class file (including its
14853         constant pool) from the RECORD_TYPE of a class.  This is a big step
14854         on the way to compiling Java source into .class files.
14855
14856         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
14857         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
14858
14859         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
14860         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
14861         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
14862         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
14863         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
14864         (lang_type):  Removed constant_pool field.
14865         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
14866         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
14867         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
14868         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
14869
14870         * constants.c (current_constant_pool_tags, current_constant_pool_data,
14871         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
14872         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
14873         (set_constant_entry, find_constant1, find_constant2,
14874         find_class_constant, count_constant_pool_bytes, write_constant_pool,
14875         find_utf8_constant, find_class_or_string_constant):  New functions.
14876
14877         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
14878         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
14879         (give_name_to_class, get_class_constant):  Likewise.
14880         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
14881         (get_name_and_type_constant, get_ref_constant):  Removed.
14882         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
14883         * parse.y:  Don't save/restore tree_constant_pool.
14884         * verify.c (verify_jvm_instructions):  Update for new approach.
14885         * expr.c (expand_invoke, expand_java_field_op): Likewise.
14886
14887         * lang-options.h:  Added -femit-class-file, -femit-class-files.
14888         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
14889         (lang_f_options):  Added "emit-class-file(s)".
14890
14891         * expr.c (build_java_arrayaccess):  Generate more efficient array
14892         bounds checking, by using unsigned compare.
14893
14894         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
14895
14896 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14897
14898         * parse.h: New comment on the handling of unresolved type
14899         identifiers. JDEPs are now part of the jdep_code enum.
14900         (typedef struct jdep): Now use enum jdep_code or int, depending on
14901         availability. Both are narrowed down to an 8 bits bitfield.
14902         (CALL_EXPR_PRIMARY): Fixed comment.
14903
14904 1998-06-10  Tom Tromey  <tromey@cygnus.com>
14905
14906         * Make-lang.in (java): Added gjavac and jvgenmain.
14907         (java.start.encap): Depend on gjavac.
14908         (java.rest.encap): Depend on jvgenmain.
14909
14910         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
14911         (JAVA_CROSS_NAME): Likewise.
14912         (java.all.build): Depend on jvgenmain and gjavac.
14913         (java.all.cross): Depend on jvgenmain and gjavac-cross.
14914         (jvgenmain$(exeext)): New target.
14915         (java.install-common): Wrote.
14916         * config-lang.in (compilers, stagestuff): Added gjavac and
14917         jvgenmain.
14918
14919 1998-06-10  Dave Brolley  <brolley@cygnus.com>
14920
14921         * lang.c (lang_decode_option): New argc/argv interface.
14922
14923 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14924
14925         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
14926         * decl.c (build_decl_no_layout): New function.
14927         * expr.c (java_lang_expand_expr): Layout declarations found in
14928         blocks before they're pushed.
14929         * jcf-parse.c (load_class): Save current line when parsing class
14930         file.
14931         (parse_source_file): Register class before expanding their
14932         methods.
14933         * lang.c (put_decl_node): Produce `null' when `void *' is
14934         processed.
14935         * lex.c (static tree wfl_op): New static global, for error report
14936         on casts.
14937         (java_init_lex): wfl_operator and wfl_op initialized
14938         here. Filename caching added for wfl_op. Return wfl_op when `(' is
14939         parsed.
14940         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
14941         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
14942         build_unresolved_array_type): New static function definitions.
14943         (build_decl_no_layout): New extern function declared.
14944         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
14945         faulty modifier exists.
14946         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
14947         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
14948         (UNARY_PLUS_EXPR): New fake operator.
14949         (struct parser_ctxt): New field osb_number.
14950         * parse.y (static tree wfl_operator): New static WFL for operator
14951         bound error messages.
14952         (DECR_TK, INCR_TK): Moved.
14953         (OP_TK): Tagged <operator>.
14954         (array_type:): Now call build_unresolved_array_type.
14955         (dim_expr:): Count the number of '[' seen.
14956         (post_increment_expression, post_decrement_expression,
14957         pre_increment_expression, pre_decrement_expression,
14958         unary_expression_not_plus_minus, unary_expression:): Actions are
14959         now building the corresponding unary expressions.
14960         (cast_expression:): Actions are now building cast expressions.
14961         (build_unresolved_array_type): New function.
14962         (create_interface): Reset the number of declared interfaces.
14963         (create_class): Likewise.
14964         (method_header): Methods declared within the scope of an interface
14965         are now implicitly set public and abstract.
14966         (java_complete_class): Variable's and parameter's type are patched
14967         with a promoted type.
14968         (declare_local_variables): Resolved non builtin types are promoted
14969         before being used to build a variable decl. Removed type patch
14970         posted on variable initialization statement.
14971         (source_start_java_method): Use build_decl_no_layout to build the
14972         decl of a parameter of incomplete type.
14973         (java_register_parsed_class): Process interfaces too. Call
14974         rest_of_decl_compilation on each processed class declarations.
14975         (java_complete_expand_methods): Don't attempt to expand things in
14976         interfaces.
14977         (java_complete_tree): Process CONVERT_EXPR, even though it always
14978         has a type. Propagate error_mark_node to node's type too. Promote
14979         method's call argument type and return error_mark_node if
14980         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
14981         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
14982         handle unary operator nodes.
14983         (build_assignment): Added comment.
14984         (print_int_node): New function.
14985         (patch_assignment): New second argument. New error handling. Use
14986         print_int_node. Handle references. Use can_cast_to_p to issue
14987         different error message according to the context and check upon
14988         the initialization of the RHS.
14989         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
14990         (operator_string): Handle more operators.
14991         (patch_binop): No longer use a function static
14992         wfl_operator. Improved error message on shift distance.
14993         (build_unaryop, build_incdec, build_cast, patch_unaryop,
14994         patch_cast): New functions.
14995
14996 1998-06-05  Per Bothner  <bothner@cygnus.com>
14997
14998         * jvspec.c:  New file.
14999         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
15000
15001         * java-tree.h (identifier_subst):  Add declaration.
15002
15003 1998-06-04  Tom Tromey  <tromey@cygnus.com>
15004
15005         * jvgenmain.c (main): Generate call to JvRunMain.
15006
15007         * class.c (make_class_data): Push value for "sync_info" field.
15008         * decl.c (init_decl_processing): Push "sync_info" field.
15009
15010 1998-06-03  Per Bothner  <bothner@cygnus.com>
15011
15012         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
15013         Java (source) name, not signature.
15014         Set TYPE_ALIGN to (at least) that of element_type.
15015
15016 1998-06-02  Per Bothner  <bothner@cygnus.com>
15017
15018         * class.c:  Moved classname-mangling-rekated code to ...
15019         * mangle.c:  ... this new file.
15020         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
15021         * Makefile.in:  Update for above changes.
15022
15023 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15024
15025         * expr.c (truthvalue_conversion): Convert integer and floating
15026         point value to their truth value.
15027         * lex.c (java_lex): Handle the `null' literal.
15028         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15029         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15030         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15031         New macros.
15032
15033         * parse.y: Reorganization/documentation on token declaration.
15034         (binop_lookup[]): New added new tree codes.
15035         (relational_expression): Build corresponding binary operators.
15036         (equality_expression, conditional_and_expression,
15037         conditional_or_expression): Likewise.
15038         (java_complete_class): Fix crash in debug message.
15039         (java_complete_tree): Check initialization of method call
15040         arguments. Further bogus node evaluation to detect more error
15041         during assignments. Handles more binary operators.
15042         (patch_assignment): Use DECL_P.
15043         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15044         code.
15045         (operator_string): Handle more case. Compacted source.
15046         (patch_binop): Changed function comment. Checking for
15047         uninitialized first operand takes the compound assignment into
15048         account and uses DECL_P. Checking for uninitialized second operand
15049         delayed to routine's end. Use macros to issue type bound error
15050         messages and issue messages on both operands if their types are
15051         different. Force fixed type into node. Handle all binary
15052         operators.
15053
15054 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15055
15056         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15057         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15058         build operator node and return tokens.
15059         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15060         * parse.h (java_complete_tree): Changed returned type in prototype.
15061         (build_method_invocation, build_assignment, patch_assignment,
15062         patch_binop): New static function declarations.
15063         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15064         BUILD_EXPR_WFL): New macros.
15065         * parse.y (enum tree_code binop_lookup[]): New static for token to
15066         TREE_CODE lookup.
15067         (%union): Parser union has new sub-structure `operator'.
15068         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15069         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15070         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15071         ASSIGN_ANY_TK): Tokens tagged `operator'.
15072         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15073         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15074         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15075         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15076         (assignment_operator:): Rule tagged `operator'.
15077         (expression_statement:): Re-installed default rule.
15078         (method_invocation:): Sub rules call build_method_invocation.
15079         (postfix_expression:): Don't attempt to resolve name here. Just
15080         return an ID.
15081         (multiplicative_expression:): Sub-rules build corresponding binop
15082         expression node.
15083         (additive_expression:, shift_expression:, and_expression:,
15084         exclusive_or_expression:, inclusive_or_expression:): Likewise.
15085         (assignment:): Sub rule invoke build_assignment.
15086         (assignment_operator:): Default rules on sub rules.
15087         (force_error): Added documentation on this variable.
15088         (declare_local_variables): Build initialization calling
15089         build_assignment.
15090         (expand_start_java_method): Removed unused rtx declaration. Mark
15091         arguments as already initialized.
15092         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15093         (java_complete_expand_methods): Don't process next method if
15094         completion of the previous one triggered errors.
15095         (java_complete_expand_method): Call source_end_java_method if no
15096         error were found during completion.
15097         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15098         locals declaratilon. Handle names found within a class. Return
15099         error_mark_node when things aren't found.
15100         (patch_method_invocation_stmt): Return error_mark_node on failures.
15101         (patch_invoke): Removed unused local. Return the correct node.
15102         (java_complete_tree): Now returns a value. The BLOCK section binds
15103         local identifiers and the type of a BLOCK is now void. Assign the
15104         result of operand completion on COMPOUND_EXPR. Assign the
15105         encapsulated node of a WFL to the result of its completion, except
15106         when the node is an identifier. Now handle MODIFY_EXPR and several
15107         binary operators. Return error_mark_node on errors.
15108         (build_method_invocation, build_assignment, patch_assignment,
15109         build_binop, operator_string, patch_binop): New functions.
15110         * typeck.c (binary_numeric_promotion): New function.
15111
15112 1998-05-21  Per Bothner  <bothner@cygnus.com>
15113
15114         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
15115         Replace most uses of ident_subst by identifier_subst.
15116
15117         * class.c (push_class_static_dummy_field):  Removed function.
15118         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
15119         instead of looking got "class" static field.  Create that decl here.
15120         (class_identifier_node):  Removed;  no longer needed.
15121         (init_class_processing):  Don't init class_identifier_node.
15122         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
15123         Do nreverse 0 times (instead of twice) for Object and Class.
15124         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15125
15126 1998-05-20  Per Bothner  <bothner@cygnus.com>
15127
15128         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
15129         while initializing linenumber_count and linenumber_table.
15130         Do it before init_function_start (which calls emit_line_note).
15131         * expr.c (expand_byte_code):  Don't need to clear lineno here.
15132
15133 1998-05-18  Tom Tromey  <tromey@cygnus.com>
15134
15135         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15136         then mangle number as _N_.
15137
15138         * class.c (mangle_class_field): New function.
15139         (build_class_ref): Set assembler name of class reference using
15140         mangle_class_field.
15141         (push_class_static_dummy_field): Likewise.
15142
15143 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
15144
15145         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15146         of assigning to TREE_CODE.  The latter method exploits a feature
15147         of GCC that is not ANSI compliant.
15148
15149 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15150
15151         * decl.c (pushdecl_force_head): New function.
15152         (pushlevel): Removed conditional printf.
15153         (complete_start_java_method): Don't enter local variable scope if
15154         function is compiled from source code.
15155         * expr.c: parse.h now included
15156         (java_lang_expand_expr): New function.
15157         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15158         printf. Terminate buffer when doing directories.
15159         * jcf-parse.c (parse_source_file): Call lang_init_source before
15160         parsing and before code generation.
15161         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15162         use printf if the macro is defined.
15163         * lang.c (lang_init): Install lang_expand_expr hook on
15164         java_lang_expand_expr.
15165         (java_dummy_print): New function.
15166         (lang_init_source): New function.
15167         * lex.c (java_lex): Remember location of an opening brace at the
15168         second nesting level.
15169         (java_is_eol): Unget character seen after a CR if it is EOF.
15170         * parse.h: Now includes lex.h
15171         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15172         printf if the macro is defined.
15173         (expand_start_java_method, build_expr_block, enter_block,
15174         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15175         New static function declarations.
15176         (pushdecl_force_head): New extern function declaration.
15177         (INCOMPLETE_TYPE_P): New macro.
15178         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15179         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15180         BLOCK_EXPR_ORIGIN): New macros.
15181         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15182         DECL_SOURCE_LINE_LAST): New macros.
15183         (struct parser_ctxt): Removed field current_method_decl, redundant
15184         with the field current_function_decl. Added fields
15185         first_ccb_indent1 and pending_block.
15186         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15187         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15188         tagged <node>
15189         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15190         (compilation_unit:): Cosmetic on sub rule.
15191         (type_declaration:): Cosmetic on sub rules. Added an error rule.
15192         (variable_initializer:): Installed default rule on expression:.
15193         (method_declaration:): method_header: starts a new
15194         method. method_body: installs the function body, absorbs blocks
15195         emitted for temporary variable scopings, pops function's body block
15196         and merges function's last statement lineno in DECL_SOURCE_LINE.
15197         (method_body:): Installed default rules.
15198         (block:): Call enter_block when an opening brace is seen.  Absorb
15199         scoping blocks and call exit_block when a closing brace is seen.
15200         (block_statement:): Cosmetic changes.
15201         (method_invocation:): Create WFL around CALL_EXPR node.
15202         (patch_stage): Added comment around definition.
15203         (method_header): Try to use first_ccb_indent1 as the first line of
15204         the method, so BP debug info are emitted at the first opening
15205         brace of the function. If the function has no body, use the
15206         location of the function's name. Override currently defined method
15207         name with the matching WFL so we can point redefinition errors
15208         using the location where the function's name was declared.
15209         (check_abstract_method_header): Interprets DECL_NAME as an
15210         identifier or as a WFL, accordingly.
15211         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15212         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15213         location and name information out of it and reinstall DECL_NAME to
15214         its original identifier node value.
15215         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15216         function's source code).
15217         (read_import_dir): Test the value returned by find_class and issue
15218         a fatal accordingly.
15219         (declare_local_variables): Push a new block for the scope of the
15220         new variable(s) if code has been already generated at that nesting
15221         level. Pinpoint redefinition errors using the variable id
15222         WFLs. Generate initialization code if necessary. If the variable
15223         type is incomplete, register a patch on its decl.
15224         (source_start_java_method): Rewritten. Define a new block for the
15225         function's parameters. Build parameter decl out of function's
15226         arguments and register them for a patch if their types are
15227         incomplete.
15228         (expand_start_java_method): Includes the part of
15229         source_start_java_method that was pushing the parameter decls and
15230         completing the method start code.
15231         (source_end_java_method): Removed call the expand_end_bindings and
15232         poplevel (already taken care of). Reinstall function's arguments
15233         and get function's last line of code before calling
15234         expand_function_end.
15235         (java_method_add_stmt): New comment before the function's
15236         code. Complement the second operand of the current COMPOUND_EXPR
15237         if necessary.
15238         (java_complete_expand_methods): Don't generate debug info on line
15239         zero when expanding a generated constructor.
15240         (java_complete_expand_method): Set start and end line numbers for
15241         a artificially generated constructor to one and manually call
15242         enter_block and exit_block when defining it. For all methods:
15243         expand function's start calling the new expand_start_java_method
15244         and invoke java_complete_tree on the effective method's body, if
15245         any.
15246         (resolve_expression_name): Now use lookup_name_in_blocks to search
15247         local variable decls and print out an error when variables are
15248         undefined.
15249         (patch_method_invocation_stmt): Inserted comment before the
15250         function's code.
15251         (lookup_method_invoke): Chain method's arguments using chainon
15252         with the current arg list as a second argument. Inserted missing
15253         IDENTIFIER_POINTER when reporting an error on methods not found.
15254         (refine_accessible_methods_list): Don't retain constructors.
15255         (patch_arguments): Function removed.
15256         (java_complete_tree): Inserted comment before the function's
15257         code. New case for BLOCKs. Moved the WFL case a bit
15258         further. Complete function's arguments.
15259         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15260         maybe_absorb_scoping_blocks): New functions.
15261
15262 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15263
15264         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15265         previously set.
15266         * jcf-parse.c (parse_source_file, java_error_count): New forward
15267         and extern declarations.
15268         (java_parse_abort_on_error): Macro moved.
15269         (jcf_parse_source): fatal called if fopen fails. Now calls
15270         parse_source_file.
15271         (parse_source_file): New parse_only parameter. Reflects the
15272         elimination of the second pass.
15273         (yyparse): parse_source_file called with argument set to 0.
15274         * jcf.h (JCF_ZERO): Sets java_source to zero.
15275         * lex.c (java_init_lex): pass argument is gone. Function modified
15276         to be called once during the analysis of a file.
15277         (java_unget_unicode): Fixed typo in fatal message.
15278         (java_get_line_col): Likewise.
15279         (java_lval): Likewise. String literals no longer built during
15280         second pass.
15281         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15282         account.
15283         * parse.h (MODIFIER_WFL): New macro.
15284         (parse_check_super, parser_check_super_interface): Now return int.
15285         (parser_chain_incomplete_item, not_builtin_p,
15286         complete_method_decl): Declarations removed.
15287         (build_method_invocation_stmt, build_invoke): Renamed using the
15288         `patch' instead of `build'
15289         (register-incomplete_type, obtain_incomplete_type,
15290         java_complete_tree, java_complete_expand_method,
15291         unresolved_type_p, create_jdep_list): New function declarations.
15292         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15293         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15294         (jdep): New typedef on new struct _jdep.
15295         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15296         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15297         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15298         JDEP_RESOLVED_P): New macros.
15299         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15300         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15301         JDEP_VARIABLE): New enum values and jdep kinds.
15302         (jdeplist): New typedef on struct _jdeplist.
15303         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15304         macros.
15305         (CALL_EXPR_PRIMARY): New macro.
15306         (struct parser_ctxt): Fields java_pass, current_method_decl,
15307         method_decl_list deleted. New field jdeplist.
15308         (INCOMPLETE_P): Macro deleted.
15309         * parse.y (single_type_import_declaration:): Removed pass switch.
15310         (type_import_on_demand_declaration): Likewise.
15311         (field_declaration:): Removed pass switch on all sub rules.
15312         (class_declaration:): Call the complete_class_decl removed on
15313         class_body rules.
15314         (method_declaration:): Removed second pass switch. No longer chain
15315         methods decl when method_header reduced.
15316         (method_header:): Sub rules no longer depend on pass switch.
15317         (method_declarator:): Likewise.
15318         (method_body:): Likewise.
15319         (abstract_method_declaration:): Likewise.
15320         (block_statement:): Likewise.
15321         (local_variable_declaration:): Likewise.
15322         (argument_list:): Likewise.
15323         (method_invocation:): Likewise. Call to build_method_invocation_stmt
15324         removed. Partial CLASS_EXPR tree node built instead.
15325         (postfix_expression:): Removed pass switch on all sub rules.
15326         (java_pop_parser_context): Free classd_list content.
15327         (yyerror): Call obstrack_grow0 to finalize error message.
15328         (check_class_interface_creation): Comment modified to reflect new
15329         returned value meaning. Removed second pass switch. Return 1 if an
15330         error was found, 0 otherwise. Adjust pointer on filename if a
15331         leading path separator was found.
15332         (maybe_create_class_interface_decl): Removed first pass switch
15333         when linking the class decl to the class_list. Install a new
15334         jdep_list for the class.
15335         (add_superinterfaces): List of unresolved interfaces is
15336         gone. Unresolved interfaces are directly added to the current
15337         dependencies list.
15338         (create_interface): Second pass shortcut removed.
15339         ctpx->modifier_ctx access through MODIFIER_WFL.
15340         (create_class): Second pass shortcut removed. Call to
15341         register_incomplete_type replaces the call to
15342         parser_chain_incomplete_item.
15343         (complete_class_decl): Function removed.
15344         (duplicate_declaration_error): New way of retrieving redeclared
15345         item type.
15346         (register_fields): Call to lookup_modifier_cl replaced by
15347         MODIFIER_WFL. New way of handling unresolved type, using
15348         unresolved_type_p and obtain_incomplete_type.
15349         register_incomplete_type replaces call to parser_chain_incomplete_item.
15350         (patch_stage): New static global variable.
15351         (method_header): New way of handling unresolved type, using
15352         unresolved_type_p and obtain_incomplete_type. patch_stage used to
15353         indicates that the method decl needs to be patched.
15354         (check_abstract_method_header): Call to lookup_modifier_cl
15355         replaced by MODIFIER_WFL.
15356         (method_declarator): Incomplete argument type are registered
15357         calling register_incomplete_type. Patch on the declared method is
15358         issued in that case.
15359         (unresolved_type_p): New function.
15360         (parser_check_super_interface): New comment to reflect function's
15361         modified returned type (int). Function and has a new argument
15362         this_wfl. Call to parse_error_context uses this_wfl instead of
15363         relying on lookup_cl.
15364         (parser_check_super): Comment reflects function's new returned
15365         type (int). Function returns nonzero value on error.
15366         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15367         register_incomplete_type, jdep_resolve_class): New functions to
15368         handle incomplete types in declarations.
15369         (java_complete_class): Rewritten to work with the new incomplete
15370         type handling scheme.
15371         (complete_class_report_errors): Likewise.
15372         (complete_method_decl): Removed: it jobs is now handled by
15373         java_complete_class.
15374         (do_resolve_class): Class loaded in not already loaded and not
15375         found in Java source code.
15376         (java_check_regular_methods, java_check_abstract_methods): Don't
15377         call complete_method_decl anymore.
15378         (lookup_modifier_cl, not_builtin_p): Functions deleted.
15379         (read_import_dir): Got rid of the pass number dependency.
15380         (declare_local_variables): New handling of unresolved types (patch
15381         issued).
15382         (source_start_java_method): New parameter level. Function called
15383         with level set to 1 when argument types are potentially
15384         unresolved.  Called to complete the job with level set to 2 once
15385         types are complete.
15386         (source_end_java_method): Call to permanent_allocation
15387         removed. Waiting to be replaced by a more suitable obstack
15388         management.
15389         (java_complete_expand_methods, java_complete_expand_method,
15390         java_expand_finals): New functions.
15391         (build_method_invocation_stmt): Renamed
15392         patch_method_invocation_stmt. Extracts function call expression
15393         (wfl) and arguments (args) from CALL_EXPR tree operands.
15394         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15395         call. Patch the function and argument operand of the CALL_EXPR
15396         tree argument.
15397         (patch_argument, java_complete_tree): New functions.
15398
15399 1998-04-20  Per Bothner  <bothner@cygnus.com>
15400
15401         Recover from missing fields and methods (i.e. error instead of fatal).
15402         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
15403         * expr.c (expand_invoke):  Recover from missing method.
15404         (expand_java_field_op):  Recover from missing field.
15405         Inline references to java.lang.{Integer,Char,...}.TYPE.
15406         * typeck.c (get_type_from_signature), java-tree.h:  New function.
15407         * class.c (add_method):  Use get_type_from_signature.
15408         (build_class_ref):  Handle a class that was not found.
15409         * typeck.c (convert):  Handle conversion to pointers (for convenience).
15410         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
15411         instead of lookup_field to handle missing fields.
15412
15413         * jcf-parse.c (process_zip_dir):  Set java_source.
15414
15415 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
15416
15417         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15418
15419 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15420
15421         * jcf-parse.c (load_class): Don't change input_filename before
15422         calling jcf_parse_source (but still do it before calling
15423         jcf_parse).
15424         (jcf_parse_source): Assign input_filename after having saved the
15425         parser context.
15426         * lex.c (java_init_lex): Chain a WFL node to the import on demand
15427         list. ctxp->modifier_ctx zeroed according to its new
15428         definition. ctxp->filename initialized. Removed
15429         JAVA_MODIFIER_CTX_UNMARK.
15430         (java_unget_unicode): Update the character based column position.
15431         (java_allocate_new_line): ref_count not used anymore. Always free
15432         ctxp->p_line. Initialize c_line->char_col to 0.
15433         (java_get_unicode): Update the character based column position.
15434         (java_lex): Use ctxp->elc to store current position in source
15435         file, at the beginning of the parsed token. Set modifier_ctx entry
15436         corresponding to the parse modifier to a WFL node. Return a WFL
15437         node when an identifier is parsed.
15438         (java_lex_error): Now uses ctxp->elc to store current position in
15439         source.
15440         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15441         * lex.h (build_wfl_node): New function definitions.
15442         (struct java_line): ref_count and next fields are gone. New field
15443         char_col.
15444         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15445         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15446         (JAVA_COLUMN_DELTA): New macro.
15447         (java_lc): New typedef on new struct _java_lc.
15448         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15449         (parse_error_context, parse_warning_context): Changed prototypes.
15450         (java_get_line_col): Added as an available global function.
15451         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15452         (IC_DECL): Replaced by macro IC_TYPE
15453         (DEPEND_WFL): New macro.
15454         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15455         wrong modifier.
15456         (exit_java_complete_class): Removed a commented out statement.
15457         (struct parser_ctxt): Added comments on fields. modifier_ctx is
15458         now an array of tree nodes. Deleted fields line_list and
15459         e_line. New field elc, to replace e_line.
15460         * parse.y (array_type:): Build WFL node.
15461         (qualified_name:): Build a single WFL node out of two. Retain
15462         the location information of the first node in the resulting node.
15463         (package_declaration:): Use package name as a WFL node
15464         (single_type_import_declaration:): Use imported name as a WFL node.
15465         (type_import_on_demand_declaration:): Use root of the imported
15466         packages as a WFL node.
15467         (field_declaration:): Removed unused local variable cl.
15468         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15469         (yyerror): New static elc. Removed static error_line, error_pos.
15470         New local code_from_source. Save ctxp->elc into elc at the first
15471         pass. Call java_get_line_col to get a string of the line where
15472         the error occurred.
15473         (debug_line): Removed static function.
15474         (parse_error_context, parse_warning_context): Parameter cl is now
15475         a WFL node. Use its value to initialize ctxp->elc.
15476         (redefinition_error): Parameter cl is now a WFL node.
15477         (parse_add_interface): New parameter wfl. No longer call
15478         lookup_cl, use wfl instead.
15479         (check_class_interface_creation): Parameter cl is now a WFL node.
15480         (maybe_create_class_interface_decl): Likewise.
15481         (add_superinterfaces): New function.
15482         (create_interface): Removed local cl, node, super_decl,
15483         super_decl_type.  Function now uses id as a WFL node. Better
15484         warning/error report on obsolete or forbidden mix of
15485         modifiers. Now calls add_superinterfaces to register interfaces.
15486         (create_class): Removed local cl, node. Local variable id is used
15487         as a WFL node. Better error report on forbidden modifier
15488         mix. Uses add_superinterfaces to register interfaces.
15489         (find_field): Argument cl is now a WFL node. Now store the WFL
15490         node of a fields that needs to be checked for their
15491         initialization.
15492         (method_header): Local variable node non longer used. Local
15493         variable id replaces cl.
15494         (check_modifiers_consistency): Local variable cl is now a WFL
15495         node.
15496         (method_declarator): Local variable cl replaced by parameter id.
15497         (parser_qualified_name): Now uses parameter name as a WFL node.
15498         (parser_check_super_interface): New parameter wfl, for achieve
15499         greater accuracy during error reports.
15500         (parser_chain_incomplete_item): New parameter named location. Used,
15501         along the decl, to construct the incomplete item node.
15502         (java_complete_class): resolve_class now uses WFL node extracted
15503         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15504         where appropriate.
15505         (complete_method_decl): Unresolved function's argument types are WFL.
15506         (resolve_class): Parameter cl is now a WFL node.
15507         (resolve_and_layout): Likewise.
15508         (do_resolve_class): Likewise. Try first to use cl and then do the
15509         lookup on the decl when calling check_pkg_class_access.
15510         (complete_class_report_errors): Use IC_TYPE in place of
15511         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15512         instead of doing a lookup over the decl.
15513         (java_check_final): Use WFL info from field tree list.
15514         (lookup_cl): Rewritten and returns a statically defined WFL node.
15515         (lookup_modifier_cl): Now uses information from WFL nodes.
15516         (process_imports): Likewise.
15517         (read_import_dir): name and cl arguments replaced by a single WFL
15518         node. Function modified accordingly.
15519         (find_in_imports_on_demand): Now uses WFL node.
15520         (check_pkg_class_access): cl argument is now a WFL node.
15521         (declare_local_variables): Fixed to use WFL nodes.
15522         (resolve_expression_name): Likewise.
15523         (build_method_invocation_stmt): name_combo argument renamed
15524         wfl. Function modified to use WFL nodes.
15525         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15526         (lookup_method_invoke): cl is now a WFL node. Added missing
15527         IDENTIFIER_POINTER to class type decl name.
15528
15529 1998-04-14  Dave Brolley  <brolley@cygnus.com>
15530
15531         * lang.c (init_parse): Now returns char* containing the filename.
15532
15533 1998-04-10  Per Bothner  <bothner@cygnus.com>
15534
15535         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
15536
15537         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
15538         * class.c (make_class_data):  If flag_assume_compiled, initial class
15539         state is CSTATE_PREPARED; make superclass and interfaces direct
15540         references, rather than constant pool indexes.
15541
15542 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15543
15544         * parser.y: Include flags.h. Removed debug variable pl.
15545         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15546         (block:): Likewise.
15547         (labeled_statement_nsi:): Generate debug info when reducing
15548         expression_statement:.
15549         (check_pkg_class_access): get_access_flags_from_decl invocation
15550         fixed for new CLASS_* flags location.
15551         (source_end_java_method): Save/restore parser context when
15552         entering/leaving this routine. Restore lineno to its right value
15553         before calling expand_end_bindings.
15554         (build_method_invocation_stmt): build_invoke called with the
15555         current line information.
15556         (build_invoke): New argument cl. Wrap the function call around a
15557         wfl node.
15558         (refine_accessible_methods_list): Changed comment, removed
15559         unnecessary code.
15560         * parse.h: Fixed typo in comments.
15561         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15562         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15563         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15564         parser_ccb_indent.
15565         * lex.c (java_lex): Record the last closing curly bracket of a
15566         function.
15567         * jcf-parse.c (jcf_parse_source): Now calls
15568         java_check_methods. Clarified comment, fixed typo.
15569
15570 1998-04-09  Dave Brolley  <brolley@cygnus.com>
15571
15572         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15573         (finish_parse): Expose for non USE_CPPLIB builds.
15574
15575 1998-04-08  Jeffrey A Law  (law@cygnus.com)
15576
15577         * lang.c (lang_print_xnode): New function.
15578
15579 1998-04-03  Per Bothner  <bothner@cygnus.com>
15580
15581         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
15582         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
15583         used to build a class's dispatch table.
15584         (make_class_data):  Generate dispatch table if flag_assume_compiled.
15585         Set dtable of class object to address of class_dtable_decl.
15586
15587         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
15588         be volatile and have side effects - generates better code.
15589
15590         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
15591         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
15592
15593         * expr.c (expand_invoke):  If class is final, method is
15594         effectively final, so can call it directly.
15595
15596         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
15597
15598         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
15599
15600 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15601
15602         * parse.y (build_method_invocation_stmt): Removed extra argument
15603         to build_invoke.
15604
15605 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15606
15607         * expr.c (dtable_indent): Now static global.
15608         (expand_invoke): Now call invoke_build_dtable and
15609         build_invokevirtual.
15610         (invoke_build_dtable, build_invokevirtual): New functions.
15611         * jcf-io.c (find_class): Defer issuing a warning by setting
15612         jcf->outofsynch to 1.
15613         * jcf-parse.c (jcf_out_of_synch): New function.
15614         (load_class): Test this_jcf.outofsynch flag and call
15615         jcf_out_of_synch accordingly.
15616         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
15617         comment indentation.
15618         * lex.c (java_get_unicode): Fixed code indentation.
15619         (java_lex): Create string literal. Fixed typo. Removed several
15620         premature obstack_free.
15621         * parse.h: New enums for name resolution and invocation mode.
15622         (struct qualification): New data structure.
15623         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
15624         (do_resolve_class, build_method_invocation_stmt,
15625         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
15626         debug_line, identical_subpath_p, invocation_mode,
15627         refine_accessible_methods_list, build_invoke,
15628         lookup_method_invoke): New functions declared.
15629         (build_invokevirtual, invoke_build_dtable, match_java_method,
15630         build_field_ref, jcf_out_of_synch): New references to external
15631         functions.
15632         (struct parse_ctxt): Removed artificial_constructor field.
15633         * parse.y: (array_type:): Type defined for this rule.
15634         (class_type:): Installed default rule for interface_type:.
15635         (array_type:): Now build Java array type.
15636         (qualified_name:): Now use obstack_grow0.
15637         (method_declaration:): Skip the artificial constructor added to
15638         the list, if any.
15639         (abstract_method_declaration:): Execute the code only during pass 1.
15640         (block:): Installed default rule in block_statements:.
15641         (block_statement:): Add the statement to the method during pass 2.
15642         (statement_expression): Installed default rule for
15643         method_invocation:.
15644         (argument_list:): Added code to build the argument list.
15645         (method_invocation:): Added call to create the method invocation
15646         node.
15647         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
15648         (debug_line): New function for debug.
15649         (complete_class_decl): No longer do something during pass 1.
15650         (method_header): Use BUILD_PTR_FROM_NAME.
15651         (parser_qualified_classname): Use obstack_grow0. Removed bogus
15652         obstack_free.
15653         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
15654         function's main comment.
15655         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
15656         classes.
15657         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
15658         (resolve_class): Now works with arrays.
15659         (do_resolve_class, resolve_and_layout): New functions.
15660         (java_check_regular_methods): Reverse method list before and after
15661         having processed it. No longer set ctxp->artificial_constructor.
15662         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
15663         accordingly. Fixed typo in issued error message. Now use
15664         obstack_grow0.
15665         (find_in_imports_on_demand): Now use obstack_grow0.
15666         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
15667         (source_end_java_method): Call expand_expr_stmt instead of
15668         expand_expr. Calls it before calling expand_function_end.
15669         (java_method_add_stmt): Do nothing if errors were found during
15670         parsing.
15671         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
15672         (build_method_invocation_stmt, build_invoke, invocation_mode,
15673         lookup_method_invoke, refine_accessible_methods_list,
15674         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
15675         New functions.
15676         * typeck.c (build_java_signature): Properly end method signature
15677         if return type skipped.
15678         (match_java_method): New function.
15679
15680 1998-03-16  Per Bothner  <bothner@cygnus.com>
15681
15682         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
15683
15684 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15685
15686         * expr.c (build_invoke_non_interface): New function.
15687         (methods_ident, ncode_ident): Now static globals.
15688         (expand_invoke): Use build_invoke_non_interface.
15689         * java-tree.h (struct lang_decl): New field function_decl_body.
15690         (DECL_FUNCTION_BODY): New macro.
15691         * jcf-parse.c (jcf_parse_source): Deeper check before setting
15692         CLASS_FROM_SOURCE_P.
15693         (parse_source_file): Fixed typos. Call java_layout_parsed_class
15694         before starting pass 2. Call to java_generate_parsed_class replaced
15695         by java_register_parsed_class.
15696         * lex.c: Fixed typo in header. Some line width related formating.
15697         * lex.h: Some line width related formating.
15698         * parse.h (source_end_java_method, resolve_expression_name,
15699         complete_class_decl, maybe_create_class_interface_decl,
15700         check_class_interface_creation): New static function declarations.
15701         (java_layout_parsed_class, java_method_add_stmt): New function
15702         declarations.
15703         (struct parser_ctxt): Field mark_class_generate removed. New
15704         fields class_list and artificial_constructor.
15705         * parse.y: Fixed typo in header.
15706         (class_declaration:): Call complete_class_decl when class body
15707         parsed.
15708         (method_declaration:): Call source_end_java_method in pass 2 when
15709         the method body is defined.
15710         (postfix_expression:): Do expression name resolution on sub-rule
15711         name during pass 2.
15712         (create_class, create_interface): Merged common pieces.
15713         (check_class_interface_creation, maybe_create_class_interface_decl):
15714         New functions.
15715         (complete_class_decl): New function.
15716         (register_fields): Fixed line width related typo.
15717         (method_header): Correctly skip first argument when fixing
15718         argument line. Changed the loop.
15719         (java_check_circular_reference): Now use ctxp->class_list.
15720         (java_complete_class): Removed start/stop marking.
15721         (java_check_regular_methods): Now takes a class decl as an
15722         argument.  Add default constructor if none were encountered.
15723         (java_check_methods): Now use ctxp->class_list. Changed call to
15724         java_check_regular_methods.
15725         (source_start_java_method): Set DECL_ARG_TYPE for each function
15726         arguments.
15727         (source_end_java_method, java_method_add_stmt): New functions.
15728         (java_generate_parsed_class): No longer exists.
15729         (java_layout_parsed_class, java_register_parsed_class): New functions.
15730         (resolve_expression_name): New function.
15731
15732 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15733
15734         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
15735         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
15736         until pass initializations are done. Call read_import_dir with
15737         pass set to 0.
15738         * parse.h: (lookup_modifier_cl): New function declared.
15739         (INTERFACE_FIELD_MODIFIERS): New macro.
15740         (OBSOLETE_MODIFIER_WARNING): New macro.
15741         * parse.y: (register_fields): Class type and current field name in
15742         local variables. Check modifier(s) if adding field(s) to an interface.
15743         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
15744         and report errors using the faulty modifier line context.
15745         (lookup_modifier_cl): New function.
15746         (read_import_dir): Detect and report default import processing
15747         failure.
15748
15749 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
15750
15751         Add a pair of -fassume-compiled/-fno-assume-compiled options.
15752         * class.c (is_compiled_class): Return 1 after making sure it
15753         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
15754         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
15755         * java-tree.h (flag_assume_compiled): Add decl.
15756         * lang.c (lang_f_options): Add the flag.
15757         (flag_assume_compiled): Add decl, default to 0.
15758
15759 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15760
15761         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
15762         (is_compiled_class): Likewise.
15763         (layout_class): Likewise.
15764         (layout_class): Detect and lay out classes defined in source code.
15765         (interface_of_p, add_interface_do, may_add_interface): New
15766         function.
15767         (add_interface): Now use add_interface_do.
15768         (add_method_1): New function.
15769         (add_method): Now use add_method_1.
15770         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
15771         (complete_start_java_method): New function.
15772         (start_java_mehod): Now call complete_start_java_method.
15773         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
15774         (expand_invoke): Likewise and fixed typo.
15775         *gjava.c: (print_super_field): Use new argument to find_class
15776         DO_CLASS_FILE.
15777         (main): Likewise.
15778         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
15779         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
15780         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
15781         IDENTIFIER_NODE.
15782         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
15783         (add_method_1, push_class): New prototypes.
15784         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
15785         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
15786         directory where the class was found.
15787         (find_class): New argument DO_CLASS_FILE. Function find_class
15788         modified accordingly.
15789         *jcf-parse.c: (fix_class_path): New function.
15790         (load_class): Use new VERBOSE argument. load_class now finds and
15791         loads/parses .class/.java files. Save read_state of current_jcf
15792         if necessary.
15793         (java_parser_abort_on_error): New macro.
15794         (jcf_parse_source, parse_source_file): New function.
15795         (jcf_parse): Fixed typo.
15796         (yyparse): Call parse_source_file () only.
15797         (process_zip_dir): Fixed typo, fix zdir->filename_length when
15798         writing the real class name back in the zip directory entry.
15799         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
15800         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
15801         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
15802         (find_class): Prototype fixed.
15803         *lex.c: Added 1998 time stamp.
15804         Removed all static global variables, moved into the parser
15805         context data structure.. Now include unistd.h if SEEK_SET not
15806         defined.
15807         (java_init_lex): Rewritten.
15808         (java_sneak_unicode): Modified current unicode access in current line.
15809         (java_unget_unicode): Likewise.
15810         (java_allocate_new_line): New allocation management.
15811         (java_read_char): Modified access and storage of unget_utf8_value.
15812         New way of processing current unicode.
15813         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
15814         (java_get_unicode): Now use the parser context.
15815         (java_lineterminator): Likewise.
15816         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
15817         of the reentrant parser implementation. Function now use the
15818         parser context data structure and java_lval. Fixed production of
15819         the float and double constant "out of range" error message. Fixed
15820         obstack use. Return integer value when hitting a modifier. Now
15821         return type for TRUE, FALSE and other predefined types. Return
15822         identifier as a TREE_LIST list containing the current line context
15823         as the TREE_VALUE sub-node.
15824         (java_unicode_2_utf8): Fixed typo in declaration.
15825         (java_lex_error): Now use the parser context data structure.
15826         *lex.h: Added 1998 time stamp.
15827         (struct java_line): New fields ref_count and next.
15828         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15829         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
15830         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
15831         *parse.h: Added 1998 time stamp.
15832         (java_parse_source_file): Renamed from parse_source_file.
15833         (YYERROR_NOW, YYNOT_TWICE): Fixed.
15834         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
15835         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
15836         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
15837         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
15838         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
15839         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
15840         (struct parser_ctxt): New data structure to keep the parser context.
15841         *parse.y: Added 1998 time stamp, got rid of static global variables.
15842         (java_error_count, ctxp): New global variables.
15843         (%union): New value field.
15844         (numeric_type, integral_type): Rules removed.
15845         (primitive_type): Rule defined to handle integral, float, double and
15846         boolean types.
15847         (qualified_name, package_declaration,
15848         single_type_import_declaration, type_import_on_demand_declaration,
15849         modifiers, class_declaration, super, interfaces,
15850         interface_type_list, class_body, field_declaration,
15851         field_declaration, variable_declarators, variable_declarator,
15852         variable_declarator_id, method_declaration, method_header,
15853         formal_parameter_list, formal_parameter, method_body, block,
15854         static, interface_declaration, extends_interfaces,
15855         abstract_method_declaration, local_variable_declarators): Rules now
15856         define actions.
15857         (force_error, do_warning): New global statics.
15858         (push_parser_context, parser_context_save_global,
15859         parser_context_restore_global, pop_parser_context): New functions.
15860         (yyerror): Now uses the global parser context. Fixed use of obstack.
15861         (parse_error, parse_error_context, parse_warning_context,
15862         java_accstring_lookup, redefinition_error, check_modifiers,
15863         parser_add_interface, create_interface, create_class, find_field,
15864         duplicate_declaration_error, register_fields, method_header,
15865         check_modifiers_consistency, check_abstract_method_header,
15866         method_declarator, parser_qualified_classname,
15867         parser_check_super_interface, parser_check_super,
15868         parser_chain_incomplete_item, java_check_circular_reference,
15869         layout_class_from_source, java_complete_class,
15870         complete_method_decl, resolve_class, complete_class_report_errors,
15871         java_check_final, check_method_redefinition,
15872         java_check_regular_methods, java_check_abstract_methods,
15873         java_check_methods, lookup_java_interface_method2,
15874         lookup_java_method2, lookup_cl, find_name_in_single_imports,
15875         process_imports, find_in_imports, read_import_entry,
15876         read_import_dir, find_in_imports_on_demand,
15877         check_pkg_class_access, not_builtin_p, declare_local_variables,
15878         source_start_java_method, java_generate_parsed_class): New
15879         functions.
15880         *typeck.c: (signature_include_return): New global variable.
15881         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
15882         to add the function returned type in the signature.
15883
15884 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
15885
15886         * jcf-io.c (open_in_zip): Use strncmp and LEN.
15887
15888 1998-01-29  Dave Brolley  <brolley@cygnus.com>
15889
15890         * Make-lang.in (java.info): Added.
15891         (java.install-info): Added
15892
15893 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
15894
15895         * Makefile.in (clean): Also remove java/parse.c.
15896
15897 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
15898
15899         Add a pair of -fbounds-check/-fno-bounds-check options.
15900         * lang.c (lang_decode_option): Add code to grok arguments.
15901         (flag_bounds_check): Add decl.
15902         (lang_f_options): New array w/ the option in it.
15903         * java-tree.h (flag_bounds_check): Add decl.
15904         * lang-options.h: New file.
15905         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
15906         of a static macro value.
15907         (JAVA_ARRAY_EXCEPTION): Delete macro.
15908
15909 1998-01-23  Per Bothner  <bothner@cygnus.com>
15910
15911         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
15912         * expr.c (build_anewarray):  Add missing promote_type.
15913
15914 1998-01-22  Per Bothner  <bothner@cygnus.com>
15915
15916         Add array types with known length to optimize bounds checking.
15917         * typeck.c (build_java_array_type):  Take length parameter.
15918         (java_array_type_length, build_prim_array_type):  New functions.
15919         * java-tree.h:  Update for new functions.
15920         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
15921         * class.c:  Use build_prim_array_type.
15922         * expr.c (can_widen_reference_to):  Handle known-length array types.
15923         (verify_jvm_instructions):  Keep track of integer push instructions
15924         followed by newarray/anewarray, so we can build known-length arrays.
15925         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
15926         (java_array_data_offset):  New function.
15927         (build_java_array_length_access):  New function.  Optimize if constant.
15928         (build_java_arrayaccess):  Constant fold bounds check.
15929         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
15930         (build_newarray, build_anewarray):  New functions.
15931         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
15932         * verify.c (merge_types):  Handle known-lengh array types.
15933
15934 1998-01-19  Per Bothner  <bothner@cygnus.com>
15935
15936         * expr.c (expand_byte_code):  Fix performace bug, which caused
15937         searching linenumber_table to be linear rather than constant.
15938
15939 1997-12-12  Per Bothner  <bothner@cygnus.com>
15940
15941         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
15942
15943         * decl.c, java-tree.h (soft_fmod_node):  New global.
15944         * decl.c (init_decl_processing):  Define __builtin_fmod.
15945         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
15946         using __builtin_fmod.
15947
15948 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15949
15950         * keyword.h: New file, output of keyword.gperf as processed by
15951         gperf.
15952         * lex.c (java_lex_init): Initialize java_error_flag.
15953         * parse.c (YYERROR_NOW): Uses java_error_flag.
15954         * parse.y: New static java_error_flag. Useless definition of
15955         buffer_error gone.
15956         * parse.y (java_error): Portable error recovery using
15957         java_error_flag (not yet completely tuned).
15958
15959 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
15960
15961         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
15962
15963 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15964
15965         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
15966         (parse.c, lex.c, keyword.h): New rules for Java source code
15967         front-end.
15968         * parse.c: Renamed into jcf-parse.c.
15969         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
15970         * keyword.gperf: New file, Java keywords.
15971         * parse.y: New file, Java language grammar.
15972         * parse.h: New file, Java language grammar definitions.
15973         * lex.c: New file, Java language lexer.
15974         * lex.h: New file, Java language lexer definitions.
15975
15976 1997-12-03  Per Bothner  <bothner@cygnus.com>
15977
15978         * decl.c (clinit_identifier_node), java-tree.h:  New global.
15979         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
15980         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
15981         * expr.c (expand_java_field_op):  Check for invalid assignment
15982         to final field.
15983
15984         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
15985
15986 1997-10-27  Per Bothner  <bothner@cygnus.com>
15987
15988         * verify.c (verify_jvm_instructions):  When processing a handler,
15989         attempt to set the current_subr to the right value.
15990         (More complicated code combines Sep 17 and Oct 22 versions.)
15991
15992 1997-10-24  Per Bothner  <bothner@cygnus.com>
15993
15994         * class.c (push_class):  Figure out (guess) name of source file.
15995         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
15996         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
15997         (parse_class_file):  Change return type from int to void.
15998         Call debug_start_source_file/debug_end_source_file.
15999
16000         * expr.c (build_java_binop):  Fix masking 2nd operand.
16001         * decl.c (init_decl_processing):  Set sizetype first.
16002
16003 1997-10-22  Per Bothner  <bothner@cygnus.com>
16004
16005         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
16006         (Revert Sep 17 change.)
16007
16008 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16009
16010         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16011         .class extension in their name and fix thing so we don't process
16012         them parse_zip_file_entries().
16013         (parse_zip_file_entries): Cleaned unused local variables.
16014
16015 1997-10-20  Per Bothner  <bothner@cygnus.com>
16016
16017         * expr.c (can_widen_reference_to):  Allows equal array element types.
16018         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
16019         * jcf-dump.c (RET):  Get (and print) index.
16020
16021         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16022         Promote element type to POINTER_TYPE.
16023
16024 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16025
16026         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16027         find_in_current_zip, jcf_figure_file_type): Moved from
16028         jcf-reader.c to parse.c.
16029         * zextract.c: (read_zip_archive): takes file_comment_length possible
16030         field into account.
16031
16032 1997-10-20  Per Bothner  <bothner@cygnus.com>
16033
16034         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
16035
16036         * verify.c (merge_types):  Handle array types even better ...
16037
16038 1997-10-17  Per Bothner  <bothner@cygnus.com>
16039
16040         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
16041
16042         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
16043         * class.c (make_class_data):  Don't build fields_decl if no fields.
16044         When building fields_decl, skip if DECL_ARTIFICIAL.
16045
16046         * expr.c (java_stack_swap):  Update stack_type_map.
16047         * verify.c (merge_types):  Handle array types better.
16048
16049 1997-10-15  Per Bothner  <bothner@cygnus.com>
16050
16051         * class.c (add_field):  Don't promote short integral fields to
16052         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16053         * expr.c (push_value):  Promote and convert short integral values.
16054
16055         * decl.c, java-tree.h (integer_two_node):  New constant node.
16056         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
16057
16058 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16059
16060         * class.c (append_gpp_mangled_type): Use function argument
16061         unpromoted type to generate mangled name.
16062
16063 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16064
16065         * constants.c (build_constant_data_ref): Now uses current_class
16066         instead of main_class.
16067         (build_constants_constructor): Now uses current_class instead of
16068         main_class.
16069         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16070         of the global variable SeepZipFiles done here.
16071         * zextract.c (read_zip_archive): extra_field optional field taken
16072         into account while computing the position of the class file in the
16073         archive.
16074         * verify.c (verify_jvm_instructions): Use current_jcf to search
16075         the constant pool.
16076         * parse.c (load_class): First search for the class to load in the
16077         current zip file. Saves current_jcf (restored before returning
16078         from that function). Don't call JCF_FINISH in the class was found
16079         in the current ZIP file.
16080         (jcf_parse): If the class was found in the current ZIP file, save
16081         its tree_constant_pool (for later reuse).
16082         (parse_class_file): New function. Process each method defined in
16083         the current class and record the class as to be later registered.
16084         (yyparse): Rewritten. Figure the type of the current file and switch
16085         accordingly.
16086         * lang.c: New global variable current_jcf.
16087         (lang_init): Removed compiling_from_source test (done later, in
16088         yyparse). Removed call the jcf_parse ().
16089         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16090         (typedef struct JCF): New fields seen_in_zip (to mark a class found
16091         in the current ZIP file) and zip_offset (offset to the class data in
16092         the current zip file).
16093         * jcf-reader.c: zipfile.h included.
16094         localToFile: New ZipFileCache static global variable
16095         (parse_zip_file_entries): New function. Browse the current ZIP
16096         file directory and process each class found.
16097         (process_zip_dir): New function. Register each class found in the
16098         ZIP file directory. The class aren't parsed but a valid JCF is
16099         link to each of them.
16100         (find_in_current_zip): New function. Search for a class in the
16101         current ZIP file directory. If found, prepare the class so that it
16102         can be loaded.
16103         (jcf_figure_file_type): New function. Examine the file structure
16104         to figure a class file, a ZIP file. If none of these categories are
16105         matched, a source file is assumed.
16106         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16107         SeenZipFile: New global variable.
16108         (open_in_zip): Use zipmember's length to accelerate the search for
16109         a member. If zipmember was NULL and zip file successfully read,
16110         return 0.
16111         * java-tree.h: New global variable current_jcf declared.  Added
16112         declaration for current_constant_pool_tags, current_constant_pool_data,
16113         current_constant_pool_length, current_constant_pool_data_ref.
16114         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16115         store the JCF of classes seen in a zip file) and tree *constant_pool
16116         (to save a loaded class constant pool). current_class declared here.
16117         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16118         retrieve method_ref_constant.
16119         (PUSHC): java_push_constant_from_pool now uses current_jcf.
16120         (OBJECT): get_class_constant now uses current_jcf.
16121         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16122         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16123         (expand_invoke): Now uses current_class instead of main_class
16124         (build_class_init): Now uses current_class instead of main_class
16125         * class.c: New static global variable registered_class.
16126         (register_class): New function.
16127         (emit_register_class): Modified to use registered_class instead of
16128         main_class
16129         (is_compiled_class): Now take into account class seen in the archive.
16130
16131 1997-10-06  Per Bothner  <bothner@cygnus.com>
16132
16133         * except.h:  Renamed to: java-except.h.
16134         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
16135         * except.c:  Add semi-working (commented out) implementation.
16136
16137         * expr.c (expand_iinc):  Add needed flush_quick_stack.
16138         * parse.c (set_source_filename):  New function.
16139         (give_name_to_class):  Set input_filename from package.classname.java.
16140
16141         * jcf-io.c (find_class):  Don't look first in ".".
16142
16143 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16144
16145         * zextract.c (read_zip_archive): Now takes into account the
16146         extra_field field.
16147         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16148
16149 1997-09-20  Per Bothner  <bothner@cygnus.com>
16150
16151         * constants.c, java-tree.h (build_internal_class_name):  New function.
16152         (alloc_class_constant):  Re-implement using build_internal_class_name.
16153         * class.c (make_class_data):  Likewise.
16154         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
16155
16156 1997-09-17  Per Bothner  <bothner@cygnus.com>
16157
16158         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
16159         to NULL before pushing an exception handler target.
16160
16161         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
16162         (java_stack_swap, java_stack_dup):  Re-write to be safe from
16163         clobbering registers.
16164         (build_class_init):  New function.
16165
16166 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16167
16168         * typeck.c (build_java_array_type): Temporary use
16169         permanent_obstack to create the array 'length' field.
16170         * expr.c (lookup_label): Temporay use permanent_obstack to create
16171         label if not found.
16172         * class.c (push_super_field): Tempory use permanent_obstack.
16173
16174 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16175
16176         * typeck.c (type_for_mode): Now handles double_type_node and
16177         float_type_node.
16178         * verify.c (verify_jvm_instructions): The instruction following
16179         the wide bytecode is checked. OPCODE_ret added to the list of
16180         wide.
16181
16182 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16183
16184         * class.c (make_class): Temporary use permanent_obstack. Set the
16185         class CLASS_P field to 1.
16186         (push_class): Temporary use permanent_obstack.
16187         (set_super_info): Temporary use permanent_obstack.
16188         (add_method): Temporary use permanent_obstack, set
16189         METHOD_TRANSIENT().
16190         (add_field): Temporary use permanent_obstack. Sets
16191         FIELD_VOLATILE() and FIELD_TRANSIENT().
16192         (build_class_ref): Temporary use permanent_obstack if the class
16193         isn't compiled.
16194         (build_static_field_ref): Temporary use permanent_obstack when
16195         creating field's rtl.
16196         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16197         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16198         and fields. Function finalized, as far as flag handling.
16199         (push_class_static_dummy_field): Temporary use permanent_obstack.
16200         (emit_register_class): Force generation of class registration at
16201         -O3 or deeper.
16202         * decl.c (end_java_method): Call permanent_allocation() before
16203         returning.
16204         * expr.c (can_widen_reference_to): Added comment to interface
16205         handling, fixed typo.
16206         (lookup_field): Now uses CLASS_P() to correct FIXME
16207         (expand_invoke): Verification on public && !static &&
16208         !abstract moved into soft_lookupinterfacemethod (kaffe).
16209         Use Object class dtable if objectref is an array when expanding
16210         invokeinterface.
16211         (java_push_constant_from_pool): Temporary use permanent_obstack
16212         for CONSTANT_string
16213         * parse.c (get_ref_constant): Temporary use permanent_obstack to
16214         create constant references.
16215         (get_constant): Temporary use permanent_obstack to create constant.
16216         (load_class): Temporary use permanent_obstack to load class.
16217         (jcf_parse): Temporary use permanent_obstack to perform class
16218         layout.
16219         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16220         (build_java_signature): Temporary use permanent_obstack.
16221         * verify.c: (verify_jvm_instruction): removed unnecessary verification
16222         on ACC_SUPER flag.
16223         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16224         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16225         (CLASS_P): Defined
16226
16227 1997-09-11  Per Bothner  <bothner@cygnus.com>
16228
16229         * class.c (append_gpp_mangled_type):  Fix typo.
16230         (emit_register_class):  Use main_class to get class object, rather
16231         than looking for no-longer-existing static decl starting with _CL.
16232         * typeck.c (parse_signature_type):  Promote array element type
16233         if it is a RECORD_TYPE.
16234
16235 1997-09-10  Per Bothner  <bothner@cygnus.com>
16236
16237         * class.c (push_class_static_dummy_field):  New function.
16238         (mangle_static_field):  New. Do G++-style mangling of static fields.
16239         (layout_class):  Mandle static fields here, not in add_field.
16240         (build_class_ref):  The class object is now a dummy static field.
16241         * decl.c (find_local_variable):  Look for best, instead of first match.
16242         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
16243         (build_java_athrow):  Don't check here if exception is Throwable.
16244         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
16245         (TYPE_USED):  Removed.  No longer used ...
16246         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
16247         * verify.c (push_pending_label):  New function.
16248         (push_pending_block):  Renamed to check_pending_block.
16249         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
16250         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
16251         re-checking possible handlers) after a store (less wasted work).
16252         Check for null handler (finally) before calling add_handler.
16253         Various changes to (finally?) correctly handle try/finally.
16254
16255 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16256
16257         * class.c: Include stdio.h.
16258
16259 1997-09-04  Per Bothner  <bothner@cygnus.com>
16260
16261         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16262         to make sure class is initialized before static/special invoke.
16263
16264         * verify.c (verify_jvm_instructions):  On a store instruction,
16265         call find_local_variable to force pre-allocation of decl and rtx.
16266         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
16267
16268 1997-09-03  Per Bothner  <bothner@cygnus.com>
16269
16270         * class.c (build_class_ref):   Strip off "promoted_" if need be.
16271         (make_field_value): Call build_java_signature when needed.
16272         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
16273         * expr.c (build_java_athrow):  Don't push_value of exception.
16274         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16275         match specification of [fd]cmp[lg] for NaNs.
16276         (expand_byte_code):  Add support for exception handler ranges.
16277         * except.c:  Add skeleton for EH code-generation.
16278         * verify.c (merge_types):  Treat all promoted integral types as equal.
16279         * constants.c (build_constants_constructor):  To force creation of
16280         current_constant_pool_data_ref, call build_constant_data_ref.
16281
16282         * javaop.def (lload):  Fix typo.
16283         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
16284
16285 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
16286
16287         * parse.c: Don't include function.h.
16288
16289 1997-08-27  Per Bothner  <bothner@cygnus.com>
16290
16291         * except.[ch]:  New files.
16292         * Makefile.in (JAVA_OBJS):  Add except.o
16293         * expr.c:  Temporary warning about unimplemented exceptions.
16294         * verify.c:  Verify exception handlers.
16295
16296         * jcf-dump.c (disassemble_method):  Print exception table.
16297
16298 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16299
16300         * expr.c (verify_jvm_instructions): Started a thorough
16301         verification of invoke* bytecodes.
16302         (expand_byte_code): flush quick stack if PC is the target of a
16303         branch.  and undef RET (conflicting with config/i386/i386.h).
16304         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16305         used.
16306         (expand_invoke): Now handles invokeinterface and do more
16307         verification according to the bytecode.
16308         (lookup_field): Don't try to load the class if processing
16309         dtable_type.
16310         (can_widen_reference_to): Now handles interfaces.
16311         * decl.c (init_decl_processing): New global variable
16312         soft_lookupinterfacemethod_node, declared in java-tree.h.
16313         Call set_super_info on string_type_node.
16314         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16315         defined.
16316         * class.c (set_super_info): Fills the CLASS_* flags according to
16317         access_flags.
16318         (get_access_flags_from_decl): Handles all class flags.
16319
16320 1997-08-26  Per Bothner  <bothner@cygnus.com>
16321
16322         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
16323         * parse.c (yyparse):  Check for abstract method, and missing code.
16324         * expr.c (expand_byte_code):  Change interface.
16325         * lang.c (put_decl_node):  Print promoted types prettier.
16326         * verify.c (verify_jvm_instruction):  Change interface.
16327         Partial support for scanning exception table.
16328         For load instructions, handle promoted integral types.
16329
16330 1997-08-21  Per Bothner  <bothner@cygnus.com>
16331
16332         * verify.c:  New file, with contents moved from expr.c.
16333         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
16334         * typeck.c (is_array_type_p):  Moved here from expr.c.
16335         * java-tree.h:  Add some now-needed function declarations.
16336         * Makefile.in (JAVA_OBJS): Added verify.o.
16337
16338 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16339
16340         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16341         METHOD_ABSTRACT flag.
16342
16343         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16344         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16345         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16346
16347         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16348         variables.
16349         (start_java_method): Hook for SYNCHRONIZED methods.
16350
16351         * expr.c (build_java_jsr, build_java_ret): New functions
16352         (JSR,PRE): New macros
16353         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16354         (verify_jvm_instructions): tableswitch, lookupswitch,
16355         monitorenter, monitorexit, goto_w: verified.
16356         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16357         (build_java_monitor): New function.
16358         (MONITOR_OPERATION): Modified to call build_java_monitor()
16359         (verify_jvm_instructions): Started a thorough verification of
16360         invoke* bytecodes.
16361
16362 1997-08-19  Per Bothner  <bothner@cygnus.com>
16363
16364         Support verification of jsr/ret subroutines (used for try/finally).
16365         * decl.c (return_address_type_node):  New type node.
16366         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16367         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16368         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
16369         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16370         TYPE_USED):  New macros for special types in type_map.
16371
16372         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
16373         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
16374         BCODE_JUMP_TARGET.
16375         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
16376
16377         * expr.c (can_widen_reference_to):  New function.
16378         (pop_type):  Use it.
16379         (merge_type_state):  Support handling start of subroutine.
16380         (push_pending_block):  Return char* error message, instead of calling
16381         fatal on an error.  Also handle subroutines.
16382         (verify_jvm_instructions):  Handle errors from push_poending_block.
16383         Support jsr and ret instructions.
16384
16385 1997-08-19  Per Bothner  <bothner@cygnus.com>
16386
16387         * jcf-io.c (find_classfile):  Fix thinko.
16388         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
16389
16390 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
16391
16392         * Makefile.in (BISON): Remove.
16393
16394 1997-08-07  Per Bothner  <bothner@cygnus.com>
16395
16396         * Makefile.in:  Convert to autoconf.
16397         * config-lang.in (outputs):  Added java/Makefile.
16398
16399         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16400         Rename cc1java to jc1.
16401
16402         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
16403         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
16404
16405         * class.c (class_depth):  Do load_class if needed.
16406
16407         Mostly better verification.
16408         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
16409         (init_decl_processing):  Change return type of soft_checkcast.
16410         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
16411         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16412         lang_print_error):  New functions.
16413         (lang_init):  Set global hook print_error_function to lang_print_error.
16414         * expr.c:  In the type_map ptr_type_node is only used for null now.
16415         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
16416         (merge_types):  Dererence pointer to record types before comparing.
16417         (decode_newarray_type, merge_types):  On error just return NULL.
16418         (build_java_binop):  Add preliminary implementation (with warning)
16419         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16420         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
16421         (expand_compare, expand_java_goto, expand_java_call):  Don't
16422         push_pending_block, since that only makes sense when verifying.
16423         (merge_type_state):  Different return codes.
16424         (push_pending_block):  A block may need to be verified more than once.
16425         (expand_byte_code):  Warn about unused code at code generation time.
16426         (verify_jvm_instruction):  Changed logic, since code may need to be
16427         re-verified if type-state has changed.  Also, better error handling.
16428         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16429         Improve newarray, anewarray, ?aload, athrow,
16430         * java-tree.h (LABEL_CHANGED):  New macro.
16431
16432 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16433
16434         * decl.c (soft_athrow_node): New global variable initialized.
16435         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16436         * typeck.c (convert): Added support for REAL_TYPE.
16437         (convert_to_char): New function.
16438         (convert): Handle CHAR_TYPE.
16439         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16440         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16441         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16442         promoted type.
16443         (verify_jvm_instructions): Added break a the end of bogus unop: label.
16444         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16445         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16446         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16447         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16448         to Use The Right Things.
16449         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16450         compatible with INT. BOOLEAN is made equivalent to BYTE.
16451         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16452         OPCODE_ifnonnull): Now supported.
16453         (build_java_athrow): New function.
16454
16455 1997-08-04  Per Bothner  <bothner@cygnus.com>
16456
16457         Rename method name <init> to match G++ (and fix mangling).
16458         * class.c (layout_class):  Replace method name of <init> by class name.
16459         (make_method_value):  Do inverse renaming of constructor from <init>.
16460         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
16461         * typeck.c (lookup_java_constructor):  New function.
16462         * expr.c (expand_invoke):  If method_name is <init>, call
16463         lookup_java_constructor to find constructor.
16464
16465         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
16466
16467 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16468
16469         * parse.c (get_class_constant): Modified to handle array "classes"
16470         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16471         wide type.
16472         (convert): Modified to handle real type.
16473         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16474         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16475         variables declared.
16476         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16477         soft_multianewarray, soft_newarray_node, soft_throw_node): New
16478         global variables initialized.
16479         (find_local_variable): Handles the case of a pointer
16480         (end_java_method): Restore the use of one more scope
16481         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16482         build_java_array_length_access, expand_java_arrayload,
16483         expand_java_arraystore, expand_java_array_length,
16484         expand_java_multianewarray, expand_java_anewarray,
16485         build_java_check_indexed_type, is_array_type_p,
16486         build_java_throw_out_of_bound_exception): New functions.
16487         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16488         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16489         OPCODE_<t>aload): Implemented code for verification.
16490         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16491         ARRAY_NEW_MULTI): Macro defined.
16492         (CONVERT): Modified to invoke convert().
16493         (case OPCODE_aload2): Fixed index typo from 2 to 1.
16494
16495 1997-07-31  Per Bothner  <bothner@cygnus.com>
16496
16497         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
16498         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
16499         (make_class_data):  Field name needs '/' as package prefix.
16500         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
16501
16502 1997-07-25  Per Bothner  <bothner@cygnus.com>
16503
16504         Implement debug information for local variables.
16505         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16506         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16507         DECL_LOCAL_SLOT_CHAIN):  New macros.
16508         (struct lang_decl_var):  New type.
16509         * parse.c (give_name_to_locals):  Move to decl.c.
16510         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
16511         (start_java_method):  Re-write parameter handling.
16512         (pending_local_decls):  New global variable.
16513         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
16514         (find_local_variable):  Accept pc so we can skips decls not in range.
16515         (struct binding_level):  Add end_pc field.
16516         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16517         (various):  Change so current pc gets passed to find_local_variable.
16518
16519         * decl.c (init_decl_processing):  Re-arrange fields in
16520         class_type_node and and method_type_node to match kaffe 0.9.1.
16521         * class.c (make_method_value, make_class_data):  Update
16522         initializations to match.
16523
16524 1997-07-16  Per Bothner  <bothner@cygnus.com>
16525
16526         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16527         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
16528         (push_super_field):  New function.
16529         (make_class_data):  Handle inheritance of class static initializer.
16530         (layout_class):  New name mangling.
16531         * constants.c (build_constant_data_ref):  Init type of data array
16532         to a one-element array.
16533         (build_constants_constructor):  Set DECL_SIZE from complete array type.
16534         * decl.c:  Rename class_type, object_type etc to class_type_node,
16535         object_type_node etc.  Make former inherit from latter.
16536         * expr.c (expand_invoke):  Add cast of function address.
16537         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
16538         * parse.c (yyparse):  Don't call layout_class here.
16539         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
16540
16541 1997-06-14  Per Bothner  <bothner@cygnus.com>
16542
16543         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
16544         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
16545         (alloc_class_constant):  New.
16546         * expr.c (expand_invoke):  Make sure method's class is initialized.
16547         * class.c (interits_from_p, emit_register_class):  New functions.
16548         * parse.c (yyparse):  Call emit_register_class.
16549
16550 1997-06-09  Per Bothner  <bothner@cygnus.com>
16551
16552         * constants.c:  New file, to handle constant pool.
16553         * Makefile.in (JAVA_OBJS):  Add constants.o.
16554         * decl.c (init_decl_processing):  Update, fix, finish various structs.
16555         (pushdecl_top_level):  New.
16556         * parse.c (layout_class):  Moved to class.c.
16557         * expr.c (java_push_constant_from_pool):  New function.
16558         * class.c (build_class_ref):  Make work fully
16559         (make_class_data):  Emit super-class, constant pool, interface vector.
16560
16561 1997-06-03  Per Bothner  <bothner@cygnus.com>
16562
16563         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
16564         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
16565         * class.c (class_depth):  New function.
16566         (lookup_named_class):  Replaced by new function lookup_class.
16567         * decl.c (object_type_node, string_type_node):  New.
16568         Remove various types that we no longer need.
16569         * expr.c (verify_jvm_instructions):  New separate verifier pass.
16570         (push_type, pop_type):  New functions for verifier.
16571         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
16572         (expand_byte_code):  Simplify, since we assume already verified.
16573         (expand_invoke):  Now mostly works.
16574         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16575         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
16576         * parse.c:  Wait to allocate class object until we know its name.
16577         (layout_class):  Calculate DECL_VINDEX for each virtual method.
16578         * typeck.c (get_array_type):  Rename to ...
16579         (build_java_array_type):  ... and provide working implementation.
16580         (build_java_signature):  New function - build Java signature of type.
16581         (set_java_signature):  New function - cache signature with type.
16582         (lookup_java_method):  New function.
16583
16584 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
16585
16586         * class.c (ident_subst):  Take extra SUFFIX parameter.
16587         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
16588         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
16589         (build_class_ref):  Actually implement.
16590         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
16591         * decl.c (builtin_function):  New.
16592         (init_decl_processing):  Update for current Kaffe.  Declare some
16593         builtin Kaffe functions.
16594         * expr.c (build_address_of):  New.
16595         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
16596         Renamed (from expand_java_new etc), and added working implementations.
16597         (build_field_ref):  Now also handle static fields.
16598         (expand_invoke):  Implement invokestatic, and start implement rest.
16599         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
16600         * javaop.def:  Rename invokevirt -> invokevirtual.
16601         * lang.c (use_handles):  Removed.
16602         * parse.c:  Add support for ConstantValue attribute.
16603         Handle nested loading of a class.  (JPOOL_UTF):  New.
16604
16605 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
16606
16607         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
16608
16609 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
16610
16611         * Make-lang.in (java.install-man):  New empty rule.
16612         * typeck.c (set_local_type):  New function.
16613         * expr.c (STORE_INTERNAL):  Call find_local_variable,
16614         not find_stack_slot.  Call set_local_type.
16615
16616 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
16617
16618         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
16619         and building RECORD_TYPE CONSTRUCTORs.
16620         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
16621
16622         * lang.c (use_handles):  Change the default to 0.
16623         * decl.c:  Define and build class_type, field_type, utf8const_type.
16624         * class.c (make_class_data, make_field_value,
16625         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
16626         hashUtf8String, strLengthUtf8, mangled_classname:
16627         Functions to build reflective data structures.
16628         * parse.c (yyparse):  Call make_class_data.
16629
16630         * jcf-io.c (open_class, find_classfile):  New functions.
16631         * jcf-dump.c:  Support reading classfile from explicitly-named
16632         class file (without CLASSPATH searching).
16633
16634 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16635
16636         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
16637         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
16638         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
16639         (get_constant):  Now trivial for CONSTANT_Utf8.
16640
16641         * jcf.h:  Make NEW_CPOOL the default.
16642         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
16643
16644 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16645
16646         New directory.