OSDN Git Service

* gcj.texi (Linking): New node. Document -lgij usage.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-07-07  Per Bothner  <per@bothner.com>
2
3         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4
5         * gcj.texi (Linking):   New node.  Document -lgij usage.
6
7 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
8
9         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
10         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
11         * java/class.c (set_super_info, class_depth, interface_of_p,
12         maybe_add_interface, add_interface, make_class_data,
13         layout_class, add_miranda_methods): Adjust BINFO macros.
14         * expr.c (can_widen_reference_to, lookup_field): Likewise.
15         * jcf-write.c (generate_classfile): Likewise.
16         * parse.y (patch_anonymous_class,
17         check_inner_circular_reference, check_circular_reference,
18         java_complete_class, check_abstract_method_definitions,
19         java_check_abstract_method_definitions,
20         check_interface_throws_clauses, java_check_abstract_methods,
21         lookup_java_interface_method2,
22         find_applicable_accessible_methods_list): Likewise.
23         * typeck.c (find_method_in_interface): Likewise.
24         * verify.c (merge_types): Likewise.
25
26 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
27
28         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
29         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
30
31 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
32
33         * class.c (make_class): Use make_tree_binfo.
34         (set_super_info, add_interface_do): Likewise.
35         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
36
37 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
38
39         * verify.c: Correct array element access formatting thinko.
40
41 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
42
43         * verify.c: Insert a short blurb at the start referring to the JVMS.
44         (merge_type_state): Remove redundant nested if statement.
45         (verify_jvm_instructions): Ensure current_subr is initialised to
46         NULL_TREE.
47         Minor formatting fixes all over the place.
48
49 2004-07-02  Richard Henderson  <rth@redhat.com>
50
51         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
52
53 2004-07-01  Richard Henderson  <rth@redhat.com>
54
55         * class.c (registerClass_libfunc): Remove.
56         (init_class_processing): Don't set it.
57         (emit_register_classes): Take list_p parameter.  Fill it in
58         with _Jv_RegisterClass calls.
59         * decl.c (java_init_decl_processing): Don't call
60         init_resource_processing.
61         * jcf-parse.c (java_emit_static_constructor): New.
62         (java_parse_file): Call it.
63         * resource.c (registerResource_libfunc): Remove.
64         (init_resource_processing): Remove.
65         (write_resource_constructor): Take list_p parameter.  Fill it in
66         with _Jv_RegisterResource calls.
67         * java-tree.h: Update prototypes.
68
69 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
70
71         PR java/1262
72         * class.c (layout_class_method): Do not override package-private
73         method if its in a different package.
74         (split_qualified_name): Move here from parse.y. Rename from
75         breakdown_qualified. Add comment.
76         (in_same_package): Move here from parse.y. Add comment.
77         * java-tree.h (break_down_qualified, in_same_package): Declare.
78         (in_same_package): Likewise.
79         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
80         Callers updated.
81
82 2004-06-29  Andrew Haley  <aph@redhat.com>
83
84         * except.c (expand_start_java_handler): Push a new binding level.
85         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
86         register_exception_range() to register where we'll do it.
87         (expand_end_java_handler): Remove old bogus code.  Replace with
88         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
89         the top of the expression we're curently building.
90         (maybe_end_try): Delete.
91         * decl.c (binding_level.exception_range): New field.
92         (clear_binding_level): Add field exception_range.  Reformat.
93         (poplevel): Call expand_end_java_handler().
94         (poplevel): Call java_add_stmt only if functionbody is false.
95         (maybe_poplevels): Don't call maybe_end_try() from here.
96         (end_java_method): Clear no longer used trees in function decl.
97         (register_exception_range): New function.
98         * java-tree.h (register_exception_range, struct eh_range): Declare.
99
100 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
101
102         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
103
104 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
105
106         Formatting fixes.
107         * expr.c (class_has_finalize_method): Fix method name indentation.
108         (expand_java_call): Remove K&R style parameter declaration.
109         (expand_invoke): Fix statement indentation.
110         (expand_java_field_op): Likewise.
111         * parse-scan.y: Fix typo.
112         (reset_report): Fix method name indentation.
113         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
114         line. Fix typos.
115         * verify.c (verify_jvm_instructions): Document parameters, insert
116         page break.
117         * lang.c (lang_init_source): Fix method name indentation.
118         * class.c (common_enclosing_context_p): Likewise.
119         (emit_symbol_table): Fix parameter list indentation.
120         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
121         parameter declaration.
122         * constants.c: Fix copyright notice indentation.
123         * typeck.c (find_method_in_superclasses): Fix parameter list
124         indentation.
125         (find_method_in_interfaces): Likewise.
126         * zextract.c (makelong): Fix method name indentation.
127
128 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
129
130         PR java/15715.
131         * parse.y (create_interface): Set correct access modifiers for
132         interfaces.
133         * jcf-write.c (get_classfile_modifiers): New function.
134         (generate_classfile): Use get_classfile_modifiers, not 
135         get_access_flags.
136
137 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
138
139         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
140         dependency to current parser context, not NULL_TREE, for top-level
141         classes.
142         (jdep_resolve_class): Enable member access check for all inner
143         class dependencies.
144
145 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
146
147         * parse.y (qualify_and_find): Pass type decl, not identifier, to 
148         load_class.
149
150 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
151
152         PR java/15734
153         * expr.c (expand_java_field_op): Ensure that target class for static
154         field access has been loaded.
155
156 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
157             Ranjit Mathew  <rmathew@hotmail.com>
158
159         PR java/1207, java/16178
160         * jcf-parse.c (load_class): Return immediately if passed a type decl
161         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
162         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
163         before calling load_class.
164         (qualify_and_find): Likewise.
165         (find_in_imports_on_demand): Likewise.
166         (find_applicable_accessible_methods_list): Likewise.
167
168 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
169
170         * parse.y (java_layout_seen_class_methods): Don't call load_class
171         on class defined by source parser.
172
173 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
174
175         * parse.y (set_nested_class_simple_name_value): Removed.
176         (java_complete_expand_class): Remove calls to
177         set_nested_class_simple_name_value.
178
179 2004-06-22  Andrew Haley  <aph@redhat.com>
180             Ranjit Mathew  <rmathew@hotmail.com>
181         
182         Fixes PR java/16113.
183         * decl.c (force_poplevels): Remove call to expand_end_bindings.
184
185 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
186
187         * parse.y (create_class): Correct diagnostic message about
188         java.lang.Object extending anything else.
189
190 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
191
192         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
193         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
194         * constants.c (build_ref_from_constant_pool): Likewise.
195         * expr.c (build_java_array_length_access): Likewise.
196         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
197         (invoke_build_dtable, build_invokevirtual): Likewise.
198         (build_invokeinterface, java_expand_expr): Likewise.
199         (emit_init_test_initialization): Likewise.
200         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
201         * parse.y (make_qualifed_name, build_array_ref): Likewise.
202         
203 2004-06-21  Andrew Haley  <aph@redhat.com>
204
205         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
206         block.
207
208 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
209
210         * jcf.h (struct JCF): Change java_source, right_zip and finished
211         to unsigned int.
212         * lex.h (struct java_lexer): Change hit_eof, read_anything,
213         byte_swap and use_fallback to unsigned int.
214         * parse.h (struct _jdep): Change flag0 to unsigned int.
215
216 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
217
218         Fixes PR java/13948
219         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
220         before trying to lay out its methods.
221         * jcf-parse.c (read_class): Track parsed files using canonical paths
222         obtained via lrealpath from libiberty.
223         (java_parse_file): Likewise.
224         (parse_source_file_1): Rename formal parameter to reflect its
225         modified purpose. Minor formatting fix.
226
227 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
228
229         * class.c (emit_register_classes): Make the function uninlinable,
230         do not set current_function_cannot_inline.
231         * resource.c (write_resource_constructor): Do not reset
232         flag_inline_functions around rest_of_compilation.
233         
234 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
235
236         PR java/15769
237         * expr.c (java_truthvalue_conversion): Handle
238         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
239         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
240         i.e. return the expression.
241
242 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
243
244         * gjavah.c: Include version.h
245
246 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
247
248         * jcf-write.c (generate_bytecode_conditional): Correct handling
249         of unordered conditionals. Add comment.
250
251 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
252             Per Bothner  <per@bothner.com>
253
254         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
255         local variable was initialised upon declaration.
256         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
257         variable was final and initialised upon declaration.
258         * check-init.c (check_final_reassigned): Give error only if a blank
259         final is not definitely unassigned or if an initialised final is
260         reassigned.
261         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
262         assignment expressions. Remove case MODIFY_EXPR, label do_default.
263         (check_init): Perform initialised-variable-removing-optimisation
264         only on non-final local variables.
265
266 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
267
268         * jcf-write.c (generate_bytecode_conditional): Handle binops 
269         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, 
270         and LTGT_EXPR.
271         (generate_bytecode_insns): Likewise.
272
273 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
274
275         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
276         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
277
278 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
279
280         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
281         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
282
283 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
284
285         * decl.c (struct binding_level): Add GTY marker. Compile
286         binding_depth unconditionally.
287         (current_binding_level, free_binding_level, global_binding_level):
288         Likewise.
289         (clear_binding_level): Unconditionally set binding_depth.
290         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
291
292 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
293
294         * lex.c (java_new_lexer): Set 'encoding'.
295         (java_read_char): Improve error message for unrecognized characters.
296         * lex.h (struct java_lexer): New field 'encoding'.
297
298 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
299
300         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
301
302 2004-05-21  Mark Wielaard  <mark@klomp.org>
303
304         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
305         extern.
306
307 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
308
309         * typeck.c: Remove non-printable character 160.
310
311 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
312
313         * check-init.c: Correct minor typos.
314
315 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
316
317         * Make-lang.in, expr.c, java-gimplify.c: Rename
318         tree-simple.[ch] to tree-gimple.[ch].
319
320 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
321
322         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
323
324 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
325
326         Merge from tree-ssa-20020619-branch.  See
327         ChangeLog.tree-ssa for details.
328
329         * Make-lang.in, builtins.c, check-init.c, class.c,
330         constants.c, decl.c, except.c, expr.c, java-except.h,
331         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
332         lang.c, lang.opt, parse.y, resource.c: Merged.
333         * java-gimplify.c: New file.
334
335 2004-05-10  Andrew Haley  <aph@redhat.com>
336
337         * parse.y (create_class): Set TYPE_VFIELD.
338         * decl.c (java_init_decl_processing): Likewise.
339
340         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
341         * class.c (make_method_value): Replace DECL_VINDEX with call to
342         get_method_index().
343         (get_dispatch_vector): Likewise.
344         (layout_class_method): Likewise.
345         Replace set of DECL_VINDEX with call to set_method_index().
346         (set_method_index): New function.
347         (get_method_index): New function.
348         * java-tree.h (set_method_index): New function decl.
349         (get_method_index): New function decl.
350
351 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
352
353         * parse.y (check_pkg_class_access): Add new argument
354         and use it when cl is NULL to call lookup_cl on it.
355         (parser_check_super_interface): Do not call lookup_cl.
356         Pass this_decl to check_pkg_class_access and NULL
357         instead of lookup_cl.
358         (parser_check_super): Update for change in
359         check_pkg_class_access.
360         (do_resolve_class): Likewise.
361         (process_imports): Likewise.
362         (find_in_imports_on_demand): Likewise.
363         (resolve_qualified_expression_name): Likewise.
364
365 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
366
367         Fixes PR java/9685, PR java/15073
368         * parse.y (accessibility_string): New method.
369         (not_accessible_field_error): Use accessibility_string()
370         instead of java_accstring_lookup().
371         (resolve_qualified_expression_name): Check with
372         check_pkg_class_access() before allowing access using
373         qualified names.
374         Fix comment typo.
375         Use check_pkg_class_access() instead of not_accessible_p()
376         for unqualified types.
377         (not_accessible_p): Use DECL_CONTEXT (member) instead of 
378         REFERENCE for package-private access checking.
379         (patch_method_invocation): Use accessibility_string() instead
380         of java_accstring_lookup().
381
382 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
383
384         Fixes PR java/15133
385         * gjavah.c (struct method_name): Add member is_native.
386         (overloaded_jni_method_exists_p): Match candidate method only if
387         it is native.
388         (print_method_info): Initialise is_native flag from the method's
389         access flags.
390
391 2004-04-30  Roger Sayle  <roger@eyesopen.com>
392
393         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
394         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
395
396 2004-04-22  Roger Sayle  <roger@eyesopen.com>
397
398         * resource.c (write_resource_constructor): Guard call to possibly
399         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
400
401 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
402
403         * class.c (make_class_data): Add new field aux_info.
404         * decl.c (java_init_decl_processing): Push type and decl for 
405         `aux_info'.
406
407 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
408
409         * expr.c (expand_java_NEW): Don't use size argument for 
410         _Jv_AllocObject calls.
411         * parse.y (patch_invoke): Likewise.
412
413 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
414
415         * expr.c (build_invokeinterface): Remove unused variables to
416         fix warnings.
417
418 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
419
420         * class.c (get_interface_method_index): New function. Return dispatch 
421         index for interface method.
422         (make_method_value): For interface methods, set index field to
423         iface dispatch index, not DECL_VINDEX.
424         * expr.c (build_invokeinterface): Use get_interface_method_index.
425
426 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
427
428         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
429
430 2004-03-31  Andrew Haley  <aph@redhat.com>
431
432         PR java/14104
433         * jcf-io.c (opendir_in_zip): Tidy up error handling.
434
435 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
436
437         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
438         form of GTY markers.
439
440 2004-03-25  Marcus Meissner  <meissner@suse.de>
441
442         PR java/14689:
443         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
444
445 2004-03-23  Tom Tromey  <tromey@redhat.com>
446
447         PR java/14315:
448         * jcf-write.c (make_class_file_name): Don't report if mkdir
449         failed with EEXIST.
450
451 2004-03-23  Tom Tromey  <tromey@redhat.com>
452
453         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
454
455 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
456
457         * class.c, gjavah.c, lang.c: Fix comment typos.
458         * gcj.texi: Fix typos.
459
460 2004-03-19  Per Bothner  <per@bothner.com>
461
462         * gcj.texi (Code Generation):  Document new flags and assert defaults.
463
464         * class.c (assume_compiled_node_struct):  Rename type to
465         class_flag_node_struct, as it is now also used for enable_assertions.
466         Rename assume_compiled_node typedef.  Rename excludep field to value.
467         (find_assume_compiled_node):  Rename function to find_class_flag_node.
468         Minor optimization - avoid needless strlen.
469         (add_assume_compiled):  Some tweaking and optimization.
470         Rename and generalize to add_class_flag takem an extra parameter.
471         (add_assume_compled):  New just calls add_class_flag.
472         (add_enable_assert, enable_assertions):  New functions.
473         (enable_assert_tree):  New static.
474         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
475         * lang.opt (fenable-assertions, fenable-assertions=,
476         fdisable-assertions, fdisable-assertions=):  New options.
477         * lang.c (java_handle_option):  Handle new options.
478         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
479         class in an interface - create helper class nested in outer interface.
480         (build_assertion):  Short-circuit if enable_assertions is false.
481
482 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
483
484         * java-tree.h: Changes throughout to add checking to macros
485         and numerous whitespace changes.
486         (VAR_OR_FIELD_CHECK): New macro.
487         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
488         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
489
490 2004-03-16  Per Bothner  <per@bothner.com>
491
492         * jcf-jump.c (options):  New --print-constants option.
493         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
494
495         * jcf-dump.c (flag_print_constant_pool):  Default to off.
496         (print_constant_terse_with_index):  New helper function.
497         (various places):  Check flag_print_constant_pool where missing.
498         (main):  If verbose set flag_print_constant_pool.
499         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
500
501 2004-03-15  Andrew Haley  <aph@redhat.com>
502
503         PR java/14581
504         * parse.y (java_complete_lhs): Check that final variable has an
505         initializer.
506
507 2004-03-12  Andrew Haley  <aph@redhat.com>
508
509         PR java/14551
510         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
511         conversion.
512
513 2004-02-29  Roger Sayle  <roger@eyesopen.com>
514
515         * jcf-parse.c (java_parse_file): Handle the case that input_filename
516         is NULL.
517
518 2004-02-27  Per Bothner  <per@bothner.com>
519
520         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
521         suggestion:  Use build_incomplete_class_ref.
522         This fixes PR java/13508, java/11714.
523
524 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
525
526         * java/parse.h: Update copyright.
527
528 2004-02-26  Andrew Haley  <aph@redhat.com>
529
530         PR java/14231:
531         * parse.y (check_interface_throws_clauses): Check for
532         !METHOD_INVISIBLE (iface_method).
533         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
534         well as CLASS_ABSTRACT.
535
536 2004-02-25  Per Bothner  <per@bothner.com>
537
538         * parse.y (build_assertion):  If we're in an inner class, create the
539         class$ helper routine in the outer class.
540
541 2004-02-19  Richard Henderson  <rth@redhat.com>
542
543         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
544
545 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
546
547         * Make-lang.in (java.install-man): Add extra dependencies.
548
549 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
550
551         * Make-lang.in: Install man pages under the same names
552         (possibly transformed) as the program they document.
553
554 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
555
556         * gjavah.c: Include "intl.h".
557         (error): New function.
558         (main): Call gcc_init_libintl.
559         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
560         print_stub_or_jni, process_file, main): Use error rather than
561         fprintf.
562         (print_method_info, usage, help, version, main): Mark strings for
563         translation with _.  Avoid splitting up sentences.  Send
564         information messages to stdout.
565         * jcf-dump.c: Include "intl.h".
566         (main): Call gcc_init_libintl.
567         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
568         Mark error, usage and version messages for translation with _.
569         Avoid splitting up sentences.
570         * jv-scan.c: Include "intl.h".
571         (fatal_error, warning): Change parameter s to msgid.  Translate
572         messages.
573         (main): Call gcc_init_libintl.
574         (usage, help, version): Mark error, usage and version messages for
575         translation with _.  Avoid splitting up sentences.
576         * jvgenmain.c: Include "intl.h".
577         (main): Call gcc_init_libintl.
578         (usage, main): Mark error messages for translation with _.
579         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
580         JVGENMAIN_OBJS): Add intl.o.
581         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
582         java/jvgenmain.o): Update dependencies.
583
584 2004-02-08  Per Bothner  <per@bothner.com>
585
586         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
587         class don't use not_accessible_field_error, which can get confused.
588
589 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
590
591         Make-lang.in (po-generated):  Delete.
592
593 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
594
595         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
596         Depend on target.h.
597         * decl.c: Include target.h.
598         (start_java_method): Replace PROMOTE_PROTOTYPES with
599         targetm.calls.promote_prototypes.
600         * expr.c: Include target.h.
601         (pop_arguments): Replace PROMOTE_PROTOTYPES with
602         targetm.calls.promote_prototypes.
603         * parse.y: Include target.h.
604         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
605         with targetm.calls.promote_prototypes.
606
607 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
608
609         * typeck.c: Update copyright.
610
611 2004-02-02  Tom Tromey  <tromey@redhat.com>
612
613         * decl.c (java_init_decl_processing): Remove duplicate
614         gnu/gcj/RawData.
615
616 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
617
618         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
619
620 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
621
622         * expr.c (build_field_ref): Move variable
623         definition up.
624
625 2004-01-28  Andrew Haley  <aph@redhat.com>
626
627         * expr.c (build_field_ref): Widen field offset.
628
629 2004-01-27  Andrew Haley  <aph@redhat.com>
630
631         java/13273
632         * parse.y (check_interface_throws_clauses): Make sure class_decl
633         has been loaded.
634
635 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
636
637         PR java/13733
638         * parse.y (patch_assignment): Don't modify lhs_type for
639         reference assignments.
640
641 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
642
643         * Make-lang.in: Replace $(docdir) with doc.
644         (java.info, java.srcinfo, java.man, java.srcman): New rules.
645         (java.install-man): Revamp rule.
646
647 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
648
649         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
650         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
651         instead of deferred backquote.
652
653 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
654
655         * typeck.c (find_method_in_interfaces): Move variable
656         definition up.
657
658 2004-01-16  Andrew Haley  <aph@redhat.com>
659
660         PR java/13273:
661         * typeck.c (shallow_find_method): New.
662         (find_method_in_superclasses): New.
663         (find_method_in_interfaces): New.
664         (lookup_do): Rewrite.
665         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
666
667         * jcf-parse.c (read_class): Save and restore output_class.
668         * decl.c (java_expand_body): Set output_class from fndecl.
669
670 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
671
672         * class.c (gen_indirect_dispatch_tables): Fix string length
673         calculations.
674
675 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
676
677         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
678         (java.srcextra): Copy above back to source directory if requested.
679         (po-generated): Delete reference to $(parsedir).
680         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
681         Use implicit rule.
682
683 2004-01-14  Jan Hubicka  <jh@suse.cz>
684
685         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
686         estimation.
687
688 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
689
690         * java-tree.h (java_expand_expr): Change prototype.
691         * expr.c (java_expand_expr): Add alt_rtl parameter.
692
693 2004-01-09  Andrew Haley  <aph@redhat.com>
694
695         PR java/12755:
696         * parse.y (java_fix_constructors):  Set output_class.
697         (java_reorder_fields): Likewise.
698         (java_layout_classes): Likewise.
699         (java_expand_classes): Generate indirect dispatch tables.
700         (java_expand_classes): Set output_class.
701         (java_finish_classes): Likewise.
702         * lang.c (java_init): Turn on always_initialize_class_p if we're
703         using indirect dis[atch.
704         (java_decl_ok_for_sibcall): Use output_class, not current_class.
705         (java_get_callee_fndecl): Use class local atable.
706         * jcf-parse.c
707         (always_initialize_class_p): Decl moved to java-tree.h.
708         (HANDLE_CLASS_INFO): Set output_class.
709         (read_class): Likewise.
710         (parse_class_file): Call gen_indirect_dispatch_tables.
711         (parse_zip_file_entries): Set output_class.
712         (java_parse_file): Set output_class.  Don't emit symbol tables.
713         * java-tree.h (output_class): New.
714         Remove global declarations for otable, atable, and ctable.
715         (always_initialize_class_p): moved here from decl.c.
716         (DECL_OWNER): New.
717         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
718         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
719         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
720         (struct lang_type): Add otable_methods, otable_decl,
721         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
722         ctable_decl, catch_classes, type_to_runtime_map.
723         * expr.c (build_field_ref): Make otable, atable, and ctable class
724         local rather than global.
725         (build_known_method_ref): Likewise.
726         (build_invokeinterface): Likewise.
727         (java_expand_expr): Pass runtime type (rather than actual type) to
728         expand_start_catch.
729         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
730         this class.  Look up each class in that map to delete duplicates.
731         (expand_end_java_handler): Pass runtime type (rather than actual
732         type) to expand_start_catch.
733         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
734         (do_nothing): New.
735         (java_init_decl_processing): Rearrange things.  Remove global
736         declarations of otable, atable, and ctable.
737         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
738         (java_expand_body): Set output_class.
739         * constants.c (build_constant_data_ref): Use output_class, not
740         current_class.
741         (alloc_name_constant): Likewise.
742         * class.c (gen_indirect_dispatch_tables): New.
743         (build_class_ref): Generate hard reference to superclass, even if
744         using indirect dispatch.
745         (build_static_field_ref): Use class local atable.
746         (make_class_data): Generate hard reference to superclass, even if
747         using indirect dispatch.
748         Generate symbolic references to interfaces when using indirect
749         dispatch.
750         (make_class_data): Emit otable, atable, and ctable.
751         Make otable, atable, and ctable class local rather than global.
752         (emit_catch_table): Make otable, atable, and ctable class local
753         rather than global.
754
755 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
756
757         * parse.y (catch_clause_parameter): Fix typo.
758
759         PR java/13404
760         * parse.y: (catch_clause_parameter): Return early if $3, aka
761         formal_parameter, is null.
762
763 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
764
765         * class.c: Remove uses of "register" specifier in
766         declarations of arguments and local variables.
767         * decl.c: Likewise.
768         * expr.c: Likewise.
769         * gjavah.c: Likewise.
770         * jcf-dump.c: Likewise.
771         * jcf-io.c: Likewise.
772         * jcf-parse.c: Likewise.
773         * jcf-write.c: Likewise.
774         * keyword.h: Likewise.
775         * parse.y: Likewise.
776         * typeck.c: Likewise.
777         * verify.c: Likewise.
778
779 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
780
781         * Make-lang.in (GCJ_CROSS_NAME): Delete.
782         (java.install_common, java.install-man): Adjust for above.
783         (java.uninstall): Likewise.
784
785 2003-12-03  Michael Koch  <konqueror@gmx.de>
786
787         * class.c (make_class_data):
788         Push field value to 'hack_signers' instead of 'signers'.
789         * decl.c (java_init_decl_processing):
790         Push field 'hack_signers' instead of 'signers'.
791
792 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
793
794         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
795         including iconv.h.
796
797 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
798
799         PR java/12374:
800         * parse.y (qualify_ambiguous_name): Remove lots of broken
801         field access processing - there's no need to do that here,
802         because we have resolve_field_access.  Remove
803         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
804         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
805         used.
806
807 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
808
809         Fix PR java/13237
810         * parse.y (java_complete_lhs): Save location prior to patching
811         CALL_EXPR.
812
813 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
814
815         PR java/12548
816         * resource.c (write_resource_constructor): Append
817         "_resource" to constructor identifier name.
818
819 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
820
821         Fix PR java/13183.
822         * constants.c (cpool_for_class): New function.
823         (outgoing_cpool): Remove global variable.
824         (alloc_name_constant): Use cpool_for_class.
825         (build_constants_constructor): Likewise.
826         * decl.c (java_expand_body): Set current_class.
827         * java-tree.h (outgoing_cpool) Remove declaration.
828         (init_outgoing_cpool): Likewise.
829         * jcf-parse.c (init_outgoing_cpool): Remove function.
830         (parse_class_file): Don't call init_outgoing_cpool.
831         * parse.y (java_complete_expand_methods): Don't call
832         init_outgoing_cpool.  Don't save outgoing_cpool.
833         (java_expand_classes): Don't restore outgoing_cpool.
834         (java_finish_classes): Likewise.
835
836 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
837
838         * Make-lang.in: (java.install-common) Add
839         symlink for $(target_noncanonical)-gcjh for
840         native builds.
841
842 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
843
844         * Make-lang.in (java.extraclean): Delete.
845
846 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
847
848         * Make-lang.in (check-java): Add.
849
850 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
851
852         Fix PR java/13024.
853         * except.c (prepare_eh_table_type): Allocate variable-sized
854         buffer `buf' with alloca.
855
856 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
857
858         Fix PR java/12857.
859
860         decl.c (java_init_decl_processing): Don't initialize
861         class_not_found_type_node, no_class_def_found_type_node.
862
863         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
864         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
865         (class_not_found_type_node, no_class_def_found_type_node):
866         Don't define.
867
868         parse.y (build_dot_class_method_invocation): Add this_class
869         argument.  Qualify method invocations to a different class.
870         (create_new_parser_context): Initialize saved_data_ctx to 0.
871         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
872         (build_dot_class_method): Don't load classes.  Register
873         incomplete types.
874         (build_incomplete_class_ref): Special cases for interfaces
875         and inner classes.  Move build_dot_class_method call to here...
876         (patch_incomplete_class_ref): ...from here.  Pass current_class
877         to build_dot_class_method_invocation.
878         (build_assertion): Pass class_type to
879         build_dot_class_method_invocation.
880         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
881
882 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
883
884         Fix PR java/12739.
885         * java-tree.h (BLOCK_EMPTY_P): Define.
886         * parse.y (java_complete_lhs): Check for empty blocks
887         in TRY_FINALLY_EXPR case.
888
889 2003-11-17  Andrew Haley  <aph@redhat.com>
890
891         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
892         (struct lang_decl_var:freed): New variable.
893         * decl.c (poplevel): Mark local vars that have gone out of scope.
894         (push_jvm_slot): Don't use the RTL of a var that has gone out of
895         scope.
896
897 2003-11-16  Jason Merrill  <jason@redhat.com>
898
899         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
900         and TAGS files that include them for each front end.
901
902 2003-11-15  Tom Tromey  <tromey@redhat.com>
903
904         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
905
906 2003-11-12  Jason Merrill  <jason@redhat.com>
907
908         PR optimization/12547
909         * lang.c (java_tree_inlining_walk_subtrees): Just walk
910         BLOCK_EXPR_BODY directly.
911
912 2003-11-12  Andrew Haley  <aph@redhat.com>
913
914         PR java/11045
915         * parse.y (fold_constant_for_init): Check that we really do have a
916         constant.
917
918         PR java/11533
919         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
920         init_test_decls being inlined.
921
922         PR java/12890:
923         * parse.y (do_resolve_class): Check return value from
924         breakdown_qualified().
925
926 2003-11-11  Tom Tromey  <tromey@redhat.com>
927
928         PR java/12915:
929         * parse.y (merge_string_cste): Handle case where we have a
930         pointer that happens to be zero, not null_pointer_node.
931
932 2003-11-10  Tom Tromey  <tromey@redhat.com>
933
934         * jcf-parse.c (classify_zip_file): Correctly compare
935         filename_length against length of manifest file's name.
936
937 2003-11-08  Tom Tromey  <tromey@redhat.com>
938
939         PR java/12894:
940         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
941
942 2003-11-06  Andrew Haley  <aph@redhat.com>
943
944         * expr.c (java_stack_swap): Make sure destination stack slots are
945         of the correct type.
946
947 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
948
949         * Make-lang.in (dvi): Move targets to $(docobjdir).
950         (gcj.dvi): Simplify rule and adjust target.
951         (gcj.info): Simplify rule.
952         (gcj.pod): New intermediate rule.
953         (gcjh.pod): Likewise.
954         (jv-scan.pod): Likewise.
955         (jcf-dump.pod): Likewise.
956         (gij.pod): Likewise.
957         (jv-convert.pod): Likewise.
958         (rmic.pod): Likewise.
959         (rmiregistry.pod): Likewise.
960         (gcj.1): Delete.
961         (gcjh.1): Delete.
962         (jv-scan.1): Delete.
963         (jcf-dump.1): Delete.
964         (gij.1): Delete.
965         (jv-convert.1): Delete.
966         (rmic.1): Delete.
967         (rmiregistry.1): Delete.
968
969 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
970
971         Fixes PR java/12866.
972         * parse.y (resolve_qualified_expression_name): Move test
973         for outer field access methods from here...
974         (check_thrown_exceptions) ...to here.
975
976 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
977
978         * .cvsignore: Delete.
979
980 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
981
982         * verify.c (verify_jvm_instructions): Don't warn about legal
983         eh binding regions generated for example by jdk 1.4.1.
984
985 2003-10-24  David S. Miller  <davem@redhat.com>
986
987         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
988
989 2003-10-22  Andrew Haley  <aph@redhat.com>
990
991         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
992         (java_get_callee_fndecl): New.
993
994         * jcf-parse.c (java_parse_file): Call emit_catch_table().
995
996         * java-tree.h (ctable_decl): New.
997         (catch_classes):  New.
998         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
999
1000         * decl.c (java_init_decl_processing): Add catch_class_type.
1001         Add ctable_decl.
1002         Add catch_classes field.
1003
1004         * class.c (build_indirect_class_ref): Break out from
1005         build_class_ref.
1006         (make_field_value): Check flag_indirect_dispatch.
1007         (make_class_data): Ditto.
1008         Tidy uses of PUSH_FIELD_VALUE.
1009         Add field catch_classes.
1010         (make_catch_class_record): New.
1011
1012         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1013
1014 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1015
1016         * jcf-write.c: Follow spelling conventions.
1017         * parse.y: Likewise.
1018
1019 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1020
1021         * ChangeLog: Fix typos.
1022         * expr.c: Fix comment typos.
1023         * jcf-write.c: Likewise.
1024         * lang.c: Likewise.
1025         * lex.c: Likewise.
1026         * mangle.c: Likewise.
1027         * parse-scan.y: Likewise.
1028         * parse.y: Likewise.
1029
1030 2003-10-22  Tom Tromey  <tromey@redhat.com>
1031
1032         * expr.c (expand_byte_code): Only warn about dead bytecode when
1033         extra_warnings is set.
1034
1035 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
1036
1037         Fix for PR java/12586.
1038         * mangle.c (find_compression_record_match): Don't iterate through
1039         package namespace elements unless they all match compression_table
1040         entries.
1041
1042 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
1043
1044         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1045         (generate-manpages): Likewise.
1046         (java.maintainer-clean): Likewise.
1047         (gcj.info): Likewise.
1048         (gcj.1): Likewise.
1049         (gcjh.1): Likewise.
1050         (jv-scan.1): Likewise.
1051         (jcf-dump.1): Likewise.
1052         (gij.1): Likewise.
1053         (jv-convert.1): Likewise.
1054         (rmic.1): Likewise.
1055         (rmiregistry.1): Likewise.
1056         (java.install-man): Likewise.
1057         (parse-scan.o): Move and define complete compile line.
1058         (parse.o): Likewise.
1059         (jcf-tree-inline.o): Move.
1060
1061 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
1062
1063         * Make-lang.in (info): Update dependencies.
1064         (java.install-info): Remove.
1065         ($(srcdir)/java/gcj.info): Replace with ...
1066         ($(docobjdir)/gcj.info): ... this.
1067
1068 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
1069
1070         * Make-lang.in: Replace uses of $(target_alias) with
1071         $(target_noncanonical).
1072
1073 2003-10-09  Tom Tromey  <tromey@redhat.com>
1074
1075         * decl.c (java_init_decl_processing): Declare signers field.
1076         * class.c (make_class_data): Set signers field.
1077
1078 2003-10-09  Jason Merrill  <jason@redhat.com>
1079
1080         * parse.y (patch_assignment): Use make_node to create a BLOCK.
1081         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1082         POINTER_TYPE.
1083
1084 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1085
1086         * Make-lang.in (java.info): Replace with ...
1087         (info): ... this.
1088         (java.dvi): Replace with ...
1089         (dvi): ... this.
1090         (java.generated-manpages): Replace with ...
1091
1092 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
1093
1094         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1095
1096 2003-10-01  Andrew Haley  <aph@redhat.com>
1097
1098         * jcf-parse.c (java_parse_file): Write otable and atable.
1099         * java-tree.h (atable_methods): New.
1100         (atable_decl): New.
1101         (atable_syms_decl): New.
1102         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1103         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1104         (symbol_*type): Rename method_symbol* to symbol*type.
1105         (emit_offset_symbol_table): Delete.
1106         (emit_symbol_table): New.
1107         (get_symbol_table_index): New.
1108         (atable_type): New.
1109         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1110         (build_known_method_ref): Likewise.
1111         (get_symbol_table_index): Rename from get_offset_table_index.
1112         Parameterize to allow re-use by differing types of symbol table.
1113         (build_invokevirtual): Pass table to get_offset_table_index.
1114         * decl.c (java_init_decl_processing): Push types and decls for
1115         atable and atable_syyms.
1116         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1117         (make_class_data): Add new fields atable and atable_syms.
1118         (emit_symbol_table): Rename from emit_offset_symbol_table.
1119         Parameterize to allow re-use by different types of symbol table.
1120         (build_symbol_entry): Renamed from build_method_symbols_entry.
1121
1122 2003-09-30  Roger Sayle  <roger@eyesopen.com>
1123
1124         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1125         semantics for SAVE_EXPR, by caching the result in a temporary.
1126
1127 2003-09-28  Richard Henderson  <rth@redhat.com>
1128
1129         * check-init.c (check_init): Save and restore input_location
1130         instead of file and line separately.
1131         * decl.c (java_expand_body): Likewise.
1132         * jcf-write.c (generate_bytecode_insns): Likewise.
1133         * parse.y (safe_layout_class): Likewise.
1134         * jcf-parse.c (read_class, parse_class_file): Likewise.
1135         (java_parse_file): Use %H for warning locator.
1136
1137 2003-09-28  Roger Sayle  <roger@eyesopen.com>
1138
1139         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1140         with void-type branches instead of using a COMPOUND_EXPR.
1141
1142 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
1143
1144         * decl.c (java_optimize_inline, dump_function): Remove.
1145         * java-tree.h (java_optimize_inline): Remove declaration.
1146         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1147         * parse.y (source_end_java_method, java_expand_classes):
1148         Likewise.  Remove dead code.
1149
1150 2003-09-27  Roger Sayle  <roger@eyesopen.com>
1151
1152         * lang.c (java_init_options): Set flag_evaluation_order.
1153         * expr.c (force_evaluation_order): Don't attempt to force
1154         evaluation order of binary operations using save_expr.
1155         * parse.y (java_complete_lhs): No longer need to call
1156         force_evaluation_order when constructing binary operators.
1157
1158 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1159             Bryce McKinlay  <bryce@mckinlay.net.nz>
1160
1161         PR java/1333:
1162         * parse.y (not_accessible_field_error): New function.
1163         (resolve_expression_name): Check field access permissions.
1164         (resolve_qualified_expression_name): Use
1165         not_accessible_field_error.
1166         (resolve_qualified_expression_name): Likewise.
1167
1168 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1169
1170         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1171
1172 2003-09-23  Roger Sayle  <roger@eyesopen.com>
1173
1174         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1175         with equal operands without side-effects.
1176
1177 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
1178
1179         * decl.c (java_init_decl_processing): Don't emit otable decls
1180         if flag_indirect_dispatch is not set.
1181
1182 2003-09-21  Richard Henderson  <rth@redhat.com>
1183
1184         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1185         resource.c: Revert.
1186
1187 2003-09-21  Richard Henderson  <rth@redhat.com>
1188
1189         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1190         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1191
1192 2003-09-20  Richard Henderson  <rth@redhat.com>
1193
1194         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1195
1196 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1197
1198         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1199         * check-init.c (check_init): Likewise.
1200
1201 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1202
1203         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1204
1205 2003-09-16  Andrew Haley  <aph@redhat.com>
1206
1207         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1208
1209 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
1210
1211         Fixes PR java/9577
1212         * mangle.c (find_compression_record_match): Skip
1213         over a "6JArray" (the array template mangled string)
1214         IDENTIFIER_NODE.
1215         (mangle_array_type): Correct minor typo.
1216         (atms): Move definition to the beginning.
1217
1218 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
1219
1220         * class.c (add_miranda_methods): Ensure super-interfaces are laid
1221         out. Fix for PR java/12254.
1222
1223 2003-09-11  Richard Henderson  <rth@redhat.com>
1224
1225         * parse.y (source_end_java_method): Update for new
1226         cgraph_finalize_function argument.
1227
1228 2003-09-09  Richard Henderson  <rth@redhat.com>
1229
1230         * parse.y (source_end_java_method): Update call to
1231         cgraph_finalize_function.
1232
1233 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
1234
1235         * decl.c (java_expand_body): New function.
1236         * expr.c (build_class_init): Set DECL_IGNORED_P.
1237         * java-tree.h (start_complete_expand_method,
1238         java_expand_body): Declare.
1239         * jcf-parse.c (cgraph.h): Include.
1240         (java_parse_file): Handle flag_unit_at_a_time.
1241         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1242         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1243         (java_estimate_num_insns): Use walk_tree_without_duplicates.
1244         (java_start_inlining): New function.
1245         * parse.h (java_finish_classes): Declare.
1246         * parse.y: Include cgraph.h.
1247         (block): Don't special-case empty block production.
1248         (craft_constructor): Set DECL_INLINE.
1249         (source_end_java_method): Handle flag_unit_at_a_time.
1250         Replace inline code with call to java_expand_body.
1251         (start_complete_expand_method): Remove static modifier.
1252         (java_expand_method_bodies): Patch function tree for
1253         class initialization and/or synchronization as needed.
1254         Don't begin RTL expansion yet.
1255         (java_expand_classes): Check flag_unit_at_a_time before
1256         calling finish_class.
1257         (java_finish_classes): New function.
1258         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1259         (patch_assignment): Set DECL_CONTEXT on temporary variable.
1260         (emit_test_initialization): Set DECL_IGNORED_P.
1261
1262 2003-09-03  Roger Sayle  <roger@eyesopen.com>
1263
1264         * builtins.c (enum builtin_type): Delete unused enumeration.
1265         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1266
1267 2003-08-28  Tom Tromey  <tromey@redhat.com>
1268
1269         * gcj.texi (Extensions): Document gcjlib URLs.
1270
1271 2003-08-20  Tom Tromey  <tromey@redhat.com>
1272
1273         * gcj.texi (Extensions): Added xref.
1274         (libgcj Runtime Properties): Document
1275         gnu.gcj.runtime.VMClassLoader.library_control.
1276
1277 2003-08-20  Andrew Haley  <aph@redhat.com>
1278
1279         * except.c (prepare_eh_table_type): Use new encoding for exception
1280         handlers when using -fno-assume-compiled.
1281
1282 2003-08-13  Tom Tromey  <tromey@redhat.com>
1283
1284         * gcj.texi (Invoking gij): Document -X and -?.
1285
1286 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
1287
1288         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1289         GCJH_OBJS, JCFDUMP_OBJS
1290         * win32-host.c: Removed the unnecessary and broken dependency
1291         on jcf.h
1292
1293 2003-08-11  Tom Tromey  <tromey@redhat.com>
1294
1295         * parse.y (java_check_regular_methods): Typo fixes.  Call
1296         check_interface_throws_clauses.  Use
1297         check_concrete_throws_clauses.
1298         (check_interface_throws_clauses): New function.
1299         (check_concrete_throws_clauses): New function.
1300         (hack_is_accessible_p): New function.
1301         (find_most_specific_methods_list): Added FIXME.
1302         * typeck.c (lookup_do): Use `flags' argument to decide what to
1303         do.  Reimplemented.
1304         (lookup_argument_method_generic): New function.
1305         (lookup_argument_method2): Removed.
1306         * jcf.h (ACC_INVISIBLE): New define.
1307         * jcf-write.c (generate_classfile): Skip invisible methods.
1308         * class.c (add_miranda_methods): New function.
1309         (layout_class_methods): Use it.
1310         (get_access_flags_from_decl): Use ACC_INVISIBLE.
1311         * java-tree.h (METHOD_INVISIBLE): New define.
1312         (lang_decl_func) [invisible]: New field.
1313         (lookup_argument_method_generic): Declare.
1314         (SEARCH_INTERFACE): New define.
1315         (SEARCH_SUPER): Likewise.
1316         (SEARCH_ONLY_INTERFACE): Likewise.
1317         (SEARCH_VISIBLE): Likewise.
1318         (lookup_argument_method2): Removed declaration.
1319
1320 2003-08-05  Tom Tromey  <tromey@redhat.com>
1321
1322         Fix for PR java/11600:
1323         * parse.y (java_complete_lhs): See whether we're calling a method
1324         on an array.
1325         (check_thrown_exceptions): Added `is_array_call' argument;
1326         fixed `clone' checking; updated all callers.
1327
1328 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1329
1330         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1331
1332 2003-08-03  Tom Tromey  <tromey@redhat.com>
1333
1334         * java-tree.h (METHOD_TRANSIENT): Removed.
1335         * decl.c (pushdecl): Removed some dead code.
1336         * class.c (get_access_flags_from_decl): Can't have transient
1337         method.
1338         (add_method_1): Can't have a transient method.
1339
1340 2003-07-28  Andreas Jaeger  <aj@suse.de>
1341
1342         * jvspec.c: Convert to ISO C90 prototypes.
1343
1344 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1345
1346         * decl.c (force_poplevels): Fix warning call.
1347
1348 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1349
1350         * expr.c (expand_java_field_op): Don't use xxx_with_decl
1351         (expand_java_field_op): Likewise.
1352         * class.c (layout_class_method): Likewise
1353         (emit_register_classes): Likewise.
1354         * decl.c (pushdecl): Likewise.
1355         (poplevel): Likewise.
1356         (force_poplevels): Likewise.
1357         (give_name_to_locals): Likewise.
1358         * check-init.c (check_for_initialization): Likewise.
1359
1360 2003-07-24  Jason Merrill  <jason@redhat.com>
1361
1362         * java-tree.h: Move boolean_type_node et al to the back end.
1363
1364 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1365
1366         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1367         casts.
1368
1369 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
1370
1371         * lang.opt: Don't show -MD_ and -MDD_.
1372
1373 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
1374
1375         * lang-options.h: Remove.
1376         * lang.opt: Add help text.
1377
1378 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
1379
1380         * expr.c: Remove the last argument to expand_assignment().
1381
1382 2003-07-09  Jan Hubicka  <jh@suse.cz>
1383
1384         * java-tree.h (DECL_NUM_STMTS): Rename to...
1385         (DECL_ESTIMATED_INSNS): ... this.
1386         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1387         New static functions.
1388         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1389         * parser.y (add_stmt_to_compound): Do not account statements.
1390
1391 2003-07-08  Mark Wielaard  <mark@klomp.org>
1392
1393         * gcj.texi: CNI now expands to Compiled Native Interface.
1394
1395 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1396
1397         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1398
1399 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1400
1401         * expr.c (expand_byte_code): Adjist emit_line_note call.
1402
1403 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1404
1405         * lang.c (java_handle_option): Don't handle filenames.
1406
1407 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
1408
1409         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1410         DIR_SEPARATOR.
1411         Use FILENAME_CMP.
1412         * jcf-write.c: Don't default-define DIR_SEPARATOR.
1413         * jcf.h: Delete COMPARE_FILENAMES definition.
1414
1415 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
1416
1417         * lang.c (java_init_options): Update prototype.
1418
1419 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1420
1421         * decl.c (poplevel): Adjust define_label call.
1422
1423 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1424
1425         * gjavah.c (flag_jni): Make non-static.
1426         * parse-scan.y (ctxp): Make non-static.
1427
1428         * class.c (build_method_symbols_entry)
1429         * expr.c (get_offset_table_index)
1430         * jcf-parse.c (jcf_parse):
1431         Mark the definition static, matching the forward declaration.
1432
1433 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
1434
1435         * lang.c (java_handle_option): Don't check for missing arguments.
1436
1437 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1438
1439         * class.c (push_class): Use a location_t to save place.
1440         (emit_register_classes): Set input_location. Adjust
1441         expand_function_end call.
1442         * resource.c (write_resource_constructor): Likewise.
1443         * decl.c (end_java_method): Adjust expand_function_end call.
1444         * parse.y (source_end_java_method): Likewise.
1445
1446 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1447
1448         * lang.c (java_handle_option): Likewise.
1449
1450 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
1451
1452         * lang.c (java_handle_option): Special-casing of optional
1453         joined arguments no longer needed.
1454         * lang.opt: Update switches that take optional argument.
1455
1456 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1457
1458         * lang.opt: Declare Java.
1459         * lang.c (java_init_options): Update.
1460
1461 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1462
1463         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1464
1465 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1466
1467         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1468         * lang.c (java_handle_option): -MD and -MMD have an underscore.
1469         * lang.opt: -MD and -MMD have an underscore.
1470
1471 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1472
1473         * class.c (emit_register_classes): Adjust init_function_start
1474         call.
1475         * decl.c (complete_start_java_method): Likewise.
1476         * resource.c (write_resource_constructor): Likewise.
1477
1478 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1479
1480         * Make-lang.in: Update to use options.c and options.h.
1481         * lang.c: Include options.h not j-options.h.
1482         (java_handle_option): Abort on unrecognized option.
1483         (java_init_options): Request Java switches.
1484
1485 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
1486
1487         * Make-lang.in: Handle mostlyclean.
1488
1489 2003-06-11  Tom Tromey  <tromey@redhat.com>
1490
1491         * lang.c (java_handle_option): Update dependency_tracking for
1492         OPT_MF case.
1493
1494         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1495         empty argument.
1496
1497 2003-06-10  Andrew Haley  <aph@redhat.com>
1498
1499         * resource.c (write_resource_constructor): Use expand_expr to
1500         generate the address of the label attached to a resource.
1501         * Make-lang.in (java/resource.o): Add expr.h
1502
1503 2003-06-10  Andrew Haley  <aph@redhat.com>
1504
1505         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1506         (java_decl_ok_for_sibcall): New.
1507
1508 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
1509
1510         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1511         (java/j-options.c, java/j-options.h): New.
1512         * java-tree.h (resource_name, compile_resource_file,
1513         compile_resource_data): Constify.
1514         * jcf-write.c (jcf_write_base_directory): Similarly.
1515         * jcf.h (jcf_write_base_directory): Similarly.
1516         * lang.c: Include j-options.h.
1517         (cl_options_count, cl_options, string_option, java_decode_option,
1518         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1519         process_option_with_no): Remove.
1520         (resource_name): Constify.
1521         (LANG_HOOKS_HANDLE_OPTION): Override.
1522         (java_handle_option): New.
1523         (java_init): Don't call jcf_path_init.
1524         (java_init_options): Call jcf_path_init.
1525         * lang.opt: New.
1526         * resource.c (compile_resource_data, compile_resource_file): Constify.
1527
1528 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
1529
1530         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1531         (struct lang_decl_func): Add last_line field.
1532         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1533         DECL_SOURCE_LINE_LAST): Remove.
1534         * parse.y (missing_return_error, finish_method_declaration,
1535         lookup_cl, start_artificial_method_body, source_end_java_method,
1536         start_complete_expand_method): Adjust.
1537
1538 2003-06-08  Tom Tromey  <tromey@redhat.com>
1539
1540         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1541         fno-assume-compiled.
1542
1543 2003-06-08  Roger Sayle  <roger@eyesopen.com>
1544
1545         * builtins.c (define_builtin_type, builtin_types): Delete.
1546         (define_builtin): Rewritten to take just the built-in code,
1547         the function's name, type and fallback library function name.
1548         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1549         (initialize_builtins): Overhaul to define the GCC builtins
1550         used by gcj manually, providing the Java run-time's
1551         implementations as the fallback library function.
1552
1553 2003-06-08  Anthony Green  <green@redhat.com>
1554
1555         * parse.y (patch_cast): Fix conversions from floating-point to
1556         integral types.
1557
1558 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
1559
1560         * Make-lang.in: Update.
1561         * lang.c: Include opts.h. Define cl_options_count and cl_options.
1562
1563 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1564
1565         * lang.c (java_init_options): Update.
1566
1567 2003-06-05  Jan Hubicka  <jh@suse.cz>
1568
1569         * Make-lang.in:  Add support for stageprofile and stagefeedback
1570
1571 2003-05-31  Roger Sayle  <roger@eyesopen.com>
1572
1573         * lang.c (java_init_options): Prescribe wrap-around two's
1574         complement arithmetic overflow by setting flag_wrapv.
1575
1576 2003-05-29  Roger Sayle  <roger@eyesopen.com>
1577
1578         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1579         (builtin_record): Add an additional builtin_code field to
1580         record which GCC built-in corresponds to the Java function.
1581         (java_builtins):  Add new entries for atan, atan2, exp, log,
1582         pow and tan.
1583         (max_builtin, min_builtin, abs_builtin): Perform constant
1584         folding on the resulting tree.
1585         (java_build_function_call_expr): Likewise, perform constant
1586         folding on the resulting tree.
1587         (initialize_builtins): The NULL creators are now allowed in
1588         the java_builtins table, which is now terminated by an entry
1589         with builtin_code == END_BUILTINS.
1590         (check_for_builtin): Likewise.  If the matching creator is
1591         NULL, construct the call using java_build_function_call_expr
1592         directly with the decl for the corresponding builtin_code.
1593
1594 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1595
1596         * win32-host.c: Normalize copyright boilerplate.
1597
1598 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1599
1600         * parse.y (print_int_node): Use string concatentation on
1601         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1602         function calls into one.
1603
1604 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
1605
1606         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1607         fatal_io_error with calls to fatal_error; add ": %m" to the end of
1608         all the affected error messages.
1609
1610 2003-05-13  Richard Henderson  <rth@redhat.com>
1611
1612         * class.c (layout_class_method): Set DECL_EXTERNAL.
1613         * decl.c (java_mark_decl_local, java_mark_class_local): New.
1614         * java-tree.h (java_mark_class_local): Declare.
1615         * jcf-parse.c (parse_class_file): Use it.
1616         * parse.y (java_expand_classes): Likewise.
1617
1618 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
1619
1620         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1621         * lex.h: #include input.h.
1622         * jv-scan.c (input_filename): Remove.
1623
1624 2003-05-02  Tom Tromey  <tromey@redhat.com>
1625
1626         PR java/10491:
1627         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1628         (handle_inner_classes): New function.
1629
1630 2003-05-01  Tom Tromey  <tromey@redhat.com>
1631
1632         PR java/10459:
1633         * parse.y (finish_for_loop): Do nothing if update expression is a
1634         EXPR_WFL_NODE wrapping nothing.
1635         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1636
1637 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
1638
1639         * lex.h (input_lineno): Remove declaration.
1640         * parse-scan.y: #include input.h.
1641         (input_filename): Remove declaration.
1642         (input_location): Add definition.
1643         (input_line): Remove definition.
1644
1645 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1646
1647         * lex.h (lineno): Rename to ...
1648         (input_line): ... here
1649         * parse-scan.y (lineno): Rename to ...
1650         (input_line): ... here.
1651         (reset_report): Rename lineno to input_line.
1652         * check-init.c (check_init): Likewise.
1653         * class.c (push_class): Likewise.
1654         * decl.c (complete_start_java_method, end_java_method): Likewise.
1655         * expr.c (expand_byte_code): Likewise.
1656         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1657         * jcf-write.c (generate_bytecode_insns): Likewise.
1658         * lex.c (java_init_lex, java_allocate_new_line,
1659         do_java_lex): Likewise.
1660         * parse.h (YYNOT_TWICE): Likewise.
1661         * parse.y (empty_statement, expression_statement,
1662         java_pop_parser_context, java_parser_context_save_global,
1663         yyerror, register_fields, method_header, safe_layout_class,
1664         find_in_imports_on_demand, create_artificial_method,
1665         source_end_java_method, start_complete_expand_method,
1666         build_thisn_assign, java_complete_lhs,
1667         maybe_absorb_scoping_block): Likewise.
1668
1669 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
1670
1671         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1672         '/' when computing java source filename
1673
1674 2003-04-13  Tom Tromey  <tromey@redhat.com>
1675
1676         * gjavah.c (print_c_decl): Indentation fix.
1677
1678 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1679
1680         * class.c (make_field_value, make_method_value, get_dispatch_table)
1681         (make_class_data, emit_offset_symbol_table)
1682         * constants.c (build_constants_constructor)
1683         * java-tree.h (START_RECORD_CONSTRUCTOR)
1684         * parse.y (maybe_build_array_element_wfl):
1685         Use build_constructor.
1686
1687 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
1688
1689         PR java/10253:
1690         * parse.y (string_convert_int_cst): Always use at least one digit
1691         in string conversion. Remove ASCII dependence.
1692         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
1693
1694 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
1695
1696         * Make-lang.in: added win32-host.c
1697         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
1698         resolves to open() on non-Win32 platforms and
1699         Win32-specific jcf_open_exact_case() on Win32
1700         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
1701         when trying .java and .class files
1702         * win32-host.c: added to repository. Defines
1703         Win32-specific jcf_open_exact_case()
1704
1705 2003-04-10  Andrew Haley  <aph@redhat.com>
1706
1707         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
1708         (maybe_free_localvar): Renamed from localvar_free.
1709         Add new arg, really.
1710         (generate_bytecode_insns): Set new variable, jsrs.
1711         Only free local vars if no jsr insns have been emittted.
1712         Call maybe_free_localvar, not localvar_free.
1713
1714 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
1715
1716         * gcj.texi: Remove @ at start of file.
1717
1718 2003-03-25  Tom Tromey  <tromey@redhat.com>
1719
1720         * parse.y (create_interface): Call CHECK_DEPRECATED.
1721
1722 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
1723
1724         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
1725
1726 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1727
1728         * javaop.h (jfloat, jdouble): Make them structures mirroring
1729         the bit fields of IEEE float and double respectively.
1730         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
1731         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
1732         (union Word, union DWord): Delete.
1733         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
1734
1735         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
1736         D_NAN_MASK): Delete.
1737         (jni_print_float, jni_print_double): New.  Generate
1738         hexadecimal floating constants.
1739         (print_field_info): Use jni_print_float/double.
1740
1741         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
1742         finite floating point numbers for output; special case
1743         non-finite floats.
1744
1745 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1746
1747         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
1748         Replace 0 and 1 with true and false in return statements.
1749
1750 2003-03-19  Tom Tromey  <tromey@redhat.com>
1751
1752         * lex.c (do_java_lex): Renamed from java_lex.
1753         (java_lex): New function.
1754         Include timevar.h.
1755
1756 2003-03-13  Tom Tromey  <tromey@redhat.com>
1757
1758         * parse.y (resolve_inner_class): Error if qualifier is a primitive
1759         type.
1760
1761 2003-03-04  Andrew Haley  <aph@redhat.com>
1762
1763         * gjavah.c (is_first_data_member): New global variable.
1764         (print_c_decl): If it's the first data member, align it as the
1765         superclass.
1766         (process_file): Set is_first_data_member.
1767
1768 2003-03-11  Tom Tromey  <tromey@redhat.com>
1769
1770         * parse.y (resolve_field_access): Initialize class if field is
1771         found in another static field.
1772         * expr.c (build_class_init): Don't optimize out initialization of
1773         implemented interface.
1774
1775 2003-03-11  Andrew Haley  <aph@redhat.com>
1776
1777         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
1778         warning.
1779
1780 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1781
1782         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
1783         and DIR_SEPARATOR_2 for a target.
1784         Correct minor typos.
1785
1786         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
1787         and DIR_SEPARATOR_2 for a target into account.
1788
1789 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1790
1791         * lang.c (java_init): Update prototype, move code to java_post_options.
1792         (java_post_options): Similarly.
1793
1794 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
1795
1796         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
1797         compare file name components depending on the case-sensitivity
1798         or otherwise of the host file system.
1799
1800         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
1801         "strcmp" to compare file name components.
1802         Use IS_DIR_SEPARATOR instead of comparing directly against
1803         DIR_SEPARATOR.
1804         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
1805         comparing directly against DIR_SEPARATOR.
1806
1807 2003-03-04  Tom Tromey  <tromey@redhat.com>
1808
1809         * Make-lang.in (java.tags): New target.
1810
1811 2003-03-01  Roger Sayle  <roger@eyesopen.com>
1812
1813         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
1814         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
1815
1816 2003-03-01  Tom Tromey  <tromey@redhat.com>
1817
1818         * parse.y (jdep_resolve_class): Only check deprecation if we found
1819         a decl.
1820
1821 2003-02-28  Tom Tromey  <tromey@redhat.com>
1822
1823         PR java/9695:
1824         * class.c (maybe_layout_super_class): Always pass a WFL to
1825         do_resolve_class.
1826         * parse.y (do_resolve_class): Updated comment to explain
1827         parameters.
1828
1829 2003-02-26  Tom Tromey  <tromey@redhat.com>
1830
1831         * jcf-write.c (generate_classfile): Check whether class is
1832         deprecated before writing attribute count.
1833
1834 2003-02-25  Roger Sayle  <roger@eyesopen.com>
1835
1836         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
1837         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
1838
1839 2003-02-23  Tom Tromey  <tromey@redhat.com>
1840
1841         * lang-options.h: Added -Wdeprecated.
1842         * gcj.texi (Warnings): Document -Wdeprecated.
1843         * java-tree.h (flag_deprecated): Declare.
1844         * lang.c (lang_W_options): Added deprecated.
1845         (flag_deprecated): New global.
1846         * chartables.h: Rebuilt.
1847         * gen-table.pl (process_one): Look at whitespace.
1848         (print_tables): Define LETTER_SPACE, LETTER_MASK.
1849         * parse.h (CLEAR_DEPRECATED): New macro.
1850         (CHECK_DEPRECATED_NO_RESET): New macro.
1851         * jcf-parse.c (handle_deprecated): New function.
1852         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
1853         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
1854         * parse.y (resolve_type_during_patch): Check deprecation.
1855         (jdep_resolve_class): Likewise.
1856         (process_imports): Likewise.
1857         (resolve_expression_name): Likewise.
1858         (check_deprecation): Strip arrays from decl.  Check
1859         flag_deprecated.
1860         (patch_method_invocation): Also check the particular constructor
1861         for deprecation.
1862         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
1863         * jcf-write.c (append_deprecated_attribute): New function.
1864         (generate_classfile): Generate deprecated attribute when
1865         appropriate.
1866         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
1867         (java_lex) [case '*']: Simplify logic.
1868         (java_start_char_p): Use LETTER_MASK.
1869         (java_part_char_p): Likewise.
1870         (java_space_char_p): New function.
1871
1872 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1873
1874         Change base class access representation.
1875         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
1876         (add_interface_do): Likewise.
1877
1878 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
1879
1880         * decl.c (java_init_decl_processing): Change
1881         soft_lookupjnimethod_node to reflect the change in
1882         signature of _Jv_LookupJNIMethod in libjava/jni.cc
1883         * expr.c (build_jni_stub): Calculate and pass the size
1884         on the stack of the arguments to a JNI function. Use
1885         new target macro MODIFY_JNI_METHOD_CALL to allow a
1886         target to modify the call to a JNI method.
1887
1888 2003-02-08  Roger Sayle  <roger@eyesopen.com>
1889
1890         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
1891         instead of basename to avoid compiler warnings on Tru64.
1892
1893 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1894
1895         * gcj.texi: Update to GFDL 1.2.
1896
1897 2003-01-31  Andrew Haley  <aph@redhat.com>
1898
1899         * parse.y (java_expand_classes): Scan the whole class list looking
1900         for access methods that haven't yet been expanded.
1901
1902 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
1903
1904         Fix for java/4269:
1905
1906         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
1907         to fix bootstrap on sparc-unknown-netbsdelf1.5.
1908         * jcf-parse.c: Likewise.
1909
1910 2003-01-31  Mark Wielaard  <mark@klomp.org>
1911
1912         * gjavah.c (throwable_p): Allocate 1 more byte for string.
1913
1914 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1915
1916         * class.c (make_class): Use BINFO_ELTS.
1917         (set_super_info): Likewse.
1918         (add_interface_do): Likewise.
1919
1920 2003-01-30  Tom Tromey  <tromey@redhat.com>
1921
1922         * jcf-parse.c (read_class): Update identifier's class value if it
1923         changed during parsing.
1924
1925 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
1926
1927         * Make-lang.in (po-generated): Find the targets in $(parsedir).
1928         Propagate change to all other rules as required.
1929         (java/parse-scan.o): Add explicit dependency on
1930         $(parsedir)/java/parse-scan.c .
1931
1932 2003-01-29  Tom Tromey  <tromey@redhat.com>
1933
1934         * parse.y (patch_assignment): Only transform the rhs of an
1935         assignment when compiling to native.
1936
1937 2003-01-28  Tom Tromey  <tromey@redhat.com>
1938
1939         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
1940
1941 2003-01-28  Tom Tromey  <tromey@redhat.com>
1942
1943         * lex.c (java_lex): Don't include UEOF as part of token.
1944         (java_read_unicode): Error if \u sequence prematurely terminated.
1945
1946 2003-01-27  Tom Tromey  <tromey@redhat.com>
1947
1948         * parse.y (java_check_regular_methods): Check for construct after
1949         checking types in throws clause.
1950
1951 2003-01-24  Tom Tromey  <tromey@redhat.com>
1952
1953         * class.c (build_static_field_ref): Only a String or numeric field
1954         can fold to a constant.
1955
1956 2003-01-23  Tom Tromey  <tromey@redhat.com>
1957
1958         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
1959         file name in resource buffer.
1960
1961 2003-01-23  Tom Tromey  <tromey@redhat.com>
1962
1963         * expr.c (build_known_method_ref): Use method's context to find
1964         method table index.
1965
1966 2003-01-23  Tom Tromey  <tromey@redhat.com>
1967
1968         * constants.c (set_constant_entry): Allocated cleared memory.
1969
1970 2003-01-22  Tom Tromey  <tromey@redhat.com>
1971
1972         * java-tree.h: Don't use PARAMS.
1973         * resource.c: Add prototypes for all functions.
1974         (write_resource_constructor): Use `const char *' to avoid
1975         warning.
1976
1977 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
1978
1979         * jcf-parse.c (process_zip_dir): Remove unused variable.
1980
1981 2003-01-22  Tom Tromey  <tromey@redhat.com>
1982
1983         * expr.c (build_invokeinterface): Abort if method's context is not
1984         an interface.
1985
1986 2003-01-22  Tom Tromey  <tromey@redhat.com>
1987
1988         * gcj.texi (Input and output files): Mention non-class entries.
1989         * decl.c (java_init_decl_processing): Call
1990         init_resource_processing.
1991         * java-tree.h (compile_resource_data, write_resource_constructor,
1992         compile_resource_file, init_resource_processing): Declare.
1993         * config-lang.in (gtfiles): Added resource.c.
1994         * Make-lang.in (gt-java-resource.h): New target.
1995         (JAVA_OBJS): Added resource.o.
1996         (java/resource.o): New target.
1997         * resource.c: New file.
1998         * class.c (compile_resource_file): Moved to resource.c.
1999         (registerResource_libfunc): Likewise.
2000         (utf8_decl_list): Mark with GTY; now static.
2001         * jcf-parse.c (classify_zip_file): New function.
2002         (parse_zip_file_entries): Use it; compile .properties files.
2003         (process_zip_dir): Use classify_zip_file and compute_class_name.
2004         Don't write class name into zip directory.
2005         (java_parse_file): Call write_resource_constructor.
2006         (compute_class_name): New function.
2007         * jcf-io.c (read_zip_member): Reindented.
2008
2009 2003-01-21  Tom Tromey  <tromey@redhat.com>
2010
2011         * class.c (supers_all_compiled): New function.
2012         (make_class_data): Use it.
2013
2014 2003-01-21  Tom Tromey  <tromey@redhat.com>
2015
2016         * parse.y (method_header): Native method can't be strictfp.
2017         No method can be transient or volatile.
2018
2019 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2020
2021         Make-lang.in (jvspec.o-warn): Add -Wno-error.
2022
2023 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
2024
2025         * check-init.c: Fix comment typos.
2026         * class.c: Likewise.
2027         * constants.c: Likewise.
2028         * decl.c: Likewise.
2029         * except.c: Likewise.
2030         * expr.c: Likewise.
2031         * java-except.h: Likewise.
2032         * java-tree.h: Likewise.
2033         * javaop.h: Likewise.
2034         * jcf-dump.c: Likewise.
2035         * jcf-io.c: Likewise.
2036         * jcf-parse.c: Likewise.
2037         * jcf-write.c: Likewise.
2038         * lang.c: Likewise.
2039         * mangle.c: Likewise.
2040         * typeck.c: Likewise.
2041         * verify.c: Likewise.
2042
2043 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2044
2045         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2046         * jcf-write.c: Include "tm_p.h".
2047
2048 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2049
2050         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2051
2052 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2053
2054         * builtins.c (java_build_function_call_expr): Renamed from
2055         build_function_call_expr.  All callers changed.
2056
2057         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2058         * jcf-parse.c: Include tm_p.h.
2059
2060         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2061         warning.
2062
2063 2003-01-14  Tom Tromey  <tromey@redhat.com>
2064
2065         * class.c (make_class_data): Check that super is compiled before
2066         building class reference to it.
2067
2068 2003-01-14  Andrew Haley  <aph@redhat.com>
2069
2070         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2071         varargs function -- correct.
2072
2073 2003-01-14  Andrew Haley  <aph@redhat.com>
2074
2075         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2076
2077 2003-01-14  Andrew Haley  <aph@redhat.com>
2078
2079         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2080         varargs function -- correct.
2081
2082         * parse.y (patch_assignment): Copy the rhs of an assignment into a
2083         temporary if the RHS is a reference.
2084
2085 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2086
2087         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2088         * keyword.h: Regenerated.
2089
2090         * All Files: Convert to ISO C style function definitions.
2091
2092 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2093
2094         * parse.y (check_pkg_class_access): ANSIfy definition.
2095
2096 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2097
2098         * decl.c, parse-scan.y, parse.y: Don't cast return value of
2099         xmalloc et al.
2100
2101         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2102
2103 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2104
2105         Merge from pch-branch:
2106
2107         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
2108
2109         * Make-lang.in (java/gjavah.o): Update dependencies.
2110         * gjavah.c: Include ggc.h.
2111
2112         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
2113
2114         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2115         (JCFDUMP_OBJS): Add ggc-none.o.
2116         (java/jcf-dump.o): Depend on GGC_H.
2117         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2118         CPool substructures.
2119         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2120         * jcf-dump.c: Include ggc.h.
2121
2122         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2123
2124         * jcf.h (union cpool_entry): New.
2125         (struct CPool): Use gengtype to mark.  Change field 'data' to be
2126         an array of unions.
2127         (struct JCF): Use gengtype to mark.
2128         (CPOOL_UINT): Update for new cpool_entry type.
2129         (CPOOL_USHORT1): Likewise.
2130         (CPOOL_USHORT2): Likewise.
2131         (CPOOL_FINISH): Use GC to free cpool subfields.
2132         * parse.h (struct parser_ctxt): Mark field current_jcf.
2133         * lex.c (java_init_lex): Use GC to allocate struct JCF.
2134         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2135         (main_jcf): Use gengtype to mark.
2136         (ggc_mark_jcf): Delete.
2137         (get_constant): Update for new cpool_entry type.
2138         (give_name_to_class): Likewise.
2139         (get_class_constant): Likewise.
2140         (init_outgoing_cpool): Use GGC to allocate struct CPool.
2141         (java_parse_file): Use GGC to allocate struct JCF.
2142         (init_jcf_parse): Don't call ggc_add_root.
2143         * jcf-reader.c (jcf_parse_constant_pool): Update for new
2144         cpool_entry type.
2145         * java-tree.h (current_jcf): Use gengtype to mark.
2146         (CPOOL_UTF): Update for new cpool_entry type.
2147         (outgoing_cpool): Use gengtype to mark.
2148         (struct lang_type): GC struct JCF and struct CPool.
2149         * config-lang.in (gtfiles): Add jcf.h.
2150         * constants.c (find_tree_constant): New.
2151         (set_constant_entry): Allocate cpool subfields using GGC.  Update
2152         for new cpool_entry type.
2153         (find_constant1): Update for new cpool_entry type.
2154         (find_constant2): Likewise.
2155         (find_utf8_constant): Use find_tree_constant.
2156         (find_class_or_string_constant): Remove unnecessary cast to jword.
2157         Update for new cpool_entry type.
2158         (count_constant_pool_bytes): Update for new cpool_entry type.
2159         (write_constant_pool): Likewise.
2160         (alloc_name_constant): Use find_tree_constant.
2161         (build_constants_constructor): Update for new cpool_entry type.
2162
2163         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2164
2165         * parse.y (mark_parser_ctxt): Delete.
2166         (goal): Don't use ggc_add_root.
2167         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2168         (java_pop_parser_context): Let GC free parser_ctxt.
2169         (java_parser_context_resume): Likewise.
2170         * parse.h (struct parser_ctxt): Use gengtype to mark.
2171         (ctxp): Likewise.
2172         (ctxp_for_generation): Likewise.
2173         * lex.h (struct java_lc_s): Mark for gengtype.
2174         (java_lexer): Rearrange for gengtype.
2175         * config-lang.in (gtfiles): Add lex.h, parse.h.
2176
2177 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2178
2179         * All Files: Remove PARAMS macro.
2180
2181         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2182         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2183         `__STDC__' macros.
2184
2185         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2186         VA_CLOSE.
2187
2188 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2189
2190         * Make-lang.in (java.install-common, java.uninstall,
2191         java.install-info, java.install-man): Prepend $(DESTDIR)
2192         to destination paths in all (un)installation commands.
2193         (java.install-common): Rewrite $(LN) command to support
2194         DESTDIR with "ln" as well as with "ln -s".
2195
2196 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2197
2198         * java-tree.h: Protect against multiple inclusion.
2199
2200 2003-01-07  Tom Tromey  <tromey@redhat.com>
2201
2202         * class.c (add_assume_compiled): Don't adjust parent if we're
2203         already at the root of tree.
2204
2205 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2206
2207         * lang.c (dump_compound_expr): Prototype.
2208
2209 2003-01-03  Tom Tromey  <tromey@redhat.com>
2210
2211         Fix for PR java/8712:
2212         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2213         when simply checking against `null'.
2214
2215 2003-01-03  Tom Tromey  <tromey@redhat.com>
2216
2217         * gcj.texi (Standard Properties): Document http.proxyHost and
2218         http.proxyPort.
2219
2220         * gcj.texi (GNU Classpath Properties): Document new properties.
2221
2222 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2223
2224         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2225         java/lang-options.h, java/mangle.c, java/mangle_name.c,
2226         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2227
2228 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2229
2230         * Make-lang.in, boehm.c, buffer.c,
2231           buffer.h, builtins.c, class.c,
2232           config-lang.in, constants.c,
2233           convert.h, decl.c, except.c,
2234           expr.c, java-except.h,
2235           java-tree.h, javaop.def,
2236           jcf-parse.c, jcf-write.c,
2237           jv-scan.c, jvgenmain.c,
2238           jvspec.c, keyword.gperf,
2239           keyword.h, lang-options.h,
2240           lang-specs.h, lang.c, lex.c,
2241           lex.h, mangle.c, mangle_name.c,
2242           parse-scan.y, parse.h, parse.y,
2243           typeck.c, verify.c, xref.c,
2244           xref.h: Replace "GNU CC" with
2245           "GCC" in the copyright header.
2246
2247         * check-init.c, gjavah.c, javaop.h,
2248           jcf-depend.c, jcf-dump.c, jcf-io.c,
2249           jcf-path.c, jcf-reader.c, jcf.h,
2250           zextract.c, zipfile.h: These files are
2251           "part of GCC". Also say "GCC" not "GNU CC".
2252
2253 2002-12-30  DJ Delorie  <dj@redhat.com>
2254
2255         * Make-lang.in: Protect against texi2pod/pod2man failing.
2256
2257 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
2258
2259         * gcj.texi: Use @copying.
2260
2261 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2262
2263         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2264         print_cxx_classname.
2265         (print_cxx_classname): Add add_scope parameter.
2266         (print_class_decls): Do not emit a semicolon after the extern
2267         "Java" block.
2268         (process_file): Adjust calls to print_cxx_classname.
2269
2270 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2271
2272         * gcj.texi: Include Cover Texts in man page.
2273
2274 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
2275
2276         * class.c (build_static_field_ref): Check FIELD_FINAL.
2277
2278         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2279         instead of current_constant_pool_data_ref.
2280         * java-tree.h (current_constant_pool_data_ref): Undefine.
2281         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2282         * jcf-parse.c (init_outgoing_cpool): Don't initialize
2283         current_constant_pool_data_ref.
2284
2285         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2286         not build_internal_class_name.
2287
2288         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2289         Use it when class ref isn't certain to be compiled.
2290
2291 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2292
2293         * gcj.texi: Include gcc-common.texi.
2294         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2295         $(srcdir)/doc/include/gcc-common.texi.
2296
2297 2002-12-22  Anthony Green  <green@redhat.com>
2298
2299         * gcj.texi (Limitations): Add note about org.xml.sax and
2300         org.w3c.dom.
2301
2302 2002-12-20  Tom Tromey  <tromey@redhat.com>
2303
2304         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2305         where minimum case value is Integer.MIN_VALUE.
2306         Fixes PR java/8955.
2307
2308 2002-12-18  Andrew Haley  <aph@redhat.com>
2309
2310         * parse.y (patch_invoke): Force evaluation order when `check' is
2311         set.  For PR libgcj/8945.
2312
2313 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
2314
2315         * gcj.texi: Change version number to 3.4.
2316
2317 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
2318         Andrew Haley <aph@redhat.com>
2319
2320         * parse.y (source_end_java_method): Remove custom encoding of line
2321         numbers for a function decl before passing it to the back end.
2322
2323 2002-12-03  Andrew Haley  <aph@redhat.com>
2324
2325         * class.c (make_class_data): New field, "chain".
2326         * decl.c (java_init_decl_processing): Likewise.
2327
2328 2002-12-02  Tom Tromey  <tromey@redhat.com>
2329
2330         For PR java/8740:
2331         * parse.y (do_resolve_class): Handle qualified name via
2332         recursion.
2333
2334 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2335
2336         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2337         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2338         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2339         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2340         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2341         Include coretypes.h and tm.h.
2342         * Make-lang.in: Update dependencies.
2343
2344 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2345
2346         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2347
2348 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2349
2350         * jcf-reader.c: Don't expand JCF_readu4 inside the
2351         expansion of JCF_SKIP.
2352
2353 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2354
2355         * jcf-reader.c: Don't expand JCF_readu4 inside the
2356         expansion of JCF_SKIP.
2357
2358 2002-11-22  Tom Tromey  <tromey@redhat.com>
2359
2360         * parse.y (patch_binop): Cast right hand side of shift expression
2361         to `int'.  Fixes PR java/8676.
2362
2363 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
2364             Andrew Haley <aph@redhat.com>
2365
2366         * gcc/java/jcf-write.c (write_classfile): Remove target
2367         class file, if it exists, before renaming the temporary
2368         class file to it.
2369
2370 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2371
2372         * jvspec.c (lang_specific_spec_functions): New.
2373
2374 2002-11-18  Tom Tromey  <tromey@redhat.com>
2375
2376         Fix for PR java/7912:
2377         * expr.c (can_widen_reference_to): Allow cast of array to
2378         Cloneable or Serializable.
2379         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2380         (java_io_serializable_identifier_node): Likewise.
2381         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2382         (valid_ref_assignconv_cast_p): Use new identifier nodes.
2383         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2384         java_io_serializable.
2385         * decl.c (java_init_decl_processing): Initialize
2386         java_lang_cloneable_identifier_node and
2387         java_io_serializable_identifier_node.
2388         (java_lang_cloneable_identifier_node): New global.
2389         (java_io_serializable_identifier_node): Likewise.
2390
2391 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2392
2393         * buffer.c: Remove unnecessary casts.
2394         * check-init.c: Likewise.
2395         * class.c: Likewise.
2396         * constants.c: Likewise.
2397         * decl.c: Likewise.
2398         * except.c: Likewise.
2399         * gjavah.c: Likewise.
2400         * jcf-io.c: Likewise.
2401         * jcf-parse.c: Likewise.
2402         * jcf-path.c: Likewise.
2403         * jvspec.c: Likewise.
2404         * lang.c: Likewise.
2405         * lex.c: Likewise.
2406         * verify.c: Likewise.
2407
2408 2002-11-06  Tom Tromey  <tromey@redhat.com>
2409
2410         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2411         a JNI header.
2412
2413 2002-11-05  Tom Tromey  <tromey@redhat.com>
2414
2415         Fix for PR java/6388.
2416         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2417         * java-tree.h (enum java_tree_index): New values
2418         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2419         (decimal_int_max, decimal_long_max): New defines.
2420         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
2421         (error_if_numeric_overflow): Rewrote range checking.
2422         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2423         decimal_long_max.
2424
2425 2002-11-02  Tom Tromey  <tromey@redhat.com>
2426
2427         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2428
2429         * class.c (make_method_value): Put class name, not signature, into
2430         `throws' field.  For PR java/8415.
2431
2432 2002-10-24  Tom Tromey  <tromey@redhat.com>
2433
2434         * gcj.texi (Invoking gij): Document --showversion.
2435         (Standard Properties): java.library.path now set.
2436
2437 2002-10-23  Tom Tromey  <tromey@redhat.com>
2438
2439         * gjavah.c (decode_signature_piece): In JNI mode, print
2440         `jobjectArray' when array depth is nonzero.
2441         Fixes PR java/8296.
2442
2443 2002-10-15  Andrew Haley  <aph@redhat.com>
2444
2445         * parse.y (patch_invoke): Call force_evaluation_order on a static
2446         arg list.
2447         (resolve_qualified_expression_name): Call force_evaluation_order
2448         on a arg list that is part of a Qualified Expression Name.
2449
2450         * lang.c (dump_compound_expr): New.
2451         (java_dump_tree): New.
2452
2453 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
2454
2455         * gcj.texi: Added item describing the GCJ runtime property
2456         "gnu.gcj.progname".
2457
2458 2002-10-15  Richard Henderson  <rth@redhat.com>
2459
2460         * jcf-parse.c (get_constant): Fix type warning.
2461
2462 2002-10-15  Andrew Haley  <aph@redhat.com>
2463
2464         * java-tree.h (java_inlining_merge_static_initializers): Declare.
2465         (java_inlining_map_static_initializers): Declare.
2466
2467 2002-10-14  Andrew Haley  <aph@redhat.com>
2468
2469         * tree-inline.c (remap_block): All local class initialization
2470         flags go in the outermost scope.
2471         (expand_call_inline): Call java_inlining_map_static_initializers.
2472         (expand_call_inline): Call java_inlining_merge_static_initializers.
2473         * java/lang.c (merge_init_test_initialization): New.
2474         (java_inlining_merge_static_initializers): New.
2475         (inline_init_test_initialization): New.
2476         (java_inlining_map_static_initializers): New.
2477
2478 2002-10-11  Mark Wielaard  <mark@klomp.org>
2479
2480         * gcj.texi (Compatibility): Add Limitations and Extensions section.
2481
2482 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2483
2484         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2485
2486 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2487
2488         * parse.y (merge_string_cste): Add parentheses around & within |.
2489
2490 2002-10-08  Tom Tromey  <tromey@redhat.com>
2491
2492         * parse.y (variable_declarator_id): Simplify error path for
2493         array declarator error.  For PR java/8003.
2494
2495 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
2496
2497         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2498         bug_report_url.
2499
2500 2002-10-08  Andrew Haley  <aph@redhat.com>
2501
2502         * parse.y (attach_init_test_initialization_flags): Check for
2503         error_mark_node.
2504
2505 2002-10-07  Anthony Green  <green@redhat.com>
2506
2507         * parse.y (merge_string_cste): Fix bug in string concatenation.
2508
2509 2002-10-03  Michael Koch  <konqueror@gmx.de>
2510
2511         * gcj.texi (Standard properties):
2512         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2513
2514 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2515
2516         PR optimization/6627
2517         * lang.c (java_init): If storing the vbit in function
2518         pointers, ensure that force_align_functions_log is atleast
2519         one to aid compatability with g++ vtables.
2520
2521 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
2522
2523         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2524         foul of type-based aliasing.
2525
2526 2002-09-30  Anthony Green  <green@redhat.com>
2527
2528         * gcj.texi (Invoking jv-scan): Fix texinfo.
2529
2530 2002-09-28  Anthony Green  <green@redhat.com>
2531
2532         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2533         (Code Generation): Add -fno-assert documentation.
2534         * jv-scan.c (flag_assert): New global.
2535         (options): Add assert option.
2536         (help): Add --no-assert documentation.
2537         * parse-scan.y (flag_assert): New global.
2538         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2539         (flag_assert): New global.
2540         * java-tree.h (flag_assert): New global.
2541         * lex.c (java_lex): Obey flag_assert.
2542         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2543         calling cc1.
2544
2545 2002-09-26  Andrew Haley  <aph@redhat.com>
2546
2547         * expr.c (build_java_array_length_access): Check for null pointer.
2548         * expr.c (expand_java_arrayload): Likewise.
2549
2550 2002-09-21  Richard Henderson  <rth@redhat.com>
2551
2552         * jcf-parse.c (get_constant): Decode from IEEE no matter
2553         what the target format.
2554
2555 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
2556
2557         * ChangeLog: Follow spelling conventions.
2558         * class.c: Likewise.
2559         * decl.c: Likewise.
2560         * expr.c: Likewise.
2561         * gjavah.c: Likewise.
2562         * java-tree.h: Likewise.
2563         * jcf-dump.c: Likewise.
2564         * jcf-parse.c: Likewise.
2565         * jvspec.c: Likewise.
2566         * lang.c: Likewise.
2567         * mangle.c: Likewise.
2568         * parse.y: Likewise.
2569
2570 2002-09-17  Tom Tromey  <tromey@redhat.com>
2571
2572         * lex.c (java_read_unicode_collapsing_terminators): Handle case
2573         where \r appears at EOF.  Fixes PR java/7950.
2574
2575 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2576
2577         * jvspec.c (lang_specific_driver): Remove unused variable.
2578
2579 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2580
2581         * java-tree.h (union lang_tree_node): Add chain_next option.
2582
2583 2002-09-16  Richard Henderson  <rth@redhat.com>
2584
2585         * jcf-parse.c (get_constant): Runtime check for IEEE format;
2586         use new real.h interface.
2587         * jcf-write.c (find_constant_index): Use new real.h interface.
2588         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2589
2590 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2591
2592         * lang.c: Follow spelling conventions.
2593
2594 2002-09-11  Per Bothner  <per@bothner.com>
2595
2596         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
2597         constant to the type of the field.
2598         (java_complete_tree):  Remove now-redundant code.
2599
2600         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
2601
2602 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
2603
2604         For PR java/5794:
2605         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2606         return label if a ret instruction for the jsr has been reached.
2607
2608 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
2609
2610         * parse.y (DIR_SEPARATOR): Don't define.
2611         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2612
2613 2002-08-28  Andrew Haley  <aph@redhat.com>
2614
2615         * verify.c (verify_jvm_instructions): Allow exception handler
2616         inside code that is being protected, but generate a warning.
2617         * except.c (link_handler): Initialize `expanded' in new eh_range.
2618         (binding_depth, is_class_level, current_pc): Declare extern.
2619
2620 2002-09-01  Mark Wielaard <mark@klomp.org>
2621
2622         * gcj.texi: Add chapter about system properties.
2623         Fixed some typos.
2624
2625 2002-08-26  Tom Tromey  <tromey@redhat.com>
2626
2627         * parse.y (try_builtin_assignconv): Allow narrowing primitive
2628         conversion if RHS_TYPE is byte, short, or char.
2629
2630 2002-08-22  Tom Tromey  <tromey@redhat.com>
2631
2632         * gcj.texi (Invoking gij): Document -cp and -classpath.
2633
2634 2002-08-21  Tom Tromey  <tromey@redhat.com>
2635
2636         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2637         $(prefix)/share.  For PR libgcj/7633.
2638
2639         For PR java/6005 and PR java/7611:
2640         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2641         (java_can_use_bit_fields_p): New function.
2642
2643 2002-08-16  Tom Tromey  <tromey@redhat.com>
2644
2645         * gcj.texi (Class Initialization): Mention class initialization of
2646         arrays.
2647
2648 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
2649
2650         * Make-lang.in (java-tree-inline.o): New.
2651         (JAVA_OBJS): Add java-tree-inline.o.
2652         * parse.y (source_end_java_method): Call java_optimize_inline.
2653         (java_expand_method_bodies): Save method's tree in
2654         DECL_SAVED_TREE.
2655         (add_stmt_to_compound): Keep track of the number of statments.
2656         * lang.c (java_init): Enable flag_inline_trees.
2657         (java_post_options): If flag_inline_functions is on, enable
2658         flag_inline_trees instread.
2659         (decl_constant_value): New.
2660         (java_tree_inlining_walk_subtrees): New.
2661         * java-tree.h (DECL_NUM_STMTS): New macro.
2662         (java_optimize_inline): Declare.
2663         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2664         Handle a LABEL_EXPR.
2665         * decl.c (build_result_decl): If we already have a DECL_RESULT
2666         don't make another.
2667         (dump_function): New.
2668         (java_optimize_inline): New.
2669         (dump_function): New.
2670
2671 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
2672
2673         For PR java/7483:
2674         * parse.y (build_assertion): Invert return from
2675         desiredAssertionStatus.
2676
2677 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2678
2679         * jcf-write.c (get_access_flags): Return correct access flags for
2680         private and protected inner classes.
2681
2682 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2683
2684         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
2685
2686 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2687
2688         * mangle_name.c: Don't include obstack.h twice.
2689         * xref.c: Don't include obstack.h.
2690
2691 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2692
2693         * class.c: (permanent_obstack): Delete declaration.
2694         * constants.c: (permanent_obstack): Delete declaration.
2695         * except.c: (permanent_obstack): Delete declaration.
2696         * expr.c: (permanent_obstack): Delete declaration.
2697         * jcf-parse.c: (permanent_obstack): Delete declaration.
2698         (saveable_obstack): Delete declaration.
2699         * parse.h: (permanent_obstack): Delete declaration.
2700         * typeck.c: (permanent_obstack): Delete declaration.
2701
2702 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2703
2704         * gcj.texi (version-gcc): Increase to 3.3.
2705
2706 2002-07-22  Tom Tromey  <tromey@redhat.com>
2707
2708         * lex.c (java_lex): Check for `e' or `E' after 0.
2709
2710 2002-07-21  Richard Henderson  <rth@redhat.com>
2711
2712         * lang.c (java_unsafe_for_reeval): New.
2713         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2714
2715 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
2716
2717         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
2718         (jcf_path_init): Use GET_ENVIRONMENT.
2719
2720 2002-07-10  Roger Sayle  <roger@eyesopen.com>
2721             Zack Weinberg <zack@codesourcery.com>
2722
2723         * builtins.c (initialize_builtins): Remove defines that
2724         handled C/C++ specific junk hereby removed from builtins.def.
2725
2726 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
2727
2728         * lang.c (java_post_options): Update prototype.
2729
2730 2002-07-05  Roger Sayle  <roger@eyesopen.com>
2731
2732         * builtins.c (initialize_builtins): Ignore the additional
2733         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
2734         the builtins.def file.
2735
2736 2002-07-01  Tom Tromey  <tromey@redhat.com>
2737
2738         For PR libgcj/7073:
2739         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2740         specially.
2741
2742 2002-07-01  Roger Sayle  <roger@eyesopen.com>
2743
2744         * java/decl.c (builtin_function): Accept additional parameter.
2745         (java_init_decl_processing): Pass an additional NULL_TREE
2746         argument to builtin_function.
2747
2748 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
2749
2750         * gcj.texi: Fixed gcj invocation example so that it compiles.
2751
2752 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2753
2754         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
2755         * parse.y (mark_parser_ctxt): Likewise.
2756         (check_modifiers, declare_local_variables): Avoid incorrect
2757         hardcoded constant 10.
2758
2759         * lex.c (java_read_char): Avoid "comparison is always true"
2760         warning.
2761
2762 2002-06-25  Andreas Schwab  <schwab@suse.de>
2763
2764         * expr.c (JSR): Avoid undefined operation on PC.
2765
2766 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2767
2768         * decl.c (clear_binding_level): Const-ify.
2769
2770 2002-06-13  Akim Demaille  <akim@epita.fr>
2771
2772         * parse.y (class_declaration, interface_declaration): Make sure
2773         all their rules have an action, in order to avoid meaningless `$$
2774         = $1' and their type clashes.
2775
2776 2002-06-11  Tom Tromey  <tromey@redhat.com>
2777
2778         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
2779         * parse-scan.y (statement_without_trailing_substatement): Added
2780         assert_statement.
2781         (assert_statement): New rule.
2782         * java-tree.h (struct lang_type) [assertions]: New field.
2783         (TYPE_USES_ASSERTIONS): New macro.
2784         (CLASS_USES_ASSERTIONS): Likewise.
2785         (FIELD_SYNTHETIC): New define.
2786         * lex.c (java_lval;): Added ASSERT_TK.
2787         * parse.y (ASSERT_TK): Added.
2788         (statement_without_trailing_substatement): Added assert_statement.
2789         (assert_statement): New rule.
2790         (build_assertion): New function.
2791         (maybe_generate_pre_expand_clinit): Create and initialize
2792         $assertionsDisabled.
2793         (lookup_package_type): Removed decl.
2794         * keyword.h: Rebuilt.
2795         * keyword.gperf (assert): New token.
2796
2797 2002-06-10  Akim Demaille  <akim@epita.fr>
2798
2799         * parse.y (interface_type_list, class_member_declaration)
2800         (unary_expression_not_plus_minus): Remove duplicate %type.
2801         Whitespace changes.
2802
2803 2002-06-09  Tom Tromey  <tromey@redhat.com>
2804
2805         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
2806
2807         * parse.y (method_header): Give error message in all cases.
2808         Fixes PR java/6865.
2809
2810 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2811
2812         Don't use RTL inlining. Fix for PR java/6820.
2813         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
2814         (flag_really_inline): New.
2815         (java_decode_option): Set flag_really_inline if -finline-functions
2816         is seen.
2817         (java_post_options): New function. Turn off inlining unless
2818         flag_really_inline is set.
2819
2820 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2821
2822         * gjavah.c (throwable_p): Accept argument as either a classname or
2823         signature fragment. Create null-terminated classname string for super
2824         when calling itself recursively.
2825         (decode_signature_piece): Skip first character from class name
2826         signature when calling throwable_p.
2827
2828 2002-06-08  H.J. Lu  (hjl@gnu.org)
2829
2830         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2831
2832 2002-06-04  Tom Tromey  <tromey@redhat.com>
2833
2834         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
2835
2836 2002-06-04  Michael Koch  <konqueror@gmx.de>
2837
2838         * gcj.texi (Input Options): Fixed typo.
2839
2840 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
2841
2842         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
2843         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
2844         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
2845         and all now-pointless local variables.  Rename other local
2846         variables to reflect their not being handles.
2847
2848         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
2849         #if JCF_USE_STDIO blocks.
2850
2851         * parse.y: Add missing semicolon at end of rule.
2852
2853 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2854
2855         * check-init.c (attach_initialized_static_class): Delete, unused.
2856         * parse.y: Use htab_t instead of struct hashtable, update
2857         all uses.
2858         * java-tree.h: Include hashtab.h instead of hash.h.
2859         (struct lang_decl_func): Use htab_t, set up for gengtype.
2860         (struct init_test_hash_entry): Delete.
2861         (struct treetreehash_entry): New.
2862         (java_treetreehash_find): New
2863         (java_treetreehash_new): New prototype.
2864         (java_treetreehash_create): New prototype.
2865         (java_mark_tree): Delete prototype.
2866         (java_hash_hash_tree_node): Delete prototype.
2867         (java_hash_compare_tree_node): Delete prototype.
2868         (attach_initialized_static_class): Delete prototype.
2869         * expr.c (build_class_init): Update to use java_treetreehash
2870         functions.
2871         (java_expand_expr): Update to use htab_t.
2872         (emit_init_test_initialization): Likewise.
2873         * decl.c (java_mark_tree): Delete.
2874         * class.c (init_test_hash_newfunc): Delete.
2875         (java_hash_hash_tree_node): Delete.
2876         (java_hash_compare_tree_node): Delete.
2877         (add_method_1): Update to use java_treetreehash functions.
2878         (JAVA_TREEHASHHASH_H): New macro.
2879         (java_treetreehash_hash): New function.
2880         (java_treetreehash_compare): New function.
2881         (java_treetreehash_find): New function.
2882         (java_treetreehash_new): New function.
2883         (java_treetreehash_create): New function.
2884         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
2885
2886         * Make-lang.in (java/parse.o): Depend on debug.h.
2887         * java-tree.h (struct lang_identifier): Use gengtype.
2888         (union lang_tree_node): New.
2889         (struct lang_decl_func): Use gengtype.
2890         (struct lang_decl_var): Likewise.
2891         (struct lang_decl): Likewise.
2892         * parse.y: Include debug.h.
2893         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
2894
2895         * lang.c (struct language_function): New dummy structure.
2896
2897         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
2898         descriminator for DECL_LANG_SPECIFIC.
2899         (struct lang_decl_func): Rename from struct lang_decl.
2900         (enum lang_decl_desc): New.
2901         (struct lang_decl): Make it a union.  Update all the accessor macros.
2902         (struct lang_type): Use gengtype.
2903         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
2904         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
2905         are now the same size.
2906         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
2907         use discriminator to mark DECL_LANG_SPECIFIC.
2908
2909         * Make-lang.in (gt-java-builtins.h): New rule.
2910         (java/builtins.o): Add dependency on gt-<filename>.h.
2911         * builtins.c: Use gengtype for roots.
2912         (union string_or_tree): Use gengtype.
2913         (struct builtin_record): Use gengtype.
2914         * config-lang.in (gtfiles): Add builtins.c.
2915
2916         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
2917         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
2918         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
2919         gt-java-parse.h, gtype-java.h): Add rules to generate.
2920         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
2921         (class.o): Add dependency on gt-*.h.
2922         (constants.o): Likewise.
2923         (decl.o): Likewise.
2924         (expr.o): Likewise.
2925         (jcf-parse.o): Likewise.
2926         (jcf-write.o): Likewise.
2927         (lang.o): Likewise.
2928         * config-lang.in (gtfiles): New.
2929         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2930         * constants.c: Replace uses of ggc_add_* with GTY markers.
2931         Include gt-*.h.
2932         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2933         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2934         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
2935         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
2936         Include gt-*.h.
2937         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
2938         Include gt-*.h.
2939         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2940         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
2941         gt-*.h.
2942         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2943         Include gtype-java.h.
2944
2945 2002-06-02  Tom Tromey  <tromey@redhat.com>
2946
2947         Fix for PR java/5913:
2948         * parse.y (patch_binop): Call patch_string on op1.
2949
2950 2002-06-02  Tom Tromey  <tromey@redhat.com>
2951
2952         Fix for PR java/1343, PR java/6336:
2953         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
2954         formatting.  Changed return type.
2955         (anonymous_class_counter): Moved to top of file.
2956         (maybe_make_nested_class_name): Append number to class name for
2957         function-local classes.
2958
2959 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2960
2961         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
2962         * Make-lang.in: Update dependency lists.
2963
2964 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
2965
2966         * gjavah.c (throwable_p): Do not free the name of the class after
2967         passing it to find_class.
2968         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
2969         * jcf-io.c (dirent.h): Include it.
2970         (fnmatch.h): Likewise.
2971         (compare_path): New function.
2972         (java_or_class_file): Likewise.
2973         (memoized_dirlist_entry): New type.
2974         (memoized_dirlist_lookup_eq): New function.
2975         (memoized_dirlists): New variable.
2976         (caching_stat): New function.
2977         (memoized_class_lookup_eq): New function.
2978         (memoized_class_lookups): Likewise.
2979         (find_class): Use memoized_class_lookups and caching_stat.
2980         * jcf.h (JCF_USE_SCANDIR): Define.
2981         * parse.y (java_expand_classes): Write the class files in reverse
2982         order.
2983
2984 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2985
2986         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2987
2988 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
2989
2990         * jcf-write.c (write_classfile): Unlink the temporary file if it
2991         cannot be renamed.  Use concat to build up the name of the
2992         temporary file.
2993
2994 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
2995
2996         * jcf-write.c (write_classfile): Write the file to a
2997         temporary file and then rename it.
2998
2999 2002-05-07  Tom Tromey  <tromey@redhat.com>
3000
3001         * gjavah.c (throwable_p): Use xstrdup, not strdup.
3002
3003         Fix for PR java/1200:
3004         * gjavah.c (throwable_p): New function.
3005         (decode_signature_piece): Use it.  A `WeakReference' isn't the
3006         same as a `jweak'.
3007         Include hashtab.h.
3008         (gcjh_streq): New function.
3009
3010 2002-05-07  Andreas Jaeger  <aj@suse.de>
3011
3012         * parse.y (finish_for_loop): Fix if statement.
3013
3014 2002-05-06  Tom Tromey  <tromey@redhat.com>
3015
3016         Fix for PR java/5941:
3017         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3018         loop update expression.
3019         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3020         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3021
3022 2002-05-04  Mark Wielaard  <mark@klomp.org>
3023
3024         For PR java/6519:
3025         * parse.y (build_string_concatenation): Return just op1 only when op2
3026         is null and op1 is a STRING_CST, otherwise always construct a
3027         StringBuffer.
3028
3029 2002-04-27  Tom Tromey  <tromey@redhat.com>
3030
3031         For PR java/6382:
3032         * parse.y (string_convert_int_cst): New function.
3033         (merge_string_cste): Use it.
3034
3035 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3036
3037         * java-tree.h (java_parse_file): Update.
3038         (java_set_yydebug): Remove.
3039         * jcf-parse.c (yydebug): Remove.
3040         (java_set_yydebug): Die.
3041         (java_parse_file): Update.
3042         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3043
3044 2002-04-24  Tom Tromey  <tromey@redhat.com>
3045
3046         For PR java/6425:
3047         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3048         EXPR_WFL_QUALIFICATION of qual_wfl.
3049
3050 2002-04-23  Per Bothner  <per@bothner.com>
3051
3052         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
3053         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
3054         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
3055
3056 2002-04-23  Tom Tromey  <tromey@redhat.com>
3057
3058         For PR java/6314:
3059         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
3060         recognize `-fcompile-resource='.
3061         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
3062         a bit.
3063
3064 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3065
3066         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3067         paths. Fixes PR java/2791.
3068
3069 2002-04-19  Andrew Haley  <aph@redhat.com>
3070
3071         * jcf-write.c (push_long_const): lo, hi: New variables.
3072         Use rshift_double to extract the high part of a 64-bit long.
3073         Use WORD_TO_INT to extract the low part.
3074
3075         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3076         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
3077         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3078
3079 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3080
3081         * typeck.c (incomplete_type_error): Remove.
3082
3083 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3084
3085         * class.c (make_class_data): Set DECL_ALIGN on static class data,
3086         for hash synchronization.
3087         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3088         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3089         class_type_node.
3090
3091 2002-04-16  Mark Wielaard  <mark@klomp.org>
3092
3093         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3094         negative zero.
3095
3096 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3097
3098         Fix for PR java/6294:
3099         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3100         interfaces.
3101
3102 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3103
3104         Fix for PR java/6085:
3105         * parse.y (patch_method_invocation): Always use build_access_to_thisn
3106         to get enclosing "this" argument for inner-class constructor
3107         invocation. Pass correct arguments to build_access_to_thisn.
3108
3109 2002-04-10  Andreas Jaeger  <aj@suse.de>
3110
3111         * gcj.texi (Input Options): Fix extdirs patch.
3112
3113 2002-04-10  Anthony Green  <green@redhat.com>
3114
3115         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3116
3117 2002-04-09  Anthony Green  <green@redhat.com>
3118
3119         * gcj.texi (Input Options): Add --extdirs documentation.
3120         * jcf-dump.c (OPT_extdirs): New macro.
3121         (options): Add extdirs option.
3122         (help): Describe --extdirs.
3123         (main): Handle OPT_extdirs.
3124         * gjavah.c (OPT_extdirs): New macro.
3125         (options): Add extdirs option.
3126         (help): Describe --extdirs.
3127         (main): Handle OPT_extdirs.
3128         * jcf-path.c (jcf_path_init): Add extdirs support.
3129         (jcf_path_extdirs_arg): New function.
3130         (extensions): New variable to hold extensions path entries.
3131         * jvspec.c: Remove -fextdirs= when compiling main().
3132         * lang.c (java_decode_option): Handle -fextdirs=.
3133         * jcf.h (jcf_path_extdirs_arg): Declare new function.
3134         * Make-lang.in: Compile jcf-path with version info for use in
3135         identifying the appropriate libgcj.jar.
3136
3137 2002-04-08  Tom Tromey  <tromey@redhat.com>
3138
3139         For PR libgcj/5303:
3140         * .cvsignore: Added rmic.1 and rmiregistry.1.
3141         * gcj.texi (Top): Link to new nodes.
3142         (Invoking rmic): New node.
3143         (Invoking rmiregistry): Likewise.
3144         * Make-lang.in (java.generated-manpages): Added rmic.1 and
3145         rmiregistry.1.
3146         (java.maintainer-clean): Likewise.
3147         ($(srcdir)/java/rmic.1): New target.
3148         ($(srcdir)/java/rmiregistry.1): Likewise.
3149         (java.install-man): Handle rmic.1 and rmiregistry.1.
3150
3151 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3152
3153         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3154         Add note about handling uncaught exceptions. Add an exception handler
3155         to example.
3156
3157 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3158
3159         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3160         after using it to patch CALL_EXPR.
3161
3162 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3163
3164         * gcj.texi (Invocation): Document CNI invocation API.
3165
3166 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3167
3168         * expr.c (truthvalue_conversion): Rename.  Update.
3169         (expand_compare): Update.
3170         * java-tree.h (java_truthvalue_conversion): New.
3171         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3172
3173 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3174
3175         * java-tree.h (java_mark_addressable): New.
3176         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3177         * typeck.c (mark_addressable): Rename, update.
3178
3179 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3180
3181         * expr.c (build_java_binop): Update.
3182         * java-tree.h (java_signed_type, java_unsigned_type,
3183         java_signed_or_unsigned_type): Update.
3184         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3185         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3186         * parse.y (patch_binop): Update.
3187         * typeck.c (signed_or_unsigned_type, unsigned_type,
3188         signed_type): Update.
3189
3190 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3191
3192         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3193         (java_dummy_print): Remove.
3194         (lang_print_error): Rename.  Exit early if inhibiting output.
3195         (inhibit_error_printing_function): New.
3196         (java_init): Don't set hook.
3197         (lang_init_source): Use new boolean.
3198
3199 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3200
3201         * parse.y (do_resolve_class): Fix infinite recursion.
3202
3203 2002-03-29  Tom Tromey  <tromey@redhat.com>
3204
3205         * parse.y (check_inner_circular_reference): Ignore incomplete
3206         types.
3207
3208 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3209
3210         * Make-lang.in (builtins.o): Update.
3211         * boehm.c (get_boehm_type_descriptor): Update.
3212         * builtins.c: Include langhooks.h.
3213         * decl.c (java_init_decl_processing): Update.
3214         * java-tree.h (java_type_for_mode, java_type_for_size): New.
3215         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3216         Redefine.
3217         * typeck.c (type_for_mode, type_for_size): Update.
3218
3219 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3220
3221         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3222
3223 2002-03-28  Tom Tromey  <tromey@redhat.com>
3224
3225         * except.c (expand_end_java_handler): If the handler type is NULL,
3226         use java.lang.Throwable.  Fixes PR java/5986.
3227
3228 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3229
3230         Fix for PR java/4715:
3231         * jcf-parse.c (parse_source_file_3): New function.
3232         (read_class): Call it.
3233         (java_parse_file): Likewise.
3234
3235 2002-03-28  Jan Hubicka  <jh@suse.cz>
3236
3237         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3238
3239 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3240
3241         * parse.y (resolve_package): Initialize "decl".
3242         (lookup_package_type): Remove unused function.
3243
3244 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3245
3246         Fix for PR java/5993:
3247         * parse.y (resolve_package): Return the decl if resolution was
3248         successful. Don't special case "java.lang" and "java.lang.reflect"
3249         packages. Set type_name to the merged identifier.
3250         (resolved_qualified_expression_name): Print error using "name" if
3251         resolve_package returns NULL_TREE.
3252
3253 2002-03-27  Tom Tromey  <tromey@redhat.com>
3254
3255         * expr.c (expand_invoke): Don't generate null pointer check if
3256         we're calling <init>.
3257
3258 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3259
3260         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3261         fix prototype.
3262         * java-tree.h (java_lang_expand_expr): Similarly.
3263         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3264         (java_init): Don't set hook.
3265
3266 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3267
3268         Fix for PR java/5850:
3269         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3270         context if field was not found in the current scope.
3271         * expr.c (lookup_field): Don't look in enclosing contexts.
3272
3273 2002-03-26  Tom Tromey  <tromey@redhat.com>
3274
3275         Fix for PR java/5942:
3276         * parse.y (init_src_parse): Added sanity check.
3277         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3278         elements, not 11.
3279
3280 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3281
3282         * decl.c (lang_mark_tree): Rename java_mark_tree.
3283         * java-tree.h (java_mark_tree): New.
3284         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3285
3286 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
3287
3288         * lex.c: Change java_perform_atof to take normal parameters
3289         instead of a pointer to a parameter block.  Call it directly
3290         from java_lex.
3291
3292 2002-03-22  Mark Wielaard  <mark@klomp.org>
3293
3294         Fix for PR java/5368:
3295         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3296         when printing error message.
3297
3298 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3299
3300         * decl.c (maybe_build_cleanup): Remove.
3301
3302 2002-03-22  Tom Tromey  <tromey@redhat.com>
3303
3304         Andrew Haley  <aph@cambridge.redhat.com>
3305
3306         * expr.c (build_field_ref): Don't build a check if the field is a
3307         member of `this'.
3308
3309 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
3310
3311         Fix for PR java/6026:
3312         * lex.c (java_lex): Fix parsing of consecutive floats.
3313
3314 2002-03-21  Tom Tromey  <tromey@redhat.com>
3315
3316         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3317         class.
3318
3319 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3320
3321         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3322         insert_block, getdecls, kept_level_p, global_bindings_p): New.
3323
3324 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3325
3326         * gcj.texi: @code{gcj} becomes @command{gcj}.
3327         @code{gcc} becomes @command{gcc}.
3328         GcjRaw changed to gnu.gcc.RawData.
3329
3330 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3331
3332         * decl.c (start_java_method): Use new hook.
3333         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3334         (java_init): Remove old hook.
3335
3336 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3337
3338         * builtins.c (define_builtin): Do nothing if `type' is null.
3339         Fixes PR java/5876.
3340
3341 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3342
3343         * parse.y (parser_check_super_interface): Fix error message
3344         grammar/order.
3345
3346 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3347
3348         * jcf-parse.c (get_constant): Delete unused variables.
3349
3350 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3351
3352         * java-tree.h (java_parse_file): New.
3353         * jcf-parse.c (yyparse): Rename java_parse_file.
3354         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3355
3356 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3357
3358         * parse.y (craft_constructor): Return the constructor decl.
3359         (java_expand_classes): Update comments.
3360         (lookup_method_invoke): Call fix_constructors immediately for
3361         anonymous class. Fixes PR java/5935.
3362
3363 2002-03-15  Anthony Green  <green@redhat.com>
3364
3365         * jcf-parse.c (yyparse): Don't emit class registration
3366         constructor when compiling resource files.
3367
3368 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3369
3370         * lang.c (java_tree_code_type, java_tree_code_length,
3371         tree_code_name): Delete.
3372         (tree_code_type, tree_code_length, tree_code_name): Define.
3373         (java_init): Don't try to copy into the various tree_code
3374         arrays.
3375
3376 2002-03-12  Tom Tromey  <tromey@redhat.com>
3377
3378         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3379         UTF-8, not UCS-2.  Fixes PR java/5923.
3380
3381         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3382         a call_expr wrapped in a convert.  Fixes PR java/5848.
3383
3384 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3385
3386         * jcf-write.c (write_classfile): Improve error strings.
3387
3388 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3389
3390         * lex.c: Adjust comments to GNU standards.
3391
3392 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3393
3394         Fix for PR java/5902:
3395         * lex.c (java_lex): Fix parsing of literals.
3396
3397 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3398
3399         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3400         to prevent it getting evaluated twice in the store checking case.
3401         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3402         examining OBJECT.
3403
3404 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3405
3406         * decl.c (java_init_decl_processing): Make sure class_type_node
3407         alignment is not less than 64 bits if hash synchronization is enabled.
3408
3409 2002-03-08  Per Bothner  <per@bothner.com>
3410
3411         * parse.y (java_complete_lhs):  Check if patch_assignment
3412         returned an error-mark.
3413
3414         * parse.y (try_builtin_assignconv):  Don't special-case zero.
3415
3416 2002-03-08  Per Bothner  <per@bothner.com>
3417
3418         Fix for PR java/5812.
3419         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
3420         here instead of in JSR macro.  Likewise with load_type_state call.
3421         Do the latter on if the return_pc has been verified (the jsr returns).
3422         (JSR):  Now just call build_java_jsr.
3423
3424 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
3425
3426         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3427         (java.install-common): Link native driver to
3428         JAVA_TARGET_INSTALL_NAME.
3429
3430 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
3431
3432         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3433         * builtins.c(sin_builtin): Likewise
3434         * builtins.c(sqrt_builtin): Likewise
3435
3436 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
3437
3438         * java/expr.c, java/jcf-parse.c, java/lex.c:
3439         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3440         REAL_ARITHMETIC blocks unconditional.  Delete some further
3441         #ifdef blocks predicated on REAL_ARITHMETIC.
3442
3443 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3444
3445         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3446         explicit sizeof/sizeof.
3447         * decl.c (java_init_decl_processing): Likewise.
3448         * jcf-parse.c (init_jcf_parse): Likewise.
3449         * parse.y (init_src_parse): Likewise.
3450
3451 2002-03-02  Per Bothner  <per@bothner.com>
3452
3453         Make --CLASSPATH by a synonym for --classpath and -classpath.
3454         Implement --bootclasspath.
3455         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
3456         (classpath_l):  Remove.
3457         (jcf_path_CLASSPATH_arg):  Remove.
3458         (jcf_path_bootclasspath_arg):  New function.
3459         (jcf_path_seal):  Simplify accordingly.
3460
3461         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
3462         (jcf_path_CLASSPATH):  Remove declaration.
3463         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
3464         (lang_specific_driver):  Translate -bootclasspath.
3465         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
3466         * lang.c (decode_lang_options):  Do jcf_path_init first.
3467         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
3468         * gjavah.c:  Also handle --bootclasspath.
3469         Handle --CLASSPATH as a synonum for --classpath.
3470         * jcf-dump.c: Likewise.
3471
3472         "." is not part of system path, but is the default for --classpath.
3473         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
3474         (jcf_path_seal):  Add "." if no CLASSPATH specified.
3475
3476         * gcj.texi:  Document changes.
3477
3478 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3479
3480         * expr.c (build_java_arraystore_check): Fix formatting.
3481
3482 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3483
3484         Fix for PR java/5758, java/5632:
3485         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3486         inner-class separator too.
3487         * parse.y (do_resolve_class): New local `decl_result.'
3488         Progressively build a name for what can have been loaded.
3489
3490 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3491
3492         * expr.c (java_array_data_offset): Removed function.
3493         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3494         (build_java_array_length_access): Obtain "length" value using a
3495         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3496         (build_java_arrayaccess): Correct comment. Access "data" using a
3497         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3498         (build_java_arraystore_check): New function.
3499         (expand_java_arraystore): Use build_java_arraystore_check.
3500         * parse.y (patch_assignment): Simplify code to insert a store check
3501         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3502         * check-init.c (check_init): Update to reflect that an array length
3503         access is now a COMPONENT_REF.
3504         * gcj.texi (Code Generation): Improve documentation of
3505         -fno-bounds-check. Add documentation for -fno-store-check.
3506         * java-tree.h (flag_store_check): Declare.
3507         (build_java_arraystore_check): Declare.
3508         * lang.c (flag_store_check): Initialize to 1.
3509         (lang_f_options): Add store-check option.
3510         * jvspec.c: Don't pass store-check option to jvgenmain.
3511         * lang-options.h: Add help string for -fno-store-check.
3512
3513 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3514
3515         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3516         * java-tree.h (java_dup_lang_specific_decl): New.
3517         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3518
3519 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3520
3521         * builtins.c, decl.c: Delete traditional-mode-related code
3522         copied from the C front end but not used, or used only to
3523         permit the compiler to link.
3524
3525 2002-02-22  Tom Tromey  <tromey@redhat.com>
3526
3527         Fix for PR java/2369:
3528         * jvspec.c (verify_class_name): New function.
3529         (lang_specific_driver): Call it.
3530         (JAVA_START_CHAR_P): New macro.
3531         (JAVA_PART_CHAR_P): Likewise.
3532
3533 2002-02-22  Per Bothner  <per@bothner.com>
3534
3535         * class.c:  Change vtable to be more compatible with g++ v3 abi.
3536         (get_dispatch_table):  Prepend offset-to-top (always 0) and
3537         type_info pointer (currently unimplemented hence NULL) to vtable.
3538         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3539         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
3540         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3541         (build_dtable_decl):  Add declarations for new fields.
3542
3543 2002-02-20  Per Bothner  <per@bothner.com>
3544
3545         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3546         to finit$ (otherwise generate_bytecode_insns drops it). However, we
3547         don't need to set it on the COMPOUND_EXPR - the caller does that.
3548
3549 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3550
3551         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3552         `--CLASSPATH' becomes `--classpath.'
3553         * gjavah.c: Likewise.
3554         * jcf-dump.c: Likewise.
3555         * lang-options.h: Likewise.
3556         * lang.c: Likewise.
3557         * jcf-path.c: Updated comment.
3558         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3559         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3560         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3561         (jcf_path_CLASSPATH_arg): Ditto.
3562         (classpath_u): Updated leading comment.
3563
3564 2002-02-20  Per Bothner  <per@bothner.com>
3565
3566         * builtins.c (check_for_builtin):  New function.
3567         (build_call_or_builtin):  Remove.
3568         * java-tree.h:  Update accordingly.
3569         * expr.c (expand_invoke):  Use build + check_for_builtin instead
3570         of build_call_or_builtin.
3571         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
3572         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3573         flag (which had caused jcf-write to incorrectly emit invokevirtual).
3574
3575 2002-02-17  Tom Tromey  <tromey@redhat.com>
3576
3577         * java-tree.h (TYPE_STRICTFP): New macro.
3578         (struct lang_type) [strictfp]: New field.
3579         (CLASS_STRICTFP): New macro.
3580         (METHOD_STRICTFP): New macro.
3581         (struct lang_decl) [strictfp]: New field.
3582         * parse.y (method_header): Disallow strictfp constructor or
3583         abstract method.
3584         (STRICT_TK): Move before MODIFIER_TK.
3585         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3586         (METHOD_MODIFIERS): Likewise.
3587         (INTERFACE_MODIFIERS): Likewise.
3588         * jcf-write.c (get_access_flags): Likewise.
3589         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3590         (add_method_1): Likewise.
3591         (get_access_flags_from_decl): Likewise.
3592         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
3593         recognize strictfp flag.
3594         * jcf.h (ACC_STRICT): New define.
3595
3596 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
3597
3598         * class.c(build_utf8_ref): Move declaration of decl_size
3599
3600 2002-02-07  Tom Tromey  <tromey@redhat.com>
3601
3602         * gcj.texi (Input Options): --CLASSPATH does not suppress system
3603         path.
3604
3605 2002-02-04  Anthony Green  <green@redhat.com>
3606
3607         * class.c (build_utf8_ref): Put UTF-8 constants into merged
3608         sections if available.
3609
3610 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3611
3612         * parse.y (java_expand_classes): Fix typo in static field loop.
3613
3614 2002-02-02  Richard Henderson  <rth@redhat.com>
3615
3616         * class.c (add_field): Mark static fields external.
3617         (build_class_ref): Remove redundant set.
3618         * parse.y (java_expand_classes): Mark static fields of classes
3619         to be compiled as local.
3620         * jcf-parse.c (parse_class_file): Likewise.
3621
3622 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3623
3624         * gcj.texi (About CNI): New node.
3625
3626 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3627
3628         PR java/5080
3629         * jcf-parse.c : Check for HAVE_LOCALE_H before using
3630         setlocale() with LC_CTYPE as a parameter.
3631         * jv-scan.c: Same.
3632
3633 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
3634
3635         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3636         Follow GNU Coding Standards for --version.
3637
3638 2002-01-28  Tom Tromey  <tromey@redhat.com>
3639
3640         * expr.c (build_jni_stub): Ensure storage for `meth' is
3641         generated.
3642         * parse.y (java_complete_expand_methods): Set
3643         current_function_decl before building JNI stub.
3644
3645 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3646
3647         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3648         BUILT_IN_SQRTF.
3649
3650 2002-01-22  Tom Tromey  <tromey@redhat.com>
3651
3652         * decl.c (java_init_decl_processing): Use add_predefined_file.
3653         Predefine RawData.java.
3654         (predef_filenames): Removed.
3655         (java_init_decl_processing): Don't register predef_filenames.
3656         * jcf-parse.c (add_predefined_file): New function.
3657         (predefined_filename_p): Rewrote.
3658         (predefined_filename_p): No longer static.
3659         * decl.c (java_init_decl_processing): Call initialize_builtins.
3660         * Make-lang.in (JAVA_OBJS): Added builtins.o.
3661         (java/builtins.o): New target.
3662         * builtins.c: New file.
3663         * parse.y (patch_invoke): Use build_call_or_builtin.
3664         * java-tree.h (build_call_or_builtin): Declare.
3665         (initialize_builtins): Declare.
3666         (java_set_exception_lang_code): Removed unused declaration.
3667         (PREDEF_FILENAMES_SIZE): Removed.
3668         (java_tree_index): Added JTI_PREDEF_FILENAMES.
3669         (predef_filenames): New define.
3670         (add_predefined_file): Declare.
3671         (predefined_filename_p): Declare.
3672         * expr.c (expand_invoke): Use build_call_or_builtin.
3673
3674 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3675
3676         * parse.y (patch_switch_statement): Fix format specifier.
3677
3678 2002-01-16  Tom Tromey  <tromey@redhat.com>
3679
3680         More for PR java/5365:
3681         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
3682         default.
3683         (process_file): Generate include for
3684         java.lang.UnsupportedOperationExceptions.
3685
3686 2002-01-15  Andreas Jaeger  <aj@suse.de>
3687
3688         * .cvsignore: Add man pages.
3689
3690 2002-01-15  Tom Tromey  <tromey@redhat.com>
3691
3692         Fix for PR java/5365:
3693         * gjavah.c (process_file): Turn class name into a file name.
3694
3695 2002-01-14  Matthias Klose  <doko@debian.org>
3696
3697         * gcj.texi: Fix whitespace and formatting errors in the
3698         synopsis of the man pages. Update copyright.
3699
3700 2002-01-14  Tom Tromey  <tromey@redhat.com>
3701
3702         For PR libgcj/5303:
3703         * Make-lang.in (java.install-man): Handle jv-convert man page.
3704         (java.generated-manpages): Added jv-convert.1.
3705         (java.uninstall): Remove jv-convert.1.
3706         (java.maintainer-clean): Likewise.
3707         ($(srcdir)/java/jv-convert.1): New target.
3708         * gcj.texi (Top): Link to jv-convert node.
3709         (Individual utilities): Likewise.
3710         (Invoking jv-convert): New node.
3711
3712 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
3713             Martin Kahlert  <martin.kahlert@infineon.com>
3714
3715         * jcf-parse.c (get_constant): Don't swap lo/hi for big
3716         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
3717
3718 2002-01-03  Graham Stott  <grahams@redhat.com>
3719
3720         * class.c (compile_resource_file): Update copyright date.
3721         Constify filename parameter.
3722         (java-tree.h): Update copyright date.
3723         (compile_resource_file): Constify filename parameter.
3724
3725 2002-01-03  Graham Stott  <grahams@redhat.com>
3726
3727         * gcc/jcf-parse.c: Update copyright date.
3728         (yyparse): Constify resource_filename.
3729
3730 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3731
3732         * parse.y (src_parse_roots): Don't needlessly zero init.
3733
3734 2001-12-31  Tom Tromey  <tromey@redhat.com>
3735
3736         * parse.y (dump_java_tree): New function.
3737         (source_end_java_method): Call it.
3738         (end_class_declaration): Likewise.
3739         * lang.c (java_decode_option): Call dump_switch_p.
3740
3741 2001-12-28  Tom Tromey  <tromey@redhat.com>
3742
3743         * gen-table.pl: Don't process characters after \uffff.  Added
3744         comment pointing to input file.
3745
3746 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3747
3748         * gen-table.pl: Const-ify output.  Document the location of a
3749         suitable unicode input file.
3750
3751         * chartables.h: Regenerate.
3752
3753 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3754
3755         * chartables.h: Const-ify.
3756         * gjavah.c (options): Likewise.
3757         * jcf-dump.c (options): Likewise.
3758         * jv-scan.c (options): Likewise.
3759         * lex.c (java_start_char_p, java_part_char_p): Likewise.
3760         * parse.y (binop_lookup): Likewise.
3761
3762 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3763
3764         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
3765         the static arrays that are output.
3766         * jvspec.c (jvgenmain_spec): Make static.
3767         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
3768         * keyword.h: Regenerate.
3769         * lang.c (string_option, process_option_with_no, lang_f_options,
3770         lang_W_options): Const-ify.
3771         * lex.c (java_lex): Likewise.
3772
3773 2001-12-21  Richard Henderson  <rth@redhat.com>
3774
3775         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
3776         (get_boehm_type_descriptor): ... here.  Arrange for the
3777         TREE_TYPE to get set properly.
3778
3779 2001-12-21  Richard Henderson  <rth@redhat.com>
3780
3781         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
3782         only if the target requires collect2.
3783
3784         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
3785
3786 2001-12-20  Tom Tromey  <tromey@redhat.com>
3787
3788         For PR java/4509:
3789         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
3790         CAN_COMPLETE_NORMALLY for the node.
3791         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
3792         generate code for second branch if first branch can't complete
3793         normally.
3794         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
3795         the loop head if the loop body can't complete normally.
3796
3797 2001-12-20  Tom Tromey  <tromey@redhat.com>
3798
3799         For PR java/4766:
3800         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
3801         case where `finally' clause can't complete normally.
3802
3803 2001-12-20  Tom Tromey  <tromey@redhat.com>
3804
3805         Fixes PR java/5057:
3806         * parse.y (analyze_clinit_body): Added this_class parameter.
3807         Check for more cases where we must keep <clinit>.
3808         (maybe_yank_clinit): Cleaned up flow control.
3809
3810 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3811
3812         * decl.c (java_init_decl_processing): Don't initialize
3813         finit_leg_identifier_node.
3814         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
3815         (finit_leg_identifier_node): Remove.
3816         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
3817
3818 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3819
3820         * mangle.c (mangle_member_name): Don't special-case for
3821         NO_DOLLAR_IN_LABEL.
3822         * mangle_name.c (unicode_mangling_length): Likewise.
3823         (append_unicode_mangled_name): Likewise.
3824         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
3825         code.
3826
3827 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3828
3829         * expr.c (build_java_array_length_access): Don't force null pointer
3830         check unless flag_check_references is set.
3831
3832 2001-12-20  Tom Tromey  <tromey@redhat.com>
3833
3834         Fix for PR java/3417:
3835         * parse.y (patch_assignment): Added special processing for
3836         `return'.
3837         (patch_return): Don't convert booleans to integers, and don't
3838         special-case `null'.
3839
3840 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
3841
3842         * config-lang.in (diff_excludes): Remove.
3843
3844 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3845
3846         * gcj.texi: Update link to GCC manual.
3847
3848 2001-12-17  Tom Tromey  <tromey@redhat.com>
3849
3850         * parse.y (link_nested_class_to_enclosing): Removed useless
3851         statement.
3852
3853 2001-12-16  Tom Tromey  <tromey@redhat.com>
3854
3855         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
3856         Fixes PR java/5088.
3857
3858 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
3859
3860         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
3861         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
3862         spelling errors.
3863
3864 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3865
3866         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
3867
3868 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3869
3870         * decl.c (java_init_decl_processing): Build otable_type correctly.
3871         otable_decl is an otable_type.
3872
3873 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3874
3875         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
3876         otable_type, otable_ptr_type, method_symbol_type,
3877         method_symbols_array_type, method_symbols_array_ptr_type): New
3878         field/global tree definitions.
3879         (flag_indirect_dispatch): New flag.
3880         * decl.c (java_init_decl_processing): Initialize new otable and
3881         otable_syms type nodes and decls. Add new field "index" to
3882         method_type_node.
3883         * class.c (build_method_symbols_entry): New function.
3884         (make_method_value): Set "index" to to method's vtable index for
3885         virtual methods when indirect-dispatch is not used.
3886         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
3887         and set vtable_method_count to -1. Set otable and otable_syms field
3888         if indirect-dispatch is used and there was something to put in them.
3889         (build_method_symbols_entry): New function.
3890         (emit_offset_symbol_table): New function.
3891         * expr.c (get_offset_table_index): New function.
3892         (build_invokevirtual): Build array reference to otable at the index
3893         returned by get_offset_table_index, and use the result as the vtable
3894         offset.
3895         (build_invokeinterface): Similar.
3896         * jcf-parse.c (yyparse): If indirect-dispatch, call
3897         emit_offset_symbol_table at the end of compilation, after all classes
3898         have been generated.
3899         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
3900         * lang.c (flag_indirect_dispatch): Define.
3901         (lang_f_options): Add indirect-dispatch flag.
3902
3903 2001-12-14  Matthias Klose  <doko@debian.org>
3904
3905         * gcj.texi: Markup for man page generation. Document missing
3906         options printed by <tool> --help.
3907         Terminate description of gij's -ms option with a dot.
3908         * Make-lang.in ($(srcdir)/java/*.1): New targets.
3909         (java.generated-manpages java.install-man, java.uninstall,
3910         java-maintainer-clean) Updated.
3911
3912 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
3913
3914         * class.c (get_dispatch_table): Fix java vtable layout
3915         for TARGET_VTABLE_USES_DESCRIPTORS.
3916         * decl.c (java_init_decl_processing): Initialize
3917         alloc_no_finalizer_node, finalize_identifier_node.
3918         * expr.c (class_has_finalize_method): New function.
3919         (expand_java_NEW): Generate calls for finalizer-free allocation.
3920         (build_invokevirtual): Fix java vtable layout for
3921         TARGET_VTABLE_USES_DESCRIPTORS.
3922         * java-tree.h (enum java_tree_index): New entries:
3923         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
3924         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
3925         (class_has_finalize_method): declare.
3926         (HAS_FINALIZER_P): New macro.
3927         * parse.y (patch_invoke): Generate calls for finalizer-free
3928         allocation.
3929
3930 2001-12-12  Matthias Klose  <doko@debian.org>
3931
3932         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
3933         whitespace at end of line.
3934
3935 2001-12-11  Tom Tromey  <tromey@redhat.com>
3936
3937         * lex.c (java_init_lex): Define wfl_to_string as
3938         gnu.gcj.runtime.StringBuffer unless generating bytecode.
3939
3940 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
3941
3942         * class.c (make_method_value): Use null_pointer_node to
3943         represent empty exception table.
3944
3945 2001-12-10  Tom Tromey  <tromey@redhat.com>
3946
3947         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
3948
3949 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
3950
3951         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
3952
3953 2001-12-09  Per Bothner  <per@bothner.com>
3954
3955         * check-init.c (current_switch_has_default):  New static field.
3956         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
3957         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
3958         DEFAULT_EXPR seen, simulate a default alternative that copies state.
3959
3960 2001-12-09  Tom Tromey  <tromey@redhat.com>
3961
3962         * check-init.c (check_init): Don't allow pre- or post- increment
3963         or decrement of final variable.
3964         (final_assign_error): Minor error message rewording.
3965
3966 2001-12-08  Tom Tromey  <tromey@redhat.com>
3967
3968         * java-tree.h: Fixed typo.
3969
3970         * gjavah.c (decompile_method): Don't decompile to `return this'
3971         for static methods.
3972
3973         * gjavah.c (cxx_keywords): Re-sorted.
3974         * lex.c (cxx_keywords): Re-sorted.
3975
3976         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
3977         else.
3978
3979         * gjavah.c (print_namelet): Clear subnamelets.
3980         (HANDLE_METHOD): Set `method_printed' earlier.
3981
3982 2001-12-07  Tom Tromey  <tromey@redhat.com>
3983
3984         * lang.c (lang_f_options): Added
3985         optimize-static-class-initialization.
3986         (java_decode_option): Removed special case.
3987
3988 2001-12-07  Per Bothner  <per@bothner.com>
3989
3990         * check-init.c (check_init):  Fix typo freeing memory twice.
3991
3992 2001-12-05  Per Bothner  <per@bothner.com>
3993
3994         Restore support for static class initialization optimization.
3995         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
3996         * check-init.c (check_int):  At end of BLOCK handle initialization
3997         blocks, which used to be done in java_complete_expand_method but did
3998         not handle the case where check_for_initialization might allocate
3999         more than a word of bits.
4000         * decl.c (lang_make_tree):  The smic field is now a tree.
4001         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
4002         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
4003
4004         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
4005
4006         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4007         Change from a hash table to a list.
4008         (struct_lang_decl):  Change field 'smic' to match.
4009         * class.c (add_method_1):  Initialize
4010         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4011         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
4012         (java_expand_method_bodies): -here, since 'smic' is now a list.
4013         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
4014
4015         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
4016
4017         * class.c (java_hash_compare_tree_node):  Fix casts.
4018
4019 2001-12-04  Per Bothner  <per@bothner.com>
4020
4021         * check-init.c:   Handle definite unassignment to finals in addition
4022         to definite assignment.
4023         (loop_current_locals):  New field.
4024         (num_current_locals, int start_current_locals, num_current_words):
4025         Make static.
4026         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
4027         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4028         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
4029         (get_variable_decl, check_final_reassigned):  New functions.
4030         (check_init, check_bool_init):  Modify as needed for checking finals.
4031         (check_for_initialization):  Take extra parameter and return void.
4032         Do extra start-up logic to check final fields for assignment.
4033         * parse.y (check_static_final_variable_assignment_flag,
4034         reset_static_final_variable_assignment_flag, check_final_assignment,
4035         check_final_variable_local_assignment_flag,
4036         reset_final_variable_indirect_assignment_flag,
4037         reset_final_variable_global_assignment_flag):  Remove functions.
4038         (java_complete_expand_methods, outer_field_access_fix,
4039         patch_assignment): Remove no-longer used logic.
4040         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
4041         * parse.y (register_fields, java_complete_tree):  Update accordingly.
4042
4043         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
4044         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
4045         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
4046
4047         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
4048
4049         * java-tree.h (DECL FINAL):  New bit-field.
4050         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
4051         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
4052         (DECL_INIT_CALLS_THIS):  New macro.
4053         (struct lang_decl):  New bit-field init_calls_this.
4054         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4055         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4056         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
4057         use it for both local variables and final fields.
4058         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
4059         and local_final.
4060         (struct lang_type):  Remove hfv bit-field.
4061         (check_for_initialization):  Change to return void.
4062
4063         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
4064         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
4065         * check-init.c (final_assign_error):  New helper function.
4066         (check_final_reassigned, check_init):  Use it.
4067         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4068
4069         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
4070         bit-fields to unsigned.
4071
4072 2001-12-03  Per Bothner  <per@bothner.com>
4073
4074         * parse.y (patch_binop):  Minor constant folding.
4075
4076         * parse.y (build_current_thisn):  Shorter 'buffer'.
4077
4078 2001-12-03  Per Bothner  <per@bothner.com>
4079
4080         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
4081         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4082         * jcf-write.c (generate_bytecode_insns):  Remove support for
4083         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4084         * check-init.c (check_init):  Likewise.
4085
4086 2001-12-03  Per Bothner  <per@bothner.com>
4087
4088         * verify.c (subroutine_nesting):  New function.
4089         (verify_jvm_instructions):  Use it to fix logic for checking that
4090         we're done with the current subroutine.
4091
4092         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4093         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4094
4095 2001-12-03  Per Bothner  <per@bothner.com>
4096
4097         * jcf.h:  Fix obvious typo in comment.
4098         * typeck.c (build_null_signature):  Add comment.
4099
4100 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4101
4102         * expr.c: Remove leading capital from diagnostic messages, as
4103         per GNU coding standards.
4104         * jcf-io.c: Similarly.
4105         * jcf-parse.c: Similarly.
4106         * jv-scan.c: Similarly.
4107         * jvspec.c: Similarly.
4108         * mangle.c: Similarly.
4109
4110 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
4111             Alexandre Petit-Bianco  <apbianco@redhat.com>
4112
4113         * expr.c (build_java_arrayaccess): Call save_expr on array for
4114         correct evaluation order, modified comment, fixed indentation.
4115         * parse.y: (patch_assignment): Correctly extract the array base
4116         from the tree generate by build_java_arrayaccess, added comments.
4117         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4118         Fixes PR java/3096, PR java/3803, PR java/3965.
4119
4120 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4121
4122         * expr.c (expand_byte_code): Remove trailing periods from messages.
4123         * jcf-parse.c (load_class, jcf_parse): Similarly.
4124         * jcf-write.c (generate_classfile): Similarly.
4125         * lex.c (java_lex): Similarly.
4126
4127 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4128
4129         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4130
4131 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4132
4133         * Make-lang.in (java.generated-manpages): New dummy target.
4134
4135 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4136
4137         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4138         ASM_FINAL_SPEC.
4139         (lang_specific_pre_link): Use set_input to set input_filename.
4140         Append `main' here.
4141         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4142         (main): Fix definition.
4143         Strip `main' from classname.
4144         Fixes PR java/227.
4145
4146 2001-11-18  Roger Sayle <roger@eyesopen.com>
4147
4148         * parse.h (java_expand_switch): Remove old prototype.
4149
4150 2001-11-18  Tom Tromey  <tromey@redhat.com>
4151
4152         Fix for PR java/1401:
4153         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4154         arg0 is null.
4155         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4156         correctly.
4157
4158 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4159
4160         * lang.c (finish_parse): Rename to java_finish.
4161         (LANG_HOOKS_FINISH, java_finish): New.
4162
4163 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4164
4165         * decl.c (init_decl_processing): Rename java_init_decl_processing.
4166         * java-tree.h: New prototype.
4167         * lang.c (java_init): Update prototype.  Combine with old init_parse.
4168
4169 2001-11-13  Tom Tromey  <tromey@redhat.com>
4170
4171         * gjavah.c (method_signature): New global.
4172         (HANDLE_METHOD): Set it.
4173         (decompile_return_statement): New function.
4174         (decompile_method): Use it.
4175         (print_method_info): Removed `synth' argument.
4176
4177 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4178
4179         * java-tree.h (java_set_yydebug): New.
4180         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4181         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4182         (print_lang_decl, print_lang_type, print_lang_identifier,
4183         print_lang_statistics, lang_print_xnode): Remove.
4184
4185 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4186
4187         * jcf-parse.c (init_lex): Remove.
4188         * lang.c (language_string, lang_identify): Remove.
4189         (struct lang_hooks): Constify.
4190         (LANG_HOOKS_NAME): Override.
4191         (init_parse): Update.
4192
4193 2001-11-08  Andreas Franck  <afranck@gmx.de>
4194
4195         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4196         program_transform_name the way suggested by autoconf.
4197         (java.install-common): Also transform auxiliary program names with
4198         program_transform_name.
4199
4200 2001-11-08  Tom Tromey  <tromey@cygnus.com>
4201
4202         * parse.y (trap_overflow_corner_case): New rule.
4203         (unary_expression): Use it.
4204         * lex.c (java_init_lex): Don't set minus_seen.
4205         (yylex): Don't use minus_seen.  Communicate overflow to parser for
4206         it to handle.
4207         (error_if_numeric_overflow): New function.
4208         * parse.h (minus_seen): Removed field.
4209         (JAVA_RADIX10_FLAG): New define.
4210
4211 2001-11-07  Tom Tromey  <tromey@redhat.com>
4212
4213         Patch for PR java/1414:
4214         * parse.y (case_label_list): New global.
4215         (goal): Register case_label_list with GC.
4216         (java_complete_lhs): Save new case on case_label_list.
4217         (patch_switch_statement): Check for duplicate case labels.
4218
4219 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4220
4221         * parse.y (patch_assignment): Removed unused third argument.
4222         (java_complete_lhs): Removed unused third argument to patch_assignment.
4223
4224 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4225
4226         * lang.c: Include langhooks-def.h.
4227         * Make-lang.in: Update.
4228
4229 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
4230
4231         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4232
4233 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4234
4235         * mangle.c (find_compression_record_match): Don't match compression
4236         records for package name elements unless they occur at the start of
4237         the name. Fix for PR java/4717.
4238
4239 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4240
4241         * expr.c (expand_java_field_op): Don't special-case references to
4242         java.lang.PRIMTYPE.TYPE.
4243         (build_primtype_type_ref): Removed.
4244         * java-tree.h (build_primtype_type_ref): Remove prototype.
4245         * parse.y (maybe_build_primttype_type_ref): Removed.
4246         (complete_function_arguments): Don't special-case references to
4247         java.lang.PRIMTYPE.TYPE.
4248         (patch_assignment): Likewise.
4249         (array_constructor_check_entry): Likewise.
4250
4251 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4252
4253         * mangle.c (static tree compression_table): Fixed leading comment.
4254         * parse.h (struct parser_ctxt): Fixed field comment.
4255         * parse.y (check_pkg_class_access): New prototype, fixed leading
4256         comment, new parameter used to emit error only if passed as true.
4257         (parse_check_super): Pass extra argument to check_pkg_class_access.
4258         (do_resolve_class): Likewise.
4259         (process_imports): Likewise.
4260         (read_import_dir): Fixed indentation.
4261         (find_in_imports_on_demand): New local class_type_name. Local
4262         node_to_use deleted. while loop changed into for loop. Report
4263         multiple definition only for accessible classes. Improved error
4264         message.
4265         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4266         assigned to parameter list, fixed indentation. while loop changed
4267         into for loop, restore TREE_CHAIN on local `tem' before the next
4268         iteration.
4269
4270 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4271
4272         * lang.c (lang_get_alias_set): Deleted.
4273
4274 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4275
4276         * gjavah.c (jni_print_char): Fix thinko in last change.
4277
4278         * gjavah.c (jni_print_char, decode_signature_piece): Use
4279         safe-ctype macros and/or fold extra calls into fewer ones.
4280         * lex.c (java_read_unicode, java_lex): Likewise.
4281         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4282         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4283         * mangle_name.c (append_unicode_mangled_name,
4284         unicode_mangling_length): Likewise.
4285
4286 2001-10-17  Richard Henderson  <rth@redhat.com>
4287
4288         * Make-lang.in (java/lang.o): Depend on langhooks.h.
4289
4290 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4291
4292         * lang.c (langhooks.h): Included.
4293         (LANG_HOOKS_INIT): Redefined.
4294         (LANG_HOOKS_INIT_OPTIONS): Likewise.
4295         (LANG_HOOKS_DECODE_OPTION): Likewise.
4296         (struct lang_hooks lang_hooks): New initialization.
4297
4298 2001-10-11  Per Bothner  <per@bothner.com>
4299
4300         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
4301         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4302         The former is simpler, and jcf-write.c handles it better.
4303         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
4304         or WITH_CLEANUP_EXPR.
4305         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
4306         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4307
4308         * parse.y (patch_if_else_statement):  If the condition is constant,
4309         optimize away the test.
4310
4311 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4312
4313         * parse.y (patch_cast): Call patch_string on the first operand of
4314         the incoming node, update it if necessary. Fixes PR java/4510.
4315
4316 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4317
4318         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4319         when name qualifier matches a package name.
4320
4321 2001-10-08  Tom Tromey  <tromey@redhat.com>
4322
4323         Fix for PR java/4489:
4324         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4325         force a new label when computing `body_block'.
4326
4327 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4328
4329         * jcf-io.c (format_uint): Const-ify.
4330         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4331         * lex.c (java_get_line_col): Likewise.
4332         * parse.y (build_incdec): Likewise.
4333
4334 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4335
4336         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4337         a NULL enclosing context if appropriate. Fixes PR java/4466.
4338
4339 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4340
4341         * parse.y (patch_assignment): Use lvalue's original TYPE when
4342         building the final COMPOUND_EXPR.
4343         (try_reference_assignconv): Fixed leading comment.
4344
4345 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4346
4347         * parse.y (check_final_variable_indirect_assignment): For
4348         COMPOUND_EXPR, return only if finals were found initialized
4349         properly, if not, keep on checking.
4350         (check_final_variable_global_assignment_flag): New local
4351         error_found, set when appropriate and used to decide whether to
4352         report uninitialized finals. Fixed typo in comment.
4353
4354 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4355
4356         * decl.c (init_decl_processing): Fixed typo in predef_filenames
4357         last three initializations. Fixes PR java/4360.
4358
4359 2001-09-21  Richard Henderson  <rth@redhat.com>
4360
4361         * class.c (get_dispatch_table): Handle function descriptors.
4362         (build_dtable_decl): Likewise.
4363         * expr.c (build_invokevirtual): Likewise.
4364
4365 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4366
4367         * parse.y (patch_method_invocation): Build class initialization
4368         when static finals are used to qualify method invocation.
4369         Fixes PR java/4366.
4370
4371 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
4372
4373         * parse.h: (WFL_STRIP_BRACKET): Re-written using
4374         build_type_name_from_array_name.
4375         (STRING_STRIP_BRACKETS): New macro.
4376         * parse.y (build_type_name_from_array_name): New function.
4377         (array_creation_expression:): Accumulate []s instead of [s.
4378         (cast_expression:): Accumulate []s instead of [s after cast type
4379         name.
4380         (build_array_from_name): Local string deleted, use
4381         build_type_name_from_array_name.
4382         (build_unresolved_array_type): Accumulate []s instead of [s after
4383         type name.
4384         (register_fields): Fixed comment.
4385         (resolve_class): Local name, base deleted, new locals tname and
4386         array_dims. Use build_type_name_from_array_name. Use array_dims to
4387         build array type.
4388         (purify_type_name): Use STRING_STRIP_BRACKETS.
4389
4390 2001-09-18  Andreas Jaeger  <aj@suse.de>
4391
4392         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4393         * jv-scan.c: Likewise.
4394
4395 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4396
4397         * parse.y (patch_method_invocation): Inner class creation context
4398         check not enforced within constructors. Fixes PR java/1873.
4399
4400 2001-09-16  Tom Tromey  <tromey@redhat.com>
4401
4402         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4403         NOTE_PUSH for single-case push.  Fixes PR java/4189.
4404
4405 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4406
4407         * java-tree.h (TYPE_IMPORT_LIST): New macro.
4408         (TYPE_IMPORT_DEMAND_LIST): Likewise.
4409         (struct lang_type): New fields import_list and import_demand_list.
4410         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4411         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4412         (do_resolve_class): New local saved_enclosing_type, initialized,
4413         passed as parameter to find_in_imports and find_in_imports_on_demand.
4414         (find_in_imports): Added paramater enclosing_type, use its
4415         TYPE_IMPORT_LIST when applicable.
4416         (find_in_imports_on_demand): Added parameter enclosing_type, use
4417         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4418         declaration and initialization.
4419         (fold_constant_for_init): Switch/restore current_class to the
4420         appropriate context.
4421
4422 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
4423
4424         * verify.c (verify_jvm_instructions): Fix typo.
4425
4426 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4427
4428         * expr.c (expand_invoke): Const-ification.
4429         * parse.y (patch_method_invocation): Likewise.
4430
4431 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4432
4433         * gjavah.c (cxx_keywords): Const-ification.
4434         * keyword.gperf (java_keyword): Likewise.
4435         * lang.c (java_tree_code_name): Likewise.
4436         * lex.c (cxx_keywords): Likewise.
4437         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4438
4439 2001-09-11  Richard Henderson  <rth@redhat.com>
4440
4441         * parse.h (ctxp_for_generation): Mark extern.
4442
4443 2001-09-10  Richard Henderson  <rth@redhat.com>
4444
4445         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4446
4447 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4448
4449         * typeck.c (java_array_type_length, build_prim_array_type):
4450         Represent empty arrays by NULL index.
4451
4452 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
4453
4454         * java-tree.h (compile_resource_file): Grouped with other prototypes.
4455         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4456
4457 2001-09-06  Anthony Green  <green@redhat.com>
4458
4459         * class.c (O_BINARY): Define if necessary.
4460         (registerResource_libfunc): Declare.
4461         (init_class_processing): Initilize registerResource_libfunc.
4462         (compile_resource_file): New function.
4463         * java-tree.h (resource_name): Declare.
4464         (compile_resource_file): Declare.
4465         * jcf-parse.c (yyparse): Handle compiling java resource files.
4466         * lang.c (java_decode_option): Handle -fcompile-resource option.
4467         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4468         resource files.
4469         * gcj.texi (Code Generation): Add documentation for -R flag.
4470
4471 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
4472
4473         * jcf-write.c (generate_classfile): Issue an error in case of
4474         field/initial value mismatch.
4475         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4476         being initialized and we're generating bytecode.
4477         (java_complete_lhs): In MODIFY_EXPR section: added comments,
4478         set DECL_INITIAL properly when appropriate.
4479         Fixes PR java/4230
4480         Fixes PR java/4204
4481
4482 2001-09-01  Per Bothner  <per@bothner.com>
4483
4484         * parse.y (maybe_yank_clinit):  A field without an initializer is not
4485         relevant.  All initializers except static final and constant require
4486         <clinit>, regardless of flag_emit_class_files.
4487
4488 2001-08-31  Per Bothner  <per@bothner.com>
4489
4490         * class.c (set_constant_value):  When not emitting class files, then a
4491         String ConstantValue is a utf8const_ptr_type.
4492
4493 2001-08-30  Per Bothner  <per@bothner.com>
4494
4495         * jcf-write.c (generate_classfile):  Check that field is primitive
4496         or string before emitting ConstantValue attribute.
4497
4498 2001-08-30  Per Bothner  <per@bothner.com>
4499
4500         * parse.y (resolve_qualified_expression_name):  If creating a
4501         COMPOUND_EXPR, set it's type correctly.
4502
4503 2001-08-30  Per Bothner  <per@bothner.com>
4504
4505         * jcf-io.c (open_class):  Set filename field.
4506
4507         * jcf-parse,c (parse_class_file):  Set current_function_decl
4508         for better error message when Code attribute is missing.
4509
4510         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
4511         better diagnostics, especially for constructors.
4512
4513 2001-08-30  Per Bothner  <per@bothner.com>
4514
4515         * jcf-write.c (generate_classfile):  Don't write ConstantValue
4516         attribute if field is not final, for compatibility with jdk.
4517
4518         * jcf-write.c (generate_classfile):  Convert ConstantValue values
4519         to correct type.  Work-around for front-end bug.
4520         * class.c (set_constant_value):  Error if constant has wrong type.
4521
4522 2001-08-30  Per Bothner  <per@bothner.com>
4523
4524         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
4525         "Double" are printed at verbosity 1.
4526
4527         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
4528
4529         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
4530
4531 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4532
4533         * parse.y (patch_assignment): Don't verify final re-assignment here.
4534         (java_complete_lhs): Verify assignments to finals calling
4535         patch_assignment. Verify re-assignments to finals before calling
4536         patch_assignment.
4537
4538 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
4539
4540         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4541         Fixes PR java/1413
4542
4543 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4544
4545         * lex.c (java_lex): new local found_hex_digits. Set and then used
4546         in test to reject invalid hexadecimal numbers.
4547         * parse.y (java_complete_tree): Prevent unwanted cast with
4548         initialized floating point finals.
4549         (patch_binop): Emit a warning when detecting a division by zero,
4550         mark result not constant, don't simplify non integer division.
4551
4552 2001-08-28  Per Bothner  <per@bothner.com>
4553
4554         * jcf-write.c  (generate_bytecode_insns):  For increments and
4555         decrements just recurse to push constant.  Improvement on Mark's patch.
4556
4557 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
4558
4559         * jcf-write.c (generate_bytecode_insns): Generate an integer to
4560         real conversion for increments and decrements of reals.
4561
4562 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4563
4564         * parse.y (resolve_qualified_expression_name): Handle unresolved
4565         qualified expressions, prevent numerical qualifiers, fixed typo.
4566         Fixes PR java/4141
4567
4568 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4569
4570         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4571         don't report anything but deprecated class when marked so. Handle
4572         VAR_DECL.
4573         (patch_method_invocation): Check deprecation on methods and types.
4574         (patch_binop): code becomes an enum tree_code, added default: to
4575         switch to handle that. Detect division by zero, try to fold and
4576         return before using a subroutine.
4577
4578 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4579
4580         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4581         file smaller than 4 bytes.
4582         * parse.y (check_inner_circular_reference): New function.
4583         (check_circular_reference): Likewise.
4584         (array_initializer:): Accept {,}.
4585         (java_check_circular_reference): Rewritten using
4586         check_circular_reference and check_inner_circular_reference.
4587         (java_complete_expand_method): Unconditionally save and restore
4588         the unpurged exception list.
4589         (build_dot_class_method_invocation): Unmangle signature parameter.
4590
4591 2001-08-21  Tom Tromey  <tromey@redhat.com>
4592
4593         * decl.c (init_decl_processing): Add `throws' field to method
4594         descriptor.
4595         * class.c (make_method_value): Compute `throws' field for method.
4596
4597 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4598
4599         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4600         circularity is detected.
4601         (ctors_unchecked_throws_clause_p): Fixed leading comment.
4602
4603 2001-08-17  Richard Henderson  <rth@redhat.com>
4604
4605         * class.c (emit_register_classes): Add align parameter to
4606         call to assemble_integer.
4607
4608 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
4609
4610         * jcf-parse.c (load_class): New locals saved and class_loaded. If
4611         loading a class_or_name fails, try considering an innerclass name
4612         and load the enclosing context.
4613         * parse.y (resolve_inner_class): New function.
4614         (find_as_inner_class): Added leading comment.
4615         (register_incomplete_type): Keep the current context as enclosing
4616         context for JDEP_FIELD dependencies.
4617         (do_resolve_class): Locals new_class_decl and super initialized to
4618         NULL. Call resolve_inner_class, explore the enclosing context
4619         superclass if necessary.
4620         Fixes PR java/4007
4621
4622 2001-08-16  Tom Tromey  <tromey@redhat.com>
4623
4624         * jcf-dump.c (main): Updated for change to jcf_path_seal.
4625         * gjavah.c (main): Updated for change to jcf_path_seal.
4626         * lang.c (version_flag): New global.
4627         (java_decode_option): Recognize `-version'.
4628         (java_init): Update for change to jcf_path_seal.
4629         * jcf.h (jcf_path_seal): Added `print' argument.
4630         * jcf-path.c (jcf_path_seal): Added `print' argument.
4631
4632 2001-08-13  Zack Weinberg  <zackw@panix.com>
4633
4634         * Make-lang.in (java/decl.o): Update dependencies.
4635         * decl.c: Include libfuncs.h, don't include toplev.h.
4636
4637 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4638
4639         * decl.c (init_decl_processing): exception_type_node,
4640         class_not_found_type_node, and no_class_def_found_type_node
4641         initialized. predef_filenames augmented accordingly.
4642         instinit_identifier_node initialized.
4643         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4644         * java-tree.h (enum java_tree_index): New entries
4645         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4646         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4647         (exception_type_node): New macro.
4648         (class_not_found_type_node): Likewise.
4649         (no_class_def_found_type_node): Likewise.
4650         (instinit_identifier_node): Likewise.
4651         (PREDEF_FILENAMES_SIZE): Adjusted.
4652         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4653         (struct lang_type): Fixed typo in bitfield name.
4654         (DECL_INSTINIT_P): New macro.
4655         (ID_INSTINIT_P): Likewise.
4656         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4657         attribute.
4658         * parse.y (encapsulate_with_try_catch): New function.
4659         (generate_instinit): Likewise.
4660         (build_instinit_invocation): Likewise.
4661         (ctors_unchecked_throws_clause_p): Likewise.
4662         (add_instance_initializer): Deleted.
4663         (build_instance_initializer): Likewise.
4664         (in_instance_initializer): Likewise.
4665         (check_method_redefinition): instinit$ not to be verified.
4666         (java_complete_expand_methods): Generate instinit$, simplified code.
4667         (build_dot_class_method): Eliminated unnecessary locals. Use
4668         encapsulate_with_try_catch, removed unnecessary code.
4669         (fix_constructors): New local iii. Use build_instinit_invocation.
4670         (patch_method_invocation): Added comment.
4671         (maybe_use_access_method): Don't consider instinit$.
4672         (find_applicable_accessible_methods_list): Shorten the search for
4673         instinit$ too.
4674         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4675         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4676         (patch_throw_statement): Likewise. Fixed typo.
4677
4678 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
4679
4680         Revert:
4681         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4682         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4683         ASM_FINAL_SPEC.
4684         (lang_specific_pre_link): Use set_input to set input_filename.
4685         Append `main' here.
4686         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4687         (main): Fix definition.
4688         Strip `main' from classname.
4689         Fixes PR java/227.
4690
4691 2001-08-11  Zack Weinberg  <zackw@panix.com>
4692
4693         * lex.h: Don't include setjmp.h.  Don't define
4694         SET_FLOAT_HANDLER or prototype set_float_handler.
4695
4696 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4697
4698         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
4699         `poplevel' in the right order.
4700
4701 2001-08-09  Richard Henderson  <rth@redhat.com>
4702
4703         * Make-lang.in (class.o): Depend on TARGET_H.
4704         * class.c (emit_register_classes): Use target hooks instead of
4705         assemble_constructor and assemble_destructor.
4706
4707 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
4708
4709         * check-init.c (flags.h): Include
4710         (check_init): Don't report uninitialized static class
4711         initialization flags, don't free bit index when doing static class
4712         initialization optimization.
4713         (check_for_initialization): Return type changed to `unsigned int.'
4714         (attach_initialized_static_class): New function.
4715         * class.c (add_method_1): Create the initialized static class
4716         table if necessary.
4717         (finish_class): Always emit deferred inline methods.
4718         * decl.c (emit_init_test_initialization): Moved to expr.c
4719         (complete_start_java_method): Don't traverse
4720         DECL_FUNCTION_INIT_TEST_TABLE.
4721         (lang_mark_tree): Mark hash tables in function decls.
4722         * expr.c (emit_init_test_initialization): Moved from decl.c.
4723         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
4724         initialization flag, set DECL_CONTEXT and
4725         LOCAL_CLASS_INITIALIZATION_FLAG.
4726         (java_lang_expand_expr): Emit initialization code for static class
4727         initialized flags when entering block, if necessary.
4728         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
4729         * java-tree.h (flag_optimize_sci): New global variable declaration.
4730         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
4731         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
4732         (LOCAL_FINAL_P): Fixed typo in comment.
4733         (FINAL_VARIABLE_P): Likewise.
4734         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
4735         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
4736         (struct lang_decl): New fields `ict', `smic' and `cif.'
4737         (check_for_initialization): New returned value for global.
4738         (attach_initialized_static_class): New global function.
4739         (STATIC_CLASS_INIT_OPT_P): New macro.
4740         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
4741         * lang.c (java_decode_option): Handle
4742         `-fno-optimize-static-class-initialization'
4743         * parse.y (start_complete_expand_method): New function.
4744         (java_expand_method_bodies): Likewise.
4745         (attach_init_test_initialization_flags): Likewise.
4746         (adjust_init_test_initialization): Likewise.
4747         (emit_test_initialization): Likewise.
4748         (java_complete_expand_methods): Nullify abstract and native method
4749         bodies.
4750         (java_complete_expand_method): New locals `fbody', `block_body'
4751         and `exception_copy.' Reorganized: directly return on empty method
4752         bodies, call `start_complete_expand_method', remember definitely
4753         initialized static class in function, don't expand method bodies.
4754         (java_expand_classes): Call `java_expand_method_bodies' before
4755         `finish_class' when compiling to native.
4756         (resolve_expression_name): Use `orig' after building outer class
4757         field access.
4758         (patch_invoke): Remember static method invocations.
4759
4760 2001-08-06  Richard Henderson  <rth@redhat.com>
4761
4762         * class.c (emit_register_classes): Pass a symbol_ref and priority
4763         to assemble_constructor.
4764
4765 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
4766
4767         * java-tree.h (all_class_filename): New macro.
4768         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
4769         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
4770         newly created IDENTIFIER_NODE to `all_class_filename.'
4771
4772 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
4773
4774         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
4775         Use ggc_add_tree_root to register roots.
4776
4777 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4778
4779         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
4780         second operand calling check_init.
4781         * decl.c (complete_start_java_method): Swaped second and third
4782         arguments while creating WITH_CLEANUP_EXPR node.
4783         * jcf-write.c (generate_bytecode_insns): Use second operand
4784         instead of third when handling WITH_CLEANUP_EXPR.
4785         * parse.y (java_complete_lhs): Expand second operand of
4786         WITH_CLEANUP_EXPR nodes.
4787         (patch_synchronized_statement): Swaped second and third arguments
4788         while creating WITH_CLEANUP_EXPR node.
4789
4790 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4791
4792         * parse.y (create_interface): Avoid cyclic inheritance report when
4793         syntax error encountered during class definition.
4794         Fixes PR java/2956
4795
4796 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4797
4798         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4799         ASM_FINAL_SPEC.
4800         (lang_specific_pre_link): Use set_input to set input_filename.
4801         Append `main' here.
4802         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4803         (main): Fix definition.
4804         Strip `main' from classname.
4805         Fixes PR java/227.
4806
4807 2001-07-18  Tom Tromey  <tromey@redhat.com>
4808
4809         For PR java/2812:
4810         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
4811         * lex.c (java_new_lexer): Use ICONV_CONST.
4812         (java_read_char): Likewise.
4813         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
4814         (jv-scan$(exeext)): Likewise.
4815
4816 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4817
4818         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
4819         * parse.y (check_class_interface_creation): Allow `private' if the
4820         enclosing is not an interface.
4821         (create_interface): Interface tagged public if the enclosing
4822         context is an interface.
4823         (create_class): Class tagged public if the enclosing context
4824         is an interface.
4825         Fixes PR java/2959
4826
4827 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4828
4829         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
4830         Fixes PR java/2665
4831
4832 2001-07-14  Tim Josling  <tej@melbpc.org.au>
4833
4834         * check-init.c (check_init): Remove references to EXPON_EXPR.
4835
4836 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4837
4838         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
4839         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
4840         Fixes PR java/3602
4841
4842 2001-07-13  Tom Tromey  <tromey@redhat.com>
4843
4844         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
4845         invocation.
4846
4847 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4848
4849         * parse.y (patch_method_invocation): Don't override primary if one
4850         is already provided, but let this$<n> be built. Fixed comment.
4851
4852 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4853
4854         * parse.y (empty_statement:): Report empty statement error only
4855         when found at class declaration level.
4856         Fixes PR java/3635
4857
4858 2001-07-12  Tom Tromey  <tromey@redhat.com>
4859
4860         * expr.c (expand_load_internal): New function.
4861         (LOAD_INTERNAL): Use it.
4862
4863 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
4864
4865         * parse.y (verify_constructor_super): Compare anonymous class ctor
4866         args with `valid_method_invocation_conversion_p.'
4867         Fixes PR java/3285
4868
4869 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4870
4871         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
4872         `-fsyntax-only.' Fixes PR java/3248
4873
4874 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4875
4876         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
4877
4878 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4879
4880         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
4881         current function is static. Fixes PR java/1970
4882
4883 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4884
4885         * parse.y (patch_method_invocation): Add enclosing context to ctor
4886         calls if necessary. Fixes PR java/2953
4887
4888 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4889
4890         * parse.y (resolve_package): Abort if qualified expression member
4891         isn't right.
4892         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
4893         Fixes PR java/1391
4894
4895 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
4896
4897         * verify.c: Don't use // comments.
4898
4899 2001-07-05  Tom Tromey  <tromey@redhat.com>
4900
4901         * lang.c (flag_assume_compiled): Removed.
4902         * java-tree.h (flag_assume_compiled): Removed.
4903         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
4904         -fhash-synchronization, -fuse-divide-subroutine,
4905         -fcheck-references, -femit-class-file, -femit-class-files,
4906         -fassume-compiled.  Updated --encoding information.  Changed
4907         -foutput-class-dir to `-d'.
4908
4909 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
4910
4911         * jcf-parse.c (parse_class_file): Add lineno parameter to
4912         debug_start_source_file call.
4913
4914 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4915
4916         * gcj.texi: Use gpl.texi.
4917         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
4918         dependencies and use doc/include in search path.
4919
4920 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
4921
4922         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
4923         `this'.  If so, don't build instance initializers.
4924
4925 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4926
4927         * parse.y (resolve_expression_name): Improved error message for
4928         inner class cases. Fixes PR java/1958
4929
4930 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4931
4932         * lang.c: #include diagnostic.h
4933         (lang_print_error): Add a `diagnostic_context *' parameter.
4934         (java_dummy_print): Likewise.
4935         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
4936
4937 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4938
4939         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
4940         * jcf.h (typedef struct JCF): New bitfield `finished.'
4941         (JCF_FINISH): Set `finished.'
4942         (JCF_ZERO): Reset `finished.'
4943         Fixes PR java/2633
4944
4945 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4946
4947         * parse.y (class_body_declaration:): Don't install empty instance
4948         initializers.
4949         Fixes PR java/1314
4950
4951 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4952
4953         * class.c (set_super_info): Call `set_class_decl_access_flags.'
4954         (set_class_decl_access_flags): New function.
4955         * java-tree.h (set_class_decl_access_flags): New prototype.
4956         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
4957         (parse_class_file): New local `decl_max_locals.' Take wide types
4958         into account to compute DECL_MAX_LOCALS.
4959         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
4960         imports on demand.
4961
4962 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
4963
4964         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
4965
4966 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4967
4968         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
4969         * parse.y (do_resolve_class): Moved comments out to leading comment
4970         section. Removed local `start', New local `_ht' and
4971         `circularity_hash.'  Record `enclosing' in hash table and search
4972         it to detect circularity.  Use `enclosing' as an argument to
4973         `lookup_cl.' Free the hash table when done.
4974
4975 2001-06-19  Tom Tromey  <tromey@redhat.com>
4976
4977         * lex.c (java_read_char): Disallow invalid and overlong
4978         sequences.  Fixes PR java/2319.
4979
4980 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
4981
4982         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
4983
4984 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4985
4986         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
4987         arguments accordingly.
4988
4989 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4990
4991         * gcj.texi: Move contents to just after title page.
4992
4993 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
4994
4995         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
4996         builtin type.
4997         (patch_incomplete_class_ref): Build the class ref, build the class
4998         init if necessary, complete the tree.
4999         Fixes PR java/2605
5000
5001 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5002
5003         * parse.y (lookup_field_wrapper): Test `name' code.
5004         (resolve_qualified_expression_name): Test `qual_wfl' code.
5005         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5006         handle `qual_wfl' by code.
5007         (maybe_build_primttype_type_ref): Test `wfl' code.
5008
5009 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5010
5011         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5012         fdl.texi.
5013         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
5014         the dvi file in the java directory.
5015
5016 2001-05-25  Sam TH  <sam@uchicago.edu>
5017
5018         * gen-table.pl javaop.h jcf.h lex.h,
5019         parse.h: Fix header include guards.
5020
5021 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
5022
5023         * jv-scan.c (version): Update copyright year.
5024
5025 2001-05-21  Per Bothner  <per@bothner.com>
5026
5027         * jcf-parse.c (read_class):  If class is from .class or .zip file
5028         and it's already been read, don't push/pop parser context.
5029
5030 2001-05-18  Per Bothner  <per@bothner.com>
5031
5032         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
5033         command line so the jvgenmain-generated main program comes first.
5034
5035 2001-05-15  Tom Tromey  <tromey@redhat.com>
5036
5037         * class.c (build_utf8_ref): Don't generate identifier based on
5038         utf8const contents.
5039
5040 2001-05-12  Richard Henderson  <rth@redhat.com>
5041
5042         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5043         * expr.c (java_lang_expand_expr): Expand it.
5044         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5045         calling build_exception_object_ref.
5046         * parse.y (catch_clause_parameter): Likewise.
5047         (build_dot_class_method): Likewise.
5048         (try_reference_assignconv): Likewise.
5049         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5050         * jcf-write.c (generate_bytecode_insns): Likewise.
5051
5052 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5053
5054         * parse.y (build_unresolved_array_type): Set
5055         EXPR_WFL_QUALIFICATION on the newly created wfl.
5056         Fixes PR java/2538. Fixes PR java/2535.
5057
5058 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5059
5060         * parse.y (fix_constructors): Removed unnecessary assignment to
5061         local. Moved assignment to `this$<n>', fixed comments and
5062         indentation.
5063         (build_wfl_wrap): Fixed indentation.
5064         Fixes PR java/2598, java/2579 and java/2658.
5065
5066 2001-05-03  Mo DeJong  <mdejong@redhat.com>
5067
5068         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5069         check for byte swap.
5070
5071 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
5072
5073         * expr.c (build_class_init): Move MODIFY_EXPR
5074         outside of COND_EXPR.  Remove variable `call'.
5075
5076 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5077
5078         * decl.c: NULL_PTR -> NULL.
5079         * jcf-write.c: Likewise.
5080
5081 2001-05-01  Tom Tromey  <tromey@redhat.com>
5082
5083         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5084         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5085         * gcj.texi: Updated copyright text.  Include fdl.texi.
5086         (Top): Link to new node.
5087
5088 2001-05-01  Per Bothner  <per@bothner.com>
5089
5090         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
5091
5092 2001-05-01  Per Bothner  <per@bothner.com>
5093
5094         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
5095         import_list contains the name, not the TREE_PURPOSE.
5096
5097 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5098
5099         * jcf-io.c (read_zip_member): Cast to long in comparison with
5100         signed value.
5101
5102         * jvspec.c (lang_specific_driver): Initialize variables.
5103
5104         * mangle.c (find_compression_record_match): Likewise.
5105
5106         * typeck.c (build_null_signature): Provide static prototype.  Mark
5107         parameter with ATTRIBUTE_UNUSED.
5108
5109         * verify.c (verify_jvm_instructions): Initialize variable.
5110
5111 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5112
5113         * parse.y (do_resolve_class): Check for cyclic inheritance during
5114         inner class resolution.
5115
5116 2001-04-27  Per Bothner  <per@bothner.com>
5117
5118         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
5119         while iterating, since that could cause gc to lose stuff.
5120
5121 2001-04-26  Per Bothner  <per@bothner.com>
5122
5123         Fix method search wrt scope of inner classes to match JLS2.
5124         * typeck.c (build_null_signature):  New static function.
5125         (has_method):  New function.  Uses build_null_signature and lookup_do.
5126         * java-tree.h (has_method):  New declaration.
5127         * parse.y (find_applicable_accessible_methods_list):  Do not search
5128         context of inner classes here.
5129         (patch_method_invocation):  Search scope, ie. current and outer clases,
5130         for method matching simple name, to find class.
5131
5132 2001-04-26  Per Bothner  <per@bothner.com>
5133
5134         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5135         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
5136
5137         * constants.c (find_methodref_with_class_index):  New function.
5138         (find_methodref_index):  Use find_methodref_with_class_index.
5139         * java-tree.h (find_methodref_with_class_index):  New declaration.
5140         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
5141         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5142         If context changed from interface to class, don't use invokeinterface.
5143
5144 2001-04-25  Per Bothner  <per@bothner.com>
5145
5146         * verify.c (verify_jvm_instructions):  For field instructions,
5147         check that field index is valid.  For invoke instructions, check that
5148         method index is valid.
5149
5150 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
5151
5152         * config-lang.in (target_libs): Copy from $libgcj_saved.
5153
5154 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5155
5156         * decl.c (init_decl_processing): Add new class "protectionDomain"
5157         field.
5158         * class.c (make_class_data): Set initial value for "protectionDomain".
5159
5160 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5161
5162         * jvspec.c (lang_specific_driver): Fix memory allocation
5163         deficit, by using concat in lieu of xmalloc/sprintf.
5164
5165 2001-04-20  Per Bothner  <per@bothner.com>
5166
5167         Fixes to compile multiple .class files at once.
5168         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
5169         * java-tree.h (CLASS_PARSED_P):  New macro.
5170         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5171         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
5172         (read_class):  Avoid some code duplication.
5173         Don't call JCF_FINISH for a .class file - might be needed later.
5174         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
5175         rather than CLASS_LOADED_P, since latter implies class laid out.
5176         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
5177         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
5178
5179 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5180
5181         * Make-lang.in (java/boehm.o): Depend on toplev.h.
5182
5183         * boehm.c: Include toplev.h.
5184
5185 2001-04-06  Tom Tromey  <tromey@redhat.com>
5186             Alexandre Petit-Bianco  <apbianco@redhat.com>
5187
5188         Fix for PR gcj/1404 and PR gcj/2332:
5189         * parse.y (build_array_from_name): If we use the type_wfl then
5190         accumulate dimensions from the original type as well.
5191         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5192
5193 2001-04-06  Tom Tromey  <tromey@redhat.com>
5194
5195         * parse.y (analyze_clinit_body): Return true if the second operand
5196         of a METHOD_EXPR is nonzero.
5197
5198 2001-04-06  Tom Tromey  <tromey@redhat.com>
5199
5200         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5201         directory.
5202         ($(srcdir)/java/parse.c): Likewise.
5203
5204 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5205
5206         * gcj.texi: Use `which-gcj' instead of `which-g77.'
5207         (version-gcc): Initialized.
5208         (which-gcj): Likewise.
5209
5210 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5211
5212         * java-tree.h (struct lang_decl): New macro
5213         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5214         * parse.y (build_instance_initializer): New function.
5215         (add_instance_initializer): Use it.
5216         (java_fix_constructors): Set `current_class' before fix pass.
5217         (fix_constructors): Just return if already fixed. Move `super()'
5218         invocation ahead. Use `build_instance_initializer.'
5219         Fixes PR java/1315.
5220
5221 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5222
5223         * parse.y (resolve_qualified_expression_name): Pass field's
5224         DECL_CONTEXT to `not_accessible_p.'
5225         (not_accessible_p): Changed parameters order in `inherits_from_p'
5226         invocation.
5227
5228 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
5229
5230         * lang-options.h: Add flag_check_references.
5231
5232 2001-04-04  Per Bothner  <per@bothner.com>
5233
5234         * java-tree.h (CONSTANT_VALUE_P):  New macro.
5235         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
5236         * parse.y (maybe_build_class_init_for_field):  New static function.
5237         (resolve_expression_name, resolve_field_access):  Use
5238         maybe_build_class_init_for_field instead of build_class_init
5239         This does not do the init if the field is compile-time-constant.
5240         (resolve_field_access):  Simplify.
5241
5242         * parse.y (fold_constant_for_init):  Merge test into switch.
5243
5244 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
5245
5246         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5247         on gansidecl.h.
5248         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5249
5250 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
5251
5252         * expr.c (pop_type_0): Save the result of the first
5253         lang_printable_name call in a scratch buffer, so it
5254         won't be clobbered by the second call.
5255
5256 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
5257
5258         * parse-scan.y (array_type:): Rewritten.
5259         (type_declaration:): `empty_statement' replaces `SC_TK.'
5260         (class_member_declaration:): `empty statement' added.
5261         (method_body:): Simplified.
5262         (static_initializer:): Likewise.
5263         (primary_no_new_array:): Use `type_literals.'
5264         (type_literals:): New rule.
5265         (dims:): Set and update `bracket_count.'
5266         Fixes PR java/1074. Fixes PR java/2412.
5267
5268 2001-03-28  Hans Boehm  <boehm@acm.org>
5269
5270         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5271         (get_boehm_type_descriptor): Set type on returned value to be a
5272         pointer length integer.
5273
5274 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5275
5276         * expr.c (pop_type_0): Call `concat' rather than building the
5277         string manually.
5278         (pop_type): Add format specifier in call to `error'.
5279
5280         * parse.y (patch_method_invocation): Avoid casting away
5281         const-ness.
5282
5283 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
5284
5285         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5286
5287 2001-03-28  Richard Henderson  <rth@redhat.com>
5288
5289         IA-64 ABI Exception Handling:
5290         * Make-lang.in (except.o): Don't depend on eh-common.h.
5291         * check-init.c (check_init): Handle EXC_PTR_EXPR.
5292         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5293         [soft_exceptioninfo_call_node]: Remove.
5294         [eh_personality_libfunc, lang_eh_runtime_type]: New.
5295         (end_java_method): No emit_handlers.
5296         * except.c (java_set_exception_lang_code): Remove.
5297         (method_init_exceptions): Don't call it.
5298         (prepare_eh_table_type): No CATCH_ALL_TYPE.
5299         (build_exception_object_ref): New.
5300         (expand_end_java_handler): Update for except.h name changes.
5301         (emit_handlers, expand_resume_after_catch): Remove.
5302         * expr.c (java_lang_expand_expr): Update for except.h name changes.
5303         (process_jvm_instruction): Use build_exception_object_ref.
5304         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5305         (soft_exceptioninfo_call_node): Remove.
5306         (build_exception_object_ref): Declare.
5307         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5308         soft_exceptioninfo_call_node.  Move processing ...
5309         [EXC_PTR_EXPR]: ... here.
5310         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5311         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5312         (source_end_java_method): No java_set_exception_lang_code or
5313         emit_handlers.
5314         (build_dot_class_method): Use build_exception_object_ref.
5315         (try_reference_assignconv): Check EXC_PTR_EXPR not
5316         soft_exceptioninfo_call_node.
5317
5318 2001-03-28  Richard Henderson  <rth@redhat.com>
5319
5320         * java-tree.h (throw_node): Define as a single member of
5321         java_global_trees instead of a separate array.
5322         (JTI_THROW_NODE): New.
5323         * decl.c (throw_node): Don't declare.
5324         (init_decl_processing): Init a scalar throw_node.
5325         Don't register it for gc.
5326         * check-init.c (check_init): Reference scalar throw_node.
5327         * expr.c (build_java_athrow): Likewise.
5328         * jcf-write.c (generate_bytecode_insns): Likewise.
5329         * parse.h (BUILD_THROW): Likewise.
5330
5331 2001-03-28  Richard Henderson  <rth@redhat.com>
5332
5333         * decl.c (end_java_method): Do not save and restore
5334         flag_non_call_exceptions.
5335         * parse.y (source_end_java_method): Likewise.
5336         * lang.c (flag_exceptions): Don't declare.
5337         (java_init_options): Set flag_non_call_exceptions.  Set
5338         flag_exceptions here ...
5339         (java_init): ... not here.
5340
5341 2001-03-27  Richard Henderson  <rth@redhat.com>
5342
5343         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5344         exceptions_via_longjmp.
5345
5346         * lang.c (flag_new_exceptions): Don't declare it.
5347         (java_init_options): Or set it.
5348
5349 2001-03-27  Richard Henderson  <rth@redhat.com>
5350
5351         * decl.c (end_java_method): Rename asynchronous_exceptions to
5352         flag_non_call_exceptions.
5353         * parse.y (source_end_java_method): Likewise.
5354
5355 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5356
5357         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5358
5359 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5360
5361         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5362
5363 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5364
5365         * parse.y (find_as_inner_class): Follow current package
5366         indications not to mistakingly load an unrelated class.
5367
5368 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5369
5370         * constants.c (PUTN): Use memcpy, not bcopy.
5371
5372         * lex.c (java_read_char): Use memmove, not bcopy.
5373
5374         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5375
5376 2001-03-23  Per Bothner  <per@bothner.com>
5377
5378         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
5379         macro for better error pin-pointing.
5380         * java-tree.h:  Fix typo in comment.
5381
5382         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
5383         Don't include jsr/goto in exception range.
5384         Check if start and end of exception range are the same (also TRY_EXPR).
5385         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5386         However, do emit the following goto even if try_block is empty.
5387         Defer freeing exception_decl until after the finalizer, to make
5388         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
5389
5390         * parse.y (java_complete_lhs):  If the try-clause is empty, just
5391         return the finally-clause and vice versa.
5392
5393 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5394
5395         * gcj.texi (Input Options): documented the check for attribute
5396         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5397         * java-tree.h (flag_force_classes_archive_check): Declared extern.
5398         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5399         (jcf_parse): Check for the right classes archive if necessary.
5400         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5401         (jcf_parse_fields): Fixed indentation.
5402         * jcf-write.c (append_gcj_attribute): New function.
5403         (generate_classfile): Compute the attribute count, invoke
5404         `append_gcj_attribute'.
5405         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5406         turned into bit-fields. New bit-field `right_zip.'
5407         (JCF_ZERO): Set `right_zip' to zero.
5408         * lang-options.h (-fforce-classes-archive-check): Added flag.
5409         * lang.c (flag_force_classes_archive_check): New flag.
5410         (lang_f_options): New entry `force-classes-archive-check.'
5411         Fixes PR java/1213.
5412
5413 2001-02-07  Andrew Haley  <aph@redhat.com>
5414
5415         * gcj.texi (Configure-time Options): Add -fcheck-references.
5416         * expr.c (build_java_indirect_ref): New function.
5417         (java_check_reference): New function.
5418         (build_java_array_length_access): Use build_java_indirect_ref to
5419         check for null references.
5420         (build_java_arrayaccess): Likewise.
5421         (build_get_class): Likewise.
5422         (build_field_ref): Likewise.
5423         (invoke_build_dtable): Likewise.
5424         (build_invokeinterface): Likewise.
5425         * lang.c (lang_f_options): Add flag_check_references.
5426         * jvspec.c (jvgenmain_spec): Add flag_check_references.
5427         * java-tree.h (flag_check_references): New variable.
5428         * lang.c (flag_check_references): Likewise.
5429         * parse.y (patch_invoke): Use java_check_reference.
5430         (patch_assignment): Allow for extra nesting in
5431         _Jv_CheckArrayStore.
5432
5433 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
5434
5435         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5436         * lex.c (cxx_keywords): Likewise.
5437
5438 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5439
5440         * parse.y (qualify_ambiguous_name): Broaden `length'
5441         recognition. Help MODIFY_EXPR be resolved as expression names.
5442         Fixes PR java/2066. Fixes PR java/2400.
5443
5444 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
5445
5446         * gjavah.c (process_file): Mark interface definitions with
5447         "__attribute__ ((java_interface))".
5448
5449 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5450
5451         * class.c (layout_class): Fixed push_super_field's second
5452         argument. Fixes PR java/2333.
5453         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5454         too early to lay innerclasses out.
5455
5456 2001-03-20  Tom Tromey  <tromey@redhat.com>
5457             Alexandre Petit-Bianco <apbianco@redhat.com>
5458
5459         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5460         inside an array reference. Insertion of the array store check
5461         rewritten. Fixes PR java/2299.
5462
5463 2001-03-20  Tom Tromey  <tromey@redhat.com>
5464
5465         * lex.c (java_read_unicode): Only accept leading `u's.
5466
5467 2001-03-20  Tom Tromey  <tromey@redhat.com>
5468
5469         * jcf-parse.c (read_class): Initialize `class'.
5470
5471 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5472
5473         * jcf_parse.c (jcf_parse): Eliminate unused variable.
5474
5475 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5476
5477         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5478         (layout_class): Likewise.
5479         (layout_class_method): Likewise.
5480         (emit_register_classes): Likewise.
5481         * decl.c (builtin_function): Likewise.
5482         (give_name_to_locals): Likewise.
5483
5484 2001-03-19  Per Bothner  <per@bothner.com>
5485
5486         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
5487         before trying to load an inner class.
5488
5489         Fixes to process to command-line .class files in two passes.
5490         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
5491         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
5492         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
5493         * class.c (is_compiled_class):  Fix for renamed flag.
5494         * parse.y (maybe_create_class_interface_decl):  Likewise.
5495         * jcf-parse.c (yyparse):  Also set if compiling .class files.
5496         * jcf-parse.c (read_class);  Read current_class.
5497         (jcf_parse):  Make static.
5498         (load_inner_classes):  New function, with code moved from jcf_parse,
5499         because we need to inner classes after the command-line files are read.
5500         (yyparse):  Set finput to NULL when it doesn't need to be closed.
5501         Reduce use of main_jcf (basically only for archive) and
5502         use finput instead of main_jcf->read_state.
5503         Inline jcf_figure_file_type into yyparse.
5504         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5505         Defer load_inner_classes and parse_class_file to a second pass,
5506         after we've correctly mapped command-line .clas fiels to classes.
5507         (jcf_figure_file_type):  Removed.
5508         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
5509         (JCF_ZERO):  Also clear zipd field.
5510         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
5511
5512 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5513
5514         * jcf-parse.c (yyparse): Change ch from char * to char.
5515
5516 2001-03-19  Per Bothner  <per@bothner.com>
5517
5518         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
5519         Add constructed filelist-file at end, following -xjava.  Thus any .o
5520         and library files are not affected by the -xjava.  Also wrap
5521         explicit @FILE with -xjava and -xnone.
5522
5523 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
5524
5525         * class.c (build_static_field_ref): Call make_decl_rtl() after
5526         setting the DECL_EXTERNAL flag.
5527
5528 2001-03-17  Per Bothner  <per@bothner.com>
5529
5530         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
5531
5532         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
5533         when result is is needed (target is STACK_TARGET).
5534
5535         * parse.h (JDEP_SOLV):  Removed.
5536         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
5537
5538         * parse.y (incomplete_class_list): Removed.
5539         (obtain_incomplete_type): Don't use or set incomplete_class_list.
5540         It doesn't work if resolve_class changes the name of an array type
5541         that is on the list and then someone else looks for the modified name.
5542         Also, seems liable to break when compiling multiple source files at
5543         once.  So the simplest is to just remove incomplete_class_list -
5544         it is only a minor space win and it is not even clear it saves time.
5545
5546         * parse.y (resolve_class):  Remove unneeded promote_type.
5547
5548 2001-03-15  Per Bothner  <per@bothner.com>
5549
5550         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
5551         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
5552         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5553         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5554
5555         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
5556         * parse.y (java_expand_classes):  Likewise.
5557
5558         * parse.y (expand_start_java_method):  Was only called once and had a
5559         misleading name, so inline in caller java_complete_expand_method.
5560         (enter_a_block):  Likewise inline in enter_block and remove.
5561
5562         Remove junk from when gcc/java was created (by copying from C/C++).
5563         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
5564         (struct binding_level):  Remove fields keep, keep_if_subblocks,
5565         more_cleanups_ok, have_cleanups (which have never been used).
5566         (pushlevel, poplevel):  Remove related useless code.
5567
5568         * class.c (make_class_data):  The class_dtable_decl (i.e. the
5569         vtable for Class) should be external, except when compiling Class.
5570
5571         * jvspec.c (lang_specific_driver):  Fix -C handling.
5572         Check -save-temps to see if temp @FILE should be deleted.
5573         Follow-up to/fix for February 16 patch.
5574
5575         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
5576         (type_stack_dup):  Remove no-longer neded error check.
5577
5578 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
5579
5580         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5581         to 'for_pointer'. If this type is for a pointer (argument) mangling,
5582         don't surround the element with 'N..E' if the type name is
5583         unqualified.
5584
5585 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5586
5587         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5588         DECL_RTL_SET_P, etc.
5589         (make_method_value): Likewise.
5590         (get_dispatch_table): Likewise.
5591
5592         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5593
5594 2001-03-07  Tom Tromey  <tromey@redhat.com>
5595
5596         * config-lang.in (lang_requires): Define.
5597
5598 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
5599
5600         * typeck.c (convert): Check flag_unsafe_math_optimizations,
5601         not flag_fast_math.
5602
5603 2001-03-05  Per Bothner  <per@bothner.com>
5604
5605         Fix a problem where rest_of_decl_compilation applied to
5606         class_dtable_decl causes problems because it was done too early,
5607         before output file was opened.
5608         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
5609         * class.c (class_dtable_decl):  Add macro - element of class_roots.
5610         (make_class_data):  Define class_dtable_decl.
5611         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
5612
5613 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5614
5615         * java/class.c, java/decl.c, java/java-tree.h: Replace all
5616         uses of 'boolean' with 'bool'.
5617
5618 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5619
5620         * lang-specs.h: Add zero initializer for cpp_spec field to all
5621         array elements.
5622
5623 2001-02-16  Per Bothner  <per@bothner.com>
5624
5625         Handle compiling multiple input files at once, and @FILE syntax.
5626         * gcj.texi:  Updated documentation to match.
5627         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
5628         * jcf-parse.c (parse_source_file):  Split into ...
5629         (parse_source_file_1):  New function - and:
5630         (parse_source_file_2):  New function.
5631         (yyparse):  On -ffilelist-file, open and scan named file.
5632         On first pass over files, only do parse_source_file_1.
5633         A new second pass calls parse_source_file_2 for each file to compile.
5634         (init_jcf_parse):  Call init_src_parse.
5635         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
5636         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
5637         as multiple input file combined in one compilation.
5638         * lang-options.h:  Add -ffilelist-file
5639         * lang.c (flag_filelist_file):  New flag variable.
5640         (lang_f_options):  Handle -ffilelist-file.
5641         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5642         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
5643         gclass_list - use global fields of src_parse_roots instead.
5644         * parse.y (src_parse_roots):  New array.
5645         (incomplete_class_list, gclass_list):  New macros.
5646         (push_parser_context, java_pop_parser_context,
5647         java_parser_context_resume):  Don't fiddle with deleted fields.
5648         (various):  Use incomplete_class gclass_list and global macros
5649         instead of parse_ctxt fields - the lists are global.
5650         (init_src_parse):  New function.
5651
5652 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5653
5654         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5655
5656 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5657
5658         * parse.y (check_inner_class_access): Moved declaration of local
5659         `enclosing_decl_type' to the right location.
5660
5661 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
5662
5663         * parse.y (parser_check_super_interface): Don't call
5664         check_pkg_class_access for an inner interface.
5665         (parser_check_super): Don't call check_pkg_class_access for inner
5666         class.
5667         (do_resolve_class): Simplify enclosing type loop. Don't call
5668         check_pkg_class_access if CL and DECL are not set.
5669         (find_in_imports_on_demand): Set DECL if class_type needed to be
5670         loaded. Don't call check_pkg_class_access for an inner class.
5671         (check_inner_class_access): Rewritten to implement member access
5672         rules as per spec 6.6.1.
5673         (check_pkg_class_access): Handle the empty package correctly.
5674         (in_same_package): New function. Determine if two classes are in the
5675         same package.
5676
5677 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
5678
5679         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
5680         method into array types.
5681         * parse.y (patch_method_invocation): Bypass access check on clone call
5682         to array instance.
5683
5684 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5685
5686         * expr.c (build_instanceof): Check for arrays when trying fold to
5687         false.
5688
5689 2001-02-15  Jim Meyering  <meyering@lucent.com>
5690
5691         * Make-lang.in (java.install-common): Depend on `installdirs'.
5692         (java.install-info): Likewise.
5693
5694 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
5695
5696         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
5697
5698 2001-02-14  Tom Tromey  <tromey@redhat.com>
5699             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5700
5701         Fix for PR java/1261.
5702         * typeck.c (build_java_array_type): Add public `clone' method to
5703         arrays.
5704         * parse.y (resolve_qualified_expression_name): Use current_class
5705         when checking for inaccessibility.
5706         (patch_method_invocation): Fixed error message when accessibility
5707         denied.  Added `from_super' argument.
5708
5709 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5710
5711         * parse.y (resolve_class): Don't build a fake decl. Use the one
5712         already built.
5713         * typeck.c (build_java_array_type): Build and assign decl to array
5714         type.
5715
5716 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5717
5718         * parse.y (not_accessible_p): Changed leading comment. Added extra
5719         `where' argument. Use it to enforce protected access rules.
5720         (resolve_qualified_expression_name): Added extra argument to
5721         not_accessible_p.
5722         (patch_method_invocation): Use argument `primary' to provide
5723         not_accessible_p with an extra argument.
5724         (lookup_method_invoke): Added extra argument to not_accessible_p.
5725         (search_applicable_method_list): Likewise.
5726
5727 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5728
5729         * parse.y (resolve_qualified_expression_name): Try to resolve as
5730         an inner class access only if `decl' is a TYPE_DECL.
5731
5732 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5733
5734         * decl.c (classdollar_identifier_node): Initialize.
5735         * java-tree.h (enum java_tree_index): New entry
5736         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
5737         (classdollar_identifier_node): New macro.
5738         (ID_CLASSDOLLAR_P): Likewise.
5739         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
5740         (build_dot_class_method_invocation): Likewise.
5741         (find_applicable_accessible_methods_list): `class$' can't be
5742         inherited.
5743
5744 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
5745
5746         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
5747
5748 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5749
5750         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
5751         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
5752         gone.
5753
5754 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5755
5756         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
5757         outside of the `__U' sequence too.
5758         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
5759         sequence too.
5760
5761 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5762
5763         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
5764
5765 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5766
5767         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
5768         (JVGENMAIN_OBJS): Likewise.
5769         * java-tree.h (append_gpp_mangled_name): New prototype.
5770         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
5771         Removed cast calling `gcc_add_root.'
5772         * jvgenmain.c (mangle_obstack): New global, initialized.
5773         (main): Use it.
5774         (do_mangle_class): Constify local `ptr.'
5775         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
5776         append_gpp_mangle_name and update `count' if necessary.
5777         Use `mangle_obstack.'
5778         * mangle.c (append_unicode_mangled_name): Removed.
5779         (append_gpp_mangled_name): Likewise.
5780         (unicode_mangling_length): Likewise.
5781         (mangle_member_name): Return type set to `void.'
5782         (mangle_field_decl): Don't append `U' in escaped names.
5783         (mangle_method_decl): Likewise.
5784         (mangle_member_name): Just use `append_gpp_mangled_name.'
5785         * mangle_name.c: New file.
5786
5787 2001-02-07  Per Bothner  <per@bothner.com>
5788
5789         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
5790
5791         * check-init.c (check_init):  Don't call done_alternative after
5792         processing loop code, as a LOOP_EXPR never terminates normally.
5793
5794 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5795
5796         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
5797
5798 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5799
5800         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
5801         DECLs.
5802
5803 2001-02-06  Tom Tromey  <tromey@redhat.com>
5804
5805         * lex.c (java_new_lexer): Longer error message.
5806
5807 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
5808             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5809
5810         * typeck.c (build_prim_array_type): Added leading comment.
5811         (build_java_array_type): Moved locals out of
5812         block. Always create the `data' field, fixed alignment to match
5813         C++.
5814
5815 2001-02-04  Tom Tromey  <tromey@redhat.com>
5816
5817         * expr.c (java_lang_expand_expr): Don't bother recomputing
5818         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
5819         Fixes PR java/1866.
5820
5821 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5822
5823         * parse.y (process_imports): Save the original name of the import
5824         for better error report.
5825
5826 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
5827
5828         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
5829         of macros used when compiling jvspec.c.
5830         * jvspec.c (lang_specific_driver): Link with the shared
5831         libgcc by default.
5832
5833 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5834
5835         * check-init.c (check_init): Call internal_error instead of fatal.
5836         * expr.c (java_lang_expand_expr): Likewise.
5837         * jcf-parse.c (get_constant): Likewise.
5838         * mangle.c (java_mangle_decl): Likewise.
5839         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
5840         (operator_string): Likewise.
5841         * check-init.c (check_init): Call abort instead of fatal.
5842         * class.c (build_class_ref): Likewise.
5843         * constants.c (write_constant_pool): Likewise.
5844         * decl.c (start_java_method): Likewise.
5845         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
5846         (java_stack_dup, encode_newarray_type): Likewise.
5847         (build_java_array_length_access): Likewise.
5848         (build_java_check_indexed_type, expand_java_pushc): Likewise.
5849         (build_java_soft_divmod, build_invokeinterface): Likewise.
5850         * java-tree.h (INNER_CLASS_P): Likewise.
5851         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
5852         (give_name_to_class, get_class_constant): Likewise.
5853         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
5854         (find_constant_index, generate_bytecode_conditional): Likewise.
5855         (generate_bytecode_insns, perform_relocations): Likewise.
5856         * lex.c (java_unget_unicode, java_lex): Likewise.
5857         * mangle.c (mangle_type, mangle_record_type): Likewise.
5858         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
5859         (finish_mangling): Likewise.
5860         * parse.h (MARK_FINAL_PARMS): Likewise.
5861         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
5862         (obtain_incomplete_type, java_complete_class): Likewise.
5863         (java_check_regular_methods, java_complete_expand_method): Likewise.
5864         (cut_identifier_in_qualified, check_deprecation): Likewise.
5865         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
5866         (java_complete_lhs, lookup_name_in_blocks): Likewise.
5867         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
5868         * typeck.c (set_local_type, parse_signature_type): Likewise.
5869         (parse_signature_string, build_java_signature): Likewise;
5870         (set_java_signature): Likewise.
5871         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
5872         * class.c (add_method): Call fatal_error instead of fatal.
5873         (build_static_field_ref): Likewise.
5874         * expr.c (build_known_method_ref, expand_invoke): Likewise.
5875         * jcf-parse.c (get_constant, jcf_parse): Likewise.
5876         * lex.c (java_new_new_lexer): Likewise.
5877         * jv-scan.c (main): Likewise.
5878         (fatal_error): Renamed from fatal.
5879         * jcf-parse.c (yyparse): Call fatal_io_error instead of
5880         pfatal_with_name.
5881         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
5882         (yyparse): Likewise.
5883         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
5884         * lex.c (java_get_line_col): Likewise.
5885         * jcf-parse.c (load_class): Make errors non-fatal.
5886         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
5887
5888 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
5889
5890         * jvgenmain.c (class_mangling_suffix): Remove unused string.
5891         (error): Remove unused function.
5892         (main): Don't use "__attribute__ alias" on generated class symbol.
5893
5894 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5895
5896         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
5897         argument.
5898         * parse.y (finish_method_declaration): Code accounting for WFLed
5899         method DECL_NAMEs deleted.
5900         (check_abstract_method_definitions): Likewise.
5901         (resolve_type_during_patch): Layout resolved type.
5902         * typeck.c (lookup_do): Removed unused local.
5903
5904 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
5905
5906         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
5907         * decl.c (init_decl_processing): Use integer_minus_one_node, not
5908         integer_negative_one_node.
5909         * expr.c (build_java_binop): Likewise.
5910
5911 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
5912
5913         * zextract.c (read_zip_archive): Read file_offset before writing
5914         zipd and consequently clobbering the header contents.
5915
5916 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5917
5918         * Make-lang.in: Remove all dependencies on defaults.h.
5919         * decl.c: Don't include defaults.h.
5920         * expr.c: Likewise.
5921         * parse.y: Likewise.
5922
5923 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5924
5925         * ChangeLog (2001-01-21): Fixed typo.
5926         * class.c (layout_class_method): Code accounting for WFLed
5927         method DECL_NAMEs deleted.
5928         * constant.c (find_methodref_index): Likewise.
5929         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
5930         * java-tree.h (DECL_FUNCTION_WFL): New macro.
5931         (struct lang_decl): New field `wfl'.
5932         (java_get_real_method_name): Prototype deleted.
5933         * mangle.c (mangle_method_decl): Code accounting for WFLed
5934         method DECL_NAMEs deleted.
5935         * parse.h (GET_METHOD_NAME): Macro deleted.
5936         * parse.y (reset_method_name): Deleted.
5937         (method_header): Set DECL_FUNCTION_WFL.
5938         (check_abstract_method_header): Code accounting for WFLed method
5939         DECL_NAMEs deleted.
5940         (java_get_real_method_name): Deleted.
5941         (check_method_redefinition): Code accounting for WFLed method
5942         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
5943         (java_check_regular_methods): Likewise.
5944         (java_check_abstract_methods): Likewise.
5945         (java_expand_classes): Don't call `reset_method_name.'
5946         (search_applicable_method_list): Use DECL_NAMEs instead of
5947         GET_METHOD_NAME.
5948         * typeck.c (lookup_do): Code accounting for WFLed method
5949         DECL_NAMEs deleted.
5950
5951 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
5952
5953         * lex.c (java_read_char): Check for EOF from getc first.
5954
5955 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5956
5957         * class.c (layout_class): Don't lay the superclass out if it's
5958         already being laid out.
5959         * jcf-parse.c (handle_innerclass_attribute): New function.
5960         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
5961         handle_innerclasses_attribute.
5962         (jcf_parse): Don't load an innerclasses if it's already being
5963         laid out.
5964         * jcf-write.c (append_innerclass_attribute_entry): Static
5965         `anonymous_name' and its initialization deleted. `ocii' and `ini'
5966         to be zero for anonymous classes.
5967
5968 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5969
5970         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
5971         necessary.
5972         * jcf-parse.c (set_source_filename): Use
5973         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
5974
5975 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5976
5977         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
5978         gets a unique asm name.
5979
5980 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5981
5982         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
5983         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5984         if necessary.
5985         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
5986         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
5987         * parse.y (lookup_package_type_and_set_next): Deleted.
5988         (resolve_package): Removed unnecessary code.
5989         (find_applicable_accessible_methods_list): `finit$' can't be
5990         inherited.
5991         * verify.c (pop_argument_types): Added missing prototype.
5992
5993 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
5994
5995         * config-lang.in: Disable java by default.
5996
5997 2001-01-23  Tom Tromey  <tromey@redhat.com>
5998
5999         * gcj.texi (Copying): New node.
6000         Added copyright information.
6001
6002 2001-01-21  Per Bothner  <per@bothner.com>
6003
6004         Various fixes to allow compiling a compressed .jar/.zip archive.
6005         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
6006         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
6007         (struct ZipDirectory):  New field zipf points to owning ZipFile.
6008         * jcf.h (struct ZipDirectory):  Add forward declaration.
6009         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
6010         Remove seen_in_zip and zip_offset fields.
6011         (JCF_SEEN_IN_ZIP):  New macro.
6012         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
6013         * jcf-io.c:  Change all ZipFileCache to ZipFile.
6014         (read_zip_member):  New function.
6015         (open_in_zip):  Call read_zip_member.
6016         * jcf-parse.c (find_in_current_zip):  Remove function.
6017         (read_class):  Merge in find_in_current_zip functionality.
6018         Call read_zip_member if needed.
6019         (parse_zip_file_entries):  Use read_zip_member.
6020         (process_zip_dir):  Update for removed and added JCF fields.
6021         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
6022
6023 2001-01-21  Per Bothner  <per@bothner.com>
6024
6025         Minor optimization of static ggc roots.
6026         * jcf-parse.c (parse_roots):  New static field.
6027         (current_field, current_method, current_file_list):  Replace by macros
6028         naming fields of parse_roots.
6029         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
6030         * class.c (class_roots):  New static field.
6031         (registered_class, fields_ident, info_ident, class_list):
6032         New macros naming fields of parse_roots.
6033         (build_static_field_ref):  Don't register roots here.
6034         (layout_class):  Static field list replaced by macro class_list.
6035         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
6036         Initialize fields_ident and info_ident here.
6037
6038 2001-01-21  Per Bothner  <per@bothner.com>
6039
6040         * jcf-parse.c (ggc_mark_jcf):  New function.
6041         (init_jcf_parse):  Register current_jcf as ggc root.
6042
6043 2001-01-21  Per Bothner  <per@bothner.com>
6044
6045         * lang.c (put_decl_node):  Print method's name.
6046
6047 2001-01-21  Per Bothner  <per@bothner.com>
6048
6049         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
6050         (verify_jvm_instructions):  Use it, for better error messages on loads.
6051
6052 2001-01-21  Per Bothner  <per@bothner.com>
6053
6054         * verify.c (merge_type_state):  Still may have to merge even if
6055         LABEL_VERIFIED (label).
6056
6057 2001-01-21  Per Bothner  <per@bothner.com>
6058
6059         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
6060         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6061
6062 2001-01-19  Per Bothner  <per@bothner.com>
6063
6064         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
6065         if expeting an interface type.  Refines Tom's change of 2000-09-12.
6066
6067 2001-01-18  Per Bothner  <per@bothner.com>
6068
6069         * gcj.texi (Input Options): Mention .java files.
6070
6071 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6072
6073         * lang-options.h (-Wunsupported-jdk11): Removed.
6074         * lang.c (flag_not_overriding): Deleted.
6075         (flag_static_local_jdk1_1): Likewise.
6076         (lang_W_options): Removed "unsupported-jdk11" entry.
6077         * parse.y (java_check_methods): Removed dead code.
6078
6079 2001-01-17  Tom Tromey  <tromey@redhat.com>
6080
6081         Changes suggested by Per Bothner:
6082         * gcj.texi (Input Options): Don't mention input files.
6083         (Code Generation): Updated --main information.
6084         (Invoking jcf-dump): Mention that --javap is incomplete.
6085         From Alexandre Petit-Bianco:
6086         (Warnings): Don't mention -Wunsupported-jdk11.
6087         My stuff:
6088         (Compatibility): Mention JDK 1.2-ness of libraries.
6089         (Resources): Mention resources used when writing gcj.
6090
6091 2001-01-17  Tom Tromey  <tromey@redhat.com>
6092
6093         * gcj.texi: New file.
6094         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6095         (java.info): Depend on gcj.info.
6096         (java/gcj.dvi): New target.
6097         (java.dvi): Depend on gcj.dvi.
6098         (java.install-info): Wrote.
6099
6100 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
6101
6102         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6103         having called make_decl_rtl.
6104
6105 2001-01-14  Per Bothner  <per@bothner.com>
6106
6107         Various patches to emit better messages on verification errors.
6108         * expr.c (push_type_0):  Return error indication on stack overflow,
6109         instead of callinfg fatal.
6110         (push_type):  Now just call push_type_0 (nd fatal on overflow).
6111         (pop_type_0):  Return detailed error message (in a char** argument).
6112         (pop_type):  If pop_type_0 fails, print error message.
6113         (pop_argument_types):  Moved to verify.c.
6114         * verify.c (pop_argument_types):  Moved from expr.c.
6115         Return a (possible) error message, rather than void.
6116         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
6117         (verify_jvm_instruction):  Use new macros, improving error messages.
6118         For case OPCODE_astore use object_ptr_type_node.
6119         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
6120         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
6121
6122         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6123         constant, return body without wrapper.  (Improves constant folding.)
6124         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
6125
6126 2001-01-13  Per Bothner  <per@bothner.com>
6127
6128         * expr.c (expand_java_field_op):  Assigning to a final field outside
6129         an initializer does not violate JVM spec, so should be warning, not
6130         error.  (Sun's verifier does not complain - though MicroSoft's does.)
6131
6132 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
6133
6134         * gjavah.c (version), jcf-dump.c (version): Update copyright year
6135         to 2001.
6136
6137 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
6138
6139         * parse.y (resolve_expression_name): Permit instance variables from
6140         enclosing context in super constructor call.
6141         (resolve_qualified_expression_name): Permit enclosing class's qualified
6142         "this" in super constructor call.
6143
6144 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6145
6146         * class.c (build_utf8_ref): Remove last argument in call to
6147         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6148         (build_class_ref): Likewise.
6149         (build_static_field_ref): Likewise.
6150         (get_dispatch_table): Likewise.
6151         (layout_class_method): Likewise.
6152         (emit_register_classes): Likewise.
6153         * constants.c (build_constant_data_ref): Likewise.
6154         * decl.c (builtin_function): Likewise.
6155         (create_primitive_vtable): Likewise.
6156         * expr.c (build_known_method_def): Likewise.
6157         (build_jni_stub): Likewise.
6158         (java_lang_expand_expr): Likewise.
6159
6160 2001-01-10  Tom Tromey  <tromey@redhat.com>
6161
6162         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6163
6164 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6165
6166         * java-tree.h (lang_printable_name_wls): New prototype.
6167         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6168         rather than `current_class' to print type name. Don't prepend type
6169         names when printing constructor names.
6170         (lang_printable_name_wls): New function.
6171         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6172         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6173         * parse.y (patch_method_invocation): Message tuned for constructors.
6174         (not_accessible_p): Grant `private' access from within
6175         enclosing contexts.
6176
6177 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6178
6179         All files with updated copyright when applicable.
6180         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6181         * class.c (mangle_class_field): Function removed.
6182         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6183         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6184         (build_class_ref): Call `java_mangle_class_field' instead of
6185         `mangle_class_field.'
6186         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6187         (layout_class): Call `java_mangle_decl' instead of
6188         `mangle_static_field.'
6189         (cxx_keywords): Initialized static array moved to `lex.c.'
6190         (layout_class_method): Changed leading comment. Simplified to
6191         call `java_mangle_decl.' Local `ptr' moved in for loop body.
6192         * decl.c (lang_mark_tree): Mark field `package_list.'
6193         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6194         (struct lang_type): New field `package_list.'
6195         (unicode_mangling_length): Prototype removed.
6196         (append_gpp_mangled_name, append_gpp_mangled_classtype,
6197         emit_unicode_mangled_name): Likewise.
6198         (cxx_keyword_p): New prototype.
6199         (java_mangle_decl, java_mangle_class_field,
6200         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6201         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6202         `build_expr_wfl.'
6203         * jvgenmain.c (main_method_prefix): Global variable removed.
6204         (main_method_suffix): Likewise.
6205         (do_mangle_classname): New function.
6206         (main): Call it. Format changed to accommodate new mangling scheme.
6207         * lex.c: (utf8_cmp): Conditionally prototyped.
6208         (cxx_keywords): Moved from class.c, conditionally defined.
6209         (utf8_cmp, cxx_keyword_p): Likewise.
6210         * mangle.c (obstack.h, ggc.h): Included.
6211         (mangle_field_decl): New function.
6212         (mangle_method_decl, mangle_type, mangle_pointer_type,
6213         mangle_array_type, mangle_record_type,
6214         find_compression_pointer_match, find_compression_array_match,
6215         find_compression_record_match,
6216         find_compression_array_template_match, set_type_package_list,
6217         entry_match_pointer_p, emit_compression_string, init_mangling,
6218         finish_mangling, compression_table_add, mangle_member_name): Likewise.
6219         (mangle_obstack): New global.
6220         (MANGLE_RAW_STRING): New macro.
6221         (unicode_mangling_length): Turned static.
6222         (append_unicode_mangled_name): Renamed from
6223         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
6224         replaces `obstack', removed from the parameter list.
6225         (append_gpp_mangled_name): Turned static. `mangle_obstack'
6226         replaces parameter `obstack', removed from the parameter list. Call
6227         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6228         (append_gpp_mangled_classtype): Removed.
6229         (compression_table, compression_next): New static variables.
6230         * parse.y (temporary_obstack): Extern declaration removed.
6231
6232 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6233
6234         * parse.y (patch_binop): Compute missing type in error situations.
6235
6236 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6237
6238         * class.c (make_class_data): Push initial value for "arrayclass".
6239         * decl.c (init_decl_processing): Add new class field "arrayclass".
6240
6241 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6242
6243         From patha@softlab.ericsson.se:
6244         * parse.y (switch_label): Use build, not build1, to construct
6245         DEFAULT_EXPR.
6246
6247 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6248
6249         * lang.c (lang_decode_option): Change -MA to -MP.
6250         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6251         Update to new prototype; do quote targets.
6252         (jcf_dependency_write): Update.
6253
6254 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
6255
6256         Shorten primitive array allocation path:
6257         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6258         to create new primitive arrays.
6259         * expr.c (build_newarray): If generating native code, call
6260         soft_newarray_node with a reference to the primitive TYPE identifier
6261         instead of type_value.
6262
6263 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
6264
6265         Fix for PRs gcj/312 and gcj/253:
6266         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6267         dest if they arn't already.
6268         * class.c (layout_class): Call maybe_layout_super_class on
6269         superinterfaces also, but only if compiling from bytecode.
6270
6271         Fix for PR gcj/373:
6272         * parse.y (create_class): Set ACC_STATIC if class is declared in an
6273         interface.
6274
6275 2000-12-15  Tom Tromey  <tromey@redhat.com>
6276
6277         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6278         set.
6279
6280 2000-12-14  Andrew Haley  <aph@redhat.com>
6281
6282         * boehm.c (mark_reference_fields): Change test to correctly detect
6283         bitmap overflow.
6284
6285 2000-12-15  Andreas Jaeger  <aj@suse.de>
6286
6287         * config-lang.in (lang_dirs): Added.
6288
6289 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6290
6291         * parse.y (end_artificial_method_body): Fixed undefined behavior.
6292         Credits go to rth for finding it.
6293
6294 2000-12-13  Mike Stump  <mrs@wrs.com>
6295
6296         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6297
6298 2000-11-07  Tom Tromey  <tromey@cygnus.com>
6299
6300         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6301         * lex.c (java_ignorable_control_p): Removed.
6302         (java_letter_or_digit_p): Removed.
6303         (java_start_char_p): New function.
6304         (java_read_char): Return `int', not `unicode_t'.  Changed
6305         callers.
6306         (java_read_unicode): Likewise.
6307         (java_read_unicode_collapsing_terminators): Likewise.
6308         (java_get_unicode): Likewise.
6309         (java_new_lexer): Initialize hit_eof.
6310         (java_parse_end_comment): Take `int' argument.
6311         (java_parse_doc_section): Likewise.
6312         (java_parse_escape_sequence): Don't allow backlash-newline.
6313         Return `int'.
6314         * lex.h (JAVA_DIGIT_P): Removed.
6315         (_JAVA_LETTER_OR_DIGIT_P): Removed.
6316         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6317         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6318         (JAVA_PART_CHAR_P): New macro.
6319         (UEOF): Now -1.
6320         (JAVA_CHAR_ERROR): Now -2.
6321         (java_lexer): New field `hit_eof'.
6322         * chartables.h: New file.
6323         * gen-table.pl: new file.
6324
6325 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6326             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6327
6328         * parse.y (java_complete_lhs): Only allow compound assignment of
6329         reference type if type is String.
6330
6331 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6332
6333         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6334         jcf-path.c: Likewise.
6335
6336 2000-12-09  Anthony Green  <green@redhat.com>
6337
6338         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6339         filestart and filename_length as int values.
6340
6341 2000-12-07  Mo DeJong  <mdejong@redhat.com>
6342
6343         * jcf-io.c (find_class): Correct the logic that tests to see if a
6344         .java file is newer than its .class file. The compiler was
6345         incorrectly printing a warning when file mod times were equal.
6346
6347 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
6348
6349         * jvgenmain.c: Use ISPRINT not isascii.
6350
6351 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6352
6353         * parse.y (end_artificial_method_body): Fixed typo.
6354
6355 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6356
6357         * parse.y (patch_method_invocation): Pick the correct enclosing
6358         context when creating inner class instances.
6359         Fixes gcj/332.
6360
6361 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
6362
6363         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6364         Update copyright year to 2000.
6365
6366 2000-11-23  Anthony Green  <green@redhat.com>
6367
6368         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6369         Move current_file_list out of yyparse and make it static.
6370
6371         * expr.c: Declare quick_stack and tree_list_free_list as static
6372         (init_expr_processing): Register quick_stack and
6373         tree_list_free_list roots.
6374
6375 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6376
6377         * parse.y (build_outer_field_access): New local `decl_ctx', use
6378         it. Check for field's context and current class immediate outer
6379         context inheritance.
6380         (outer_field_access_p): Consider fields inherited from the last
6381         enclosing context.
6382         (build_access_to_thisn): Stop at the last enclosing context if
6383         necessary.
6384         Fixes gcj/367.
6385
6386 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
6387
6388         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6389
6390 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
6391
6392         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6393         scratch buffer.
6394
6395 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6396
6397         * jv-scan.c (help): Document --complexity.
6398         (options): Added --complexity.
6399         (flag_complexity): New global.
6400         (main): Call `report'.
6401         * parse-scan.y (complexity): New global.
6402         (if_then_statement, if_then_else_statement,
6403         if_then_else_statement_nsi, switch_block_statement_group,
6404         while_expression, do_statement, for_begin, continue_statement,
6405         throw_statement, catch_clause, finally, method_invocation,
6406         conditional_and_expression, conditional_or_expression,
6407         conditional_expression): Update complexity.
6408         (reset_report): Reset complexity.
6409         (report): New function.
6410
6411 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6412
6413         * lex.c (yylex): Added STRICT_TK case.
6414         * parse.y (STRICT_TK): Added.
6415         * parse-scan.y (STRICT_TK): Added.
6416         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6417         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
6418         file.
6419         * keyword.h: Rebuilt.
6420         * keyword.gperf (strictfp): Added.
6421
6422 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6423
6424         * lex.c (yylex): Recognize floating point constants with leading
6425         0.
6426
6427 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6428
6429         * java-tree.h (cyclic_inheritance_report): Constify.
6430         * parse.y (cyclic_inheritance_report): Likewise.
6431
6432 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6433
6434         * parse.y (goal): Remove call to ggc_add_string_root.
6435
6436 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6437
6438         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6439         Create string in scratch buffer, then pass to build_string.
6440
6441 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6442
6443         * parse.y (issue_warning_error_from_context): Add
6444         ATTRIBUTE_PRINTF.
6445
6446 2000-11-11  Anthony Green  <green@redhat.com>
6447
6448         * jcf-parse.c (process_zip_dir): Add finput parameter.
6449         (jcf_figure_file_type): Call process_zip_dir with appropriate
6450         argument.
6451
6452 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6453
6454         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6455         * jcf-parse.c (jcf_figure_file_type): Likewise.
6456
6457 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6458
6459         * parse.y (create_new_parser_context): Use memset () instead of
6460         bzero ().
6461
6462 2000-11-08  Tom Tromey  <tromey@cygnus.com>
6463
6464         * gjavah.c (process_file): Only include gcj/cni.h when generating
6465         CNI stubs.
6466
6467 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6468
6469         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6470         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6471         instead of bzero ().
6472
6473 2000-11-05  Tom Tromey  <tromey@cygnus.com>
6474
6475         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6476         * lex.c (IS_ZERO): New define.
6477         (java_perform_atof): Error on floating point underflow.
6478
6479 2000-11-04  Tom Tromey  <tromey@cygnus.com>
6480
6481         * lex.c (java_parse_escape_sequence): Only read two octal
6482         characters if the first one is greater than 3.  Don't allow
6483         "octal" numbers to include the digits 8 or 9.
6484
6485 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6486
6487         * Make-lang.in (java.distdir): Remove.
6488
6489 2000-11-03  Tom Tromey  <tromey@cygnus.com>
6490
6491         * Make-lang.in (java.dvi): New target.
6492         Partial fix for PR other/567.
6493
6494         * lang-options.h: Mention -Wout-of-date.
6495         * jcf-dump.c (flag_newer): New global.
6496         * gjavah.c (flag_newer): New global.
6497         * jcf-io.c (find_class): Only warn when flag_newer set.
6498         * lang.c (flag_newer): New global.
6499         (struct string_option): New declaration.
6500         (lang_W_options): New global.
6501         (process_option_with_no): New function.
6502         (lang_decode_option): Use it.
6503
6504         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6505         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6506         `$'.
6507
6508         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6509         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6510         * lex.c (java_read_unicode): Removed `term_context' argument.
6511         Recognize any number of `u' in `\u'.
6512         (java_read_unicode_collapsing_terminators): New function.
6513         (java_get_unicode): Use it.
6514         (java_lineterminator): Removed.
6515         (yylex): Produce error if character literal is newline or single
6516         quote.  Return if eof found in middle of `//' comment.  EOF in
6517         `//' comment is only an error if pedantic.
6518         (java_ignorable_control_p): New function.
6519         (java_parse_end_comment): Return if eof found in middle of
6520         comment.
6521         Include flags.h.
6522         * jv-scan.c (pedantic): New global.
6523
6524 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6525
6526         * parse.y (outer_field_access_p): Inherited fields aren't
6527         consider outer fields.
6528         (maybe_build_thisn_access_method): Use
6529         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6530         (resolve_expression_name): Trigger an error if a static field
6531         is being accessed as an outer field.
6532
6533 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6534
6535         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6536         Fixes gcj/365.
6537
6538 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6539
6540         * Make-lang.in: Move all build rules here from Makefile.in,
6541         adapt to new context.  Wrap all rules that change the current
6542         directory in parentheses.  Expunge all references to $(P).
6543         When one command depends on another and they're run all at
6544         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6545         all object-file generation rules.  Delete obsolete variables.
6546
6547         * Makefile.in: Delete.
6548         * config-lang.in: Delete outputs= line.
6549
6550 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6551
6552         * parse.y (patch_method_invocation): NULLify this_arg when already
6553         inserted.
6554         (maybe_use_access_method): Handle call to methods unrelated to the
6555         current class. Fixed comment.
6556         Fixes gcj/361.
6557
6558 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6559
6560        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6561        scope.
6562
6563 2000-10-24  Tom Tromey  <tromey@cygnus.com>
6564
6565         * lex.c (java_new_lexer): Initialize new fields.  Work around
6566         broken iconv() implementations.
6567         (java_read_char): Swap bytes if required.  Use fallback decoder if
6568         required.
6569         (byteswap_init, need_byteswap): New globals.
6570         (java_destroy_lexer): Only close iconv handle if it is in use.
6571         * lex.h (java_lexer): New fields read_anything, byte_swap,
6572         use_fallback.
6573         Made out_buffer unsigned.
6574
6575 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6576
6577         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6578         where an enclosing context can be set on the jdep.
6579         (do_resolve_class): Fixed identation.
6580
6581 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6582
6583         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6584
6585         * jcf-reader.c (peek_attribute, skip_attribute): Only define
6586         when requested.
6587
6588         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6589
6590         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6591
6592 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6593
6594         * jcf-write.c (OP1): Update `last_bc'.
6595         (struct jcf_block): Fixed indentation and typo in comments.  New
6596         field `last_bc'.
6597         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6598         follows `monitorenter'.
6599         * parse.y (patch_synchronized_statement): New local `tmp'. Call
6600         `patch_string'.
6601         Fixes gcj/232.
6602
6603 2000-10-16  Tom Tromey  <tromey@cygnus.com>
6604
6605         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6606         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6607         * lang-options.h: Added -MA, -MT, -MF..
6608         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6609         (DEPEND_TARGET_SET): New macro.
6610         (DEPEND_FILE_ALREADY_SET): Likewise.
6611         (init_parse): Handle new flags.
6612         * jcf.h (jcf_dependency_print_dummies): Declare.
6613         * Make-lang.in (s-java): Added mkdeps.o.
6614         * Makefile.in (BACKEND): Added mkdeps.o.
6615         (../gcjh$(exeext)): Added mkdeps.o.
6616         (../jcf-dump$(exeext)): Added mkdeps.o.
6617         * jcf-depend.c: Include mkdeps.h.
6618         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6619         add_entry): Removed.
6620         (jcf_dependency_reset): Rewrote.
6621         (dependencies): New global.
6622         (jcf_dependency_set_target): Rewrote.
6623         (jcf_dependency_add_target): Likewise.
6624         (jcf_dependency_add_file): Likewise.
6625         (munge): Removed.
6626         (print_ents): Removed.
6627         (jcf_dependency_write): Rewrote.
6628         (print_dummies): New global.
6629         (jcf_dependency_print_dummies): New function
6630         (jcf_dependency_write): Call deps_dummy_targets if required.
6631
6632 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6633
6634         * gjavah.c (add_class_decl): Removed unused variables `tname',
6635         `tlen' and `name_index'.
6636         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6637         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6638         in `wfl_operator' with value.
6639         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6640         (jcf_figure_file_type): Fixed identation.
6641         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6642         * parse.y (analyze_clinit_body): New function.
6643         (static_initializer:): Reset `current_static_block'.
6644         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6645         `wfl_operator' with new value.
6646         (lookup_cl): Use EXPR_WFL_FILENAME.
6647         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6648         analyze_clinit_body.
6649         (build_outer_field_access): Access to this$<n> built from
6650         current_class, not its outer context.
6651         (build_access_to_thisn): Fixed leading comment. Tidied things up.
6652         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6653         (patch_method_invocation): Use `is_static_flag' when already
6654         initialized.
6655         (patch_newarray): Removed assignment in ternary operator.
6656
6657 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6658
6659         * except.c (free_eh_ranges): Don't free `whole_range'.
6660
6661 2000-10-15  Anthony Green  <green@redhat.com>
6662
6663         * decl.c (init_decl_processing): Call init_class_processing before
6664         anything else.
6665
6666 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6667
6668         * check-init.c (check_init): Fixed leading comment. Use
6669         LOCAL_FINAL_P.
6670         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6671         (give_name_to_locals): Likewise.
6672         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6673         fields in lang_decl_var.
6674         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6675         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6676         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
6677         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
6678         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
6679         (LOCAL_FINAL): Rewritten.
6680         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
6681         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
6682         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
6683         `init_final' fields.
6684         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
6685         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
6686         (TYPE_HAS_FINAL_VARIABLE): New macro.
6687         (struct lang_type): Added `afv' field.
6688         * parse.y (check_static_final_variable_assignment_flag): New function.
6689         (reset_static_final_variable_assignment_flag): Likewise.
6690         (check_final_variable_local_assignment_flag): Likewise.
6691         (reset_final_variable_local_assignment_flag): Likewise.
6692         (check_final_variable_indirect_assignment): Likewise.
6693         (check_final_variable_global_assignment_flag): Likewise.
6694         (add_inner_class_fields): Use LOCAL_FINAL_P.
6695         (register_fields): Handle local finals and final variables.
6696         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
6697         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6698         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6699         on local finals.
6700         (java_complete_expand_methods): Loop to set
6701         TYPE_HAS_FINAL_VARIABLE. Call
6702         `reset_final_variable_local_assignment_flag' and
6703         `check_final_variable_local_assignment_flag' accordingly before
6704         and after constructor expansion. Call
6705         `reset_static_final_variable_assignment_flag'
6706         before expanding <clinit> and after call
6707         `check_static_final_variable_assignment_flag' if the
6708         current_class isn't an interface. After all methods have been
6709         expanded, call `check_final_variable_global_assignment_flag' and
6710         `check_static_final_variable_assignment_flag' if the current class
6711         is an interface.
6712         (maybe_yank_clinit): Fixed typo in comment.
6713         (build_outer_field_access_methods): Removed old sanity check. Use
6714         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6715         Don't create access methods for finals.
6716         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
6717         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
6718         existing DECL_INIT has been processed.
6719         (java_complete_lhs): Likewise.
6720         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
6721         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
6722         logic.
6723         (patch_assignment): Use LOCAL_FINAL_P.
6724         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
6725         DECL_INITIAL is nullified.
6726         Fixes gcj/163.
6727
6728 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6729
6730         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
6731
6732         * Makefile.in (parse.c, parse-scan.c): Likewise.
6733
6734 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6735
6736         * class.c (temporary_obstack): Remove.
6737         (make_class): Don't mess with obstascks.
6738         (push_class): Likewise.
6739         (set_super_info): Likewise.
6740         (add_method_1): Likewise.
6741         (add_method): Likewise.
6742         (add_field): Likewise.
6743         (build_utf8_ref): Likewise.
6744         (build_class_ref): Likewise.
6745         (build_static_field_ref): Likewise.
6746         (finish_class): Likewise.
6747         (push_super_field): Likewise.
6748         (layout_class): Likewise.
6749         (layout_class_methods): Likewise.
6750         (init_class_processing): Likewise.
6751         * constants.c (get_tag_node): Likewise.
6752         (build_constant_data_ref): Likewise.
6753         * decl.c (ggc_p): Remove.
6754         (copy_lang_decl): Use ggc_alloc.
6755         (complete_start_java_method): Don't mess with obstacks.
6756         (start_java_method): Likewise.
6757         (end_java_method): Likewise.
6758         * except.c (link_handler): Use xmalloc.
6759         (free_eh_ranges): New function.
6760         (method_init_exceptions): Use it.
6761         (add_handler): Use xmalloc.
6762         (expand_start_java_handler): Don't mess with obstacks.
6763         (prepare_eh_table_type): Likewise.
6764         (expand_end_java_handler): Likewise.
6765         * expr.c (push_value): Likewise.
6766         (create_label_decl): Likewise.
6767         (build_jni_stub): Likewise.
6768         (java_lang_expand_expr): Likewise.
6769         (note_instructions): Use xrealloc.
6770         (java_push_constant_from_pool): Don't mess with obstacks.
6771         (process_jvm_instruction): Likewise.
6772         * java-tree.h (cyclic_inheritance_report): Remove duplicate
6773         declaration.
6774         * jcf-parse.c (get_constant): Don't mess with obstacks.
6775         (read_class): Likewise.
6776         (jcf_parse): Likewise.
6777         * lex.c (expression_obstack): Remove.
6778         (java_lex): Don't use obstack_free.
6779         * parse.h (exit_java_complete_class): Don't mess with obstacks.
6780         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
6781         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
6782         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
6783         * parse.y (gaol): Add more GC roots.
6784         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
6785         (lookup_field_wrapper): Likewise.
6786         (obtain_incomplete_type): Don't mess with obstacks.
6787         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
6788         macros.
6789         (craft_constructor): Don't mess with obstacks.
6790         (safe_layout_class): Likewise.
6791         (java_complete_class): Likewise.
6792         (source_end_java_method): Likewise.
6793         (build_outer_field_access_methods): Likewise.
6794         (build_outer_method_access_method): Likewise.
6795         (maybe_build_thisn_access_method): Likewise.
6796         (build_dot_class_method_invocation): Likewise.
6797         (java_complete_tree): Likewise.
6798         (java_complete_lhs): Likewise.
6799         (do_merge_string_cste): Likewise.
6800         (patch_string_cst): Likewise.
6801         (array_constructor_check_entry): Likewise.
6802         * typeck.c (build_java_array_type): Likewise.
6803         (parse_signature_string): Likewise.
6804         (build_java_signature): Likewise.
6805
6806 2000-10-12  Tom Tromey  <tromey@cygnus.com>
6807
6808         Fix for PR gcj/356:
6809         * gjavah.c (add_class_decl): Don't special-case inner classes.
6810         (add_namelet): Likewise.
6811
6812 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
6813
6814         * java-tree.h: Constify current_encoding.
6815         * lang.c: Constify current_encoding.
6816
6817 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
6818
6819         * jvgenmain.c (class_mangling_suffix): Omit `.'.
6820         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
6821
6822 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6823
6824         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
6825         patch. Fixes gcj/340.
6826
6827 2000-10-10  Tom Tromey  <tromey@cygnus.com>
6828
6829         * lex.c (java_new_lexer): Initialize out_first and out_last
6830         fields.
6831         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
6832
6833 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6834
6835         * parse.y (pop_current_osb): New function.
6836         (array_type:): Use `dims:', changed actions
6837         accordingly. Suggested by Anthony Green.
6838         (array_creation_expression:): Used pop_current_osb.
6839         (cast_expression:): Likewise.
6840         (search_applicable_method_list): Fixed indentation.
6841
6842 2000-10-08  Anthony Green  <green@redhat.com>
6843
6844         * parse.y (array_type_literal): Remove production.
6845         (type_literals): Refer to array_type, not array_type_literal.
6846
6847 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6848
6849         Patch contributed by Corey Minyard.
6850         * decl.c (check_local_named_variable): New function.
6851         (tree check_local_unnamed_variable): Likewise.
6852         (find_local_variable): Splitted. Call check_local_{un}named_variable.
6853
6854 2000-10-07  Anthony Green  <green@redhat.com>
6855
6856         * class.c (layout_class): Handle case where superclass can't be
6857         layed out yet.
6858
6859 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6860
6861         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
6862         gperf.
6863
6864 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6865
6866         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
6867         * jvgenmain.c (class_mangling_prefix): Removed.
6868         (class_mangling_suffix): New global.
6869         (main): Use it.
6870         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
6871         `$'.
6872         (print_method_info): Handle overrides for static and final
6873         methods.
6874         (process_file): Generate declaration for class object field.
6875         * class.c (cxx_keywords): New array.
6876         (utf8_cmp): New function.
6877         (cxx_keyword_p): New function.
6878         (layout_class_method): Mangle C++ keywords by appending `$'.
6879         (mangle_field): New function.
6880         (mangle_class_field): Use mangle_field.  Mangle class name as
6881         `class$'.
6882         (mangle_static_field): Use mangle_field.
6883
6884 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6885
6886         * decl.c (find_local_variable): Removed uncessary type check and
6887         fixed range check typo. From Corey Minyard.
6888
6889 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6890
6891         * decl.c (give_name_to_locals): New local `code_offset'. Call
6892         `maybe_adjust_start_pc'.
6893         * expr.c (note_instructions): New function.
6894         (expand_byte_code): Don't collect insn starts here.
6895         (peek_opcode_at_pc): New function.
6896         (maybe_adjust_start_pc): Likewise.
6897         * java-tree.h (maybe_adjust_start_pc): Declare.
6898         (note_instructions): Likewise.
6899         * jcf-parse.c (parse_class_file): Call `note_instructions'.
6900
6901 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6902
6903         * parse.y (field_access:): Fixed indentation.
6904         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
6905
6906 2000-09-07  Tom Tromey  <tromey@cygnus.com>
6907
6908         Fix for PR gcj/307:
6909         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
6910         JPRIMITIVE_TYPE_P, for arithmetic operators.
6911         (patch_method_invocation): Indentation fix.
6912         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
6913         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
6914         (do_unary_numeric_promotion): Cleaned up code.
6915         (valid_cast_to_p): Handle boolean correctly.
6916
6917 2000-09-27  Tom Tromey  <tromey@cygnus.com>
6918
6919         * lex.c (java_read_unicode): Reset bs_count when finished with
6920         `\u' sequence.
6921
6922 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6923
6924         Convert to GC.
6925         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
6926         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
6927         (typeck.o): Depend on ggc.h.
6928         * class.c (add_method_1): Use GC functions for allocation.
6929         (init_class_processing): Register roots.
6930         * decl.c (ggc_p): Set to 1.
6931         (pending_local_decls): Make it static.
6932         (push_jvm_slot): Use GC functions for allocation.
6933         (init_decl_processing): Register roots.
6934         (give_name_to_locals): Use GC functions for allocation.
6935         (lang_mark_tree): New function.
6936         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
6937         functions for allocation.
6938         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
6939         * lex.c (java_lex): Use build_string, rather than replicating it
6940         inline.
6941         * parse.y (goal): Add more roots.
6942         (mark_parser_ctxt): New function.
6943         * typeck.c: Include ggc.h.
6944
6945 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6946
6947         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
6948         contains something else than MODIFY_EXPR.
6949
6950 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
6951
6952         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
6953         * Makefile.in (parse.o): Depend on ggc.h.
6954         (class.o): Likewise.
6955         (constants.o): Likewise.
6956         (decl.o): Likewise.
6957         (expr.o): Likewise.
6958         (jcf-parse.o): Likewise.
6959         (jcf-write.o): Likewise.
6960         (mangle.o): Likewise.
6961         * class.c: Include ggc.h.
6962         (build_static_field_ref): Register GC roots.
6963         (layout_class): Likewise.
6964         (init_class_processing): Likewise.
6965         * constants.c: Include ggc.h.
6966         (current_constant_pool_data_ref): Remove.
6967         (tag_nodes): Move it to ...
6968         (get_tag_node): ... here.  Register GC roots.
6969         * decl.c: Include ggc.h.  Remove many global tree definitions.
6970         (throw_node): Define.
6971         (java_global_trees): Likewise.
6972         (predef_filenames): Make the size a constant.
6973         (init_decl_processing): Adjust accordingly.
6974         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
6975         * expr.c: Include ggc.h.
6976         (init_expr_processing): Register GC roots.
6977         (build_invokeinterface): Likewise.
6978         * java-tree.h: Replace extern tree declarations with macros.
6979         (java_global_trees): New variable.
6980         (java_tree_index): New enumeration.
6981         (init_jcf_parse): Declare.
6982         * jcf-parse.c: Include ggc.h.
6983         (current_class): Remove declaration.
6984         (main_class): Likewise.
6985         (all_class_list): Likewise.
6986         (predefined_filename_p): Adjust for constant size of
6987         predef_filenames.
6988         (init_jcf_parse): New function.
6989         * jcf-write.c: Include ggc.h.
6990         (generate_classfile): Register GC roots.
6991         (append_synthetic_attribute): Likewise.
6992         (append_innerclass_attribute_entry): Likewise.
6993         * lang.c: Include ggc.h.
6994         (lang_print_error): Register GC roots.
6995         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
6996         with macros.
6997         * parse.y: Include ggc.h.
6998         (wfl_operator): Remove.
6999         (goal): Register GC roots.
7000         (java_pop_parser_context): Adjust for new field names.
7001         (java_parser_context_save_global): Likewse.
7002         (java_parser_context_restore_global): Likewise.
7003         (java_parser_context_suspend): Likewise.
7004         (java_parser_context_resume): Likewise.
7005         (verify_constructor_circularity): Register GC roots.
7006         (lookup_cl): Likewise.
7007         (java_reorder_fields): Likewise.
7008         (build_current_this): Likewise.
7009         (class_in_current_package): Likewise.
7010         (argument_types_convertible): Likewise.
7011         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7012
7013 2000-09-14  Tom Tromey  <tromey@cygnus.com>
7014
7015         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7016
7017 2000-09-13  Tom Tromey  <tromey@cygnus.com>
7018
7019         * jcf-parse.c: Include <locale.h>.
7020         * jv-scan.c: Include <locale.h>.
7021
7022 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7023
7024         * expr.c (pop_type_0): Return `Object' if trying to merge two
7025         interface types.
7026         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7027         interface types; `Object' is always a valid supertype.
7028
7029 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7030
7031         Fix for PR gcj/33:
7032         * jv-scan.c (help): Document --encoding.
7033         (options): Added `encoding' entry.
7034         (OPT_ENCODING): New define.
7035         (main): Handle --encoding.
7036         Include <langinfo.h> if nl_langinfo exists.
7037         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7038         --encoding.
7039         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7040         (parse_source_file): Correctly call java_init_lex.  Added `finput'
7041         argument.  Use nl_langinfo to determine default encoding.
7042         * java-tree.h (current_encoding): Declare.
7043         * parse.y (java_parser_context_restore_global): Don't restore
7044         `finput'.
7045         (java_parser_context_save_global): Don't set `finput' field.
7046         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
7047         if required.
7048         * lang.c (current_encoding): New global.
7049         (lang_decode_option): Recognize `-fencoding='.
7050         (finish_parse): Don't close finput.
7051         * parse.h (struct parser_ctxt): Removed `finput' and
7052         `unget_utf8_value' fields.  Added `lexer' field.
7053         (java_init_lex): Fixed declaration.
7054         * lex.c (java_new_lexer): New function.
7055         (java_destroy_lexer): Likewise.
7056         (java_read_char): Added `lex' argument.  Handle iconv case.
7057         (java_read_unicode): Added `lex' argument.  Count backslashes in
7058         lexer structure.
7059         (java_init_lex): Added `finput' and `encoding' arguments.  Set
7060         `lexer' field in ctxp.
7061         (BAD_UTF8_VALUE): Removed.
7062         (java_lex): Handle seeing UEOF in the middle of a string literal.
7063         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7064         (java_lexer): New structure.
7065         (UNGETC): Removed.
7066         (GETC): Removed.
7067         (DEFAULT_ENCODING): New define.
7068         (java_destroy_lexer): Declare.
7069
7070 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7071
7072         Fix for PR gcj/343:
7073         * lex.c (java_init_lex): Initialize java_io_serializable.
7074         * parse.y (java_io_serializable): New global.
7075         (valid_ref_assignconv_cast_p): An array can be cast to
7076         serializable.
7077
7078 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7079
7080         * decl.c, expr.c: Include defaults.h if not already included.
7081         Don't define the *_TYPE_SIZE macros.
7082
7083 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
7084
7085         * typeck.c (build_java_array_type): Correct first parameter
7086         in ADJUST_FIELD_ALIGN invocation.
7087
7088 2000-09-06  Tom Tromey  <tromey@cygnus.com>
7089
7090         * lang-specs.h: Also recognize `-femit-class-files'.
7091
7092 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7093
7094         * verify.c (merge_types): Load the types to merge if necessary.
7095
7096 2000-09-02  Anthony Green  <green@redhat.com>
7097
7098         * jcf-io.c: Include zlib.h.
7099         (open_in_zip): Read compressed class file archives.
7100         * zipfile.h (ZipDirectory): Add uncompressed_size and
7101         compression_method fields.
7102         * zextract.c (read_zip_archive): Collect file compression info.
7103
7104 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
7105
7106         * parse.y (do_resolve_class): Also explore superclasses of
7107         intermediate enclosing contexts when searching for inner classes.
7108
7109 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7110
7111         * parse.y (variable_declarator_id:): Better error message.
7112         (expression_statement:): Use YYNOT_TWICE.
7113         (cast_expression:): Likewise.
7114         (assignment:): Likewise.
7115
7116 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7117
7118         * parse.y (do_merge_string_cste): New locals. Create new
7119         STRING_CSTs each time, use memcpy. Fixes gcj/311.
7120
7121 2000-08-07  Hans Boehm  <boehm@acm.org>
7122
7123         * boehm.c (mark_reference_fields): Set marking bits for all words in
7124         a multiple-word record.
7125         (get_boehm_type_descriptor): Use the procedure marking descriptor for
7126         java.lang.Class.
7127
7128 2000-08-31  Mike Stump  <mrs@wrs.com>
7129
7130         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7131         jcf-dump$(exeext)): Make parallel safe.
7132
7133 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7134
7135         * jcf-parse.c (set_source_filename): Constify a char *.
7136         * jcf-write.c (append_innerclasses_attribute,
7137         make_class_file_name): Constify a char *.  Don't recycle a
7138         variable for an unrelated purpose.
7139         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7140         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7141
7142 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7143
7144         * expr.c (can_widen_reference_to): Fixed indentation.
7145         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7146         * parse.y: `finit$' replaces `$finit$' in comments.
7147         (try_builtin_assignconv): Fixed leading comment.
7148
7149 2000-08-25  Greg McGary  <greg@mcgary.org>
7150
7151         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7152
7153 2000-08-24  Greg McGary  <greg@mcgary.org>
7154
7155         * lang.c (lang_decode_option): Use ARRAY_SIZE.
7156         * parse.y (BINOP_LOOKUP): Likewise.
7157
7158 2000-08-22  Andrew Haley  <aph@cygnus.com>
7159
7160         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7161         sign extending. Fixes gcj/321.
7162         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7163         combining to make a jlong. Fixes gcj/321.
7164
7165 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7166
7167         * lang-specs.h: Do not process -o or run the assembler if
7168         -fsyntax-only.
7169
7170 2000-08-16  Andrew Haley  <aph@cygnus.com>
7171
7172         * typeck.c (build_java_array_type): Rewrite code to do array
7173         alignment.  Take into account back-end macros when aligning array
7174         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7175         user to set alignment. Fixes gcj/252 and 160.
7176
7177 2000-08-09  Tom Tromey  <tromey@cygnus.com>
7178
7179         * parse.y (check_abstract_method_definitions): Now return `int'.
7180         Check implemented interfaces.  Fixes PR gcj/305.
7181
7182         * parse.y (patch_switch_statement): Disallow `long' in switch
7183         expressions.  Fixes PR gcj/310.
7184
7185 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7186
7187         * decl.c (finit_leg_identifier_node): New global.
7188         (init_decl_processing): Use `finit$' to initialize
7189         finit_identifier_node. Use `$finit$' to initialize
7190         finit_leg_identifier_node.
7191         * expr.c (expand_java_field_op): Use ID_FINIT_P.
7192         * java-tree.h (finit_identifier_node): Changed attached comment.
7193         (finit_leg_identifier_node): New declaration.
7194         (ID_FINIT_P): Take finit_identifier_node and
7195         finit_leg_identifier_node into account. This is a backward
7196         compatibility hack.
7197
7198 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7199
7200         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7201         Jan 6 2000 patch.
7202         (generate_bytecode_insns): Check `nargs' before emitting it.
7203         * verify.c (merge_type_state): Fixed typo.
7204         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7205         generate_bytecode_{conditional,insns}.
7206
7207 2000-08-13  Anthony Green  <green@redhat.com>
7208
7209         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7210         for -pg builds).
7211
7212 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7213
7214         * class.c (maybe_layout_super_class): Fixed indentation.
7215         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7216         (java_check_methods): New function declaration.
7217         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7218         instead of `str_ptr'.
7219         * jcf-write.c (generate_bytecode_insns): Emit number the of args
7220         of a `invokeinterface' at the right time.
7221         * parse.h (WFL_STRIP_BRACKET): New macro.
7222         (SET_TYPE_FOR_RESOLUTION): Use it.
7223         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7224         (check_class_interface_creation): Don't check for cross package
7225         innerclass name clashes.
7226         (method_header): Behave properly if MDECL is `error_mark_node'.
7227         (method_declarator): Return `error_mark_node' if bogus current
7228         class.
7229         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7230         (resolve_and_layout): New local `decl_type', set and used. Call
7231         java_check_methods.
7232         (java_check_methods): New method.
7233         (java_layout_classes): Use it.
7234         (resolve_qualified_expression_name): No EH check necessary in
7235         access$<n>.
7236         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7237         `case' statement.
7238         (patch_assignment): Set DECL_INITIAL on integral final local.
7239
7240 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7241
7242         * java-tree.h (flag_extraneous_semicolon): New extern.
7243         * lang-options.h: (-Wextraneous-semicolon): New option.
7244         * lang.c (flag_redundant): Fixed typo in leading comment.
7245         (flag_extraneous_semicolon): New global.
7246         (lang_decode_option): Set `flag_extraneous_semicolon' when
7247         -Wall. Decode `-Wextraneous-semicolon'.
7248         * parse.y (type_declaration:): Removed `SC_TK' hack, added
7249         `empty_statement' rule.
7250         (class_body_declaration): Likewise.
7251         (method_body:): Accept `;' as a method body.
7252         (static_initializer:): Removed `SC_TK' hack.
7253         (constructor_block_end:): Likewise.
7254         (empty_statement:): Report deprecated empty declaration. Fixes
7255         gcj/295
7256
7257 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7258
7259         * parse.y (build_dot_class_method_invocation): Changed parameter
7260         name to `type'. Build signature from `type' and convert it to a
7261         STRING_CST if it's an array.
7262         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7263         to use `ref_type' directly.
7264
7265 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
7266
7267         * lang-options.h: Added a comma after the last element to avoid
7268         syntax errors when other languages define additional options.
7269
7270 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7271
7272         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7273         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7274         (jc1): Link with $(BACKEND).
7275         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7276
7277 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7278
7279         * jvspec.c: Adjust type of second argument to
7280         lang_specific_driver, and update code as necessary.
7281
7282         * class.c (build_dtable_decl): Initialize dummy.
7283
7284 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7285
7286         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7287         method bodies not to rule out discarding `<clinit>'; don't use
7288         <clinit> to initialize static fields with constant initializers.
7289
7290 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7291
7292         * gjavah.c (print_method_info): Added `synth' parameter. Skip
7293         synthetic methods.
7294         (method_synthetic): New global.
7295         (HANDLE_METHOD): Recognize synthetic method and tell
7296         `print_method_info' about it.
7297         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7298         processing a synthetic method.
7299         * jcf-reader.c (skip_attribute): New function.
7300         ( skip_attribute): Likewise.
7301
7302 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7303
7304         * parse.y (build_outer_field_access): Fixed comments.
7305         (fix_constructors): Emit the initialization of this$<n> before
7306         calling $finit$.
7307         (resolve_qualified_expression_name): Build an access to `decl' if
7308         necessary.
7309
7310 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7311
7312         * parse-scan.y (curent_class): Non longer const.
7313         (inner_qualifier, inner_qualifier_length): Deleted.
7314         (current_class_length): New global.
7315         (bracket_count): Fixed typo in leading comment.
7316         (anonymous_count): New global.
7317         (class_instance_creation_expression:): Handle anonymous classes.
7318         (anonymous_class_creation:): New rule.
7319         (push_class_context): Rewritten.
7320         (pop_class_context): Likewise.
7321         (INNER_QUALIFIER): Macro deleted.
7322         (report_class_declaration): call `push_class_context' when
7323         entering the function. `fprintf' format modified not to use
7324         INNER_QUALIFIER.
7325         (report_class_declaration): Assign `package_name' and
7326         `current_class' to NULL separately.
7327
7328 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7329
7330         * expr.c (build_invokeinterface): Call layout_class_methods on
7331         target interface.
7332
7333 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7334             Anthony Green  <green@cygnus.com>
7335             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7336
7337         * class.c (make_class_data): Create vtable for abstract classes.
7338         (get_dispatch_table): Changed to cope with abstract classes.
7339
7340 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7341
7342         * parse.y (patch_method_invocation): Don't reverse the argument
7343         list when dealing with anonymous class constructors. Fixed typo in
7344         comment.
7345
7346 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7347
7348         * parse.y (build_alias_initializer_parameter_list): Reverse
7349         crafted list when building aliases for anonymous class
7350         constructors.
7351
7352 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7353
7354         * parse.y (jdep_resolve_class): Don't bother checking potential
7355         innerclass access if `decl' is NULL.
7356         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7357         WFL.
7358
7359 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7360
7361         * parse.c: Remove (again.)
7362
7363 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7364
7365         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7366         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7367         outside the `if' statement, alias to innerclass removed, `decl'
7368         used to mark the class complete.
7369
7370 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7371
7372         * parse.y (simple_name:): Fixed typo in error message.
7373
7374 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7375
7376         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7377         or its first operand can be error marks.
7378
7379 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7380
7381         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7382         * parse.y (method_header): Likewise.
7383
7384 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7385
7386         * parse.y (process_imports): Consider that one might be trying to
7387         import an innerclass. Fixes gcj/254
7388
7389 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7390
7391         * parse.y (find_as_inner_class): Handle the case where the
7392         enclosing context of an innerclass has been loaded as bytecode.
7393
7394 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7395
7396         * parse.y (simple_name:): Reject `$' in type names.
7397         (resolve_type_during_patch): Use `type' as a second
7398         argument to resolve_no_layout. Fixes gcj/257.
7399
7400 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
7401
7402         * parse.y (find_most_specific_methods_list): Select the only
7403         non-abstract method even if max has been set.
7404         Fixes gcj/285, gcj/298.
7405
7406 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
7407
7408         * lang-specs.h: Added %(jc1) to java compiler options.
7409
7410 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7411
7412         * .cvsignore: New file.
7413
7414 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7415
7416         * parse.y (not_accessible_p): Access granted to innerclasses
7417         (indirectly) extending the reference type. Fixes gcj/249.
7418
7419 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7420
7421         * parse.y (patch_method_invocation): Fixed comment.
7422         (maybe_use_access_method): Build this$<n>s to the context of the
7423         target method, or a type that extends it. Fixes gcj/242.
7424
7425 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7426
7427         * parse.c: Remove.
7428
7429 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7430
7431         * parse.y (fold_constant_for_init): Avoid bullish conversion.
7432
7433 2000-07-13  Tom Tromey  <tromey@cygnus.com>
7434
7435         * lang-specs.h: Added %{I*}.
7436
7437 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7438
7439         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7440
7441 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7442
7443         * parse-scan.c: Remove.
7444
7445 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7446
7447         * class.c (set_super_info): Handled protected inner classes.
7448         (common_enclosing_context_p): Bail early if arguments aren't both
7449         inner classes.
7450         (get_access_flags_from_decl): Handle private and protected inner
7451         classes.
7452         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7453         (CLASS_PROTECTED): Likewise.
7454         (struct lang_type): New bitfield `poic'.
7455         * parse.y (jdep_resolve_class): Call check_inner_class_access on
7456         inner classes only.
7457         (check_inner_class_access): Renamed arguments, added
7458         comments. Handles protected inner classes (fixes gcj/225)
7459         (not_accessible_p): Fixed comments. Avoid handling inner classes.
7460
7461 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7462
7463         * parse.y (resolve_qualified_expression_name): Verify qualified
7464         access to `this'. Fixes gcj/239.
7465
7466 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7467
7468         * jcf-write.c (generate_classfile): Don't install ConstantValue
7469         for null pointers.
7470
7471 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7472
7473         * parse.y (resolve_qualified_expression_name): Handle inner class
7474         access. Fixes gcj/256.
7475
7476 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7477
7478         * jcf-write.c (generate_classfile): Properly install the
7479         ConstantValue attribute and the initial value constant pool index
7480         on string constants.
7481         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7482         class files.
7483
7484 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7485
7486         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7487         construct.
7488         * parse.y (find_as_inner_class): Fixed typo.
7489         (do_resolve_class): Explore enclosing contexts when searching for
7490         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7491         (check_inner_class_access): Check `decl' which can be null in case
7492         of previous errors.
7493
7494 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7495
7496         * java-tree.h (java_debug_context): Declared `extern'.
7497         (safe_layout_class): Likewise.
7498         * parse.y (resolve_field_access): Field must be `static' in order
7499         to be replaced by its initial value. Added comments.
7500         (find_applicable_accessible_methods_list): Fixed typo.
7501         (find_most_specific_methods_list): Methods found in innerclasses
7502         take over methods founds in the enclosing contexts.
7503         (java_complete_tree): Loosen restrictions on the type of DECLs
7504         that can be replaced by their initialization values.
7505         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7506
7507 2000-07-05  Tom Tromey  <tromey@cygnus.com>
7508
7509         * Make-lang.in (PARSE_DIR): New macro.
7510         (PARSE_RELDIR): Likewise.
7511         (PARSE_C): Likewise.
7512         (PARSE_SCAN_C): Likewise.
7513         ($(PARSE_C)): New target.
7514         ($(PARSE_SCAN_C)): Likewise.
7515         (SET_BISON): New macro.
7516         (BISONFLAGS): Likewise.
7517         (JAVABISONFLAGS): Likewise.
7518
7519 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
7520
7521         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7522         argument on the first pass for CNI as well as JNI.
7523         (print_method_info): Set up method name on the first pass only.
7524
7525 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7526
7527         * parse.y (parser_qualified_classname): Removed parameter
7528         `is_static'.
7529         (create_interface): Removed first passed parameter to
7530         parser_qualified_classname.
7531         (create_class): Likewise. Don't install alias on static
7532         innerclasses. Fixes gcj/275.
7533
7534 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7535
7536         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7537         debugable statement with empty_stmt_node. Fixes gcj/272
7538
7539 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7540
7541         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7542         gcj/271.
7543
7544 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7545
7546         * jcf-write.c (push_long_const): Appropriately cast short negative
7547         constant to jword.
7548
7549 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7550
7551         * parse.y (verify_constructor_super): Use loop variable
7552         `m_arg_type' initialized with `mdecl_arg_type'.
7553
7554 2000-06-29  Tom Tromey  <tromey@cygnus.com>
7555
7556         * parse.y (resolve_field_access): Handle case where `type_found'
7557         is NULL.
7558
7559 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7560
7561         * expr.c (lookup_field): The same field can be found through two
7562         different interface. Don't declare it ambiguous in that case.
7563
7564 2000-06-27  Tom Tromey  <tromey@cygnus.com>
7565
7566         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
7567         follows \r, then unget it at a lower level.
7568
7569 2000-06-26  Tom Tromey  <tromey@cygnus.com>
7570
7571         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7572         java_complete_tree.
7573
7574 2000-06-25  Tom Tromey  <tromey@cygnus.com>
7575
7576         * parse.y (for_statement): Wrap expression in a WFL if it is a
7577         constant.  For PR gcj/268.
7578
7579 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7580
7581         * parse.y (do_resolve_class): Minor optimiztion in the package
7582         list search. Removed unnecessary test and return statement.
7583         (valid_ref_assignconv_cast_p): Order of arguments to
7584         enclosing_context_p fixed.
7585
7586 2000-06-24  Tom Tromey  <tromey@cygnus.com>
7587
7588         * expr.c (lookup_field): Print error and return error_mark_node if
7589         field reference is ambiguous.
7590
7591         * parse.y (check_abstract_method_definitions): Also check if
7592         `other_method' is abstract.
7593
7594 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7595
7596         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7597         classes.
7598         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7599         (struct lang_type): New field `pic'.
7600         (CLASS_PRIVATE): New macro.
7601         * parse.y (check_inner_class_access): New function.
7602         (jdep_resolve_class): Call it.
7603
7604 2000-06-23  Tom Tromey  <tromey@cygnus.com>
7605
7606         * parse.y (patch_incomplete_class_ref): Initialize the returned
7607         class.  For PR gcj/260.
7608
7609 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7610
7611         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7612
7613 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7614
7615         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7616         Java specific checks.
7617         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7618         screened by DECL_P.
7619         * java-tree.def (CASE_EXPR): Marked 'e'.
7620         (DEFAULT_EXPR): Likewise.
7621         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7622         screened by DECL_P.
7623         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7624         Java specific checks.
7625         (generate_bytecode_insns): Test try_block for BLOCK before using
7626         BLOCK_EXPR_BODY.
7627         * parse.y (build_wfl_wrap): Added `location' argument. Set
7628         EXPR_WFL_LINECOL accordingly.
7629         (dim_expr:): Wrap constants with WFLs.
7630         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7631         (resolve_package): Check for `stmt' not being a BLOCK before
7632         building a debuggable statement with it.
7633         (make_qualified_primary): Added extra parameter to build_wfl_wrap
7634         invocation.
7635         (resolve_field_access): Make sure `decl' is a DECL before treating
7636         it as such.
7637         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7638         IDENTIFIER_NODE before treating it as such.
7639         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7640         treating it as such.
7641         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7642         to be applied only on non array types.
7643
7644 2000-06-16  Per Bothner  <per@bothner.com>
7645
7646         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
7647         define in terms of DECL_RESULT, as that fails when --enable-checking.
7648
7649 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7650
7651         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
7652         types the same in comparison.
7653         (CHECK_OP): Add static prototype.
7654
7655 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7656
7657         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7658         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7659         * parse.c: Rebuilt.
7660
7661 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7662
7663         * decl.c (create_primitive_vtable): Prototype.
7664
7665         * jcf-write.c (generate_bytecode_insns): Initialize variable
7666         `saved_context'.
7667
7668         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7669
7670 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7671
7672         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7673         to track searched classes, and do not search the same class more than
7674         once. Call find_applicable_accessible_methods_list on immediate
7675         superclass, instead of search_applicable_method_list on all ancestors.
7676         Fix for PR gcj/238.
7677
7678 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7679
7680         * parse.y (register_fields): Permit static fields in inner classes
7681         if they are final. Fix for PR gcj/255.
7682
7683 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7684
7685         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
7686         * parse.y (find_in_imports): Returned type changed to void,
7687         leading comment fixed.
7688         (register_package): New function.
7689         (qualify_and_find): Likewise.
7690         (package_declaration:): Use `register_package'.
7691         (single_type_import_declaration:): Removed local variable
7692         `node'. Added missing `;' for consistency.
7693         (type_import_on_demand_declaration:): Use `chainon' to link new
7694         entries.
7695         (lookup_field_wrapper): Lookup local variables defined in outer
7696         contexts first.
7697         (java_complete_class): Don't reverse the list of imported on demand.
7698         (do_resolve_class): Reorganized. Removed local variable
7699         `original_name'. Call `qualify_and_find' with the current package
7700         name, invoke `find_in_imports_on_demand' right after. Call
7701         `qualify_and_find' with the packages we've seen so far. Fixed
7702         operations numbering in comments.
7703         (java_expand_class): Don't reverse `package_list'.
7704         (find_most_specific_methods_list): New local variables `abstract'
7705         and `candidates'. Use them to pick the right method.
7706
7707 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
7708
7709         * parse.y (check_modifiers_consistency): Don't subtract out
7710         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
7711
7712 2000-06-04  Philipp Thomas  <pthomas@suse.de>
7713
7714         * Makefile.in (INTLLIBS): New.
7715         (LIBS): Add above.
7716         (DEPLIBS): Ditto.
7717
7718 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7719
7720         * class.c (get_dispatch_table): Build the vtable dummy entry list
7721         element with a null purpose. Fixed leading comment.
7722         (build_dtable_decl): Build an accurate dtable type when appropriate
7723         and use it.
7724
7725 2000-06-02  Richard Henderson  <rth@cygnus.com>
7726
7727         * lang.c (lang_get_alias_set): New.
7728
7729 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7730
7731         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
7732         before using it as the accessed field.
7733
7734 2000-05-31  Tom Tromey  <tromey@cygnus.com>
7735
7736         * java-tree.h (boolean_array_vtable, byte_array_vtable,
7737         char_array_vtable, short_array_vtable, int_array_vtable,
7738         long_array_vtable, float_array_vtable, double_array_vtable):
7739         Declare.
7740         * expr.c (get_primitive_array_vtable): New function.
7741         (create_primitive_vtable): New function.
7742         (java_lang_expand_expr): Enable code to statically generate
7743         arrays.
7744         * decl.c (init_decl_processing): Create primitive vtables.
7745         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
7746         short_array_vtable, int_array_vtable, long_array_vtable,
7747         float_array_vtable, double_array_vtable): Define.
7748
7749 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
7750
7751         * java/parse.y (find_applicable_accessible_methods_list):
7752         Don't add an uninitialized value to the list.
7753
7754 2000-05-25  Tom Tromey  <tromey@cygnus.com>
7755
7756         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
7757         when trying to see if field's class should be initialized.  Always
7758         initialize field's declaring class, not qualified class.
7759         For PR gcj/162.
7760
7761         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
7762         `wfl_operator', to maybe_build_primttype_type_ref.
7763         Fixes PR gcj/235.
7764
7765 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
7766
7767        * parse.y (patch_method_invocation): Don't try to lookup methods
7768        in primitive types.
7769
7770 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7771
7772         * parse.y (resolve_field_access): Call the appropriate <clinit>
7773         before accessing the length of a static array. Craft a decl for
7774         the field while its time. Fixes PR gcj/129.
7775
7776 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7777
7778         * parse.y (resolve_package): Correctly set `*next' (was off by
7779         one.)
7780         (resolve_qualified_expression_name): Fixed comment.
7781
7782 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7783
7784         * jcf-parse.c (jcf_parse_source): Reset current_class and
7785         current_function_decl to NULL before parsing a new file.
7786
7787 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7788
7789         * parse.y (block_end:): If the collected block doesn't feature a
7790         statement, insert an empty statement.
7791
7792 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7793
7794         * parse.y (maybe_yank_clinit): New function.
7795         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
7796         end of the list of methods belonging to a class.
7797         (java_complete_expand_method): Check whether <clinit> is really
7798         necessary and expand it accordingly.
7799
7800 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7801
7802         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
7803         processed by the method's switch statement.
7804
7805 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7806
7807         * java-tree.h: Added init state enum.
7808         * decl.c (emit_init_test_initialization): Initialize class
7809         initialization check variable by looking at class' state.
7810
7811 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7812
7813         * java-tree.h (build_instanceof): Declare.
7814         (build_get_class): Declare.
7815         * parse.y (patch_binop): Use build_instanceof.
7816         * expr.c (build_instanceof): New function.  If class is final,
7817         don't make a function call.
7818         (expand_java_INSTANCEOF): Use it.
7819         (build_get_class): New function.
7820
7821 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
7822
7823         * jcf-write.c (generate_classfile): Scan the source_file for
7824         slashes with the right pointer variable.
7825
7826 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
7827
7828         * lang.c (lang_decode_option): Update -Wunused flags by calling
7829         set_Wunused.
7830         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
7831
7832 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7833
7834         * check_init.c (check_init): Constify local char *.
7835         * class.c (push_class): Constify local char *.
7836         * java_tree.h: Update prototypes.
7837         * jcf-io.c (open_class): Constify filename parameter and
7838         return value.
7839         (find_class): Remove redundant string copy.  Cast return from
7840         open_class.
7841         * jcf-parse.c (read_class, parse_class_file, yyparse):
7842         Constify local char *.
7843         * jcf-write.c (generate_bytecode_insns, generate_classfile):
7844         Constify local char *.
7845         * jcf.h (JCF): Constify filename and classname.
7846         (JCF_FINISH): Cast args to FREE to char * when appropriate.
7847         * lang.c (init_parse): Constify parameter and return value.
7848         * lex.c (java_get_line_col): Constify filename parameter.
7849         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
7850         * parse.y (java_parser_context_suspend,
7851         issue_warning_error_from_context, safe_layout_class): Constify
7852         local char *.
7853         * parse.c: Regenerate.
7854
7855 2000-05-08  Tom Tromey  <tromey@cygnus.com>
7856
7857         * expr.c (build_jni_stub): Cache the result of
7858         _Jv_LookupJNIMethod.
7859
7860 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7861
7862         * decl.c (predef_filenames_size): Now 7.
7863         (predef_filenames): New seventh entry.
7864
7865 2000-05-04  Tom Tromey  <tromey@cygnus.com>
7866
7867         * boehm.c (mark_reference_fields): Don't mark RawData fields.
7868         Keep track of when we've seen a reference field after a
7869         non-reference field.
7870         (get_boehm_type_descriptor): Handle case where we see
7871         non-reference fields but no trailing reference field.
7872         * decl.c (rawdata_ptr_type_node): Define.
7873         (init_decl_processing): Initialize rawdata_ptr_type_node.
7874         * java-tree.h (rawdata_ptr_type_node): Declare.
7875
7876 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7877
7878         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
7879         specifiers in calls to fprintf.
7880
7881 2000-05-03  Andrew Haley  <aph@cygnus.com>
7882
7883         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
7884
7885         * javaop.h (WORD_TO_INT): New function.
7886         (IMMEDIATE_s4): Use WORD_TO_INT.
7887         * jcf.h (JPOOL_INT): Ditto.
7888
7889         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
7890         separator.
7891
7892 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7893
7894         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
7895         on native function.
7896         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
7897         JNI methods.
7898         * expr.c (build_jni_stub): New function.
7899         * lang-specs.h: -fjni and -femit-class-file are incompatible.
7900         * parse.c: Rebuilt.
7901         * parse.y (java_complete_expand_methods): Expand a native method
7902         and call build_jni_stub if -fjni given.
7903         * lang-options.h: Document -fjni.
7904         * lang.c (flag_jni): New global.
7905         (lang_f_options): Added `jni' entry.
7906         * java-tree.h (soft_lookupjnimethod_node,
7907         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
7908         Declare.
7909         (flag_jni): Declare.
7910         (build_jni_stub): Declare.
7911         (struct lang_decl): Added `native' flag.
7912         (METHOD_NATIVE): Redefined to use `native' field of lang specific
7913         structure.
7914         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
7915         soft_jnipopsystemframe_node): New globals.
7916         (init_decl_processing): Set them.  _Jv_InitClass only takes one
7917         argument.
7918
7919         * java-tree.def: Put into `C' mode.
7920
7921 2000-04-27  Tom Tromey  <tromey@cygnus.com>
7922
7923         Fix for PR gcj/2:
7924         * expr.c (expand_invoke): Generate check to see if object pointer
7925         is null in nonvirtual invocation case.
7926         * java-tree.h (soft_nullpointer_node): Declare.
7927         * decl.c (soft_nullpointer_node): New global.
7928         (init_decl_processing): Initialize soft_nullpointer_node.
7929         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7930         or `private' methods.
7931         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7932
7933 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7934
7935         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
7936         from <clinit>
7937
7938 2000-04-26  Tom Tromey  <tromey@cygnus.com>
7939
7940         * zextract.c (find_zip_file_start): New function.
7941         (read_zip_archive): Use it.
7942
7943 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7944
7945         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
7946
7947 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7948
7949         * class.c (common_enclosing_context_p): New function.
7950         * java-tree.h (common_enclosing_context_p): Added prototype.
7951         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
7952         classes sharing an outer context with the current instance.
7953         * parse.y (build_access_to_thisn): Fixed leading comment.
7954         (verify_constructor_super): New local `supper_inner'. Skip
7955         enclosing context argument in the case of inner class constructors.
7956         (patch_method_invocation): Insert proper context as second
7957         parameter to pure inner class constructor super invocations.
7958
7959 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7960
7961         * parse.y (end_class_declaration): Reset the interface number
7962         counter.
7963
7964 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7965
7966         * parse.y (source_start_java_method): Deleted unnecessary code.
7967         (patch_method_invocation): Fixed comment.
7968
7969 2000-04-24  Robert Lipe <robertlipe@usa.net>
7970
7971         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
7972
7973 2000-04-23  Tom Tromey  <tromey@cygnus.com>
7974
7975         * boehm.c (mark_reference_fields): Use int_byte_position.
7976
7977 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7978
7979         * boehm.c (mark_reference_fields): Only call byte_position on
7980         non-static fields.
7981
7982 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7983
7984         * boehm.c (mark_reference_fields): Added `last_view_index'
7985         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
7986
7987 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
7988
7989         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
7990         * parse.y (check_class_interface_creation): Fixed comments. Select
7991         permitted modifiers for (inner) interfaces. Changed error message
7992         to report rejected modifiers used with local classes.
7993
7994 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7995
7996         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
7997         of directly inherited type considered in scope.
7998         * parse.y (do_resolve_class): Search inherited classes for inner
7999         classes.
8000
8001 2000-04-20  Tom Tromey  <tromey@cygnus.com>
8002
8003         * parse.y (not_accessible_p): Use member's class, not current
8004         class, when doing inheritance check for protected reference.
8005         Fixes PR gcj/124.
8006
8007 2000-04-20  Jason Schroeder  <shrode@subnature.com>
8008
8009         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8010
8011 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8012
8013         * parse.y (lookup_field_wrapper): Search for final local aliases.
8014         (resolve_expression_name): Let lookup_field_wrapper search for
8015         final local aliases. Force the value of `name' if one is found.
8016         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8017         an expression name. Fixed comments.
8018
8019 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8020
8021         * parse.y (yyerror): `msg' can be null, don't use it in that case.
8022
8023 2000-04-19  Tom Tromey  <tromey@cygnus.com>
8024
8025         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8026
8027 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8028
8029         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8030
8031 2000-04-18  Tom Tromey  <tromey@cygnus.com>
8032
8033         PR gcj/211:
8034         * gjavah.c (utf8_cmp): Changed return value.
8035         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
8036         result.
8037         (cxx_keywords): New global.
8038         (get_field_name): Handle new result of cxx_keyword_subst.
8039         (print_method_info): Likewise.
8040
8041 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
8042
8043         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8044         with a newline, for CNI.
8045         (print_stub_or_jni): Print a space or newline before method name for
8046         CNI as well as JNI.
8047         (print_cxx_classname): Don't write leading "::" in CNI stub method.
8048         (process_file): Include gcj/cni.h if generating CNI stubs.
8049
8050 2000-04-16  Tom Tromey  <tromey@cygnus.com>
8051
8052         * gjavah.c (decompile_method): Use print_field_name.
8053         Fixes PR gcj/205.
8054
8055 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8056
8057         * parse.y (java_expand_classes): Reverse the package list once.
8058         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8059         reduction.
8060         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8061         the `==' and `!=' operators.
8062
8063 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8064
8065         * jcf-write.c (generate_bytecode_insns): At invocation time,
8066         always relate an interface method to the type of its selector.
8067
8068 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8069
8070         Fix for PR gcj/2:
8071         * expr.c (expand_invoke): Generate check to see if object pointer
8072         is null in nonvirtual invocation case.
8073         * java-tree.h (soft_nullpointer_node): Declare.
8074         * decl.c (soft_nullpointer_node): New global.
8075         (init_decl_processing): Initialize soft_nullpointer_node.
8076         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8077         or `private' methods.
8078         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8079
8080 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8081
8082         Fix for PR gcj/140:
8083         * parse.y (check_final_assignment): Recognize assignments to the
8084         `length' field of an array when generating class files.
8085
8086 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8087
8088         * class.c (decl_hash): Prototype removed.
8089         (decl_compare): Likewise.
8090
8091 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8092
8093         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8094         * parse.y (check_modifiers_consistency): Check for final/volatile
8095         clash.  Fixes PR gcj/164.
8096
8097 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8098
8099         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8100         made global.
8101         (java_hash_compare_tree_node): Renamed from `decl_compare, made
8102         global.
8103         (add_method_1): Use `java_hash_hash_tree_node' and
8104         `java_hash_compare_tree_node'.
8105         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8106         (java_hash_compare_tree_node): Likewise.
8107         * parse.y (find_applicable_accessible_methods_list): Create,
8108         delete and use a hash table to remember already searched interfaces.
8109
8110 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
8111
8112         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8113         with latest entry.
8114
8115 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8116
8117         * boehm.c (mark_reference_fields, set_bit): Prototype.
8118         (set_bit): Un-ANSI-fy definition.
8119
8120         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8121         Prototype.
8122
8123         * decl.c (emit_init_test_initialization): Likewise.
8124
8125         * gjavah.c (jni_print_char): Likewise.
8126
8127         * parse.y (create_new_parser_context): Likewise.
8128
8129 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8130
8131         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8132         patch missing hunk. Fixed indentation.
8133
8134 2000-03-30  Tom Tromey  <tromey@cygnus.com>
8135
8136         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8137         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8138
8139 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8140
8141         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8142         when negative *before* using it as an array index.
8143         * ChangeLog: Fixed typo.
8144
8145 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8146
8147         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8148         to 0 when it reaches -1.
8149
8150 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8151
8152         * jcf-parse.c (get_constant): Properly cast `num' during the
8153         invocation of `add_double'.
8154         * jcf-write.c (push_long_const): Properly cast `lo' before
8155         comparing it to short bounds.
8156         * parse-scan.y (interface_declaration:): Rule re-arrange so that
8157         `interface_body:' is reduced after the current interface is
8158         pushed.
8159
8160 2000-03-26  Tom Tromey  <tromey@cygnus.com>
8161
8162         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8163         Java-specific `-f' option.
8164
8165 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8166
8167         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8168         Adjust order of making types.
8169         Make bitsize_*_node values.
8170
8171 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8172
8173         * class.c (make_field_value): Use byte_position.
8174         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8175         (java_array_data_offset): Likewise.
8176         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8177         bzero call.
8178
8179 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8180
8181         * parse.y (check_abstract_method_definitions): New local
8182         `end_type_reached'. Make sure we also consider `end_type'.
8183         (java_check_abstract_method_definitions): Make sure we eventually
8184         consider `java.lang.Object'.
8185         (maybe_use_access_method): Don't use access method if not in the
8186         context of a pure inner class or if the method's context is right.
8187         (find_applicable_accessible_methods_list): New static flag
8188         `object_done'. Don't search abstract classes as interfaces. Fixed
8189         indentation. Fixed the `java.lang.Object' only search. Search
8190         class interface(s) first, then fully search enclosing contexts.
8191         (find_most_specific_methods_list): Pick the closest candidate when
8192         they're all abstract.
8193
8194 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8195
8196         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8197         properly initialize `finished_label'. Don't emit gotos for empty
8198         try statements.
8199
8200 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8201
8202         * except.c (emit_handlers): Clear catch_clauses_last.
8203
8204 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8205
8206         * parse.y (check_method_types_complete): New function.
8207         (create_class): Reset anonymous class counter only when seeing an
8208         non inner classe.
8209         (java_complete_class): JDEP_METHOD: Don't recompute signature
8210         if incomplete.
8211
8212 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8213
8214         * class.c (build_static_ref): Fixed indentation in comment.
8215         * java-tree.def (TRY_EXPR): Fixed typo in name.
8216         (CLASS_LITERAL): Likewise.
8217         * java-tree.h: (TYPE_DOT_CLASS): New macro.
8218         (struct lang_type): New field `dot_class'.
8219         * jcf-write.c (generate_bytecode_insns): Fixed error message.
8220         (generate_classfile): Method `class$' is synthetic.
8221         * parse.y (build_do_class_method): New function.
8222         (build_dot_class_method_invocation): Likewise.
8223         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8224         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8225         (qualify_ambiguous_name): Likewise.
8226         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8227         (build_try_statement): Fixed leading comment.
8228
8229 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8230
8231         * class.c (make_field_value): Properly handle sizes.
8232         (get_dispatch_vector): Use tree_low_cst and host_integerp.
8233         (layout_class_method): Count using trees.
8234         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8235         * expr.c (java_array_data_offset): Use int_bit_position.
8236         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8237         (build_invokevirtual): Use tree_low_cst and do computations with trees.
8238
8239 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8240
8241         * lang.c (flag_hash_synchronization): New global.
8242         (lang_f_options): Added `hash-synchronization'.
8243         * lang-options.h: Mention -fhash-synchronization.
8244         * java-tree.h (flag_hash_synchronization): Declare.
8245         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8246         hash table synchronization is disabled.
8247         * decl.c (init_decl_processing): Only push `sync_info' value when
8248         hash table synchronization is disabled.
8249         * class.c (make_class_data): Only push `sync_info' field when hash
8250         table synchronization is disabled.  Removed dead code.
8251
8252 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8253
8254         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8255
8256 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8257
8258         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8259         classes.
8260         * parse.y (patch_method_invocation): Handle anonymous classes
8261         creation in static context.
8262
8263 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8264
8265         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8266         * parse.y (resolve_qualified_expression_name): Use it.
8267         (patch_method_invocation): Likewise.
8268
8269 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8270
8271         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8272         depending on the type of dependency which dictates what the
8273         current class is.
8274         (unresolved_type_p): Resolved types limited to the current class.
8275
8276 2000-03-15  Tom Tromey  <tromey@cygnus.com>
8277
8278         * decl.c (init_decl_processing): Set type of `sync_info' to be
8279         pointer to Object.
8280
8281         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8282         Correctly compute bit number for current slot.  Zero `high' and
8283         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
8284         mark_reference_fields.
8285         (mark_reference_fields): New function.
8286
8287 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8288
8289         * parse.y (register_incomplete_type): Fixed initialization of
8290         JDEP_ENCLOSING.
8291
8292 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8293
8294         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8295         static globals.
8296         (push_class_context, pop_class_context): New function.
8297         (class_body:): Call pop_class_context.
8298         (interface_body:): Likewise.
8299         (INNER_QUALIFIER): New macro.
8300         (report_class_declaration): Changed output format and use
8301         INNER_QUALIFIER. Call push_class_context.
8302
8303 2000-02-14  Andrew Haley  <aph@cygnus.com>
8304
8305         * check-init.c (check_init): Add new cases for unary and binary
8306         tree nodes.
8307
8308 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8309
8310         * parse.y (resolve_package): Set `next' once a type name has been
8311         progressively discovered.
8312         (resolve_qualified_expression_name): Propagate resolution only if
8313         there are remaining qualifiers. Take into account `q' might have
8314         been cleared after re-qualification.
8315         * parse.y (patch_method_invocation): New local `resolved'.
8316         Section dealing with qualified expression rewritten to use
8317         resolve_field_access.
8318
8319 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8320
8321         * parse.h (PUSH_CPC): Fixed indentation.
8322         (DEBUG_CPC): New macro.
8323         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8324         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8325         * parse.y (class_body_declaration:): Use
8326         SET_CPC_INSTANCE_INITIALIZER_STMT.
8327         (method_declaration:): Check for null current_function_decl.
8328         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8329         (java_parser_context_pop_initialized_field): Better handling of
8330         empty lists.
8331         (maybe_make_nested_class_name): Mark nested class name as
8332         qualified when necessary.
8333         (end_class_declaration): Don't call java_parse_context_resume when
8334         one or more error occurred.
8335         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8336         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8337         SET_CPC_INITIALIZER_STMT.
8338         (method_header): Check for inner classes declaring static methods.
8339         (resolve_qualified_expression_name): Handle situation where `this'
8340         is implied.
8341
8342 2000-03-13  Hans Boehm <boehm@acm.org>
8343
8344         * typeck.c (build_prim_array_type): Correctly set the high word too.
8345
8346 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8347
8348         * parse.y (java_complete_expand_methods): Leave <clinit> out of
8349         ordinary methods.
8350         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8351         list of methods for interfaces.
8352
8353 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8354
8355         * parse.y (qualify_ambiguous_name): Properly handle expressions
8356         using `null'.
8357
8358 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8359
8360         * parse.y (check_final_assignment): Extended to process
8361         COMPOUND_EXPR.
8362         (patch_assignment): Have check_final_assignment called only once.
8363
8364 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8365
8366         * java-tree.h (IS_INIT_CHECKED): New flag.
8367         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8368         * parse.y (patch_string): Call force_evaluation_order on the
8369         completed string concatenation tree.
8370         * expr.c (force_evaluation_order): Call force_evaluation_order on
8371         function's arguments too.
8372
8373 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8374
8375         * decl.c (emit_init_test_initialization): Mark KEY as unused.
8376         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8377         (build_anewarray): Likewise.
8378         * parse.y (patch_newarray): Likewise.
8379         * parse.c: Regenerated.
8380
8381 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
8382
8383         * decl.c (init_decl_processing): Added new class fields `depth',
8384         `ancestors', and `idt' to class_type_node. Use
8385         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8386         * class.c (make_class_data): Push initial values for new fields.
8387         * java-tree.h: Updated prototype for `build_invokeinterface'.
8388         * expr.c (build_invokeinterface): Changed parameters to accept
8389         `method' tree. Calculate index of `method' in its declaring
8390         interface. Build call to _Jv_LookupInterfaceMethodIdx.
8391         (expand_invoke): Call `build_invokeinterface' with new parameters.
8392         * parse.y (patch_invoke): Call `build_invokeinterface' with new
8393         parameters.
8394
8395 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
8396
8397         * typeck.c (lookup_do): Search superinterfaces first
8398         when looking up an interface method. From Godmar Back
8399         <gback@cs.utah.edu>
8400
8401 2000-03-06  Tom Tromey  <tromey@cygnus.com>
8402
8403         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8404
8405 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8406
8407         * java-tree.h (lookup_argument_method2): Declared.
8408         (safe_layout_class): Prototype moved from parse.h.
8409         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8410         * parse.y (java_check_regular_methods): Local `super_class' gone.
8411         Call lookup_argument_method2 instead of lookup_argument_method.
8412         Perform modifier match for methods found declared in implemented
8413         interfaces. Fixed indentation problem. Overriding/hiding error
8414         report to take place only for methods found in classes.
8415         * typeck.c (lookup_argument_method): Changed leading
8416         comment. Re-written by calling lookup_do.
8417         (lookup_argument_method2): New function.
8418         (lookup_java_method): Re-written by calling lookup_do.
8419         (lookup_do): New function.
8420
8421 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8422
8423         * check-init.c (check_init): Removed dead code. Handle (blank)
8424         final variables.
8425         * parse.y (declare_local_variables): New local `final_p', set it
8426         and use it to initialize LOCAL_FINAL.
8427         (check_final_assignment): Only check FIELD_DECLs.
8428
8429 2000-02-17  Tom Tromey  <tromey@cygnus.com>
8430
8431         * Makefile.in (JAVA_OBJS): Added boehm.o.
8432         (boehm.o): New target.
8433         * Make-lang.in (JAVA_SRCS): Added boehm.c.
8434         * java-tree.h (flag_use_boehm_gc): Declare.
8435         (get_boehm_type_descriptor): Declare.
8436         * lang.c (lang_f_options): Added `use-boehm-gc'.
8437         (flag_use_boehm_gc): New global.
8438         * lang-options.h: Added -fuse-boehm-gc.
8439         * boehm.c: New file.
8440         * class.c (get_dispatch_table): If class uses a Boehm type
8441         descriptor, put it in the vtable.
8442         (make_class_data): Removed dead code.
8443
8444 2000-03-03  Per Bothner  <per@bothner.com>
8445
8446         * decl.c (init_decl_processing):  Initialize sizetype properly.
8447
8448 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8449
8450         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8451         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8452         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8453         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8454         (jcf_parse): New local `current'. Load innerclasses seen in outer
8455         context being processed.
8456         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8457         * jcf-write.c (append_innerclasses_attribute): New function.
8458         (append_innerclasses_attribute_entry): Likewise.
8459         (get_access_flags): Handle static classes. Set anonymous and local
8460         classes to be private.
8461         (generate_classfile): Attribute count adjusted. Call
8462         append_innerclasses_attribute.
8463         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8464         PURE_INNER_CLASS_TYPE_P.
8465         * parse.y (parser_qualified_classname): New parameter `is_static',
8466         produce non qualified name accordingly.
8467         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8468         (create_interface): Added argument to parser_qualified_classname.
8469         (create_class): Added argument to parser_qualified_classname. Setup
8470         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8471         (add_inner_class_fields): Fixed indentation.
8472         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8473         (method_declarator): Fixed typo in comment.
8474         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8475         (build_current_thisn): Likewise.
8476         (patch_method_invocation): Likewise.
8477
8478 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8479
8480         * decl.c (current_function_decl): Move to toplev.c.
8481
8482 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8483
8484         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8485         (DECL_BIT_INDEX): Use underlying representation.
8486         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8487
8488 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8489
8490         * expr.c (build_java_ret): Pass proper type to size_binop.
8491
8492 2000-02-25  Anthony Green  <green@cygnus.com>
8493
8494         * expr.c (build_class_init): Mark the decl to be ignored by
8495         check_init.
8496         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8497         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8498         * class.c (init_test_hash_newfunc): New function.
8499         (decl_hash): New function.
8500         (decl_compare): New function.
8501         * decl.c (emit_init_test_initialization): New function.
8502         (complete_start_java_method): Traverse the init test hashtable,
8503         calling emit_init_test_initialization.
8504         (always_initialize_class_p): Define.
8505         * expr.c (build_class_init): Use initialization tests when
8506         emitting class initialization code.
8507         (always_initialize_class_p): Declare.
8508         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8509         1.
8510         * java-tree.h: Include hash.h.
8511         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8512         (struct lang_decl): Add init_test_table field.
8513         (init_test_hash_entry): Define.
8514
8515 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8516
8517         * gjavah.c (main): Avoid using `argi' to report unimplemented
8518         options.
8519
8520 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8521
8522         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8523         initialize locals to avoid warnings. Local `exception_type' moved
8524         into if statement.
8525
8526 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8527
8528         * parse.y (resolve_expression_name): Use `orig' as a second
8529         argument to resolve_field_access.
8530         (resolve_field_access): Removed unnecessary code when dealing with
8531         static fields.
8532
8533 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8534
8535         * class.c (push_super_field): Don't push the field twice.
8536         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8537         * parse.h (java_reorder_fields): Prototyped.
8538         * parse.y (java_reorder_fields): New function.
8539         (java_layout_class): Simplified not to worry about re-ordering.
8540
8541 2000-02-23  Tom Tromey  <tromey@cygnus.com>
8542
8543         * gjavah.c (print_name): In JNI case, correctly quote string.
8544         (print_method_info): Don't handle overrides in JNI mode.
8545
8546 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8547
8548         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8549         value type set to `boolean_type_node'.
8550
8551 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8552
8553         * jcf-dump.c (main): Test for correct condition after
8554         output file creation.
8555
8556 2000-02-19  Anthony Green  <green@cygnus.com>
8557
8558         * jcf-depend.c (add_entry): Fix test for first list entry.
8559
8560 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8561
8562         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8563         * constants.c (build_constants_constructor): Likewise.
8564
8565 2000-02-19  Anthony Green  <green@cygnus.com>
8566
8567         * jcf-depend.c (add_entry): Add entries to the end of the list.
8568
8569 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
8570
8571         * decl.c (INT_TYPE_SIZE): Define if necessary.
8572         (expand_java_return): Handle the case of a native integer smaller
8573         than a JVM integer.
8574
8575 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8576
8577         * gjavah.c (help): Use GCCBUGURL.
8578         * jv-scan.c (help): Likewise.
8579         * jcf-dump.c (help): Likewise.
8580
8581 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8582
8583         * jcf-write.c (generate_bytecode_insns): Don't generate empty
8584         `finally' clauses.
8585
8586 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8587
8588         * jcf-parse.c (load_class): Call `fatal' if no file containing
8589         the target class are found.
8590
8591 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
8592
8593         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8594         lex.c, lex.h, and PARSE_H to...
8595         (parse.o, parse-scan.o): ...here, respectively.
8596
8597         * lex.c: Split out code that may trigger SIGFPE from yylex()
8598         to its own function.
8599         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8600
8601 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8602
8603         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8604
8605 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8606
8607         * parse.y (outer_field_access_p): Stop in time when outer contexts
8608         are exhausted.
8609         (resolve_qualified_expression_name): Properly qualify *everything*
8610         after a package.type to be resoled as expression names.
8611         (find_applicable_accessible_methods_list): Save/restore `class' to
8612         isolate it from a possible outer context search.
8613
8614 2000-02-15  Tom Tromey  <tromey@cygnus.com>
8615
8616         * gjavah.c (jni_print_char): New function.
8617         (print_full_cxx_name): Use it.
8618         (decode_signature_piece): Likewise.
8619         (print_cxx_classname): Likewise.
8620
8621 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8622
8623         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8624         version.o.
8625         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8626
8627         * gjavah.c: Include version.h.
8628
8629         * jcf-dump.c: Likewise.
8630
8631         * jv-scan.c: Likewise.
8632
8633 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8634
8635         * parse.y (outer_field_access_fix): First parameter now a tree
8636         node. Check for assignment to final. First argument to
8637         build_outer_field_access_fix modified to accommodate prototype.
8638         (build_outer_field_access): Don't check for assignment to final
8639         here.
8640         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8641         possibly returned by outer_field_access_fix. Changed
8642         outer_field_access_fix's first argument.
8643         (check_final_assignment): $finit$'s context is OK.
8644         (patch_unaryop): Use node instead of its line/column value when
8645         calling outer_field_access_fix.
8646
8647 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8648
8649         * parse.y (interface_declaration:): No longer tagged
8650         <node>. Re-installed default action.
8651         (class_member_declaration:): Handle inner interfaces.
8652         (interface_member_declaration): Handle inner interfaces and
8653         classes.
8654         (create_interface): Push error if one seen. Suspend parsing
8655         context when processing an inner interface.
8656         (register_fields): Inner class static field limitations not to
8657         apply to inner interfaces.
8658
8659 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8660
8661         * jcf-parse.c (load_class): Update `java_error_count' when a
8662         class' file can't be found.
8663         (parse.y): Avoid (byte)code generation when errors seen.
8664
8665 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8666
8667         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8668         decodes a valid node.
8669         (patch_binop): Handle TRUNC_DIV_EXPR.
8670
8671 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8672
8673         * parse.y (resolve_package): New local `acc'. Try to progressively
8674         build and guess a package and type name.
8675
8676 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8677
8678         * parse.y (find_applicable_accessible_methods_list): Load and
8679         layout the search class if necessary.
8680         (java_complete_tree): Keep to original type of the folded initial
8681         value.
8682
8683 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8684
8685         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
8686         Generate error message if circularity is detected. New static
8687         local `list'.
8688         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
8689         * jcf-write.c (generate_bytecode_insns): Very simply handle
8690         SAVE_EXPR.
8691         * parse.y (java_check_circular_reference): Use
8692         `cyclic_inheritance_report' during report, if necessary.
8693         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
8694         walking NEW_ARRAY_INIT twice.
8695
8696 2000-02-09  Tom Tromey  <tromey@cygnus.com>
8697
8698         * parse.y (check_class_interface_creation): Allow inner classes to
8699         be `private' or `protected', check modifiers' consistency. Prevent
8700         block local classes from bearing any modifiers.
8701
8702 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8703
8704         * except.c (check_start_handlers): Re-add prototype lost in last
8705         patch.
8706         (maybe_start_try): Remove excess argument to `check_start_handlers'.
8707
8708 2000-02-09  Andrew Haley  <aph@cygnus.com>
8709
8710         * decl.c (clear_binding_level): Remove excess initializer.
8711         (maybe_poplevels): Remove unused variable.
8712         (force_poplevels): Ditto.
8713         (struct binding_level): Add comment.
8714
8715 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8716
8717         * jcf-write.c (generate_classfile): Don't consider
8718         pre-initialization with reference value (use <clinit> instead.)
8719         * parse.y (java_fix_constructors): No generated constructor for
8720         interfaces.
8721         (build_outer_field_access): Removed debug message.
8722         (outer_field_expanded_access_p): Adapted to bytecode generation.
8723         (build_outer_field_access_method): Use fix_method_argument_names.
8724         (build_outer_method_access_method): Fixed indentation. Added
8725         comment. Handle access method generation for static and also void
8726         methods.
8727         (build_access_to_thisn): Inserted debug message.
8728         (maybe_build_thisn_access_method): Use fix_method_argument_names.
8729         (resolve_qualified_expression_name): Fixed comment.
8730         (not_accessible_p): Adapted to bytecode generation. Added comment.
8731         (patch_method_invocation): Added comment.
8732         (maybe_use_access_method): Fixed leading comment. Handle static
8733         methods.
8734         (java_complete_lhs): Don't shortcut handling of initialized upon
8735         declaration String type static fields when generating bytecode.
8736         (patch_unaryop): Handle outer field access when generating
8737         bytecode.
8738
8739 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8740
8741         * java-tree.h (FIELD_THISN): New macro.
8742         * jcf-write.c (append_synthetic_attribute): New function.
8743         (generate_classfile): Set "Synthetic" attribute on this$<n>,
8744         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
8745         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
8746         this$<n> fields.
8747         (build_outer_field_access): Turned on access functions usage and
8748         generation when compiling to bytecode.
8749         (maybe_use_access_method): Likewise.
8750
8751 2000-01-25  Andrew Haley  <aph@cygnus.com>
8752
8753         * java-except.h (struct eh_range): Add `expanded' field.
8754         (maybe_start_try): Add end_pc arg.
8755         (maybe_end_try): Ditto.
8756         * java-tree.h (force_poplevels): new function.
8757         * expr.c (expand_byte_code): Don't call maybe_start_try or
8758         maybe_end_try.
8759         * except.c (add_handler): Reset expanded.
8760         (expand_start_java_handler): Set expanded.
8761         (check_start_handlers): Don't expand a start handler that's
8762         already been expanded.
8763         (maybe_start_try): Add end_pc arg.  Only expand a handler which
8764         ends after end_pc.
8765         (expand_end_java_handler): call force_poplevels.
8766         (force_poplevels): new function.
8767         * decl.c (binding_level): Add start_pc of binding level.
8768         (maybe_pushlevels): Call maybe_start_try when pushing binding
8769         levels.
8770         (maybe_poplevels): Call maybe_end_try when popping binding levels.
8771         (LARGEST_PC): Define.
8772         (clear_binding_level): Use LARGEST_PC.
8773
8774         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
8775         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
8776         (binding_depth, is_class_level, current_pc): new variables.
8777         (struct binding_level): ditto.
8778         (indent): new function.
8779         (push_jvm_slot): add debugging info.
8780         (maybe_pushlevels): ditto.
8781         (maybe_poplevels): ditto.
8782         (pushlevel): ditto.
8783         (poplevel): ditto.
8784         (start_java_method): ditto.
8785         (give_name_to_locals): comment only.
8786         * except.c (binding_depth, is_class_level, current_pc):
8787         new variables.
8788         (expand_start_java_handler): add debugging info.
8789         (expand_end_java_handler): ditto.
8790
8791 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8792
8793         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
8794         (print_name_for_stub_or_jni, process_file): Constify a char*.
8795
8796 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8797
8798         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
8799
8800 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8801
8802         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
8803         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
8804         defined to be 1.
8805
8806 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8807
8808         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
8809         * java-tree.h (TYPE_II_STMT_LIST): New macro.
8810         (struct lang_type): New field `ii_block'.
8811         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
8812         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
8813         * parse.h (struct parser_ctxt): New field `instance_initializers'.
8814         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
8815         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
8816         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
8817         macros.
8818         * parse.y (add_instance_initializer): New function.
8819         (in_instance_initializer): New static global.
8820         (class_body_declaration:): Link instance initializer block.
8821         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
8822         (array_creation_expression:): Remove unused local.
8823         (java_parser_context_push_initialized_field): Fixed leading
8824         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
8825         CPC_INSTANCE_INITIALIZER_LIST.
8826         (java_parser_context_pop_initialized_field): Likewise.
8827         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
8828         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
8829         CPC_INITIALIZER_STMT.
8830         (fix_constructors): New local `class_type'. Use it. Call
8831         add_instance_initializer.
8832         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
8833         (patch_return): Forbid return in instance initializers.
8834         (patch_throw_statement): Enforce exception handling in the context
8835         of instance initializers.
8836
8837 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8838
8839         * Make-lang.in (java.mostlyclean): Remove executables in
8840         `mostlyclean'.
8841
8842 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8843
8844         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
8845         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
8846         (java_float_finite): Convert to use union Word from javaop.h.
8847         (java_double_finite): Convert to use union DWord from javaop.h.
8848
8849 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8850
8851         * gjavah.c (options): Added `jni' entry.
8852         (help): Document -jni.
8853         (flag_jni): New global.
8854         (process_file): Handle JNI output.  Don't print text from
8855         -prepend, -add, etc, when generating stubs.  Only remove `.class'
8856         suffix if it actually exists.
8857         (main): Create a `.c' file when run with `--jni --stubs'.  Create
8858         correct output file name with `--jni'.
8859         (print_include): Mangle header name differently in JNI case.
8860         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
8861         method list.
8862         (print_method_info): Handle JNI case.  Put signature info into
8863         method name.  Handle case when STREAM is NULL.
8864         (print_name_for_stub_or_jni): New function.
8865         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
8866         (print_cxx_classname): Handle JNI.
8867         (print_full_cxx_name): Likewise.
8868         (decode_signature_piece): Likewise.
8869         (overloaded_jni_method_exists_p): New function.
8870         (struct method_name): Added `signature' and `sig_length' fields.
8871         (HANDLE_END_FIELD): Do nothing in JNI mode.
8872
8873 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8874
8875         * jv-scan.c: Include version.c, <getopt.h>.
8876         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
8877         (options): New array.
8878         (usage): New function.
8879         (version): New function.
8880         (main): Use getopt_long to parse command line.
8881         * jcf-dump.c: Include version.c, <getopt.h>.
8882         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
8883         OPT_JAVAP): New macros.
8884         (options): New array.
8885         (usage): Return `void'.  Changed message.
8886         (help): New function.
8887         (version): New function.
8888         (main): Use getopt_long_only to parse command line.
8889         * gjavah.c: Include <getopt.h>.
8890         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
8891         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
8892         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
8893         (options): New array.
8894         (java_no_argument): Removed.
8895         (help): Updated with missing options.
8896         (main): Use getopt_long_only to parse command line.
8897         (usage): Changed message.
8898
8899 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8900
8901         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
8902         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
8903         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
8904         * parse.y (array_creation_expression:): Handle anonymous arrays.
8905         (build_array_from_name): Don't set `ret_name' if null.
8906         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
8907         (qualify_ambiguous_name): Likewise.
8908         (java_complete_expand_class): Likewise.
8909
8910 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8911
8912         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
8913         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
8914         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
8915         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
8916         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
8917         AIPL_FUNCTION_COMPLETED_INVOCATION.
8918         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
8919         AIPL_FUNCTION_INVOCATION_READY.
8920         (AIPL_FUNCTION_DECLARATION): New enum entry.
8921         * parse.y (reorder_static_initialized): New function.
8922         (java_parser_context_pop_initialized_field): Use it.
8923         (add_inner_class_fields): Use
8924         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
8925         augmented. Install marker after last alias initializer, if any.
8926         (generate_finit): Fixed typo. Don't try to retain only the used
8927         fields.
8928         (method_header): Compute and set DECL_FUNCTION_NAP.
8929         (method_declarator): Fixed comment. Insert alias initializer in
8930         parameter list.
8931         (build_alias_initializer_parameter_list): Fixed leading
8932         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
8933         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
8934         (java_complete_expand_class): Code to retain only used aliases
8935         removed.
8936         (java_complete_expand_methods): New local `first_decl'. Generate
8937         $finit$ first, then expand the constructors, regular methods and
8938         <clinit>.
8939         (java_complete_expand_method): Don't report error on missing
8940         return statement if previously detected bogus.
8941         (fix_constructors): Don't patch constructor parameters list.
8942         (patch_method_invocation): Use new AIPL enum values. Reverse
8943         alias initializer list for anonymous classes.
8944
8945 2000-01-30  Anthony Green  <green@redhat.com>
8946
8947         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
8948         determine how many stack slots to pop.
8949
8950 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8951
8952         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
8953         error handling/recovery.
8954         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
8955
8956 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8957
8958         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
8959         FIELD_LOCAL_ALIAS_USED): New macros.
8960         (DECL_FUNCTION_NAP): New macro.
8961         (struct lang_decl): New field `nap'.
8962         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
8963         (struct lang_type): New fields `finit_stmt_list' and
8964         `clinit_stmt_list'.
8965         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
8966         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
8967         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
8968         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
8969         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
8970         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
8971         (BUILD_THROW): Macro line separator re-indented.
8972         * parse.y (end_class_declaration): New function.
8973         (maybe_generate_pre_expand_clinit): New name for
8974         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
8975         pre-expand static fields.
8976         (maybe_generate_clinit): Function deleted.
8977         (check_for_static_method_reference): Prototype's parameter list
8978         indented.
8979         (generate_finit): New name for maybe_generate_finit. Changed
8980         leading comment. Function rewritten to use
8981         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
8982         (build_alias_initializer_parameter_list): New function.
8983         (java_parser_context_pop_initialized_field): Likewise.
8984         (add_inner_class_fields): Likewise.
8985         (type_declaration:): Call end_class_declaration.
8986         (class_member_declaration:): Likewise.
8987         (formal_parameter_list:): Fixed typos.
8988         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
8989         element. Improved error handling.
8990         (block_statement:): Call end_class_declaration.
8991         (anonymous_class_creation:): Likewise.
8992         (create_anonymous_class): Fixed comments.
8993         (create_class): Call add_inner_class_fields.
8994         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
8995         (method_header): Use MARK_FINAL_PARMS.
8996         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
8997         (method_declarator): Propagate final argument flag.
8998         (craft_constructor): New local `artificial'. Call
8999         build_alias_initializer_parameter_list. Use
9000         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9001         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9002         necessary.
9003         (complete_expand_class): Get rid of unused outer context local
9004         alias fields.
9005         (java_complete_expand_methods): Fixed leading
9006         comment. Generate/pre-expand <clinit> first. Changed method
9007         expansion order to regular, $finit$, constructors, <clinit>.
9008         (java_complete_expand_method): Set current_function_decl.
9009         (fix_constructors): Fix constructor parameter list to account for
9010         outer context local alias initializers.
9011         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9012         (resolve_expression_name): Lookup outer context local aliases. New
9013         local `access', use it.
9014         (patch_method_invocation): Patch inner class ctor invocation with
9015         outer context local aliases initialization values. $finit$
9016         invocation patching now includes things generated with
9017         build_alias_initializer_parameter_list.
9018         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9019         (build_super_invocation): Likewise.
9020         (patch_assignment): Changed comment.
9021
9022 2000-01-27  Andrew Haley  <aph@cygnus.com>
9023
9024         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9025         (emit_if): Ditto.
9026         (emit_jsr): Ditto.
9027
9028 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9029
9030         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9031         concatenation.
9032         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9033
9034         * parse.y (register_fields): Don't pass a format specifier to
9035         OBSOLETE_MODIFIER_WARNING.
9036         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9037         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9038         specifier.
9039         (check_modifiers): Change function into a macro.
9040         (check_class_interface_creation): Pass a literal format string.
9041
9042 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9043
9044         * buffer.h: PROTO -> PARAMS.
9045         * check-init.c: Likewise.
9046         * class.c: Likewise.
9047         * constants.c: Likewise.
9048         * convert.h: Likewise.
9049         * decl.c: Likewise.
9050         * except.c: Likewise.
9051         * expr.c: Likewise.
9052         * gjavah.c: Likewise.
9053         * java-except.h: Likewise.
9054         * java-tree.h: Likewise.
9055         * jcf-depend.c: Likewise.
9056         * jcf-dump.c: Likewise.
9057         * jcf-parse.c: Likewise.
9058         * jcf-path.c: Likewise.
9059         * jcf-reader.c: Likewise.
9060         * jcf-write.c: Likewise.
9061         * jcf.h: Likewise.
9062         * jv-scan.c: Likewise.
9063         * jvgenmain.c: Likewise.
9064         * jvspec.c: Likewise.
9065         * lang.c: Likewise.
9066         * lex.c: Likewise.
9067         * lex.h: Likewise.
9068         * parse-scan.y: Likewise.
9069         * parse.h: Likewise.
9070         * parse.y: Likewise.
9071         * typeck.c: Likewise.
9072         * verify.c: Likewise.
9073         * xref.c: Likewise.
9074         * xref.h: Likewise.
9075         * zextract.c: Likewise.
9076         * zipfile.h: Likewise.
9077
9078 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9079
9080         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9081         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9082         * constants.c (build_constant_data_ref): Check for cached
9083         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9084         in TYPE_CPOOL_DATE_REF.
9085         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9086         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9087         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9088         (LOCAL_FINAL): New macro.
9089         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9090         constant pool -- don't try to reuse.
9091         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9092         TYPE_LANG_SPECIFIC.
9093         (find_in_current_zip): Use TYPE_JCF.
9094         * parse.h (java_check_final): Prototype removed.
9095         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9096         (maybe_create_class_interface_decl,
9097         check_class_interface_creation): Likewise.
9098         (java_expand_finals): Function removed.
9099         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9100         (block_statement:): Fixed comment.
9101         (anonymous_class_creation:): Likewise.
9102         (check_class_interface_creation): Reversed Jan 12, 2000 extra
9103         argument patch.
9104         (check_class_interface_creation): Loosened error report on (inner)
9105         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9106         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9107         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9108         argument patch.
9109         (create_interface): Likewise.
9110         (anonymous_class_counter): New static global.
9111         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9112         patch. Fixed comments.
9113         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9114         anonymous_class_counter when declaring a toplevel class.
9115         (craft_constructor): Fixed constructor name when handling
9116         anonymous classes. Anonymous class constructors to feature hidden
9117         this$<n> parameter.
9118         (java_fix_constructors): Added comment.
9119         (java_check_final): Function removed.
9120         (java_complete_expand_methods): Fixed comment. Don't generate
9121         class data, save its outgoing constant pool instead.
9122         (verify_constructor_super): Skip anonymous class constructor
9123         hidden this$<n> parameter.
9124         (java_expand_classes): New local `saved_ctxp'. Removed call to
9125         java_expand_finals and java_check_final. Expand anonymous class
9126         constructors. Generate class data.
9127         (build_super_invocation): Skip anonymous class hidden this$<n>
9128         parameter.
9129         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9130         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9131         (set_java_signature): Likewise.
9132
9133 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9134
9135         * gjavah.c: Delete ACC_VISIBILITY define.
9136         * jcf.h: Add ACC_VISIBILITY define.
9137         * parse.y: final: rule tagged <value>.
9138         (java_check_regular_methods): Use ACC_VISIBILITY define for
9139         default package access check.
9140         (local_variable_declaration_statement): Use final: rule.
9141
9142 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9143
9144         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9145         (final:): New rule.
9146
9147 2000-01-17  Tom Tromey  <tromey@cygnus.com>
9148
9149         * gjavah.c (print_field_info): Allow non-static final fields.
9150
9151 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9152
9153         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9154         * parse.y (patch_anonymous_class): New function.
9155         (create_anonymous_class): Register incomplete type when the
9156         class/interface to extends/implement isn't known yet.
9157         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9158         (verify_constructor_super): Tuned error message.
9159
9160 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9161
9162         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9163         (ANONYMOUS_CLASS_P): New macro.
9164         (TYPE_SIGNATURE, TYPE_JCF): New macros.
9165         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9166         * parse.y (create_class): Added leading argument.
9167         (maybe_create_class_interface_decl,
9168         check_class_interface_creation): Likewise.
9169         (craft_constructor): New function.
9170         (verify_constructor_super): Added argument in prototype.
9171         (class_declaration:): Inserted leading argument.
9172         (for_begin:): Use FOR_LOOP_P.
9173         (anonymous_class_creation): Create WFL of the anonymous class to
9174         instantiate. Call build_new_invocation. Added comments.
9175         (check_class_interface_creation): Handle parameter `anonymous' in
9176         verbose mode class creation announce.
9177         (link_nested_class_to_enclosing): Exclude anonymous classes.
9178         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9179         anonymous class, even though they appear to have an enclosing
9180         context.
9181         (create_interface): Pass extra argument to
9182         check_class_interface_creation.
9183         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9184         (create_class): Call check_class_interface_creation and
9185         maybe_create_class_interface_decl with extra new argument. Don't
9186         add private this$<n> to anonymous classes.
9187         (method_declarator): Insert hidden this$<n> to anonymous class
9188         constructors.
9189         (java_fix_constructors): Deleted code creating default
9190         constructor. Call craft_constructor instead.
9191         (java_check_regular_methods): Set `saw_constructor' to 1 for
9192         anonymous classes.
9193         (fix_constructors): Pass extra argument to verify_constructor_super.
9194         (verify_constructor_super): New local `sdecl', use it. Search for
9195         matching constructor (possibly featuring arguments) in super
9196         class.
9197         (lookup_method_invoke): Craft constructor according to arguments
9198         list when dealing with anonymous class constructors.
9199         (build_super_invocation): Pass arguments to anonymous class super
9200         constructors.
9201         (search_loop): Use FOR_LOOP_P.
9202         (labeled_block_contains_loop_p): Likewise.
9203
9204 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9205
9206         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9207         (enclosing_context_p): New function.
9208         (get_access_flags_from_decl): Handle CLASS_STATIC.
9209         (maybe_layout_super_class): Extra first argument passed to
9210         do_resolve_class.
9211         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9212         ID_INIT_P.
9213         * decl.c (access0_identifier_node): New global.
9214         (init_decl_processing): access0_identifier_node initialized.
9215         (pushdecl): Set DECL_CONTEXT only on non type decls.
9216         * expr.c (lookup_field): Lookup inner class fields in enclosing
9217         contexts.
9218         (expand_invoke): Use ID_INIT_P.
9219         (expand_java_field_op): Use DECL_CLINIT_P.
9220         * java-tree.def (CLASS_LITERAL): New tree code.
9221         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9222         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9223         (struct lang_decl): New field `inner_access'.
9224         (enclosing_context_p): Prototyped.
9225         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9226         ID_CLINIT_P): New macros.
9227         (CLASS_STATIC): New macro.
9228         (CLASS_ACCESS0_GENERATED_P): New macro.
9229         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9230         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9231         INNER_CLASS_P): New macros.
9232         (DECL_INNER_CLASS_LIST): New macro.
9233         * jcf-parse.c (yyparse): Avoid the use of ANSI string
9234         concatenation.
9235         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9236         the shift value to int. Fixed typo in comment.
9237         * lex.c (inst_id, wpv_id): Initialize.
9238         * mangle.c (unicode_mangling_length): Take `$' into account.
9239         * parse.h (DRECOVER, RECOVER): Terminate properly.
9240         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9241         (typedef struct _jdep): New field `enclosing'.
9242         (JDEP_ENCLOSING): New macro.
9243         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9244         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9245         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9246         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9247         GET_ENCLOSING_CPC_CONTEXT): New macros.
9248         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9249         (do_resolve_class): Added extra argument in prototype.
9250         * parse.y (resolve_class): Added extra argument in prototype.
9251         (maybe_create_class_interface_decl): Likewise.
9252         (maybe_use_access_method, build_wfl_wrap): New functions.
9253         (java_complete_expand_classes, java_complete_expand_class):
9254         Likewise.
9255         (java_parser_context_push_initialized_field,
9256         java_parser_context_suspend, java_parser_context_resume):
9257         Likewise.
9258         (maybe_make_nested_class_name, make_nested_class_name,
9259         set_nested_class_simple_name_value,
9260         link_nested_class_to_enclosing, find_as_inner_class,
9261         find_as_inner_class_do, check_inner_class_redefinition,
9262         build_thisn_assign, build_current_thisn, build_access_to_thisn,
9263         maybe_build_thisn_access_method, build_outer_field_access,
9264         build_outer_field_access_methods, build_outer_field_access_expr,
9265         build_outer_method_access_method, build_new_access_id,
9266         build_outer_field_access_method, outer_field_access_p,
9267         outer_field_expanded_access_p, outer_field_access_fix,
9268         build_incomplete_class_ref, patch_incomplete_class_ref,
9269         create_anonymous_class): Likewise.
9270         (inst_id, wpv_id): New static global variables.
9271         (synchronized:): New rule, tagged <node>.
9272         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9273         rules.
9274         (anonymous_class_creation:): New rule, tagged <node>.
9275         (NEW_TK): Tagged <node>.
9276         (type_literals, array_type_literal): New rules, tagged <node>.
9277         (class_declaration:): Removed action when reducing by class_body:
9278         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9279         using GET_CPC in sub-rules.
9280         (class_member_declaration): Handle inner classes.
9281         (method_declaration): When reducing method_header:, reset
9282         current_function_decl when appropriate.
9283         (method_declarator:): Set the number of formal parameter to 0 for
9284         method declared without arguments.
9285         (constructor_declarator:): Likewise.
9286         (static_initializer:): List of elements kept in a list.
9287         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9288         use of the keyword `static' for type declarations.
9289         (block_statement:): Handle inner class declarations.
9290         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9291         type qualified `this'.
9292         (class_instance_creation_expression): Use anonymous_class_creation:
9293         to handle inner class instances creation. Handle qualified `new'.
9294         (something_dot_new): Added appropriate actions.
9295         (create_new_parser_context): New function.
9296         (java_push_parser_context, java_parser_context_save_global,
9297         java_parser_context_suspend): Use create_new_parser_context.
9298         (check_modifiers): Changed leading comment.
9299         (check_class_interface_creation): Handle interclasses.
9300         (add_superinterfaces): Fixed comment.
9301         (create_interface): Build qualified name from the raw_name instead
9302         of its matching WFL. Push the initialized fields list. raw_name added
9303         as an extra argument to maybe_create_class_interface_decl.
9304         (create_class): Build qualified name from the raw_name instead of
9305         its matching WFL. Removed assignment to current_parsed_class_un.
9306         Call PUSH_ERROR before returning an error. Suspend the current
9307         parser context when processing an inner class. Push the
9308         initialized fields list. raw_name added as an extra argument to
9309         maybe_create_class_interface_decl. Add the private this$<n>
9310         field.
9311         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9312         (register_fields): Get the class type from GET_CPC and handle
9313         previous errors.  Added code to handle the creation of static
9314         fields in inner classes. Initialized fields initialization
9315         statements kept in a list of lists.
9316         (maybe_generate_finit): Initialized fields initialization
9317         statements kept in a list of lists. Use GET_CPC.
9318         (maybe_generate_clinit): Likewise.
9319         (method_header): Use GET_CPC and GET_CPC_UN.
9320         (parser_qualified_classname): Handle inner classes.
9321         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9322         (java_fix_constructors): Hide pointer to enclosing context
9323         instance in constructor list when dealing with inner classes.
9324         (jdep_resolve_class): Call resolve_class with extra first argument
9325         JDEP_ENCLOSING.
9326         (resolve_class): Add enclosing context as a first extra argument
9327         to do_resolve_class.
9328         (do_resolve_class): Call find_as_inner_class. Handle WFLs
9329         properly.
9330         (resolve_no_layout): Extra argument added to resolve_class
9331         invocation.
9332         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9333         (java_get_real_method_name): Use GET_CPC_UN.
9334         (check_abstract_method_definitions): Use DECL_CLINIT_P.
9335         (java_check_abstract_methods): Handle static method declared in
9336         inner classes by an error.
9337         (java_check_regular_methods): Use DECL_CLINIT_P.
9338         (source_start_java_method): Also set DECL_MAX_LOCALS.
9339         (create_artificial_method): Call java_parser_context_save_global
9340         and java_parser_context_restore_global instead of saving/restoring
9341         the context by hand.
9342         (expand_start_java_method): Improved verbose mode message.
9343         (java_complete_expand_methods): Fixed leading comment. Use
9344         DECL_CLINIT_P.
9345         (fix_constructors): Added assignment to this$<n> if necessary.
9346         (java_expand_classes): Call java_complete_expand_classes instead
9347         of java_complete_expand_methods.
9348         (make_qualified_primary): Simplified.
9349         (merge_qualified_name): Optimized for missing left or right parts.
9350         (resolve_expression_name): Handle access to outer class fields from
9351         interclasses.
9352         (resolve_qualified_expression_name): New macro
9353         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9354         classes. Report error on non appropriate qualification of
9355         `new'. Handle qualified `this'.
9356         (not_accessible_p): Allow access to outer class private fields from
9357         inner classes.
9358         (patch_method_invocation): Handle method invocations through
9359         access methods and inner class constructor invocations.
9360         (find_applicable_accessible_methods_list): Search enclosing
9361         contexts of an inner class.
9362         (search_applicable_methods_list): Fixed typo.
9363         (argument_types_convertible): Handle inner class constructors'
9364         hidden outer context reference argument.
9365         (qualify_ambiguous_name): Handle qualified `this'.
9366         (java_complete_lhs): Handle use of field accessed through
9367         artificial access methods in various cases of assignments. Handle
9368         CLASS_LITERAL node.
9369         (check_final_assignment): Use DECL_CLINIT_P.
9370         (valid_ref_assignconv_cast_p): Handle the destination being an
9371         enclosing context of the source.
9372         (patch_unaryop): Handle use of field accessed through artificial
9373         access methods.
9374         (patch_return): Use DECL_CLINIT_P.
9375         (patch_throw_statement): Use DECL_CLINIT_P.
9376         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9377         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9378         ID_INIT_P.
9379
9380 2000-01-16  Anthony Green  <green@cygnus.com>
9381
9382         * parse.y (build_string_concatenation): Only use
9383         StringBuffer(String) shortcut if String arg is constant.
9384
9385 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9386
9387         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9388         the shift value to int. Fixed typo in comment.
9389
9390 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9391
9392         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9393         * jcf-write.c: Likewise.
9394         * parse.y: Likewise.
9395         * parse.c: Regenerate.
9396
9397 2000-01-09  Anthony Green  <green@cygnus.com>
9398
9399         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9400         bytecodes in the correct order.
9401
9402 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9403
9404         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9405
9406 2000-01-06  Anthony Green  <green@cygnus.com>
9407
9408         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9409         before building constant array decl.
9410
9411 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9412
9413         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9414         method invocation and typo in conditional expression.
9415         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9416         the appropriate NOTE_POP.
9417         * parse.y (patch_binop): Shift value mask to feature the right
9418         type.
9419
9420 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9421
9422         * class.c (assume_compiled, assume_compiled_node): Add static
9423         prototype.
9424         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9425
9426         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9427
9428         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9429
9430         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9431         to `__modifier' to avoid stringifying it.
9432
9433         * parse.y (verify_constructor_circularity): Don't call a variadic
9434         function with a non-literal format string.
9435         (java_check_abstract_methods): Move unreachable code inside
9436         `continue' statement.
9437         (lookup_method_invoke): Call xstrdup, not strdup.
9438
9439         * expr.c (expand_java_field_op): Avoid the use of ANSI string
9440         concatenation.
9441
9442         * jcf-parse.c (yyparse): Likewise.
9443
9444         * jv-scan.c (main): Likewise.
9445
9446 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9447
9448         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9449         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9450         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9451         concatenation.
9452
9453         * parse.y (synchronized, variable_redefinition_error,
9454         check_class_interface_creation, create_interface, create_class,
9455         method_header, finish_method_declaration,
9456         check_modifiers_consistency, method_declarator,
9457         complete_class_report_errors, check_abstract_method_definitions,
9458         java_check_regular_methods, check_throws_clauses,
9459         java_check_abstract_methods, read_import_dir,
9460         check_pkg_class_access, declare_local_variables, fix_constructors,
9461         cut_identifier_in_qualified, resolve_expression_name,
9462         resolve_qualified_expression_name, patch_method_invocation,
9463         java_complete_lhs, patch_assignment, try_builtin_assignconv,
9464         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9465         patch_exit_expr, patch_exit_expr, patch_switch_statement,
9466         patch_try_statement, patch_synchronized_statement,
9467         patch_throw_statement, check_thrown_exceptions,
9468         patch_conditional_expr): Likewise.
9469
9470 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9471
9472         * Makefile.in (LIBDEPS): Added gcc's errors.o
9473         (../jcf-dump$(exeext):): Link with gcc's errors.o
9474         (../gcjh$(exeext):): Likewise.
9475         * expr.c (expand_java_NEW): Layout the entire target type instead of
9476         laying out its methods only.
9477         (lookup_field): Layout the class after having loaded it.
9478         * java-tree.h (java_debug_context): Declared.
9479         * jcf-io.c (toplev.h): Included.
9480         (find_class): Removed assignment to jcf's outofsynch
9481         field. Force source file to be read if newer than its matching
9482         class file. Tweaked debug messages.
9483         * jcf-parse.c (jcf_out_of_synch): Deleted.
9484         (read_class): Call to jcf_out_of_synch removed.
9485         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9486         (jcf_out_of_synch): Prototype deleted.
9487         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9488         `deprecated' and `class_err': integer turned into bit-fields.
9489         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9490         * parse.y (package_list): New global.
9491         (package_declaration:): Record newly parsed package name.
9492         (extra_ctxp_pushed_p): Static global deleted.
9493         (java_parser_context_save_global): Create buffer context for the
9494         purpose of saving globals, if necessary.
9495         (java_parser_context_restore_global): Pop context pushed for the
9496         purpose of saving globals, if necessary.
9497         (java_debug_context_do): New prototype and function.
9498         (java_debug_context): Likewise.
9499         (do_resolve_class): Use already parsed package names to qualify
9500         and lookup class candidate.
9501         (java_pre_expand_clinit): Removed unnecessary local variable.
9502
9503 1999-12-17  Tom Tromey  <tromey@cygnus.com>
9504
9505         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
9506         fixes PR gcj/119.
9507         (process_file): Use `\n\' at end of each line in string.
9508
9509 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9510
9511         * expr.c (expand_invoke): Layout the loaded class before
9512         attempting to use it.
9513         (expand_java_field_op): Allow final field assignments to take
9514         place in $finit$.
9515         * typeck.c (convert): Return error_mark_node if expr is null.
9516
9517 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9518
9519         * class.c (class_depth): Return -1 if the class doesn't load
9520         properly.
9521         * expr.c (can_widen_reference_to): Check for errors during depth
9522         computation and return 0 accordingly.
9523         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9524         create default constructors and add an other error check.
9525         * parse.h (java_fix_constructors): Prototyped.
9526         * parse.y (java_pre_expand_clinit): Likewise.
9527         (build_super_invocation): Re-prototyped to feature one argument.
9528         (java_check_circular_reference): Directly use `current'.
9529         (java_fix_constructors): New function.
9530         (java_check_regular_methods): Don't create default constructors
9531         here, but abort if none were found.
9532         (java_complete_expand_methods): Pre-process <clinit> calling
9533         java_pre_expand_clinit.
9534         (java_pre_expand_clinit): New function.
9535         (fix_constructors): build_super_invocation invoked with the
9536         current method declaration as an argument.
9537         (build_super_invocation): Use the context of the processed method
9538         decl argument instead of current_class.
9539         * typeck.c (lookup_java_method): Take WFLs in method names into
9540         account.
9541
9542 1999-12-14  Per Bothner  <per@bothner.com>
9543
9544         * class.c (make_class_data): flag_keep_inline_functions to keep
9545         private methods in the method array.
9546
9547 1999-12-15  Anthony Green  <green@cygnus.com>
9548
9549         * check-init.c (check_init): Take into account both types of
9550         `throw's when checking for uninitialized variables.
9551
9552 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9553
9554         * parse.y (java_complete_lhs): Force conversion of array
9555         dimensions to int_type_node, that's what runtime's ABI expects.
9556
9557 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9558
9559         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9560         operand of a WFL, until the Java front-end gets fixed with regard
9561         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9562
9563 1999-12-10  Andrew Haley  <aph@cygnus.com>
9564
9565         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9566         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9567         expr.c (build_java_athrow): Add support for sjlj-exceptions.
9568         java-tree.h: Ditto.
9569         jcf-write.c: Ditto.
9570
9571 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9572
9573         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9574         before calling expand_eh_region_start and expand_start_all_catch.
9575         * except.c (expand_start_java_handler): Switch to permanent
9576         obstack before calling expand_eh_region_start.
9577         (expand_end_java_handler): Switch to permanent obstack before
9578         calling expand_start_all_catch.
9579
9580 1999-12-5  Anthony Green  <green@cygnus.com>
9581
9582         * decl.c (init_decl_processing): Mark throw_node as a noreturn
9583         function with side effects.
9584         (init_decl_processing): Mark all memory allocating DECLs with
9585         DECL_IS_MALLOC.
9586
9587 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9588
9589         * except.c (expand_end_java_handler): Call
9590         expand_resume_after_catch and end_catch_handler.
9591
9592 1999-11-30  Anthony Green  <green@cygnus.com>
9593
9594         * verify.c (verify_jvm_instructions): Create new return label
9595         chain if non existent (don't rely on the verified state of the jsr
9596         target.)
9597
9598 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9599
9600         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9601         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9602
9603         * parse.y (patch_assignment): Removed bogus final class test on
9604         lhs when checking on whether to emit an ArrayStoreException runtime
9605         check.
9606         * expr.c (expand_java_arraystore): Likewise.
9607
9608 1999-11-28 Anthony Green <green@cygnus.com>
9609
9610         * decl.c (find_local_variable): Reuse single slot decls when
9611           appropriate.
9612
9613 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9614
9615         * jcf-parse.c (saw_java_source): Global variable removed.
9616         (read_class): Don't use `saw_java_source'. Added extra braces.
9617         (yyparse): Code setting `saw_java_source' removed.
9618
9619 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
9620
9621         * except.c (emit_handlers): Zero catch_clauses after emitting them.
9622
9623 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9624
9625         * verify.c (merge_type_state): Non verified subroutines being
9626         considered more than once to trigger passive type merge.
9627
9628 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9629
9630         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9631         in case of error. Error message tuned.
9632
9633 1999-11-21  Anthony Green  <green@cygnus.com>
9634
9635         * constants.c (find_methodref_index): Unwrap method names before
9636         inserting them in the constant pool.
9637
9638         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9639
9640         * class.c (assume_compiled_node): New typedef.
9641         (assume_compiled_tree): New static data.
9642         (find_assume_compiled_node): New function.
9643         (add_assume_compiled): New function.
9644         (assume_compiled): New function.
9645         * class.c (make_class_data): Use assume_compiled.
9646         (is_compiled_class): Use assume_compiled.
9647
9648         * java-tree.h (add_assume_compiled): Declare.
9649
9650         * lang.c (lang_decode_option): Parse new options.
9651
9652 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9653
9654         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9655         int_type_node: that's what `_Jv_AllocObject' expects.
9656
9657 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9658
9659         * parse.y (lookup_method_invoke): Use lang_printable_name to
9660         reliably build the type name during error report. Fixes PR gcj/97.
9661
9662 1999-11-09  Tom Tromey  <tromey@cygnus.com>
9663
9664         * jcf-path.c: Include <sys/stat.h>.
9665         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
9666         (DIR_UP): New macro.
9667
9668 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9669
9670         * parse.y (source_end_java_method): Resume permanent allocation,
9671         reversing Apr 27 1998 patch.
9672         (patch_string_cst): Pop obstacks after having pushed the permanent
9673         ones.
9674
9675 1999-11-05  Tom Tromey  <tromey@cygnus.com>
9676
9677         * class.c (finish_class): Emit inlined methods if any native
9678         methods exist in the class.  Fixes PR gcj/85.
9679
9680 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9681
9682         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
9683         (qualify_ambiguous_name): Likewise.
9684
9685 1999-11-03  Godmar Back <gback@cs.utah.edu>
9686
9687         * typeck.c: (lookup_java_method):  search all inherited
9688         interfaces when looking up interface method.
9689
9690 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9691
9692         * parse.y (method_header:): Issue error message for rule `type
9693         error'.
9694         (synchronized:): Error report when not using synchronized.
9695
9696 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9697
9698         * parse.y (resolve_qualified_expression_name): Prevent `this' from
9699         being used before the superclass constructor has been called.
9700         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
9701         instead of `CALL_THIS_CONSTRUCTOR_P'.
9702
9703 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
9704
9705         * check-init.c: Fix typo in comment.
9706
9707 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9708
9709         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
9710         and final method.
9711
9712 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9713
9714         * parse.y (expression_statement:): Call function to report
9715         improper invocation of a constructor.
9716         (parse_ctor_invocation_error): New function.
9717
9718 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
9719
9720         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
9721         remember_end_note.
9722
9723 1999-10-21  Tom Tromey  <tromey@cygnus.com>
9724
9725         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
9726         in generated `main'.
9727
9728 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9729
9730         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
9731         (qualify_ambiguous_name): Likewise.
9732
9733 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9734
9735         * parse.y (java_complete_tree): fold_constant_for_init to work on
9736         permanent_obstack.
9737         (java_complete_lhs): Likewise.
9738         (array_constructor_check_entry): Complete an initializer element
9739         on permanent_obstack.
9740
9741 1999-10-19  Tom Tromey  <tromey@cygnus.com>
9742
9743         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
9744         From Mike Moreton <mike@pillim.demon.co.uk>.
9745
9746 1999-10-15  Greg McGary  <gkm@gnu.org>
9747
9748         * java-tree.h (flag_bounds_check): Remove extern decl.
9749         * lang.c (flag_bounds_check): Remove global variable.
9750         (lang_f_options): Remove "bounds-check" entry.
9751         (lang_init_options): Default flag_bounds_check to "on".
9752
9753 1999-10-14  Tom Tromey  <tromey@cygnus.com>
9754
9755         * jvgenmain.c (usage): New function.
9756         (main): Use it.  Also, handle `-D' options.
9757         * jvspec.c (lang_specific_driver): Recognize -D.
9758         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
9759
9760         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
9761
9762 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9763
9764         * jcf-dump.c (print_constant, disassemble_method): Don't call a
9765         variadic function with a non-literal format string.
9766
9767         * parse-scan.y (report_main_declaration): Likewise.
9768
9769         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
9770
9771         * parse.y (read_import_dir, patch_assignment, patch_binop,
9772         patch_array_ref): Likewise.
9773
9774         * typeck.c (build_java_array_type): Likewise.
9775
9776         * verify.c (verify_jvm_instructions): Likewise.
9777
9778 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9779
9780         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
9781
9782 1999-10-07  Anthony Green  <green@cygnus.com>
9783
9784         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
9785         where CHECK_PUT may fail for valid reasons.
9786
9787         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
9788         UNSAFE_PUTN): New macros.
9789
9790 1999-10-04  Tom Tromey  <tromey@cygnus.com>
9791
9792         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
9793         well.  Fixes Java PR gcj/59.
9794         * parse-scan.y (yyerror): Report errors.
9795
9796 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
9797
9798         * decl.c (insert_block): Remove unconditional `abort'.
9799
9800 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
9801
9802         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
9803         FUNCTION_CODE now of type int.  All callers changed.
9804         Set the builtin's DECL_BUILT_IN_CLASS.
9805
9806 1999-09-23  Tom Tromey  <tromey@cygnus.com>
9807
9808         * jvspec.c (lang_specific_driver): Don't read spec file if
9809         -fsyntax-only given.
9810
9811 1999-09-22  Tom Tromey  <tromey@cygnus.com>
9812
9813         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
9814
9815         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
9816         (WORDS_TO_LONG): Likewise.
9817         (WORDS_TO_DOUBLE): Likewise.
9818
9819 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9820
9821         * jcf-write.c (RELOCATION_VALUE_0): New macro.
9822         (RELOCATION_VALUE_1): Likewise.
9823         (emit_iinc, emit_reloc, push_constant1, push_constant2,
9824         push_in_const, push_long_const): Prototyped.
9825         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
9826         (push_constant2): Likewise.
9827         (push_int_const): Cast find_constant1's integer arguments to `jword'.
9828         (find_constant_wide): Cast find_constant2's integer arguments to
9829         `jword'.
9830         (find_constant_index): Cast find_constant2's and find_constant2's
9831         integer arguments to `jword'.
9832         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
9833         (emit_switch_reloc): Use RELOCATION_VALUE_0.
9834         (emit_if): Use RELOCATION_VALUE_1.
9835         (emit_goto): Likewise.
9836         (emit_jsr): Likewise.
9837         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
9838         argument to push_long_const to HOST_WIDE_INT.
9839
9840 1999-09-15  Andreas Schwab  <schwab@suse.de>
9841
9842         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
9843
9844 1999-09-20  Nick Clifton  <nickc@cygnus.com>
9845
9846         * lang.c (lang_decode_option): Extend comment.
9847
9848 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9849
9850         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
9851         instead of fndecl.
9852
9853 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9854
9855         * gjavah.c (get_field_name, print_method_info, print_include,
9856         add_namelet): Use xmalloc, not malloc.
9857
9858         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
9859         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
9860         NULL pointer.
9861
9862         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
9863
9864         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
9865
9866         * jcf-path.c (add_entry): Likewise.
9867
9868         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
9869
9870         * jv-scan.c (xmalloc): Remove definition.
9871
9872         * jvgenmain.c (xmalloc): Likewise.
9873
9874         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
9875
9876         * lex.c (java_store_unicode): Use xrealloc, not realloc.
9877
9878         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
9879         concat, not xmalloc/sprintf.
9880         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
9881         (xstrdup): Remove definition.
9882
9883         * parse.y (duplicate_declaration_error_p,
9884         constructor_circularity_msg, verify_constructor_circularity,
9885         check_abstract_method_definitions, java_check_regular_methods,
9886         java_check_abstract_methods, patch_method_invocation,
9887         check_for_static_method_reference, patch_assignment, patch_binop,
9888         patch_cast, array_constructor_check_entry, patch_return,
9889         patch_conditional_expr): Use xstrdup, not strdup.
9890
9891         * zextract.c (ALLOC): Use xmalloc, not malloc.
9892
9893 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9894
9895         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
9896
9897         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
9898         (do_spec, lang_specific_pre_link, lang_specific_driver,
9899         input_filename, input_filename_length): Don't declare.
9900         (main_class_name, jvgenmain_spec, lang_specific_driver):
9901         Constify a char*.
9902         (lang_specific_driver): All calls to the function pointer
9903         parameter now explicitly call `fatal'.
9904
9905 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9906
9907         * parse.y (find_applicable_accessible_methods_list): Search
9908         abstract classes as interfaces.
9909
9910 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9911
9912         * class.c (finish_class): We're now outside a valid method
9913         declaration. Tell the rest of gcc so.
9914
9915 1999-09-08  Bruce Korb  autogen@linuxbox.com
9916
9917         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
9918
9919 1999-09-07  Tom Tromey  <tromey@cygnus.com>
9920
9921         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
9922         java-array.h.
9923         (decode_signature_piece): Don't emit "::" in JArray<>.
9924         (print_namelet): Only print trailing `;' when printing a class.
9925
9926 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
9927
9928         * java-tree.h: Delete declarations for all tree nodes now moved to
9929         global_trees.
9930         * decl.c: Delete their definitions.
9931
9932 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
9933
9934         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
9935         * Makefile.in (OBJS): Add ggc-callbacks.o.
9936         (OBJDEPS): Likewise.
9937
9938 1999-09-03  Tom Tromey  <tromey@cygnus.com>
9939
9940         * parse.y (strip_out_static_field_access_decl): Return operand if
9941         it satisfies JDECL_P.
9942
9943 1999-09-02  Tom Tromey  <tromey@cygnus.com>
9944
9945         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
9946         Handle nested arrays, like `[[I'.
9947
9948 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9949
9950         * class.c (finish_class): Remove unused parameter, all callers
9951         changed.
9952
9953         * expr.c (build_java_athrow): Change return type to void.
9954         (java_lang_expand_expr): Make sure each case in switch returns a
9955         value.
9956
9957         * java-tree.h (finish_class): Fix prototype to take void args.
9958
9959         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
9960         (main): Issue return from main, not exit.
9961
9962         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
9963
9964         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
9965
9966         * jv-scan.c (main): Issue return from main, not exit.
9967
9968         * parse.y (check_abstract_method_definitions,
9969         java_check_abstract_method_definitions): Add static prototypes.
9970         (java_complete_expand_methods): Fix call to `finish_class'.
9971
9972         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
9973         and `prevpc'.
9974
9975 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9976
9977         * lang.c (language_string): Constify.
9978
9979 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9980
9981         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
9982         Remove hacks for stuff which comes from libiberty.
9983
9984         * Make-lang.in: Likewise.
9985
9986 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
9987
9988         * Makefile.in (xref.o): Depend on xref.c explicitly.
9989
9990 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9991
9992         * java-tree.h (lang_printable_name): Constify a char*.
9993
9994         * lang.c (lang_printable_name): Likewise.
9995
9996 1999-08-27  Jeffrey A Law  (law@cygnus.com)
9997
9998         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
9999         comments in C code.
10000
10001 1999-08-26  Tom Tromey  <tromey@cygnus.com>
10002
10003         * gjavah.c (print_cxx_classname): Print "::" before qualified
10004         name.
10005
10006 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10007
10008         * parse.y (lookup_cl): Changed leading comment. Now does its best
10009         to set the column number.
10010         (qualify_ambiguous_name): Take WFL wrappers into account.
10011
10012 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
10013
10014         * verify.c (verify_jvm_instructions): Don't check instruction
10015         validity beyond end of method.
10016
10017 1999-08-25  Tom Tromey  <tromey@cygnus.com>
10018
10019         * jvspec.c (lang_specific_driver): Correctly handle --help again.
10020
10021 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10022
10023         * gjavah.c (print_name, print_base_classname, utf8_cmp,
10024         cxx_keyword_subst, generate_access, name_is_method_p,
10025         get_field_name, print_field_name, super_class_name, print_include,
10026         decode_signature_piece, print_class_decls, usage, help,
10027         java_no_argument, version, add_namelet, print_namelet): Add static
10028         prototype.
10029         (print_base_classname, utf8_cmp, cxx_keyword_subst,
10030         name_is_method_p): Constify a char*.
10031         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
10032         Provide a final else clause in an if-else-if.
10033         (print_field_info): Add missing final arg in function call to
10034         `print_field_name'.
10035         (print_method_info, decompile_method, decode_signature_piece,
10036         print_c_decl, print_full_cxx_name, print_stub,
10037         print_mangled_classname, super_class_name, print_include,
10038         add_namelet, add_class_decl, print_class_decls, process_file,
10039         help): Constify a char*.
10040
10041         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10042         push_int_const, find_constant_wide, find_constant_index,
10043         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10044         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10045         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10046         emit_if, emit_goto, emit_jsr, call_cleanups,
10047         make_class_file_name): Add static prototypes.
10048         (generate_bytecode_return, generate_bytecode_insns): Pass a
10049         NULL_PTR, not a NULL_TREE.
10050
10051         * jv-scan.c: Include "jcf.h".
10052         (main): Declare using DEFUN macro.
10053
10054         * jvspec.c (find_spec_file, lang_specific_pre_link,
10055         lang_specific_driver): Add prototypes.
10056         (find_spec_file): Constify a char*.
10057
10058         * keyword.gperf (hash, java_keyword): Add prototypes.
10059
10060         * lang.c (lang_print_error): Add static prototype.
10061         (lang_init): Prefer memcpy over bcopy to avoid casts.
10062
10063         * lex.c (yylex): Add static prototype.
10064
10065         * parse-scan.y: Include "lex.c" earlier.
10066
10067         * parse.h: Remove redundant declaration for `yylex'.
10068
10069         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10070         labeled_block_contains_loop_p): Add static prototypes.
10071         (not_accessible_p): Make static to match prototype.
10072
10073         * verify.c (start_pc_cmp): Don't needlessly cast away const.
10074
10075 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10076
10077         * parse.y (check_method_redefinition): Changed leading comment.
10078         (check_abstract_method_definitions): New function.
10079         (java_check_abstract_method_definitions): New function.
10080         (java_check_regular_methods): Call it.
10081         (verify_constructor_super): Fixed indentation.
10082         (lookup_method_invoke): Likewise.
10083
10084 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10085
10086         * parse.y (method_header): Return a null pointer if the current
10087         class node is null.
10088         (finish_method_declaration): Return if the current function decl
10089         is null.
10090         (source_start_java_method): Likewise.
10091         (java_method_add_stmt): Likewise.
10092
10093 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10094
10095         * class.c (emit_register_class): Removed unnecessary call to
10096         start_sequence.
10097         * parse.y (labeled_block_contains_loop_p): Removed unused local
10098         variable.
10099
10100 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10101
10102         * parse.y (java_refold): Added prototype.
10103
10104 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10105
10106         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10107         (java_stabilize_reference): Removed unnecessary `else'.
10108         (java_complete_lhs): Set flag to remember boolean. Call
10109         java_refold. Added comments.
10110         (java_decl_equiv): New function.
10111         (binop_compound_p): Likewise.
10112         (java_refold): Likewise.
10113         (patch_unaryop): Striped static field access assigned to decl and
10114         op. Changed promotion scheme for ++/-- operators.
10115         (search_loop): New function.
10116         (labeled_block_contains_loop_p): Likewise.
10117         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10118         comment.
10119         (patch_bc_statement): Call search_loop. Fixed comment.
10120
10121 1999-08-14  Anthony Green  <green@cygnus.com>
10122
10123         * expr.c (java_lang_expand_expr): Mark static array data as
10124         referenced.
10125
10126 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10127
10128         * jvgenmain.c (main): NUL-terminate name_obstack.
10129
10130 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10131
10132         * check-init.c (check_bool2_init, done_alternative): Add static
10133         prototypes.
10134
10135         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10136         (add_method, build_utf8_ref, build_class_ref,
10137         append_gpp_mangled_type, layout_class_method): Constify a char*.
10138
10139         * decl.c (push_promoted_type, make_binding_level): Add static
10140         prototypes.
10141         (push_promoted_type, pushdecl): Constify a char*.
10142
10143         * except.c (find_handler_in_range, link_handler,
10144         check_start_handlers): Add static prototypes.
10145
10146         * expr.c (process_jvm_instruction): Constify a char*.
10147
10148         * gjavah.c (main): Constify a char*.
10149
10150         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10151         Constify a char*.
10152
10153         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10154         static prototypes.
10155         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10156         munge, print_ents): Constify a char*.
10157
10158         * jcf-dump.c (disassemble_method): Constify a char*.
10159         (print_constant_pool, print_exception_table): Add static prototypes.
10160         (print_constant, print_exception_table, main, disassemble_method):
10161         Constify a char*.
10162
10163         * jcf-io.c (find_classfile, find_class): Likewise.
10164
10165         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10166         (set_source_filename, predefined_filename_p): Add static prototypes.
10167         (set_source_filename, get_constant, get_class_constant,
10168         find_in_current_zip): Constify a char*.
10169
10170         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10171         static prototypes.
10172         (add_entry, add_path, jcf_path_classpath_arg,
10173         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10174
10175         * jcf-reader.c (get_attribute, jcf_parse_preamble,
10176         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10177         jcf_parse_one_method, jcf_parse_methods,
10178         jcf_parse_final_attributes): Add static prototypes.
10179         (get_attribute): Constify a char*.
10180
10181         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10182         jcf_dependency_add_target, jcf_path_classpath_arg,
10183         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10184
10185         * jv-scan.c (main): Constify a char*.
10186         (gcc_obstack_init): Add prototype arguments.
10187
10188         * jvgenmain.c (gcc_obstack_init): Likewise.
10189         (main): Constify a char*.
10190
10191         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10192         static prototypes.
10193         (put_decl_string, lang_print_error): Constify a char*.
10194         (lang_init): Remove redundant extern prototype.
10195
10196         * mangle.c (emit_unicode_mangled_name): Constify a char*.
10197
10198         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10199         Add static prototypes.
10200         (get_type_from_signature): Constify a char*.
10201
10202         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10203         Add static prototypes.
10204         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10205         (verify_jvm_instructions): Constify a char*.
10206
10207         * xref.c (xref_flag_value): Likewise.
10208
10209         * xref.h (xref_flag_value): Likewise.
10210
10211         * zextract.c (makeword, makelong): Add static prototypes.
10212         (makeword, makelong): Constify a uch*.
10213
10214 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10215
10216         * lang.c (java_dummy_print): Constify a char*.
10217         (lang_print_error): Likewise.
10218         (lang_init): Remove redundant prototype for `print_error_function'.
10219         (lang_init_source): Likewise.
10220         (lang_identify): Constify a char*.
10221
10222 1999-08-09  Tom Tromey  <tromey@cygnus.com>
10223
10224         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10225         (WORDS_TO_LONG): Likewise.
10226         (WORDS_TO_DOUBLE): Likewise.
10227
10228 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10229
10230         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10231
10232         * expr.c (java_stack_pop, java_array_data_offset,
10233         build_java_throw_out_of_bounds_exception, case_identity,
10234         build_java_check_indexed_type): Add static prototypes.
10235         (linenumber_table, expand_invoke, expand_java_field_op,
10236         build_primtype_type_ref, expand_byte_code): Constify a char*.
10237
10238         * java-tree.h (build_primtype_type_ref, linenumber_table):
10239         Constify a char*.
10240         (java_lang_expand_expr): Add prototype.
10241
10242         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
10243         `java_lang_expand_expr'.
10244
10245         * lex.c (java_lex_error): Constify a char*.
10246         (java_get_unicode, java_read_char, java_allocate_new_line,
10247         java_unget_unicode, java_sneak_unicode): Prototype.
10248
10249         * parse-scan.y (current_class, package_name, method_declarator,
10250         report_class_declaration, yyerror): Constify a char*.
10251
10252         * parse.h (java_report_errors): Prototype.
10253         (yyerror): Constify a char*.
10254
10255         * parse.y (classitf_redefinition_error, check_modifiers,
10256         parse_jdk1_1_error, lookup_package_type,
10257         lookup_package_type_and_set_next, get_printable_method_name,
10258         purify_type_name): Constify a char*.
10259         (build_super_invocation, maybe_generate_finit,
10260         verify_constructor_super, parser_add_interface,
10261         add_superinterfaces, jdep_resolve_class, note_possible_classname,
10262         java_complete_expand_methods, java_expand_finals,
10263         cut_identifier_in_qualified, java_stabilize_reference,
10264         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10265         merge_string_cste): Prototype.
10266         (single_type_import_declaration, yyerror,
10267         variable_redefinition_error, build_array_from_name,
10268         build_unresolved_array_type, check_class_interface_creation,
10269         resolve_class, complete_class_report_errors,
10270         note_possible_classname, read_import_dir,
10271         find_in_imports_on_demand, resolve_package, fix_constructors,
10272         check_deprecation, lookup_method_invoke,
10273         maybe_build_primttype_type_ref, array_constructor_check_entry):
10274         Constify a char*.
10275         (java_complete_expand_methods, java_expand_finals): Make static.
10276         (convert_narrow): Remove static prototype.
10277
10278 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
10279
10280         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10281
10282 1999-08-02  Richard Henderson  <rth@cygnus.com>
10283
10284         * decl.c: Include defaults.h instead of expr.h.
10285         * parse.y: Likewise.
10286
10287 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
10288
10289         * java/decl.c (start_java_method): Change all uses of
10290         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10291         Ensure expr.h is included.
10292         * java/expr.c (pop_arguments): Ditto.
10293         * java/parse.y (expand_start_java_method): Ditto.
10294
10295 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10296
10297         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10298
10299 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
10300
10301         * decl.c: Include "function.h".
10302         * except.c: Likewise.
10303         * parse.y: Likewise.
10304         * Makefile.in: Update dependencies.
10305
10306 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10307
10308         * expr.c (build_java_soft_divmod): Provide a default case in switch.
10309         (java_lang_expand_expr): Mark parameters `target', `tmode' and
10310         `modifier' with ATTRIBUTE_UNUSED.
10311
10312         * gjavah.c (process_file): Add braces around ambiguous `else'.
10313
10314         * jcf-dump.c (print_access_flags, localvar_free): Change return
10315         type to void.
10316
10317         * parse.y (java_complete_expand_method): Initialize variable
10318         `exception_copy'.
10319         (resolve_qualified_expression_name): Likewise for `field_decl'.
10320         (patch_method_invocation): Likewise for `class_to_search'.
10321         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10322         (patch_assignment): Likewise for `lhs_type'.
10323
10324         * verify.c (verify_jvm_instructions): Remove unused variable
10325         `caller'.
10326
10327 1999-07-25  Richard Henderson  <rth@cygnus.com>
10328
10329         * decl.c (va_list_type_node): New.
10330
10331 1999-07-25  Anthony Green  <green@cygnus.com>
10332
10333         * gjavah.c (print_stub): New function.
10334         (METHOD_IS_NATIVE): New macro.
10335         (print_mangled_classname): Make static.
10336         (HANDLE_END_FIELD): Don't emit fields during stub generation.
10337         (process_file): Perform stub generation.
10338         (HANDLE_METHOD): Don't emit class decls during stub
10339         generation.
10340         (HANDLE_END_METHOD): Take into account stub generation.
10341         (print_method_info): Handle stub generation.
10342         (print_stub): New function.
10343         (print_cxx_classname): Make signature consistant with others.
10344         (help): Describe -stubs option.
10345         (main): Create stub file.
10346         (version): Use version.c.
10347         (print_full_cxx_name): New function.
10348         (print_c_decl): Use print_full_cxx_name.
10349
10350 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10351
10352         * check-init.c (check_init): Handle MAX_EXPR.
10353
10354 1999-07-15  Andrew Haley  <aph@cygnus.com>
10355
10356         * lang.c (flag_use_divide_subroutine): New variable.
10357         * typeck.c: (convert_ieee_real_to_integer): Bounds check
10358         fp-to-integer conversion.
10359         (convert): Call convert_ieee_real_to_integer when flag_fast_math
10360         is not set.
10361
10362         * expr.c (build_java_soft_divmod): New function.
10363         (build_java_binop): Call build_java_soft_divmod if
10364         flag_use_divide_subroutine is set.
10365         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10366         soft_lrem_node: new builtin functions.
10367         (init_decl_processing) Initialize the new builtins.
10368         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10369         soft_lrem_node: new builtin functions.
10370         (build_java_soft_divmod): New function.
10371         * parse.y: Call build_java_soft_divmod if
10372         flag_use_divide_subroutine is set.
10373         * parse.c: Rebuilt.
10374
10375         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10376         a --specs= arg) even if not linking.
10377         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10378         -fuse-divide-subroutine
10379
10380 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10381
10382         * parse.y (resolve_and_layout): Check methods only once.
10383         (resolve_qualified_expression_name): Verify thrown exceptions
10384         compatibility.
10385         (check_thrown_exceptions): Reject exceptions thrown in
10386         initializer. Error message tuned.
10387
10388 1999-07-14  Andrew Haley  <aph@cygnus.com>
10389
10390         * expr.c (expand_expr): Do not return the last statement in a
10391         block as the block's value.
10392
10393 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10394
10395         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10396         CALL_EXPR, to avoid order of evaluation changes.
10397
10398 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10399
10400         * parse.y (qualify_ambiguous_name): Do not use
10401         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10402
10403 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10404
10405         * check-init.c (check_init): Handle MAX_EXPR.
10406         * expr.c (force_evaluation_order): Force method call arguments to
10407         be evaluated in left-to-right order.
10408         * parse.y (qualify_ambiguous_name): Loop again to qualify
10409         NEW_ARRAY_EXPR properly.
10410
10411 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10412
10413         * parse.y (patch_invoke): Resolve unresolved invoked method
10414         returned type.
10415         (qualify_ambiguous_name): STRING_CST to qualify expression for
10416         type name resolution.
10417
10418 1999-06-24  Andrew Haley  <aph@cygnus.com>
10419
10420         * class.c (finish_class): Whenever a deferred method is
10421         output, rescan the list of methods to see if a new candidate for
10422         output can be found.
10423
10424 1999-06-28  Tom Tromey  <tromey@cygnus.com>
10425
10426         * jvspec.c (lang_specific_driver): Recognize --help.
10427
10428 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10429
10430         * parse.y (resolve_package): Fixed bogus return statement.
10431         (patch_method_invocation): Resolve method invocation beginning with
10432         a package name qualifier.
10433
10434 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10435
10436         * Make-lang.in (java.stage1): Depend on stage1-start.
10437         (java.stage2): Likewise for stage2-start.
10438         (java.stage3): Likewise for stage3-start.
10439         (java.stage4): Likewise for stage4-start.
10440
10441 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10442
10443         * parse.y (java_complete_lhs): When doing cross referencing, don't
10444         try to keep file location on a WFL expanded as a CALL_EXPR.
10445
10446 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10447
10448         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10449         compiling to class file a void method with an empty method body.
10450         As a side effect, the bytecode backend will generate the
10451         appropriate `return' instruction.
10452
10453 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10454
10455         * parse.y (lookup_package_type_and_set_next): New function prototype.
10456         (resolve_package): Search current and imported packages.
10457         (lookup_package_type_and_set_next): New function.
10458
10459 1999-06-22  Andrew Haley  <aph@cygnus.com>
10460
10461         * verify.c (verify_jvm_instructions): Check for pending blocks
10462         before invalid PC test and opcode switch, not after.
10463
10464 1999-06-21  Andrew Haley  <aph@cygnus.com>
10465
10466         * except.c (find_handler_in_range): The upper limit for exception
10467         ranges is exclusive, not inclusive: (start <= pc < end).
10468         (link_handler): find child pointer which points to outer by
10469         searching sibling list: previous code incorrectly assumed that
10470         outer->outer->first_child must point to outer.
10471         * verify.c (verify_jvm_instructions): FIXME added to code for
10472         `athrow'.
10473         (verify_jvm_instructions): Do not assume that the last block
10474         processed in a subroutine is a block which ends with a `ret'
10475         instruction.  With some control flows it is possible that the last
10476         block ends with an `athrow'.
10477
10478 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10479
10480         * parse.y (qualify_ambiguous_name): Reorganized the post
10481         evaluation of non WFL leading expression nodes.
10482
10483 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10484
10485         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10486         CONVERT_EXPR.
10487
10488 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10489
10490         * parse.y (qualify_ambiguous_name): Handle qualified expression
10491         beginning with a STRING_CST.
10492
10493 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10494
10495         * parse.y (register_fields): Set DECL_INITIAL on both
10496         pre-initialized static and public fields.
10497         (resolve_field_access): Static field access expressions to always
10498         use pointer types.
10499         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10500         qualification. CONVERT_EXPR to be resolved as an expression name.
10501         (java_complete_lhs): Identify and access qualified final
10502         initialized field in switch statement case expression.
10503         (fold_constant_for_init): Pre-initialized field decl constant to
10504         be folded.
10505
10506 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10507
10508         * parse.y (note_possible_classname): Mark returned node with
10509         QUALIFIED_P only if the original class name contained a '/'.
10510
10511 1999-06-05  Anthony Green  <green@cygnus.com>
10512
10513         * Make-lang.in (gcjh): More parallel build fixes.
10514
10515 1999-06-03  Mike Stump  <mrs@wrs.com>
10516
10517         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10518
10519 1999-06-02  Anthony Green  <green@cygnus.com>
10520
10521         * except.c (link_handler): Chain exception handlers in order.
10522
10523 1999-06-02  Anthony Green  <green@cygnus.com>
10524
10525         * expr.c (expand_byte_code): Fill unreachable bytecode regions
10526         with nops and process as usual in order to always set correct EH
10527         ranges.  Emit detailed warnings about unreachable bytecodes.
10528
10529 1999-06-02  Anthony Green  <green@cygnus.com>
10530
10531         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10532         constant.
10533
10534 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10535
10536         * parse.y (lookup_field_wrapper): Unified returned value to NULL
10537           or the searched field decl.
10538
10539 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10540
10541         * parse.y (fold_constant_for_init): Convert numerical constant
10542         values to the type of the assigned field.
10543
10544 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10545
10546         * expr.c (lookup_field): Relaxed the test on class loading error
10547         detection.
10548         * parse.y (fold_constant_for_init): Enabeled old code.
10549
10550 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10551
10552         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10553         decide the validity of the cast of a java.lang.Cloneable reference
10554         to an array.
10555         (patch_conditional_expr): Fixed first argument passed to
10556         binary_numeric_promotion.
10557
10558 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10559
10560         * parse.y (qualify_ambiguous_name): Take into account that a
10561         CONVERT_EXPR might specify a type as a WFL.
10562
10563 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10564
10565         * parse.y (patch_assignment): Save the rhs before using it as an
10566         argument to _Jv_CheckArrayStore.
10567
10568 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10569
10570         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10571
10572 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10573
10574         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10575         floating point literal only when the exponent indicator has been
10576         parsed.
10577
10578 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10579
10580         * parse.y (formal_parameter:): Construct argument tree list
10581         element even if a yet unsupported final parameter was encountered.
10582
10583 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10584
10585         * parse.y (finish_method_declaration): Issue errors for native or
10586         abstract methods declared with a method body, as well as for non
10587         native or non abstract methods with no method body.
10588
10589 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10590
10591         * class.c (build_utf8_ref): Initialize variable `field'.
10592
10593         * decl.c (init_decl_processing): Initialize variable `field'.
10594
10595         * expr.c (build_known_method_ref): Mark parameters `method_type',
10596         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10597         (process_jvm_instruction): Likewise for parameter `length'.
10598
10599         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10600         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10601         ATTRIBUTE_UNUSED.
10602
10603         * parse.y (maybe_generate_clinit): Remove unused variable
10604         `has_non_primitive_fields'.
10605         (find_in_imports_on_demand): Initialize variables `node_to_use'
10606         and `cl'.
10607         (patch_binop): Likewise for variable `prom_type'.
10608         (patch_unaryop): Likewise for variable `prom_type'.
10609
10610         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10611
10612         * xref.c (xref_table): Add missing initializer.
10613
10614 1999-05-14  Tom Tromey  <tromey@cygnus.com>
10615
10616         * java-except.h (struct eh_range): Removed unused `next' member.
10617         * verify.c (verify_jvm_instructions): Call check_nested_ranges
10618         after adding all exception handlers.  Sort exception ranges in
10619         order of start PC.
10620         (struct pc_index): New structure.
10621         (start_pc_cmp): New function.
10622         * except.c (add_handler): Return `void'.  Don't call link_handler;
10623         instead construct an ordinary linked list and do range
10624         coalescing.
10625         (check_nested_ranges): New function.
10626         (link_handler): Changed interface to allow merging of eh_ranges.
10627         Split overlapping ranges.  Return `void'.
10628
10629 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10630
10631         * parse.y (constructor_block_end:): New rule, tagged <node>.
10632         (constructor_body:): Use `constructor_block_end' instead of
10633         `block_end'.
10634
10635 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10636
10637         * parse.y (statement_nsi:): Pop `for' statement block.
10638         (java_complete_lhs): Labeled blocks containing no statement are
10639         marked as completing normally.
10640
10641 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10642
10643         * xref.c (xref_set_current_fp): New function, defined.
10644         * xref.h (xref_set_current_fp): New function, prototyped.
10645
10646 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10647
10648         * check-init.c (check_init): Take into account that
10649         LABELED_BLOCK_STMT can be empty.
10650
10651 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10652
10653         * parse.y (java_check_regular_methods): Warning check on not
10654         overriding methods with default access in other packages does not
10655         apply to `<clinit>'.
10656         (java_complete_lhs): If block body is an empty_stmt_node, replace
10657         it by NULL_TREE. This prevents gcc from generating an irrelevant
10658         warning.
10659
10660 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10661
10662         * check-init.c (check_init): Removed code accepting to see things
10663         falling through default:, when doing xrefs.
10664         * java-tree.h (do_not_fold): New global variable, declared.
10665         * parse.y (do_not_fold): New global variable, defined.
10666         (java_complete_expand_method): Set `do_not_fold' to the value of
10667         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10668         and reinstall them after them have been purged; do not check for
10669         initializations; do not issue missing return errors.
10670         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10671         when doing xrefs.
10672         (patch_binop): Skip the fold part when doing xrefs.
10673         (build_string_concatenation): Skip the concatenation part when
10674         doing xrefs.
10675         (patch_synchronized_statement): Do not generate a try-finally when
10676         doing xrefs.
10677         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
10678         and keep the location where the throw was seen.
10679         * typeck.c (convert): When `do_not_fold' is set, do not attempt
10680         any treatment on the converted node an simply return a NOP_EXPR of
10681         the targeted type.
10682         * xref.c (xref_get_data): New function, defined.
10683         * xref.h (xref_get_data): New function, declared.
10684         (XREF_GET_DATA): Use xref_get_data.
10685
10686 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10687
10688         * gjavah.c (print_include): Cast the result of `strlen' to int
10689         when comparing against a signed value.
10690         (add_namelet): Likewise.
10691
10692 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10693
10694         * expr.c (expand_invoke): Mark parameter `nargs' with
10695         ATTRIBUTE_UNUSED.
10696         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
10697
10698         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
10699         ATTRIBUTE_UNUSED.
10700
10701         * jcf-reader.c (get_attribute): Cast a value to long
10702         when comparing against a signed expression.  Likewise.
10703
10704         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
10705         HOST_BITS_PER_CHAR.
10706
10707 1999-05-11  Andrew Haley  <aph@cygnus.com>
10708
10709         * parse.y (source_end_java_method): If the current method contains
10710         any exception handlers, force asynchronous_exceptions: this is
10711         necessary because signal handlers in libjava may throw exceptions.
10712         * decl.c (end_java_method): Ditto.
10713
10714 1999-05-11  Tom Tromey  <tromey@cygnus.com>
10715
10716         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
10717         flags.
10718         * jvspec.c (THREAD_NAME): Removed.
10719         (GC_NAME): Likewise.
10720         (MATHLIB): Likewise.
10721         (WITHLIBC): Likewise.
10722         (GCLIB): Likewise.
10723         (THREADLIB): Likewise.
10724         (MATH_LIBRARY): Likewise.
10725         (lang_specific_driver): Don't add `-l' options to command line.
10726         Instead, add a single --specs option.  Recognize `-L' options and
10727         use them to search for spec file.
10728         (find_spec_file): New function.
10729         (SPEC_FILE): New define.
10730
10731 1999-05-11  Dave Brolley  <brolley@cygnus.com>
10732
10733         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
10734         cpplib-enabled build.
10735
10736 1999-05-05  Per Bothner  <bothner@cygnus.com>
10737
10738         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
10739         temporarily zero it while calling rest_of_decl_compilation.
10740
10741         * java-tree.h (string_ptr_type_node):  Add declaration.
10742         * decl.c:  Define and initialize string_ptr_type_node.
10743         * parse.y (patch_string_cst):  Use string_ptr_type_node.
10744
10745         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
10746         * parse.y (for_statement):  Now unconditionally exit_block.
10747         (finish_labeled_statement):  No longer exit_block if for-loop.
10748         (patch_loop_statement):  Check harder if the loop is already labeled.
10749
10750         * parse.y (patch_initialized_static_field):  Removed function.
10751         (maybe_generate_clinit):  Removed special handling for interfaces.
10752         (java_complete_expand_methods):  Do a preliminary java_complete_tree
10753         on <clinit> to determine if it can be removed.
10754         (java_complete_expand_method):  Remove special handling for <clinit>.
10755         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
10756         optimize if we get back empty_stmt_node.
10757         For MODIFY_EXPR, re-do checking of static initializers.
10758         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
10759         For VAR_DECL, pass correct context.
10760
10761         * verify.c (verify_jvm_instructions):  Better error messages.
10762
10763 1999-05-03  Tom Tromey  <tromey@cygnus.com>
10764
10765         * parse-scan.y (interface_declaration): Call
10766         report_class_declaration for interfaces.
10767
10768 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
10769
10770         * Makefile.in: Remove -v from bison command lines.
10771
10772 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10773
10774         * check-init.c (check_init): Exclude a case of error when doing
10775         xrefs.
10776         * class.c (layout_class_method): Don't generate the error message
10777         twice when compiling from source.
10778         * lang-options.h: Added `-Wredundant-modifers' and
10779         `-Wunusupported-jdk11' flags and help text.
10780         * lang.c (lang_decode_option): Added support for
10781         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
10782         flag_static_local_jdk11 and flag_redundant set accordingly.
10783         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
10784         * parse.h (EXPR_WFL_ADD_COL): New macro.
10785         (DECL_END_SOURCE_LINE): Likewise.
10786         (DECL_INHERITED_SOURCE_LINE): Likewise.
10787         * parse.y (static_ref_err): New function, prototyped.
10788         (CCB_TK): Now tagged <operator>.
10789         (class_body:): Remember the location of the closing '}' of a class
10790         definition when doing xrefs.
10791         (block:): Likewise.
10792         (block_end:): Likewise.
10793         (create_class): Remember the location of the inherited class
10794         identifier when doing xrefs.
10795         (register_fields): Added test on first operand of `init' before
10796         testing it TREE_CODE.
10797         (method_header): Store the location of the class identifier in the
10798         class decl when doing xrefs.
10799         (finish_method_declaration): Don't combine first/last method line
10800         when doing xref.
10801         (java_check_regular_methods): Warning check on not overriding
10802         methods with default access on other packages move before check on
10803         static methods. Initialization of `aflags' also moved up.
10804         (resolve_expression_name): Call static_ref_err to report the error.
10805         (static_ref_err): New function, implemented.
10806         (resolve_field_access): Returned simplified static field access
10807         when doing xrefs.
10808         (resolve_qualified_expression_name): Check for illegal use of
10809         static fields in a non static context. Call static_ref_err to
10810         report error in various places.
10811         (java_complete_tree): Do not fold initialized static fields when
10812         doing xrefs.
10813         (java_complete_lhs): Likewise.
10814
10815 1999-04-29  Anthony Green  <green@cygnus.com>
10816
10817         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
10818         create internal labels.
10819         (lookup_label): Ditto.
10820
10821 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10822
10823         * class.c (layout_class_method): Generate <clinit>'s rtl for
10824         interfaces.
10825         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10826         for interfaces' <clinit>.
10827         * expr.c (lookup_field): Search for fields in interfaces.
10828         (expand_invoke): Fixed indentation.
10829         (expand_java_field_op): Likewise. Use IS_CLINIT.
10830         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
10831         (IS_CLINIT): New macro.
10832         * parse.y (type_declaration:): Call maybe_generate_clinit after an
10833         interface was parsed.
10834         (maybe_generate_clinit): Don't generate if the current class is an
10835         interface with only fields of primitive types.
10836         (reset_method_name): Use IS_CLINIT.
10837         (java_complete_expand_method): Expand <clinit> when it exists for
10838         interfaces. Use IS_CLINIT.
10839         (resolve_expression_name): Use DECL_CONTEXT instead of
10840         current_class to build static field references.
10841         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
10842         ARRAY_REF when doing xreferencing.
10843         (check_final_assignment): Fixed typo in leading comment. Use
10844         IS_CLINIT.
10845         (patch_array_ref): Don't fully expand array references when
10846         xreferencing.
10847         (patch_return): Use IS_CLINIT.
10848         (patch_throw_statement): Likewise.
10849
10850 1999-04-22  Tom Tromey  <tromey@cygnus.com>
10851
10852         * Make-lang.in (JAVA_SRCS): Added check-init.c.
10853
10854 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10855
10856         * decl.c (predef_filenames, predef_filenames_size): New globals
10857         (init_decl_processing): predef_filenames and predef_filenames_size
10858         initialized.
10859         * java-tree.h (predef_filenames, predef_filenames_size): Declared
10860         extern.
10861         * jcf-parse.c (predefined_filename_p): New function.
10862         (yyparse): Check that files on the command line are specified only
10863         once and issue a warning otherwise.
10864         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
10865         * parse.y (source_end_java_method): Nullify NOP method bodies, to
10866         avoid a gcc warning with -W -Wall turned on.
10867         (java_expand_classes): Abort if errors were encountered.
10868         (java_complete_lhs): If the cross reference flag is set, wrap
10869         field DECL node around a WFL when resolving expression name.
10870
10871 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10872
10873         * lang.c (lang_decode_option): Fixed returned value when parsing
10874         `-fxref=...' and `-Wall'.
10875         * parse.y (source_end_java_method): Do not generate code when
10876         flag_emit_xref is set.
10877         (resolve_expression_name): Do not build static field access when
10878         flag_emit_xref is set.
10879         (resolve_field_access): No special treatment on `length' when
10880         flag_emit_xref is set. Do not build qualified static field access
10881         when flag_emit_xref is set.
10882         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
10883         when flag_emit_xref is set.
10884         (patch_assignment): Do not generate array store runtime check when
10885         flag_emit_xref is set.
10886         * xref.c (xref_flag_value): Fixed function declaration
10887         indentation.
10888         (xset_set_data): New function.
10889         * xref.h (xref_set_data): Added prototype for new function.
10890         (typedef struct xref_flag_table): New field data.
10891         (XREF_GET_DATA): New macro.
10892
10893 1999-04-19  Tom Tromey  <tromey@cygnus.com>
10894
10895         * xref.h (enum): Removed trailing comma.
10896
10897         * parse.y (resolve_qualified_expression_name): Added missing
10898         `break'.
10899
10900 1999-04-15  Anthony Green  <green@cygnus.com>
10901
10902         * gjavah.c: New prototypes for java_float_finite and
10903         java_double_finite.
10904
10905 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10906
10907         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
10908         references.
10909
10910 1999-04-06  Jeffrey A Law  (law@cygnus.com)
10911
10912         * Makefile.in (TREE_H): Add tree-check.h.
10913         (RTL_H): Add genrtl.h.
10914
10915 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10916
10917         * parse.y (patch_assignment): Added ArrayStoreException runtime
10918         check.
10919
10920 1999-04-06  Per Bothner  <bothner@cygnus.com>
10921
10922         * expr.c (pop_type_0):  New function.
10923         (pop_type):  Use pop_type_0.
10924         * java-tree.h (pop_type_0):  New declaration.
10925         * verify.c (verify_jvm_instructions):  Check return instructions.
10926
10927         * parse.y (patch_binop):  Don't fold if non-constant and emiting
10928         class files.
10929
10930 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10931
10932         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
10933
10934         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
10935         (main_jcf): Don't define.
10936         (process_file): Don't set `main_jcf'.
10937
10938         * java-tree.h (main_jcf): Don't declare.
10939
10940         * jcf-parse.c (main_jcf): Add static definition.
10941
10942         * lang.c (main_jcf): Don't define.
10943
10944 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10945
10946         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
10947
10948         * decl.c (copy_lang_decl): Likewise for `bcopy'.
10949
10950         * jcf-depend.c: Include "config.h", not <config.h>.
10951
10952         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
10953         `bcopy' to PTR.
10954
10955         * jcf-path.c: Include "config.h", not <config.h>.
10956
10957         * lex.c: Don't include various system header files.
10958         (java_init_lex): Cast the argument of `bzero' to PTR
10959
10960         * parse-scan.y (java_push_parser_context): Likewise.
10961
10962         * parse.y (java_push_parser_context): Likewise.
10963         (patch_bc_statement): Match format specifier to variable argument.
10964
10965         * xref.c: Don't include <stdio.h>.
10966
10967 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10968
10969         * parse.y (struct parser_ctxt *ctxp): Now global.
10970         (declare_local_variables): Use WFL compound value for the
10971         declaration source line value, when doing cross-referencing.
10972
10973 1999-03-31  Tom Tromey  <tromey@cygnus.com>
10974
10975         * gjavah.c (print_field_info): Allow constants of other types.
10976         (print_include): Generate include when new name is proper prefix
10977         of already printed name.
10978         (add_namelet): Likewise.
10979         (cxx_keyword_subst): New function.
10980         (print_method_info): Use it.
10981         (print_field_name): New function.
10982         (get_field_name): New function.
10983         (print_field_info): Use get_field_name and print_field_name.
10984
10985 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10986
10987         * Makefile.in (keyword.h): Generate using gperf language 'C', not
10988         'KR-C', so gperf uses the `const' keyword on strings.
10989
10990         * keyword.gperf (java_keyword): Const-ify a char*.
10991
10992 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10993
10994         * parse.y (patch_bc_statement): Fixed identation and a bogus
10995         `printf' format.
10996
10997 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10998
10999         * parse.y (patch_assignment): Allow static variables in other
11000         classes to be assigned.
11001
11002 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11003
11004         * class.c (maybe_add_interface): Remove unused variable
11005         `interface_binfo'.
11006         (make_class_data): Use = for assignment, not ==.  Likewise.
11007         (emit_register_classes): Remove unused variable `decl'.
11008
11009         * lex.c: Fix comment so as not to contain an embedded `/*'.
11010
11011         * verify.c (verify_jvm_instructions): Remove unused variable
11012         `self_type'.
11013
11014 1999-03-27  Per Bothner  <bothner@cygnus.com>
11015
11016         * parse.y (complete_loop_body):  Rename to finish_loop_body.
11017         (complete_labeled_statement):  Rename to finish_labeled_statement.
11018         (complete_for_loop):  Rename to finish_for_loop.
11019         (complete_method_declaration):  Rename to finish_method_declaration.
11020
11021         * java-tree.h (continue_identifier_node):  New global node.
11022         * decl.c:  Define and initialize continue_identifier_node.
11023         * parse.y (generate_labeled_block):  Remove - no longer needed.
11024         (build_loop_body):  Use continue_identifier_node for continue block.
11025         (finish_labeled_statement):  Also do pop_labeled_block actions.
11026         (java_complete_lhs):  POP_LOOP even if error.
11027         (build_labeled_block):  Special handling for continue_identifier_node.
11028         (patch_loop_statement):  Re-organize.
11029         (patch_bc_statement):  Re-write.
11030
11031 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11032
11033         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11034         using a WFL compound value.
11035         * parse.y (xref.h): Include.
11036         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11037         WFL compound value.
11038         (register_fields): Set WFL compound value to lineno if doing
11039         xrefs.
11040         (java_complete_expand_method): Call expand_xref if flag_emit_xref
11041         is set.
11042         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11043         * xref.h (expand_xref): Prototype renamed from xref_generate.
11044
11045 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11046
11047         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11048         (GET_CURRENT_BLOCK): New macro.
11049         * parse.y (current_static_block): New global variable.
11050         (method_body:): Define action.
11051         (complete_method_declaration): Set current_function_decl to NULL
11052         when work on the current method is done.
11053         (declare_local_variables): Use GET_CURRENT_BLOCK.
11054         (java_method_add_stmt): Likewise.
11055         (java_complete_expand_method): Disable the use of `this' when
11056         expanding <clinit>.
11057         (enter_a_block): If no current method exist, use
11058         current_static_block to link static initializer blocks.
11059         (exit_block): Rewritten to use current_static_block when no current
11060         method decl exists.
11061         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11062         (patch_return): Forbid the use of `return' in static initializers.
11063         (patch_throw_statement): Fixed indentation. Issue specific error
11064         for uncaught thrown checked exception in static initializer
11065         blocks. Removed FIXME.
11066
11067 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
11068
11069         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11070         Link gcj from gcc.o.
11071
11072 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11073
11074         * parse.y (find_applicable_accessible_methods_list): When dealing
11075         with interface: ensure that a given interface or java.lang.Object
11076         are searched only once.
11077
11078 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11079
11080         * gjavah.c (print_c_decl): Remove unused argument `flags'.
11081
11082         * jcf-dump.c (print_access_flags): Add braces around if-else.
11083
11084         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11085         COMBINE_INPUTS.
11086
11087         * lex.c (build_wfl_node): Add static prototype.
11088
11089         * lex.h (build_wfl_node): Remove static prototype.
11090
11091         * parse.y: Include lex.c early enough to declare everything needed.
11092         Ensure calls to `build_wfl_node' pass the proper arguments.
11093         (create_class): Remove unused variable `super_decl'.
11094         (get_printable_method_name): Initialize variable `name'.
11095
11096 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11097
11098         * Changelog: Fixed 1999-03-22 typos.
11099         * lang.c (lang_decode_option): Fixed typo in error string in the
11100         XARG section.
11101
11102 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11103
11104         * Makefile.in (JAVA_OBJS): Added entry xref.o.
11105         (xref.o): New rule.
11106         * java-tree.h (flag_emit_xref): Declared extern.
11107         * lang.c (xref.h): Included.
11108         (flag_emit_xref): New global variable.
11109         (lang_decode_option): Added support for -fxref.
11110         * xref.c: Created.
11111         * xref.h: Likewise.
11112
11113 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
11114
11115         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11116         linked with.
11117
11118 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11119
11120         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11121         $(srcdir)/../system.h and $(JAVA_TREE_H).
11122         (jcf-io.o): Depend on $(JAVA_TREE_H).
11123         (mangle.o): Likewise.
11124
11125         * check-init.c (check_cond_init): Add static prototype.
11126
11127         * class.c (build_java_method_type, hashUtf8String,
11128         make_field_value, get_dispatch_vector, get_dispatch_table,
11129         append_gpp_mangled_type, mangle_static_field): Likewise.
11130         (strLengthUtf8): Hide unused definition.
11131         (hashUtf8String): Const-ify.
11132         (make_field_value): Un-ANSI-fy.
11133
11134         * constants.c: Move inclusion of jcf.h above java-tree.h.
11135         (set_constant_entry, find_class_or_string_constant,
11136         find_name_and_type_constant, get_tag_node,
11137         build_constant_data_ref): Add static prototype.
11138
11139         * decl.c (push_jvm_slot, builtin_function,
11140         lookup_name_current_level): Likewise.
11141         (builtin_function): Const-ify.
11142
11143         * except.c (expand_start_java_handler, expand_end_java_handler):
11144         Add static prototype.
11145
11146         * expr.c (flush_quick_stack, push_value, pop_value,
11147         java_stack_swap, java_stack_dup, build_java_athrow,
11148         build_java_jsr, build_java_ret, expand_java_multianewarray,
11149         expand_java_arraystore, expand_java_arrayload,
11150         expand_java_array_length, build_java_monitor, expand_java_pushc,
11151         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11152         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11153         expand_compare, expand_test, expand_cond, expand_java_goto,
11154         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11155         expand_java_field_op, java_push_constant_from_pool): Likewise.
11156
11157         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11158         (build_java_arraynull_check): Mark parameters `node' and `type'
11159         with ATTRIBUTE_UNUSED.
11160         (note_label): Likewise for parameter `current_pc'.
11161         (expand_java_call, expand_java_ret): Hide unused definition.
11162
11163         * java-tree.h (make_class, build_constants_constructor,
11164         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11165         init_outgoing_cpool, register_class, emit_register_classes,
11166         java_layout_seen_class_methods): Prototype.
11167         (unicode_mangling_length): Const-ify.
11168         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11169         emit_unicode_mangled_name, format_int, format_uint,
11170         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11171         jcf_print_utf8_replace, open_class): Prototype.
11172
11173         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
11174         <stdio.h>.  Include tree.h/java-tree.h.
11175         (utf8_equal_string usage, process_class): Add static prototype.
11176         (open_class): Don't prototype this here.
11177         (utf8_equal_string): Match arguments to format specifiers.
11178         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11179         TABLE_SWITCH, disassemble_method): Likewise.
11180
11181         * jcf-io.c: Include tree.h/java-tree.h.
11182         (open_class, find_classfile, jcf_print_utf8,
11183         jcf_print_utf8_replace): Const-ify.
11184
11185         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11186         parse_class_file): Add static prototype.
11187         (find_in_current_zip): Match definition to existing static
11188         prototype.
11189
11190         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11191         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11192         finish_jcf_block, define_jcf_label, get_jcf_label_here,
11193         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11194         write_chunks, adjust_typed_op, generate_bytecode_conditional,
11195         generate_bytecode_return, perform_relocations, init_jcf_state,
11196         init_jcf_method, release_jcf_state, generate_classfile):
11197         Add static prototype.
11198         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11199         (make_class_file_name): Const-ify.
11200
11201         * jcf.h (find_classfile): Const-ify.
11202
11203         * jv-scan.c (reset_report): Remove prototype.
11204
11205         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11206         (error): Rewrite to allow varargs.
11207
11208         * lang.c (lang_f_options): Const-ify.
11209
11210         * lex.c (java_parse_escape_sequence): Add static prototype.
11211         (java_allocate_new_line): Match definition to existing static
11212         prototype.
11213
11214         * mangle.c Include tree.h/java-tree.h.
11215         (unicode_mangling_length, emit_unicode_mangled_name,
11216         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11217
11218         * parse.h (jdep_code): Remove trailing comma in enumeration.
11219         (java_get_line_col): Move prototype outside of !JC1_LITE test.
11220         (reset_report): Add prototype.
11221
11222         * verify.c (push_pending_label, merge_types): Add static
11223         prototypes.
11224
11225         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11226
11227 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11228
11229         * parse.y (find_applicable_accessible_methods_list): Extend the
11230         search to superinterfaces when relevant.
11231         (search_applicable_methods_list): New function.
11232
11233 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11234
11235         * class.c (unmangle_classname): Implemented stricter testing
11236         before setting the QUALIFIED_P flag on an identifier.
11237
11238 1999-03-16  Per Bothner  <bothner@cygnus.com>
11239
11240         * parse.y (java_complete_lhs):  Call force_evaluation_order
11241         after patch_newarray.
11242         (patch_binop):  Don't call fold if there are side effects.
11243
11244 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11245
11246         * parse.y (java_stabilize_reference): Use save_expr instead of
11247         building a SAVE_EXPR node.
11248         (java_complete_lhs): Patch the resulting string of the `+='
11249         operator (if necessary) and complete the RHS after having built
11250         the cast.
11251
11252 1999-03-15  Per Bothner  <bothner@cygnus.com>
11253
11254         * class.c (make_class):  Don't set CLASS_P here (because
11255         this function is also called by build_java_array_type).
11256         (push_class):  Set CLASS_P here instead.
11257         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
11258
11259         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
11260         context.  If the context is class, perfer "super" over "synchronized".
11261         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
11262
11263         * parse.y (create_class):  Don't call parser_check_super here;
11264         it is not robust.  Always wait until later.
11265
11266         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
11267         match what JDK 1.2 does), but don't set ACC_PUBLIC.
11268
11269 1999-03-13  Per Bothner  <bothner@cygnus.com>
11270
11271         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
11272         * lex.h (UNGETC):  Change misleading macro.
11273
11274 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11275
11276         * parse.y (java_stabilize_reference): Return NODE when patching a
11277         COMPOUND_EXPR.
11278         (java_complete_lhs): Put parenthesis around truth values.
11279
11280 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11281
11282         * class.c (layout_class_method): Don't make rtl for interface
11283         methods.
11284         * parse.h (GET_TYPE_NAME): New macro.
11285         * parse.y (if_then_statement:): Fixed indentation.
11286         (if_then_else_statement:): Likewise.
11287         (for_statement:): Fixed spacing.
11288         (try_statement:): Fixed indentation.
11289         (create_interface): Don't force interfaces to be abstract.
11290         (method_header): Abstract methods are OK in interfaces.
11291         (declare_local_variables): Fixed typo in comment.
11292         (java_complete_expand_method): Fixed indentation.
11293         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11294         non accessible fields.
11295         (java_stabilize_reference): New function.
11296         (java_complete_lhs): Fixed indentation. Use
11297         java_stabilize_reference in compound assignment. Insert the
11298         cast. If not processing `+' fix string constants before processing
11299         binop.
11300
11301 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11302
11303         * constants.c (find_class_or_string_constant): Cast variable `j'
11304         to a `jword' when comparing against one.
11305
11306         * expr.c (java_lang_expand_expr): Remove unused variables
11307         `has_finally_p' and `op0'.
11308
11309         * gjavah.c (print_field_info): Cast a value to jint when comparing
11310         against one.  Likewise for a jlong.
11311         (add_namelet): Likewise cast a `sizeof' to an int when comparing
11312         against a signed quantity.
11313
11314         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11315         (print_signature): Don't needlessly dereference variable `str'
11316
11317         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11318         `max_locals' with ATTRIBUTE_UNUSED.
11319         (jcf_parse_class): Likewise for variable `index'.
11320
11321         * parse.h (reverse_jdep_list): Remove static prototype.
11322
11323         * parse.y (build_jump_to_finally): Remove prototype and definition.
11324         (reverse_jdep_list): Add static prototype.
11325
11326         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11327         `assignment' and `expr_decl'.
11328
11329         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11330
11331 1999-03-12  Andrew Haley  <aph@cygnus.com>
11332
11333         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11334         we'll need a directory separator and a null character.
11335
11336 1999-03-10  Per Bothner  <bothner@cygnus.com>
11337
11338         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
11339
11340   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11341
11342         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11343         interfaces.
11344
11345 1999-03-05  Per Bothner  <bothner@cygnus.com>
11346
11347         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
11348
11349         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
11350
11351         * class.c (layout_class_method):  A static method in a base class
11352         is never overridden, so treat it like it doesn't exist.
11353         However, do complain about private non-static method overriding
11354         public static method.
11355
11356         * parse.y:  Don't set unused INITIALIZED_P flag.
11357         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
11358
11359         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
11360         (build_array_from_name):  Re-order &index[string] to &string[index].
11361
11362         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
11363         error_mark (it might catch more errors, but it is more likely to lose).
11364
11365 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11366
11367         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11368         (parse-scan.o): Depend on toplev.h.
11369
11370         * class.c (make_method_value): Add prototype.  Make it static.
11371         Remove unused second argument, caller changed.
11372
11373         * expr.c (java_lang_expand_expr): Remove unused variable
11374         `return_label'.
11375
11376         * java-tree.h: Don't prototype find_in_current_zip.
11377         Add prototypes for verify_constant_pool, start_java_method,
11378         end_java_method, give_name_to_locals, expand_byte_code,
11379         open_in_zip, set_constant_value, find_constant1, find_constant2,
11380         find_utf8_constant, find_string_constant, find_class_constant,
11381         find_fieldref_index, find_methodref_index, write_constant_pool,
11382         count_constant_pool_bytes and encode_newarray_type.
11383
11384         * jcf-dump.c: Remove unused variable `LONG_temp'.
11385
11386         * jcf-parse.c: Include parse.h.
11387         (jcf_parse_source): Remove unused parameter, all callers changed.
11388         (jcf_figure_file_type): Add static prototype.
11389         (find_in_current_zip): Likewise.  Also remove unused parameter,
11390         all callers changed.
11391         (read_class): Initialize variable `saved_pos'.
11392
11393         * jcf-reader.c (jcf_parse_preamble): Mark variables
11394         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11395
11396         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11397         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11398         (java_parse_doc_section): Initialize variable `seen_star'.
11399         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11400         (java_lex_error): Mark parameters `msg' and `forward' with
11401         ATTRIBUTE_UNUSED.
11402         (java_get_line_col): Mark parameters `filename' and `line' with
11403         ATTRIBUTE_UNUSED.
11404
11405         * parse-scan.y: Include toplev.h.
11406         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11407
11408         * parse.h: use `struct JCF', not plain `JCF'.
11409         (java_parser_context_save_global, java_expand_classes
11410         java_parser_context_restore_global, java_parse): Add prototypes.
11411
11412         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11413         `node'.
11414
11415 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
11416
11417         *  check-init.c (check_init):  COPYN takes word count, not bit count.
11418
11419 1999-02-26  Per Bothner  <bothner@cygnus.com>
11420
11421         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
11422         explicit build_decl.  (Avoids crash in reload when optimizing.)
11423
11424 1999-02-25  Per Bothner  <bothner@cygnus.com>
11425
11426         * decl.c (complete_start_java_method):  Handle synchronized method
11427         even when compiling from bytecode.
11428
11429 1999-02-26  Tom Tromey  <tromey@cygnus.com>
11430
11431         * gjavah.c (add_class_decl): Only generate `#include' if outer
11432         class is not the name of the class we are processing.  Correctly
11433         append `.h' in #include.
11434         (process_file): Clean up newlines around generated `#include's.
11435         (decode_signature_piece): Correctly handle inner classes.
11436         (struct include): New structure.
11437         (all_includes): New global.
11438         (print_include): New function.
11439         (add_class_decl): Use it.
11440         (process_file): Likewise.
11441         (add_class_decl): Generate include for java-array.h if array
11442         seen.
11443         (process_file): Don't generate java-array.h include.
11444
11445         * gjavah.c (add_namelet): Check for standard package names here.
11446         (add_class_decl): Don't check for standard package names here.
11447
11448 1999-02-25  Tom Tromey  <tromey@cygnus.com>
11449
11450         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11451         When reading a zip file, only use strncmp if both strings are
11452         bigger than the buffer length.  Initialize `k' when looping
11453         through zip file.
11454
11455 1999-02-24  Tom Tromey  <tromey@cygnus.com>
11456
11457         * gjavah.c (struct namelet): New structure.
11458         (add_namelet): New function.
11459         (print_namelet): New function.
11460         (print_class_decls): Use add_namelet and print_namelet to generate
11461         namespaces and not classes.
11462         (method_printed): New global.
11463         (HANDLE_END_METHOD): Examine method_printed.
11464         (print_method_info): Set method_printed when required.  Print
11465         error if function to be ignored is marked virtual.  Handle $finit$
11466         method.
11467         (METHOD_IS_FINAL): New macro.
11468         (print_field_info): Use it.
11469         (HANDLE_METHOD): Clear method_printed.
11470         (method_pass): New global.
11471         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11472         (process_file): Do two passes over both fields and methods.
11473         (HANDLE_METHOD): Examine method_pass.
11474         (root): New global.
11475         (add_class_decl): New function.
11476         (print_class_decls): Don't scan over entire constant pool.
11477
11478 1999-02-23  Tom Tromey  <tromey@cygnus.com>
11479
11480         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11481         disable linking in that case.
11482
11483 1999-02-20  Tom Tromey  <tromey@cygnus.com>
11484
11485         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11486         not 0x1f.
11487
11488 1999-02-21  Per Bothner  <bothner@cygnus.com>
11489
11490         * decl.c (build_result_decl), java-tree.h:  New method.
11491         (complete_start_java_method):  Handle synchronized methods.
11492         Don't build DECL_RESULT here.  (Ordering dependency problem.)
11493         (start_java_method):  Call build_result_decl here instead  ...
11494         * parse.y (java_complete_expand_method):  ... and here.
11495         (expand_start_java_method): Don't call complete_start_java_method here.
11496         (java_complete_expand_method):  Call it here instead.
11497         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
11498         * java-tree.h:  ... here.
11499
11500         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
11501         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
11502         for ARRAY_REF - it doesn't work when array bounds are checked.
11503         (patch_array_ref):  Handle it here instead.
11504
11505         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
11506
11507 1999-02-19  Per Bothner  <bothner@cygnus.com>
11508
11509         Force left-to-right evaluation of binary operations etc.
11510         * expr.c (force_evaluation_order), java-tree.h:  New function.
11511         * parse.y (java_complete_lhs):  Pass binary operations, procedure
11512         calls, and ARRAY_REFs to force_evaluation_order.
11513         (various):  Set TREE_SIDE_EFFECTS more carefully.
11514
11515         Tolerate random (non-UTF8) encoding in comments without complaining.
11516         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
11517         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
11518
11519         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
11520         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
11521
11522         * parse.y (java_complete_lhs):  Ignore an empty statement in a
11523         COMPOUND_EXPR.  Don't complain about empty statement after return.
11524
11525 1999-02-19  Per Bothner  <bothner@cygnus.com>
11526
11527         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
11528         in TREE_LIST - just chain the POINTER_TYPEs together.
11529         (resolve_class):  If type already resolved, return decl.
11530         After resolving, update TREE_TYPE(class_type), and name (if array).
11531         * parse.h (do_resolve_class), parse.y:  Make non-static.
11532         * class.c (maybe_layout_super_class):  Take this_class argument.
11533         Do do_resolve_class if necessary.
11534         (layout_class, layout_class_methods): Adjust calls appropriately.
11535         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11536         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
11537         * typeck.c (build_java_array_type):  Don't call layout_class.
11538
11539 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11540
11541         * parse.y (check_pkg_class_access): Allow private class access
11542         within the same package.
11543         (strip_out_static_field_access_decl): New function.
11544         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11545         operator argument before testing its nature.
11546
11547 1999-02-03  Per Bothner  <bothner@cygnus.com>
11548
11549         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
11550         (TRY_EXPR):  Simplify - it no longer has a finally clause.
11551         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
11552         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11553         * expr.c (java_lang_expand_expr):  Likewise.
11554         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
11555         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
11556         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
11557         (build_try_statement):  Remove finally parameter and handling.
11558         (build_try_finally_statement):  New function.
11559         (patch_try_statement):   No longer need to support finally clause.
11560         (try_statement):  Update grammar action rules.
11561         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
11562         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11563
11564 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
11565
11566         * jcf-parse.c (get_constant): Add braces around computation of 'd'
11567         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
11568
11569 1999-02-17  Andrew Haley  <aph@cygnus.com>
11570
11571         * class.c (build_utf8_ref): Back out broken patch which was
11572         intended to to output signatures using '.' as a separator.
11573
11574         * class.c (make_class_data): Output signatures using '.' as a
11575         separator, rather than '/'.
11576         (mangled_classname): Likewise.
11577         (make_field_value): Likewise.
11578         (make_method_value): Likewise.
11579         * constants.c (alloc_class_constant): Likewise.
11580         * expr.c (build_invokeinterface): Likewise.
11581
11582 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11583
11584         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11585         of an ancient workaround.
11586
11587 1999-02-10  Jeffrey A Law  (law@cygnus.com)
11588
11589         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
11590         here anymore.
11591
11592 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11593
11594         * lex.c (yylex): Encode \0 as UTF8.
11595
11596 1999-02-10  Tom Tromey  <tromey@cygnus.com>
11597
11598         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11599         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11600         (libgcj_zip): Renamed.
11601         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11602         LIBJAVA_ZIP_FILE.
11603         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11604
11605         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11606         (GC_NAME): Renamed -lgc to -lgcjgc.
11607
11608 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11609
11610         * lex.c (java_lang_cloneable): Initialize.
11611         * parse.y (java_lang_cloneable): New static variable.
11612         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11613         doing one more qualification round.
11614         (valid_ref_assignconv_cast_p): Reject null source or
11615         destination. Allow an array to be cast into java.lang.Cloneable.
11616         (patch_cast): Swapped two first arguments to first call to
11617         valid_ref_assignconv_cast_p.
11618
11619 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11620
11621         * parse.h: DECL_P renamed JDECL_P.
11622         * parse.y: DECL_P replaced by JDECL_P.
11623         (build_array_from_name): Always use pointer's type.
11624         (patch_bc_statement): Extra code to search continue target in a
11625         for loop. Fixed comments. Continue target is current loop when
11626         unlabeled.
11627
11628 1999-02-05  Andrew Haley  <aph@cygnus.com>
11629
11630         * class.c (make_class_data): The superclass of an interface should
11631         be null, not class Object.
11632
11633         * lex.c (java_lex): Sign extend hex literals.
11634
11635 1999-02-04  Andrew Haley  <aph@cygnus.com>
11636
11637         * class.c (build_utf8_ref): Output signatures using '.' as a
11638         separator, rather than '/'.
11639         (make_class_data): Likewise.
11640
11641 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
11642
11643         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11644         mkstemp.o.  Get them from libiberty now.
11645
11646 1999-02-02  Jeffrey A Law  (law@cygnus.com)
11647
11648         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11649
11650 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11651
11652         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11653         from libiberty.h
11654
11655 1999-02-02  Per Bothner  <bothner@cygnus.com>
11656
11657         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11658         * jcf-write.c (generate_bytecode_return):  New function.
11659         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
11660
11661         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
11662         generate special [fd]const_[01] instructions.
11663
11664         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
11665
11666         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
11667         handling OPCODE_lookupswitch or OPCODE_tableswitch.
11668
11669 1999-02-01  Per Bothner  <bothner@cygnus.com>
11670
11671         * parse.y (patch_method_invocation):  Handle calling static methods,
11672         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11673
11674         * parse.y (java_complete_lhs):  Don't complain about unreachable
11675         exit condition in a do-while statement.
11676
11677 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11678
11679         * lex.c (java_read_char): Fixed utf8 decoding.
11680         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
11681         range.
11682         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
11683         comments. Local variable `all_primitive' is gone. Broadened
11684         acceptance of `0' to floating point targets. `long' can now be
11685         widened to `double' or `float'.
11686         (valid_method_invocation_conversion_p): Added leading
11687         comment. Fixed tabulation.
11688         (build_string_concatenation): Optimize out left or right empty
11689         string constants.
11690
11691 1999-01-28  Per Bothner  <bothner@cygnus.com>
11692
11693         * jcf-write.c (localvar_alloc):  Only emit entry for
11694         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
11695         (generate_bytecode_insns):  Only call put_linenumber if
11696         debug_info_level > DINFO_LEVEL_NONE.
11697         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
11698         is specified, add -g1 (for compatibility wih javac).
11699
11700 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
11701
11702         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
11703         gjavah.o, check-init.o, jv-scan.o
11704
11705 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11706
11707         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
11708
11709         * gjavah.c: Include config.h and system.h.
11710
11711         * javaop.h (inline): Don't define, its handled by system.h.
11712         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
11713         from `inline' to `static inline'.
11714
11715         * jcf.h (inline): Don't define, its handled by system.h.
11716
11717         * lex.c (inline): Likewise.
11718
11719 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
11720
11721         * lang-specs.h: Map -Qn to -fno-ident.
11722
11723 1999-01-29  Richard Henderson  <rth@cygnus.com>
11724
11725         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
11726
11727 1999-01-29  Tom Tromey  <tromey@cygnus.com>
11728
11729         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
11730         then cast it to Object before calling `append' method.
11731
11732 1999-01-28  Per Bothner  <bothner@cygnus.com>
11733
11734         * check-init.c (check_bool2_init, check_bool_init, check_init):
11735         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
11736         * jcf-write.c (generate_bytecode_insns):  Likewise.
11737
11738 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11739
11740         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
11741         * parse.y (patch_cast): Allow a boolean to be cast into a
11742         boolean.
11743
11744 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11745
11746         * parse.y: (class_declaration:): Fixed indentation.
11747         (class_member_declaration:): Extra `;' after field declaration now
11748         accepted.
11749         (interface_declaration:): Removed debug messages in error reports.
11750         (patch_binop): Nodes created and returned inherit the orignal
11751         node's COMPOUND_ASSIGN_P flag value.
11752         (patch_cast): Fix cast from char to floating point.
11753
11754 1999-01-25  Andrew Haley  <aph@cygnus.com>
11755
11756         * except.c, java-except.h (expand_resume_after_catch): new
11757         function.
11758         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
11759         to branch back to main flow of control after a catch block.
11760
11761 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11762
11763         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
11764         $(srcdir)/../system.h.
11765         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
11766         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
11767         (jcf-write.o): Likewise.
11768         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11769         (mangle.o): Depend on $(srcdir)/../toplev.h.
11770         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11771         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11772
11773         * class.c: Include output.h and parse.h.
11774         (mangled_classname): Add the `const' keyword to a char*.
11775         (find_named_method): Hide unused function definition.
11776         (build_utf8_ref): Change type of variable `c' to unsigned char.
11777         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
11778         (build_class_ref): Add the `const' keyword to a char*.
11779         (layout_class_method): Remove unused variable `buf'.
11780
11781         * decl.c (find_local_variable): Remove unused variable `rtl'.
11782         (pushdecl): Likewise for variables `different_binding_level' and
11783         `oldglobal'.
11784         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
11785         (maybe_build_cleanup): Likewise for parameter `decl'.
11786
11787         * except.c (expand_start_java_handler): Mark parameter `range'
11788         with ATTRIBUTE_UNUSED.
11789
11790         * expr.c: Include except.h.
11791         (pop_type): Remove unused variable `i'.
11792         (pop_value): Likewise for variables `n_words' and `i'.
11793         (expand_java_arrayload): Likewise for variable `convert'.
11794         (java_lang_expand_expr): Likewise for variables `op0', `type',
11795         `mode', `unsignedp', `node' and `elements'.
11796         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
11797         `eh_ranges'.
11798         (process_jvm_instruction): Add a `const' qualifier to a char*.
11799
11800         * gjavah.c (output_directory): Add the `const' keyword to a char*.
11801         (temp_directory): Likewise.
11802         (print_c_decl): Likewise.
11803         (print_method_info): Likewise.
11804         (decode_signature_piece): Likewise.
11805         (print_mangled_classname): Likewise.
11806
11807         * java-except.h: Provide prototypes for maybe_start_try,
11808         maybe_end_try and add_handler.
11809
11810         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
11811         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
11812         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
11813         init_expr_processing, push_super_field, init_class_processing,
11814         can_widen_reference_to, class_depth, verify_jvm_instructions,
11815         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
11816         set_local_type, merge_type_state, push_type, load_type_state,
11817         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
11818         emit_unicode_mangled_name): Add prototypes.
11819
11820         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
11821         (print_signature_type): Use ISDIGIT, not isdigit.
11822         (print_signature): Remove unused variable `j'.
11823
11824         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
11825         int when comparing against one.
11826
11827         * jcf-parse.c: Include toplev.h.
11828
11829         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
11830         (localvar_free): Remove unused variable `i'.
11831         (generate_bytecode_conditional): Likewise for variable `kind'.
11832
11833         * jv-scan.c: Include config.h and system.h.  Remove redundant
11834         OS header and gansidecl.h includes.
11835         (warning): Add the `const' keyword to a char*.  Also add
11836         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
11837         __STDC__, when determining whether to use ANSI-isms.
11838         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
11839         (xmalloc): Don't redundantly prototype here.
11840         (main): Remove unused parameter `envp'.  Also fix the arguments
11841         passed to function `fatal' to match the format specifier.
11842
11843         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
11844
11845         * mangle.c: Include toplev.h.
11846         (emit_unicode_mangled_name): Declare parameter `len'.
11847
11848         * parse.y (parse_warning_context): Add the `const' keyword to a
11849         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
11850         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
11851         (issue_warning_error_from_context): Add the `const' keyword to
11852         a char*.
11853         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
11854         not `__STDC__' for whether to use ANSI-isms.
11855
11856         * typeck.c (incomplete_type_error): Mark parameters `value' and
11857         `type' with ATTRIBUTE_UNUSED.
11858         (parse_signature_type): Use ISDIGIT, not isdigit.
11859
11860         * verify.c (check_pending_block): Add the `const' keyword to a char*.
11861         (verify_jvm_instructions): Likewise.  Remove unused variables
11862         `field_name' and `default_val'.
11863
11864         * zextract.c: Include config.h and system.h.  Remove redundant
11865         OS header includes.
11866
11867         * zipfile.h: Prototype `read_zip_archive'.
11868
11869 1999-01-21  Andrew Haley  <aph@cygnus.com>
11870
11871         * typeck.c (convert): Allow conversions to void type: some
11872         optimizations in gcc do this.
11873
11874 1999-01-21  Andrew Haley  <aph@cygnus.com>
11875
11876         * typeck.c (convert_ieee_real_to_integer): New function.
11877         (convert): When not using fast-math and using hardware fp, convert
11878         an IEEE NaN to zero.
11879
11880 1999-01-18  Andrew Haley  <aph@cygnus.com>
11881
11882         * parse.y (patch_binop): Do a type conversion from signed to
11883         unsigned and then back to signed when a ">>>" is found.
11884
11885 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11886
11887         * java-tree.h: (check_for_initialization): Added prototype.
11888         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
11889         * parse.y (do_resolve_class): Removed unused locals.
11890         (read_import_dir): Likewise.
11891         (resolve_qualified_expression_name): Array creation
11892         expressions are valid primary expressions.
11893         (qualify_ambiguous_name): Likewise.
11894         (patch_synchronized_statement): Removed unused local.
11895
11896 1999-01-17  Jeffrey A Law  (law@cygnus.com)
11897
11898         * Makefile.in (zextract.o): Add dependencies.
11899
11900         * Makefile.in: Do not put ^Ls at the start of a line.
11901
11902 1999-01-15  Per Bothner  <bothner@cygnus.com>
11903
11904         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
11905         sub-type the result of the call that gets the exception value.
11906
11907         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
11908         don't call finish_class.
11909
11910         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
11911         clear found before continuing.
11912
11913         * verify.c (verify_jvm_instructions):  On an array load, allow
11914         and handle top of stack to be TYPE_NULL.
11915
11916         * gjavah.c (generate_access):  Translate Java package private or
11917         protected access to C++ public, but with a comment.
11918
11919 1999-01-13  Andrew Haley  <aph@cygnus.com>
11920
11921         * expr.c (generate_name): Name prefix changed to avoid clashes
11922         with assembler temp labels.
11923
11924         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
11925         MODIFY_EXPR.  Without this, code for the assignment may not be
11926         generated at all and the synchronized statement will read an
11927         uninitialized variable.
11928
11929 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11930
11931         * class.c (maybe_layout_super_class): Fixed returned value.
11932         * lex.c: Added 1999 to the copyright.
11933         (java_init_lex): Initialize java_lang_imported.
11934         * lex.h: Added 1999 to the copyright.
11935         * parse.h: Added 1999 to the copyright.
11936         (REGISTER_IMPORT): Fixed typo in trailing macro.
11937         (CURRENT_OSB): New macro.
11938         (struct parser_ctxt): New fields osb_depth, osb_limit.
11939         * parse.y (java_lang_id): New global variable.
11940         (type_import_on_demand_declaration): Don't import java.lang.* twice.
11941         (array_creation_expression:): Use CURRENT_OSB.
11942         (dims:): Uses a stack to keep track of array dimensions.
11943         (cast_expression:): Use CURRENT_OSB.
11944         (find_expr_with_wfl): Return NULL if node found doesn't meet the
11945         conditions.
11946         (register_fields): Fixed typos in comment.
11947         (check_method_redefinition): Fixed comment indentation.
11948         (java_check_regular_methods): Set saved found wfl to NULL after
11949         having reinstalled it in the previously found DECL_NAME.
11950
11951 1999-01-10  Richard Henderson  <rth@cygnus.com>
11952
11953         * gjavah.c (java_float_finite): Use a union to do type punning.
11954         (java_double_finite): Likewise.
11955
11956 1999-01-09  Per Bothner  <bothner@cygnus.com>
11957
11958         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
11959         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
11960         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
11961         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
11962         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
11963         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
11964
11965 1999-01-08  Per Bothner  <bothner@cygnus.com>
11966
11967         * check-init.c (check_init):  If compiling to native, we don't
11968         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
11969
11970 1999-01-08  Tom Tromey  <tromey@cygnus.com>
11971
11972         * parse-scan.y (variable_declarator_id): Set or increment
11973         bracket_count.
11974         (bracket_count): New global.
11975         (formal_parameter): Handle case where bracket pairs trail variable
11976         declarator id.
11977
11978 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
11979
11980         * jcf-parse.c (yyparse): variable len changed from a char to an
11981         int to prevent overflow.
11982
11983 1999-01-06  Per Bothner  <bothner@cygnus.com>
11984
11985         * java-tree.h:  Declare read_class.
11986         * jcf-parse.c (read_class):  New function.
11987         (load_class):  Now just call read_class.
11988
11989         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
11990         * jcf-parse.c (parse_source_file):  Declare save_error_count,
11991         which is needed by java_parse_abort_on_error macro,
11992         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
11993
11994         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
11995         constructor, if initializing a static field.
11996         (patch_new_array_init):  Set TREE_CONSTANT if it is.
11997         * expr.c (java_lang_expand_expr):  For a static array constructor
11998         of primitive elements, allocate the array itself statically.
11999         Disabled until we can set the vtable field statically.
12000
12001         * check-init.c:  New file.  Checks for definite assignment.
12002         * Makefile.in (JAVA_OBJS):  Add check-init.o.
12003         * parse.y (java_complete_expand_method): Call check_for_initialization.
12004         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
12005
12006 1999-01-06  Graham <grahams@rcp.co.uk>
12007
12008         * parse.y : include system.h instead of including
12009         standard headers directly with the exception of <dirent.h>.
12010
12011 1999-01-06  Per Bothner  <bothner@cygnus.com>
12012
12013         * lex.h:  Moved static function declarations to lex.c,
12014         to shut up some -Wall warnings.
12015         * lex.c:  Static function declarations moved here.
12016         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
12017
12018 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12019
12020         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12021
12022 1998-12-22  Per Bothner  <bothner@cygnus.com>
12023
12024         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
12025         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
12026
12027         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
12028         (localvar_alloc):  Change return type to void,
12029         (emit_unop):  Remove unused variable size.
12030
12031         * jcf-write.c (struct jcf_block):  Add new union.
12032         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
12033         (call_cleanups):  New functions.
12034         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
12035         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
12036         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12037         * lang.c (lang_init):  Call using_eh_for_cleanups.
12038         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
12039         completing operands to patch_synchronized_statement.
12040         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12041         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12042         WITH_CLEANUP_EXPR instead of TRY_EXPR.
12043
12044 1998-12-20  John F. Carr  <jfc@mit.edu>
12045
12046         * Make-lang.in: Comment out control-Ls; they upset some makes.
12047
12048 1998-12-18  Tom Tromey  <tromey@cygnus.com>
12049
12050         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12051         consistently.
12052
12053 1998-12-17  Tom Tromey  <tromey@cygnus.com>
12054
12055         * parse.y (DIR_SEPARATOR): New define.
12056         (check_class_interface_creation): Use it.
12057
12058         * parse-scan.y (report_main_declaration): Recognize
12059         `java.lang.String' in argument to main.
12060
12061 1998-12-16  Per Bothner  <bothner@cygnus.com>
12062
12063         * parse.y (create_interface):  Remove bogus test.
12064
12065 1998-12-16  Per Bothner  <bothner@cygnus.com>
12066
12067         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
12068         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
12069
12070 1998-12-16  Tom Tromey  <tromey@cygnus.com>
12071
12072         * parse-scan.y (qualified_name): Use correct sprintf format.
12073
12074 1998-12-15  Tom Tromey  <tromey@cygnus.com>
12075
12076         * gjavah.c (print_field_info): Changed how most negative number is
12077         printed.
12078
12079 1998-12-14  Per Bothner  <bothner@cygnus.com>
12080
12081         * parse.y (fold_constant_for_init):  New function.
12082         (resolve_expression_name):  Don't replace static final
12083         constant-initialized fields by its value.
12084         (java_complete_lhs):  New.  Same as java_complete_tree, except does
12085         not replace static final constant-initialized fields by their values.
12086         (register_fields):  If there is an initializer, set DECL_INITIAL and
12087         MODIFY_EXPR_FROM_INITIALIZATION_P.
12088         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
12089         Only call patch_initialized_static_field if
12090         MODIFY_EXPR_FROM_INITIALIZATION_P.
12091         (patch_initialized_static_field):  If not valid constant, clear
12092         DECL_INITIAL.
12093
12094         * parse.y (lookup_field_wrapper):  Fix thinko.
12095
12096         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
12097         set and restore global lineno.
12098
12099 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12100
12101         * gjavah.c (print_field_info): If value to print is the smallest
12102         value of its size, then print as hex to avoid later warnings from
12103         C++ compiler.
12104
12105 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12106
12107         * gjavah.c (decompile_method): Decompile `return null'.
12108         (process_file): Generate `#pragma interface'.
12109         (method_declared): New global.
12110         (print_method_info): Set it.
12111         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12112         (print_method_info): Handle abstract methods.
12113
12114 1998-12-13  Per Bothner  <bothner@cygnus.com>
12115
12116         * parse.y (patch_method_invocation):  If class_decl is null
12117         (e.g. an array type), use original type.
12118
12119         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
12120         errors about uncaught exception from clone (of array, specifically).
12121
12122 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12123
12124         * gjavah.c (decompile_method): Handle all types of `return'
12125         opcode.  Decompile `return this' and `return'.
12126         (method_access): New global.
12127         (print_method_info): Set it.
12128         (decompile_method): Don't decompile a synchronized method.
12129
12130 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12131
12132         * jcf-reader.c (jcf_parse_one_method): Recognize
12133         HANDLE_END_METHOD.
12134         * gjavah.c (HANDLE_END_METHOD): New macro.
12135         (HANDLE_CODE_ATTRIBUTE): New macro.
12136         (decompile_method): New function.
12137         (print_method_info): Don't print `;\n' at end of function decl.
12138         Include java-opcodes.h.
12139         (decompiled): New global.
12140
12141 1998-12-12  Per Bothner  <bothner@cygnus.com>
12142
12143         * class.c (build_class_ref):  Handle PRIMTYPE.class if
12144         flag_emit_class_files.
12145         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
12146         if flag_emit_class_files.
12147         * parse.y (java_complete_tree):  Pre-liminary support for
12148         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12149
12150         * parse.y (patch_synchronized_statement):   Don't call monitorexit
12151         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
12152
12153         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
12154
12155         * zipfile.h (opendir_in_zip):  New declaration.
12156         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
12157         (opendir_in_zip):  New function, using code from open_in_zip.
12158         (open_in_zip):  Call opendir_in_zip.
12159         (find_class):  Remove no-longer-used do_class_file parameter,
12160         but add source_ok parameter.  Change logic so if we find a .java file,
12161         we don't look for .class in later classpath emtries.
12162         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
12163         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
12164         * gjavah.c: Update call to find_class.
12165         * jcf-dump.c:  Likewise.
12166
12167         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
12168         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
12169         nothing if body is empty_stmt_node.
12170         Various little fixes so SP gets correctly adjusted.
12171         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12172         For CALL_EXPR, test if static first.
12173         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
12174         such as the ones we create for Object and Class.
12175         Set and restore current_function_decl.
12176         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12177         (note_possible_classname):  New function.
12178         (read_import_entry):  Removed.  Merged with read_import_dir.
12179         (read_import_dir):  Don't call find_class - that only gives us
12180         the first classpath entry having the needed package.
12181         Use the struct buffer data structure from buffer.h.
12182         (read_import_dir, find_in_imports_on_demand):  The remembered
12183         class names now use '.' (not '/') as package separator.
12184
12185         * parse.y (java_complete_expand_methods):  Call write_classfile
12186         here, and not in java_expand_classes (which only gets first class).
12187
12188 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12189
12190         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
12191         (register_fields):  If a static fields has an initializer, just
12192         chain it on ctxp->static_initialized, and handle later.
12193         (java_complete_expand_methods):  Force <clinit> first.
12194         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
12195         - it's already been completed.
12196         (patch_initialized_static_field):  New function.
12197         (java_complete_field):  Call it.
12198
12199 1998-12-12  Per Bothner  <bothner@cygnus.com>
12200
12201         * expr.c (encode_newarray_type, build_new_array):  New functions.
12202         * java-tree.h:  Declare build_new_array.
12203         * jcf-write.c (patch_newarray):  Use build_new_array.
12204
12205         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
12206         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
12207
12208         * parse.y (patch_new_array_init):  Re-organize.
12209         Now is passed the actual array (pointer) type of the value.
12210         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12211         (patch_array_constructor):  Removed - merged into patch_new_array_init.
12212         (java_complete_tree):  Update patch_new_array_init.
12213
12214         * jcf-write.c (find_constant_index):  New function.
12215         (generate_bytecode_insns):  Use find_constant_index.
12216         (generate_classfile):  Use find_constant_index for ConstantValue.
12217
12218 1998-12-11  Tom Tromey  <tromey@cygnus.com>
12219
12220         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12221         * decl.c (init_decl_processing): Renamed dtable -> vtable.
12222         * class.c (make_class_data): Renamed dtable -> vtable, and
12223         dtable_method_count -> vtable_method_count.
12224
12225 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12226
12227         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12228         global variables, initialized.
12229         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12230         Declared new global variables.
12231         * lex.c (java_lex): Return long_zero_node, float_zero_node,
12232         double_zero_node, integer_zero_node upon direct matching.
12233         * parse.y (purify_type_name): Added function prototype.
12234         (duplicate_declaration_error_p): Consider new_type as potentially
12235         being a incomplete type. Use purify_type_name on type string.
12236         (method_header): saved_type: unused variable removed. Don't figure
12237         return type if method name is invalid.
12238         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12239         processed by patch_unaryop.
12240         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12241         increment/decrement node into its original type after binary
12242         numeric promotion on its operands.
12243
12244 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12245
12246         * parse.y (array_initializer:): Array init operand is NULL_TREE
12247         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12248         now an error. Fixed indentation problems.
12249         (patch_string): Handle error_mark_node as an argument.
12250         (patch_new_array_init): Fixed indentation problems.
12251         (array_constructor_check_entry): Removed check on null wfl_value.
12252         Return an error if wfl_value's walk returns an error.
12253
12254 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12255
12256         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12257         * lex.c (java_lex): Remember column position before advancing one
12258         token. Retain location information on OCB_TK.
12259         * lex.h (typedef struct java_lc): Added new field.
12260         * parse.h (GET_SKIP_TYPE): New macro.
12261         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12262         * parse.y (build_new_array_init, patch_new_array_init,
12263         patch_array_constructor, maybe_build_array_element_wfl,
12264         array_constructor_check_entry): New function prototypes.
12265         (switch_block:): Tagged <node>.
12266         (OCB_TK): Tagged <operator>.
12267         (array_initializer:): Installed actions.
12268         (variable_initializer): Build location information on element if
12269         necessary.
12270         (switch_statement:): Fixed indentation typo.
12271         (switch_block:): Redefined default action.
12272         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12273         (patch_assignment): Removed duplicate code.
12274         (maybe_build_array_element_wfl, build_new_array_init,
12275         patch_new_array_init, patch_array_constructor,
12276         array_constructor_check_entry): New functions.
12277
12278 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12279
12280         * parse.y (array_initializer): Tagged <node>.
12281         (variable_initializer:): Use default rule.
12282         (array_initializer:): Defined actions.
12283         (variable_initializers:): Likewise.
12284         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12285         non-static field accesses.
12286         (patch_invoke): Fixed indentation typo.
12287         (java_complete_tree): Likewise.
12288         (build_labeled_block): Changed leading comment. Generate an error
12289         in case of duplicate loop labels.
12290         (patch_conditional_expr): Patch results of string concatenation
12291         operations.
12292
12293 1998-12-06  Per Bothner  <bothner@cygnus.com>
12294
12295         * constants.c (find_methodref_index):  When the class is an interface,
12296         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12297
12298         * decl.c (finit_identifier_node):  Use "$finit$", rather than
12299         "<finit>" (which Sun's verifier rejects).
12300         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
12301         (generate_field_initialization_code):  Removed.
12302         (fix_constructors)  Don't add call to $finit$ here (wrong order).
12303         (patch_method_invocation):  Add $finit$ call here.
12304
12305         * java-tree.h (CALL_USING_SUPER):  New macro.
12306         * parse.y (patch_invoke):  Remove im local variable.
12307         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
12308         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
12309         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
12310
12311         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
12312
12313         * parse.y (java_complete_tree):  Don't complain about unreachable
12314         statement if it is empty_stmt_node.
12315
12316         * jcf-write.c (find_constant_wide):  New function.
12317         (push_long_const):  Use find_constant_wide.
12318
12319         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
12320         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
12321         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12322         Emit invokeinterface when calling an interface method.
12323         Emit invokespecial also when calling super or private methods.
12324
12325         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
12326
12327 1998-12-06  Per Bothner  <bothner@cygnus.com>
12328
12329         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
12330
12331 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12332
12333         * java-tree.h (java_layout_seen_class_methods): New function
12334         prototype.
12335         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12336         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12337         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12338         * parse.y (method_declarator:): Defined action.
12339         (issue_warning_error_from_context): input_filename saved, set to
12340         the appropriate value and restored after java_error is called.
12341         (build_unresolved_array_type): Fixed comment.
12342         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12343         (method_header): Deal with return type the same way type are
12344         handled for fields and method's parameters and local variables
12345         types are handled.
12346         (check_method_redefinition): Removed extra CR.
12347         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12348         (java_layout_seen_class_methods): New function.
12349         (java_layout_classes): Call java_layout_seen_class_methods.
12350
12351 1998-12-03  Per Bothner  <bothner@cygnus.com>
12352
12353         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
12354
12355 1998-12-03  Per Bothner  <bothner@cygnus.com>
12356
12357         * jcf-dump.c (main):  Fix error message.
12358         * jcf-path.c (add_entry):  Style fix.
12359
12360 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12361
12362         * class.c (layout_class_method): Call build_java_argument_signature
12363         on constructors too.
12364         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12365         (patch_method_invocation): Define a primary when resolving an
12366         expression name. Augmented comment on code checking illegal `this'
12367         usage. Loosened it test by accepting NEW_CLASS_EXPR.
12368
12369 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12370
12371         * class.c (layout_class_method): Don't report error on non-static
12372         overriding static if the method is private.
12373         * java-tree.h (finish_class): Prototype added.
12374         * lex.c (java_get_line_col): Handle col argument -2 value.
12375         * parse.h: All static method declarations moved to parse.y.
12376         * parse.y: Now contains all static method declarations previously
12377         found in parse.h.
12378         (find_expr_with_wfl, missing_return_error,
12379         unreachable_stmt_error): New functions.
12380         (java_get_real_method_name): Identify constructors bearing class
12381         names in source code compiled classes only.
12382         (java_complete_expand_methods): Call missing_return_error.
12383         (invocation_mode): Private methods invoked as static methods.
12384         (java_complete_tree): Call unreachable_stmt_error.
12385
12386 1998-12-01  Tom Tromey  <tromey@cygnus.com>
12387
12388         * Makefile.in (+target): Removed.
12389         (+xmake_file): Likewise.
12390         (+tmake_file): Likewise.
12391         (.NOEXPORT): Removed duplicate.
12392
12393 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12394
12395         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12396
12397         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
12398
12399         * jvgenmain.c: Remove the xmalloc prototype, we get it from
12400         libiberty.h.  Provide an xmalloc definition.
12401
12402         * jvspec.c: Remove the xmalloc prototype.
12403
12404         * parse-scan.y: Include config.h and system.h.  Don't include
12405         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
12406         Provide an xstrdup definition.
12407
12408 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
12409
12410         * jcf-path.c (add_entry): Recognize ".jar" too.
12411         * lang-specs.h: Likewise.
12412
12413 1998-11-26  Per Bothner  <bothner@cygnus.com>
12414
12415         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
12416         soft_monitorenter_node, soft_monitorexit_node, throw_node.
12417
12418         * jcf-write.c (generate_bytecode_insns):
12419         Handle pre/post-increment/decrement of long.
12420
12421         * jcf-write.c (generate_bytecode_insns):
12422         Handle missing exception handler (finally for synchronized).
12423
12424 1998-11-25  Per Bothner  <bothner@cygnus.com>
12425
12426         * java-tree.h (end_params_node):  Declare global.
12427         * decl.c (end_params_node):  New global.
12428         (init_decl_processing, start_java_method):  Use end_params_node for
12429         end of list of parameter types.  Follows correct gcc conventions.
12430         * expr.c (pop_argument_types, pop_arguments):  Likewise.
12431         * lang.c (put_decl_node):  Likewise.
12432         * typeck.c (various places):  Likewise.
12433         * class.y (various places):  Likewise.
12434         * parse.y (various places):  Likewise.
12435
12436         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
12437         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
12438
12439         * class.c:  Add #include flags.h, remove no-longer needed declaration.
12440
12441         * class.c (layout_class_method):  Remove commented-out code, re-format.
12442         Don't add vtable entry (or index) for private methods.
12443         * expr.c (expand_invoke):  A private method is implicitly final.
12444         * class.c (make_class_data):  If inlining or optimizing,
12445         skip private methods.
12446
12447         * class.c (finish_class):  New function.  Calls existing methods,
12448         but alls emits deferred inline functions.
12449         * jcf-parse.c (parse_class_file):  Call finish_class.
12450         * parse.y (java_complete_expand_methods):  Likewise.
12451
12452         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
12453
12454         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
12455
12456 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
12457
12458         * jcf-write.c (generate_bytecode_conditional): Fix typo.
12459
12460 1998-11-24  Per Bothner  <bothner@cygnus.com>
12461
12462         * (generate_classfile): Always write class access flag with
12463         ACC_SUPER set.
12464
12465 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12466
12467         * class.c (maybe_layout_super_class): New function.
12468         (layout_class): Reorganized. Loop on class methods dispatched into
12469         a new function. Call maybe_layout_super_class.
12470         (layout_class_methods, layout_class_method): New functions.
12471         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12472         class.
12473         (expand_invoke): Likewise.
12474         * java-tree.h (all_class_list): New global variable declared.
12475         (layout_class_methods, layout_class_method): New function
12476         prototypes.
12477         (LAYOUT_SEEN_CLASS_METHODS): New macro.
12478         * jcf-parse.c (all_class_list): New global variable.
12479         (load_class): Extended what class_or_name can be. Use parser
12480         context mechanism to save globals before calling jcf_parse.
12481         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12482         is set on the file name.
12483         (jcf_parse): Layout class methods when Object is loaded, otherwise
12484         record class in all_class_list for delayed method layout.
12485         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12486         * lang.c (put_decl_node): Decode <init> into the decl context
12487         class name.
12488         * lex.c (java_allocate_new_line): Use xmalloc.
12489         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12490         pointers, not TREE_LIST elements.
12491         (struct parser_ctxt): Fixed comment indentations, added comments
12492         and reordered some fields.
12493         (java_check_methods): Function prototype removed.
12494         * parse.y (java_push_parser_context): Use xmalloc.
12495         (java_parser_context_restore_global): Pop extra pushed ctxp only
12496         when there's nothing next.
12497         (maybe_create_class_interface_decl): Fixed comment, add new
12498         created class decl to all_class_list.
12499         (method_header): Use GET_REAL_TYPE on argument's types.
12500         (method_declarator): Use GET_REAL_TYPE, change type to the real
12501         type in TREE_LIST dependency node. Build argument list with the
12502         real type.
12503         (create_jdep_list): Use xmalloc. Removed allocation error message.
12504         (obtain_incomplete_type): Fixed leading comment. Broadened
12505         incoming argument meaning.
12506         (register_incomplete_type): Use xmalloc. Removed allocation error
12507         message.
12508         (safe_layout_class): Fixed leading comment.
12509         (jdep_resolve_class): Reversed if statement condition and switch
12510         if and else bodies.
12511         (resolve_and_layout): Fixed leading comment. Broadened incoming
12512         argument meaning.
12513         (complete_class_report_errors): New local variable name, for
12514         clarity. purify_type_name used for all error cases.
12515         (java_get_real_method_name): Stricter check on constructors.
12516         (java_check_regular_methods): Reverse methods list only if not
12517         already laid out. Layout artificial constructor.
12518         (java_check_methods): Deleted.
12519         (source_start_java_method): Obtain incomplete type for patchable
12520         method arguments.
12521         (java_layout_classes): Fixed leading comment. Use
12522         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12523         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12524         before returning. Fixed comments.
12525         (java_expand_classes): Check for errors up front.
12526         (patch_method_invocation): Class to search is resolved and laid
12527         out.
12528
12529 1998-11-24  Per Bothner  <bothner@cygnus.com>
12530
12531         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
12532
12533         * javaop.h (int8):  Removed - not used.
12534         (jbyte):  Redefine portably with correct signedness.
12535
12536         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
12537
12538         * jcf-write.c (generate_bytecode_insns):  Fix typo
12539         OPCODE_getstatic to OPCODE_getfield.
12540
12541         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
12542         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
12543         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12544
12545 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12546
12547         * jcf-parse.c (jcf_parse_source): Function returned type is
12548         void. Added prototype.
12549         (jcf_parse): Function returned type is void.
12550         (yyparse): Remove call to fclose on the last parsed file.
12551
12552         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12553
12554 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12555
12556         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12557         (layout_class): Cope with methods featuring WFL in decl names.
12558         * decl.c (unqualified_object_id_node): New global variable,
12559         initialized.
12560         (build_decl_no_layout): Removed.
12561         * expr.c (build_primtype_type_ref): Handle Double.
12562         (java_lang_expand_expr): Fixed indentations.
12563         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12564         (flag_wall, flag_redundant, flag_not_overriding,
12565         flag_static_local_jdk1_1, unqualified_object_id_node): Global
12566         variable declarations.
12567         (build_decl_no_layout): Removed prototype.
12568         (java_get_real_method_name): Added prototype.
12569         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12570         (java_parse_abort_on_error): Macro now just returns.
12571         * jcf-parse.c (jcf_parse_source): Check fclose returned
12572         value. Call emit_register_classes if java_report_errors returns
12573         zero.
12574         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12575         flag_static_local_jdk1_1): New integer flags.
12576         (lang_decode_option): New flags set here.
12577         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12578         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12579         the flag_redundant variable.
12580         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12581         when parsing java.lang.Object class.
12582         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12583         NULL_TREE to build.
12584         (resolve_qualified_expression_name): Fixed indentation.
12585         (patch_array_ref): Changed prototype.
12586         (not_initialized_as_it_should_p): Prototype removed.
12587         (java_report_errors): Added function prototype.
12588         * parse.y (formal_parameter:): Changed error message for not yet
12589         supported final parameters.
12590         (class_type_list:): Set both PURPOSE and VALUE of created
12591         TREE_LIST to be class_type.
12592         (primary_no_new_array:): Handle class literals on primitive types.
12593         (parse_warning_context): Reinstalled correct force_error and
12594         do_warning flags setups.
12595         (java_report_errors): Changed prototype. Return java_error_count
12596         value.
12597         (variable_redefinition_error): Consider treating variable type as
12598         a fake pointer.
12599         (create_interface): Warn about redundant abstract modifier if
12600         flag_redundant is set. Changed error message.
12601         (lookup_field_wrapper): Save/restore globals before/after looking
12602         up field.
12603         (duplicate_declaration_error_p): Consider treating declaration
12604         type as a fake pointer.
12605         (register_fields): Extract real type from dependency node. Check
12606         for duplicate field declaration after type adjustment. Use
12607         DECL_INITIAL to store static final initialized values.
12608         (method_header): Extract real function type from dependency node.
12609         (check_abstract_method_header): Use GET_METHOD_NAME.
12610         (obtain_incomplete_type): Layout fake pointer type.
12611         (safe_layout_class): Don't try to check for methods before layout.
12612         (java_complete_class): Don't check for correct throws clause
12613         elements inheritance here.
12614         (resolve_and_layout): Broadened name parameter meaning.
12615         (reset_method_name): Use GET_METHOD_NAME.
12616         (java_get_real_method_name): New function.
12617         (java_check_regular_methods): Don't check methods in
12618         java.lang.Object.  Verify lineage of throws clause elements. Use
12619         flag_no_overriding in warning report.
12620         (check_throws_clauses): Don't check if class was from
12621         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12622         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12623         (declare_local_variables): Use flag_static_local_jdk1_1 to report
12624         warning on unsupported final local variables. Use build_decl
12625         instead of build_decl_no_layout. Get real local variable type from
12626         dependency node.
12627         (source_start_java_method): Get real parameter type from
12628         dependency node. Call build_decl instead of build_decl_no_layout.
12629         (java_layout_classes): Reverse tree and layout type and class as
12630         required. Mark class as loaded when done.
12631         (resolve_field_access): Fixed indentation. Restricted condition
12632         leading to static field access code generation. Set field_type
12633         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12634         (resolve_qualified_expression_name): Initialize type_found to
12635         null. Handle static field resolved during qualification. Fixed
12636         layout on non primitive field decl types.
12637         (not_accessible_p): Fixed typo in comment.
12638         (patch_method_invocation): Resolve and layout class to search from
12639         type.
12640         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12641         layout non primitive type, if necessary. Make method node only to
12642         report errors.
12643         (find_applicable_accessible_methods_list): Consider WFL'ed method
12644         decl names. Fixed indentation.
12645         (argument_types_convertible): Resolve and layout target type if
12646         necessary.
12647         (java_complete_tree): Fixed indentation problems. Rewrote
12648         CALL_EXPR thrown exceptions check. Re-installed further processing
12649         of the assignment in certain cases.
12650         (patch_assignment): Call maybe_build_primttype_type_ref to perform
12651         inlining on class literals.
12652         (valid_builtin_assignconv_identity_widening_p): Cope with constant
12653         0 literal.
12654         (valid_method_invocation_conversion_p): Likewise.
12655         (patch_string): Temporary disable forbidden use of `this' in
12656         explicit constructor invocations when doing string concatenation
12657         within their scope.
12658         (patch_unaryop): Added comment. Reinstalled code to disable
12659         further check on assignment operation with cast expression RHS.
12660         (patch_switch_statement): Fixed indentation.
12661         (build_try_statement): Call build_decl instead of
12662         build_decl_no_layout.
12663         (patch_synchronized_statement): Likewise.
12664         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12665         IS_UNCHECKED_EXPRESSION_P.
12666         (check_thrown_exceptions_do): Changed leading comment. Resolve and
12667         layout argument exception type.
12668         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12669         of IS_UNCHECKED_EXPRESSION_P.
12670
12671 1998-11-18  Anthony Green  <green@cygnus.com>
12672
12673         * jcf-parse.c (yyparse): Open class file in binary mode.
12674
12675 1998-11-15  Per Bothner  <bothner@cygnus.com>
12676
12677         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
12678
12679         * jcf-write.c (perform_relocations):  Move check out one loop.
12680
12681 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
12682
12683         * Make-lang.in: Fix reference to srcdir.
12684         * jv-scan.c: Add missing xmalloc prototype.
12685         * jvgenmain.c: Ditto.
12686
12687 1998-11-15  Per Bothner  <bothner@cygnus.com>
12688
12689         * decl.c (error_mark_node), java-tree.h:  New global.
12690         * parse.y:  Use empty_stmt_node instead of size_zero_node.
12691         (build_if_else_statement):  If missing else, use empty_stmt_node.
12692
12693         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
12694         (java_complete_expand_method):  Complain if return is missing.
12695         (java_check_regular_methods):  Comment out incorrect error check.
12696         (not_accessible_p):  Fix incorrect handling of protected methods.
12697         (patch_method_invocation):  Pass correct context to not_accessible_p.
12698         (find_applicable_accessible_methods_list):  Likewise.
12699         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
12700         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
12701         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
12702         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
12703
12704         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
12705         (push_int_const):  Remove reundant NOTE_PUSH.
12706         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
12707         (- case SWITCH_EXPR):  Fix code generation bug.
12708         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
12709         (generate_classfile):  More robust for abstract methods.
12710
12711 1998-11-15  Anthony Green  <green@cygnus.com>
12712
12713         * Makefile.in: jv-scan and jvgenmain all require libiberty.
12714         * Make-lang.in: Ditto.
12715
12716         * jv-scan.c: Remove xmalloc and xstrdup definitions.
12717         * jvgenmain: Ditto.
12718
12719 1998-11-15  Per Bothner  <bothner@cygnus.com>
12720
12721         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
12722
12723         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
12724
12725 1998-11-14  Per Bothner  <bothner@cygnus.com>
12726
12727         Allow uses of interface types to verify.  This is not really
12728         type-safe, but it matches what Sun does, and is OK as long as
12729         there are appropriate run-time checks.
12730         * verify.c (merge_types):  If merging two interface types,
12731         just set the result to java.lang.Object.
12732         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
12733
12734 1998-11-13  Tom Tromey  <tromey@cygnus.com>
12735
12736         * gjavah.c (main): Handle --output-class-directory argument.
12737         * jvspec.c (lang_specific_driver): Translate `-d' into
12738         -foutput-class-dir.
12739         * jcf.h (jcf_write_base_directory): Declare.
12740         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
12741         * lang-options.h: Mention -foutput-class-dir.
12742         * jcf-write.c (jcf_write_base_directory): New global.
12743         (make_class_file_name): Put generated .class file into `-d'
12744         directory, or into source directory if -d not given.  Function now
12745         static.
12746         (write_classfile): Free class file name.  Handle case where class
12747         file name is NULL.
12748         (DIR_SEPARATOR): New macro.
12749         Include <sys/stat.h>
12750
12751         * Makefile.in (prefix): New macro.
12752
12753 1998-11-12  Per Bothner  <bothner@cygnus.com>
12754
12755         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
12756         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
12757         here (done in patch_invoke instead).
12758         (case_identity):  Moved here from parse.y.
12759
12760         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
12761         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
12762         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
12763         so they can be efficiently scanned without recursion.
12764         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
12765         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
12766         in BLOCK iteratively, rather than recursively.
12767
12768         * parse.y (do_unary_numeric_promotion):  New function.
12769         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
12770
12771         * parse.y (patch_newarray):  Various fixes.
12772
12773         Re-do handling of switch statements (for proper block scoping).
12774         * parse.y:  Add just a single block for the enture switch block,
12775         but don't create any "case blocks".
12776         (group_of_labels):  Rmeoved unneeded non-terminal.
12777         CASE_EXPR and DEFAULT_EXPR are added to current block.
12778         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
12779         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
12780         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
12781         * parse.y (wfl_operator, print_int_node): Make non-static.
12782         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
12783         as part of recursive scan of block.
12784         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
12785         (patch_switch_statement):  Most tests move dinto java_complete_tree.
12786
12787         * parse.y:  Make various production be non-typed (void).
12788         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
12789         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
12790         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
12791
12792         * jcf-write.c (struct jcf_handler):  New type.
12793         (struct jcf_switch_state):  New type.
12794         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
12795         (alloc_handler, emit_unop, emit_reloc):  New functions.
12796         (adjust_typed_op):  Add extra parameter ("max type" offset).
12797         (emit_switch_reloc, emit_case-reloc):  New function.
12798         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
12799         (generate_bytecode_insns):  Support REAL_CST, switch statements,
12800         exception handling, method calls, object/array creation, and more.
12801
12802         * class.c:  Remove some unused variables.
12803         * constants.c (find_string_constant):  New function.
12804         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
12805         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
12806         if flag_emit_class_files.
12807
12808 1998-11-12  Tom Tromey  <tromey@cygnus.com>
12809
12810         * jcf-io.c (find_class): Added explanatory comment.
12811
12812         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
12813         trailing slash to `.zip' entries.
12814
12815         * jvspec.c (lang_specific_driver): Correctly handle case where
12816         GC_NAME not defined.
12817
12818 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12819
12820         * jvspec.c (GC_NAME): New define.
12821         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
12822         if required.
12823         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
12824
12825 1998-11-11  Per Bothner  <bothner@cygnus.com>
12826
12827         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
12828
12829 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12830
12831         * jcf-dump.c (main): Correctly recognize `--'-style long options.
12832
12833 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12834
12835         * class.c (is_compiled_class): Call safe_layout_class for class
12836         compiled from source.
12837         * conver.h (convert_to_integer, convert_to_real,
12838         convert_to_pointer): Added prototypes.
12839         * decl.c (init_decl_processing): Non longer push the decls of
12840         `methodtable', `constants', `Class', `Field', `dispatchTable'
12841         `jexception' and `Method'.
12842         * expr.c (build_invokeinterface): New function.
12843         (expand_invoke): static variable CLASS_IDENT now in
12844         build_invokeinterface. Use build_invokeinterface.
12845         (expand_java_field_op): Moved code to inline
12846         java.lang.PRIMTYPE.TYPE into a function.
12847         (build_primtype_type_ref): New function.
12848         * java-tree.def (INSTANCEOF_EXPR): New tree code.
12849         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
12850         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
12851         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
12852         (DECL_LOCAL_STATIC_VALUE): New macro.
12853         (build_invokeinterface, build_primtype_type_ref): New function
12854         prototypes.
12855         (java_parse_abort_on_error): Macro rewritten.
12856         * jcf-parse.c (current_method): Add comment to declaration.
12857         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
12858         Function prototypes fixed.
12859         (jcf_parse_source): push/pop parser context. save/restore global.
12860         (parse_source_file): Fixed leading comment. Now take a
12861         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
12862         classes and pop the parser context anymore.
12863         (yyparse): Push parser context, save globals, parse the source
12864         file, restore globals and pop the parser context when processing a
12865         source file.
12866         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
12867         * lex.c (java_parse_doc_section): New function.
12868         (java_lex): Call java_parse_doc_section when appropriate. Build an
12869         operator around INSTANCEOF_TK.
12870         * lex.h (java_lineterminator, java_sprint_unicode,
12871         java_unicode_2_utf8, java_lex_error, java_store_unicode):
12872         Prototypes rewritten.
12873         (java_parse_escape_sequence, java_letter_or_digit_p,
12874         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
12875         java_read_unicode, java_store_unicode, java_read_char,
12876         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
12877         Added function prototypes.
12878         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
12879         define.
12880         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
12881         New macros
12882         (struct parser_ctxt): New fields: deprecated,
12883         current_parsed_class_un, gclass_list.
12884         (fix_method_argument_names, issue_warning_error_from_context,
12885         resolve_package, lookup_package_type): New function prototypes.
12886         (resolve_expression_name): Fixed function prototype.
12887         (find_applicable_accessible_methods_list): Fixed indentation, added
12888         extra argument in prototype.
12889         (check_final_assignment, build_null_of_type, check_deprecation,
12890         check_method_redefinition, reset_method_name,
12891         java_check_regular_methods, java_check_abstract_methods,
12892         maybe_build_primttype_type_ref): New function prototype.
12893         * parse.y (conver.h): Include.
12894         (INSTANCEOF_TK): Tagged <operator>.
12895         (single_type_import_declaration): Use REGISTER_IMPORT macro.
12896         (relational_expression:): Build binop for instanceof.
12897         (java_push_parser_context): Remember ctxp->gclass_list across
12898         contexts.
12899         (java_pop_parser_context): Simply return if no context
12900         exists. Remember gclass_list across contexts.
12901         (issue_warning_error_from_context): New function.
12902         (parse_error_context): Don't setup ctxp->elc here. Call
12903         issue_warning_error_from_context instead.
12904         (parse_warning_context): Likewise.
12905         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
12906         setup. Link new class/interface to ctxp->gclass_list.
12907         (add_superinterfaces): Register interface as incomplete if not
12908         loaded.
12909         (create_class): Remember class unqualified name in
12910         ctxp->current_parsed_class_un. Check class deprecation.
12911         (register_fields): Check field deprecation. Remember static final
12912         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
12913         processing INIT.
12914         (method_header): New local variable ORIG_ARG. Use unqualified
12915         current class name for check on constructor errors. Promote return
12916         type if of record type. Argument list fix moved in
12917         fix_method_argument_names, called here. Check method deprecation.
12918         (fix_method_argument_names): New function.
12919         (method_declarator): Promote record typed arguments.
12920         (safe_layout_class): Check class methods before layout.
12921         (java_complete_class): Compute field layout when patched.
12922         (do_resolve_class): Try to load class after having it renamed
12923         after the package name.
12924         (get_printable_method_name): Use DECL_CONTEXT.
12925         (reset_method_name): New function.
12926         (check_method_redefinition): Use reset_method_name.
12927         (java_check_regular_methods): New local variable
12928         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
12929         names for error report. Check for compile-time error when method
12930         found has default (package) access.
12931         (java_check_abstract_methods): Now takes an interface DECL node as
12932         an argument. Also reinstall real name on unchecked
12933         overriding/hiding methods for error report.
12934         (java_check_methods): Fixed leading comment. Get classes to verify
12935         from ctxp->gclass_list. Use CHECK_METHODS macro and set
12936         CLASS_METHOD_CHECKED_P on class verification.
12937         (lookup_java_method2): Get real method name if necessary.
12938         (find_in_imports): Don't check package class access here.
12939         (resolve_package, lookup_package_type): New functions.
12940         (java_layout_classes): Fixed leading comment. Take classes to be
12941         laid out from ctxp->gclass_list.
12942         (java_complete_expand_methods): Don't expand native and abstract
12943         methods.
12944         (java_expand_classes): New function.
12945         (resolve_expression_name): Use additional argument ORIG.  Retrieve
12946         values of static final field of primitive types.
12947         (resolve_field_access): Handles static final field of promotive
12948         type.
12949         (resolve_qualified_expression_name): Handle STRING_CST as
12950         primaries and package name resolution. Check deprecation on found
12951         decls. Set where_found and type_found on non static field resolved
12952         during qualification. Layout non primitive field decl types.
12953         (check_deprecation): New function.
12954         (maybe_access_field): Simplified.
12955         (patch_method_invocation_stmt): Local variable CLASS_TYPE
12956         removed. Reverse method's argument when primary is a type. Don't
12957         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
12958         instead. Include abstract class in the list of class searchable
12959         for constructors. Use DECL_CONTEXT of found method for access
12960         checks. Check method deprecation.
12961         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
12962         converting arguments. Handle INVOKE_INTERFACE.
12963         (lookup_method_invoke): Search constructor using existing
12964         infrastructure (don't rely on lookup_java_constructor anymore).
12965         (find_applicable_accessible_methods_list): Extra argument flag
12966         LC. Now include constructor in the search.
12967         (qualify_ambiguous_name): Conditional expression are primaries.
12968         (not_initialized_as_it_should_p): static final are always
12969         initialized.
12970         (java_complete_tree): Pass extra NULL argument to
12971         resolve_expression_name. Stricter test to carry on patching
12972         assignments. New case for INSTANCEOF_EXPR.
12973         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
12974         (check_final_assignment, maybe_build_primttype_type_ref): New
12975         functions.
12976         (patch_assignment): Detect resolved static finals and carry normal
12977         assignment error check on them. Inline PRIMTYPE.TYPE read access.
12978         (try_builtin_assignconv): Access constant 0 on all primitive
12979         types.
12980         (valid_builtin_assignconv_identity_widening_p): Accept identical
12981         types. Accept all promoted type on int type.
12982         (valid_ref_assignconv_cast_p): Accept a null pointer to be
12983         assigned to a reference.
12984         (valid_method_invocation_conversion_p): Accept to check null
12985         pointers.
12986         (build_binop): Merge declaration and initialization of local
12987         variable BINOP.
12988         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
12989         numeric types. Improved validity test for qualify operators on
12990         references.
12991         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
12992         and PREINCREMENT_EXPR. Also detect resolved static finals of a
12993         primitive type and issue the appropriate error message.
12994         (resolve_type_during_patch): Mark class loaded when resolved.
12995         (patch_cast): Allow null to be cased to reference types.
12996         (build_null_of_type): New function.
12997         (patch_array_ref): Handle array on references correctly.
12998         (patch_return): Removed unused local variable MODIFY. Force
12999         boolean to be returned as integers. Allows null to be returned by
13000         a function returning a reference.
13001         * typeck.c (convert_to_integer, convert_to_real,
13002         convert_to_pointer): Prototypes moved to convert.h
13003         (lookup_argument_method): Use method real name, if necessary.
13004
13005 1998-10-30  Tom Tromey  <tromey@cygnus.com>
13006
13007         * class.c (build_class_ref): Changed name of primitive classes to
13008         start with `_Jv_'.
13009
13010         * class.c (make_class_data): Renamed fields: nmethods to
13011         method_count, method_count to dtable_method_count.  Always set
13012         `state' field to 0.
13013         * decl.c (init_decl_processing): Likewise.
13014
13015 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13016
13017         * class.c (layout_class): Don't mangle <finit>, produce
13018         __finit<class> instead. Don't verify artificial methods.
13019         * decl.c (finit_identifier_node): New declared global.
13020         (init_decl_processing): finit_identifier_node initialized.
13021         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13022         * java-tree.h (finit_identifier_node): Declared as extern.
13023         (struct lang_decl): New field called_constructor.
13024         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13025         (CLASS_HAS_FINIT_P): New macro.
13026         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13027         explicit constructor invocation.
13028         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13029         CALL_SUPER_CONSTRUCTOR_P): New macros.
13030         (write_classfile): Added prototype.
13031         * jcf-parse.c (jcf_parse_source): Parse and remember for
13032         generation if the file was seen on the command line.
13033         (parse_source_file): Don't write the class file here.
13034         (yyparse): Loop on files rewritten. Set current_jcf.
13035         (parse_zip_file_entries): Parse class file only if it was found.
13036         * lang.c (init_parse): Don't open command line provided filename
13037         here.
13038         (lang_parse): Don't set main_jcf anymore.
13039         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13040         (JCONSTRUCTOR_CHECK): New macro.
13041         (JBSC_TYPE_P): New macro.
13042         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13043         (COMPLETE_CHECK_OP_2): New macro.
13044         (struct parse_ctxt): New field explicit_constructor_p.
13045         (check_class_interface_creation): Fixed prototype indentation.
13046         (patch_method_invocation_stmt): Prototype reflects added argument.
13047         (patch_invoke): Likewise.
13048         (complete_method_declaration, build_super_invocation,
13049         verify_constructor_circularity,
13050         build_this_super_qualified_invocation, get_printable_method_name,
13051         patch_conditional_expr, maybe_generate_finit, fix_constructors,
13052         verify_constructor_super, create_artificial_method,
13053         start_artificial_method_body, end_artificial_method_body,
13054         generate_field_initialization_code): New function prototypes.
13055         * parse.y: Fixed leading comment
13056         (constructor_header:, constructor_body:, block_end:): Rules tagged
13057         <node>.
13058         (type_declaration:): Call maybe_generate_finit.
13059         (method_declaration:): Action for method_body: placed in new
13060         function complete_method_declaration, called here.
13061         (constructor_declaration:): Defined actions. Removed leading
13062         FIXME.
13063         (constructor_header:): New rule with action.
13064         (constructor_body:): Rule rewritten using block_begin: and
13065         block_end:. Defined actions.
13066         (constructor_declarator:, explicit_constructor_invocation:):
13067         Defined actions.
13068         (block:): Use new rules block_begin: block_end:.
13069         (block_begin:, block_end:): New rules and actions.
13070         (block_statements:): Fixed error message for explicit
13071         constructors.
13072         (method_invocation:): Call build_this_super_qualified_invocation
13073         if primary is `this' or `super' was seen.
13074         (conditional_expression:): Action defined.
13075         (extra_ctxp_pushed_p): New static global flag.
13076         (java_parser_context_save_global): Create parser context if
13077         necessary. Use extra_ctxp_pushed_p to remember it.
13078         (java_parser_context_restore_global): Pop extra parser context if
13079         one exists.
13080         (build_array_from_name): Array on primitive types are marked
13081         loaded.
13082         (register_fields): Restore new name in field initializer
13083         expression if type was altered. Non static fields initialized upon
13084         declaration marked initialized.
13085         (maybe_generate_finit): New function.
13086         (maybe_generate_clinit): Use create_artificial_method,
13087         start_artificial_method_body, end_artificial_method_body. Generate
13088         debug info for enclosed initialization statements.
13089         (method_header): Fixed leading comment. Check constructor
13090         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13091         accordingly.
13092         (complete_method_declaration, constructor_circularity_msg,
13093         verify_constructor_circularity): New functions.
13094         (get_printable_method_name): New function.
13095         (check_method_redefinition): Don't rename <finit> methods. Fix
13096         declared constructor names. Error message for
13097         constructors modified.
13098         (java_check_regular_methods): Local variable seen_constructor
13099         renamed saw_constructor. Skip verification on constructors. Create
13100         default constructor with create_artificial_method.
13101         (java_check_methods): Removed unnecessary empty line.
13102         (create_artificial_method, start_artificial_method_body,
13103         end_artificial_method_body): New functions.
13104         (java_layout_classes): Changed leading comment. Reverse fields
13105         list if necessary. Always layout java.lang.Object if being
13106         defined.
13107         (java_complete_expand_methods): Verify constructor circularity.
13108         (java_complete_expand_method): Call fix_constructor on
13109         constructors.  Local variable no_ac_found removed. Restore
13110         bindings if method body expansion failed.
13111         (fix_constructors, verify_constructor_super,
13112         generate_field_initialization_code): New function.
13113         (java_expand_classes): Fixed leading comment. Write class file
13114         here.
13115         (resolve_expression_name): Check for illegal instance variable
13116         usage within the argument scope of an explicit constructor
13117         invocation.
13118         (resolve_qualified_expression_name): Pass extra from_super flag
13119         when invoking patch_method_invocation_stmt. New case for
13120         conditional expression when used as a primary. Check for error
13121         when acquiring super.
13122         (patch_method_invocation_stmt): Added extra argument super. New
13123         local variable is_static_flag. Set class_to_search according to
13124         the nature of the constructor invocation. Don't add `this'
13125         argument when expanding NEW_CLASS_EXPR. Check for illegal method
13126         invocation within the argument scope of explicit constructor
13127         invocation. Set is_static according to is_static_flag. Provide
13128         extra `super' argument to patch_invoke invocation.
13129         (patch_invoke): New argument from_super. Loop on arguments
13130         indentation fixed. Pass from_super to invocation_mode. New switch
13131         case INVOKE_SUPER. Fixed error message in switch default case.
13132         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13133         value.
13134         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13135         (lookup_method_invoke): Fixed prototypes in candidates list. Error
13136         message takes constructors into account.
13137         (find_applicable_accessible_methods_list): Fixed indentation.
13138         (qualify_ambiguous_name): Take explicit constructor invocation
13139         into account. Deal with a conditional expression as a primary to
13140         a method call.
13141         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13142         case. Added extra argument to patch_method_invocation_stmt.
13143         Register calls made to explicit constructor `this'. Don't call
13144         save_expr in ARRAY_REF case when emitting class files. Check for
13145         illegal use of this when expanding explicit constructor invocation
13146         arguments.
13147         (complete_function_arguments): Set and reset parser context
13148         explicit_constructor_p field value when appropriate.
13149         (build_super_invocation, build_this_super_qualified_invocation):
13150         New functions.
13151         (patch_assignment): Fixed typo.
13152         (patch_unaryop): Check on final fields occurs only when a decl
13153         exits.
13154         (patch_return): Take constructors into account.
13155         (patch_conditional_expr): New function.
13156         * typeck.c (build_java_signature): Removed unnecessary empty line.
13157
13158 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13159
13160         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13161
13162 1998-10-28  Tom Tromey  <tromey@cygnus.com>
13163
13164         * decl.c (init_decl_processing): Renamed fields.
13165         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13166         interface_len, msize fields.
13167
13168         * class.c (make_class_data): Removed subclass_head and
13169         subclass_next fields.
13170         * decl.c (init_decl_processing): Removed subclass_head and
13171         subclass_next fields.
13172
13173 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13174
13175         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13176         * mangle.c (emit_unicode_mangled_name): Similarly.
13177
13178 1998-10-26  Nick Clifton  <nickc@cygnus.com>
13179
13180         * jcf-parse.c (get_constant): Place braces around code to compute
13181         'd' when REAL_ARITHMETIC is not defined.
13182
13183 1998-10-25  H.J. Lu  (hjl@gnu.org)
13184
13185         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13186         dependency.
13187
13188 1998-10-23  Tom Tromey  <tromey@cygnus.com>
13189
13190         * lang-specs.h: `.zip' files are input to jc1.
13191
13192 1998-10-22  Per Bothner  <bothner@cygnus.com>
13193
13194         * jvspecs.c:  Add (but don't enable) support for combining multiple
13195         .class and .java input filenames to a single jc1 invocation.
13196         Add support for -C flag (copile to .class files).
13197         Translate -classpath and -CLASSPATH arguments.
13198         * lang-specs.h:  Don't set %2 spec.
13199
13200 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13201
13202         * jcf-path.c (add_entry): Don't add trailing separator if entry is
13203         a .zip file.
13204         (add_path): Don't add trailing separator to non-empty path
13205         elements.
13206
13207         * lang.c (lang_decode_option): Check for -fclasspath and
13208         -fCLASSPATH before examining other `-f' options.
13209
13210         * java-tree.h (finalize_identifier_node): Don't declare.
13211         * class.c (make_class_data): Don't push "final" field.
13212         * decl.c (init_decl_processing): Don't push "final" field.
13213         (finalize_identifier_node): Removed.
13214         (init_decl_processing): Don't set finalize_identifier_node.
13215
13216         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13217
13218 1998-10-11  Anthony Green  <green@cygnus.com>
13219
13220         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13221         (JV_SCAN_SOURCES): New macro.
13222         (JCF_DUMP_SOURCES): Likewise.
13223         (jcf-dump$(exeext)): New target.
13224         (jv-scan$(exeext)): New target.
13225
13226 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13227
13228         * Makefile.in (LEX): Removed.
13229         (LEXFLAGS): Likewise.
13230         (SET_BISON): New macro.
13231         (BISON): Removed.
13232         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
13233         spurious diffs in parse.c.
13234         ($(PARSE_SCAN_C)): Likewise.
13235         (PARSE_DIR): New macro.
13236         (PARSE_C): Use it.
13237         (PARSE_SCAN_C): Likewise.
13238         (PARSE_RELDIR): New macro.
13239
13240         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13241
13242         * jcf-io.c (find_class): Use saw_java_source to determine when to
13243         look for `.java' file.
13244         * jcf-parse.c (saw_java_source): New global.
13245         (yyparse): Set it if `.java' file seen.
13246
13247         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13248         (GCJH_SOURCES): Likewise.
13249         * Makefile.in (datadir): New macro.
13250         (libjava_zip): Likewise.
13251         (JAVA_OBJS): Added jcf-path.o.
13252         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13253         (../gcjh$(exeext)): Likewise.
13254         (jcf-path.o): New target.
13255         * java-tree.h (fix_classpath): Removed decl.
13256         * jcf-parse.c (fix_classpath): Removed.
13257         (load_class): Don't call fix_classpath.
13258         * parse.y (read_import_dir): Don't call fix_classpath.
13259         * lex.h: Don't mention classpath.
13260         * lex.c (java_init_lex): Don't initialize classpath.
13261         * jcf-io.c (classpath): Removed global.
13262         (find_class): Use jcf_path iteration functions.  Correctly search
13263         class path for .java file.
13264         (open_in_zip): New argument `is_system'.
13265         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
13266         classpath-related options.
13267         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13268         and -I.
13269         (lang_init): Call jcf_path_init.
13270         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13271         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
13272         Correctly put braces around second string in each entry.
13273         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
13274         classpath-related options.
13275         (help): Updated for new options.
13276         * jcf.h: Declare functions from jcf-path.c.  Don't mention
13277         `classpath' global.
13278         * jcf-path.c: New file.
13279
13280         * jcf-depend.c: Include jcf.h.
13281
13282         * jcf-write.c (localvar_alloc): Returns `void'.
13283         (localvar_free): Removed unused variable.
13284
13285         * lang.c (OBJECT_SUFFIX): Define if not already defined.
13286         (init_parse): Use OBJECT_SUFFIX, not ".o".
13287
13288 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13289
13290         * class.c (emit_register_classes): Renamed from
13291         emit_register_class.
13292         * java-tree.h (emit_register_classes): Prototype renamed from
13293         emit_register_class.
13294         * jcf-parse.c (yyparse): Call emit_register_classes once before
13295         returning.
13296         * parse.y (java_expand_classes): No longer register classes.
13297
13298 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13299
13300         * class.c (is_compiled_class): New local variable
13301         seen_in_zip. Identify classes found in currently compiled source
13302         file(s).
13303         * decl.c (complete_start_java_method): Fixed typo.
13304         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13305         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13306         (CLASS_P): Moved around.
13307         (java_parse_abort_on_error): Macro moved from jcf-parse.c
13308         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13309         java-parse.h
13310         (jcf_parse_source): Changed leading comment. Removed unnecessary
13311         fclose and CLASS_FROM_SOURCE_P marking.
13312         (parse_source_file): New local variables remember_for_generation
13313         and filename. Mark parsed file name identifier node. Removed block
13314         executed when parse_only was null. Set remember_for_generation.
13315         Use it as an argument to java_pop_parser_context.
13316         (yyparse): New local variables several_files, list, next node and
13317         current_file_list. Split ampersand separated file names into
13318         current_file_list. Iterate through the list and parse accordingly.
13319         * parse.h (java_pop_parser_context): New function prototype.
13320         * parse.y (ctxp_for_generation): New static global variable.
13321         (java_pop_parser_context): New argument generate. Link popped ctxp
13322         to ctxp_for_generation list accordingly.
13323         (java_complete_expand_methods): Fixed indentation.
13324         (java_expand_classes): New function.
13325
13326 1998-10-17  Per Bothner  <bothner@cygnus.com>
13327
13328         * Makefile.in:  Link with libiberty.a instead of memmove.o.
13329
13330 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13331
13332         * lex.c (setjmp.h): No longer included.
13333         * lex.h (setjmp.h): Included.
13334         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13335         (duplicate_declaration_error_p): Renamed from
13336         duplicate_declaration_error.
13337         (build_array_from_name): New function prototype.
13338         * parse.y (setjmp.h): No longer included.
13339         (variable_declarator_id): Define action.
13340         (build_array_from_name): New function.
13341         (duplicate_declaration_error_p): Renamed from
13342         duplicate_declaration_error.  Fixed leading comment.
13343         (register_fields): Main `for' loop reorganized. Uses
13344         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13345         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13346         build_array_from_name.
13347         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13348         types.
13349         (read_import_dir): Don't try to skip `.' and `..'.
13350         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13351         build_array_from_name. Main `for' loop reorganized.
13352         (resolve_qualified_expression_name): When building access to a
13353         field, use the type where the field was found, not its own type.
13354         (maybe_access_field): Use field DECL_CONTEXT if the type where the
13355         field was found is null.
13356         (qualify_ambiguous_name): Sweep through all successive array
13357         dimensions.
13358
13359 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13360
13361         * java-tree.h (pop_labeled_block, lang_printable_name,
13362         maybe_add_interface, set_super_info, get_access_flags_from_decl,
13363         interface_of_p, inherits_from_p, fix_classpath,
13364         complete_start_java_method, emit_handlers, init_outgoing_cpool,
13365         make_class_data, register_class, alloc_name_constant): New
13366         function prototypes.
13367         * lang.c (lang_decode_option): Set argc argument unused. Fixed
13368         indentation. Added cast to remove warning.
13369         (lang_printable_name): Set v argument unused.
13370         (lang_print_error): Added argument to lang_printable_name call.
13371         (java_dummy_print, print_lang_decl, print_lang_type,
13372         print_lang_identifier, lang_print_xnode): All argument marked
13373         unused.
13374         * lex.c (java_unget_unicode): Removed unnecessary argument.
13375         (java_allocate_new_line): Unused local variable is gone.
13376         (java_read_char): Added parenthesis in expressions to remove
13377         warnings.  Added final return statement.
13378         (java_read_unicode): Added parenthesis in expression to remove
13379         warning.
13380         (java_parse_end_comment): Fixed java_unget_unicode invocation.
13381         (java_parse_escape_sequence): Likewise.
13382         (java_lex): Unused local variables are gone. Fixed
13383         java_unget_unicode invocation.
13384         * lex.h (set_float_handler): Prototype added when JC1_LITE not
13385         defined.
13386         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13387         lang_printable_name invocation in macro.
13388         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13389         Likewise.
13390         (duplicate_declaration_error): Suppressed unused argument in
13391         prototype.
13392         (identical_subpath_p): Function declaration is gone.
13393         (patch_invoke): Suppressed unused argument in prototype.
13394         (patch_cast, build_labeled_block, check_thrown_exceptions):
13395         Likewise.
13396         * parse.y (setjmp.h): Included
13397         (toplev.h): Likewise.
13398         (field_declaration:): Suppressed unused local
13399         (label_decl:): Fixed build_labeled_block invocation.
13400         (java_pop_parser_context): Put extra parenthesis around assignment
13401         in if.
13402         (yyerror): Suppressed unused local variables.
13403         (variable_redefinition_error): Fixed lang_printable_name
13404         invocation.
13405         (create_interface): Suppressed unused local variables.
13406         (create_class): Likewise.
13407         (duplicate_declaration_error): Suppressed unused argument. Fixed
13408         lang_printable_name invocation.
13409         (register_fields): Suppressed unused local variable. Fixed
13410         duplicate_declaration_error invocation.
13411         (method_header): Suppressed unused local variable.
13412         (method_declarator, parser_check_super): Likewise.
13413         (java_complete_class): Suppressed unused local variable. Fixed
13414         fatal error message.
13415         (complete_class_report_errors): Added default: in switch.
13416         (java_check_regular_methods): Fixed lang_printable_name
13417         invocations.
13418         (check_throws_clauses): Likewise.
13419         (java_check_abstract_methods): Suppressed unused local
13420         variable. Fixed lang_printable_name invocation.
13421         (read_import_entry): Added supplemental return statement.
13422         (read_import_dir): Suppressed unused local variables.
13423         (check_pkg_class_access, declare_local_variables): Likewise.
13424         (source_start_java_method): Suppressed unused extern variable
13425         declarations
13426         (expand_start_java_method): Suppressed unused extern and local
13427         variable declarations.
13428         (java_complete_expand_methods): Likewise.
13429         (java_complete_expand_method): Suppressed unused local variables.
13430         (make_qualified_name): Likewise.
13431         (resolve_qualified_expression_name): Added default: in
13432         switch. Fixed lang_printable_name invocation.
13433         (class_instance_creation_expression): Added parenthesis around
13434         expressions.
13435         (patch_method_invocation_stmt): Fixed lang_printable_name and
13436         patch_invoke invocations.
13437         (check_for_static_method_reference): Fixed lang_printable_name
13438         invocation.
13439         (patch_invoke): Suppressed unused arguments and local variables.
13440         (lookup_method_invoke): Suppressed unused local variables.
13441         (qualify_ambiguous_name): Added default: in switch.
13442         (identical_subpath_p): Function removed.
13443         (patch_assignment): Suppressed unused local variables. Suppressed
13444         unnecessary if statement. Fixed lang_printable_name invocations.
13445         (try_builtin_assignconv): Fixed lang_printable_name invocations.
13446         (valid_ref_assignconv_cast_p): Parenthesis around
13447         expression. Suppressed unused local variables.
13448         (build_binop): Suppressed unused local variables. fixed
13449         lang_printable_name invocations.
13450         (string_constant_concatenation): Suppressed unused local
13451         variables.
13452         (patch_unaryop): Fixed lang_printable_name invocation.
13453         (patch_cast): Suppressed unnecessary argument. Fixed
13454         lang_printable_name invocation.
13455         (patch_array_ref): Fixed lang_printable_name invocation.
13456         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13457         (build_labeled_block): Suppressed unused argument.
13458         (generate_labeled_block): Fixed build_labeled_block invocation.
13459         (build_loop_body): Suppressed unused local variables.
13460         (patch_loop_statement): Likewise.
13461         (patch_exit): Fixed lang_printable_name invocation.
13462         (patch_switch_statement): Likewise.
13463         (case_identity): First argument marked unused.
13464         (patch_try_statement): Fixed lang_printable_name invocations.
13465         (patch_synchronized_statement, patch_throw_statement): Likewise.
13466         (check_thrown_exceptions): Fixed check_thrown_exceptions and
13467         lang_printable_name invocations.
13468         (check_thrown_exceptions_do): Suppressed unused argument.
13469
13470 1998-10-14  Tom Tromey  <tromey@cygnus.com>
13471
13472         * jcf-write.c (write_classfile): Add output class file as target.
13473         * lang-options.h: Added -MD, -MMD, -M, and -MM.
13474         * jcf.h: Added declarations for dependency-tracking functions.
13475         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13476         * lang.c (lang_decode_option): Recognize -MD and -MMD.
13477         (finish_parse): Call jcf_dependency_write.
13478         (dependency_tracking): New global.
13479         (DEPEND_SET_FILE): New define.
13480         (DEPEND_ENABLE): New define.
13481         (init_parse): Enable dependency tracking if required.
13482         Include "flags.h".
13483         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13484         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13485         (../gcjh$(exeext)): Likewise.
13486         (jcf-depend.o): New target.
13487         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13488         (GCJH_SOURCES): Likewise.
13489         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
13490         dep_name argument.
13491         (find_classfile): Added dep_name argument.
13492         (find_class): Compute name of dependency.
13493         (open_in_zip): Call jcf_dependency_add_file.
13494         * gjavah.c (output_file): No longer global.
13495         (usage): Don't mention "gjavah".
13496         (help): Likewise.
13497         (java_no_argument): Likewise.
13498         (version): Likewise.
13499         (main): Recognize and handle -M family of options.
13500         (print_mangled_classname): Return is void.
13501         (process_file): Handle case where output is suppressed.
13502         (HANDLE_END_FIELD): Likewise.
13503         (HANDLE_METHOD): Likewise.
13504         * jcf-depend.c: New file.
13505
13506 1998-10-13  Jeffrey A Law  (law@cygnus.com)
13507
13508         * java-tree.def: Add missing newline at EOF.
13509
13510 1998-10-13  Tom Tromey  <tromey@cygnus.com>
13511
13512         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13513         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
13514         function.
13515         Include <config.h> and "system.h".
13516         (disassemble_method): Undefine RET to avoid clash with
13517         config/i386/i386.h.
13518
13519 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13520
13521         * decl.c (runtime_exception_type_node, error_exception_type_node):
13522         New global variables.
13523         (init_decl_processing): Initialized.
13524         * expr.c (java_lang_expand_expr): Set caught exception type to
13525         null if catch handler argument doesn't exit.
13526         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13527         tree codes.
13528         * java-tree.h (runtime_exception_type_node,
13529         error_exception_type_node): Global variables declared.
13530         (DECL_FUNCTION_THROWS): New macro.
13531         (DECL_FUNCTION_BODY): Modified comment.
13532         (DECL_SPECIFIC_COUNT): Likewise.
13533         (struct lang_decl): New field throws_list.
13534         (IS_UNCHECKED_EXPRESSION_P): New macro.
13535         * lex.c (java_lex): Generate location information for THROW_TK.
13536         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13537         EXCEPTIONS_P): New macros.
13538         (enum jdep_code): New value JDEP_EXCEPTION.
13539         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13540         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13541         PATCH_METHOD_RETURN_ERROR): New macros.
13542         (patch_method_invocation_stmt): Added new argument to prototype.
13543         (patch_synchronized_statement, patch_throw_statement,
13544         check_thrown_exceptions, check_thrown_exceptions_do,
13545         purge_unchecked_exceptions, check_throws_clauses): New function
13546         prototypes.
13547         * parse.y Fixed typo in keyword section.
13548         (throw:): Rule tagged <node>.
13549         (THROW_TK): Keyword tagged <operator>.
13550         (method_header:): Last argument to call to method_header passed
13551         from throws: rule.
13552         (throws:, class_type_list:, throw_statement:,
13553         synchronized_statement:, synchronized:): Defined actions.
13554         (method_header): New local variable current. Register exceptions
13555         from throws clause.
13556         (java_complete_tree): Complete and verify exceptions from throws
13557         clause.
13558         (complete_class_report_errors): Error message on exceptions not
13559         found
13560         (java_check_regular_methods): Fixed typo. Shortcut on private
13561         overriding methods. Changed error message on method
13562         redefinition. Check for throws clause compatibility.
13563         (check_throws_clauses): New function.
13564         (java_check_abstract_methods): Use DECL_NAME for wfl or current
13565         method. Changed error message on method redefinition.
13566         (currently_caught_type_list): New static variable.
13567         (java_complete_expand_methods): Purge unchecked exceptions from
13568         throws clause list. Call PUSH_EXCEPTIONS before walk and
13569         POP_EXCEPTIONS after.
13570         (resolve_qualified_expression_name): Pass new argument as NULL to
13571         patch_method_invocation_stmt.
13572         (patch_method_invocation_stmt): New argument ref_decl. Invoke
13573         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13574         argument list when appropriate. Use new argument if non null to
13575         store selected method decl.
13576         (patch_invoke): Convert if necessary args of builtin types before
13577         forming CALL_EXPR. Argument list no longer reversed here.
13578         (invocation_mode): Treat final methods as static methods.
13579         (java_complete_tree): New cases for THROW_EXPR: and
13580         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13581         function call.
13582         (complete_function_arguments): No more RECORD_TYPE
13583         conversion. Function parameter nodes no longer saved.
13584         (valid_ref_assignconv_cast_p): Avoid handling null type.
13585         (patch_binop): Fixed null constant reference handling.
13586         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13587         BUILD_THROW macros.
13588         (patch_try_statement): Fixed comments. Record caught types in
13589         list, push the list, expand try block and pop the list.
13590         (patch_synchronized_statement, patch_throw_statement,
13591         check_thrown_exceptions, check_thrown_exceptions_do,
13592         purge_unchecked_exceptions): New functions.
13593         * typeck.c (lookup_argument_method): Allow WFL in place of method
13594         DECL_NAME during method definition check
13595
13596 1998-10-09  Tom Tromey  <tromey@cygnus.com>
13597
13598         * gjavah.c (decode_signature_piece): New function.
13599         (print_c_decl): Use it.  Added `name_override' argument.
13600         (print_method_info): Use name_override argument to print_c_decl.
13601         (seen_fields): Removed.
13602         (print_field_info): Don't update seen_fields.
13603         (struct method_name): New structure.
13604         (method_name_list): New global.
13605         (print_method_info): Add new method to list of methods.
13606         (name_is_method_p): New function.
13607         (print_field_info): If field name has same name as method, then
13608         change field name.
13609         (process_file): Parse methods before fields.
13610         (field_pass): New global.
13611         (HANDLE_END_FIELD): Take field_pass into account.
13612
13613 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13614
13615         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13616         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13617
13618 1998-10-03  Anthony Green  <green@cygnus.com>
13619
13620         * jvspec.c: Fix bug in jvgenmain_spec patch.
13621
13622 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13623
13624         * Makefile.in (lang.o:): Install dependency on java-tree.def.
13625         * decl.c (soft_exceptioninfo_call_node): New global variable.
13626         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13627         takes extra integer argument. soft_exceptioninfo_call_node
13628         initialized.
13629         * except.c (java_set_exception_lang_code): New function
13630         (method_init_exceptions): Called here.
13631         (prepare_eh_table_type): New function.
13632         (expand_end_java_handler): Called here.
13633         * expr.c (build_java_throw_out_of_bounds_exception): Now features
13634         one argument. Modified generation of call to
13635         soft_badarrayindex_node to use new argument.
13636         (build_java_arrayaccess): Pass faulty index value to
13637         build_java_throw_out_of_bounds_exception.
13638         (generate_name): New function.
13639         (java_lang_expand_expr): New local variables node, current,
13640         has_finally_p. Expand TRY_EXPR node.
13641         (process_jvm_instruction): Replace top of the stack with thrown
13642         object reference when entering exception handler.
13643         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13644         specific tree codes.
13645         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13646         global.
13647         (DECL_SPECIFIC_COUNT): New macro.
13648         (prepare_eh_table_type, java_set_exception_lang_code,
13649         generate_name): New function declarations.
13650         (match_java_method): Declaration deleted.
13651         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13652         macros.
13653         * lex.c (TRY_TK, CATCH_TK): Generate location information.
13654         * parse.h (redefinition_error, refine_accessible_methods_list,
13655         can_cast_to_p): Function declaration removed.
13656         (classitf_redefinition_error, variable_redefinition_error,
13657         parse_jdk1_1_error, find_applicable_accessible_methods_list,
13658         find_most_specific_methods_list, argument_types_convertible,
13659         enter_a_block, valid_builtin_assignconv_identity_widening_p,
13660         valid_cast_to_p, valid_method_invocation_conversion_p,
13661         try_reference_assignconv, add_stmt_to_compound,
13662         build_jump_to_finally, build_tree_list, patch_try_statement,
13663         java_get_catch_block): New function declarations.
13664         * parse.y (string_buffer_type): Global variable deleted.
13665         (group_of_labels, catches, catch_clause, catch_clause_parameter,
13666         finally): Rules tagged <node>.
13667         (TRY_TK, CATCH_TK): Token tagged <operator>.
13668         (class_body_declaration:, class_member_declaration:,
13669         formal_parameter:, explicit_constructor_invocation:,
13670         interface_member_declaration:, constant_declaration:,
13671         primary_no_new_array:, class_instance_creation_expression:,
13672         array_creation_expression:): Issue error on unsuported JDK1.1
13673         features.
13674         (try_statement:, catches:, finally:): Define actions.
13675         (catch_clause_parameter): New rule.
13676         (catch_clause:): Use new rule catch_clause_parameter.
13677         (parse_jdk1_1_error): New function.
13678         (redefinition_error): Renamed classitf_redefinition_error.
13679         (variable_redefinition_error): New function.
13680         (check_class_interface_creation): Call
13681         classitf_redefinition_error.
13682         (java_complete_tree): Added error message on JDEP_TYPE: case.
13683         (complete_class_report_errors): Fixed indentation.
13684         (declare_local_variables): Call variable_redefinition_error.
13685         (source_end_java_method): Call java_set_exception_lang_code and
13686         emit_handlers where appropriate.
13687         (java_method_add_stmt): Call add_stmt_to_block.
13688         (add_stmt_to_block): New function.
13689         (lookup_method_invoke): Fixed outside comment. new local variable
13690         candicates.  Call find_applicable_accessible_methods_list and
13691         find_most_specific_methods_list when searching for a
13692         method. Modified error report to list possible candidates when
13693         applicable.
13694         (find_applicable_accessible_methods_list,
13695         find_most_specific_methods_list, argument_types_convertible): New
13696         function.
13697         (refine_accessible_methods_list): Function deleted.
13698         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
13699         expr (if applicable) before calling patch_array_ref.
13700         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
13701         (enter_block): Fixed comment.
13702         (enter_a_block): New function.
13703         (patch_assignment): Reorganized. Call try_reference_assignconv for
13704         references. Call valid_cast_to_p instead of can_cast_to_p.
13705         (try_reference_assignconv,
13706         valid_builtin_assignconv_identity_widening_p): New functions.
13707         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
13708         (valid_cast_to_p, valid_method_invocation_conversion_p): New
13709         functions.
13710         (build_string_concatenation): Don't resolve StringBuffer.
13711         (patch_cast): Fixed inverted arguments.
13712         (patch_array_ref): Code to save array expr deleted. Call
13713         valid_cast_to_p instead of can_cast_to_p.
13714         (generate_labeled_block): Call generate_name.
13715         (build_jump_to_finally, build_try_statement, java_get_catch_block,
13716         patch_try_statement): New functions.
13717         * typeck.c (match_java_method): Function deleted.
13718
13719 1998-10-02  Anthony Green  <green@cygnus.com>
13720
13721         * jvspec.c: jvgenmain_spec uses different temporary file names.
13722
13723 1998-10-02  Anthony Green  <green@cygnus.com>
13724
13725         * jvspec.c (lang_specific_driver): Fail if user specifies
13726         --main= when not linking.
13727
13728 1998-09-28  Tom Tromey  <tromey@cygnus.com>
13729
13730         * class.c (make_class_data): Push value for `thread' field.
13731         * decl.c (init_decl_processing): Added `thread' field to class.
13732
13733         * class.c (add_field): Always make static fields externally
13734         visible.
13735
13736 1998-09-26  Anthony Green  <green@cygnus.com>
13737
13738         * expr.c (build_java_athrow,
13739         build_java_throw_out_of_bounds_exception, expand_invoke,
13740         build_newarray, expand_java_multianewarray, build_java_monitor):
13741         Update comments to reflect _Jv_* function names.
13742
13743 1998-09-25  Per Bothner  <bothner@cygnus.com>
13744
13745         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
13746         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
13747         * parse.y (expand_start_java_method):  Likewise.
13748
13749 1998-09-24  Per Bothner  <bothner@cygnus.com>
13750
13751         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
13752
13753         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
13754         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
13755         * expr.c:  Remove no-longer-needed calls to promote_type.
13756         * decl.c (give_name_to_locals):  Liekwise.
13757         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
13758         * parse.y:  Add/remove promote_type calls as appropriate.
13759         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
13760         (parse_signature_string):  Likewise.
13761         (build_java_array_type):  Fix for now signature convenions.
13762
13763         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
13764
13765 1998-09-23  Tom Tromey  <tromey@cygnus.com>
13766
13767         * class.c (init_class_processing): libjava function renamed to
13768         _Jv_RegisterClass.
13769
13770 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13771
13772         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
13773         * java-tree.def: Fixed DEFTREECODE third argument.
13774         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
13775         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
13776         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
13777         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13778         JAVA_THIS_EXPR): Now replaced by tree code definitions.
13779         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
13780         * lang.c (java_tree_code_type, java_tree_code_length,
13781         java_tree_code_name): New arrays.
13782         (lang_init): Append Java tree node definitions to Gcc ones.
13783         * lex.c (expression_obstack): Declared as extern when JC1_LITE
13784         defined.
13785         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
13786         wfl_to_string.
13787         (java_lex): Allow declaration of empty string constants. Retain
13788         location information on CASE_TK and DEFAULT_TK.
13789         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
13790         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
13791         Modified to be more robust.
13792         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
13793         (build_new_invocation, try_builtin_assignconv,
13794         patch_switch_statement, string_constant_concatenation,
13795         build_string_concatenation, patch_string_cst, patch_string,
13796         java_expand_switch): New function declarations.
13797         * parse.y: Rules related to switch and EH tagged <node>.
13798         (label_id): Set to NULL_TREE
13799         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
13800         tree nodes.
13801         (this_or_super:): Fixed indentation.
13802         (statement:, statement_nsi:, statement_without_trailing_substatement:,
13803         statement_expression:): Removed call to RULE on all sub-rules.
13804         (switch_expression:, switch_labels:): New rules.
13805         (switch_statement:, switch_block:, switch_block_statement_groups:,
13806         switch_block_statement_group:, switch_labels:, switch_label:):
13807         Defined actions.
13808         (throw_statement:, synchronized_statement:, try_statement:):
13809         Defined temporary actions.
13810         (class_instance_creation_expression:): Call
13811         build_new_invocation. Fixed indentation.
13812         (field_access): Fixed indentation.
13813         (method_invocation): Likewise.
13814         (make_qualified_primary): Use THIS_EXPR.
13815         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
13816         resolving from SUPER, set *type_found.
13817         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
13818         (java_complete_tree): Removed unused local variable `location'. Case
13819         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
13820         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
13821         on MODIFY_EXPR: and all binary operator tree code cases. Removed
13822         STRING_CST: case. default: checks for patchable strings.
13823         (complete_function_arguments): Transform string constant or
13824         crafted StringBuffer if necessary.
13825         (build_method_invocation): Fixed comments.
13826         (build_new_invocation): New function.
13827         (patch_assignment): Call try_builtin_assignconv to figure a valid
13828         assignment conversion between builtin types.
13829         (try_builtin_assignconv): New function.
13830         (build_binop): Use URSHIFT_EXPR directly to call build.
13831         (operator_string): Use UNARY_PLUS_EXPR.
13832         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
13833         operator.
13834         (do_merge_string_cste, merge_string_cste,
13835         string_constant_concatenation, build_string_concatenation,
13836         patch_string, patch_string_cst): New function.
13837         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
13838         (patch_unaryop): Likewise. New test of valid ++/-- operands.
13839         (build_newarray_node): Use NEW_ARRAY_EXPR.
13840         (build_this): Use THIS_EXPR.
13841         (build_return): Enable debug information on return statement.
13842         (build_if_else_statement): Likewise.
13843         (complete_labeled_statement): Fixed related comment.
13844         (build_loop_body): Fixed comment.
13845         (build_bc_statement): Enable debug information on break/continue
13846         statements.
13847         (patch_bc_statement): Fixed typos. Handle SWITCH statement
13848         context.
13849         (patch_switch_statement, case_identity, java_expand_switch): New
13850         functions.
13851
13852 1998-09-21  Per Bothner  <bothner@cygnus.com>
13853
13854         * buffer.h (BUFFER_INIT):  New macro.
13855         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
13856         Pass (struct jcf_partial *state) to most functions.
13857         (jcf_block, jcf_relocation):  New types.
13858         Support labels, branches, conditionals, loops.
13859
13860 1998-09-21  Tom Tromey  <tromey@cygnus.com>
13861
13862         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
13863
13864 1998-09-21  Per Bothner  <bothner@cygnus.com>
13865
13866         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
13867         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
13868         not integer_type_node (INT_TYPE_SIZ bits).
13869
13870         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
13871
13872         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
13873         * jcf-dump.c (print_exception_table):  New function.
13874         (disassemble_method):  Better handling of wide instructions.
13875         Make more robust for bad input.
13876
13877 1998-09-30  Jeffrey A Law  (law@cygnus.com)
13878
13879         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
13880         FreeBSD.
13881
13882 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13883
13884         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
13885
13886 1998-09-17  Tom Tromey  <tromey@cygnus.com>
13887
13888         * Makefile.in ($(PARSE_H)): Removed target.
13889
13890 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13891
13892         * Makefile.in (JAVA_OBJS): Add memmove.o
13893         (memmove.o): New target & rules.
13894
13895 1998-09-15  Tom Tromey  <tromey@cygnus.com>
13896
13897         * expr.c (expand_invoke): Don't generate a call to the class init
13898         code.
13899
13900 1998-09-14  Jeffrey A Law  (law@cygnus.com)
13901
13902         * Makefile.in: Add many missing dependencies.
13903         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
13904         as appropriate.
13905         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
13906         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
13907
13908 1998-09-11  Per Bothner  <bothner@cygnus.com>
13909
13910         * decl.c (complete_start_java_method):  If method is static (and
13911         not private) call _Jv_InitClass.
13912         * expr.c (expand_invoke):  Don't call build_class_init.
13913
13914         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
13915
13916 1998-09-10  Jeffrey A Law  (law@cygnus.com)
13917
13918         * Make-lang.in (GCJ): Define before using.
13919
13920 1998-09-09  Jeffrey A Law  (law@cygnus.com)
13921
13922         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
13923         losing due to namespace pollution in GNU getopt.h
13924
13925 1998-09-09  Tom Tromey  <tromey@cygnus.com>
13926
13927         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
13928         (java.all.cross): Likewise.
13929         (java.rest.encap): Likewise.
13930
13931 1998-09-08  Jeffrey A Law  (law@cygnus.com)
13932
13933         * gjavah.c (print_class_decls): Fix thinko in arglist
13934         * jcv-io.c (find_classfile): Similarly.
13935
13936 1998-09-07  Jeffrey A Law  (law@cygnus.com)
13937
13938         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
13939
13940 1998-09-05  Tom Tromey  <tromey@cygnus.com>
13941
13942         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
13943         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
13944         * Makefile.in (PARSE_C): New macro.
13945         (PARSE_H): Likewise.
13946         (PARSE_SCAN_C): Likewise.
13947         ($(PARSE_C)): Target renamed from parse.c.
13948         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
13949         (clean): Remove parse-scan.c as well.
13950         (parse.o): Depend on $(PARSE_C).
13951
13952 1998-09-05  Anthony Green  <green@cygnus.com>
13953
13954         * README, license.terms: Removed.
13955
13956         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
13957         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
13958         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
13959         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
13960         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
13961         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
13962         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
13963         and Java trademark attribution.
13964
13965 1998-09-04  Tom Tromey  <tromey@cygnus.com>
13966
13967         * Makefile.in: Use gcjh, not gjavah.
13968         * config-lang.in (stagestuff): Use gcjh, not gjavah.
13969         * Make-lang.in: Changed gjavah to gcjh everywhere.
13970
13971 1998-09-03  Per Bothner  <bothner@cygnus.com>
13972
13973         * gjavah.c:  Support new -prepend -add -append flags.
13974         (print_method_info):  Method is not virtual if class is final.
13975
13976 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13977
13978         * jv-scan.c: Fixed copyright assignment.
13979         * keyword.gperf: Likewise.
13980         * keyword.h: Likewise.
13981         * lex.c: Fixed copyright assignment.
13982         (java_lex): Push unicode back when parsing '<'.
13983         * lex.h: Fixed copyright assignment.
13984         * parse-scan.y: Likewise.
13985         * parse.h: Fixed copyright assignment.
13986         (build_debugable_stmt, complete_for_loop): New function prototypes.
13987         * parse.y: Fixed copyright assignment.
13988         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
13989         size_zero_node when completing a loop with no exit condition.
13990         (for_statement_nsi:): Define action.
13991         (for_init:, for_update:): Return size_zero_node when empty.
13992         (declare_local_variables): Call build_debugable_stmt.
13993         (build_debugable_stmt): New function.
13994         (build_loop_body): Build debugable statement around loop
13995         condition part.
13996         (complete_loop_body): Take into account the debugable statement
13997         around the EXIT_EXPR.
13998         (complete_loop_body): New function.
13999         (patch_exit_expr): Fixed condition inversion.
14000
14001 1998-09-02  Tom Tromey  <tromey@cygnus.com>
14002
14003         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14004         name of thread define.
14005         * jvspec.c (THREAD_NAME): New macro.
14006         (GCLIB): Likewise.
14007         (THREADLIB): Likewise.
14008         (lang_specific_driver): Recognize attempt to link with thread
14009         library or gc library.  Recognize -ljava on command line so it
14010         isn't linked against more than once.
14011
14012 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14013
14014         * parse-scan.y (report_main_declaration): Name of the class
14015         containing `main' can be a qualified name.
14016
14017 1998-08-31  Tom Tromey  <tromey@cygnus.com>
14018
14019         * config-lang.in: Changed gjavac to gjc everywhere.
14020         * Make-lang.in: Changed gjavac to gjc everywhere.
14021
14022 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14023
14024         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14025         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14026         and install the files.
14027         * Makefile.in (JAVA_OBJS_LITE): New variable.
14028         (compiler:): Now include jv-scan as a dependency.
14029         (../jv-scan$(exeext), parse-scan.c): New targets.
14030         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14031         * config-lang.in (compilers): Removed gcj, gjavah from the list.
14032         * jcf-parse.c (parse_source_file): Call java_layout_classes and
14033         check for errors even if parse_only.
14034         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14035         defined.
14036         (yylex): New function. Uses java_lex body.
14037         (java_lex): Removed commented out statement. Remove local variable
14038         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14039         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14040         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14041         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14042         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14043         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14044         where appropriate.
14045         (java_lex_error): Empty if JC1_LITE is defined.
14046         (java_get_line_col): Return 0 if JC1_LITE is defined.
14047         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14048         SET_MODIFIER_CTX): Moved into the section containing the macros
14049         conditionally defined by JC1_LITE.
14050         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14051         argument if JC1_LITE is defined.
14052         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14053         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14054         is defined.
14055         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14056         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14057         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14058         to different values according to JC1_LITE.
14059         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14060         declared if JC1_LITE set.
14061         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14062         defined if JC1_LITE not set.
14063         (struct parser_ctx): Reorganized and skip the jc1 front end part
14064         if JC1_LITE set.
14065         (java_layout_classes): New function definition.
14066         (java_push_parser_context, java_init_lex, yyparse, yylex,
14067         yyerror): Prototype always declared. All other static function
14068         prototypes declared only if JC1_LITE is not set.
14069         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14070         declared in parse.h.
14071         (java_layout_classes): New function.
14072         (java_complete_expand_methods): No longer layout the class here.
14073         * parse-scan.y: New file.
14074         * jv-scan.c: New file.
14075
14076 1998-08-25  Tom Tromey  <tromey@cygnus.com>
14077
14078         * gjavah.c (main): Handle -friend option.
14079         (friend_specs): New global.
14080         (generate_access): Handle friend_specs.
14081         (process_file): Likewise.
14082         (MAX_FRIENDS): New macro.
14083         (friend_count): New global.
14084         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
14085         Changed all callers.
14086
14087 1998-08-24  Per Bothner  <bothner@cygnus.com>
14088
14089         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
14090         (main):  Handle processing all the entries of a named .zip archive.
14091         * jcf-io.c (jcf_trim_old_input):  New function.
14092         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
14093
14094 1998-08-24  Per Bothner  <bothner@cygnus.com>
14095
14096         * lang.c (flag_assume_compiled):  Make default be on.
14097
14098 1998-08-21  Per Bothner  <bothner@cygnus.com>
14099
14100         * jcf-dump.c:  Add bunches of flags to control output more.
14101         (process_class):  New function;  support printing more than one class.
14102         (main): Support new --print-main and --javap flags.
14103         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
14104         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
14105
14106 1998-08-20  Per Bothner  <bothner@cygnus.com>
14107
14108         Change mangling of dispatch table to match C++ vtable (w/thunks).
14109         * class.c (build_dtable_decl), java-tree.h:  New function.
14110         (make_class_data):  Call it.
14111         * decl.c (init_decl_processing):  Likewise.
14112
14113 1998-08-19  Warren Levy  <warrenl@cygnus.com>
14114
14115         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14116         soft_anewarray; adjust args passed.
14117         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14118         match _Jv_NewObjectArray.
14119
14120 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14121
14122         * decl.c (push_labeled_block, pop_labeled_block): New functions.
14123         * expr.c (loopup_label): Call create_label_decl.
14124         (create_label_decl): New function.
14125         (java_lang_expand_expr): Call expand_start_bindings with argument
14126         set to zero.
14127         * java-tree.h Added space after PROTO in function declarations
14128         when necessary.
14129         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14130         (create_label_decl, push_labeled_block): New function
14131         declarations.
14132         * lex.c (label_id): Initialize.
14133         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14134         switch.
14135         * parse.h Added space after PROTO in function declarations when
14136         necessary.
14137         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14138         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14139         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14140         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14141         macros.
14142         (struct parser_ctxt): New fields current_loop,
14143         current_labeled_block.
14144         (build_if_else_statement, patch_if_else_statement,
14145         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14146         generate_labeled_block, complete_labeled_statement,
14147         build_bc_statement, patch_bc_statement, patch_loop_statement,
14148         build_new_loop, build_loop_body, complete_loop_body): New function
14149         declarations.
14150         * parse.y (java_warning_count): New global variable.
14151         (label_id): New static variable.
14152         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14153         (block:): Return size_zero_node when block is empty.
14154         (empty_statement:): Return size_zero_node.
14155         (statement:): Implement supplemental action when for_statement: is
14156         reduced.
14157         (label_decl:): New rule.
14158         (labeled_statement:): Rewritten using label_decl. Actions
14159         implemented.
14160         (labeled_statement_nsi:): Likewise.
14161         (if_then_statement): Actions implemented.
14162         (while_expression): New rule.
14163         (while_statement:): Rewritten using while_expression. Actions
14164         implemented.
14165         (while_statement_nsi:): Likewise.
14166         (do_statement_begin:): New rule.
14167         (do_statement:): Rewritten using do_statement_begin. Actions
14168         implemented.
14169         (for_statement:): Rewritten using for_begin. Actions implemented.
14170         (for_statement_nsi:): Likewise.
14171         (for_header:, for_begin:): New rules.
14172         (for_init:): Actions implemented.
14173         (statement_expression_list:, break_statement:,
14174         continue_statement:): Likewise.
14175         (yyerror): Count number of issued warning(s).
14176         (java_report_errors): Report error(s) and/or warning(s).
14177         (java_complete_class): Use build_java_argument_signature to
14178         recompute completed method signature.
14179         (java_check_regular_methods): New locals method_wfl and aflags.
14180         Use method_wfl instead of lookup_cl during error reports. Fixed
14181         indentation and modified some error messages. Use
14182         lang_printable_name in method instead of the DECL_NAME. New code
14183         to issue warnings on methods not overriding corresponding methods
14184         private to a different package.
14185         (java_method_add_stmt): Call add_stmt_to_compound.
14186         (add_stmt_to_compound): New function.
14187         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14188         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14189         (build_if_else_statement, patch_if_else_statement,
14190         build_labeled_block, generate_labeled_block,
14191         complete_labeled_statement, build_new_loop, build_loop_body,
14192         complete_loop_body, patch_loop_statement, build_bc_statement,
14193         patch_bc_statement, patch_exit_expr): New functions.
14194         * typeck.c (build_java_signature): Build argument signature before
14195         enclosing it in between parenthesis.
14196
14197 1998-08-17  Warren Levy  <warrenl@cygnus.com>
14198
14199         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14200         (JAVA_OBJS): Added reminder comment
14201
14202 1998-08-13  Nick Clifton  <nickc@cygnus.com>
14203
14204         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14205         be interpreted as a long long.
14206
14207 1998-08-13  Warren Levy  <warrenl@cygnus.com>
14208
14209         * decl.c (init_decl_processing): Use _Jv_InitClass, not
14210         soft_initialise_class.  Use _Jv_NewMultiArray, not
14211         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
14212         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
14213         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
14214         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14215
14216 1998-08-12  Per Bothner  <bothner@cygnus.com>
14217
14218         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14219         length_identifier_node):  New global tree node constants.
14220         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
14221         Replace uses by super_identifier_node etc.
14222         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
14223
14224         * parse.y (resolve_field_access):  Don't special-case ".length" if
14225         flag_emit_class_files.
14226         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
14227         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
14228         and ARRAY.length.
14229
14230 1998-08-11  Per Bothner  <bothner@cygnus.com>
14231
14232         * decl.c (init_decl_processing): Remove unused method_type_node fields.
14233         * class.c (make_method_value):  Remove init for removed fields.
14234
14235         * class.c (layout_class):  Use build_java_argument_signature.
14236         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
14237
14238         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
14239         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
14240         (build_java_signature):  Don't use push_java_argument_signature.
14241
14242         * typeck.c (lookup_argument_method):  New function.
14243         * parse.y (java_check_regular_methods):  Use lookup_argument_method
14244         instead of lookup_java_method2 followed by lookup_java_method.
14245
14246         * parse.y (check_method_redefinition):  Minor optimization.
14247
14248         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
14249         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14250
14251 1998-08-10  Tom Tromey  <tromey@cygnus.com>
14252
14253         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14254         c-pragma.o.
14255
14256         * gjavah.c (java_float_finite): Use K&R-style definition.
14257         (java_double_finite): Likewise.
14258         (generate_access): Now returns void.  Changed all callers.
14259         (last_access_generated): Removed.
14260         (process_file): Only make a single pass over the .class file.
14261
14262 1998-07-29  Per Bothner  <bothner@cygnus.com>
14263
14264         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
14265         for compatibility for G++ (with -fvtable-thunks).
14266         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
14267
14268         * gjavah.c (process_file):  Use public inheritance for super-class.
14269
14270 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14271
14272         * lex.c (java_init_lex): Initialize ctxp->package.
14273         * parse.h (struct parser_ctxt): package and package_len replaced
14274         by tree package, an identifier node. Field method_decl_list is
14275         gone. Fixed comments.
14276         (lookup_field_wrapper, merge_qualified_name, not_accessible,
14277         class_in_current_package): New function prototypes.
14278         * parse.y (array_type:): Set class loaded flag on primitive type
14279         arrays.
14280         (package_declaration:): Assign ctxp->package to the
14281         identifier node.
14282         (method_invocation:): Handle invocation of method qualified by
14283         `super'.
14284         (single_type_import_declaration:): Removed ambiguity check.
14285         (java_pop_parser_context): New local variable `next'. Reset and
14286         set IMPORT_CLASSFILE_NAME flags on current and previous import
14287         list.
14288         (java_accstring_lookup): Use new local macro COPY_RETURN.
14289         (lookup_field_wrapper): New function.
14290         (parser_qualified_classname): Use merge_qualified_name.
14291         (parser_check_super_interface): Broaden error message.
14292         (do_resolve_class): Check for qualified class name in the current
14293         compilation unit if appropriate.
14294         (process_imports): Check for already defined classes.
14295         (check_pkg_class_access): Got rid of call to
14296         get_access_flags_from_decl.
14297         (java_complete_expand_methods): Call safe_layout_class based on
14298         the current class size.
14299         (make_qualified_primary): Build a WFL qualification on primary if
14300         none exists.
14301         (merge_qualified_name): New function.
14302         (make_qualified_name): Use merge_qualified_name.
14303         (resolve_expression_name): Use safe_lookup_field.
14304         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14305         (resolve_qualified_expression_name): Likewise. Check on resolved
14306         element accessibility.
14307         (not_accessible_p, class_in_current_package): New functions.
14308         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14309         (patch_method_invocation_stmt): Merged common pieces. Check
14310         accessibility of invoked method.
14311         (check_for_static_method_reference): Add returned type in error
14312         message.
14313         (invocation_mode): Get rid of bogus check on PRIVATE methods.
14314         (refine_accessible_methods_list): Merged two conditions in test.
14315         (java_complete_class): Sanity check on stabilize_ref gone.
14316         * zextract.c (read_zip_archive): Cast lseek second argument to long.
14317
14318 1998-07-28  Per Bothner  <bothner@cygnus.com>
14319
14320         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
14321
14322 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14323
14324         * gjavah.c (F_NAN): Removed.
14325         (F_NAN_MASK): New macro.
14326         (F_POSITIVE_INFINITY): Removed.
14327         (F_NEGATIVE_INFINITY): Likewise.
14328         (java_float_finite): Rewrote.
14329         (D_NAN_MASK): Renamed.
14330         (java_double_finite): Rewrote.
14331         (D_POSITIVE_INFINITY): Removed.
14332         (D_NEGATIVE_INFINITY): Likewise.
14333
14334         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14335         If verbose, print underlying representation of value in hex.
14336
14337 1998-07-24  Per Bothner  <bothner@cygnus.com>
14338
14339         * buffer.h, buffer.c:  New files.
14340         * Makefile.in (JAVA_OBJS):  Add buffer.o.
14341
14342         Support locals variables and writing their debug entries to .class.
14343         * jcf-write.c:  Simplify some by user new buffer type.
14344         (vode_buffer_grow):  Removed.
14345         (struct localvar_info):  New type.
14346         (localsvars, localvartable):  New buffers.
14347         (localvar_alloc, localvar_free):  New functions.
14348         (generate_bytecode_insns):  Handle local variables.
14349         (generate_classfile):  Write LocalVariableTable attribute.
14350
14351 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14352
14353         * jcf-io.c (open_in_zip): Check the zipfile magic number.
14354         * zipfile.h (ZIPMAGIC): New macro.
14355
14356 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14357
14358         * Makefile.in (gjavah.o): Updated dependencies.
14359         (jcf-dump.o): Likewise.
14360         (all.indirect): Use ../gjavah.
14361         (../gjavah$(exeext)): Likewise.
14362         (clean): Don't remove gjavah.
14363         (clean): Remove parse.c, not java/parse.c.
14364         * Make-lang.in (java): Added gjavah.
14365         (gjavah$(exeext)): New target.
14366         (GJAVAH_SOURCES): New macro.
14367         (java.all.build): Added gjavah.
14368         (java.all.cross): Likewise.
14369         (java.rest.encap): Likewise.
14370         * config-lang.in (compilers, stagestuff): Added gjavah.
14371
14372 1998-07-23  Tom Tromey  <tromey@cygnus.com>
14373
14374         * gjavah.c (java_float_finite): New function.
14375         (java_double_finite): Likewise.
14376         (F_POSITIVE_INFINITY): New macro.
14377         (F_NEGATIVE_INFINITY): Likewise.
14378         (F_NAN): Likewise.
14379         (D_POSITIVE_INFINITY): Likewise.
14380         (D_NEGATIVE_INFINITY): Likewise.
14381         (D_NAN): Likewise.
14382         (print_field_info): Use java_float_finite and java_double_finite.
14383
14384 1998-07-23  Per Bothner  <bothner@cygnus.com>
14385
14386         * parse.y (method_header):  Name "this" implicit argument.
14387
14388 1998-07-22  Per Bothner  <bothner@cygnus.com>
14389
14390         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
14391         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
14392         (put_linenumber):  New function.
14393         (generate_bytecode_insns, generate_classfile):  Write line numbers.
14394
14395 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14396
14397         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14398         (lookup_name, build_known_method_ref, build_class_init,
14399         build_invokevirtual, invoke_build_dtable, match_java_method,
14400         build_field_ref, pushdecl_force_head, build_java_binop,
14401         binary_numeric_promotion, build_decl_no_layout,
14402         build_java_arrayaccess, build_newarray, build_anewarray,
14403         build_java_array_length_access, build_java_arraynull_check): New
14404         extern function prototypes.
14405         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14406         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14407         java-tree.h.
14408         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14409         to NULL
14410         * jcf.h (jcf_out_of_synch): New extern function prototype.
14411         * parse.h: Static/global function implemented in parse.y
14412         prototyped and declarations moved at the end of the file.
14413         (DECL_P): Check that the argument isn't null.
14414         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14415         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14416         (QUAL_DECL_TYPE): New macro.
14417         (PARAMS): Macro definition removed.
14418         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14419         (return_statement:): Call build_return.
14420         (field_access:): Call make_qualified_primary in sub rule.
14421         (method_invocation:): Build method invocation and call
14422         make_qualified_primary when processing primaries.
14423         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14424         get_type_from_signature.
14425         (java_check_regular_method): Extra integer 0 argument when calling
14426         lookup_java_method2.
14427         (lookup_java_interface_method2): Extra method DECL argument when
14428         calling lookup_java_interface_method2.
14429         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14430         COMPOUND_EXPR node.
14431         (java_complete_expand_method): Layout current class iff not
14432         already done. Don't process interface's methods.
14433         (java_complete_expand_method): Use super class only if it
14434         exists. Use current class otherwise.
14435         (make_qualified_primary): New function.
14436         (resolve_expression_name): Process qualified expression or
14437         expression from primary the same way.
14438         (resolve_expression_name): Two last arguments to
14439         resolve_field_access are now NULL_TREEs.
14440         (resolve_field_access): New variable is_static. Local field must
14441         be DECLs. is_static computed on field DECLs only. Append code in
14442         where_found to the field access if necessary. Use QUAL_DECL_TYPE
14443         to initialize field_type.
14444         (resolve_qualified_expression_name): New local variable,
14445         previous_call_static and is_static. Handle primaries with function
14446         calls, casts, array references and `this'. `super' now handled as
14447         `(super_class)this'. Use is_static to clarify boolean expressions.
14448         Added code to handle case where a proper handle is required to
14449         access a field. Use QUAL_DECL_TYPE where applicable.
14450         (maybe_access_field): New function.
14451         (patch_method_invocation_stmt): New arguments primary, where,
14452         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14453         deleted. Use `where' as a type to search from if specified. Check
14454         for static method reference where forbidden. Append primary or
14455         current_this to the argument list if not calling constructor nor
14456         static methods.
14457         (check_for_static_method_reference): New function.
14458         (patch_invoke): Layout the class on which new is done if
14459         necessary.
14460         (lookup_method_invoke): Changed format to report errors on
14461         methods.
14462         (qualify_ambiguous_name): New local variable this_found. Now
14463         handle things from primaries. Method call are considered
14464         expression names.
14465         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14466         changed into NULLs.
14467         (not_initialized_as_it_should_p): Comply with the new DECL_P.
14468         (java_complete_tree): New case fo RETURN_EXPR. Process function
14469         call arguments in separate function.
14470         (complete_function_arguments): New function.
14471         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14472         anymore.
14473         (patch_assignment): Take the return function slot into account as
14474         a RHS. Distinguish assignment from a return.
14475         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14476         when checking methods in interfaces.
14477         (resolve_type_during_patch): NULL argument to unresolve_type_p
14478         instead of NULL_TREE.
14479         (patch_newarray): Fixed typo in comment.
14480         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14481         (build_return, patch_return): New functions.
14482         * typeck.c (lookup_java_constructor): Fixed typo in comment.
14483
14484 1998-07-21  Per Bothner  <bothner@cygnus.com>
14485
14486         * constants.c (find_name_and_type_constant, find_fieldref_index,
14487         find_methodref_index):  New methods.
14488         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
14489         just return given method.  Also, rename to build_known_method_ref.
14490         (expand_invoke):  Rename call to build_invoke_non_interface.
14491         * java-tree.h, parse.h:  Update prototype.
14492         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
14493         (such as expand_expr_stmt) if flag_emit_class_files.
14494         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14495         STACK_TARGET, IGNORE_TARGET):  New macros.
14496         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
14497         (generate_bytecode_insn):  New function to generate method's bytecode.
14498         (generate_classfile):  Node generate Code attribute for a method.
14499         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14500         push_long_const, field_op, adjust_typed_op, maybe_wide):
14501         New functions used by generate_bytecode_insn.
14502
14503         * typeck.c (signature_include_return):  Remove variable.
14504         (push_java_argument_signature, build_java_argument_signature):  New.
14505         (build_java_signature):  Use push_java_argument_signature.
14506         * parse.y:  Use build_java_argument_signature instead of fiddling
14507         with signature_include_return.
14508
14509 1998-07-17  Tom Tromey  <tromey@cygnus.com>
14510
14511         * gjavah.c (print_c_decl): Always generate JArray<>* for array
14512         types.
14513
14514         * Makefile.in (all.indirect): Added gjavah$(exeext).
14515         (gjavah$(exeext)): Added $(exeext).
14516         (clean): Likewise.
14517
14518 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14519
14520         * class.c (layout_class): Call to java_layout_parsed_class replace
14521         by safe_layout_class.
14522         * expr.c (build_java_array_length_access): Removed static storage
14523         class in the function definition.
14524         (build_java_arraynull_check): Likewise.
14525         Also fixed typos in two comments.
14526         * lex.c (java_init_lex): Initialize static global kw_length.
14527         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14528         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14529         java_lex_error.
14530         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14531         * parse.h (resolve_no_layout): New static function declaration.
14532         (get_identifier_in_static): Declaration removed.
14533         (java_layout_parsed_class): Function name declaration changed to
14534         safe_layout_class.
14535         (build_newarray_node, patch_newarray, resolve_type_during_patch,
14536         not_initialized_as_it_should_p, build_this): New static function
14537         declarations.
14538         (pushdecl_force_head, build_java_binop, int_fits_type_p,
14539         binary_numeric_promotion, stabilize_reference,
14540         build_decl_no_layout, build_java_arrayaccess): Extern function
14541         declarations moved into their own section.
14542         (build_newarray, build_anewarray, build_java_array_length_access,
14543         build_java_arraynull_check): New extern function declarations.
14544         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14545         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14546         fake tree codes.
14547         (CALL_CONSTRUCTOR_P): New macro.
14548         * parse.y (kw_length): New static global tree node.
14549         (return_statement): Tagged <node>.
14550         (RETURN_TK): Tagged <operator>.
14551         (variable_declarator_id:): Build variable declaration with an
14552         empty initialization value if a syntax error was found in the
14553         initialization part of the variable declaration.
14554         (statement_without_trailing_substatement:): return_statement: now
14555         uses the default rule.
14556         (return_statement:): Temporarily fixed to return NULL_TREE.
14557         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14558         (class_instance_creation_expression:): Class creation rules now
14559         call build_method_invocation upon reduction.
14560         (array_creation_expression:): Rules call build_newarray_node upon
14561         reduction.
14562         (dim_exprs:): Build a list of dimension expressions.
14563         (dim_expr:): Store location of the OSB_TK in the dimension
14564         expression node.
14565         (method_invocation:): Added a new error rule.
14566         (build_unresolved_array_type): WFL argument may also be an array
14567         on a primitive type. Name of the argument changed to reflect this.
14568         (method_declarator): Insert argument type at the beginning of the
14569         argument type list and later reverse the list.
14570         (unresolved_type_p): Argument 'returned' may be optionally
14571         NULL_TREE.
14572         (java_layout_class_from_source): Function renamed
14573         safe_layout_class.
14574         (resolve_and_layout): Now call resolve_no_layout and
14575         safe_layout_class.
14576         (resolve_no_layout): New function.
14577         (purify_type_name): New function.
14578         (complete_class_report_errors): Call purify_type_name during error
14579         report on a type not found.
14580         (process_imports): error_found local variable doesn't need to be
14581         initialized to zero.
14582         (declare_local_variables): New local type_wfl. Fixed typo in error
14583         message. type_wfl assigned to unresolved type and used to register
14584         incomplete type. Build a WFL around the variable initialization
14585         statement so that debug info can be generated on it.
14586         (source_start_java_method): Reverse argument list after they've
14587         been processed.
14588         (current_this): New static global variable.
14589         (java_complete_expand_methods): Set current_this when appropriate.
14590         (resolve_expression_name): Build correct static and non static
14591         field access bearing a simple name.
14592         (resolve_field_access): Resolve the length field of arrays. Handle
14593         f.m() cases.
14594         (patch_method_invocation_stmt): Set the type of the method
14595         invocation to error_mark_node. This value is later overridden by a
14596         valid type, if any. Don't handle qualified constructor invocation
14597         as qualified method invocation. Call lookup_method_invoke with its
14598         new flag. It's no longer necessary to access the selected method
14599         as the value of a tree list. Handle constructor invocation.
14600         (patch_invoke): Reverse argument list when invoking non interface
14601         methods. Insert call to new as the first argument of the
14602         constructor.
14603         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14604         defined within a final class. Return INVOKE_STATIC if the invoked
14605         method is a constructor.
14606         (lookup_method_invoke): New lc argument is a flag to indicate a
14607         constructor lookup. Now handle constructor lookup. Choose the most
14608         specific method in case several were matching the invocation
14609         requirements. Return a method decl instead of a tree list featuring
14610         one single method decl element.
14611         (refine_accessible_methods_list): New lc flag argument to
14612         indicate that a constructor is being looked up.
14613         (not_initialized_as_it_should_p): New function.
14614         (java_complete_tree): Now process fake tree codes
14615         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14616         save_expr on resolved function call arguments. Case on
14617         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14618         (patch_assignment): LHS can be a field access expression. When
14619         dealing with reference, lhs_type is the promoted type of the
14620         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14621         applicable.
14622         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14623         (patch_binop): Use not_initialized_as_it_should_p where
14624         applicable.
14625         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14626         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14627         where applicable.
14628         (resolve_type_during_patch): New function.
14629         (patch_cast): Call resolve_type_during_patch to resolve type and
14630         report error accordingly.
14631         (patch_array_ref): Use not_initialized_as_it_should_p where
14632         applicable. Array base expression is saved before being
14633         used. Promote the type of an array elements if it contains non
14634         builtin types.
14635         (build_newarray_node, patch_newarray, build_this): New functions.
14636
14637 1998-07-16  Tom Tromey  <tromey@cygnus.com>
14638
14639         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14640         increment it in `for' statement.
14641         (print_field_info): If number is inf or nan, don't print it.
14642         (print_method_info): If method name is `delete', just ignore it.
14643         (print_c_decl): Special-case jstringArray.
14644
14645         * gjavah.c (help): New function.
14646         (no_argument): New function.
14647         (usage): Changed text.
14648         (main): Rewrote argument handling.  Now handles -v, --help,
14649         --version.
14650         (version): New function.
14651         (found_error): New global.
14652         (main): Return found_error.
14653         (generate_access): Set found_error.
14654         (print_c_decl): Likewise.
14655
14656 1998-07-15  Tom Tromey  <tromey@cygnus.com>
14657
14658         * gjavah.c (print_c_decl): Don't print "," when examining field.
14659         Skip type name when looking at "[L" types.
14660         (process_file): Now static.
14661         (generate_access): Now returns int.
14662         (last_access_generated): New global.
14663         (process_file): Clear last_access_generated; make multiple passes
14664         over the class.
14665         (print_field_info): Just return if generate_access returns true.
14666         (print_method_info): Likewise.  Also, allow <init> functions to
14667         pass through.
14668         (print_c_decl): Added is_init argument.  Print constructors
14669         properly.
14670         (print_cxx_classname): Use UTF8_GET to extract characters from
14671         string.
14672         (print_base_classname): New function.
14673         (print_class_decls): New function.
14674         (process_file): Use it.
14675         (utf8_cmp): New function.
14676
14677 1998-07-13  Nick Clifton  <nickc@cygnus.com>
14678
14679         * lang-options.h: Format changed to match changes in gcc/toplev.c
14680         to implement a --help option.
14681
14682 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
14683
14684         * decl.c (init_decl_processing): Revert change to dtable_type.
14685
14686 1998-07-09  Per Bothner  <bothner@cygnus.com>
14687
14688         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
14689
14690 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
14691
14692         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
14693
14694         * lang.c (lang_init): Default flag_exceptions to 1, without
14695         checking to see if it's 2 first.
14696
14697 1998-07-08  Jeffrey A Law  (law@cygnus.com)
14698
14699         * constants.c: Include "system.h".
14700         * decl.c: Likewise.
14701         * lang.c (flag_new_exceptions): Get via extern now.
14702         (lang_init_options): New functions.  Turn on flag_new_exceptions.
14703
14704 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14705
14706         * lex.c (java_lex): Return 0 when we see an invalid character in
14707         the input.
14708
14709         * lex.c (java_read_char): Specify extra argument when calling
14710         java_lex_error.
14711         (java_read_unicode, java_parse_end_comment,
14712         java_parse_escape_sequence): Likewise,
14713         (java_lex): Specify extra argument when calling
14714         java_lex_error. Test that IDs are beginning with a legal character
14715         for IDs. Handle invalid characters with an error message and a
14716         call to java_lex_error.
14717         (java_lex_error): Adjust column position by new argument
14718         `forward'. Issue an error even if in the middle of reporting an
14719         other error.
14720
14721 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
14722
14723         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
14724         we don't explicitly put a null pointer when we're copying it.
14725
14726 1998-07-07  Tom Tromey  <tromey@cygnus.com>
14727
14728         * gjavah.c (print_cxx_classname): New function.
14729         (super_class_name): Likewise.
14730         (print_super_fields): Removed.
14731         (in_super): Removed.
14732         (print_field_info): Never generate #defines.
14733         (print_c_decl): Changed generated types to match JNI.  No longer
14734         print class name before method name.
14735         (print_method_info): Print "static" before static methods.
14736         Print "virtual" before non-final methods.
14737         (usage): Use exit(1), not exit(-1).
14738         (main): Likewise.
14739         (print_field_info): Use %.17g to print a double.
14740         (last_access): New globals.
14741         (process_file): Initialize last_access.
14742         (usage): Now static.
14743         (ACC_VISIBILITY): New define.
14744         (generate_access): New function.
14745         (print_field_info): Call it.
14746         (print_method_info): Likewise.  Also, generate information for all
14747         methods, not just native methods.  Return void.
14748         (print_c_decl): Return void.
14749         (print_field_info): Return void.
14750
14751 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14752
14753         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
14754         processing the jc1 grammar file. Prefix bison functions and
14755         variables with java_.
14756         (parse.c): Dependencies on parse.h and lex.h
14757         * expr.c (build_java_arrayaccess): Function now global.
14758         * java-tree.h: Comment reorganized to carry on previous
14759         classification effort.
14760         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
14761         RESOLVE_TYPE_NAME_P): New flags on WFLs.
14762         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
14763         java_parse (new prefix java_ generated by bison).
14764         (java_layout_parsed_class, java_register_parsed_class): Function
14765         call removed.
14766         (yyparse): Removed unnecessary call to init_outgoing_cpool.
14767         * lex.c (static tree wfl_op): Variable deleted.
14768         (java_init_lex): Initialize kw_super and kw_this. Initialize more
14769         ctxp fields to NULL_TREE.
14770         (java_lex): No longer create WFL for operators. Filename caching
14771         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
14772         created as STRING_CST and later expanded. Removed extra argument
14773         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
14774         and SUPER.
14775         (build_wfl_node): Removed code in comments.
14776         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
14777         store token and location data in the current bison token.
14778         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
14779         static/extern function declaration at the beginning of the file.
14780         (struct qualification): Data structure definition deleted.
14781         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
14782         (qualify_ambiguous_name): Function declaration modified. Function
14783         now returns nothing.
14784         (build_array_ref, patch_array_ref, make_qualified_name,
14785         resolve_qualified_expression_name, maybe_generate_clinit,
14786         resolve_field_access): New static function declarations.
14787         (build_java_arrayaccess): New extern function declaration.
14788         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
14789         (CALL_EXPR_PRIMARY): Macro deleted.
14790         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
14791         (struct parser_ctxt): Field initialized_final
14792         removed. non_static_initialized, static_initialized: New fields.
14793         * parse.y (static tree kw_super, static tree kw_this): New global
14794         static.
14795         (%union): tree wfl field of operator member replaced by int
14796         location. WFLs are non longer created for operators.
14797         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
14798         (qualified_name:): Now calls make_qualified_name to build the
14799         identifier.
14800         (type_declaration:): Consider generating <clinit> when class
14801         parsing completed.
14802         (variable_declarator:): Directly build an assignment node when the
14803         variable is initialized when declared.
14804         (this_or_super:): Build a WFL and set current location when THIS
14805         or SUPER are parsed.
14806         (expression_statement:): Wrap statement around a WFL.
14807         (primary_no_new_array:): Fixed typo. Changed value returned by
14808         THIS_TK because of its new type (temporary).
14809         (dim_exprs:): Temporary fix because of OSB_TK's new type.
14810         (field_access:): Build qualified name with SUPER.
14811         (method_invocation:): Fixed returned value because of SUPER's new
14812         type.
14813         (array_access:): Use OSB_TK location information.
14814         (post_increment_expression:, post_decrement_expression:,
14815         unary_expression:, pre_increment_expression:,
14816         pre_decrement_expression:, unary_expression_not_plus_minus:,
14817         cast_expression:, multiplicative_expression:,
14818         additive_expression:, shift_expression:, relational_expression:,
14819         equality_expression:, and_expression:, exclusive_or_expression:,
14820         inclusive_or_expression:, conditional_and_expression:,
14821         conditional_or_expression:, assignment:): Use new location/token
14822         information available on operators.
14823         (create_class): Set super_decl_type to NULL_TREE when processing
14824         java.lang.Object.
14825         (register_fields): Field initialization is now a MODIFY_EXPR
14826         node. Chain initialization code to the matching lists (according
14827         to the field declaration modifiers).
14828         (maybe_generate_clinit): New function.
14829         (method_header): Don't set method's DECL_NAME to a WFL when adding
14830         methods to java.lang.Object.
14831         (resolve_and_layout): Now can return NULL_TREE if the type
14832         resolution fails. Otherwise, return the class DECL instead of its
14833         TYPE.
14834         (check_method_redefinition): Don't patch method DECL_NAME if it
14835         belongs to java.lang.Object.
14836         (process_imports): Simply assign error_found to the value returned
14837         by check_pkg_class_access.
14838         (declare_local_variables): Don't use their init statements (if
14839         any) when parsing error were previously found. Reuse MODIFY_EXPR
14840         build during parsing as an init statement.
14841         (java_method_add_stmt): Now return the current method body.
14842         (java_layout_parsed_class, java_register_parsed_class): Functions
14843         removed.
14844         (java_complete_expand_methods): Initialize the constant pool on a
14845         per class basis. Layout the classes before expanding their method
14846         bodies. Don't try expand artificial constructor code if error were
14847         found. Make the classes data and register them if no error were
14848         found.
14849         (java_complete_expand_method): Retrieve an artificial constructor
14850         argument list before entering its body. Assign the top block to
14851         the artificial constructor function body and set types of declared
14852         blocks and compound statements to void. Walk method body if not an
14853         artificial constructor.
14854         (make_qualified_name, cut_identifier_in_qualified): New functions.
14855         (resolve_expression_name): Fixed comments. Save/restore the
14856         current class CLASS_LOADED_P flag value. Build non qualified
14857         static field access and handle qualified expression names.
14858         (resolve_field_access, resolve_qualified_expression_name): New
14859         functions.
14860         (patch_method_invocation_stmt): Use the new expression resolution
14861         scheme, calling resolve_field_access when the function call is
14862         resolved as an expression.
14863         (qualify_ambiguous_name): Function rewritten to work on qualified
14864         expression produced by make_qualified_name.
14865         (java_complete_tree): Promote type when function's argument are
14866         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
14867         the assignment to discover further errors if RHS is a expression
14868         name that fails to evaluate. Declare LHS initialized even though
14869         the assignment failed. Don't use the location variable and removed
14870         extra argument in patch function calls. Now handle the ARRAY_REF
14871         case and build internal string representation when STRING_CSTs are
14872         walked.
14873         (build_method_invocation): Don't wrap function call around a WFL.
14874         (build_assignment): Likewise. Use the operator location
14875         information.
14876         (patch_assignment): Handle array access LHSs. Handle error
14877         provenance, resulting in a better error report.
14878         (build_binop): Use op_location from operator as binop location
14879         information.
14880         (build_unaryop, build_incdec, build_cast): Likewise.
14881         (patch_binop): Extract location information from the node. Fixed
14882         typo in error message.
14883         (patch_unary_op): Extract location information from the node.
14884         (build_array_ref, patch_array_ref): New functions.
14885
14886 1998-07-01  Tom Tromey  <tromey@cygnus.com>
14887
14888         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
14889         match _Jv_IsInstanceOf.
14890         * decl.c (init_decl_processing): Use _Jv_NewArray, not
14891         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
14892
14893 1998-06-30  Tom Tromey  <tromey@cygnus.com>
14894
14895         * decl.c (init_decl_processing): Functions are now named
14896         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
14897
14898 1998-06-29  Per Bothner  <bothner@cygnus.com>
14899
14900         * java-tree.h (load_class):  Add prototype.
14901         * class.c (is_compiled_class):  Add missing arg to load_class.
14902         * expr.c (expand_java_NEW):  Call load_class.
14903         * parse.y (process_import):  Removed bogus use of void return value.
14904
14905 1998-06-25  Per Bothner  <bothner@cygnus.com>
14906
14907         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
14908         Function name is "_Jv_Throw" instead of "soft_athrow".
14909         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
14910         Function name is "_Jv_AllocObject" instead of "soft_new".
14911         Takes an extra parameter (object size).
14912         * expr.c:  Update calls.
14913
14914 1998-06-24  Per Bothner  <bothner@cygnus.com>
14915
14916         * lex.c (java_get_line_col):  Handle end-of-file.
14917         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
14918
14919 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
14920
14921         * lang.c (lang_init): Make -fexceptions the default.
14922         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
14923         exception handling is not turned on.
14924
14925 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14926
14927         * lang.c (flag_new_exceptions): Make this this default.
14928         * decl.c (end_java_method): Call emit_handlers.
14929         * except.c (method_init_exceptions): Set language code and version.
14930         (expand_start_java_handler): Enable exception, and call
14931         expand_eh_region_start.
14932         (expand_end_java_handler): Enable exception, and set up catch blocks.
14933         (emit_handlers): New routine to generate the saved handlers.
14934         * java-except.h (emit_handlers): Add prototype.
14935
14936 1998-06-12  Per Bothner  <bothner@cygnus.com>
14937
14938         We used to have three different representations of the constant pool:
14939         the CPool structure, the tree_constant_pool, and the constructures
14940         used to build the Class object (which may need class and string
14941         constants) in compiled code.  None were appropriate for compiling
14942         to .class files, so I did a major overhaul.
14943
14944         First, the tree_constant_pool array was removed.  Things were
14945         modified to the CPool structure in the JCF could be used.
14946         Second, a "capacity" field was added to the CPool, and functions
14947         written to search for a matching constant, adding one if not found.
14948         The code that generated the Class object was changed to use a CPool.
14949         The actual TREE_LISTs used to build the CONSTRUCTORs used for
14950         the static Class object are now only in build_constants_constructor.
14951         Finally, I wrote code which can generate a .class file (including its
14952         constant pool) from the RECORD_TYPE of a class.  This is a big step
14953         on the way to compiling Java source into .class files.
14954
14955         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
14956         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
14957
14958         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
14959         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
14960         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
14961         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
14962         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
14963         (lang_type):  Removed constant_pool field.
14964         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
14965         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
14966         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
14967         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
14968
14969         * constants.c (current_constant_pool_tags, current_constant_pool_data,
14970         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
14971         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
14972         (set_constant_entry, find_constant1, find_constant2,
14973         find_class_constant, count_constant_pool_bytes, write_constant_pool,
14974         find_utf8_constant, find_class_or_string_constant):  New functions.
14975
14976         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
14977         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
14978         (give_name_to_class, get_class_constant):  Likewise.
14979         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
14980         (get_name_and_type_constant, get_ref_constant):  Removed.
14981         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
14982         * parse.y:  Don't save/restore tree_constant_pool.
14983         * verify.c (verify_jvm_instructions):  Update for new approach.
14984         * expr.c (expand_invoke, expand_java_field_op): Likewise.
14985
14986         * lang-options.h:  Added -femit-class-file, -femit-class-files.
14987         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
14988         (lang_f_options):  Added "emit-class-file(s)".
14989
14990         * expr.c (build_java_arrayaccess):  Generate more efficient array
14991         bounds checking, by using unsigned compare.
14992
14993         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
14994
14995 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14996
14997         * parse.h: New comment on the handling of unresolved type
14998         identifiers. JDEPs are now part of the jdep_code enum.
14999         (typedef struct jdep): Now use enum jdep_code or int, depending on
15000         availability. Both are narrowed down to an 8 bits bitfield.
15001         (CALL_EXPR_PRIMARY): Fixed comment.
15002
15003 1998-06-10  Tom Tromey  <tromey@cygnus.com>
15004
15005         * Make-lang.in (java): Added gjavac and jvgenmain.
15006         (java.start.encap): Depend on gjavac.
15007         (java.rest.encap): Depend on jvgenmain.
15008
15009         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15010         (JAVA_CROSS_NAME): Likewise.
15011         (java.all.build): Depend on jvgenmain and gjavac.
15012         (java.all.cross): Depend on jvgenmain and gjavac-cross.
15013         (jvgenmain$(exeext)): New target.
15014         (java.install-common): Wrote.
15015         * config-lang.in (compilers, stagestuff): Added gjavac and
15016         jvgenmain.
15017
15018 1998-06-10  Dave Brolley  <brolley@cygnus.com>
15019
15020         * lang.c (lang_decode_option): New argc/argv interface.
15021
15022 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15023
15024         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15025         * decl.c (build_decl_no_layout): New function.
15026         * expr.c (java_lang_expand_expr): Layout declarations found in
15027         blocks before they're pushed.
15028         * jcf-parse.c (load_class): Save current line when parsing class
15029         file.
15030         (parse_source_file): Register class before expanding their
15031         methods.
15032         * lang.c (put_decl_node): Produce `null' when `void *' is
15033         processed.
15034         * lex.c (static tree wfl_op): New static global, for error report
15035         on casts.
15036         (java_init_lex): wfl_operator and wfl_op initialized
15037         here. Filename caching added for wfl_op. Return wfl_op when `(' is
15038         parsed.
15039         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15040         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15041         build_unresolved_array_type): New static function definitions.
15042         (build_decl_no_layout): New extern function declared.
15043         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15044         faulty modifier exists.
15045         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15046         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15047         (UNARY_PLUS_EXPR): New fake operator.
15048         (struct parser_ctxt): New field osb_number.
15049         * parse.y (static tree wfl_operator): New static WFL for operator
15050         bound error messages.
15051         (DECR_TK, INCR_TK): Moved.
15052         (OP_TK): Tagged <operator>.
15053         (array_type:): Now call build_unresolved_array_type.
15054         (dim_expr:): Count the number of '[' seen.
15055         (post_increment_expression, post_decrement_expression,
15056         pre_increment_expression, pre_decrement_expression,
15057         unary_expression_not_plus_minus, unary_expression:): Actions are
15058         now building the corresponding unary expressions.
15059         (cast_expression:): Actions are now building cast expressions.
15060         (build_unresolved_array_type): New function.
15061         (create_interface): Reset the number of declared interfaces.
15062         (create_class): Likewise.
15063         (method_header): Methods declared within the scope of an interface
15064         are now implicitly set public and abstract.
15065         (java_complete_class): Variable's and parameter's type are patched
15066         with a promoted type.
15067         (declare_local_variables): Resolved non builtin types are promoted
15068         before being used to build a variable decl. Removed type patch
15069         posted on variable initialization statement.
15070         (source_start_java_method): Use build_decl_no_layout to build the
15071         decl of a parameter of incomplete type.
15072         (java_register_parsed_class): Process interfaces too. Call
15073         rest_of_decl_compilation on each processed class declarations.
15074         (java_complete_expand_methods): Don't attempt to expand things in
15075         interfaces.
15076         (java_complete_tree): Process CONVERT_EXPR, even though it always
15077         has a type. Propagate error_mark_node to node's type too. Promote
15078         method's call argument type and return error_mark_node if
15079         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15080         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15081         handle unary operator nodes.
15082         (build_assignment): Added comment.
15083         (print_int_node): New function.
15084         (patch_assignment): New second argument. New error handling. Use
15085         print_int_node. Handle references. Use can_cast_to_p to issue
15086         different error message according to the context and check upon
15087         the initialization of the RHS.
15088         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15089         (operator_string): Handle more operators.
15090         (patch_binop): No longer use a function static
15091         wfl_operator. Improved error message on shift distance.
15092         (build_unaryop, build_incdec, build_cast, patch_unaryop,
15093         patch_cast): New functions.
15094
15095 1998-06-05  Per Bothner  <bothner@cygnus.com>
15096
15097         * jvspec.c:  New file.
15098         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
15099
15100         * java-tree.h (identifier_subst):  Add declaration.
15101
15102 1998-06-04  Tom Tromey  <tromey@cygnus.com>
15103
15104         * jvgenmain.c (main): Generate call to JvRunMain.
15105
15106         * class.c (make_class_data): Push value for "sync_info" field.
15107         * decl.c (init_decl_processing): Push "sync_info" field.
15108
15109 1998-06-03  Per Bothner  <bothner@cygnus.com>
15110
15111         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
15112         Java (source) name, not signature.
15113         Set TYPE_ALIGN to (at least) that of element_type.
15114
15115 1998-06-02  Per Bothner  <bothner@cygnus.com>
15116
15117         * class.c:  Moved classname-mangling-rekated code to ...
15118         * mangle.c:  ... this new file.
15119         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
15120         * Makefile.in:  Update for above changes.
15121
15122 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15123
15124         * expr.c (truthvalue_conversion): Convert integer and floating
15125         point value to their truth value.
15126         * lex.c (java_lex): Handle the `null' literal.
15127         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15128         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15129         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15130         New macros.
15131
15132         * parse.y: Reorganization/documentation on token declaration.
15133         (binop_lookup[]): New added new tree codes.
15134         (relational_expression): Build corresponding binary operators.
15135         (equality_expression, conditional_and_expression,
15136         conditional_or_expression): Likewise.
15137         (java_complete_class): Fix crash in debug message.
15138         (java_complete_tree): Check initialization of method call
15139         arguments. Further bogus node evaluation to detect more error
15140         during assignments. Handles more binary operators.
15141         (patch_assignment): Use DECL_P.
15142         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15143         code.
15144         (operator_string): Handle more case. Compacted source.
15145         (patch_binop): Changed function comment. Checking for
15146         uninitialized first operand takes the compound assignment into
15147         account and uses DECL_P. Checking for uninitialized second operand
15148         delayed to routine's end. Use macros to issue type bound error
15149         messages and issue messages on both operands if their types are
15150         different. Force fixed type into node. Handle all binary
15151         operators.
15152
15153 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15154
15155         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15156         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15157         build operator node and return tokens.
15158         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15159         * parse.h (java_complete_tree): Changed returned type in prototype.
15160         (build_method_invocation, build_assignment, patch_assignment,
15161         patch_binop): New static function declarations.
15162         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15163         BUILD_EXPR_WFL): New macros.
15164         * parse.y (enum tree_code binop_lookup[]): New static for token to
15165         TREE_CODE lookup.
15166         (%union): Parser union has new sub-structure `operator'.
15167         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15168         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15169         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15170         ASSIGN_ANY_TK): Tokens tagged `operator'.
15171         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15172         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15173         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15174         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15175         (assignment_operator:): Rule tagged `operator'.
15176         (expression_statement:): Re-installed default rule.
15177         (method_invocation:): Sub rules call build_method_invocation.
15178         (postfix_expression:): Don't attempt to resolve name here. Just
15179         return an ID.
15180         (multiplicative_expression:): Sub-rules build corresponding binop
15181         expression node.
15182         (additive_expression:, shift_expression:, and_expression:,
15183         exclusive_or_expression:, inclusive_or_expression:): Likewise.
15184         (assignment:): Sub rule invoke build_assignment.
15185         (assignment_operator:): Default rules on sub rules.
15186         (force_error): Added documentation on this variable.
15187         (declare_local_variables): Build initialization calling
15188         build_assignment.
15189         (expand_start_java_method): Removed unused rtx declaration. Mark
15190         arguments as already initialized.
15191         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15192         (java_complete_expand_methods): Don't process next method if
15193         completion of the previous one triggered errors.
15194         (java_complete_expand_method): Call source_end_java_method if no
15195         error were found during completion.
15196         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15197         locals declaratilon. Handle names found within a class. Return
15198         error_mark_node when things aren't found.
15199         (patch_method_invocation_stmt): Return error_mark_node on failures.
15200         (patch_invoke): Removed unused local. Return the correct node.
15201         (java_complete_tree): Now returns a value. The BLOCK section binds
15202         local identifiers and the type of a BLOCK is now void. Assign the
15203         result of operand completion on COMPOUND_EXPR. Assign the
15204         encapsulated node of a WFL to the result of its completion, except
15205         when the node is an identifier. Now handle MODIFY_EXPR and several
15206         binary operators. Return error_mark_node on errors.
15207         (build_method_invocation, build_assignment, patch_assignment,
15208         build_binop, operator_string, patch_binop): New functions.
15209         * typeck.c (binary_numeric_promotion): New function.
15210
15211 1998-05-21  Per Bothner  <bothner@cygnus.com>
15212
15213         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
15214         Replace most uses of ident_subst by identifier_subst.
15215
15216         * class.c (push_class_static_dummy_field):  Removed function.
15217         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
15218         instead of looking got "class" static field.  Create that decl here.
15219         (class_identifier_node):  Removed;  no longer needed.
15220         (init_class_processing):  Don't init class_identifier_node.
15221         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
15222         Do nreverse 0 times (instead of twice) for Object and Class.
15223         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15224
15225 1998-05-20  Per Bothner  <bothner@cygnus.com>
15226
15227         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
15228         while initializing linenumber_count and linenumber_table.
15229         Do it before init_function_start (which calls emit_line_note).
15230         * expr.c (expand_byte_code):  Don't need to clear lineno here.
15231
15232 1998-05-18  Tom Tromey  <tromey@cygnus.com>
15233
15234         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15235         then mangle number as _N_.
15236
15237         * class.c (mangle_class_field): New function.
15238         (build_class_ref): Set assembler name of class reference using
15239         mangle_class_field.
15240         (push_class_static_dummy_field): Likewise.
15241
15242 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
15243
15244         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15245         of assigning to TREE_CODE.  The latter method exploits a feature
15246         of GCC that is not ANSI compliant.
15247
15248 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15249
15250         * decl.c (pushdecl_force_head): New function.
15251         (pushlevel): Removed conditional printf.
15252         (complete_start_java_method): Don't enter local variable scope if
15253         function is compiled from source code.
15254         * expr.c: parse.h now included
15255         (java_lang_expand_expr): New function.
15256         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15257         printf. Terminate buffer when doing directories.
15258         * jcf-parse.c (parse_source_file): Call lang_init_source before
15259         parsing and before code generation.
15260         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15261         use printf if the macro is defined.
15262         * lang.c (lang_init): Install lang_expand_expr hook on
15263         java_lang_expand_expr.
15264         (java_dummy_print): New function.
15265         (lang_init_source): New function.
15266         * lex.c (java_lex): Remember location of an opening brace at the
15267         second nesting level.
15268         (java_is_eol): Unget character seen after a CR if it is EOF.
15269         * parse.h: Now includes lex.h
15270         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15271         printf if the macro is defined.
15272         (expand_start_java_method, build_expr_block, enter_block,
15273         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15274         New static function declarations.
15275         (pushdecl_force_head): New extern function declaration.
15276         (INCOMPLETE_TYPE_P): New macro.
15277         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15278         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15279         BLOCK_EXPR_ORIGIN): New macros.
15280         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15281         DECL_SOURCE_LINE_LAST): New macros.
15282         (struct parser_ctxt): Removed field current_method_decl, redundant
15283         with the field current_function_decl. Added fields
15284         first_ccb_indent1 and pending_block.
15285         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15286         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15287         tagged <node>
15288         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15289         (compilation_unit:): Cosmetic on sub rule.
15290         (type_declaration:): Cosmetic on sub rules. Added an error rule.
15291         (variable_initializer:): Installed default rule on expression:.
15292         (method_declaration:): method_header: starts a new
15293         method. method_body: installs the function body, absorbs blocks
15294         emitted for temporary variable scopings, pops function's body block
15295         and merges function's last statement lineno in DECL_SOURCE_LINE.
15296         (method_body:): Installed default rules.
15297         (block:): Call enter_block when an opening brace is seen.  Absorb
15298         scoping blocks and call exit_block when a closing brace is seen.
15299         (block_statement:): Cosmetic changes.
15300         (method_invocation:): Create WFL around CALL_EXPR node.
15301         (patch_stage): Added comment around definition.
15302         (method_header): Try to use first_ccb_indent1 as the first line of
15303         the method, so BP debug info are emitted at the first opening
15304         brace of the function. If the function has no body, use the
15305         location of the function's name. Override currently defined method
15306         name with the matching WFL so we can point redefinition errors
15307         using the location where the function's name was declared.
15308         (check_abstract_method_header): Interprets DECL_NAME as an
15309         identifier or as a WFL, accordingly.
15310         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15311         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15312         location and name information out of it and reinstall DECL_NAME to
15313         its original identifier node value.
15314         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15315         function's source code).
15316         (read_import_dir): Test the value returned by find_class and issue
15317         a fatal accordingly.
15318         (declare_local_variables): Push a new block for the scope of the
15319         new variable(s) if code has been already generated at that nesting
15320         level. Pinpoint redefinition errors using the variable id
15321         WFLs. Generate initialization code if necessary. If the variable
15322         type is incomplete, register a patch on its decl.
15323         (source_start_java_method): Rewritten. Define a new block for the
15324         function's parameters. Build parameter decl out of function's
15325         arguments and register them for a patch if their types are
15326         incomplete.
15327         (expand_start_java_method): Includes the part of
15328         source_start_java_method that was pushing the parameter decls and
15329         completing the method start code.
15330         (source_end_java_method): Removed call the expand_end_bindings and
15331         poplevel (already taken care of). Reinstall function's arguments
15332         and get function's last line of code before calling
15333         expand_function_end.
15334         (java_method_add_stmt): New comment before the function's
15335         code. Complement the second operand of the current COMPOUND_EXPR
15336         if necessary.
15337         (java_complete_expand_methods): Don't generate debug info on line
15338         zero when expanding a generated constructor.
15339         (java_complete_expand_method): Set start and end line numbers for
15340         a artificially generated constructor to one and manually call
15341         enter_block and exit_block when defining it. For all methods:
15342         expand function's start calling the new expand_start_java_method
15343         and invoke java_complete_tree on the effective method's body, if
15344         any.
15345         (resolve_expression_name): Now use lookup_name_in_blocks to search
15346         local variable decls and print out an error when variables are
15347         undefined.
15348         (patch_method_invocation_stmt): Inserted comment before the
15349         function's code.
15350         (lookup_method_invoke): Chain method's arguments using chainon
15351         with the current arg list as a second argument. Inserted missing
15352         IDENTIFIER_POINTER when reporting an error on methods not found.
15353         (refine_accessible_methods_list): Don't retain constructors.
15354         (patch_arguments): Function removed.
15355         (java_complete_tree): Inserted comment before the function's
15356         code. New case for BLOCKs. Moved the WFL case a bit
15357         further. Complete function's arguments.
15358         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15359         maybe_absorb_scoping_blocks): New functions.
15360
15361 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15362
15363         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15364         previously set.
15365         * jcf-parse.c (parse_source_file, java_error_count): New forward
15366         and extern declarations.
15367         (java_parse_abort_on_error): Macro moved.
15368         (jcf_parse_source): fatal called if fopen fails. Now calls
15369         parse_source_file.
15370         (parse_source_file): New parse_only parameter. Reflects the
15371         elimination of the second pass.
15372         (yyparse): parse_source_file called with argument set to 0.
15373         * jcf.h (JCF_ZERO): Sets java_source to zero.
15374         * lex.c (java_init_lex): pass argument is gone. Function modified
15375         to be called once during the analysis of a file.
15376         (java_unget_unicode): Fixed typo in fatal message.
15377         (java_get_line_col): Likewise.
15378         (java_lval): Likewise. String literals no longer built during
15379         second pass.
15380         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15381         account.
15382         * parse.h (MODIFIER_WFL): New macro.
15383         (parse_check_super, parser_check_super_interface): Now return int.
15384         (parser_chain_incomplete_item, not_builtin_p,
15385         complete_method_decl): Declarations removed.
15386         (build_method_invocation_stmt, build_invoke): Renamed using the
15387         `patch' instead of `build'
15388         (register-incomplete_type, obtain_incomplete_type,
15389         java_complete_tree, java_complete_expand_method,
15390         unresolved_type_p, create_jdep_list): New function declarations.
15391         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15392         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15393         (jdep): New typedef on new struct _jdep.
15394         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15395         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15396         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15397         JDEP_RESOLVED_P): New macros.
15398         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15399         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15400         JDEP_VARIABLE): New enum values and jdep kinds.
15401         (jdeplist): New typedef on struct _jdeplist.
15402         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15403         macros.
15404         (CALL_EXPR_PRIMARY): New macro.
15405         (struct parser_ctxt): Fields java_pass, current_method_decl,
15406         method_decl_list deleted. New field jdeplist.
15407         (INCOMPLETE_P): Macro deleted.
15408         * parse.y (single_type_import_declaration:): Removed pass switch.
15409         (type_import_on_demand_declaration): Likewise.
15410         (field_declaration:): Removed pass switch on all sub rules.
15411         (class_declaration:): Call the complete_class_decl removed on
15412         class_body rules.
15413         (method_declaration:): Removed second pass switch. No longer chain
15414         methods decl when method_header reduced.
15415         (method_header:): Sub rules no longer depend on pass switch.
15416         (method_declarator:): Likewise.
15417         (method_body:): Likewise.
15418         (abstract_method_declaration:): Likewise.
15419         (block_statement:): Likewise.
15420         (local_variable_declaration:): Likewise.
15421         (argument_list:): Likewise.
15422         (method_invocation:): Likewise. Call to build_method_invocation_stmt
15423         removed. Partial CLASS_EXPR tree node built instead.
15424         (postfix_expression:): Removed pass switch on all sub rules.
15425         (java_pop_parser_context): Free classd_list content.
15426         (yyerror): Call obstrack_grow0 to finalize error message.
15427         (check_class_interface_creation): Comment modified to reflect new
15428         returned value meaning. Removed second pass switch. Return 1 if an
15429         error was found, 0 otherwise. Adjust pointer on filename if a
15430         leading path separator was found.
15431         (maybe_create_class_interface_decl): Removed first pass switch
15432         when linking the class decl to the class_list. Install a new
15433         jdep_list for the class.
15434         (add_superinterfaces): List of unresolved interfaces is
15435         gone. Unresolved interfaces are directly added to the current
15436         dependencies list.
15437         (create_interface): Second pass shortcut removed.
15438         ctpx->modifier_ctx access through MODIFIER_WFL.
15439         (create_class): Second pass shortcut removed. Call to
15440         register_incomplete_type replaces the call to
15441         parser_chain_incomplete_item.
15442         (complete_class_decl): Function removed.
15443         (duplicate_declaration_error): New way of retrieving redeclared
15444         item type.
15445         (register_fields): Call to lookup_modifier_cl replaced by
15446         MODIFIER_WFL. New way of handling unresolved type, using
15447         unresolved_type_p and obtain_incomplete_type.
15448         register_incomplete_type replaces call to parser_chain_incomplete_item.
15449         (patch_stage): New static global variable.
15450         (method_header): New way of handling unresolved type, using
15451         unresolved_type_p and obtain_incomplete_type. patch_stage used to
15452         indicates that the method decl needs to be patched.
15453         (check_abstract_method_header): Call to lookup_modifier_cl
15454         replaced by MODIFIER_WFL.
15455         (method_declarator): Incomplete argument type are registered
15456         calling register_incomplete_type. Patch on the declared method is
15457         issued in that case.
15458         (unresolved_type_p): New function.
15459         (parser_check_super_interface): New comment to reflect function's
15460         modified returned type (int). Function and has a new argument
15461         this_wfl. Call to parse_error_context uses this_wfl instead of
15462         relying on lookup_cl.
15463         (parser_check_super): Comment reflects function's new returned
15464         type (int). Function returns nonzero value on error.
15465         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15466         register_incomplete_type, jdep_resolve_class): New functions to
15467         handle incomplete types in declarations.
15468         (java_complete_class): Rewritten to work with the new incomplete
15469         type handling scheme.
15470         (complete_class_report_errors): Likewise.
15471         (complete_method_decl): Removed: it jobs is now handled by
15472         java_complete_class.
15473         (do_resolve_class): Class loaded in not already loaded and not
15474         found in Java source code.
15475         (java_check_regular_methods, java_check_abstract_methods): Don't
15476         call complete_method_decl anymore.
15477         (lookup_modifier_cl, not_builtin_p): Functions deleted.
15478         (read_import_dir): Got rid of the pass number dependency.
15479         (declare_local_variables): New handling of unresolved types (patch
15480         issued).
15481         (source_start_java_method): New parameter level. Function called
15482         with level set to 1 when argument types are potentially
15483         unresolved.  Called to complete the job with level set to 2 once
15484         types are complete.
15485         (source_end_java_method): Call to permanent_allocation
15486         removed. Waiting to be replaced by a more suitable obstack
15487         management.
15488         (java_complete_expand_methods, java_complete_expand_method,
15489         java_expand_finals): New functions.
15490         (build_method_invocation_stmt): Renamed
15491         patch_method_invocation_stmt. Extracts function call expression
15492         (wfl) and arguments (args) from CALL_EXPR tree operands.
15493         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15494         call. Patch the function and argument operand of the CALL_EXPR
15495         tree argument.
15496         (patch_argument, java_complete_tree): New functions.
15497
15498 1998-04-20  Per Bothner  <bothner@cygnus.com>
15499
15500         Recover from missing fields and methods (i.e. error instead of fatal).
15501         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
15502         * expr.c (expand_invoke):  Recover from missing method.
15503         (expand_java_field_op):  Recover from missing field.
15504         Inline references to java.lang.{Integer,Char,...}.TYPE.
15505         * typeck.c (get_type_from_signature), java-tree.h:  New function.
15506         * class.c (add_method):  Use get_type_from_signature.
15507         (build_class_ref):  Handle a class that was not found.
15508         * typeck.c (convert):  Handle conversion to pointers (for convenience).
15509         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
15510         instead of lookup_field to handle missing fields.
15511
15512         * jcf-parse.c (process_zip_dir):  Set java_source.
15513
15514 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
15515
15516         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15517
15518 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15519
15520         * jcf-parse.c (load_class): Don't change input_filename before
15521         calling jcf_parse_source (but still do it before calling
15522         jcf_parse).
15523         (jcf_parse_source): Assign input_filename after having saved the
15524         parser context.
15525         * lex.c (java_init_lex): Chain a WFL node to the import on demand
15526         list. ctxp->modifier_ctx zeroed according to its new
15527         definition. ctxp->filename initialized. Removed
15528         JAVA_MODIFIER_CTX_UNMARK.
15529         (java_unget_unicode): Update the character based column position.
15530         (java_allocate_new_line): ref_count not used anymore. Always free
15531         ctxp->p_line. Initialize c_line->char_col to 0.
15532         (java_get_unicode): Update the character based column position.
15533         (java_lex): Use ctxp->elc to store current position in source
15534         file, at the beginning of the parsed token. Set modifier_ctx entry
15535         corresponding to the parse modifier to a WFL node. Return a WFL
15536         node when an identifier is parsed.
15537         (java_lex_error): Now uses ctxp->elc to store current position in
15538         source.
15539         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15540         * lex.h (build_wfl_node): New function definitions.
15541         (struct java_line): ref_count and next fields are gone. New field
15542         char_col.
15543         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15544         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15545         (JAVA_COLUMN_DELTA): New macro.
15546         (java_lc): New typedef on new struct _java_lc.
15547         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15548         (parse_error_context, parse_warning_context): Changed prototypes.
15549         (java_get_line_col): Added as an available global function.
15550         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15551         (IC_DECL): Replaced by macro IC_TYPE
15552         (DEPEND_WFL): New macro.
15553         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15554         wrong modifier.
15555         (exit_java_complete_class): Removed a commented out statement.
15556         (struct parser_ctxt): Added comments on fields. modifier_ctx is
15557         now an array of tree nodes. Deleted fields line_list and
15558         e_line. New field elc, to replace e_line.
15559         * parse.y (array_type:): Build WFL node.
15560         (qualified_name:): Build a single WFL node out of two. Retain
15561         the location information of the first node in the resulting node.
15562         (package_declaration:): Use package name as a WFL node
15563         (single_type_import_declaration:): Use imported name as a WFL node.
15564         (type_import_on_demand_declaration:): Use root of the imported
15565         packages as a WFL node.
15566         (field_declaration:): Removed unused local variable cl.
15567         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15568         (yyerror): New static elc. Removed static error_line, error_pos.
15569         New local code_from_source. Save ctxp->elc into elc at the first
15570         pass. Call java_get_line_col to get a string of the line where
15571         the error occurred.
15572         (debug_line): Removed static function.
15573         (parse_error_context, parse_warning_context): Parameter cl is now
15574         a WFL node. Use its value to initialize ctxp->elc.
15575         (redefinition_error): Parameter cl is now a WFL node.
15576         (parse_add_interface): New parameter wfl. No longer call
15577         lookup_cl, use wfl instead.
15578         (check_class_interface_creation): Parameter cl is now a WFL node.
15579         (maybe_create_class_interface_decl): Likewise.
15580         (add_superinterfaces): New function.
15581         (create_interface): Removed local cl, node, super_decl,
15582         super_decl_type.  Function now uses id as a WFL node. Better
15583         warning/error report on obsolete or forbidden mix of
15584         modifiers. Now calls add_superinterfaces to register interfaces.
15585         (create_class): Removed local cl, node. Local variable id is used
15586         as a WFL node. Better error report on forbidden modifier
15587         mix. Uses add_superinterfaces to register interfaces.
15588         (find_field): Argument cl is now a WFL node. Now store the WFL
15589         node of a fields that needs to be checked for their
15590         initialization.
15591         (method_header): Local variable node non longer used. Local
15592         variable id replaces cl.
15593         (check_modifiers_consistency): Local variable cl is now a WFL
15594         node.
15595         (method_declarator): Local variable cl replaced by parameter id.
15596         (parser_qualified_name): Now uses parameter name as a WFL node.
15597         (parser_check_super_interface): New parameter wfl, for achieve
15598         greater accuracy during error reports.
15599         (parser_chain_incomplete_item): New parameter named location. Used,
15600         along the decl, to construct the incomplete item node.
15601         (java_complete_class): resolve_class now uses WFL node extracted
15602         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15603         where appropriate.
15604         (complete_method_decl): Unresolved function's argument types are WFL.
15605         (resolve_class): Parameter cl is now a WFL node.
15606         (resolve_and_layout): Likewise.
15607         (do_resolve_class): Likewise. Try first to use cl and then do the
15608         lookup on the decl when calling check_pkg_class_access.
15609         (complete_class_report_errors): Use IC_TYPE in place of
15610         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15611         instead of doing a lookup over the decl.
15612         (java_check_final): Use WFL info from field tree list.
15613         (lookup_cl): Rewritten and returns a statically defined WFL node.
15614         (lookup_modifier_cl): Now uses information from WFL nodes.
15615         (process_imports): Likewise.
15616         (read_import_dir): name and cl arguments replaced by a single WFL
15617         node. Function modified accordingly.
15618         (find_in_imports_on_demand): Now uses WFL node.
15619         (check_pkg_class_access): cl argument is now a WFL node.
15620         (declare_local_variables): Fixed to use WFL nodes.
15621         (resolve_expression_name): Likewise.
15622         (build_method_invocation_stmt): name_combo argument renamed
15623         wfl. Function modified to use WFL nodes.
15624         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15625         (lookup_method_invoke): cl is now a WFL node. Added missing
15626         IDENTIFIER_POINTER to class type decl name.
15627
15628 1998-04-14  Dave Brolley  <brolley@cygnus.com>
15629
15630         * lang.c (init_parse): Now returns char* containing the filename.
15631
15632 1998-04-10  Per Bothner  <bothner@cygnus.com>
15633
15634         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
15635
15636         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
15637         * class.c (make_class_data):  If flag_assume_compiled, initial class
15638         state is CSTATE_PREPARED; make superclass and interfaces direct
15639         references, rather than constant pool indexes.
15640
15641 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15642
15643         * parser.y: Include flags.h. Removed debug variable pl.
15644         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15645         (block:): Likewise.
15646         (labeled_statement_nsi:): Generate debug info when reducing
15647         expression_statement:.
15648         (check_pkg_class_access): get_access_flags_from_decl invocation
15649         fixed for new CLASS_* flags location.
15650         (source_end_java_method): Save/restore parser context when
15651         entering/leaving this routine. Restore lineno to its right value
15652         before calling expand_end_bindings.
15653         (build_method_invocation_stmt): build_invoke called with the
15654         current line information.
15655         (build_invoke): New argument cl. Wrap the function call around a
15656         wfl node.
15657         (refine_accessible_methods_list): Changed comment, removed
15658         unnecessary code.
15659         * parse.h: Fixed typo in comments.
15660         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15661         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15662         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15663         parser_ccb_indent.
15664         * lex.c (java_lex): Record the last closing curly bracket of a
15665         function.
15666         * jcf-parse.c (jcf_parse_source): Now calls
15667         java_check_methods. Clarified comment, fixed typo.
15668
15669 1998-04-09  Dave Brolley  <brolley@cygnus.com>
15670
15671         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15672         (finish_parse): Expose for non USE_CPPLIB builds.
15673
15674 1998-04-08  Jeffrey A Law  (law@cygnus.com)
15675
15676         * lang.c (lang_print_xnode): New function.
15677
15678 1998-04-03  Per Bothner  <bothner@cygnus.com>
15679
15680         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
15681         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
15682         used to build a class's dispatch table.
15683         (make_class_data):  Generate dispatch table if flag_assume_compiled.
15684         Set dtable of class object to address of class_dtable_decl.
15685
15686         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
15687         be volatile and have side effects - generates better code.
15688
15689         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
15690         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
15691
15692         * expr.c (expand_invoke):  If class is final, method is
15693         effectively final, so can call it directly.
15694
15695         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
15696
15697         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
15698
15699 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15700
15701         * parse.y (build_method_invocation_stmt): Removed extra argument
15702         to build_invoke.
15703
15704 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15705
15706         * expr.c (dtable_indent): Now static global.
15707         (expand_invoke): Now call invoke_build_dtable and
15708         build_invokevirtual.
15709         (invoke_build_dtable, build_invokevirtual): New functions.
15710         * jcf-io.c (find_class): Defer issuing a warning by setting
15711         jcf->outofsynch to 1.
15712         * jcf-parse.c (jcf_out_of_synch): New function.
15713         (load_class): Test this_jcf.outofsynch flag and call
15714         jcf_out_of_synch accordingly.
15715         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
15716         comment indentation.
15717         * lex.c (java_get_unicode): Fixed code indentation.
15718         (java_lex): Create string literal. Fixed typo. Removed several
15719         premature obstack_free.
15720         * parse.h: New enums for name resolution and invocation mode.
15721         (struct qualification): New data structure.
15722         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
15723         (do_resolve_class, build_method_invocation_stmt,
15724         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
15725         debug_line, identical_subpath_p, invocation_mode,
15726         refine_accessible_methods_list, build_invoke,
15727         lookup_method_invoke): New functions declared.
15728         (build_invokevirtual, invoke_build_dtable, match_java_method,
15729         build_field_ref, jcf_out_of_synch): New references to external
15730         functions.
15731         (struct parse_ctxt): Removed artificial_constructor field.
15732         * parse.y: (array_type:): Type defined for this rule.
15733         (class_type:): Installed default rule for interface_type:.
15734         (array_type:): Now build Java array type.
15735         (qualified_name:): Now use obstack_grow0.
15736         (method_declaration:): Skip the artificial constructor added to
15737         the list, if any.
15738         (abstract_method_declaration:): Execute the code only during pass 1.
15739         (block:): Installed default rule in block_statements:.
15740         (block_statement:): Add the statement to the method during pass 2.
15741         (statement_expression): Installed default rule for
15742         method_invocation:.
15743         (argument_list:): Added code to build the argument list.
15744         (method_invocation:): Added call to create the method invocation
15745         node.
15746         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
15747         (debug_line): New function for debug.
15748         (complete_class_decl): No longer do something during pass 1.
15749         (method_header): Use BUILD_PTR_FROM_NAME.
15750         (parser_qualified_classname): Use obstack_grow0. Removed bogus
15751         obstack_free.
15752         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
15753         function's main comment.
15754         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
15755         classes.
15756         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
15757         (resolve_class): Now works with arrays.
15758         (do_resolve_class, resolve_and_layout): New functions.
15759         (java_check_regular_methods): Reverse method list before and after
15760         having processed it. No longer set ctxp->artificial_constructor.
15761         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
15762         accordingly. Fixed typo in issued error message. Now use
15763         obstack_grow0.
15764         (find_in_imports_on_demand): Now use obstack_grow0.
15765         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
15766         (source_end_java_method): Call expand_expr_stmt instead of
15767         expand_expr. Calls it before calling expand_function_end.
15768         (java_method_add_stmt): Do nothing if errors were found during
15769         parsing.
15770         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
15771         (build_method_invocation_stmt, build_invoke, invocation_mode,
15772         lookup_method_invoke, refine_accessible_methods_list,
15773         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
15774         New functions.
15775         * typeck.c (build_java_signature): Properly end method signature
15776         if return type skipped.
15777         (match_java_method): New function.
15778
15779 1998-03-16  Per Bothner  <bothner@cygnus.com>
15780
15781         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
15782
15783 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15784
15785         * expr.c (build_invoke_non_interface): New function.
15786         (methods_ident, ncode_ident): Now static globals.
15787         (expand_invoke): Use build_invoke_non_interface.
15788         * java-tree.h (struct lang_decl): New field function_decl_body.
15789         (DECL_FUNCTION_BODY): New macro.
15790         * jcf-parse.c (jcf_parse_source): Deeper check before setting
15791         CLASS_FROM_SOURCE_P.
15792         (parse_source_file): Fixed typos. Call java_layout_parsed_class
15793         before starting pass 2. Call to java_generate_parsed_class replaced
15794         by java_register_parsed_class.
15795         * lex.c: Fixed typo in header. Some line width related formating.
15796         * lex.h: Some line width related formating.
15797         * parse.h (source_end_java_method, resolve_expression_name,
15798         complete_class_decl, maybe_create_class_interface_decl,
15799         check_class_interface_creation): New static function declarations.
15800         (java_layout_parsed_class, java_method_add_stmt): New function
15801         declarations.
15802         (struct parser_ctxt): Field mark_class_generate removed. New
15803         fields class_list and artificial_constructor.
15804         * parse.y: Fixed typo in header.
15805         (class_declaration:): Call complete_class_decl when class body
15806         parsed.
15807         (method_declaration:): Call source_end_java_method in pass 2 when
15808         the method body is defined.
15809         (postfix_expression:): Do expression name resolution on sub-rule
15810         name during pass 2.
15811         (create_class, create_interface): Merged common pieces.
15812         (check_class_interface_creation, maybe_create_class_interface_decl):
15813         New functions.
15814         (complete_class_decl): New function.
15815         (register_fields): Fixed line width related typo.
15816         (method_header): Correctly skip first argument when fixing
15817         argument line. Changed the loop.
15818         (java_check_circular_reference): Now use ctxp->class_list.
15819         (java_complete_class): Removed start/stop marking.
15820         (java_check_regular_methods): Now takes a class decl as an
15821         argument.  Add default constructor if none were encountered.
15822         (java_check_methods): Now use ctxp->class_list. Changed call to
15823         java_check_regular_methods.
15824         (source_start_java_method): Set DECL_ARG_TYPE for each function
15825         arguments.
15826         (source_end_java_method, java_method_add_stmt): New functions.
15827         (java_generate_parsed_class): No longer exists.
15828         (java_layout_parsed_class, java_register_parsed_class): New functions.
15829         (resolve_expression_name): New function.
15830
15831 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15832
15833         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
15834         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
15835         until pass initializations are done. Call read_import_dir with
15836         pass set to 0.
15837         * parse.h: (lookup_modifier_cl): New function declared.
15838         (INTERFACE_FIELD_MODIFIERS): New macro.
15839         (OBSOLETE_MODIFIER_WARNING): New macro.
15840         * parse.y: (register_fields): Class type and current field name in
15841         local variables. Check modifier(s) if adding field(s) to an interface.
15842         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
15843         and report errors using the faulty modifier line context.
15844         (lookup_modifier_cl): New function.
15845         (read_import_dir): Detect and report default import processing
15846         failure.
15847
15848 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
15849
15850         Add a pair of -fassume-compiled/-fno-assume-compiled options.
15851         * class.c (is_compiled_class): Return 1 after making sure it
15852         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
15853         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
15854         * java-tree.h (flag_assume_compiled): Add decl.
15855         * lang.c (lang_f_options): Add the flag.
15856         (flag_assume_compiled): Add decl, default to 0.
15857
15858 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15859
15860         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
15861         (is_compiled_class): Likewise.
15862         (layout_class): Likewise.
15863         (layout_class): Detect and lay out classes defined in source code.
15864         (interface_of_p, add_interface_do, may_add_interface): New
15865         function.
15866         (add_interface): Now use add_interface_do.
15867         (add_method_1): New function.
15868         (add_method): Now use add_method_1.
15869         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
15870         (complete_start_java_method): New function.
15871         (start_java_mehod): Now call complete_start_java_method.
15872         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
15873         (expand_invoke): Likewise and fixed typo.
15874         *gjava.c: (print_super_field): Use new argument to find_class
15875         DO_CLASS_FILE.
15876         (main): Likewise.
15877         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
15878         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
15879         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
15880         IDENTIFIER_NODE.
15881         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
15882         (add_method_1, push_class): New prototypes.
15883         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
15884         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
15885         directory where the class was found.
15886         (find_class): New argument DO_CLASS_FILE. Function find_class
15887         modified accordingly.
15888         *jcf-parse.c: (fix_class_path): New function.
15889         (load_class): Use new VERBOSE argument. load_class now finds and
15890         loads/parses .class/.java files. Save read_state of current_jcf
15891         if necessary.
15892         (java_parser_abort_on_error): New macro.
15893         (jcf_parse_source, parse_source_file): New function.
15894         (jcf_parse): Fixed typo.
15895         (yyparse): Call parse_source_file () only.
15896         (process_zip_dir): Fixed typo, fix zdir->filename_length when
15897         writing the real class name back in the zip directory entry.
15898         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
15899         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
15900         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
15901         (find_class): Prototype fixed.
15902         *lex.c: Added 1998 time stamp.
15903         Removed all static global variables, moved into the parser
15904         context data structure.. Now include unistd.h if SEEK_SET not
15905         defined.
15906         (java_init_lex): Rewritten.
15907         (java_sneak_unicode): Modified current unicode access in current line.
15908         (java_unget_unicode): Likewise.
15909         (java_allocate_new_line): New allocation management.
15910         (java_read_char): Modified access and storage of unget_utf8_value.
15911         New way of processing current unicode.
15912         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
15913         (java_get_unicode): Now use the parser context.
15914         (java_lineterminator): Likewise.
15915         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
15916         of the reentrant parser implementation. Function now use the
15917         parser context data structure and java_lval. Fixed production of
15918         the float and double constant "out of range" error message. Fixed
15919         obstack use. Return integer value when hitting a modifier. Now
15920         return type for TRUE, FALSE and other predefined types. Return
15921         identifier as a TREE_LIST list containing the current line context
15922         as the TREE_VALUE sub-node.
15923         (java_unicode_2_utf8): Fixed typo in declaration.
15924         (java_lex_error): Now use the parser context data structure.
15925         *lex.h: Added 1998 time stamp.
15926         (struct java_line): New fields ref_count and next.
15927         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15928         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
15929         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
15930         *parse.h: Added 1998 time stamp.
15931         (java_parse_source_file): Renamed from parse_source_file.
15932         (YYERROR_NOW, YYNOT_TWICE): Fixed.
15933         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
15934         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
15935         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
15936         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
15937         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
15938         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
15939         (struct parser_ctxt): New data structure to keep the parser context.
15940         *parse.y: Added 1998 time stamp, got rid of static global variables.
15941         (java_error_count, ctxp): New global variables.
15942         (%union): New value field.
15943         (numeric_type, integral_type): Rules removed.
15944         (primitive_type): Rule defined to handle integral, float, double and
15945         boolean types.
15946         (qualified_name, package_declaration,
15947         single_type_import_declaration, type_import_on_demand_declaration,
15948         modifiers, class_declaration, super, interfaces,
15949         interface_type_list, class_body, field_declaration,
15950         field_declaration, variable_declarators, variable_declarator,
15951         variable_declarator_id, method_declaration, method_header,
15952         formal_parameter_list, formal_parameter, method_body, block,
15953         static, interface_declaration, extends_interfaces,
15954         abstract_method_declaration, local_variable_declarators): Rules now
15955         define actions.
15956         (force_error, do_warning): New global statics.
15957         (push_parser_context, parser_context_save_global,
15958         parser_context_restore_global, pop_parser_context): New functions.
15959         (yyerror): Now uses the global parser context. Fixed use of obstack.
15960         (parse_error, parse_error_context, parse_warning_context,
15961         java_accstring_lookup, redefinition_error, check_modifiers,
15962         parser_add_interface, create_interface, create_class, find_field,
15963         duplicate_declaration_error, register_fields, method_header,
15964         check_modifiers_consistency, check_abstract_method_header,
15965         method_declarator, parser_qualified_classname,
15966         parser_check_super_interface, parser_check_super,
15967         parser_chain_incomplete_item, java_check_circular_reference,
15968         layout_class_from_source, java_complete_class,
15969         complete_method_decl, resolve_class, complete_class_report_errors,
15970         java_check_final, check_method_redefinition,
15971         java_check_regular_methods, java_check_abstract_methods,
15972         java_check_methods, lookup_java_interface_method2,
15973         lookup_java_method2, lookup_cl, find_name_in_single_imports,
15974         process_imports, find_in_imports, read_import_entry,
15975         read_import_dir, find_in_imports_on_demand,
15976         check_pkg_class_access, not_builtin_p, declare_local_variables,
15977         source_start_java_method, java_generate_parsed_class): New
15978         functions.
15979         *typeck.c: (signature_include_return): New global variable.
15980         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
15981         to add the function returned type in the signature.
15982
15983 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
15984
15985         * jcf-io.c (open_in_zip): Use strncmp and LEN.
15986
15987 1998-01-29  Dave Brolley  <brolley@cygnus.com>
15988
15989         * Make-lang.in (java.info): Added.
15990         (java.install-info): Added
15991
15992 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
15993
15994         * Makefile.in (clean): Also remove java/parse.c.
15995
15996 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
15997
15998         Add a pair of -fbounds-check/-fno-bounds-check options.
15999         * lang.c (lang_decode_option): Add code to grok arguments.
16000         (flag_bounds_check): Add decl.
16001         (lang_f_options): New array w/ the option in it.
16002         * java-tree.h (flag_bounds_check): Add decl.
16003         * lang-options.h: New file.
16004         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16005         of a static macro value.
16006         (JAVA_ARRAY_EXCEPTION): Delete macro.
16007
16008 1998-01-23  Per Bothner  <bothner@cygnus.com>
16009
16010         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
16011         * expr.c (build_anewarray):  Add missing promote_type.
16012
16013 1998-01-22  Per Bothner  <bothner@cygnus.com>
16014
16015         Add array types with known length to optimize bounds checking.
16016         * typeck.c (build_java_array_type):  Take length parameter.
16017         (java_array_type_length, build_prim_array_type):  New functions.
16018         * java-tree.h:  Update for new functions.
16019         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16020         * class.c:  Use build_prim_array_type.
16021         * expr.c (can_widen_reference_to):  Handle known-length array types.
16022         (verify_jvm_instructions):  Keep track of integer push instructions
16023         followed by newarray/anewarray, so we can build known-length arrays.
16024         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
16025         (java_array_data_offset):  New function.
16026         (build_java_array_length_access):  New function.  Optimize if constant.
16027         (build_java_arrayaccess):  Constant fold bounds check.
16028         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
16029         (build_newarray, build_anewarray):  New functions.
16030         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
16031         * verify.c (merge_types):  Handle known-lengh array types.
16032
16033 1998-01-19  Per Bothner  <bothner@cygnus.com>
16034
16035         * expr.c (expand_byte_code):  Fix performace bug, which caused
16036         searching linenumber_table to be linear rather than constant.
16037
16038 1997-12-12  Per Bothner  <bothner@cygnus.com>
16039
16040         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
16041
16042         * decl.c, java-tree.h (soft_fmod_node):  New global.
16043         * decl.c (init_decl_processing):  Define __builtin_fmod.
16044         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
16045         using __builtin_fmod.
16046
16047 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16048
16049         * keyword.h: New file, output of keyword.gperf as processed by
16050         gperf.
16051         * lex.c (java_lex_init): Initialize java_error_flag.
16052         * parse.c (YYERROR_NOW): Uses java_error_flag.
16053         * parse.y: New static java_error_flag. Useless definition of
16054         buffer_error gone.
16055         * parse.y (java_error): Portable error recovery using
16056         java_error_flag (not yet completely tuned).
16057
16058 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
16059
16060         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16061
16062 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16063
16064         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16065         (parse.c, lex.c, keyword.h): New rules for Java source code
16066         front-end.
16067         * parse.c: Renamed into jcf-parse.c.
16068         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16069         * keyword.gperf: New file, Java keywords.
16070         * parse.y: New file, Java language grammar.
16071         * parse.h: New file, Java language grammar definitions.
16072         * lex.c: New file, Java language lexer.
16073         * lex.h: New file, Java language lexer definitions.
16074
16075 1997-12-03  Per Bothner  <bothner@cygnus.com>
16076
16077         * decl.c (clinit_identifier_node), java-tree.h:  New global.
16078         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
16079         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
16080         * expr.c (expand_java_field_op):  Check for invalid assignment
16081         to final field.
16082
16083         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
16084
16085 1997-10-27  Per Bothner  <bothner@cygnus.com>
16086
16087         * verify.c (verify_jvm_instructions):  When processing a handler,
16088         attempt to set the current_subr to the right value.
16089         (More complicated code combines Sep 17 and Oct 22 versions.)
16090
16091 1997-10-24  Per Bothner  <bothner@cygnus.com>
16092
16093         * class.c (push_class):  Figure out (guess) name of source file.
16094         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
16095         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
16096         (parse_class_file):  Change return type from int to void.
16097         Call debug_start_source_file/debug_end_source_file.
16098
16099         * expr.c (build_java_binop):  Fix masking 2nd operand.
16100         * decl.c (init_decl_processing):  Set sizetype first.
16101
16102 1997-10-22  Per Bothner  <bothner@cygnus.com>
16103
16104         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
16105         (Revert Sep 17 change.)
16106
16107 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16108
16109         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16110         .class extension in their name and fix thing so we don't process
16111         them parse_zip_file_entries().
16112         (parse_zip_file_entries): Cleaned unused local variables.
16113
16114 1997-10-20  Per Bothner  <bothner@cygnus.com>
16115
16116         * expr.c (can_widen_reference_to):  Allows equal array element types.
16117         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
16118         * jcf-dump.c (RET):  Get (and print) index.
16119
16120         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16121         Promote element type to POINTER_TYPE.
16122
16123 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16124
16125         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16126         find_in_current_zip, jcf_figure_file_type): Moved from
16127         jcf-reader.c to parse.c.
16128         * zextract.c: (read_zip_archive): takes file_comment_length possible
16129         field into account.
16130
16131 1997-10-20  Per Bothner  <bothner@cygnus.com>
16132
16133         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
16134
16135         * verify.c (merge_types):  Handle array types even better ...
16136
16137 1997-10-17  Per Bothner  <bothner@cygnus.com>
16138
16139         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
16140
16141         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
16142         * class.c (make_class_data):  Don't build fields_decl if no fields.
16143         When building fields_decl, skip if DECL_ARTIFICIAL.
16144
16145         * expr.c (java_stack_swap):  Update stack_type_map.
16146         * verify.c (merge_types):  Handle array types better.
16147
16148 1997-10-15  Per Bothner  <bothner@cygnus.com>
16149
16150         * class.c (add_field):  Don't promote short integral fields to
16151         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16152         * expr.c (push_value):  Promote and convert short integral values.
16153
16154         * decl.c, java-tree.h (integer_two_node):  New constant node.
16155         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
16156
16157 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16158
16159         * class.c (append_gpp_mangled_type): Use function argument
16160         unpromoted type to generate mangled name.
16161
16162 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16163
16164         * constants.c (build_constant_data_ref): Now uses current_class
16165         instead of main_class.
16166         (build_constants_constructor): Now uses current_class instead of
16167         main_class.
16168         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16169         of the global variable SeepZipFiles done here.
16170         * zextract.c (read_zip_archive): extra_field optional field taken
16171         into account while computing the position of the class file in the
16172         archive.
16173         * verify.c (verify_jvm_instructions): Use current_jcf to search
16174         the constant pool.
16175         * parse.c (load_class): First search for the class to load in the
16176         current zip file. Saves current_jcf (restored before returning
16177         from that function). Don't call JCF_FINISH in the class was found
16178         in the current ZIP file.
16179         (jcf_parse): If the class was found in the current ZIP file, save
16180         its tree_constant_pool (for later reuse).
16181         (parse_class_file): New function. Process each method defined in
16182         the current class and record the class as to be later registered.
16183         (yyparse): Rewritten. Figure the type of the current file and switch
16184         accordingly.
16185         * lang.c: New global variable current_jcf.
16186         (lang_init): Removed compiling_from_source test (done later, in
16187         yyparse). Removed call the jcf_parse ().
16188         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16189         (typedef struct JCF): New fields seen_in_zip (to mark a class found
16190         in the current ZIP file) and zip_offset (offset to the class data in
16191         the current zip file).
16192         * jcf-reader.c: zipfile.h included.
16193         localToFile: New ZipFileCache static global variable
16194         (parse_zip_file_entries): New function. Browse the current ZIP
16195         file directory and process each class found.
16196         (process_zip_dir): New function. Register each class found in the
16197         ZIP file directory. The class aren't parsed but a valid JCF is
16198         link to each of them.
16199         (find_in_current_zip): New function. Search for a class in the
16200         current ZIP file directory. If found, prepare the class so that it
16201         can be loaded.
16202         (jcf_figure_file_type): New function. Examine the file structure
16203         to figure a class file, a ZIP file. If none of these categories are
16204         matched, a source file is assumed.
16205         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16206         SeenZipFile: New global variable.
16207         (open_in_zip): Use zipmember's length to accelerate the search for
16208         a member. If zipmember was NULL and zip file successfully read,
16209         return 0.
16210         * java-tree.h: New global variable current_jcf declared.  Added
16211         declaration for current_constant_pool_tags, current_constant_pool_data,
16212         current_constant_pool_length, current_constant_pool_data_ref.
16213         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16214         store the JCF of classes seen in a zip file) and tree *constant_pool
16215         (to save a loaded class constant pool). current_class declared here.
16216         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16217         retrieve method_ref_constant.
16218         (PUSHC): java_push_constant_from_pool now uses current_jcf.
16219         (OBJECT): get_class_constant now uses current_jcf.
16220         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16221         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16222         (expand_invoke): Now uses current_class instead of main_class
16223         (build_class_init): Now uses current_class instead of main_class
16224         * class.c: New static global variable registered_class.
16225         (register_class): New function.
16226         (emit_register_class): Modified to use registered_class instead of
16227         main_class
16228         (is_compiled_class): Now take into account class seen in the archive.
16229
16230 1997-10-06  Per Bothner  <bothner@cygnus.com>
16231
16232         * except.h:  Renamed to: java-except.h.
16233         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
16234         * except.c:  Add semi-working (commented out) implementation.
16235
16236         * expr.c (expand_iinc):  Add needed flush_quick_stack.
16237         * parse.c (set_source_filename):  New function.
16238         (give_name_to_class):  Set input_filename from package.classname.java.
16239
16240         * jcf-io.c (find_class):  Don't look first in ".".
16241
16242 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16243
16244         * zextract.c (read_zip_archive): Now takes into account the
16245         extra_field field.
16246         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16247
16248 1997-09-20  Per Bothner  <bothner@cygnus.com>
16249
16250         * constants.c, java-tree.h (build_internal_class_name):  New function.
16251         (alloc_class_constant):  Re-implement using build_internal_class_name.
16252         * class.c (make_class_data):  Likewise.
16253         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
16254
16255 1997-09-17  Per Bothner  <bothner@cygnus.com>
16256
16257         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
16258         to NULL before pushing an exception handler target.
16259
16260         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
16261         (java_stack_swap, java_stack_dup):  Re-write to be safe from
16262         clobbering registers.
16263         (build_class_init):  New function.
16264
16265 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16266
16267         * typeck.c (build_java_array_type): Temporary use
16268         permanent_obstack to create the array 'length' field.
16269         * expr.c (lookup_label): Temporay use permanent_obstack to create
16270         label if not found.
16271         * class.c (push_super_field): Tempory use permanent_obstack.
16272
16273 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16274
16275         * typeck.c (type_for_mode): Now handles double_type_node and
16276         float_type_node.
16277         * verify.c (verify_jvm_instructions): The instruction following
16278         the wide bytecode is checked. OPCODE_ret added to the list of
16279         wide.
16280
16281 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16282
16283         * class.c (make_class): Temporary use permanent_obstack. Set the
16284         class CLASS_P field to 1.
16285         (push_class): Temporary use permanent_obstack.
16286         (set_super_info): Temporary use permanent_obstack.
16287         (add_method): Temporary use permanent_obstack, set
16288         METHOD_TRANSIENT().
16289         (add_field): Temporary use permanent_obstack. Sets
16290         FIELD_VOLATILE() and FIELD_TRANSIENT().
16291         (build_class_ref): Temporary use permanent_obstack if the class
16292         isn't compiled.
16293         (build_static_field_ref): Temporary use permanent_obstack when
16294         creating field's rtl.
16295         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16296         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16297         and fields. Function finalized, as far as flag handling.
16298         (push_class_static_dummy_field): Temporary use permanent_obstack.
16299         (emit_register_class): Force generation of class registration at
16300         -O3 or deeper.
16301         * decl.c (end_java_method): Call permanent_allocation() before
16302         returning.
16303         * expr.c (can_widen_reference_to): Added comment to interface
16304         handling, fixed typo.
16305         (lookup_field): Now uses CLASS_P() to correct FIXME
16306         (expand_invoke): Verification on public && !static &&
16307         !abstract moved into soft_lookupinterfacemethod (kaffe).
16308         Use Object class dtable if objectref is an array when expanding
16309         invokeinterface.
16310         (java_push_constant_from_pool): Temporary use permanent_obstack
16311         for CONSTANT_string
16312         * parse.c (get_ref_constant): Temporary use permanent_obstack to
16313         create constant references.
16314         (get_constant): Temporary use permanent_obstack to create constant.
16315         (load_class): Temporary use permanent_obstack to load class.
16316         (jcf_parse): Temporary use permanent_obstack to perform class
16317         layout.
16318         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16319         (build_java_signature): Temporary use permanent_obstack.
16320         * verify.c: (verify_jvm_instruction): removed unnecessary verification
16321         on ACC_SUPER flag.
16322         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16323         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16324         (CLASS_P): Defined
16325
16326 1997-09-11  Per Bothner  <bothner@cygnus.com>
16327
16328         * class.c (append_gpp_mangled_type):  Fix typo.
16329         (emit_register_class):  Use main_class to get class object, rather
16330         than looking for no-longer-existing static decl starting with _CL.
16331         * typeck.c (parse_signature_type):  Promote array element type
16332         if it is a RECORD_TYPE.
16333
16334 1997-09-10  Per Bothner  <bothner@cygnus.com>
16335
16336         * class.c (push_class_static_dummy_field):  New function.
16337         (mangle_static_field):  New. Do G++-style mangling of static fields.
16338         (layout_class):  Mandle static fields here, not in add_field.
16339         (build_class_ref):  The class object is now a dummy static field.
16340         * decl.c (find_local_variable):  Look for best, instead of first match.
16341         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
16342         (build_java_athrow):  Don't check here if exception is Throwable.
16343         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
16344         (TYPE_USED):  Removed.  No longer used ...
16345         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
16346         * verify.c (push_pending_label):  New function.
16347         (push_pending_block):  Renamed to check_pending_block.
16348         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
16349         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
16350         re-checking possible handlers) after a store (less wasted work).
16351         Check for null handler (finally) before calling add_handler.
16352         Various changes to (finally?) correctly handle try/finally.
16353
16354 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16355
16356         * class.c: Include stdio.h.
16357
16358 1997-09-04  Per Bothner  <bothner@cygnus.com>
16359
16360         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16361         to make sure class is initialized before static/special invoke.
16362
16363         * verify.c (verify_jvm_instructions):  On a store instruction,
16364         call find_local_variable to force pre-allocation of decl and rtx.
16365         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
16366
16367 1997-09-03  Per Bothner  <bothner@cygnus.com>
16368
16369         * class.c (build_class_ref):   Strip off "promoted_" if need be.
16370         (make_field_value): Call build_java_signature when needed.
16371         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
16372         * expr.c (build_java_athrow):  Don't push_value of exception.
16373         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16374         match specification of [fd]cmp[lg] for NaNs.
16375         (expand_byte_code):  Add support for exception handler ranges.
16376         * except.c:  Add skeleton for EH code-generation.
16377         * verify.c (merge_types):  Treat all promoted integral types as equal.
16378         * constants.c (build_constants_constructor):  To force creation of
16379         current_constant_pool_data_ref, call build_constant_data_ref.
16380
16381         * javaop.def (lload):  Fix typo.
16382         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
16383
16384 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
16385
16386         * parse.c: Don't include function.h.
16387
16388 1997-08-27  Per Bothner  <bothner@cygnus.com>
16389
16390         * except.[ch]:  New files.
16391         * Makefile.in (JAVA_OBJS):  Add except.o
16392         * expr.c:  Temporary warning about unimplemented exceptions.
16393         * verify.c:  Verify exception handlers.
16394
16395         * jcf-dump.c (disassemble_method):  Print exception table.
16396
16397 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16398
16399         * expr.c (verify_jvm_instructions): Started a thorough
16400         verification of invoke* bytecodes.
16401         (expand_byte_code): flush quick stack if PC is the target of a
16402         branch.  and undef RET (conflicting with config/i386/i386.h).
16403         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16404         used.
16405         (expand_invoke): Now handles invokeinterface and do more
16406         verification according to the bytecode.
16407         (lookup_field): Don't try to load the class if processing
16408         dtable_type.
16409         (can_widen_reference_to): Now handles interfaces.
16410         * decl.c (init_decl_processing): New global variable
16411         soft_lookupinterfacemethod_node, declared in java-tree.h.
16412         Call set_super_info on string_type_node.
16413         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16414         defined.
16415         * class.c (set_super_info): Fills the CLASS_* flags according to
16416         access_flags.
16417         (get_access_flags_from_decl): Handles all class flags.
16418
16419 1997-08-26  Per Bothner  <bothner@cygnus.com>
16420
16421         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
16422         * parse.c (yyparse):  Check for abstract method, and missing code.
16423         * expr.c (expand_byte_code):  Change interface.
16424         * lang.c (put_decl_node):  Print promoted types prettier.
16425         * verify.c (verify_jvm_instruction):  Change interface.
16426         Partial support for scanning exception table.
16427         For load instructions, handle promoted integral types.
16428
16429 1997-08-21  Per Bothner  <bothner@cygnus.com>
16430
16431         * verify.c:  New file, with contents moved from expr.c.
16432         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
16433         * typeck.c (is_array_type_p):  Moved here from expr.c.
16434         * java-tree.h:  Add some now-needed function declarations.
16435         * Makefile.in (JAVA_OBJS): Added verify.o.
16436
16437 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16438
16439         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16440         METHOD_ABSTRACT flag.
16441
16442         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16443         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16444         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16445
16446         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16447         variables.
16448         (start_java_method): Hook for SYNCHRONIZED methods.
16449
16450         * expr.c (build_java_jsr, build_java_ret): New functions
16451         (JSR,PRE): New macros
16452         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16453         (verify_jvm_instructions): tableswitch, lookupswitch,
16454         monitorenter, monitorexit, goto_w: verified.
16455         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16456         (build_java_monitor): New function.
16457         (MONITOR_OPERATION): Modified to call build_java_monitor()
16458         (verify_jvm_instructions): Started a thorough verification of
16459         invoke* bytecodes.
16460
16461 1997-08-19  Per Bothner  <bothner@cygnus.com>
16462
16463         Support verification of jsr/ret subroutines (used for try/finally).
16464         * decl.c (return_address_type_node):  New type node.
16465         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16466         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16467         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
16468         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16469         TYPE_USED):  New macros for special types in type_map.
16470
16471         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
16472         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
16473         BCODE_JUMP_TARGET.
16474         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
16475
16476         * expr.c (can_widen_reference_to):  New function.
16477         (pop_type):  Use it.
16478         (merge_type_state):  Support handling start of subroutine.
16479         (push_pending_block):  Return char* error message, instead of calling
16480         fatal on an error.  Also handle subroutines.
16481         (verify_jvm_instructions):  Handle errors from push_poending_block.
16482         Support jsr and ret instructions.
16483
16484 1997-08-19  Per Bothner  <bothner@cygnus.com>
16485
16486         * jcf-io.c (find_classfile):  Fix thinko.
16487         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
16488
16489 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
16490
16491         * Makefile.in (BISON): Remove.
16492
16493 1997-08-07  Per Bothner  <bothner@cygnus.com>
16494
16495         * Makefile.in:  Convert to autoconf.
16496         * config-lang.in (outputs):  Added java/Makefile.
16497
16498         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16499         Rename cc1java to jc1.
16500
16501         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
16502         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
16503
16504         * class.c (class_depth):  Do load_class if needed.
16505
16506         Mostly better verification.
16507         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
16508         (init_decl_processing):  Change return type of soft_checkcast.
16509         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
16510         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16511         lang_print_error):  New functions.
16512         (lang_init):  Set global hook print_error_function to lang_print_error.
16513         * expr.c:  In the type_map ptr_type_node is only used for null now.
16514         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
16515         (merge_types):  Dererence pointer to record types before comparing.
16516         (decode_newarray_type, merge_types):  On error just return NULL.
16517         (build_java_binop):  Add preliminary implementation (with warning)
16518         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16519         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
16520         (expand_compare, expand_java_goto, expand_java_call):  Don't
16521         push_pending_block, since that only makes sense when verifying.
16522         (merge_type_state):  Different return codes.
16523         (push_pending_block):  A block may need to be verified more than once.
16524         (expand_byte_code):  Warn about unused code at code generation time.
16525         (verify_jvm_instruction):  Changed logic, since code may need to be
16526         re-verified if type-state has changed.  Also, better error handling.
16527         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16528         Improve newarray, anewarray, ?aload, athrow,
16529         * java-tree.h (LABEL_CHANGED):  New macro.
16530
16531 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16532
16533         * decl.c (soft_athrow_node): New global variable initialized.
16534         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16535         * typeck.c (convert): Added support for REAL_TYPE.
16536         (convert_to_char): New function.
16537         (convert): Handle CHAR_TYPE.
16538         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16539         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16540         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16541         promoted type.
16542         (verify_jvm_instructions): Added break a the end of bogus unop: label.
16543         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16544         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16545         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16546         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16547         to Use The Right Things.
16548         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16549         compatible with INT. BOOLEAN is made equivalent to BYTE.
16550         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16551         OPCODE_ifnonnull): Now supported.
16552         (build_java_athrow): New function.
16553
16554 1997-08-04  Per Bothner  <bothner@cygnus.com>
16555
16556         Rename method name <init> to match G++ (and fix mangling).
16557         * class.c (layout_class):  Replace method name of <init> by class name.
16558         (make_method_value):  Do inverse renaming of constructor from <init>.
16559         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
16560         * typeck.c (lookup_java_constructor):  New function.
16561         * expr.c (expand_invoke):  If method_name is <init>, call
16562         lookup_java_constructor to find constructor.
16563
16564         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
16565
16566 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16567
16568         * parse.c (get_class_constant): Modified to handle array "classes"
16569         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16570         wide type.
16571         (convert): Modified to handle real type.
16572         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16573         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16574         variables declared.
16575         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16576         soft_multianewarray, soft_newarray_node, soft_throw_node): New
16577         global variables initialized.
16578         (find_local_variable): Handles the case of a pointer
16579         (end_java_method): Restore the use of one more scope
16580         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16581         build_java_array_length_access, expand_java_arrayload,
16582         expand_java_arraystore, expand_java_array_length,
16583         expand_java_multianewarray, expand_java_anewarray,
16584         build_java_check_indexed_type, is_array_type_p,
16585         build_java_throw_out_of_bound_exception): New functions.
16586         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16587         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16588         OPCODE_<t>aload): Implemented code for verification.
16589         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16590         ARRAY_NEW_MULTI): Macro defined.
16591         (CONVERT): Modified to invoke convert().
16592         (case OPCODE_aload2): Fixed index typo from 2 to 1.
16593
16594 1997-07-31  Per Bothner  <bothner@cygnus.com>
16595
16596         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
16597         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
16598         (make_class_data):  Field name needs '/' as package prefix.
16599         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
16600
16601 1997-07-25  Per Bothner  <bothner@cygnus.com>
16602
16603         Implement debug information for local variables.
16604         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16605         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16606         DECL_LOCAL_SLOT_CHAIN):  New macros.
16607         (struct lang_decl_var):  New type.
16608         * parse.c (give_name_to_locals):  Move to decl.c.
16609         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
16610         (start_java_method):  Re-write parameter handling.
16611         (pending_local_decls):  New global variable.
16612         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
16613         (find_local_variable):  Accept pc so we can skips decls not in range.
16614         (struct binding_level):  Add end_pc field.
16615         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16616         (various):  Change so current pc gets passed to find_local_variable.
16617
16618         * decl.c (init_decl_processing):  Re-arrange fields in
16619         class_type_node and and method_type_node to match kaffe 0.9.1.
16620         * class.c (make_method_value, make_class_data):  Update
16621         initializations to match.
16622
16623 1997-07-16  Per Bothner  <bothner@cygnus.com>
16624
16625         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16626         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
16627         (push_super_field):  New function.
16628         (make_class_data):  Handle inheritance of class static initializer.
16629         (layout_class):  New name mangling.
16630         * constants.c (build_constant_data_ref):  Init type of data array
16631         to a one-element array.
16632         (build_constants_constructor):  Set DECL_SIZE from complete array type.
16633         * decl.c:  Rename class_type, object_type etc to class_type_node,
16634         object_type_node etc.  Make former inherit from latter.
16635         * expr.c (expand_invoke):  Add cast of function address.
16636         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
16637         * parse.c (yyparse):  Don't call layout_class here.
16638         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
16639
16640 1997-06-14  Per Bothner  <bothner@cygnus.com>
16641
16642         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
16643         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
16644         (alloc_class_constant):  New.
16645         * expr.c (expand_invoke):  Make sure method's class is initialized.
16646         * class.c (interits_from_p, emit_register_class):  New functions.
16647         * parse.c (yyparse):  Call emit_register_class.
16648
16649 1997-06-09  Per Bothner  <bothner@cygnus.com>
16650
16651         * constants.c:  New file, to handle constant pool.
16652         * Makefile.in (JAVA_OBJS):  Add constants.o.
16653         * decl.c (init_decl_processing):  Update, fix, finish various structs.
16654         (pushdecl_top_level):  New.
16655         * parse.c (layout_class):  Moved to class.c.
16656         * expr.c (java_push_constant_from_pool):  New function.
16657         * class.c (build_class_ref):  Make work fully
16658         (make_class_data):  Emit super-class, constant pool, interface vector.
16659
16660 1997-06-03  Per Bothner  <bothner@cygnus.com>
16661
16662         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
16663         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
16664         * class.c (class_depth):  New function.
16665         (lookup_named_class):  Replaced by new function lookup_class.
16666         * decl.c (object_type_node, string_type_node):  New.
16667         Remove various types that we no longer need.
16668         * expr.c (verify_jvm_instructions):  New separate verifier pass.
16669         (push_type, pop_type):  New functions for verifier.
16670         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
16671         (expand_byte_code):  Simplify, since we assume already verified.
16672         (expand_invoke):  Now mostly works.
16673         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16674         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
16675         * parse.c:  Wait to allocate class object until we know its name.
16676         (layout_class):  Calculate DECL_VINDEX for each virtual method.
16677         * typeck.c (get_array_type):  Rename to ...
16678         (build_java_array_type):  ... and provide working implementation.
16679         (build_java_signature):  New function - build Java signature of type.
16680         (set_java_signature):  New function - cache signature with type.
16681         (lookup_java_method):  New function.
16682
16683 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
16684
16685         * class.c (ident_subst):  Take extra SUFFIX parameter.
16686         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
16687         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
16688         (build_class_ref):  Actually implement.
16689         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
16690         * decl.c (builtin_function):  New.
16691         (init_decl_processing):  Update for current Kaffe.  Declare some
16692         builtin Kaffe functions.
16693         * expr.c (build_address_of):  New.
16694         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
16695         Renamed (from expand_java_new etc), and added working implementations.
16696         (build_field_ref):  Now also handle static fields.
16697         (expand_invoke):  Implement invokestatic, and start implement rest.
16698         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
16699         * javaop.def:  Rename invokevirt -> invokevirtual.
16700         * lang.c (use_handles):  Removed.
16701         * parse.c:  Add support for ConstantValue attribute.
16702         Handle nested loading of a class.  (JPOOL_UTF):  New.
16703
16704 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
16705
16706         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
16707
16708 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
16709
16710         * Make-lang.in (java.install-man):  New empty rule.
16711         * typeck.c (set_local_type):  New function.
16712         * expr.c (STORE_INTERNAL):  Call find_local_variable,
16713         not find_stack_slot.  Call set_local_type.
16714
16715 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
16716
16717         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
16718         and building RECORD_TYPE CONSTRUCTORs.
16719         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
16720
16721         * lang.c (use_handles):  Change the default to 0.
16722         * decl.c:  Define and build class_type, field_type, utf8const_type.
16723         * class.c (make_class_data, make_field_value,
16724         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
16725         hashUtf8String, strLengthUtf8, mangled_classname:
16726         Functions to build reflective data structures.
16727         * parse.c (yyparse):  Call make_class_data.
16728
16729         * jcf-io.c (open_class, find_classfile):  New functions.
16730         * jcf-dump.c:  Support reading classfile from explicitly-named
16731         class file (without CLASSPATH searching).
16732
16733 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16734
16735         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
16736         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
16737         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
16738         (get_constant):  Now trivial for CONSTANT_Utf8.
16739
16740         * jcf.h:  Make NEW_CPOOL the default.
16741         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
16742
16743 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16744
16745         New directory.