OSDN Git Service

fe7a4dcf623f6e1a15e11d8fe6b968a1da05d8d8
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2
3         PR java/16474
4         gjavah.c (print_field_info): Emit constant only if field is static.
5
6 2004-07-11  Roger Sayle  <roger@eyesopen.com>
7
8         * expr.c (java_truthvalue_conversion, flush_quick_stack,
9         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
10         build_java_ret, build_java_throw_out_of_bounds_exception,
11         build_java_array_length_access, java_check_reference,
12         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
13         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
14         expand_java_arrayload, build_java_monitor, expand_java_return,
15         expand_load_internal, expand_java_NEW, build_get_class,
16         build_instanceof, expand_java_CHECKCAST, expand_iinc,
17         build_java_soft_divmod, build_java_binop, build_field_ref,
18         expand_compare, expand_java_goto, expand_java_switch,
19         expand_java_add_case, build_class_init, build_known_method_ref,
20         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
21         expand_invoke, build_jni_stub, expand_java_field_op,
22         java_expand_expr, expand_byte_code, STORE_INTERNAL,
23         force_evaluation_order, emit_init_test_initialization): Convert
24         calls to "build" into calls to the prefered "buildN" functions.
25
26 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
27
28         * java-tree.h (set_block): Remove.
29         * lang.c (java_clear_binding_stack): New.
30         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
31         * decl.c (struct binding_level): Remove this_block.
32         (clear_binding_level): Likewise.
33         (poplevel): Don't handle this_block.
34         (set_block): Remove.
35
36 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
37
38         * class.c (common_enclosing_context_p): Remove statement with no
39         side-effects.
40
41 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
42
43         PR java/8618
44         * parse.y (create_anonymous_class): Remove 'location' argument. Use
45         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
46         (craft_constructor): Inherit access flags for implicit constructor
47         from the enclosing class.
48         (create_class): Fix comment typo.
49         (resolve_qualified_expression_name): Pass type of qualifier to
50         not_accessible_p, not the type in which target field was found.
51         (not_accessible_p): Handle inner classes. Expand protected 
52         qualifier-subtype check to enclosing instances, but don't apply this 
53         check to static members. Allow protected access to inner classes
54         of a subtype. Allow private access within common enclosing context.
55         (build_super_invocation): Get WFL line number info from current
56         class decl.
57         (build_incomplete_class_ref): Update for new create_anonymous_class
58         signature.
59         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
60         common_enclosing_instance_p.
61         * class.c (common_enclosing_context_p): New. Determine if types
62         share a common enclosing context, even across static contexts.
63         (common_enclosing_instance_p): Renamed from 
64         common_enclosing_context_p. Determines if types share a common
65         non-static enclosing instance.
66         * java-tree.h (common_enclosing_instance_p): Declare.
67         * jcf-write.c (get_method_access_flags): New. Surpress private flag
68         for inner class constructors.
69         (generate_classfile): Use get_method_access_flags.
70
71 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
72
73         * class.c (interface_of_p): Check for null TYPE_BINFO.
74
75 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
76
77         * class.c (make_class): Do not create binfo here.
78         (set_super_info): Create it here.
79         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
80
81 2004-07-08  Richard Henderson  <rth@redhat.com>
82
83         * expr.c (case_identity, get_primitive_array_vtable,
84         java_expand_expr, emit_init_test_initialization): Remove.
85         * java-tree.h (java_expand_expr): Remove.
86         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
87
88 2004-07-07  Per Bothner  <per@bothner.com>
89
90         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
91         get internal error due to mismatched types.
92
93         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
94
95         * gcj.texi (Linking):   New node.  Document -lgij usage.
96
97 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
98
99         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
100         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
101         * java/class.c (set_super_info, class_depth, interface_of_p,
102         maybe_add_interface, add_interface, make_class_data,
103         layout_class, add_miranda_methods): Adjust BINFO macros.
104         * expr.c (can_widen_reference_to, lookup_field): Likewise.
105         * jcf-write.c (generate_classfile): Likewise.
106         * parse.y (patch_anonymous_class,
107         check_inner_circular_reference, check_circular_reference,
108         java_complete_class, check_abstract_method_definitions,
109         java_check_abstract_method_definitions,
110         check_interface_throws_clauses, java_check_abstract_methods,
111         lookup_java_interface_method2,
112         find_applicable_accessible_methods_list): Likewise.
113         * typeck.c (find_method_in_interface): Likewise.
114         * verify.c (merge_types): Likewise.
115
116 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
117
118         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
119         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
120
121 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
122
123         * class.c (make_class): Use make_tree_binfo.
124         (set_super_info, add_interface_do): Likewise.
125         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
126
127 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
128
129         * verify.c: Correct array element access formatting thinko.
130
131 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
132
133         * verify.c: Insert a short blurb at the start referring to the JVMS.
134         (merge_type_state): Remove redundant nested if statement.
135         (verify_jvm_instructions): Ensure current_subr is initialised to
136         NULL_TREE.
137         Minor formatting fixes all over the place.
138
139 2004-07-02  Richard Henderson  <rth@redhat.com>
140
141         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
142
143 2004-07-01  Richard Henderson  <rth@redhat.com>
144
145         * class.c (registerClass_libfunc): Remove.
146         (init_class_processing): Don't set it.
147         (emit_register_classes): Take list_p parameter.  Fill it in
148         with _Jv_RegisterClass calls.
149         * decl.c (java_init_decl_processing): Don't call
150         init_resource_processing.
151         * jcf-parse.c (java_emit_static_constructor): New.
152         (java_parse_file): Call it.
153         * resource.c (registerResource_libfunc): Remove.
154         (init_resource_processing): Remove.
155         (write_resource_constructor): Take list_p parameter.  Fill it in
156         with _Jv_RegisterResource calls.
157         * java-tree.h: Update prototypes.
158
159 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
160
161         PR java/1262
162         * class.c (layout_class_method): Do not override package-private
163         method if its in a different package.
164         (split_qualified_name): Move here from parse.y. Rename from
165         breakdown_qualified. Add comment.
166         (in_same_package): Move here from parse.y. Add comment.
167         * java-tree.h (break_down_qualified, in_same_package): Declare.
168         (in_same_package): Likewise.
169         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
170         Callers updated.
171
172 2004-06-29  Andrew Haley  <aph@redhat.com>
173
174         * except.c (expand_start_java_handler): Push a new binding level.
175         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
176         register_exception_range() to register where we'll do it.
177         (expand_end_java_handler): Remove old bogus code.  Replace with
178         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
179         the top of the expression we're curently building.
180         (maybe_end_try): Delete.
181         * decl.c (binding_level.exception_range): New field.
182         (clear_binding_level): Add field exception_range.  Reformat.
183         (poplevel): Call expand_end_java_handler().
184         (poplevel): Call java_add_stmt only if functionbody is false.
185         (maybe_poplevels): Don't call maybe_end_try() from here.
186         (end_java_method): Clear no longer used trees in function decl.
187         (register_exception_range): New function.
188         * java-tree.h (register_exception_range, struct eh_range): Declare.
189
190 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
191
192         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
193
194 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
195
196         Formatting fixes.
197         * expr.c (class_has_finalize_method): Fix method name indentation.
198         (expand_java_call): Remove K&R style parameter declaration.
199         (expand_invoke): Fix statement indentation.
200         (expand_java_field_op): Likewise.
201         * parse-scan.y: Fix typo.
202         (reset_report): Fix method name indentation.
203         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
204         line. Fix typos.
205         * verify.c (verify_jvm_instructions): Document parameters, insert
206         page break.
207         * lang.c (lang_init_source): Fix method name indentation.
208         * class.c (common_enclosing_context_p): Likewise.
209         (emit_symbol_table): Fix parameter list indentation.
210         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
211         parameter declaration.
212         * constants.c: Fix copyright notice indentation.
213         * typeck.c (find_method_in_superclasses): Fix parameter list
214         indentation.
215         (find_method_in_interfaces): Likewise.
216         * zextract.c (makelong): Fix method name indentation.
217
218 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
219
220         PR java/15715.
221         * parse.y (create_interface): Set correct access modifiers for
222         interfaces.
223         * jcf-write.c (get_classfile_modifiers): New function.
224         (generate_classfile): Use get_classfile_modifiers, not 
225         get_access_flags.
226
227 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
228
229         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
230         dependency to current parser context, not NULL_TREE, for top-level
231         classes.
232         (jdep_resolve_class): Enable member access check for all inner
233         class dependencies.
234
235 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
236
237         * parse.y (qualify_and_find): Pass type decl, not identifier, to 
238         load_class.
239
240 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
241
242         PR java/15734
243         * expr.c (expand_java_field_op): Ensure that target class for static
244         field access has been loaded.
245
246 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
247             Ranjit Mathew  <rmathew@hotmail.com>
248
249         PR java/1207, java/16178
250         * jcf-parse.c (load_class): Return immediately if passed a type decl
251         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
252         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
253         before calling load_class.
254         (qualify_and_find): Likewise.
255         (find_in_imports_on_demand): Likewise.
256         (find_applicable_accessible_methods_list): Likewise.
257
258 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
259
260         * parse.y (java_layout_seen_class_methods): Don't call load_class
261         on class defined by source parser.
262
263 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
264
265         * parse.y (set_nested_class_simple_name_value): Removed.
266         (java_complete_expand_class): Remove calls to
267         set_nested_class_simple_name_value.
268
269 2004-06-22  Andrew Haley  <aph@redhat.com>
270             Ranjit Mathew  <rmathew@hotmail.com>
271         
272         Fixes PR java/16113.
273         * decl.c (force_poplevels): Remove call to expand_end_bindings.
274
275 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
276
277         * parse.y (create_class): Correct diagnostic message about
278         java.lang.Object extending anything else.
279
280 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
281
282         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
283         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
284         * constants.c (build_ref_from_constant_pool): Likewise.
285         * expr.c (build_java_array_length_access): Likewise.
286         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
287         (invoke_build_dtable, build_invokevirtual): Likewise.
288         (build_invokeinterface, java_expand_expr): Likewise.
289         (emit_init_test_initialization): Likewise.
290         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
291         * parse.y (make_qualifed_name, build_array_ref): Likewise.
292         
293 2004-06-21  Andrew Haley  <aph@redhat.com>
294
295         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
296         block.
297
298 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
299
300         * jcf.h (struct JCF): Change java_source, right_zip and finished
301         to unsigned int.
302         * lex.h (struct java_lexer): Change hit_eof, read_anything,
303         byte_swap and use_fallback to unsigned int.
304         * parse.h (struct _jdep): Change flag0 to unsigned int.
305
306 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
307
308         Fixes PR java/13948
309         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
310         before trying to lay out its methods.
311         * jcf-parse.c (read_class): Track parsed files using canonical paths
312         obtained via lrealpath from libiberty.
313         (java_parse_file): Likewise.
314         (parse_source_file_1): Rename formal parameter to reflect its
315         modified purpose. Minor formatting fix.
316
317 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
318
319         * class.c (emit_register_classes): Make the function uninlinable,
320         do not set current_function_cannot_inline.
321         * resource.c (write_resource_constructor): Do not reset
322         flag_inline_functions around rest_of_compilation.
323         
324 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
325
326         PR java/15769
327         * expr.c (java_truthvalue_conversion): Handle
328         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
329         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
330         i.e. return the expression.
331
332 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
333
334         * gjavah.c: Include version.h
335
336 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
337
338         * jcf-write.c (generate_bytecode_conditional): Correct handling
339         of unordered conditionals. Add comment.
340
341 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
342             Per Bothner  <per@bothner.com>
343
344         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
345         local variable was initialised upon declaration.
346         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
347         variable was final and initialised upon declaration.
348         * check-init.c (check_final_reassigned): Give error only if a blank
349         final is not definitely unassigned or if an initialised final is
350         reassigned.
351         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
352         assignment expressions. Remove case MODIFY_EXPR, label do_default.
353         (check_init): Perform initialised-variable-removing-optimisation
354         only on non-final local variables.
355
356 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
357
358         * jcf-write.c (generate_bytecode_conditional): Handle binops 
359         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, 
360         and LTGT_EXPR.
361         (generate_bytecode_insns): Likewise.
362
363 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
364
365         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
366         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
367
368 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
369
370         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
371         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
372
373 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
374
375         * decl.c (struct binding_level): Add GTY marker. Compile
376         binding_depth unconditionally.
377         (current_binding_level, free_binding_level, global_binding_level):
378         Likewise.
379         (clear_binding_level): Unconditionally set binding_depth.
380         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
381
382 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
383
384         * lex.c (java_new_lexer): Set 'encoding'.
385         (java_read_char): Improve error message for unrecognized characters.
386         * lex.h (struct java_lexer): New field 'encoding'.
387
388 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
389
390         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
391
392 2004-05-21  Mark Wielaard  <mark@klomp.org>
393
394         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
395         extern.
396
397 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
398
399         * typeck.c: Remove non-printable character 160.
400
401 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
402
403         * check-init.c: Correct minor typos.
404
405 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
406
407         * Make-lang.in, expr.c, java-gimplify.c: Rename
408         tree-simple.[ch] to tree-gimple.[ch].
409
410 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
411
412         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
413
414 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
415
416         Merge from tree-ssa-20020619-branch.  See
417         ChangeLog.tree-ssa for details.
418
419         * Make-lang.in, builtins.c, check-init.c, class.c,
420         constants.c, decl.c, except.c, expr.c, java-except.h,
421         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
422         lang.c, lang.opt, parse.y, resource.c: Merged.
423         * java-gimplify.c: New file.
424
425 2004-05-10  Andrew Haley  <aph@redhat.com>
426
427         * parse.y (create_class): Set TYPE_VFIELD.
428         * decl.c (java_init_decl_processing): Likewise.
429
430         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
431         * class.c (make_method_value): Replace DECL_VINDEX with call to
432         get_method_index().
433         (get_dispatch_vector): Likewise.
434         (layout_class_method): Likewise.
435         Replace set of DECL_VINDEX with call to set_method_index().
436         (set_method_index): New function.
437         (get_method_index): New function.
438         * java-tree.h (set_method_index): New function decl.
439         (get_method_index): New function decl.
440
441 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
442
443         * parse.y (check_pkg_class_access): Add new argument
444         and use it when cl is NULL to call lookup_cl on it.
445         (parser_check_super_interface): Do not call lookup_cl.
446         Pass this_decl to check_pkg_class_access and NULL
447         instead of lookup_cl.
448         (parser_check_super): Update for change in
449         check_pkg_class_access.
450         (do_resolve_class): Likewise.
451         (process_imports): Likewise.
452         (find_in_imports_on_demand): Likewise.
453         (resolve_qualified_expression_name): Likewise.
454
455 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
456
457         Fixes PR java/9685, PR java/15073
458         * parse.y (accessibility_string): New method.
459         (not_accessible_field_error): Use accessibility_string()
460         instead of java_accstring_lookup().
461         (resolve_qualified_expression_name): Check with
462         check_pkg_class_access() before allowing access using
463         qualified names.
464         Fix comment typo.
465         Use check_pkg_class_access() instead of not_accessible_p()
466         for unqualified types.
467         (not_accessible_p): Use DECL_CONTEXT (member) instead of 
468         REFERENCE for package-private access checking.
469         (patch_method_invocation): Use accessibility_string() instead
470         of java_accstring_lookup().
471
472 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
473
474         Fixes PR java/15133
475         * gjavah.c (struct method_name): Add member is_native.
476         (overloaded_jni_method_exists_p): Match candidate method only if
477         it is native.
478         (print_method_info): Initialise is_native flag from the method's
479         access flags.
480
481 2004-04-30  Roger Sayle  <roger@eyesopen.com>
482
483         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
484         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
485
486 2004-04-22  Roger Sayle  <roger@eyesopen.com>
487
488         * resource.c (write_resource_constructor): Guard call to possibly
489         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
490
491 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
492
493         * class.c (make_class_data): Add new field aux_info.
494         * decl.c (java_init_decl_processing): Push type and decl for 
495         `aux_info'.
496
497 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
498
499         * expr.c (expand_java_NEW): Don't use size argument for 
500         _Jv_AllocObject calls.
501         * parse.y (patch_invoke): Likewise.
502
503 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
504
505         * expr.c (build_invokeinterface): Remove unused variables to
506         fix warnings.
507
508 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
509
510         * class.c (get_interface_method_index): New function. Return dispatch 
511         index for interface method.
512         (make_method_value): For interface methods, set index field to
513         iface dispatch index, not DECL_VINDEX.
514         * expr.c (build_invokeinterface): Use get_interface_method_index.
515
516 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
517
518         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
519
520 2004-03-31  Andrew Haley  <aph@redhat.com>
521
522         PR java/14104
523         * jcf-io.c (opendir_in_zip): Tidy up error handling.
524
525 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
526
527         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
528         form of GTY markers.
529
530 2004-03-25  Marcus Meissner  <meissner@suse.de>
531
532         PR java/14689:
533         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
534
535 2004-03-23  Tom Tromey  <tromey@redhat.com>
536
537         PR java/14315:
538         * jcf-write.c (make_class_file_name): Don't report if mkdir
539         failed with EEXIST.
540
541 2004-03-23  Tom Tromey  <tromey@redhat.com>
542
543         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
544
545 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
546
547         * class.c, gjavah.c, lang.c: Fix comment typos.
548         * gcj.texi: Fix typos.
549
550 2004-03-19  Per Bothner  <per@bothner.com>
551
552         * gcj.texi (Code Generation):  Document new flags and assert defaults.
553
554         * class.c (assume_compiled_node_struct):  Rename type to
555         class_flag_node_struct, as it is now also used for enable_assertions.
556         Rename assume_compiled_node typedef.  Rename excludep field to value.
557         (find_assume_compiled_node):  Rename function to find_class_flag_node.
558         Minor optimization - avoid needless strlen.
559         (add_assume_compiled):  Some tweaking and optimization.
560         Rename and generalize to add_class_flag takem an extra parameter.
561         (add_assume_compled):  New just calls add_class_flag.
562         (add_enable_assert, enable_assertions):  New functions.
563         (enable_assert_tree):  New static.
564         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
565         * lang.opt (fenable-assertions, fenable-assertions=,
566         fdisable-assertions, fdisable-assertions=):  New options.
567         * lang.c (java_handle_option):  Handle new options.
568         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
569         class in an interface - create helper class nested in outer interface.
570         (build_assertion):  Short-circuit if enable_assertions is false.
571
572 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
573
574         * java-tree.h: Changes throughout to add checking to macros
575         and numerous whitespace changes.
576         (VAR_OR_FIELD_CHECK): New macro.
577         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
578         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
579
580 2004-03-16  Per Bothner  <per@bothner.com>
581
582         * jcf-jump.c (options):  New --print-constants option.
583         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
584
585         * jcf-dump.c (flag_print_constant_pool):  Default to off.
586         (print_constant_terse_with_index):  New helper function.
587         (various places):  Check flag_print_constant_pool where missing.
588         (main):  If verbose set flag_print_constant_pool.
589         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
590
591 2004-03-15  Andrew Haley  <aph@redhat.com>
592
593         PR java/14581
594         * parse.y (java_complete_lhs): Check that final variable has an
595         initializer.
596
597 2004-03-12  Andrew Haley  <aph@redhat.com>
598
599         PR java/14551
600         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
601         conversion.
602
603 2004-02-29  Roger Sayle  <roger@eyesopen.com>
604
605         * jcf-parse.c (java_parse_file): Handle the case that input_filename
606         is NULL.
607
608 2004-02-27  Per Bothner  <per@bothner.com>
609
610         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
611         suggestion:  Use build_incomplete_class_ref.
612         This fixes PR java/13508, java/11714.
613
614 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
615
616         * java/parse.h: Update copyright.
617
618 2004-02-26  Andrew Haley  <aph@redhat.com>
619
620         PR java/14231:
621         * parse.y (check_interface_throws_clauses): Check for
622         !METHOD_INVISIBLE (iface_method).
623         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
624         well as CLASS_ABSTRACT.
625
626 2004-02-25  Per Bothner  <per@bothner.com>
627
628         * parse.y (build_assertion):  If we're in an inner class, create the
629         class$ helper routine in the outer class.
630
631 2004-02-19  Richard Henderson  <rth@redhat.com>
632
633         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
634
635 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
636
637         * Make-lang.in (java.install-man): Add extra dependencies.
638
639 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
640
641         * Make-lang.in: Install man pages under the same names
642         (possibly transformed) as the program they document.
643
644 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
645
646         * gjavah.c: Include "intl.h".
647         (error): New function.
648         (main): Call gcc_init_libintl.
649         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
650         print_stub_or_jni, process_file, main): Use error rather than
651         fprintf.
652         (print_method_info, usage, help, version, main): Mark strings for
653         translation with _.  Avoid splitting up sentences.  Send
654         information messages to stdout.
655         * jcf-dump.c: Include "intl.h".
656         (main): Call gcc_init_libintl.
657         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
658         Mark error, usage and version messages for translation with _.
659         Avoid splitting up sentences.
660         * jv-scan.c: Include "intl.h".
661         (fatal_error, warning): Change parameter s to msgid.  Translate
662         messages.
663         (main): Call gcc_init_libintl.
664         (usage, help, version): Mark error, usage and version messages for
665         translation with _.  Avoid splitting up sentences.
666         * jvgenmain.c: Include "intl.h".
667         (main): Call gcc_init_libintl.
668         (usage, main): Mark error messages for translation with _.
669         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
670         JVGENMAIN_OBJS): Add intl.o.
671         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
672         java/jvgenmain.o): Update dependencies.
673
674 2004-02-08  Per Bothner  <per@bothner.com>
675
676         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
677         class don't use not_accessible_field_error, which can get confused.
678
679 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
680
681         Make-lang.in (po-generated):  Delete.
682
683 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
684
685         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
686         Depend on target.h.
687         * decl.c: Include target.h.
688         (start_java_method): Replace PROMOTE_PROTOTYPES with
689         targetm.calls.promote_prototypes.
690         * expr.c: Include target.h.
691         (pop_arguments): Replace PROMOTE_PROTOTYPES with
692         targetm.calls.promote_prototypes.
693         * parse.y: Include target.h.
694         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
695         with targetm.calls.promote_prototypes.
696
697 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
698
699         * typeck.c: Update copyright.
700
701 2004-02-02  Tom Tromey  <tromey@redhat.com>
702
703         * decl.c (java_init_decl_processing): Remove duplicate
704         gnu/gcj/RawData.
705
706 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
707
708         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
709
710 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
711
712         * expr.c (build_field_ref): Move variable
713         definition up.
714
715 2004-01-28  Andrew Haley  <aph@redhat.com>
716
717         * expr.c (build_field_ref): Widen field offset.
718
719 2004-01-27  Andrew Haley  <aph@redhat.com>
720
721         java/13273
722         * parse.y (check_interface_throws_clauses): Make sure class_decl
723         has been loaded.
724
725 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
726
727         PR java/13733
728         * parse.y (patch_assignment): Don't modify lhs_type for
729         reference assignments.
730
731 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
732
733         * Make-lang.in: Replace $(docdir) with doc.
734         (java.info, java.srcinfo, java.man, java.srcman): New rules.
735         (java.install-man): Revamp rule.
736
737 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
738
739         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
740         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
741         instead of deferred backquote.
742
743 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
744
745         * typeck.c (find_method_in_interfaces): Move variable
746         definition up.
747
748 2004-01-16  Andrew Haley  <aph@redhat.com>
749
750         PR java/13273:
751         * typeck.c (shallow_find_method): New.
752         (find_method_in_superclasses): New.
753         (find_method_in_interfaces): New.
754         (lookup_do): Rewrite.
755         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
756
757         * jcf-parse.c (read_class): Save and restore output_class.
758         * decl.c (java_expand_body): Set output_class from fndecl.
759
760 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
761
762         * class.c (gen_indirect_dispatch_tables): Fix string length
763         calculations.
764
765 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
766
767         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
768         (java.srcextra): Copy above back to source directory if requested.
769         (po-generated): Delete reference to $(parsedir).
770         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
771         Use implicit rule.
772
773 2004-01-14  Jan Hubicka  <jh@suse.cz>
774
775         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
776         estimation.
777
778 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
779
780         * java-tree.h (java_expand_expr): Change prototype.
781         * expr.c (java_expand_expr): Add alt_rtl parameter.
782
783 2004-01-09  Andrew Haley  <aph@redhat.com>
784
785         PR java/12755:
786         * parse.y (java_fix_constructors):  Set output_class.
787         (java_reorder_fields): Likewise.
788         (java_layout_classes): Likewise.
789         (java_expand_classes): Generate indirect dispatch tables.
790         (java_expand_classes): Set output_class.
791         (java_finish_classes): Likewise.
792         * lang.c (java_init): Turn on always_initialize_class_p if we're
793         using indirect dis[atch.
794         (java_decl_ok_for_sibcall): Use output_class, not current_class.
795         (java_get_callee_fndecl): Use class local atable.
796         * jcf-parse.c
797         (always_initialize_class_p): Decl moved to java-tree.h.
798         (HANDLE_CLASS_INFO): Set output_class.
799         (read_class): Likewise.
800         (parse_class_file): Call gen_indirect_dispatch_tables.
801         (parse_zip_file_entries): Set output_class.
802         (java_parse_file): Set output_class.  Don't emit symbol tables.
803         * java-tree.h (output_class): New.
804         Remove global declarations for otable, atable, and ctable.
805         (always_initialize_class_p): moved here from decl.c.
806         (DECL_OWNER): New.
807         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
808         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
809         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
810         (struct lang_type): Add otable_methods, otable_decl,
811         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
812         ctable_decl, catch_classes, type_to_runtime_map.
813         * expr.c (build_field_ref): Make otable, atable, and ctable class
814         local rather than global.
815         (build_known_method_ref): Likewise.
816         (build_invokeinterface): Likewise.
817         (java_expand_expr): Pass runtime type (rather than actual type) to
818         expand_start_catch.
819         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
820         this class.  Look up each class in that map to delete duplicates.
821         (expand_end_java_handler): Pass runtime type (rather than actual
822         type) to expand_start_catch.
823         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
824         (do_nothing): New.
825         (java_init_decl_processing): Rearrange things.  Remove global
826         declarations of otable, atable, and ctable.
827         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
828         (java_expand_body): Set output_class.
829         * constants.c (build_constant_data_ref): Use output_class, not
830         current_class.
831         (alloc_name_constant): Likewise.
832         * class.c (gen_indirect_dispatch_tables): New.
833         (build_class_ref): Generate hard reference to superclass, even if
834         using indirect dispatch.
835         (build_static_field_ref): Use class local atable.
836         (make_class_data): Generate hard reference to superclass, even if
837         using indirect dispatch.
838         Generate symbolic references to interfaces when using indirect
839         dispatch.
840         (make_class_data): Emit otable, atable, and ctable.
841         Make otable, atable, and ctable class local rather than global.
842         (emit_catch_table): Make otable, atable, and ctable class local
843         rather than global.
844
845 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
846
847         * parse.y (catch_clause_parameter): Fix typo.
848
849         PR java/13404
850         * parse.y: (catch_clause_parameter): Return early if $3, aka
851         formal_parameter, is null.
852
853 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
854
855         * class.c: Remove uses of "register" specifier in
856         declarations of arguments and local variables.
857         * decl.c: Likewise.
858         * expr.c: Likewise.
859         * gjavah.c: Likewise.
860         * jcf-dump.c: Likewise.
861         * jcf-io.c: Likewise.
862         * jcf-parse.c: Likewise.
863         * jcf-write.c: Likewise.
864         * keyword.h: Likewise.
865         * parse.y: Likewise.
866         * typeck.c: Likewise.
867         * verify.c: Likewise.
868
869 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
870
871         * Make-lang.in (GCJ_CROSS_NAME): Delete.
872         (java.install_common, java.install-man): Adjust for above.
873         (java.uninstall): Likewise.
874
875 2003-12-03  Michael Koch  <konqueror@gmx.de>
876
877         * class.c (make_class_data):
878         Push field value to 'hack_signers' instead of 'signers'.
879         * decl.c (java_init_decl_processing):
880         Push field 'hack_signers' instead of 'signers'.
881
882 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
883
884         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
885         including iconv.h.
886
887 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
888
889         PR java/12374:
890         * parse.y (qualify_ambiguous_name): Remove lots of broken
891         field access processing - there's no need to do that here,
892         because we have resolve_field_access.  Remove
893         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
894         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
895         used.
896
897 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
898
899         Fix PR java/13237
900         * parse.y (java_complete_lhs): Save location prior to patching
901         CALL_EXPR.
902
903 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
904
905         PR java/12548
906         * resource.c (write_resource_constructor): Append
907         "_resource" to constructor identifier name.
908
909 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
910
911         Fix PR java/13183.
912         * constants.c (cpool_for_class): New function.
913         (outgoing_cpool): Remove global variable.
914         (alloc_name_constant): Use cpool_for_class.
915         (build_constants_constructor): Likewise.
916         * decl.c (java_expand_body): Set current_class.
917         * java-tree.h (outgoing_cpool) Remove declaration.
918         (init_outgoing_cpool): Likewise.
919         * jcf-parse.c (init_outgoing_cpool): Remove function.
920         (parse_class_file): Don't call init_outgoing_cpool.
921         * parse.y (java_complete_expand_methods): Don't call
922         init_outgoing_cpool.  Don't save outgoing_cpool.
923         (java_expand_classes): Don't restore outgoing_cpool.
924         (java_finish_classes): Likewise.
925
926 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
927
928         * Make-lang.in: (java.install-common) Add
929         symlink for $(target_noncanonical)-gcjh for
930         native builds.
931
932 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
933
934         * Make-lang.in (java.extraclean): Delete.
935
936 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
937
938         * Make-lang.in (check-java): Add.
939
940 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
941
942         Fix PR java/13024.
943         * except.c (prepare_eh_table_type): Allocate variable-sized
944         buffer `buf' with alloca.
945
946 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
947
948         Fix PR java/12857.
949
950         decl.c (java_init_decl_processing): Don't initialize
951         class_not_found_type_node, no_class_def_found_type_node.
952
953         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
954         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
955         (class_not_found_type_node, no_class_def_found_type_node):
956         Don't define.
957
958         parse.y (build_dot_class_method_invocation): Add this_class
959         argument.  Qualify method invocations to a different class.
960         (create_new_parser_context): Initialize saved_data_ctx to 0.
961         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
962         (build_dot_class_method): Don't load classes.  Register
963         incomplete types.
964         (build_incomplete_class_ref): Special cases for interfaces
965         and inner classes.  Move build_dot_class_method call to here...
966         (patch_incomplete_class_ref): ...from here.  Pass current_class
967         to build_dot_class_method_invocation.
968         (build_assertion): Pass class_type to
969         build_dot_class_method_invocation.
970         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
971
972 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
973
974         Fix PR java/12739.
975         * java-tree.h (BLOCK_EMPTY_P): Define.
976         * parse.y (java_complete_lhs): Check for empty blocks
977         in TRY_FINALLY_EXPR case.
978
979 2003-11-17  Andrew Haley  <aph@redhat.com>
980
981         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
982         (struct lang_decl_var:freed): New variable.
983         * decl.c (poplevel): Mark local vars that have gone out of scope.
984         (push_jvm_slot): Don't use the RTL of a var that has gone out of
985         scope.
986
987 2003-11-16  Jason Merrill  <jason@redhat.com>
988
989         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
990         and TAGS files that include them for each front end.
991
992 2003-11-15  Tom Tromey  <tromey@redhat.com>
993
994         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
995
996 2003-11-12  Jason Merrill  <jason@redhat.com>
997
998         PR optimization/12547
999         * lang.c (java_tree_inlining_walk_subtrees): Just walk
1000         BLOCK_EXPR_BODY directly.
1001
1002 2003-11-12  Andrew Haley  <aph@redhat.com>
1003
1004         PR java/11045
1005         * parse.y (fold_constant_for_init): Check that we really do have a
1006         constant.
1007
1008         PR java/11533
1009         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
1010         init_test_decls being inlined.
1011
1012         PR java/12890:
1013         * parse.y (do_resolve_class): Check return value from
1014         breakdown_qualified().
1015
1016 2003-11-11  Tom Tromey  <tromey@redhat.com>
1017
1018         PR java/12915:
1019         * parse.y (merge_string_cste): Handle case where we have a
1020         pointer that happens to be zero, not null_pointer_node.
1021
1022 2003-11-10  Tom Tromey  <tromey@redhat.com>
1023
1024         * jcf-parse.c (classify_zip_file): Correctly compare
1025         filename_length against length of manifest file's name.
1026
1027 2003-11-08  Tom Tromey  <tromey@redhat.com>
1028
1029         PR java/12894:
1030         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
1031
1032 2003-11-06  Andrew Haley  <aph@redhat.com>
1033
1034         * expr.c (java_stack_swap): Make sure destination stack slots are
1035         of the correct type.
1036
1037 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
1038
1039         * Make-lang.in (dvi): Move targets to $(docobjdir).
1040         (gcj.dvi): Simplify rule and adjust target.
1041         (gcj.info): Simplify rule.
1042         (gcj.pod): New intermediate rule.
1043         (gcjh.pod): Likewise.
1044         (jv-scan.pod): Likewise.
1045         (jcf-dump.pod): Likewise.
1046         (gij.pod): Likewise.
1047         (jv-convert.pod): Likewise.
1048         (rmic.pod): Likewise.
1049         (rmiregistry.pod): Likewise.
1050         (gcj.1): Delete.
1051         (gcjh.1): Delete.
1052         (jv-scan.1): Delete.
1053         (jcf-dump.1): Delete.
1054         (gij.1): Delete.
1055         (jv-convert.1): Delete.
1056         (rmic.1): Delete.
1057         (rmiregistry.1): Delete.
1058
1059 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
1060
1061         Fixes PR java/12866.
1062         * parse.y (resolve_qualified_expression_name): Move test
1063         for outer field access methods from here...
1064         (check_thrown_exceptions) ...to here.
1065
1066 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
1067
1068         * .cvsignore: Delete.
1069
1070 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
1071
1072         * verify.c (verify_jvm_instructions): Don't warn about legal
1073         eh binding regions generated for example by jdk 1.4.1.
1074
1075 2003-10-24  David S. Miller  <davem@redhat.com>
1076
1077         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
1078
1079 2003-10-22  Andrew Haley  <aph@redhat.com>
1080
1081         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
1082         (java_get_callee_fndecl): New.
1083
1084         * jcf-parse.c (java_parse_file): Call emit_catch_table().
1085
1086         * java-tree.h (ctable_decl): New.
1087         (catch_classes):  New.
1088         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
1089
1090         * decl.c (java_init_decl_processing): Add catch_class_type.
1091         Add ctable_decl.
1092         Add catch_classes field.
1093
1094         * class.c (build_indirect_class_ref): Break out from
1095         build_class_ref.
1096         (make_field_value): Check flag_indirect_dispatch.
1097         (make_class_data): Ditto.
1098         Tidy uses of PUSH_FIELD_VALUE.
1099         Add field catch_classes.
1100         (make_catch_class_record): New.
1101
1102         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1103
1104 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1105
1106         * jcf-write.c: Follow spelling conventions.
1107         * parse.y: Likewise.
1108
1109 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1110
1111         * ChangeLog: Fix typos.
1112         * expr.c: Fix comment typos.
1113         * jcf-write.c: Likewise.
1114         * lang.c: Likewise.
1115         * lex.c: Likewise.
1116         * mangle.c: Likewise.
1117         * parse-scan.y: Likewise.
1118         * parse.y: Likewise.
1119
1120 2003-10-22  Tom Tromey  <tromey@redhat.com>
1121
1122         * expr.c (expand_byte_code): Only warn about dead bytecode when
1123         extra_warnings is set.
1124
1125 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
1126
1127         Fix for PR java/12586.
1128         * mangle.c (find_compression_record_match): Don't iterate through
1129         package namespace elements unless they all match compression_table
1130         entries.
1131
1132 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
1133
1134         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1135         (generate-manpages): Likewise.
1136         (java.maintainer-clean): Likewise.
1137         (gcj.info): Likewise.
1138         (gcj.1): Likewise.
1139         (gcjh.1): Likewise.
1140         (jv-scan.1): Likewise.
1141         (jcf-dump.1): Likewise.
1142         (gij.1): Likewise.
1143         (jv-convert.1): Likewise.
1144         (rmic.1): Likewise.
1145         (rmiregistry.1): Likewise.
1146         (java.install-man): Likewise.
1147         (parse-scan.o): Move and define complete compile line.
1148         (parse.o): Likewise.
1149         (jcf-tree-inline.o): Move.
1150
1151 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
1152
1153         * Make-lang.in (info): Update dependencies.
1154         (java.install-info): Remove.
1155         ($(srcdir)/java/gcj.info): Replace with ...
1156         ($(docobjdir)/gcj.info): ... this.
1157
1158 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
1159
1160         * Make-lang.in: Replace uses of $(target_alias) with
1161         $(target_noncanonical).
1162
1163 2003-10-09  Tom Tromey  <tromey@redhat.com>
1164
1165         * decl.c (java_init_decl_processing): Declare signers field.
1166         * class.c (make_class_data): Set signers field.
1167
1168 2003-10-09  Jason Merrill  <jason@redhat.com>
1169
1170         * parse.y (patch_assignment): Use make_node to create a BLOCK.
1171         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1172         POINTER_TYPE.
1173
1174 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1175
1176         * Make-lang.in (java.info): Replace with ...
1177         (info): ... this.
1178         (java.dvi): Replace with ...
1179         (dvi): ... this.
1180         (java.generated-manpages): Replace with ...
1181
1182 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
1183
1184         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1185
1186 2003-10-01  Andrew Haley  <aph@redhat.com>
1187
1188         * jcf-parse.c (java_parse_file): Write otable and atable.
1189         * java-tree.h (atable_methods): New.
1190         (atable_decl): New.
1191         (atable_syms_decl): New.
1192         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1193         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1194         (symbol_*type): Rename method_symbol* to symbol*type.
1195         (emit_offset_symbol_table): Delete.
1196         (emit_symbol_table): New.
1197         (get_symbol_table_index): New.
1198         (atable_type): New.
1199         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1200         (build_known_method_ref): Likewise.
1201         (get_symbol_table_index): Rename from get_offset_table_index.
1202         Parameterize to allow re-use by differing types of symbol table.
1203         (build_invokevirtual): Pass table to get_offset_table_index.
1204         * decl.c (java_init_decl_processing): Push types and decls for
1205         atable and atable_syyms.
1206         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1207         (make_class_data): Add new fields atable and atable_syms.
1208         (emit_symbol_table): Rename from emit_offset_symbol_table.
1209         Parameterize to allow re-use by different types of symbol table.
1210         (build_symbol_entry): Renamed from build_method_symbols_entry.
1211
1212 2003-09-30  Roger Sayle  <roger@eyesopen.com>
1213
1214         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1215         semantics for SAVE_EXPR, by caching the result in a temporary.
1216
1217 2003-09-28  Richard Henderson  <rth@redhat.com>
1218
1219         * check-init.c (check_init): Save and restore input_location
1220         instead of file and line separately.
1221         * decl.c (java_expand_body): Likewise.
1222         * jcf-write.c (generate_bytecode_insns): Likewise.
1223         * parse.y (safe_layout_class): Likewise.
1224         * jcf-parse.c (read_class, parse_class_file): Likewise.
1225         (java_parse_file): Use %H for warning locator.
1226
1227 2003-09-28  Roger Sayle  <roger@eyesopen.com>
1228
1229         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1230         with void-type branches instead of using a COMPOUND_EXPR.
1231
1232 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
1233
1234         * decl.c (java_optimize_inline, dump_function): Remove.
1235         * java-tree.h (java_optimize_inline): Remove declaration.
1236         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1237         * parse.y (source_end_java_method, java_expand_classes):
1238         Likewise.  Remove dead code.
1239
1240 2003-09-27  Roger Sayle  <roger@eyesopen.com>
1241
1242         * lang.c (java_init_options): Set flag_evaluation_order.
1243         * expr.c (force_evaluation_order): Don't attempt to force
1244         evaluation order of binary operations using save_expr.
1245         * parse.y (java_complete_lhs): No longer need to call
1246         force_evaluation_order when constructing binary operators.
1247
1248 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1249             Bryce McKinlay  <bryce@mckinlay.net.nz>
1250
1251         PR java/1333:
1252         * parse.y (not_accessible_field_error): New function.
1253         (resolve_expression_name): Check field access permissions.
1254         (resolve_qualified_expression_name): Use
1255         not_accessible_field_error.
1256         (resolve_qualified_expression_name): Likewise.
1257
1258 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1259
1260         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1261
1262 2003-09-23  Roger Sayle  <roger@eyesopen.com>
1263
1264         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1265         with equal operands without side-effects.
1266
1267 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
1268
1269         * decl.c (java_init_decl_processing): Don't emit otable decls
1270         if flag_indirect_dispatch is not set.
1271
1272 2003-09-21  Richard Henderson  <rth@redhat.com>
1273
1274         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1275         resource.c: Revert.
1276
1277 2003-09-21  Richard Henderson  <rth@redhat.com>
1278
1279         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1280         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1281
1282 2003-09-20  Richard Henderson  <rth@redhat.com>
1283
1284         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1285
1286 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1287
1288         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1289         * check-init.c (check_init): Likewise.
1290
1291 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1292
1293         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1294
1295 2003-09-16  Andrew Haley  <aph@redhat.com>
1296
1297         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1298
1299 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
1300
1301         Fixes PR java/9577
1302         * mangle.c (find_compression_record_match): Skip
1303         over a "6JArray" (the array template mangled string)
1304         IDENTIFIER_NODE.
1305         (mangle_array_type): Correct minor typo.
1306         (atms): Move definition to the beginning.
1307
1308 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
1309
1310         * class.c (add_miranda_methods): Ensure super-interfaces are laid
1311         out. Fix for PR java/12254.
1312
1313 2003-09-11  Richard Henderson  <rth@redhat.com>
1314
1315         * parse.y (source_end_java_method): Update for new
1316         cgraph_finalize_function argument.
1317
1318 2003-09-09  Richard Henderson  <rth@redhat.com>
1319
1320         * parse.y (source_end_java_method): Update call to
1321         cgraph_finalize_function.
1322
1323 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
1324
1325         * decl.c (java_expand_body): New function.
1326         * expr.c (build_class_init): Set DECL_IGNORED_P.
1327         * java-tree.h (start_complete_expand_method,
1328         java_expand_body): Declare.
1329         * jcf-parse.c (cgraph.h): Include.
1330         (java_parse_file): Handle flag_unit_at_a_time.
1331         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1332         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1333         (java_estimate_num_insns): Use walk_tree_without_duplicates.
1334         (java_start_inlining): New function.
1335         * parse.h (java_finish_classes): Declare.
1336         * parse.y: Include cgraph.h.
1337         (block): Don't special-case empty block production.
1338         (craft_constructor): Set DECL_INLINE.
1339         (source_end_java_method): Handle flag_unit_at_a_time.
1340         Replace inline code with call to java_expand_body.
1341         (start_complete_expand_method): Remove static modifier.
1342         (java_expand_method_bodies): Patch function tree for
1343         class initialization and/or synchronization as needed.
1344         Don't begin RTL expansion yet.
1345         (java_expand_classes): Check flag_unit_at_a_time before
1346         calling finish_class.
1347         (java_finish_classes): New function.
1348         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1349         (patch_assignment): Set DECL_CONTEXT on temporary variable.
1350         (emit_test_initialization): Set DECL_IGNORED_P.
1351
1352 2003-09-03  Roger Sayle  <roger@eyesopen.com>
1353
1354         * builtins.c (enum builtin_type): Delete unused enumeration.
1355         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1356
1357 2003-08-28  Tom Tromey  <tromey@redhat.com>
1358
1359         * gcj.texi (Extensions): Document gcjlib URLs.
1360
1361 2003-08-20  Tom Tromey  <tromey@redhat.com>
1362
1363         * gcj.texi (Extensions): Added xref.
1364         (libgcj Runtime Properties): Document
1365         gnu.gcj.runtime.VMClassLoader.library_control.
1366
1367 2003-08-20  Andrew Haley  <aph@redhat.com>
1368
1369         * except.c (prepare_eh_table_type): Use new encoding for exception
1370         handlers when using -fno-assume-compiled.
1371
1372 2003-08-13  Tom Tromey  <tromey@redhat.com>
1373
1374         * gcj.texi (Invoking gij): Document -X and -?.
1375
1376 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
1377
1378         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1379         GCJH_OBJS, JCFDUMP_OBJS
1380         * win32-host.c: Removed the unnecessary and broken dependency
1381         on jcf.h
1382
1383 2003-08-11  Tom Tromey  <tromey@redhat.com>
1384
1385         * parse.y (java_check_regular_methods): Typo fixes.  Call
1386         check_interface_throws_clauses.  Use
1387         check_concrete_throws_clauses.
1388         (check_interface_throws_clauses): New function.
1389         (check_concrete_throws_clauses): New function.
1390         (hack_is_accessible_p): New function.
1391         (find_most_specific_methods_list): Added FIXME.
1392         * typeck.c (lookup_do): Use `flags' argument to decide what to
1393         do.  Reimplemented.
1394         (lookup_argument_method_generic): New function.
1395         (lookup_argument_method2): Removed.
1396         * jcf.h (ACC_INVISIBLE): New define.
1397         * jcf-write.c (generate_classfile): Skip invisible methods.
1398         * class.c (add_miranda_methods): New function.
1399         (layout_class_methods): Use it.
1400         (get_access_flags_from_decl): Use ACC_INVISIBLE.
1401         * java-tree.h (METHOD_INVISIBLE): New define.
1402         (lang_decl_func) [invisible]: New field.
1403         (lookup_argument_method_generic): Declare.
1404         (SEARCH_INTERFACE): New define.
1405         (SEARCH_SUPER): Likewise.
1406         (SEARCH_ONLY_INTERFACE): Likewise.
1407         (SEARCH_VISIBLE): Likewise.
1408         (lookup_argument_method2): Removed declaration.
1409
1410 2003-08-05  Tom Tromey  <tromey@redhat.com>
1411
1412         Fix for PR java/11600:
1413         * parse.y (java_complete_lhs): See whether we're calling a method
1414         on an array.
1415         (check_thrown_exceptions): Added `is_array_call' argument;
1416         fixed `clone' checking; updated all callers.
1417
1418 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1419
1420         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1421
1422 2003-08-03  Tom Tromey  <tromey@redhat.com>
1423
1424         * java-tree.h (METHOD_TRANSIENT): Removed.
1425         * decl.c (pushdecl): Removed some dead code.
1426         * class.c (get_access_flags_from_decl): Can't have transient
1427         method.
1428         (add_method_1): Can't have a transient method.
1429
1430 2003-07-28  Andreas Jaeger  <aj@suse.de>
1431
1432         * jvspec.c: Convert to ISO C90 prototypes.
1433
1434 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1435
1436         * decl.c (force_poplevels): Fix warning call.
1437
1438 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1439
1440         * expr.c (expand_java_field_op): Don't use xxx_with_decl
1441         (expand_java_field_op): Likewise.
1442         * class.c (layout_class_method): Likewise
1443         (emit_register_classes): Likewise.
1444         * decl.c (pushdecl): Likewise.
1445         (poplevel): Likewise.
1446         (force_poplevels): Likewise.
1447         (give_name_to_locals): Likewise.
1448         * check-init.c (check_for_initialization): Likewise.
1449
1450 2003-07-24  Jason Merrill  <jason@redhat.com>
1451
1452         * java-tree.h: Move boolean_type_node et al to the back end.
1453
1454 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1455
1456         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1457         casts.
1458
1459 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
1460
1461         * lang.opt: Don't show -MD_ and -MDD_.
1462
1463 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
1464
1465         * lang-options.h: Remove.
1466         * lang.opt: Add help text.
1467
1468 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
1469
1470         * expr.c: Remove the last argument to expand_assignment().
1471
1472 2003-07-09  Jan Hubicka  <jh@suse.cz>
1473
1474         * java-tree.h (DECL_NUM_STMTS): Rename to...
1475         (DECL_ESTIMATED_INSNS): ... this.
1476         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1477         New static functions.
1478         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1479         * parser.y (add_stmt_to_compound): Do not account statements.
1480
1481 2003-07-08  Mark Wielaard  <mark@klomp.org>
1482
1483         * gcj.texi: CNI now expands to Compiled Native Interface.
1484
1485 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1486
1487         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1488
1489 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1490
1491         * expr.c (expand_byte_code): Adjist emit_line_note call.
1492
1493 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1494
1495         * lang.c (java_handle_option): Don't handle filenames.
1496
1497 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
1498
1499         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1500         DIR_SEPARATOR.
1501         Use FILENAME_CMP.
1502         * jcf-write.c: Don't default-define DIR_SEPARATOR.
1503         * jcf.h: Delete COMPARE_FILENAMES definition.
1504
1505 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
1506
1507         * lang.c (java_init_options): Update prototype.
1508
1509 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1510
1511         * decl.c (poplevel): Adjust define_label call.
1512
1513 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1514
1515         * gjavah.c (flag_jni): Make non-static.
1516         * parse-scan.y (ctxp): Make non-static.
1517
1518         * class.c (build_method_symbols_entry)
1519         * expr.c (get_offset_table_index)
1520         * jcf-parse.c (jcf_parse):
1521         Mark the definition static, matching the forward declaration.
1522
1523 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
1524
1525         * lang.c (java_handle_option): Don't check for missing arguments.
1526
1527 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1528
1529         * class.c (push_class): Use a location_t to save place.
1530         (emit_register_classes): Set input_location. Adjust
1531         expand_function_end call.
1532         * resource.c (write_resource_constructor): Likewise.
1533         * decl.c (end_java_method): Adjust expand_function_end call.
1534         * parse.y (source_end_java_method): Likewise.
1535
1536 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1537
1538         * lang.c (java_handle_option): Likewise.
1539
1540 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
1541
1542         * lang.c (java_handle_option): Special-casing of optional
1543         joined arguments no longer needed.
1544         * lang.opt: Update switches that take optional argument.
1545
1546 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1547
1548         * lang.opt: Declare Java.
1549         * lang.c (java_init_options): Update.
1550
1551 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1552
1553         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1554
1555 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1556
1557         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1558         * lang.c (java_handle_option): -MD and -MMD have an underscore.
1559         * lang.opt: -MD and -MMD have an underscore.
1560
1561 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1562
1563         * class.c (emit_register_classes): Adjust init_function_start
1564         call.
1565         * decl.c (complete_start_java_method): Likewise.
1566         * resource.c (write_resource_constructor): Likewise.
1567
1568 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1569
1570         * Make-lang.in: Update to use options.c and options.h.
1571         * lang.c: Include options.h not j-options.h.
1572         (java_handle_option): Abort on unrecognized option.
1573         (java_init_options): Request Java switches.
1574
1575 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
1576
1577         * Make-lang.in: Handle mostlyclean.
1578
1579 2003-06-11  Tom Tromey  <tromey@redhat.com>
1580
1581         * lang.c (java_handle_option): Update dependency_tracking for
1582         OPT_MF case.
1583
1584         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1585         empty argument.
1586
1587 2003-06-10  Andrew Haley  <aph@redhat.com>
1588
1589         * resource.c (write_resource_constructor): Use expand_expr to
1590         generate the address of the label attached to a resource.
1591         * Make-lang.in (java/resource.o): Add expr.h
1592
1593 2003-06-10  Andrew Haley  <aph@redhat.com>
1594
1595         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1596         (java_decl_ok_for_sibcall): New.
1597
1598 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
1599
1600         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1601         (java/j-options.c, java/j-options.h): New.
1602         * java-tree.h (resource_name, compile_resource_file,
1603         compile_resource_data): Constify.
1604         * jcf-write.c (jcf_write_base_directory): Similarly.
1605         * jcf.h (jcf_write_base_directory): Similarly.
1606         * lang.c: Include j-options.h.
1607         (cl_options_count, cl_options, string_option, java_decode_option,
1608         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1609         process_option_with_no): Remove.
1610         (resource_name): Constify.
1611         (LANG_HOOKS_HANDLE_OPTION): Override.
1612         (java_handle_option): New.
1613         (java_init): Don't call jcf_path_init.
1614         (java_init_options): Call jcf_path_init.
1615         * lang.opt: New.
1616         * resource.c (compile_resource_data, compile_resource_file): Constify.
1617
1618 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
1619
1620         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1621         (struct lang_decl_func): Add last_line field.
1622         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1623         DECL_SOURCE_LINE_LAST): Remove.
1624         * parse.y (missing_return_error, finish_method_declaration,
1625         lookup_cl, start_artificial_method_body, source_end_java_method,
1626         start_complete_expand_method): Adjust.
1627
1628 2003-06-08  Tom Tromey  <tromey@redhat.com>
1629
1630         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1631         fno-assume-compiled.
1632
1633 2003-06-08  Roger Sayle  <roger@eyesopen.com>
1634
1635         * builtins.c (define_builtin_type, builtin_types): Delete.
1636         (define_builtin): Rewritten to take just the built-in code,
1637         the function's name, type and fallback library function name.
1638         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1639         (initialize_builtins): Overhaul to define the GCC builtins
1640         used by gcj manually, providing the Java run-time's
1641         implementations as the fallback library function.
1642
1643 2003-06-08  Anthony Green  <green@redhat.com>
1644
1645         * parse.y (patch_cast): Fix conversions from floating-point to
1646         integral types.
1647
1648 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
1649
1650         * Make-lang.in: Update.
1651         * lang.c: Include opts.h. Define cl_options_count and cl_options.
1652
1653 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1654
1655         * lang.c (java_init_options): Update.
1656
1657 2003-06-05  Jan Hubicka  <jh@suse.cz>
1658
1659         * Make-lang.in:  Add support for stageprofile and stagefeedback
1660
1661 2003-05-31  Roger Sayle  <roger@eyesopen.com>
1662
1663         * lang.c (java_init_options): Prescribe wrap-around two's
1664         complement arithmetic overflow by setting flag_wrapv.
1665
1666 2003-05-29  Roger Sayle  <roger@eyesopen.com>
1667
1668         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1669         (builtin_record): Add an additional builtin_code field to
1670         record which GCC built-in corresponds to the Java function.
1671         (java_builtins):  Add new entries for atan, atan2, exp, log,
1672         pow and tan.
1673         (max_builtin, min_builtin, abs_builtin): Perform constant
1674         folding on the resulting tree.
1675         (java_build_function_call_expr): Likewise, perform constant
1676         folding on the resulting tree.
1677         (initialize_builtins): The NULL creators are now allowed in
1678         the java_builtins table, which is now terminated by an entry
1679         with builtin_code == END_BUILTINS.
1680         (check_for_builtin): Likewise.  If the matching creator is
1681         NULL, construct the call using java_build_function_call_expr
1682         directly with the decl for the corresponding builtin_code.
1683
1684 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1685
1686         * win32-host.c: Normalize copyright boilerplate.
1687
1688 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1689
1690         * parse.y (print_int_node): Use string concatentation on
1691         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1692         function calls into one.
1693
1694 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
1695
1696         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1697         fatal_io_error with calls to fatal_error; add ": %m" to the end of
1698         all the affected error messages.
1699
1700 2003-05-13  Richard Henderson  <rth@redhat.com>
1701
1702         * class.c (layout_class_method): Set DECL_EXTERNAL.
1703         * decl.c (java_mark_decl_local, java_mark_class_local): New.
1704         * java-tree.h (java_mark_class_local): Declare.
1705         * jcf-parse.c (parse_class_file): Use it.
1706         * parse.y (java_expand_classes): Likewise.
1707
1708 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
1709
1710         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1711         * lex.h: #include input.h.
1712         * jv-scan.c (input_filename): Remove.
1713
1714 2003-05-02  Tom Tromey  <tromey@redhat.com>
1715
1716         PR java/10491:
1717         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1718         (handle_inner_classes): New function.
1719
1720 2003-05-01  Tom Tromey  <tromey@redhat.com>
1721
1722         PR java/10459:
1723         * parse.y (finish_for_loop): Do nothing if update expression is a
1724         EXPR_WFL_NODE wrapping nothing.
1725         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1726
1727 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
1728
1729         * lex.h (input_lineno): Remove declaration.
1730         * parse-scan.y: #include input.h.
1731         (input_filename): Remove declaration.
1732         (input_location): Add definition.
1733         (input_line): Remove definition.
1734
1735 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1736
1737         * lex.h (lineno): Rename to ...
1738         (input_line): ... here
1739         * parse-scan.y (lineno): Rename to ...
1740         (input_line): ... here.
1741         (reset_report): Rename lineno to input_line.
1742         * check-init.c (check_init): Likewise.
1743         * class.c (push_class): Likewise.
1744         * decl.c (complete_start_java_method, end_java_method): Likewise.
1745         * expr.c (expand_byte_code): Likewise.
1746         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1747         * jcf-write.c (generate_bytecode_insns): Likewise.
1748         * lex.c (java_init_lex, java_allocate_new_line,
1749         do_java_lex): Likewise.
1750         * parse.h (YYNOT_TWICE): Likewise.
1751         * parse.y (empty_statement, expression_statement,
1752         java_pop_parser_context, java_parser_context_save_global,
1753         yyerror, register_fields, method_header, safe_layout_class,
1754         find_in_imports_on_demand, create_artificial_method,
1755         source_end_java_method, start_complete_expand_method,
1756         build_thisn_assign, java_complete_lhs,
1757         maybe_absorb_scoping_block): Likewise.
1758
1759 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
1760
1761         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1762         '/' when computing java source filename
1763
1764 2003-04-13  Tom Tromey  <tromey@redhat.com>
1765
1766         * gjavah.c (print_c_decl): Indentation fix.
1767
1768 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1769
1770         * class.c (make_field_value, make_method_value, get_dispatch_table)
1771         (make_class_data, emit_offset_symbol_table)
1772         * constants.c (build_constants_constructor)
1773         * java-tree.h (START_RECORD_CONSTRUCTOR)
1774         * parse.y (maybe_build_array_element_wfl):
1775         Use build_constructor.
1776
1777 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
1778
1779         PR java/10253:
1780         * parse.y (string_convert_int_cst): Always use at least one digit
1781         in string conversion. Remove ASCII dependence.
1782         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
1783
1784 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
1785
1786         * Make-lang.in: added win32-host.c
1787         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
1788         resolves to open() on non-Win32 platforms and
1789         Win32-specific jcf_open_exact_case() on Win32
1790         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
1791         when trying .java and .class files
1792         * win32-host.c: added to repository. Defines
1793         Win32-specific jcf_open_exact_case()
1794
1795 2003-04-10  Andrew Haley  <aph@redhat.com>
1796
1797         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
1798         (maybe_free_localvar): Renamed from localvar_free.
1799         Add new arg, really.
1800         (generate_bytecode_insns): Set new variable, jsrs.
1801         Only free local vars if no jsr insns have been emittted.
1802         Call maybe_free_localvar, not localvar_free.
1803
1804 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
1805
1806         * gcj.texi: Remove @ at start of file.
1807
1808 2003-03-25  Tom Tromey  <tromey@redhat.com>
1809
1810         * parse.y (create_interface): Call CHECK_DEPRECATED.
1811
1812 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
1813
1814         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
1815
1816 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1817
1818         * javaop.h (jfloat, jdouble): Make them structures mirroring
1819         the bit fields of IEEE float and double respectively.
1820         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
1821         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
1822         (union Word, union DWord): Delete.
1823         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
1824
1825         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
1826         D_NAN_MASK): Delete.
1827         (jni_print_float, jni_print_double): New.  Generate
1828         hexadecimal floating constants.
1829         (print_field_info): Use jni_print_float/double.
1830
1831         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
1832         finite floating point numbers for output; special case
1833         non-finite floats.
1834
1835 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1836
1837         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
1838         Replace 0 and 1 with true and false in return statements.
1839
1840 2003-03-19  Tom Tromey  <tromey@redhat.com>
1841
1842         * lex.c (do_java_lex): Renamed from java_lex.
1843         (java_lex): New function.
1844         Include timevar.h.
1845
1846 2003-03-13  Tom Tromey  <tromey@redhat.com>
1847
1848         * parse.y (resolve_inner_class): Error if qualifier is a primitive
1849         type.
1850
1851 2003-03-04  Andrew Haley  <aph@redhat.com>
1852
1853         * gjavah.c (is_first_data_member): New global variable.
1854         (print_c_decl): If it's the first data member, align it as the
1855         superclass.
1856         (process_file): Set is_first_data_member.
1857
1858 2003-03-11  Tom Tromey  <tromey@redhat.com>
1859
1860         * parse.y (resolve_field_access): Initialize class if field is
1861         found in another static field.
1862         * expr.c (build_class_init): Don't optimize out initialization of
1863         implemented interface.
1864
1865 2003-03-11  Andrew Haley  <aph@redhat.com>
1866
1867         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
1868         warning.
1869
1870 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1871
1872         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
1873         and DIR_SEPARATOR_2 for a target.
1874         Correct minor typos.
1875
1876         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
1877         and DIR_SEPARATOR_2 for a target into account.
1878
1879 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1880
1881         * lang.c (java_init): Update prototype, move code to java_post_options.
1882         (java_post_options): Similarly.
1883
1884 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
1885
1886         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
1887         compare file name components depending on the case-sensitivity
1888         or otherwise of the host file system.
1889
1890         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
1891         "strcmp" to compare file name components.
1892         Use IS_DIR_SEPARATOR instead of comparing directly against
1893         DIR_SEPARATOR.
1894         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
1895         comparing directly against DIR_SEPARATOR.
1896
1897 2003-03-04  Tom Tromey  <tromey@redhat.com>
1898
1899         * Make-lang.in (java.tags): New target.
1900
1901 2003-03-01  Roger Sayle  <roger@eyesopen.com>
1902
1903         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
1904         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
1905
1906 2003-03-01  Tom Tromey  <tromey@redhat.com>
1907
1908         * parse.y (jdep_resolve_class): Only check deprecation if we found
1909         a decl.
1910
1911 2003-02-28  Tom Tromey  <tromey@redhat.com>
1912
1913         PR java/9695:
1914         * class.c (maybe_layout_super_class): Always pass a WFL to
1915         do_resolve_class.
1916         * parse.y (do_resolve_class): Updated comment to explain
1917         parameters.
1918
1919 2003-02-26  Tom Tromey  <tromey@redhat.com>
1920
1921         * jcf-write.c (generate_classfile): Check whether class is
1922         deprecated before writing attribute count.
1923
1924 2003-02-25  Roger Sayle  <roger@eyesopen.com>
1925
1926         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
1927         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
1928
1929 2003-02-23  Tom Tromey  <tromey@redhat.com>
1930
1931         * lang-options.h: Added -Wdeprecated.
1932         * gcj.texi (Warnings): Document -Wdeprecated.
1933         * java-tree.h (flag_deprecated): Declare.
1934         * lang.c (lang_W_options): Added deprecated.
1935         (flag_deprecated): New global.
1936         * chartables.h: Rebuilt.
1937         * gen-table.pl (process_one): Look at whitespace.
1938         (print_tables): Define LETTER_SPACE, LETTER_MASK.
1939         * parse.h (CLEAR_DEPRECATED): New macro.
1940         (CHECK_DEPRECATED_NO_RESET): New macro.
1941         * jcf-parse.c (handle_deprecated): New function.
1942         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
1943         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
1944         * parse.y (resolve_type_during_patch): Check deprecation.
1945         (jdep_resolve_class): Likewise.
1946         (process_imports): Likewise.
1947         (resolve_expression_name): Likewise.
1948         (check_deprecation): Strip arrays from decl.  Check
1949         flag_deprecated.
1950         (patch_method_invocation): Also check the particular constructor
1951         for deprecation.
1952         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
1953         * jcf-write.c (append_deprecated_attribute): New function.
1954         (generate_classfile): Generate deprecated attribute when
1955         appropriate.
1956         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
1957         (java_lex) [case '*']: Simplify logic.
1958         (java_start_char_p): Use LETTER_MASK.
1959         (java_part_char_p): Likewise.
1960         (java_space_char_p): New function.
1961
1962 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1963
1964         Change base class access representation.
1965         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
1966         (add_interface_do): Likewise.
1967
1968 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
1969
1970         * decl.c (java_init_decl_processing): Change
1971         soft_lookupjnimethod_node to reflect the change in
1972         signature of _Jv_LookupJNIMethod in libjava/jni.cc
1973         * expr.c (build_jni_stub): Calculate and pass the size
1974         on the stack of the arguments to a JNI function. Use
1975         new target macro MODIFY_JNI_METHOD_CALL to allow a
1976         target to modify the call to a JNI method.
1977
1978 2003-02-08  Roger Sayle  <roger@eyesopen.com>
1979
1980         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
1981         instead of basename to avoid compiler warnings on Tru64.
1982
1983 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1984
1985         * gcj.texi: Update to GFDL 1.2.
1986
1987 2003-01-31  Andrew Haley  <aph@redhat.com>
1988
1989         * parse.y (java_expand_classes): Scan the whole class list looking
1990         for access methods that haven't yet been expanded.
1991
1992 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
1993
1994         Fix for java/4269:
1995
1996         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
1997         to fix bootstrap on sparc-unknown-netbsdelf1.5.
1998         * jcf-parse.c: Likewise.
1999
2000 2003-01-31  Mark Wielaard  <mark@klomp.org>
2001
2002         * gjavah.c (throwable_p): Allocate 1 more byte for string.
2003
2004 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
2005
2006         * class.c (make_class): Use BINFO_ELTS.
2007         (set_super_info): Likewse.
2008         (add_interface_do): Likewise.
2009
2010 2003-01-30  Tom Tromey  <tromey@redhat.com>
2011
2012         * jcf-parse.c (read_class): Update identifier's class value if it
2013         changed during parsing.
2014
2015 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
2016
2017         * Make-lang.in (po-generated): Find the targets in $(parsedir).
2018         Propagate change to all other rules as required.
2019         (java/parse-scan.o): Add explicit dependency on
2020         $(parsedir)/java/parse-scan.c .
2021
2022 2003-01-29  Tom Tromey  <tromey@redhat.com>
2023
2024         * parse.y (patch_assignment): Only transform the rhs of an
2025         assignment when compiling to native.
2026
2027 2003-01-28  Tom Tromey  <tromey@redhat.com>
2028
2029         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
2030
2031 2003-01-28  Tom Tromey  <tromey@redhat.com>
2032
2033         * lex.c (java_lex): Don't include UEOF as part of token.
2034         (java_read_unicode): Error if \u sequence prematurely terminated.
2035
2036 2003-01-27  Tom Tromey  <tromey@redhat.com>
2037
2038         * parse.y (java_check_regular_methods): Check for construct after
2039         checking types in throws clause.
2040
2041 2003-01-24  Tom Tromey  <tromey@redhat.com>
2042
2043         * class.c (build_static_field_ref): Only a String or numeric field
2044         can fold to a constant.
2045
2046 2003-01-23  Tom Tromey  <tromey@redhat.com>
2047
2048         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
2049         file name in resource buffer.
2050
2051 2003-01-23  Tom Tromey  <tromey@redhat.com>
2052
2053         * expr.c (build_known_method_ref): Use method's context to find
2054         method table index.
2055
2056 2003-01-23  Tom Tromey  <tromey@redhat.com>
2057
2058         * constants.c (set_constant_entry): Allocated cleared memory.
2059
2060 2003-01-22  Tom Tromey  <tromey@redhat.com>
2061
2062         * java-tree.h: Don't use PARAMS.
2063         * resource.c: Add prototypes for all functions.
2064         (write_resource_constructor): Use `const char *' to avoid
2065         warning.
2066
2067 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
2068
2069         * jcf-parse.c (process_zip_dir): Remove unused variable.
2070
2071 2003-01-22  Tom Tromey  <tromey@redhat.com>
2072
2073         * expr.c (build_invokeinterface): Abort if method's context is not
2074         an interface.
2075
2076 2003-01-22  Tom Tromey  <tromey@redhat.com>
2077
2078         * gcj.texi (Input and output files): Mention non-class entries.
2079         * decl.c (java_init_decl_processing): Call
2080         init_resource_processing.
2081         * java-tree.h (compile_resource_data, write_resource_constructor,
2082         compile_resource_file, init_resource_processing): Declare.
2083         * config-lang.in (gtfiles): Added resource.c.
2084         * Make-lang.in (gt-java-resource.h): New target.
2085         (JAVA_OBJS): Added resource.o.
2086         (java/resource.o): New target.
2087         * resource.c: New file.
2088         * class.c (compile_resource_file): Moved to resource.c.
2089         (registerResource_libfunc): Likewise.
2090         (utf8_decl_list): Mark with GTY; now static.
2091         * jcf-parse.c (classify_zip_file): New function.
2092         (parse_zip_file_entries): Use it; compile .properties files.
2093         (process_zip_dir): Use classify_zip_file and compute_class_name.
2094         Don't write class name into zip directory.
2095         (java_parse_file): Call write_resource_constructor.
2096         (compute_class_name): New function.
2097         * jcf-io.c (read_zip_member): Reindented.
2098
2099 2003-01-21  Tom Tromey  <tromey@redhat.com>
2100
2101         * class.c (supers_all_compiled): New function.
2102         (make_class_data): Use it.
2103
2104 2003-01-21  Tom Tromey  <tromey@redhat.com>
2105
2106         * parse.y (method_header): Native method can't be strictfp.
2107         No method can be transient or volatile.
2108
2109 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2110
2111         Make-lang.in (jvspec.o-warn): Add -Wno-error.
2112
2113 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
2114
2115         * check-init.c: Fix comment typos.
2116         * class.c: Likewise.
2117         * constants.c: Likewise.
2118         * decl.c: Likewise.
2119         * except.c: Likewise.
2120         * expr.c: Likewise.
2121         * java-except.h: Likewise.
2122         * java-tree.h: Likewise.
2123         * javaop.h: Likewise.
2124         * jcf-dump.c: Likewise.
2125         * jcf-io.c: Likewise.
2126         * jcf-parse.c: Likewise.
2127         * jcf-write.c: Likewise.
2128         * lang.c: Likewise.
2129         * mangle.c: Likewise.
2130         * typeck.c: Likewise.
2131         * verify.c: Likewise.
2132
2133 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2134
2135         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2136         * jcf-write.c: Include "tm_p.h".
2137
2138 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2139
2140         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2141
2142 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2143
2144         * builtins.c (java_build_function_call_expr): Renamed from
2145         build_function_call_expr.  All callers changed.
2146
2147         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2148         * jcf-parse.c: Include tm_p.h.
2149
2150         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2151         warning.
2152
2153 2003-01-14  Tom Tromey  <tromey@redhat.com>
2154
2155         * class.c (make_class_data): Check that super is compiled before
2156         building class reference to it.
2157
2158 2003-01-14  Andrew Haley  <aph@redhat.com>
2159
2160         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2161         varargs function -- correct.
2162
2163 2003-01-14  Andrew Haley  <aph@redhat.com>
2164
2165         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2166
2167 2003-01-14  Andrew Haley  <aph@redhat.com>
2168
2169         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2170         varargs function -- correct.
2171
2172         * parse.y (patch_assignment): Copy the rhs of an assignment into a
2173         temporary if the RHS is a reference.
2174
2175 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2176
2177         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2178         * keyword.h: Regenerated.
2179
2180         * All Files: Convert to ISO C style function definitions.
2181
2182 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2183
2184         * parse.y (check_pkg_class_access): ANSIfy definition.
2185
2186 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2187
2188         * decl.c, parse-scan.y, parse.y: Don't cast return value of
2189         xmalloc et al.
2190
2191         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2192
2193 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2194
2195         Merge from pch-branch:
2196
2197         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
2198
2199         * Make-lang.in (java/gjavah.o): Update dependencies.
2200         * gjavah.c: Include ggc.h.
2201
2202         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
2203
2204         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2205         (JCFDUMP_OBJS): Add ggc-none.o.
2206         (java/jcf-dump.o): Depend on GGC_H.
2207         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2208         CPool substructures.
2209         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2210         * jcf-dump.c: Include ggc.h.
2211
2212         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2213
2214         * jcf.h (union cpool_entry): New.
2215         (struct CPool): Use gengtype to mark.  Change field 'data' to be
2216         an array of unions.
2217         (struct JCF): Use gengtype to mark.
2218         (CPOOL_UINT): Update for new cpool_entry type.
2219         (CPOOL_USHORT1): Likewise.
2220         (CPOOL_USHORT2): Likewise.
2221         (CPOOL_FINISH): Use GC to free cpool subfields.
2222         * parse.h (struct parser_ctxt): Mark field current_jcf.
2223         * lex.c (java_init_lex): Use GC to allocate struct JCF.
2224         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2225         (main_jcf): Use gengtype to mark.
2226         (ggc_mark_jcf): Delete.
2227         (get_constant): Update for new cpool_entry type.
2228         (give_name_to_class): Likewise.
2229         (get_class_constant): Likewise.
2230         (init_outgoing_cpool): Use GGC to allocate struct CPool.
2231         (java_parse_file): Use GGC to allocate struct JCF.
2232         (init_jcf_parse): Don't call ggc_add_root.
2233         * jcf-reader.c (jcf_parse_constant_pool): Update for new
2234         cpool_entry type.
2235         * java-tree.h (current_jcf): Use gengtype to mark.
2236         (CPOOL_UTF): Update for new cpool_entry type.
2237         (outgoing_cpool): Use gengtype to mark.
2238         (struct lang_type): GC struct JCF and struct CPool.
2239         * config-lang.in (gtfiles): Add jcf.h.
2240         * constants.c (find_tree_constant): New.
2241         (set_constant_entry): Allocate cpool subfields using GGC.  Update
2242         for new cpool_entry type.
2243         (find_constant1): Update for new cpool_entry type.
2244         (find_constant2): Likewise.
2245         (find_utf8_constant): Use find_tree_constant.
2246         (find_class_or_string_constant): Remove unnecessary cast to jword.
2247         Update for new cpool_entry type.
2248         (count_constant_pool_bytes): Update for new cpool_entry type.
2249         (write_constant_pool): Likewise.
2250         (alloc_name_constant): Use find_tree_constant.
2251         (build_constants_constructor): Update for new cpool_entry type.
2252
2253         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2254
2255         * parse.y (mark_parser_ctxt): Delete.
2256         (goal): Don't use ggc_add_root.
2257         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2258         (java_pop_parser_context): Let GC free parser_ctxt.
2259         (java_parser_context_resume): Likewise.
2260         * parse.h (struct parser_ctxt): Use gengtype to mark.
2261         (ctxp): Likewise.
2262         (ctxp_for_generation): Likewise.
2263         * lex.h (struct java_lc_s): Mark for gengtype.
2264         (java_lexer): Rearrange for gengtype.
2265         * config-lang.in (gtfiles): Add lex.h, parse.h.
2266
2267 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2268
2269         * All Files: Remove PARAMS macro.
2270
2271         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2272         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2273         `__STDC__' macros.
2274
2275         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2276         VA_CLOSE.
2277
2278 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2279
2280         * Make-lang.in (java.install-common, java.uninstall,
2281         java.install-info, java.install-man): Prepend $(DESTDIR)
2282         to destination paths in all (un)installation commands.
2283         (java.install-common): Rewrite $(LN) command to support
2284         DESTDIR with "ln" as well as with "ln -s".
2285
2286 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2287
2288         * java-tree.h: Protect against multiple inclusion.
2289
2290 2003-01-07  Tom Tromey  <tromey@redhat.com>
2291
2292         * class.c (add_assume_compiled): Don't adjust parent if we're
2293         already at the root of tree.
2294
2295 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2296
2297         * lang.c (dump_compound_expr): Prototype.
2298
2299 2003-01-03  Tom Tromey  <tromey@redhat.com>
2300
2301         Fix for PR java/8712:
2302         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2303         when simply checking against `null'.
2304
2305 2003-01-03  Tom Tromey  <tromey@redhat.com>
2306
2307         * gcj.texi (Standard Properties): Document http.proxyHost and
2308         http.proxyPort.
2309
2310         * gcj.texi (GNU Classpath Properties): Document new properties.
2311
2312 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2313
2314         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2315         java/lang-options.h, java/mangle.c, java/mangle_name.c,
2316         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2317
2318 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2319
2320         * Make-lang.in, boehm.c, buffer.c,
2321           buffer.h, builtins.c, class.c,
2322           config-lang.in, constants.c,
2323           convert.h, decl.c, except.c,
2324           expr.c, java-except.h,
2325           java-tree.h, javaop.def,
2326           jcf-parse.c, jcf-write.c,
2327           jv-scan.c, jvgenmain.c,
2328           jvspec.c, keyword.gperf,
2329           keyword.h, lang-options.h,
2330           lang-specs.h, lang.c, lex.c,
2331           lex.h, mangle.c, mangle_name.c,
2332           parse-scan.y, parse.h, parse.y,
2333           typeck.c, verify.c, xref.c,
2334           xref.h: Replace "GNU CC" with
2335           "GCC" in the copyright header.
2336
2337         * check-init.c, gjavah.c, javaop.h,
2338           jcf-depend.c, jcf-dump.c, jcf-io.c,
2339           jcf-path.c, jcf-reader.c, jcf.h,
2340           zextract.c, zipfile.h: These files are
2341           "part of GCC". Also say "GCC" not "GNU CC".
2342
2343 2002-12-30  DJ Delorie  <dj@redhat.com>
2344
2345         * Make-lang.in: Protect against texi2pod/pod2man failing.
2346
2347 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
2348
2349         * gcj.texi: Use @copying.
2350
2351 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2352
2353         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2354         print_cxx_classname.
2355         (print_cxx_classname): Add add_scope parameter.
2356         (print_class_decls): Do not emit a semicolon after the extern
2357         "Java" block.
2358         (process_file): Adjust calls to print_cxx_classname.
2359
2360 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2361
2362         * gcj.texi: Include Cover Texts in man page.
2363
2364 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
2365
2366         * class.c (build_static_field_ref): Check FIELD_FINAL.
2367
2368         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2369         instead of current_constant_pool_data_ref.
2370         * java-tree.h (current_constant_pool_data_ref): Undefine.
2371         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2372         * jcf-parse.c (init_outgoing_cpool): Don't initialize
2373         current_constant_pool_data_ref.
2374
2375         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2376         not build_internal_class_name.
2377
2378         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2379         Use it when class ref isn't certain to be compiled.
2380
2381 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2382
2383         * gcj.texi: Include gcc-common.texi.
2384         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2385         $(srcdir)/doc/include/gcc-common.texi.
2386
2387 2002-12-22  Anthony Green  <green@redhat.com>
2388
2389         * gcj.texi (Limitations): Add note about org.xml.sax and
2390         org.w3c.dom.
2391
2392 2002-12-20  Tom Tromey  <tromey@redhat.com>
2393
2394         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2395         where minimum case value is Integer.MIN_VALUE.
2396         Fixes PR java/8955.
2397
2398 2002-12-18  Andrew Haley  <aph@redhat.com>
2399
2400         * parse.y (patch_invoke): Force evaluation order when `check' is
2401         set.  For PR libgcj/8945.
2402
2403 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
2404
2405         * gcj.texi: Change version number to 3.4.
2406
2407 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
2408         Andrew Haley <aph@redhat.com>
2409
2410         * parse.y (source_end_java_method): Remove custom encoding of line
2411         numbers for a function decl before passing it to the back end.
2412
2413 2002-12-03  Andrew Haley  <aph@redhat.com>
2414
2415         * class.c (make_class_data): New field, "chain".
2416         * decl.c (java_init_decl_processing): Likewise.
2417
2418 2002-12-02  Tom Tromey  <tromey@redhat.com>
2419
2420         For PR java/8740:
2421         * parse.y (do_resolve_class): Handle qualified name via
2422         recursion.
2423
2424 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2425
2426         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2427         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2428         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2429         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2430         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2431         Include coretypes.h and tm.h.
2432         * Make-lang.in: Update dependencies.
2433
2434 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2435
2436         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2437
2438 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2439
2440         * jcf-reader.c: Don't expand JCF_readu4 inside the
2441         expansion of JCF_SKIP.
2442
2443 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2444
2445         * jcf-reader.c: Don't expand JCF_readu4 inside the
2446         expansion of JCF_SKIP.
2447
2448 2002-11-22  Tom Tromey  <tromey@redhat.com>
2449
2450         * parse.y (patch_binop): Cast right hand side of shift expression
2451         to `int'.  Fixes PR java/8676.
2452
2453 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
2454             Andrew Haley <aph@redhat.com>
2455
2456         * gcc/java/jcf-write.c (write_classfile): Remove target
2457         class file, if it exists, before renaming the temporary
2458         class file to it.
2459
2460 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2461
2462         * jvspec.c (lang_specific_spec_functions): New.
2463
2464 2002-11-18  Tom Tromey  <tromey@redhat.com>
2465
2466         Fix for PR java/7912:
2467         * expr.c (can_widen_reference_to): Allow cast of array to
2468         Cloneable or Serializable.
2469         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2470         (java_io_serializable_identifier_node): Likewise.
2471         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2472         (valid_ref_assignconv_cast_p): Use new identifier nodes.
2473         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2474         java_io_serializable.
2475         * decl.c (java_init_decl_processing): Initialize
2476         java_lang_cloneable_identifier_node and
2477         java_io_serializable_identifier_node.
2478         (java_lang_cloneable_identifier_node): New global.
2479         (java_io_serializable_identifier_node): Likewise.
2480
2481 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2482
2483         * buffer.c: Remove unnecessary casts.
2484         * check-init.c: Likewise.
2485         * class.c: Likewise.
2486         * constants.c: Likewise.
2487         * decl.c: Likewise.
2488         * except.c: Likewise.
2489         * gjavah.c: Likewise.
2490         * jcf-io.c: Likewise.
2491         * jcf-parse.c: Likewise.
2492         * jcf-path.c: Likewise.
2493         * jvspec.c: Likewise.
2494         * lang.c: Likewise.
2495         * lex.c: Likewise.
2496         * verify.c: Likewise.
2497
2498 2002-11-06  Tom Tromey  <tromey@redhat.com>
2499
2500         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2501         a JNI header.
2502
2503 2002-11-05  Tom Tromey  <tromey@redhat.com>
2504
2505         Fix for PR java/6388.
2506         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2507         * java-tree.h (enum java_tree_index): New values
2508         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2509         (decimal_int_max, decimal_long_max): New defines.
2510         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
2511         (error_if_numeric_overflow): Rewrote range checking.
2512         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2513         decimal_long_max.
2514
2515 2002-11-02  Tom Tromey  <tromey@redhat.com>
2516
2517         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2518
2519         * class.c (make_method_value): Put class name, not signature, into
2520         `throws' field.  For PR java/8415.
2521
2522 2002-10-24  Tom Tromey  <tromey@redhat.com>
2523
2524         * gcj.texi (Invoking gij): Document --showversion.
2525         (Standard Properties): java.library.path now set.
2526
2527 2002-10-23  Tom Tromey  <tromey@redhat.com>
2528
2529         * gjavah.c (decode_signature_piece): In JNI mode, print
2530         `jobjectArray' when array depth is nonzero.
2531         Fixes PR java/8296.
2532
2533 2002-10-15  Andrew Haley  <aph@redhat.com>
2534
2535         * parse.y (patch_invoke): Call force_evaluation_order on a static
2536         arg list.
2537         (resolve_qualified_expression_name): Call force_evaluation_order
2538         on a arg list that is part of a Qualified Expression Name.
2539
2540         * lang.c (dump_compound_expr): New.
2541         (java_dump_tree): New.
2542
2543 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
2544
2545         * gcj.texi: Added item describing the GCJ runtime property
2546         "gnu.gcj.progname".
2547
2548 2002-10-15  Richard Henderson  <rth@redhat.com>
2549
2550         * jcf-parse.c (get_constant): Fix type warning.
2551
2552 2002-10-15  Andrew Haley  <aph@redhat.com>
2553
2554         * java-tree.h (java_inlining_merge_static_initializers): Declare.
2555         (java_inlining_map_static_initializers): Declare.
2556
2557 2002-10-14  Andrew Haley  <aph@redhat.com>
2558
2559         * tree-inline.c (remap_block): All local class initialization
2560         flags go in the outermost scope.
2561         (expand_call_inline): Call java_inlining_map_static_initializers.
2562         (expand_call_inline): Call java_inlining_merge_static_initializers.
2563         * java/lang.c (merge_init_test_initialization): New.
2564         (java_inlining_merge_static_initializers): New.
2565         (inline_init_test_initialization): New.
2566         (java_inlining_map_static_initializers): New.
2567
2568 2002-10-11  Mark Wielaard  <mark@klomp.org>
2569
2570         * gcj.texi (Compatibility): Add Limitations and Extensions section.
2571
2572 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2573
2574         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2575
2576 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2577
2578         * parse.y (merge_string_cste): Add parentheses around & within |.
2579
2580 2002-10-08  Tom Tromey  <tromey@redhat.com>
2581
2582         * parse.y (variable_declarator_id): Simplify error path for
2583         array declarator error.  For PR java/8003.
2584
2585 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
2586
2587         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2588         bug_report_url.
2589
2590 2002-10-08  Andrew Haley  <aph@redhat.com>
2591
2592         * parse.y (attach_init_test_initialization_flags): Check for
2593         error_mark_node.
2594
2595 2002-10-07  Anthony Green  <green@redhat.com>
2596
2597         * parse.y (merge_string_cste): Fix bug in string concatenation.
2598
2599 2002-10-03  Michael Koch  <konqueror@gmx.de>
2600
2601         * gcj.texi (Standard properties):
2602         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2603
2604 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2605
2606         PR optimization/6627
2607         * lang.c (java_init): If storing the vbit in function
2608         pointers, ensure that force_align_functions_log is atleast
2609         one to aid compatability with g++ vtables.
2610
2611 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
2612
2613         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2614         foul of type-based aliasing.
2615
2616 2002-09-30  Anthony Green  <green@redhat.com>
2617
2618         * gcj.texi (Invoking jv-scan): Fix texinfo.
2619
2620 2002-09-28  Anthony Green  <green@redhat.com>
2621
2622         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2623         (Code Generation): Add -fno-assert documentation.
2624         * jv-scan.c (flag_assert): New global.
2625         (options): Add assert option.
2626         (help): Add --no-assert documentation.
2627         * parse-scan.y (flag_assert): New global.
2628         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2629         (flag_assert): New global.
2630         * java-tree.h (flag_assert): New global.
2631         * lex.c (java_lex): Obey flag_assert.
2632         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2633         calling cc1.
2634
2635 2002-09-26  Andrew Haley  <aph@redhat.com>
2636
2637         * expr.c (build_java_array_length_access): Check for null pointer.
2638         * expr.c (expand_java_arrayload): Likewise.
2639
2640 2002-09-21  Richard Henderson  <rth@redhat.com>
2641
2642         * jcf-parse.c (get_constant): Decode from IEEE no matter
2643         what the target format.
2644
2645 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
2646
2647         * ChangeLog: Follow spelling conventions.
2648         * class.c: Likewise.
2649         * decl.c: Likewise.
2650         * expr.c: Likewise.
2651         * gjavah.c: Likewise.
2652         * java-tree.h: Likewise.
2653         * jcf-dump.c: Likewise.
2654         * jcf-parse.c: Likewise.
2655         * jvspec.c: Likewise.
2656         * lang.c: Likewise.
2657         * mangle.c: Likewise.
2658         * parse.y: Likewise.
2659
2660 2002-09-17  Tom Tromey  <tromey@redhat.com>
2661
2662         * lex.c (java_read_unicode_collapsing_terminators): Handle case
2663         where \r appears at EOF.  Fixes PR java/7950.
2664
2665 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2666
2667         * jvspec.c (lang_specific_driver): Remove unused variable.
2668
2669 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2670
2671         * java-tree.h (union lang_tree_node): Add chain_next option.
2672
2673 2002-09-16  Richard Henderson  <rth@redhat.com>
2674
2675         * jcf-parse.c (get_constant): Runtime check for IEEE format;
2676         use new real.h interface.
2677         * jcf-write.c (find_constant_index): Use new real.h interface.
2678         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2679
2680 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2681
2682         * lang.c: Follow spelling conventions.
2683
2684 2002-09-11  Per Bothner  <per@bothner.com>
2685
2686         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
2687         constant to the type of the field.
2688         (java_complete_tree):  Remove now-redundant code.
2689
2690         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
2691
2692 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
2693
2694         For PR java/5794:
2695         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2696         return label if a ret instruction for the jsr has been reached.
2697
2698 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
2699
2700         * parse.y (DIR_SEPARATOR): Don't define.
2701         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2702
2703 2002-08-28  Andrew Haley  <aph@redhat.com>
2704
2705         * verify.c (verify_jvm_instructions): Allow exception handler
2706         inside code that is being protected, but generate a warning.
2707         * except.c (link_handler): Initialize `expanded' in new eh_range.
2708         (binding_depth, is_class_level, current_pc): Declare extern.
2709
2710 2002-09-01  Mark Wielaard <mark@klomp.org>
2711
2712         * gcj.texi: Add chapter about system properties.
2713         Fixed some typos.
2714
2715 2002-08-26  Tom Tromey  <tromey@redhat.com>
2716
2717         * parse.y (try_builtin_assignconv): Allow narrowing primitive
2718         conversion if RHS_TYPE is byte, short, or char.
2719
2720 2002-08-22  Tom Tromey  <tromey@redhat.com>
2721
2722         * gcj.texi (Invoking gij): Document -cp and -classpath.
2723
2724 2002-08-21  Tom Tromey  <tromey@redhat.com>
2725
2726         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2727         $(prefix)/share.  For PR libgcj/7633.
2728
2729         For PR java/6005 and PR java/7611:
2730         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2731         (java_can_use_bit_fields_p): New function.
2732
2733 2002-08-16  Tom Tromey  <tromey@redhat.com>
2734
2735         * gcj.texi (Class Initialization): Mention class initialization of
2736         arrays.
2737
2738 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
2739
2740         * Make-lang.in (java-tree-inline.o): New.
2741         (JAVA_OBJS): Add java-tree-inline.o.
2742         * parse.y (source_end_java_method): Call java_optimize_inline.
2743         (java_expand_method_bodies): Save method's tree in
2744         DECL_SAVED_TREE.
2745         (add_stmt_to_compound): Keep track of the number of statments.
2746         * lang.c (java_init): Enable flag_inline_trees.
2747         (java_post_options): If flag_inline_functions is on, enable
2748         flag_inline_trees instread.
2749         (decl_constant_value): New.
2750         (java_tree_inlining_walk_subtrees): New.
2751         * java-tree.h (DECL_NUM_STMTS): New macro.
2752         (java_optimize_inline): Declare.
2753         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2754         Handle a LABEL_EXPR.
2755         * decl.c (build_result_decl): If we already have a DECL_RESULT
2756         don't make another.
2757         (dump_function): New.
2758         (java_optimize_inline): New.
2759         (dump_function): New.
2760
2761 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
2762
2763         For PR java/7483:
2764         * parse.y (build_assertion): Invert return from
2765         desiredAssertionStatus.
2766
2767 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2768
2769         * jcf-write.c (get_access_flags): Return correct access flags for
2770         private and protected inner classes.
2771
2772 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2773
2774         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
2775
2776 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2777
2778         * mangle_name.c: Don't include obstack.h twice.
2779         * xref.c: Don't include obstack.h.
2780
2781 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2782
2783         * class.c: (permanent_obstack): Delete declaration.
2784         * constants.c: (permanent_obstack): Delete declaration.
2785         * except.c: (permanent_obstack): Delete declaration.
2786         * expr.c: (permanent_obstack): Delete declaration.
2787         * jcf-parse.c: (permanent_obstack): Delete declaration.
2788         (saveable_obstack): Delete declaration.
2789         * parse.h: (permanent_obstack): Delete declaration.
2790         * typeck.c: (permanent_obstack): Delete declaration.
2791
2792 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2793
2794         * gcj.texi (version-gcc): Increase to 3.3.
2795
2796 2002-07-22  Tom Tromey  <tromey@redhat.com>
2797
2798         * lex.c (java_lex): Check for `e' or `E' after 0.
2799
2800 2002-07-21  Richard Henderson  <rth@redhat.com>
2801
2802         * lang.c (java_unsafe_for_reeval): New.
2803         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2804
2805 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
2806
2807         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
2808         (jcf_path_init): Use GET_ENVIRONMENT.
2809
2810 2002-07-10  Roger Sayle  <roger@eyesopen.com>
2811             Zack Weinberg <zack@codesourcery.com>
2812
2813         * builtins.c (initialize_builtins): Remove defines that
2814         handled C/C++ specific junk hereby removed from builtins.def.
2815
2816 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
2817
2818         * lang.c (java_post_options): Update prototype.
2819
2820 2002-07-05  Roger Sayle  <roger@eyesopen.com>
2821
2822         * builtins.c (initialize_builtins): Ignore the additional
2823         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
2824         the builtins.def file.
2825
2826 2002-07-01  Tom Tromey  <tromey@redhat.com>
2827
2828         For PR libgcj/7073:
2829         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2830         specially.
2831
2832 2002-07-01  Roger Sayle  <roger@eyesopen.com>
2833
2834         * java/decl.c (builtin_function): Accept additional parameter.
2835         (java_init_decl_processing): Pass an additional NULL_TREE
2836         argument to builtin_function.
2837
2838 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
2839
2840         * gcj.texi: Fixed gcj invocation example so that it compiles.
2841
2842 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2843
2844         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
2845         * parse.y (mark_parser_ctxt): Likewise.
2846         (check_modifiers, declare_local_variables): Avoid incorrect
2847         hardcoded constant 10.
2848
2849         * lex.c (java_read_char): Avoid "comparison is always true"
2850         warning.
2851
2852 2002-06-25  Andreas Schwab  <schwab@suse.de>
2853
2854         * expr.c (JSR): Avoid undefined operation on PC.
2855
2856 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2857
2858         * decl.c (clear_binding_level): Const-ify.
2859
2860 2002-06-13  Akim Demaille  <akim@epita.fr>
2861
2862         * parse.y (class_declaration, interface_declaration): Make sure
2863         all their rules have an action, in order to avoid meaningless `$$
2864         = $1' and their type clashes.
2865
2866 2002-06-11  Tom Tromey  <tromey@redhat.com>
2867
2868         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
2869         * parse-scan.y (statement_without_trailing_substatement): Added
2870         assert_statement.
2871         (assert_statement): New rule.
2872         * java-tree.h (struct lang_type) [assertions]: New field.
2873         (TYPE_USES_ASSERTIONS): New macro.
2874         (CLASS_USES_ASSERTIONS): Likewise.
2875         (FIELD_SYNTHETIC): New define.
2876         * lex.c (java_lval;): Added ASSERT_TK.
2877         * parse.y (ASSERT_TK): Added.
2878         (statement_without_trailing_substatement): Added assert_statement.
2879         (assert_statement): New rule.
2880         (build_assertion): New function.
2881         (maybe_generate_pre_expand_clinit): Create and initialize
2882         $assertionsDisabled.
2883         (lookup_package_type): Removed decl.
2884         * keyword.h: Rebuilt.
2885         * keyword.gperf (assert): New token.
2886
2887 2002-06-10  Akim Demaille  <akim@epita.fr>
2888
2889         * parse.y (interface_type_list, class_member_declaration)
2890         (unary_expression_not_plus_minus): Remove duplicate %type.
2891         Whitespace changes.
2892
2893 2002-06-09  Tom Tromey  <tromey@redhat.com>
2894
2895         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
2896
2897         * parse.y (method_header): Give error message in all cases.
2898         Fixes PR java/6865.
2899
2900 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2901
2902         Don't use RTL inlining. Fix for PR java/6820.
2903         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
2904         (flag_really_inline): New.
2905         (java_decode_option): Set flag_really_inline if -finline-functions
2906         is seen.
2907         (java_post_options): New function. Turn off inlining unless
2908         flag_really_inline is set.
2909
2910 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2911
2912         * gjavah.c (throwable_p): Accept argument as either a classname or
2913         signature fragment. Create null-terminated classname string for super
2914         when calling itself recursively.
2915         (decode_signature_piece): Skip first character from class name
2916         signature when calling throwable_p.
2917
2918 2002-06-08  H.J. Lu  (hjl@gnu.org)
2919
2920         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2921
2922 2002-06-04  Tom Tromey  <tromey@redhat.com>
2923
2924         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
2925
2926 2002-06-04  Michael Koch  <konqueror@gmx.de>
2927
2928         * gcj.texi (Input Options): Fixed typo.
2929
2930 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
2931
2932         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
2933         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
2934         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
2935         and all now-pointless local variables.  Rename other local
2936         variables to reflect their not being handles.
2937
2938         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
2939         #if JCF_USE_STDIO blocks.
2940
2941         * parse.y: Add missing semicolon at end of rule.
2942
2943 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2944
2945         * check-init.c (attach_initialized_static_class): Delete, unused.
2946         * parse.y: Use htab_t instead of struct hashtable, update
2947         all uses.
2948         * java-tree.h: Include hashtab.h instead of hash.h.
2949         (struct lang_decl_func): Use htab_t, set up for gengtype.
2950         (struct init_test_hash_entry): Delete.
2951         (struct treetreehash_entry): New.
2952         (java_treetreehash_find): New
2953         (java_treetreehash_new): New prototype.
2954         (java_treetreehash_create): New prototype.
2955         (java_mark_tree): Delete prototype.
2956         (java_hash_hash_tree_node): Delete prototype.
2957         (java_hash_compare_tree_node): Delete prototype.
2958         (attach_initialized_static_class): Delete prototype.
2959         * expr.c (build_class_init): Update to use java_treetreehash
2960         functions.
2961         (java_expand_expr): Update to use htab_t.
2962         (emit_init_test_initialization): Likewise.
2963         * decl.c (java_mark_tree): Delete.
2964         * class.c (init_test_hash_newfunc): Delete.
2965         (java_hash_hash_tree_node): Delete.
2966         (java_hash_compare_tree_node): Delete.
2967         (add_method_1): Update to use java_treetreehash functions.
2968         (JAVA_TREEHASHHASH_H): New macro.
2969         (java_treetreehash_hash): New function.
2970         (java_treetreehash_compare): New function.
2971         (java_treetreehash_find): New function.
2972         (java_treetreehash_new): New function.
2973         (java_treetreehash_create): New function.
2974         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
2975
2976         * Make-lang.in (java/parse.o): Depend on debug.h.
2977         * java-tree.h (struct lang_identifier): Use gengtype.
2978         (union lang_tree_node): New.
2979         (struct lang_decl_func): Use gengtype.
2980         (struct lang_decl_var): Likewise.
2981         (struct lang_decl): Likewise.
2982         * parse.y: Include debug.h.
2983         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
2984
2985         * lang.c (struct language_function): New dummy structure.
2986
2987         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
2988         descriminator for DECL_LANG_SPECIFIC.
2989         (struct lang_decl_func): Rename from struct lang_decl.
2990         (enum lang_decl_desc): New.
2991         (struct lang_decl): Make it a union.  Update all the accessor macros.
2992         (struct lang_type): Use gengtype.
2993         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
2994         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
2995         are now the same size.
2996         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
2997         use discriminator to mark DECL_LANG_SPECIFIC.
2998
2999         * Make-lang.in (gt-java-builtins.h): New rule.
3000         (java/builtins.o): Add dependency on gt-<filename>.h.
3001         * builtins.c: Use gengtype for roots.
3002         (union string_or_tree): Use gengtype.
3003         (struct builtin_record): Use gengtype.
3004         * config-lang.in (gtfiles): Add builtins.c.
3005
3006         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
3007         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
3008         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
3009         gt-java-parse.h, gtype-java.h): Add rules to generate.
3010         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
3011         (class.o): Add dependency on gt-*.h.
3012         (constants.o): Likewise.
3013         (decl.o): Likewise.
3014         (expr.o): Likewise.
3015         (jcf-parse.o): Likewise.
3016         (jcf-write.o): Likewise.
3017         (lang.o): Likewise.
3018         * config-lang.in (gtfiles): New.
3019         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3020         * constants.c: Replace uses of ggc_add_* with GTY markers.
3021         Include gt-*.h.
3022         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3023         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3024         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
3025         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
3026         Include gt-*.h.
3027         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
3028         Include gt-*.h.
3029         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3030         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
3031         gt-*.h.
3032         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3033         Include gtype-java.h.
3034
3035 2002-06-02  Tom Tromey  <tromey@redhat.com>
3036
3037         Fix for PR java/5913:
3038         * parse.y (patch_binop): Call patch_string on op1.
3039
3040 2002-06-02  Tom Tromey  <tromey@redhat.com>
3041
3042         Fix for PR java/1343, PR java/6336:
3043         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
3044         formatting.  Changed return type.
3045         (anonymous_class_counter): Moved to top of file.
3046         (maybe_make_nested_class_name): Append number to class name for
3047         function-local classes.
3048
3049 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3050
3051         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
3052         * Make-lang.in: Update dependency lists.
3053
3054 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
3055
3056         * gjavah.c (throwable_p): Do not free the name of the class after
3057         passing it to find_class.
3058         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
3059         * jcf-io.c (dirent.h): Include it.
3060         (fnmatch.h): Likewise.
3061         (compare_path): New function.
3062         (java_or_class_file): Likewise.
3063         (memoized_dirlist_entry): New type.
3064         (memoized_dirlist_lookup_eq): New function.
3065         (memoized_dirlists): New variable.
3066         (caching_stat): New function.
3067         (memoized_class_lookup_eq): New function.
3068         (memoized_class_lookups): Likewise.
3069         (find_class): Use memoized_class_lookups and caching_stat.
3070         * jcf.h (JCF_USE_SCANDIR): Define.
3071         * parse.y (java_expand_classes): Write the class files in reverse
3072         order.
3073
3074 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3075
3076         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
3077
3078 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
3079
3080         * jcf-write.c (write_classfile): Unlink the temporary file if it
3081         cannot be renamed.  Use concat to build up the name of the
3082         temporary file.
3083
3084 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
3085
3086         * jcf-write.c (write_classfile): Write the file to a
3087         temporary file and then rename it.
3088
3089 2002-05-07  Tom Tromey  <tromey@redhat.com>
3090
3091         * gjavah.c (throwable_p): Use xstrdup, not strdup.
3092
3093         Fix for PR java/1200:
3094         * gjavah.c (throwable_p): New function.
3095         (decode_signature_piece): Use it.  A `WeakReference' isn't the
3096         same as a `jweak'.
3097         Include hashtab.h.
3098         (gcjh_streq): New function.
3099
3100 2002-05-07  Andreas Jaeger  <aj@suse.de>
3101
3102         * parse.y (finish_for_loop): Fix if statement.
3103
3104 2002-05-06  Tom Tromey  <tromey@redhat.com>
3105
3106         Fix for PR java/5941:
3107         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3108         loop update expression.
3109         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3110         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3111
3112 2002-05-04  Mark Wielaard  <mark@klomp.org>
3113
3114         For PR java/6519:
3115         * parse.y (build_string_concatenation): Return just op1 only when op2
3116         is null and op1 is a STRING_CST, otherwise always construct a
3117         StringBuffer.
3118
3119 2002-04-27  Tom Tromey  <tromey@redhat.com>
3120
3121         For PR java/6382:
3122         * parse.y (string_convert_int_cst): New function.
3123         (merge_string_cste): Use it.
3124
3125 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3126
3127         * java-tree.h (java_parse_file): Update.
3128         (java_set_yydebug): Remove.
3129         * jcf-parse.c (yydebug): Remove.
3130         (java_set_yydebug): Die.
3131         (java_parse_file): Update.
3132         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3133
3134 2002-04-24  Tom Tromey  <tromey@redhat.com>
3135
3136         For PR java/6425:
3137         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3138         EXPR_WFL_QUALIFICATION of qual_wfl.
3139
3140 2002-04-23  Per Bothner  <per@bothner.com>
3141
3142         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
3143         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
3144         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
3145
3146 2002-04-23  Tom Tromey  <tromey@redhat.com>
3147
3148         For PR java/6314:
3149         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
3150         recognize `-fcompile-resource='.
3151         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
3152         a bit.
3153
3154 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3155
3156         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3157         paths. Fixes PR java/2791.
3158
3159 2002-04-19  Andrew Haley  <aph@redhat.com>
3160
3161         * jcf-write.c (push_long_const): lo, hi: New variables.
3162         Use rshift_double to extract the high part of a 64-bit long.
3163         Use WORD_TO_INT to extract the low part.
3164
3165         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3166         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
3167         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3168
3169 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3170
3171         * typeck.c (incomplete_type_error): Remove.
3172
3173 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3174
3175         * class.c (make_class_data): Set DECL_ALIGN on static class data,
3176         for hash synchronization.
3177         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3178         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3179         class_type_node.
3180
3181 2002-04-16  Mark Wielaard  <mark@klomp.org>
3182
3183         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3184         negative zero.
3185
3186 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3187
3188         Fix for PR java/6294:
3189         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3190         interfaces.
3191
3192 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3193
3194         Fix for PR java/6085:
3195         * parse.y (patch_method_invocation): Always use build_access_to_thisn
3196         to get enclosing "this" argument for inner-class constructor
3197         invocation. Pass correct arguments to build_access_to_thisn.
3198
3199 2002-04-10  Andreas Jaeger  <aj@suse.de>
3200
3201         * gcj.texi (Input Options): Fix extdirs patch.
3202
3203 2002-04-10  Anthony Green  <green@redhat.com>
3204
3205         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3206
3207 2002-04-09  Anthony Green  <green@redhat.com>
3208
3209         * gcj.texi (Input Options): Add --extdirs documentation.
3210         * jcf-dump.c (OPT_extdirs): New macro.
3211         (options): Add extdirs option.
3212         (help): Describe --extdirs.
3213         (main): Handle OPT_extdirs.
3214         * gjavah.c (OPT_extdirs): New macro.
3215         (options): Add extdirs option.
3216         (help): Describe --extdirs.
3217         (main): Handle OPT_extdirs.
3218         * jcf-path.c (jcf_path_init): Add extdirs support.
3219         (jcf_path_extdirs_arg): New function.
3220         (extensions): New variable to hold extensions path entries.
3221         * jvspec.c: Remove -fextdirs= when compiling main().
3222         * lang.c (java_decode_option): Handle -fextdirs=.
3223         * jcf.h (jcf_path_extdirs_arg): Declare new function.
3224         * Make-lang.in: Compile jcf-path with version info for use in
3225         identifying the appropriate libgcj.jar.
3226
3227 2002-04-08  Tom Tromey  <tromey@redhat.com>
3228
3229         For PR libgcj/5303:
3230         * .cvsignore: Added rmic.1 and rmiregistry.1.
3231         * gcj.texi (Top): Link to new nodes.
3232         (Invoking rmic): New node.
3233         (Invoking rmiregistry): Likewise.
3234         * Make-lang.in (java.generated-manpages): Added rmic.1 and
3235         rmiregistry.1.
3236         (java.maintainer-clean): Likewise.
3237         ($(srcdir)/java/rmic.1): New target.
3238         ($(srcdir)/java/rmiregistry.1): Likewise.
3239         (java.install-man): Handle rmic.1 and rmiregistry.1.
3240
3241 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3242
3243         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3244         Add note about handling uncaught exceptions. Add an exception handler
3245         to example.
3246
3247 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3248
3249         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3250         after using it to patch CALL_EXPR.
3251
3252 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3253
3254         * gcj.texi (Invocation): Document CNI invocation API.
3255
3256 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3257
3258         * expr.c (truthvalue_conversion): Rename.  Update.
3259         (expand_compare): Update.
3260         * java-tree.h (java_truthvalue_conversion): New.
3261         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3262
3263 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3264
3265         * java-tree.h (java_mark_addressable): New.
3266         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3267         * typeck.c (mark_addressable): Rename, update.
3268
3269 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3270
3271         * expr.c (build_java_binop): Update.
3272         * java-tree.h (java_signed_type, java_unsigned_type,
3273         java_signed_or_unsigned_type): Update.
3274         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3275         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3276         * parse.y (patch_binop): Update.
3277         * typeck.c (signed_or_unsigned_type, unsigned_type,
3278         signed_type): Update.
3279
3280 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3281
3282         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3283         (java_dummy_print): Remove.
3284         (lang_print_error): Rename.  Exit early if inhibiting output.
3285         (inhibit_error_printing_function): New.
3286         (java_init): Don't set hook.
3287         (lang_init_source): Use new boolean.
3288
3289 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3290
3291         * parse.y (do_resolve_class): Fix infinite recursion.
3292
3293 2002-03-29  Tom Tromey  <tromey@redhat.com>
3294
3295         * parse.y (check_inner_circular_reference): Ignore incomplete
3296         types.
3297
3298 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3299
3300         * Make-lang.in (builtins.o): Update.
3301         * boehm.c (get_boehm_type_descriptor): Update.
3302         * builtins.c: Include langhooks.h.
3303         * decl.c (java_init_decl_processing): Update.
3304         * java-tree.h (java_type_for_mode, java_type_for_size): New.
3305         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3306         Redefine.
3307         * typeck.c (type_for_mode, type_for_size): Update.
3308
3309 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3310
3311         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3312
3313 2002-03-28  Tom Tromey  <tromey@redhat.com>
3314
3315         * except.c (expand_end_java_handler): If the handler type is NULL,
3316         use java.lang.Throwable.  Fixes PR java/5986.
3317
3318 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3319
3320         Fix for PR java/4715:
3321         * jcf-parse.c (parse_source_file_3): New function.
3322         (read_class): Call it.
3323         (java_parse_file): Likewise.
3324
3325 2002-03-28  Jan Hubicka  <jh@suse.cz>
3326
3327         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3328
3329 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3330
3331         * parse.y (resolve_package): Initialize "decl".
3332         (lookup_package_type): Remove unused function.
3333
3334 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3335
3336         Fix for PR java/5993:
3337         * parse.y (resolve_package): Return the decl if resolution was
3338         successful. Don't special case "java.lang" and "java.lang.reflect"
3339         packages. Set type_name to the merged identifier.
3340         (resolved_qualified_expression_name): Print error using "name" if
3341         resolve_package returns NULL_TREE.
3342
3343 2002-03-27  Tom Tromey  <tromey@redhat.com>
3344
3345         * expr.c (expand_invoke): Don't generate null pointer check if
3346         we're calling <init>.
3347
3348 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3349
3350         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3351         fix prototype.
3352         * java-tree.h (java_lang_expand_expr): Similarly.
3353         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3354         (java_init): Don't set hook.
3355
3356 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3357
3358         Fix for PR java/5850:
3359         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3360         context if field was not found in the current scope.
3361         * expr.c (lookup_field): Don't look in enclosing contexts.
3362
3363 2002-03-26  Tom Tromey  <tromey@redhat.com>
3364
3365         Fix for PR java/5942:
3366         * parse.y (init_src_parse): Added sanity check.
3367         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3368         elements, not 11.
3369
3370 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3371
3372         * decl.c (lang_mark_tree): Rename java_mark_tree.
3373         * java-tree.h (java_mark_tree): New.
3374         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3375
3376 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
3377
3378         * lex.c: Change java_perform_atof to take normal parameters
3379         instead of a pointer to a parameter block.  Call it directly
3380         from java_lex.
3381
3382 2002-03-22  Mark Wielaard  <mark@klomp.org>
3383
3384         Fix for PR java/5368:
3385         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3386         when printing error message.
3387
3388 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3389
3390         * decl.c (maybe_build_cleanup): Remove.
3391
3392 2002-03-22  Tom Tromey  <tromey@redhat.com>
3393
3394         Andrew Haley  <aph@cambridge.redhat.com>
3395
3396         * expr.c (build_field_ref): Don't build a check if the field is a
3397         member of `this'.
3398
3399 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
3400
3401         Fix for PR java/6026:
3402         * lex.c (java_lex): Fix parsing of consecutive floats.
3403
3404 2002-03-21  Tom Tromey  <tromey@redhat.com>
3405
3406         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3407         class.
3408
3409 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3410
3411         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3412         insert_block, getdecls, kept_level_p, global_bindings_p): New.
3413
3414 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3415
3416         * gcj.texi: @code{gcj} becomes @command{gcj}.
3417         @code{gcc} becomes @command{gcc}.
3418         GcjRaw changed to gnu.gcc.RawData.
3419
3420 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3421
3422         * decl.c (start_java_method): Use new hook.
3423         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3424         (java_init): Remove old hook.
3425
3426 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3427
3428         * builtins.c (define_builtin): Do nothing if `type' is null.
3429         Fixes PR java/5876.
3430
3431 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3432
3433         * parse.y (parser_check_super_interface): Fix error message
3434         grammar/order.
3435
3436 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3437
3438         * jcf-parse.c (get_constant): Delete unused variables.
3439
3440 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3441
3442         * java-tree.h (java_parse_file): New.
3443         * jcf-parse.c (yyparse): Rename java_parse_file.
3444         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3445
3446 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3447
3448         * parse.y (craft_constructor): Return the constructor decl.
3449         (java_expand_classes): Update comments.
3450         (lookup_method_invoke): Call fix_constructors immediately for
3451         anonymous class. Fixes PR java/5935.
3452
3453 2002-03-15  Anthony Green  <green@redhat.com>
3454
3455         * jcf-parse.c (yyparse): Don't emit class registration
3456         constructor when compiling resource files.
3457
3458 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3459
3460         * lang.c (java_tree_code_type, java_tree_code_length,
3461         tree_code_name): Delete.
3462         (tree_code_type, tree_code_length, tree_code_name): Define.
3463         (java_init): Don't try to copy into the various tree_code
3464         arrays.
3465
3466 2002-03-12  Tom Tromey  <tromey@redhat.com>
3467
3468         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3469         UTF-8, not UCS-2.  Fixes PR java/5923.
3470
3471         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3472         a call_expr wrapped in a convert.  Fixes PR java/5848.
3473
3474 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3475
3476         * jcf-write.c (write_classfile): Improve error strings.
3477
3478 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3479
3480         * lex.c: Adjust comments to GNU standards.
3481
3482 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3483
3484         Fix for PR java/5902:
3485         * lex.c (java_lex): Fix parsing of literals.
3486
3487 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3488
3489         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3490         to prevent it getting evaluated twice in the store checking case.
3491         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3492         examining OBJECT.
3493
3494 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3495
3496         * decl.c (java_init_decl_processing): Make sure class_type_node
3497         alignment is not less than 64 bits if hash synchronization is enabled.
3498
3499 2002-03-08  Per Bothner  <per@bothner.com>
3500
3501         * parse.y (java_complete_lhs):  Check if patch_assignment
3502         returned an error-mark.
3503
3504         * parse.y (try_builtin_assignconv):  Don't special-case zero.
3505
3506 2002-03-08  Per Bothner  <per@bothner.com>
3507
3508         Fix for PR java/5812.
3509         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
3510         here instead of in JSR macro.  Likewise with load_type_state call.
3511         Do the latter on if the return_pc has been verified (the jsr returns).
3512         (JSR):  Now just call build_java_jsr.
3513
3514 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
3515
3516         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3517         (java.install-common): Link native driver to
3518         JAVA_TARGET_INSTALL_NAME.
3519
3520 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
3521
3522         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3523         * builtins.c(sin_builtin): Likewise
3524         * builtins.c(sqrt_builtin): Likewise
3525
3526 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
3527
3528         * java/expr.c, java/jcf-parse.c, java/lex.c:
3529         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3530         REAL_ARITHMETIC blocks unconditional.  Delete some further
3531         #ifdef blocks predicated on REAL_ARITHMETIC.
3532
3533 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3534
3535         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3536         explicit sizeof/sizeof.
3537         * decl.c (java_init_decl_processing): Likewise.
3538         * jcf-parse.c (init_jcf_parse): Likewise.
3539         * parse.y (init_src_parse): Likewise.
3540
3541 2002-03-02  Per Bothner  <per@bothner.com>
3542
3543         Make --CLASSPATH by a synonym for --classpath and -classpath.
3544         Implement --bootclasspath.
3545         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
3546         (classpath_l):  Remove.
3547         (jcf_path_CLASSPATH_arg):  Remove.
3548         (jcf_path_bootclasspath_arg):  New function.
3549         (jcf_path_seal):  Simplify accordingly.
3550
3551         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
3552         (jcf_path_CLASSPATH):  Remove declaration.
3553         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
3554         (lang_specific_driver):  Translate -bootclasspath.
3555         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
3556         * lang.c (decode_lang_options):  Do jcf_path_init first.
3557         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
3558         * gjavah.c:  Also handle --bootclasspath.
3559         Handle --CLASSPATH as a synonum for --classpath.
3560         * jcf-dump.c: Likewise.
3561
3562         "." is not part of system path, but is the default for --classpath.
3563         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
3564         (jcf_path_seal):  Add "." if no CLASSPATH specified.
3565
3566         * gcj.texi:  Document changes.
3567
3568 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3569
3570         * expr.c (build_java_arraystore_check): Fix formatting.
3571
3572 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3573
3574         Fix for PR java/5758, java/5632:
3575         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3576         inner-class separator too.
3577         * parse.y (do_resolve_class): New local `decl_result.'
3578         Progressively build a name for what can have been loaded.
3579
3580 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3581
3582         * expr.c (java_array_data_offset): Removed function.
3583         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3584         (build_java_array_length_access): Obtain "length" value using a
3585         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3586         (build_java_arrayaccess): Correct comment. Access "data" using a
3587         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3588         (build_java_arraystore_check): New function.
3589         (expand_java_arraystore): Use build_java_arraystore_check.
3590         * parse.y (patch_assignment): Simplify code to insert a store check
3591         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3592         * check-init.c (check_init): Update to reflect that an array length
3593         access is now a COMPONENT_REF.
3594         * gcj.texi (Code Generation): Improve documentation of
3595         -fno-bounds-check. Add documentation for -fno-store-check.
3596         * java-tree.h (flag_store_check): Declare.
3597         (build_java_arraystore_check): Declare.
3598         * lang.c (flag_store_check): Initialize to 1.
3599         (lang_f_options): Add store-check option.
3600         * jvspec.c: Don't pass store-check option to jvgenmain.
3601         * lang-options.h: Add help string for -fno-store-check.
3602
3603 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3604
3605         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3606         * java-tree.h (java_dup_lang_specific_decl): New.
3607         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3608
3609 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3610
3611         * builtins.c, decl.c: Delete traditional-mode-related code
3612         copied from the C front end but not used, or used only to
3613         permit the compiler to link.
3614
3615 2002-02-22  Tom Tromey  <tromey@redhat.com>
3616
3617         Fix for PR java/2369:
3618         * jvspec.c (verify_class_name): New function.
3619         (lang_specific_driver): Call it.
3620         (JAVA_START_CHAR_P): New macro.
3621         (JAVA_PART_CHAR_P): Likewise.
3622
3623 2002-02-22  Per Bothner  <per@bothner.com>
3624
3625         * class.c:  Change vtable to be more compatible with g++ v3 abi.
3626         (get_dispatch_table):  Prepend offset-to-top (always 0) and
3627         type_info pointer (currently unimplemented hence NULL) to vtable.
3628         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3629         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
3630         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3631         (build_dtable_decl):  Add declarations for new fields.
3632
3633 2002-02-20  Per Bothner  <per@bothner.com>
3634
3635         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3636         to finit$ (otherwise generate_bytecode_insns drops it). However, we
3637         don't need to set it on the COMPOUND_EXPR - the caller does that.
3638
3639 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3640
3641         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3642         `--CLASSPATH' becomes `--classpath.'
3643         * gjavah.c: Likewise.
3644         * jcf-dump.c: Likewise.
3645         * lang-options.h: Likewise.
3646         * lang.c: Likewise.
3647         * jcf-path.c: Updated comment.
3648         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3649         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3650         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3651         (jcf_path_CLASSPATH_arg): Ditto.
3652         (classpath_u): Updated leading comment.
3653
3654 2002-02-20  Per Bothner  <per@bothner.com>
3655
3656         * builtins.c (check_for_builtin):  New function.
3657         (build_call_or_builtin):  Remove.
3658         * java-tree.h:  Update accordingly.
3659         * expr.c (expand_invoke):  Use build + check_for_builtin instead
3660         of build_call_or_builtin.
3661         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
3662         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3663         flag (which had caused jcf-write to incorrectly emit invokevirtual).
3664
3665 2002-02-17  Tom Tromey  <tromey@redhat.com>
3666
3667         * java-tree.h (TYPE_STRICTFP): New macro.
3668         (struct lang_type) [strictfp]: New field.
3669         (CLASS_STRICTFP): New macro.
3670         (METHOD_STRICTFP): New macro.
3671         (struct lang_decl) [strictfp]: New field.
3672         * parse.y (method_header): Disallow strictfp constructor or
3673         abstract method.
3674         (STRICT_TK): Move before MODIFIER_TK.
3675         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3676         (METHOD_MODIFIERS): Likewise.
3677         (INTERFACE_MODIFIERS): Likewise.
3678         * jcf-write.c (get_access_flags): Likewise.
3679         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3680         (add_method_1): Likewise.
3681         (get_access_flags_from_decl): Likewise.
3682         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
3683         recognize strictfp flag.
3684         * jcf.h (ACC_STRICT): New define.
3685
3686 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
3687
3688         * class.c(build_utf8_ref): Move declaration of decl_size
3689
3690 2002-02-07  Tom Tromey  <tromey@redhat.com>
3691
3692         * gcj.texi (Input Options): --CLASSPATH does not suppress system
3693         path.
3694
3695 2002-02-04  Anthony Green  <green@redhat.com>
3696
3697         * class.c (build_utf8_ref): Put UTF-8 constants into merged
3698         sections if available.
3699
3700 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3701
3702         * parse.y (java_expand_classes): Fix typo in static field loop.
3703
3704 2002-02-02  Richard Henderson  <rth@redhat.com>
3705
3706         * class.c (add_field): Mark static fields external.
3707         (build_class_ref): Remove redundant set.
3708         * parse.y (java_expand_classes): Mark static fields of classes
3709         to be compiled as local.
3710         * jcf-parse.c (parse_class_file): Likewise.
3711
3712 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3713
3714         * gcj.texi (About CNI): New node.
3715
3716 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3717
3718         PR java/5080
3719         * jcf-parse.c : Check for HAVE_LOCALE_H before using
3720         setlocale() with LC_CTYPE as a parameter.
3721         * jv-scan.c: Same.
3722
3723 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
3724
3725         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3726         Follow GNU Coding Standards for --version.
3727
3728 2002-01-28  Tom Tromey  <tromey@redhat.com>
3729
3730         * expr.c (build_jni_stub): Ensure storage for `meth' is
3731         generated.
3732         * parse.y (java_complete_expand_methods): Set
3733         current_function_decl before building JNI stub.
3734
3735 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3736
3737         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3738         BUILT_IN_SQRTF.
3739
3740 2002-01-22  Tom Tromey  <tromey@redhat.com>
3741
3742         * decl.c (java_init_decl_processing): Use add_predefined_file.
3743         Predefine RawData.java.
3744         (predef_filenames): Removed.
3745         (java_init_decl_processing): Don't register predef_filenames.
3746         * jcf-parse.c (add_predefined_file): New function.
3747         (predefined_filename_p): Rewrote.
3748         (predefined_filename_p): No longer static.
3749         * decl.c (java_init_decl_processing): Call initialize_builtins.
3750         * Make-lang.in (JAVA_OBJS): Added builtins.o.
3751         (java/builtins.o): New target.
3752         * builtins.c: New file.
3753         * parse.y (patch_invoke): Use build_call_or_builtin.
3754         * java-tree.h (build_call_or_builtin): Declare.
3755         (initialize_builtins): Declare.
3756         (java_set_exception_lang_code): Removed unused declaration.
3757         (PREDEF_FILENAMES_SIZE): Removed.
3758         (java_tree_index): Added JTI_PREDEF_FILENAMES.
3759         (predef_filenames): New define.
3760         (add_predefined_file): Declare.
3761         (predefined_filename_p): Declare.
3762         * expr.c (expand_invoke): Use build_call_or_builtin.
3763
3764 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3765
3766         * parse.y (patch_switch_statement): Fix format specifier.
3767
3768 2002-01-16  Tom Tromey  <tromey@redhat.com>
3769
3770         More for PR java/5365:
3771         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
3772         default.
3773         (process_file): Generate include for
3774         java.lang.UnsupportedOperationExceptions.
3775
3776 2002-01-15  Andreas Jaeger  <aj@suse.de>
3777
3778         * .cvsignore: Add man pages.
3779
3780 2002-01-15  Tom Tromey  <tromey@redhat.com>
3781
3782         Fix for PR java/5365:
3783         * gjavah.c (process_file): Turn class name into a file name.
3784
3785 2002-01-14  Matthias Klose  <doko@debian.org>
3786
3787         * gcj.texi: Fix whitespace and formatting errors in the
3788         synopsis of the man pages. Update copyright.
3789
3790 2002-01-14  Tom Tromey  <tromey@redhat.com>
3791
3792         For PR libgcj/5303:
3793         * Make-lang.in (java.install-man): Handle jv-convert man page.
3794         (java.generated-manpages): Added jv-convert.1.
3795         (java.uninstall): Remove jv-convert.1.
3796         (java.maintainer-clean): Likewise.
3797         ($(srcdir)/java/jv-convert.1): New target.
3798         * gcj.texi (Top): Link to jv-convert node.
3799         (Individual utilities): Likewise.
3800         (Invoking jv-convert): New node.
3801
3802 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
3803             Martin Kahlert  <martin.kahlert@infineon.com>
3804
3805         * jcf-parse.c (get_constant): Don't swap lo/hi for big
3806         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
3807
3808 2002-01-03  Graham Stott  <grahams@redhat.com>
3809
3810         * class.c (compile_resource_file): Update copyright date.
3811         Constify filename parameter.
3812         (java-tree.h): Update copyright date.
3813         (compile_resource_file): Constify filename parameter.
3814
3815 2002-01-03  Graham Stott  <grahams@redhat.com>
3816
3817         * gcc/jcf-parse.c: Update copyright date.
3818         (yyparse): Constify resource_filename.
3819
3820 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3821
3822         * parse.y (src_parse_roots): Don't needlessly zero init.
3823
3824 2001-12-31  Tom Tromey  <tromey@redhat.com>
3825
3826         * parse.y (dump_java_tree): New function.
3827         (source_end_java_method): Call it.
3828         (end_class_declaration): Likewise.
3829         * lang.c (java_decode_option): Call dump_switch_p.
3830
3831 2001-12-28  Tom Tromey  <tromey@redhat.com>
3832
3833         * gen-table.pl: Don't process characters after \uffff.  Added
3834         comment pointing to input file.
3835
3836 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3837
3838         * gen-table.pl: Const-ify output.  Document the location of a
3839         suitable unicode input file.
3840
3841         * chartables.h: Regenerate.
3842
3843 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3844
3845         * chartables.h: Const-ify.
3846         * gjavah.c (options): Likewise.
3847         * jcf-dump.c (options): Likewise.
3848         * jv-scan.c (options): Likewise.
3849         * lex.c (java_start_char_p, java_part_char_p): Likewise.
3850         * parse.y (binop_lookup): Likewise.
3851
3852 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3853
3854         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
3855         the static arrays that are output.
3856         * jvspec.c (jvgenmain_spec): Make static.
3857         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
3858         * keyword.h: Regenerate.
3859         * lang.c (string_option, process_option_with_no, lang_f_options,
3860         lang_W_options): Const-ify.
3861         * lex.c (java_lex): Likewise.
3862
3863 2001-12-21  Richard Henderson  <rth@redhat.com>
3864
3865         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
3866         (get_boehm_type_descriptor): ... here.  Arrange for the
3867         TREE_TYPE to get set properly.
3868
3869 2001-12-21  Richard Henderson  <rth@redhat.com>
3870
3871         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
3872         only if the target requires collect2.
3873
3874         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
3875
3876 2001-12-20  Tom Tromey  <tromey@redhat.com>
3877
3878         For PR java/4509:
3879         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
3880         CAN_COMPLETE_NORMALLY for the node.
3881         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
3882         generate code for second branch if first branch can't complete
3883         normally.
3884         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
3885         the loop head if the loop body can't complete normally.
3886
3887 2001-12-20  Tom Tromey  <tromey@redhat.com>
3888
3889         For PR java/4766:
3890         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
3891         case where `finally' clause can't complete normally.
3892
3893 2001-12-20  Tom Tromey  <tromey@redhat.com>
3894
3895         Fixes PR java/5057:
3896         * parse.y (analyze_clinit_body): Added this_class parameter.
3897         Check for more cases where we must keep <clinit>.
3898         (maybe_yank_clinit): Cleaned up flow control.
3899
3900 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3901
3902         * decl.c (java_init_decl_processing): Don't initialize
3903         finit_leg_identifier_node.
3904         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
3905         (finit_leg_identifier_node): Remove.
3906         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
3907
3908 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3909
3910         * mangle.c (mangle_member_name): Don't special-case for
3911         NO_DOLLAR_IN_LABEL.
3912         * mangle_name.c (unicode_mangling_length): Likewise.
3913         (append_unicode_mangled_name): Likewise.
3914         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
3915         code.
3916
3917 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3918
3919         * expr.c (build_java_array_length_access): Don't force null pointer
3920         check unless flag_check_references is set.
3921
3922 2001-12-20  Tom Tromey  <tromey@redhat.com>
3923
3924         Fix for PR java/3417:
3925         * parse.y (patch_assignment): Added special processing for
3926         `return'.
3927         (patch_return): Don't convert booleans to integers, and don't
3928         special-case `null'.
3929
3930 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
3931
3932         * config-lang.in (diff_excludes): Remove.
3933
3934 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3935
3936         * gcj.texi: Update link to GCC manual.
3937
3938 2001-12-17  Tom Tromey  <tromey@redhat.com>
3939
3940         * parse.y (link_nested_class_to_enclosing): Removed useless
3941         statement.
3942
3943 2001-12-16  Tom Tromey  <tromey@redhat.com>
3944
3945         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
3946         Fixes PR java/5088.
3947
3948 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
3949
3950         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
3951         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
3952         spelling errors.
3953
3954 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3955
3956         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
3957
3958 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3959
3960         * decl.c (java_init_decl_processing): Build otable_type correctly.
3961         otable_decl is an otable_type.
3962
3963 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3964
3965         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
3966         otable_type, otable_ptr_type, method_symbol_type,
3967         method_symbols_array_type, method_symbols_array_ptr_type): New
3968         field/global tree definitions.
3969         (flag_indirect_dispatch): New flag.
3970         * decl.c (java_init_decl_processing): Initialize new otable and
3971         otable_syms type nodes and decls. Add new field "index" to
3972         method_type_node.
3973         * class.c (build_method_symbols_entry): New function.
3974         (make_method_value): Set "index" to to method's vtable index for
3975         virtual methods when indirect-dispatch is not used.
3976         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
3977         and set vtable_method_count to -1. Set otable and otable_syms field
3978         if indirect-dispatch is used and there was something to put in them.
3979         (build_method_symbols_entry): New function.
3980         (emit_offset_symbol_table): New function.
3981         * expr.c (get_offset_table_index): New function.
3982         (build_invokevirtual): Build array reference to otable at the index
3983         returned by get_offset_table_index, and use the result as the vtable
3984         offset.
3985         (build_invokeinterface): Similar.
3986         * jcf-parse.c (yyparse): If indirect-dispatch, call
3987         emit_offset_symbol_table at the end of compilation, after all classes
3988         have been generated.
3989         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
3990         * lang.c (flag_indirect_dispatch): Define.
3991         (lang_f_options): Add indirect-dispatch flag.
3992
3993 2001-12-14  Matthias Klose  <doko@debian.org>
3994
3995         * gcj.texi: Markup for man page generation. Document missing
3996         options printed by <tool> --help.
3997         Terminate description of gij's -ms option with a dot.
3998         * Make-lang.in ($(srcdir)/java/*.1): New targets.
3999         (java.generated-manpages java.install-man, java.uninstall,
4000         java-maintainer-clean) Updated.
4001
4002 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
4003
4004         * class.c (get_dispatch_table): Fix java vtable layout
4005         for TARGET_VTABLE_USES_DESCRIPTORS.
4006         * decl.c (java_init_decl_processing): Initialize
4007         alloc_no_finalizer_node, finalize_identifier_node.
4008         * expr.c (class_has_finalize_method): New function.
4009         (expand_java_NEW): Generate calls for finalizer-free allocation.
4010         (build_invokevirtual): Fix java vtable layout for
4011         TARGET_VTABLE_USES_DESCRIPTORS.
4012         * java-tree.h (enum java_tree_index): New entries:
4013         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
4014         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
4015         (class_has_finalize_method): declare.
4016         (HAS_FINALIZER_P): New macro.
4017         * parse.y (patch_invoke): Generate calls for finalizer-free
4018         allocation.
4019
4020 2001-12-12  Matthias Klose  <doko@debian.org>
4021
4022         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
4023         whitespace at end of line.
4024
4025 2001-12-11  Tom Tromey  <tromey@redhat.com>
4026
4027         * lex.c (java_init_lex): Define wfl_to_string as
4028         gnu.gcj.runtime.StringBuffer unless generating bytecode.
4029
4030 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
4031
4032         * class.c (make_method_value): Use null_pointer_node to
4033         represent empty exception table.
4034
4035 2001-12-10  Tom Tromey  <tromey@redhat.com>
4036
4037         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
4038
4039 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
4040
4041         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
4042
4043 2001-12-09  Per Bothner  <per@bothner.com>
4044
4045         * check-init.c (current_switch_has_default):  New static field.
4046         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
4047         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
4048         DEFAULT_EXPR seen, simulate a default alternative that copies state.
4049
4050 2001-12-09  Tom Tromey  <tromey@redhat.com>
4051
4052         * check-init.c (check_init): Don't allow pre- or post- increment
4053         or decrement of final variable.
4054         (final_assign_error): Minor error message rewording.
4055
4056 2001-12-08  Tom Tromey  <tromey@redhat.com>
4057
4058         * java-tree.h: Fixed typo.
4059
4060         * gjavah.c (decompile_method): Don't decompile to `return this'
4061         for static methods.
4062
4063         * gjavah.c (cxx_keywords): Re-sorted.
4064         * lex.c (cxx_keywords): Re-sorted.
4065
4066         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
4067         else.
4068
4069         * gjavah.c (print_namelet): Clear subnamelets.
4070         (HANDLE_METHOD): Set `method_printed' earlier.
4071
4072 2001-12-07  Tom Tromey  <tromey@redhat.com>
4073
4074         * lang.c (lang_f_options): Added
4075         optimize-static-class-initialization.
4076         (java_decode_option): Removed special case.
4077
4078 2001-12-07  Per Bothner  <per@bothner.com>
4079
4080         * check-init.c (check_init):  Fix typo freeing memory twice.
4081
4082 2001-12-05  Per Bothner  <per@bothner.com>
4083
4084         Restore support for static class initialization optimization.
4085         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
4086         * check-init.c (check_int):  At end of BLOCK handle initialization
4087         blocks, which used to be done in java_complete_expand_method but did
4088         not handle the case where check_for_initialization might allocate
4089         more than a word of bits.
4090         * decl.c (lang_make_tree):  The smic field is now a tree.
4091         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
4092         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
4093
4094         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
4095
4096         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4097         Change from a hash table to a list.
4098         (struct_lang_decl):  Change field 'smic' to match.
4099         * class.c (add_method_1):  Initialize
4100         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4101         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
4102         (java_expand_method_bodies): -here, since 'smic' is now a list.
4103         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
4104
4105         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
4106
4107         * class.c (java_hash_compare_tree_node):  Fix casts.
4108
4109 2001-12-04  Per Bothner  <per@bothner.com>
4110
4111         * check-init.c:   Handle definite unassignment to finals in addition
4112         to definite assignment.
4113         (loop_current_locals):  New field.
4114         (num_current_locals, int start_current_locals, num_current_words):
4115         Make static.
4116         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
4117         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4118         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
4119         (get_variable_decl, check_final_reassigned):  New functions.
4120         (check_init, check_bool_init):  Modify as needed for checking finals.
4121         (check_for_initialization):  Take extra parameter and return void.
4122         Do extra start-up logic to check final fields for assignment.
4123         * parse.y (check_static_final_variable_assignment_flag,
4124         reset_static_final_variable_assignment_flag, check_final_assignment,
4125         check_final_variable_local_assignment_flag,
4126         reset_final_variable_indirect_assignment_flag,
4127         reset_final_variable_global_assignment_flag):  Remove functions.
4128         (java_complete_expand_methods, outer_field_access_fix,
4129         patch_assignment): Remove no-longer used logic.
4130         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
4131         * parse.y (register_fields, java_complete_tree):  Update accordingly.
4132
4133         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
4134         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
4135         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
4136
4137         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
4138
4139         * java-tree.h (DECL FINAL):  New bit-field.
4140         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
4141         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
4142         (DECL_INIT_CALLS_THIS):  New macro.
4143         (struct lang_decl):  New bit-field init_calls_this.
4144         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4145         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4146         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
4147         use it for both local variables and final fields.
4148         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
4149         and local_final.
4150         (struct lang_type):  Remove hfv bit-field.
4151         (check_for_initialization):  Change to return void.
4152
4153         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
4154         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
4155         * check-init.c (final_assign_error):  New helper function.
4156         (check_final_reassigned, check_init):  Use it.
4157         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4158
4159         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
4160         bit-fields to unsigned.
4161
4162 2001-12-03  Per Bothner  <per@bothner.com>
4163
4164         * parse.y (patch_binop):  Minor constant folding.
4165
4166         * parse.y (build_current_thisn):  Shorter 'buffer'.
4167
4168 2001-12-03  Per Bothner  <per@bothner.com>
4169
4170         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
4171         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4172         * jcf-write.c (generate_bytecode_insns):  Remove support for
4173         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4174         * check-init.c (check_init):  Likewise.
4175
4176 2001-12-03  Per Bothner  <per@bothner.com>
4177
4178         * verify.c (subroutine_nesting):  New function.
4179         (verify_jvm_instructions):  Use it to fix logic for checking that
4180         we're done with the current subroutine.
4181
4182         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4183         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4184
4185 2001-12-03  Per Bothner  <per@bothner.com>
4186
4187         * jcf.h:  Fix obvious typo in comment.
4188         * typeck.c (build_null_signature):  Add comment.
4189
4190 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4191
4192         * expr.c: Remove leading capital from diagnostic messages, as
4193         per GNU coding standards.
4194         * jcf-io.c: Similarly.
4195         * jcf-parse.c: Similarly.
4196         * jv-scan.c: Similarly.
4197         * jvspec.c: Similarly.
4198         * mangle.c: Similarly.
4199
4200 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
4201             Alexandre Petit-Bianco  <apbianco@redhat.com>
4202
4203         * expr.c (build_java_arrayaccess): Call save_expr on array for
4204         correct evaluation order, modified comment, fixed indentation.
4205         * parse.y: (patch_assignment): Correctly extract the array base
4206         from the tree generate by build_java_arrayaccess, added comments.
4207         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4208         Fixes PR java/3096, PR java/3803, PR java/3965.
4209
4210 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4211
4212         * expr.c (expand_byte_code): Remove trailing periods from messages.
4213         * jcf-parse.c (load_class, jcf_parse): Similarly.
4214         * jcf-write.c (generate_classfile): Similarly.
4215         * lex.c (java_lex): Similarly.
4216
4217 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4218
4219         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4220
4221 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4222
4223         * Make-lang.in (java.generated-manpages): New dummy target.
4224
4225 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4226
4227         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4228         ASM_FINAL_SPEC.
4229         (lang_specific_pre_link): Use set_input to set input_filename.
4230         Append `main' here.
4231         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4232         (main): Fix definition.
4233         Strip `main' from classname.
4234         Fixes PR java/227.
4235
4236 2001-11-18  Roger Sayle <roger@eyesopen.com>
4237
4238         * parse.h (java_expand_switch): Remove old prototype.
4239
4240 2001-11-18  Tom Tromey  <tromey@redhat.com>
4241
4242         Fix for PR java/1401:
4243         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4244         arg0 is null.
4245         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4246         correctly.
4247
4248 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4249
4250         * lang.c (finish_parse): Rename to java_finish.
4251         (LANG_HOOKS_FINISH, java_finish): New.
4252
4253 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4254
4255         * decl.c (init_decl_processing): Rename java_init_decl_processing.
4256         * java-tree.h: New prototype.
4257         * lang.c (java_init): Update prototype.  Combine with old init_parse.
4258
4259 2001-11-13  Tom Tromey  <tromey@redhat.com>
4260
4261         * gjavah.c (method_signature): New global.
4262         (HANDLE_METHOD): Set it.
4263         (decompile_return_statement): New function.
4264         (decompile_method): Use it.
4265         (print_method_info): Removed `synth' argument.
4266
4267 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4268
4269         * java-tree.h (java_set_yydebug): New.
4270         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4271         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4272         (print_lang_decl, print_lang_type, print_lang_identifier,
4273         print_lang_statistics, lang_print_xnode): Remove.
4274
4275 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4276
4277         * jcf-parse.c (init_lex): Remove.
4278         * lang.c (language_string, lang_identify): Remove.
4279         (struct lang_hooks): Constify.
4280         (LANG_HOOKS_NAME): Override.
4281         (init_parse): Update.
4282
4283 2001-11-08  Andreas Franck  <afranck@gmx.de>
4284
4285         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4286         program_transform_name the way suggested by autoconf.
4287         (java.install-common): Also transform auxiliary program names with
4288         program_transform_name.
4289
4290 2001-11-08  Tom Tromey  <tromey@cygnus.com>
4291
4292         * parse.y (trap_overflow_corner_case): New rule.
4293         (unary_expression): Use it.
4294         * lex.c (java_init_lex): Don't set minus_seen.
4295         (yylex): Don't use minus_seen.  Communicate overflow to parser for
4296         it to handle.
4297         (error_if_numeric_overflow): New function.
4298         * parse.h (minus_seen): Removed field.
4299         (JAVA_RADIX10_FLAG): New define.
4300
4301 2001-11-07  Tom Tromey  <tromey@redhat.com>
4302
4303         Patch for PR java/1414:
4304         * parse.y (case_label_list): New global.
4305         (goal): Register case_label_list with GC.
4306         (java_complete_lhs): Save new case on case_label_list.
4307         (patch_switch_statement): Check for duplicate case labels.
4308
4309 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4310
4311         * parse.y (patch_assignment): Removed unused third argument.
4312         (java_complete_lhs): Removed unused third argument to patch_assignment.
4313
4314 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4315
4316         * lang.c: Include langhooks-def.h.
4317         * Make-lang.in: Update.
4318
4319 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
4320
4321         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4322
4323 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4324
4325         * mangle.c (find_compression_record_match): Don't match compression
4326         records for package name elements unless they occur at the start of
4327         the name. Fix for PR java/4717.
4328
4329 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4330
4331         * expr.c (expand_java_field_op): Don't special-case references to
4332         java.lang.PRIMTYPE.TYPE.
4333         (build_primtype_type_ref): Removed.
4334         * java-tree.h (build_primtype_type_ref): Remove prototype.
4335         * parse.y (maybe_build_primttype_type_ref): Removed.
4336         (complete_function_arguments): Don't special-case references to
4337         java.lang.PRIMTYPE.TYPE.
4338         (patch_assignment): Likewise.
4339         (array_constructor_check_entry): Likewise.
4340
4341 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4342
4343         * mangle.c (static tree compression_table): Fixed leading comment.
4344         * parse.h (struct parser_ctxt): Fixed field comment.
4345         * parse.y (check_pkg_class_access): New prototype, fixed leading
4346         comment, new parameter used to emit error only if passed as true.
4347         (parse_check_super): Pass extra argument to check_pkg_class_access.
4348         (do_resolve_class): Likewise.
4349         (process_imports): Likewise.
4350         (read_import_dir): Fixed indentation.
4351         (find_in_imports_on_demand): New local class_type_name. Local
4352         node_to_use deleted. while loop changed into for loop. Report
4353         multiple definition only for accessible classes. Improved error
4354         message.
4355         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4356         assigned to parameter list, fixed indentation. while loop changed
4357         into for loop, restore TREE_CHAIN on local `tem' before the next
4358         iteration.
4359
4360 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4361
4362         * lang.c (lang_get_alias_set): Deleted.
4363
4364 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4365
4366         * gjavah.c (jni_print_char): Fix thinko in last change.
4367
4368         * gjavah.c (jni_print_char, decode_signature_piece): Use
4369         safe-ctype macros and/or fold extra calls into fewer ones.
4370         * lex.c (java_read_unicode, java_lex): Likewise.
4371         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4372         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4373         * mangle_name.c (append_unicode_mangled_name,
4374         unicode_mangling_length): Likewise.
4375
4376 2001-10-17  Richard Henderson  <rth@redhat.com>
4377
4378         * Make-lang.in (java/lang.o): Depend on langhooks.h.
4379
4380 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4381
4382         * lang.c (langhooks.h): Included.
4383         (LANG_HOOKS_INIT): Redefined.
4384         (LANG_HOOKS_INIT_OPTIONS): Likewise.
4385         (LANG_HOOKS_DECODE_OPTION): Likewise.
4386         (struct lang_hooks lang_hooks): New initialization.
4387
4388 2001-10-11  Per Bothner  <per@bothner.com>
4389
4390         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
4391         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4392         The former is simpler, and jcf-write.c handles it better.
4393         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
4394         or WITH_CLEANUP_EXPR.
4395         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
4396         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4397
4398         * parse.y (patch_if_else_statement):  If the condition is constant,
4399         optimize away the test.
4400
4401 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4402
4403         * parse.y (patch_cast): Call patch_string on the first operand of
4404         the incoming node, update it if necessary. Fixes PR java/4510.
4405
4406 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4407
4408         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4409         when name qualifier matches a package name.
4410
4411 2001-10-08  Tom Tromey  <tromey@redhat.com>
4412
4413         Fix for PR java/4489:
4414         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4415         force a new label when computing `body_block'.
4416
4417 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4418
4419         * jcf-io.c (format_uint): Const-ify.
4420         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4421         * lex.c (java_get_line_col): Likewise.
4422         * parse.y (build_incdec): Likewise.
4423
4424 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4425
4426         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4427         a NULL enclosing context if appropriate. Fixes PR java/4466.
4428
4429 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4430
4431         * parse.y (patch_assignment): Use lvalue's original TYPE when
4432         building the final COMPOUND_EXPR.
4433         (try_reference_assignconv): Fixed leading comment.
4434
4435 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4436
4437         * parse.y (check_final_variable_indirect_assignment): For
4438         COMPOUND_EXPR, return only if finals were found initialized
4439         properly, if not, keep on checking.
4440         (check_final_variable_global_assignment_flag): New local
4441         error_found, set when appropriate and used to decide whether to
4442         report uninitialized finals. Fixed typo in comment.
4443
4444 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4445
4446         * decl.c (init_decl_processing): Fixed typo in predef_filenames
4447         last three initializations. Fixes PR java/4360.
4448
4449 2001-09-21  Richard Henderson  <rth@redhat.com>
4450
4451         * class.c (get_dispatch_table): Handle function descriptors.
4452         (build_dtable_decl): Likewise.
4453         * expr.c (build_invokevirtual): Likewise.
4454
4455 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4456
4457         * parse.y (patch_method_invocation): Build class initialization
4458         when static finals are used to qualify method invocation.
4459         Fixes PR java/4366.
4460
4461 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
4462
4463         * parse.h: (WFL_STRIP_BRACKET): Re-written using
4464         build_type_name_from_array_name.
4465         (STRING_STRIP_BRACKETS): New macro.
4466         * parse.y (build_type_name_from_array_name): New function.
4467         (array_creation_expression:): Accumulate []s instead of [s.
4468         (cast_expression:): Accumulate []s instead of [s after cast type
4469         name.
4470         (build_array_from_name): Local string deleted, use
4471         build_type_name_from_array_name.
4472         (build_unresolved_array_type): Accumulate []s instead of [s after
4473         type name.
4474         (register_fields): Fixed comment.
4475         (resolve_class): Local name, base deleted, new locals tname and
4476         array_dims. Use build_type_name_from_array_name. Use array_dims to
4477         build array type.
4478         (purify_type_name): Use STRING_STRIP_BRACKETS.
4479
4480 2001-09-18  Andreas Jaeger  <aj@suse.de>
4481
4482         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4483         * jv-scan.c: Likewise.
4484
4485 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4486
4487         * parse.y (patch_method_invocation): Inner class creation context
4488         check not enforced within constructors. Fixes PR java/1873.
4489
4490 2001-09-16  Tom Tromey  <tromey@redhat.com>
4491
4492         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4493         NOTE_PUSH for single-case push.  Fixes PR java/4189.
4494
4495 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4496
4497         * java-tree.h (TYPE_IMPORT_LIST): New macro.
4498         (TYPE_IMPORT_DEMAND_LIST): Likewise.
4499         (struct lang_type): New fields import_list and import_demand_list.
4500         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4501         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4502         (do_resolve_class): New local saved_enclosing_type, initialized,
4503         passed as parameter to find_in_imports and find_in_imports_on_demand.
4504         (find_in_imports): Added paramater enclosing_type, use its
4505         TYPE_IMPORT_LIST when applicable.
4506         (find_in_imports_on_demand): Added parameter enclosing_type, use
4507         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4508         declaration and initialization.
4509         (fold_constant_for_init): Switch/restore current_class to the
4510         appropriate context.
4511
4512 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
4513
4514         * verify.c (verify_jvm_instructions): Fix typo.
4515
4516 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4517
4518         * expr.c (expand_invoke): Const-ification.
4519         * parse.y (patch_method_invocation): Likewise.
4520
4521 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4522
4523         * gjavah.c (cxx_keywords): Const-ification.
4524         * keyword.gperf (java_keyword): Likewise.
4525         * lang.c (java_tree_code_name): Likewise.
4526         * lex.c (cxx_keywords): Likewise.
4527         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4528
4529 2001-09-11  Richard Henderson  <rth@redhat.com>
4530
4531         * parse.h (ctxp_for_generation): Mark extern.
4532
4533 2001-09-10  Richard Henderson  <rth@redhat.com>
4534
4535         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4536
4537 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4538
4539         * typeck.c (java_array_type_length, build_prim_array_type):
4540         Represent empty arrays by NULL index.
4541
4542 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
4543
4544         * java-tree.h (compile_resource_file): Grouped with other prototypes.
4545         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4546
4547 2001-09-06  Anthony Green  <green@redhat.com>
4548
4549         * class.c (O_BINARY): Define if necessary.
4550         (registerResource_libfunc): Declare.
4551         (init_class_processing): Initilize registerResource_libfunc.
4552         (compile_resource_file): New function.
4553         * java-tree.h (resource_name): Declare.
4554         (compile_resource_file): Declare.
4555         * jcf-parse.c (yyparse): Handle compiling java resource files.
4556         * lang.c (java_decode_option): Handle -fcompile-resource option.
4557         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4558         resource files.
4559         * gcj.texi (Code Generation): Add documentation for -R flag.
4560
4561 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
4562
4563         * jcf-write.c (generate_classfile): Issue an error in case of
4564         field/initial value mismatch.
4565         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4566         being initialized and we're generating bytecode.
4567         (java_complete_lhs): In MODIFY_EXPR section: added comments,
4568         set DECL_INITIAL properly when appropriate.
4569         Fixes PR java/4230
4570         Fixes PR java/4204
4571
4572 2001-09-01  Per Bothner  <per@bothner.com>
4573
4574         * parse.y (maybe_yank_clinit):  A field without an initializer is not
4575         relevant.  All initializers except static final and constant require
4576         <clinit>, regardless of flag_emit_class_files.
4577
4578 2001-08-31  Per Bothner  <per@bothner.com>
4579
4580         * class.c (set_constant_value):  When not emitting class files, then a
4581         String ConstantValue is a utf8const_ptr_type.
4582
4583 2001-08-30  Per Bothner  <per@bothner.com>
4584
4585         * jcf-write.c (generate_classfile):  Check that field is primitive
4586         or string before emitting ConstantValue attribute.
4587
4588 2001-08-30  Per Bothner  <per@bothner.com>
4589
4590         * parse.y (resolve_qualified_expression_name):  If creating a
4591         COMPOUND_EXPR, set it's type correctly.
4592
4593 2001-08-30  Per Bothner  <per@bothner.com>
4594
4595         * jcf-io.c (open_class):  Set filename field.
4596
4597         * jcf-parse,c (parse_class_file):  Set current_function_decl
4598         for better error message when Code attribute is missing.
4599
4600         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
4601         better diagnostics, especially for constructors.
4602
4603 2001-08-30  Per Bothner  <per@bothner.com>
4604
4605         * jcf-write.c (generate_classfile):  Don't write ConstantValue
4606         attribute if field is not final, for compatibility with jdk.
4607
4608         * jcf-write.c (generate_classfile):  Convert ConstantValue values
4609         to correct type.  Work-around for front-end bug.
4610         * class.c (set_constant_value):  Error if constant has wrong type.
4611
4612 2001-08-30  Per Bothner  <per@bothner.com>
4613
4614         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
4615         "Double" are printed at verbosity 1.
4616
4617         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
4618
4619         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
4620
4621 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4622
4623         * parse.y (patch_assignment): Don't verify final re-assignment here.
4624         (java_complete_lhs): Verify assignments to finals calling
4625         patch_assignment. Verify re-assignments to finals before calling
4626         patch_assignment.
4627
4628 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
4629
4630         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4631         Fixes PR java/1413
4632
4633 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4634
4635         * lex.c (java_lex): new local found_hex_digits. Set and then used
4636         in test to reject invalid hexadecimal numbers.
4637         * parse.y (java_complete_tree): Prevent unwanted cast with
4638         initialized floating point finals.
4639         (patch_binop): Emit a warning when detecting a division by zero,
4640         mark result not constant, don't simplify non integer division.
4641
4642 2001-08-28  Per Bothner  <per@bothner.com>
4643
4644         * jcf-write.c  (generate_bytecode_insns):  For increments and
4645         decrements just recurse to push constant.  Improvement on Mark's patch.
4646
4647 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
4648
4649         * jcf-write.c (generate_bytecode_insns): Generate an integer to
4650         real conversion for increments and decrements of reals.
4651
4652 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4653
4654         * parse.y (resolve_qualified_expression_name): Handle unresolved
4655         qualified expressions, prevent numerical qualifiers, fixed typo.
4656         Fixes PR java/4141
4657
4658 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4659
4660         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4661         don't report anything but deprecated class when marked so. Handle
4662         VAR_DECL.
4663         (patch_method_invocation): Check deprecation on methods and types.
4664         (patch_binop): code becomes an enum tree_code, added default: to
4665         switch to handle that. Detect division by zero, try to fold and
4666         return before using a subroutine.
4667
4668 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4669
4670         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4671         file smaller than 4 bytes.
4672         * parse.y (check_inner_circular_reference): New function.
4673         (check_circular_reference): Likewise.
4674         (array_initializer:): Accept {,}.
4675         (java_check_circular_reference): Rewritten using
4676         check_circular_reference and check_inner_circular_reference.
4677         (java_complete_expand_method): Unconditionally save and restore
4678         the unpurged exception list.
4679         (build_dot_class_method_invocation): Unmangle signature parameter.
4680
4681 2001-08-21  Tom Tromey  <tromey@redhat.com>
4682
4683         * decl.c (init_decl_processing): Add `throws' field to method
4684         descriptor.
4685         * class.c (make_method_value): Compute `throws' field for method.
4686
4687 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4688
4689         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4690         circularity is detected.
4691         (ctors_unchecked_throws_clause_p): Fixed leading comment.
4692
4693 2001-08-17  Richard Henderson  <rth@redhat.com>
4694
4695         * class.c (emit_register_classes): Add align parameter to
4696         call to assemble_integer.
4697
4698 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
4699
4700         * jcf-parse.c (load_class): New locals saved and class_loaded. If
4701         loading a class_or_name fails, try considering an innerclass name
4702         and load the enclosing context.
4703         * parse.y (resolve_inner_class): New function.
4704         (find_as_inner_class): Added leading comment.
4705         (register_incomplete_type): Keep the current context as enclosing
4706         context for JDEP_FIELD dependencies.
4707         (do_resolve_class): Locals new_class_decl and super initialized to
4708         NULL. Call resolve_inner_class, explore the enclosing context
4709         superclass if necessary.
4710         Fixes PR java/4007
4711
4712 2001-08-16  Tom Tromey  <tromey@redhat.com>
4713
4714         * jcf-dump.c (main): Updated for change to jcf_path_seal.
4715         * gjavah.c (main): Updated for change to jcf_path_seal.
4716         * lang.c (version_flag): New global.
4717         (java_decode_option): Recognize `-version'.
4718         (java_init): Update for change to jcf_path_seal.
4719         * jcf.h (jcf_path_seal): Added `print' argument.
4720         * jcf-path.c (jcf_path_seal): Added `print' argument.
4721
4722 2001-08-13  Zack Weinberg  <zackw@panix.com>
4723
4724         * Make-lang.in (java/decl.o): Update dependencies.
4725         * decl.c: Include libfuncs.h, don't include toplev.h.
4726
4727 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4728
4729         * decl.c (init_decl_processing): exception_type_node,
4730         class_not_found_type_node, and no_class_def_found_type_node
4731         initialized. predef_filenames augmented accordingly.
4732         instinit_identifier_node initialized.
4733         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4734         * java-tree.h (enum java_tree_index): New entries
4735         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4736         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4737         (exception_type_node): New macro.
4738         (class_not_found_type_node): Likewise.
4739         (no_class_def_found_type_node): Likewise.
4740         (instinit_identifier_node): Likewise.
4741         (PREDEF_FILENAMES_SIZE): Adjusted.
4742         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4743         (struct lang_type): Fixed typo in bitfield name.
4744         (DECL_INSTINIT_P): New macro.
4745         (ID_INSTINIT_P): Likewise.
4746         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4747         attribute.
4748         * parse.y (encapsulate_with_try_catch): New function.
4749         (generate_instinit): Likewise.
4750         (build_instinit_invocation): Likewise.
4751         (ctors_unchecked_throws_clause_p): Likewise.
4752         (add_instance_initializer): Deleted.
4753         (build_instance_initializer): Likewise.
4754         (in_instance_initializer): Likewise.
4755         (check_method_redefinition): instinit$ not to be verified.
4756         (java_complete_expand_methods): Generate instinit$, simplified code.
4757         (build_dot_class_method): Eliminated unnecessary locals. Use
4758         encapsulate_with_try_catch, removed unnecessary code.
4759         (fix_constructors): New local iii. Use build_instinit_invocation.
4760         (patch_method_invocation): Added comment.
4761         (maybe_use_access_method): Don't consider instinit$.
4762         (find_applicable_accessible_methods_list): Shorten the search for
4763         instinit$ too.
4764         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4765         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4766         (patch_throw_statement): Likewise. Fixed typo.
4767
4768 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
4769
4770         Revert:
4771         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4772         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4773         ASM_FINAL_SPEC.
4774         (lang_specific_pre_link): Use set_input to set input_filename.
4775         Append `main' here.
4776         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4777         (main): Fix definition.
4778         Strip `main' from classname.
4779         Fixes PR java/227.
4780
4781 2001-08-11  Zack Weinberg  <zackw@panix.com>
4782
4783         * lex.h: Don't include setjmp.h.  Don't define
4784         SET_FLOAT_HANDLER or prototype set_float_handler.
4785
4786 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4787
4788         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
4789         `poplevel' in the right order.
4790
4791 2001-08-09  Richard Henderson  <rth@redhat.com>
4792
4793         * Make-lang.in (class.o): Depend on TARGET_H.
4794         * class.c (emit_register_classes): Use target hooks instead of
4795         assemble_constructor and assemble_destructor.
4796
4797 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
4798
4799         * check-init.c (flags.h): Include
4800         (check_init): Don't report uninitialized static class
4801         initialization flags, don't free bit index when doing static class
4802         initialization optimization.
4803         (check_for_initialization): Return type changed to `unsigned int.'
4804         (attach_initialized_static_class): New function.
4805         * class.c (add_method_1): Create the initialized static class
4806         table if necessary.
4807         (finish_class): Always emit deferred inline methods.
4808         * decl.c (emit_init_test_initialization): Moved to expr.c
4809         (complete_start_java_method): Don't traverse
4810         DECL_FUNCTION_INIT_TEST_TABLE.
4811         (lang_mark_tree): Mark hash tables in function decls.
4812         * expr.c (emit_init_test_initialization): Moved from decl.c.
4813         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
4814         initialization flag, set DECL_CONTEXT and
4815         LOCAL_CLASS_INITIALIZATION_FLAG.
4816         (java_lang_expand_expr): Emit initialization code for static class
4817         initialized flags when entering block, if necessary.
4818         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
4819         * java-tree.h (flag_optimize_sci): New global variable declaration.
4820         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
4821         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
4822         (LOCAL_FINAL_P): Fixed typo in comment.
4823         (FINAL_VARIABLE_P): Likewise.
4824         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
4825         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
4826         (struct lang_decl): New fields `ict', `smic' and `cif.'
4827         (check_for_initialization): New returned value for global.
4828         (attach_initialized_static_class): New global function.
4829         (STATIC_CLASS_INIT_OPT_P): New macro.
4830         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
4831         * lang.c (java_decode_option): Handle
4832         `-fno-optimize-static-class-initialization'
4833         * parse.y (start_complete_expand_method): New function.
4834         (java_expand_method_bodies): Likewise.
4835         (attach_init_test_initialization_flags): Likewise.
4836         (adjust_init_test_initialization): Likewise.
4837         (emit_test_initialization): Likewise.
4838         (java_complete_expand_methods): Nullify abstract and native method
4839         bodies.
4840         (java_complete_expand_method): New locals `fbody', `block_body'
4841         and `exception_copy.' Reorganized: directly return on empty method
4842         bodies, call `start_complete_expand_method', remember definitely
4843         initialized static class in function, don't expand method bodies.
4844         (java_expand_classes): Call `java_expand_method_bodies' before
4845         `finish_class' when compiling to native.
4846         (resolve_expression_name): Use `orig' after building outer class
4847         field access.
4848         (patch_invoke): Remember static method invocations.
4849
4850 2001-08-06  Richard Henderson  <rth@redhat.com>
4851
4852         * class.c (emit_register_classes): Pass a symbol_ref and priority
4853         to assemble_constructor.
4854
4855 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
4856
4857         * java-tree.h (all_class_filename): New macro.
4858         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
4859         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
4860         newly created IDENTIFIER_NODE to `all_class_filename.'
4861
4862 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
4863
4864         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
4865         Use ggc_add_tree_root to register roots.
4866
4867 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4868
4869         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
4870         second operand calling check_init.
4871         * decl.c (complete_start_java_method): Swaped second and third
4872         arguments while creating WITH_CLEANUP_EXPR node.
4873         * jcf-write.c (generate_bytecode_insns): Use second operand
4874         instead of third when handling WITH_CLEANUP_EXPR.
4875         * parse.y (java_complete_lhs): Expand second operand of
4876         WITH_CLEANUP_EXPR nodes.
4877         (patch_synchronized_statement): Swaped second and third arguments
4878         while creating WITH_CLEANUP_EXPR node.
4879
4880 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4881
4882         * parse.y (create_interface): Avoid cyclic inheritance report when
4883         syntax error encountered during class definition.
4884         Fixes PR java/2956
4885
4886 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4887
4888         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4889         ASM_FINAL_SPEC.
4890         (lang_specific_pre_link): Use set_input to set input_filename.
4891         Append `main' here.
4892         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4893         (main): Fix definition.
4894         Strip `main' from classname.
4895         Fixes PR java/227.
4896
4897 2001-07-18  Tom Tromey  <tromey@redhat.com>
4898
4899         For PR java/2812:
4900         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
4901         * lex.c (java_new_lexer): Use ICONV_CONST.
4902         (java_read_char): Likewise.
4903         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
4904         (jv-scan$(exeext)): Likewise.
4905
4906 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4907
4908         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
4909         * parse.y (check_class_interface_creation): Allow `private' if the
4910         enclosing is not an interface.
4911         (create_interface): Interface tagged public if the enclosing
4912         context is an interface.
4913         (create_class): Class tagged public if the enclosing context
4914         is an interface.
4915         Fixes PR java/2959
4916
4917 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4918
4919         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
4920         Fixes PR java/2665
4921
4922 2001-07-14  Tim Josling  <tej@melbpc.org.au>
4923
4924         * check-init.c (check_init): Remove references to EXPON_EXPR.
4925
4926 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4927
4928         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
4929         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
4930         Fixes PR java/3602
4931
4932 2001-07-13  Tom Tromey  <tromey@redhat.com>
4933
4934         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
4935         invocation.
4936
4937 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4938
4939         * parse.y (patch_method_invocation): Don't override primary if one
4940         is already provided, but let this$<n> be built. Fixed comment.
4941
4942 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4943
4944         * parse.y (empty_statement:): Report empty statement error only
4945         when found at class declaration level.
4946         Fixes PR java/3635
4947
4948 2001-07-12  Tom Tromey  <tromey@redhat.com>
4949
4950         * expr.c (expand_load_internal): New function.
4951         (LOAD_INTERNAL): Use it.
4952
4953 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
4954
4955         * parse.y (verify_constructor_super): Compare anonymous class ctor
4956         args with `valid_method_invocation_conversion_p.'
4957         Fixes PR java/3285
4958
4959 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4960
4961         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
4962         `-fsyntax-only.' Fixes PR java/3248
4963
4964 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4965
4966         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
4967
4968 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4969
4970         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
4971         current function is static. Fixes PR java/1970
4972
4973 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4974
4975         * parse.y (patch_method_invocation): Add enclosing context to ctor
4976         calls if necessary. Fixes PR java/2953
4977
4978 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4979
4980         * parse.y (resolve_package): Abort if qualified expression member
4981         isn't right.
4982         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
4983         Fixes PR java/1391
4984
4985 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
4986
4987         * verify.c: Don't use // comments.
4988
4989 2001-07-05  Tom Tromey  <tromey@redhat.com>
4990
4991         * lang.c (flag_assume_compiled): Removed.
4992         * java-tree.h (flag_assume_compiled): Removed.
4993         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
4994         -fhash-synchronization, -fuse-divide-subroutine,
4995         -fcheck-references, -femit-class-file, -femit-class-files,
4996         -fassume-compiled.  Updated --encoding information.  Changed
4997         -foutput-class-dir to `-d'.
4998
4999 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
5000
5001         * jcf-parse.c (parse_class_file): Add lineno parameter to
5002         debug_start_source_file call.
5003
5004 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5005
5006         * gcj.texi: Use gpl.texi.
5007         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
5008         dependencies and use doc/include in search path.
5009
5010 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
5011
5012         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
5013         `this'.  If so, don't build instance initializers.
5014
5015 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
5016
5017         * parse.y (resolve_expression_name): Improved error message for
5018         inner class cases. Fixes PR java/1958
5019
5020 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
5021
5022         * lang.c: #include diagnostic.h
5023         (lang_print_error): Add a `diagnostic_context *' parameter.
5024         (java_dummy_print): Likewise.
5025         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
5026
5027 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5028
5029         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
5030         * jcf.h (typedef struct JCF): New bitfield `finished.'
5031         (JCF_FINISH): Set `finished.'
5032         (JCF_ZERO): Reset `finished.'
5033         Fixes PR java/2633
5034
5035 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5036
5037         * parse.y (class_body_declaration:): Don't install empty instance
5038         initializers.
5039         Fixes PR java/1314
5040
5041 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5042
5043         * class.c (set_super_info): Call `set_class_decl_access_flags.'
5044         (set_class_decl_access_flags): New function.
5045         * java-tree.h (set_class_decl_access_flags): New prototype.
5046         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
5047         (parse_class_file): New local `decl_max_locals.' Take wide types
5048         into account to compute DECL_MAX_LOCALS.
5049         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
5050         imports on demand.
5051
5052 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
5053
5054         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
5055
5056 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5057
5058         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
5059         * parse.y (do_resolve_class): Moved comments out to leading comment
5060         section. Removed local `start', New local `_ht' and
5061         `circularity_hash.'  Record `enclosing' in hash table and search
5062         it to detect circularity.  Use `enclosing' as an argument to
5063         `lookup_cl.' Free the hash table when done.
5064
5065 2001-06-19  Tom Tromey  <tromey@redhat.com>
5066
5067         * lex.c (java_read_char): Disallow invalid and overlong
5068         sequences.  Fixes PR java/2319.
5069
5070 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
5071
5072         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
5073
5074 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5075
5076         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
5077         arguments accordingly.
5078
5079 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5080
5081         * gcj.texi: Move contents to just after title page.
5082
5083 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
5084
5085         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
5086         builtin type.
5087         (patch_incomplete_class_ref): Build the class ref, build the class
5088         init if necessary, complete the tree.
5089         Fixes PR java/2605
5090
5091 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5092
5093         * parse.y (lookup_field_wrapper): Test `name' code.
5094         (resolve_qualified_expression_name): Test `qual_wfl' code.
5095         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5096         handle `qual_wfl' by code.
5097         (maybe_build_primttype_type_ref): Test `wfl' code.
5098
5099 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5100
5101         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5102         fdl.texi.
5103         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
5104         the dvi file in the java directory.
5105
5106 2001-05-25  Sam TH  <sam@uchicago.edu>
5107
5108         * gen-table.pl javaop.h jcf.h lex.h,
5109         parse.h: Fix header include guards.
5110
5111 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
5112
5113         * jv-scan.c (version): Update copyright year.
5114
5115 2001-05-21  Per Bothner  <per@bothner.com>
5116
5117         * jcf-parse.c (read_class):  If class is from .class or .zip file
5118         and it's already been read, don't push/pop parser context.
5119
5120 2001-05-18  Per Bothner  <per@bothner.com>
5121
5122         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
5123         command line so the jvgenmain-generated main program comes first.
5124
5125 2001-05-15  Tom Tromey  <tromey@redhat.com>
5126
5127         * class.c (build_utf8_ref): Don't generate identifier based on
5128         utf8const contents.
5129
5130 2001-05-12  Richard Henderson  <rth@redhat.com>
5131
5132         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5133         * expr.c (java_lang_expand_expr): Expand it.
5134         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5135         calling build_exception_object_ref.
5136         * parse.y (catch_clause_parameter): Likewise.
5137         (build_dot_class_method): Likewise.
5138         (try_reference_assignconv): Likewise.
5139         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5140         * jcf-write.c (generate_bytecode_insns): Likewise.
5141
5142 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5143
5144         * parse.y (build_unresolved_array_type): Set
5145         EXPR_WFL_QUALIFICATION on the newly created wfl.
5146         Fixes PR java/2538. Fixes PR java/2535.
5147
5148 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5149
5150         * parse.y (fix_constructors): Removed unnecessary assignment to
5151         local. Moved assignment to `this$<n>', fixed comments and
5152         indentation.
5153         (build_wfl_wrap): Fixed indentation.
5154         Fixes PR java/2598, java/2579 and java/2658.
5155
5156 2001-05-03  Mo DeJong  <mdejong@redhat.com>
5157
5158         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5159         check for byte swap.
5160
5161 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
5162
5163         * expr.c (build_class_init): Move MODIFY_EXPR
5164         outside of COND_EXPR.  Remove variable `call'.
5165
5166 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5167
5168         * decl.c: NULL_PTR -> NULL.
5169         * jcf-write.c: Likewise.
5170
5171 2001-05-01  Tom Tromey  <tromey@redhat.com>
5172
5173         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5174         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5175         * gcj.texi: Updated copyright text.  Include fdl.texi.
5176         (Top): Link to new node.
5177
5178 2001-05-01  Per Bothner  <per@bothner.com>
5179
5180         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
5181
5182 2001-05-01  Per Bothner  <per@bothner.com>
5183
5184         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
5185         import_list contains the name, not the TREE_PURPOSE.
5186
5187 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5188
5189         * jcf-io.c (read_zip_member): Cast to long in comparison with
5190         signed value.
5191
5192         * jvspec.c (lang_specific_driver): Initialize variables.
5193
5194         * mangle.c (find_compression_record_match): Likewise.
5195
5196         * typeck.c (build_null_signature): Provide static prototype.  Mark
5197         parameter with ATTRIBUTE_UNUSED.
5198
5199         * verify.c (verify_jvm_instructions): Initialize variable.
5200
5201 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5202
5203         * parse.y (do_resolve_class): Check for cyclic inheritance during
5204         inner class resolution.
5205
5206 2001-04-27  Per Bothner  <per@bothner.com>
5207
5208         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
5209         while iterating, since that could cause gc to lose stuff.
5210
5211 2001-04-26  Per Bothner  <per@bothner.com>
5212
5213         Fix method search wrt scope of inner classes to match JLS2.
5214         * typeck.c (build_null_signature):  New static function.
5215         (has_method):  New function.  Uses build_null_signature and lookup_do.
5216         * java-tree.h (has_method):  New declaration.
5217         * parse.y (find_applicable_accessible_methods_list):  Do not search
5218         context of inner classes here.
5219         (patch_method_invocation):  Search scope, ie. current and outer clases,
5220         for method matching simple name, to find class.
5221
5222 2001-04-26  Per Bothner  <per@bothner.com>
5223
5224         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5225         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
5226
5227         * constants.c (find_methodref_with_class_index):  New function.
5228         (find_methodref_index):  Use find_methodref_with_class_index.
5229         * java-tree.h (find_methodref_with_class_index):  New declaration.
5230         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
5231         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5232         If context changed from interface to class, don't use invokeinterface.
5233
5234 2001-04-25  Per Bothner  <per@bothner.com>
5235
5236         * verify.c (verify_jvm_instructions):  For field instructions,
5237         check that field index is valid.  For invoke instructions, check that
5238         method index is valid.
5239
5240 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
5241
5242         * config-lang.in (target_libs): Copy from $libgcj_saved.
5243
5244 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5245
5246         * decl.c (init_decl_processing): Add new class "protectionDomain"
5247         field.
5248         * class.c (make_class_data): Set initial value for "protectionDomain".
5249
5250 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5251
5252         * jvspec.c (lang_specific_driver): Fix memory allocation
5253         deficit, by using concat in lieu of xmalloc/sprintf.
5254
5255 2001-04-20  Per Bothner  <per@bothner.com>
5256
5257         Fixes to compile multiple .class files at once.
5258         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
5259         * java-tree.h (CLASS_PARSED_P):  New macro.
5260         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5261         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
5262         (read_class):  Avoid some code duplication.
5263         Don't call JCF_FINISH for a .class file - might be needed later.
5264         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
5265         rather than CLASS_LOADED_P, since latter implies class laid out.
5266         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
5267         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
5268
5269 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5270
5271         * Make-lang.in (java/boehm.o): Depend on toplev.h.
5272
5273         * boehm.c: Include toplev.h.
5274
5275 2001-04-06  Tom Tromey  <tromey@redhat.com>
5276             Alexandre Petit-Bianco  <apbianco@redhat.com>
5277
5278         Fix for PR gcj/1404 and PR gcj/2332:
5279         * parse.y (build_array_from_name): If we use the type_wfl then
5280         accumulate dimensions from the original type as well.
5281         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5282
5283 2001-04-06  Tom Tromey  <tromey@redhat.com>
5284
5285         * parse.y (analyze_clinit_body): Return true if the second operand
5286         of a METHOD_EXPR is nonzero.
5287
5288 2001-04-06  Tom Tromey  <tromey@redhat.com>
5289
5290         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5291         directory.
5292         ($(srcdir)/java/parse.c): Likewise.
5293
5294 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5295
5296         * gcj.texi: Use `which-gcj' instead of `which-g77.'
5297         (version-gcc): Initialized.
5298         (which-gcj): Likewise.
5299
5300 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5301
5302         * java-tree.h (struct lang_decl): New macro
5303         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5304         * parse.y (build_instance_initializer): New function.
5305         (add_instance_initializer): Use it.
5306         (java_fix_constructors): Set `current_class' before fix pass.
5307         (fix_constructors): Just return if already fixed. Move `super()'
5308         invocation ahead. Use `build_instance_initializer.'
5309         Fixes PR java/1315.
5310
5311 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5312
5313         * parse.y (resolve_qualified_expression_name): Pass field's
5314         DECL_CONTEXT to `not_accessible_p.'
5315         (not_accessible_p): Changed parameters order in `inherits_from_p'
5316         invocation.
5317
5318 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
5319
5320         * lang-options.h: Add flag_check_references.
5321
5322 2001-04-04  Per Bothner  <per@bothner.com>
5323
5324         * java-tree.h (CONSTANT_VALUE_P):  New macro.
5325         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
5326         * parse.y (maybe_build_class_init_for_field):  New static function.
5327         (resolve_expression_name, resolve_field_access):  Use
5328         maybe_build_class_init_for_field instead of build_class_init
5329         This does not do the init if the field is compile-time-constant.
5330         (resolve_field_access):  Simplify.
5331
5332         * parse.y (fold_constant_for_init):  Merge test into switch.
5333
5334 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
5335
5336         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5337         on gansidecl.h.
5338         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5339
5340 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
5341
5342         * expr.c (pop_type_0): Save the result of the first
5343         lang_printable_name call in a scratch buffer, so it
5344         won't be clobbered by the second call.
5345
5346 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
5347
5348         * parse-scan.y (array_type:): Rewritten.
5349         (type_declaration:): `empty_statement' replaces `SC_TK.'
5350         (class_member_declaration:): `empty statement' added.
5351         (method_body:): Simplified.
5352         (static_initializer:): Likewise.
5353         (primary_no_new_array:): Use `type_literals.'
5354         (type_literals:): New rule.
5355         (dims:): Set and update `bracket_count.'
5356         Fixes PR java/1074. Fixes PR java/2412.
5357
5358 2001-03-28  Hans Boehm  <boehm@acm.org>
5359
5360         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5361         (get_boehm_type_descriptor): Set type on returned value to be a
5362         pointer length integer.
5363
5364 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5365
5366         * expr.c (pop_type_0): Call `concat' rather than building the
5367         string manually.
5368         (pop_type): Add format specifier in call to `error'.
5369
5370         * parse.y (patch_method_invocation): Avoid casting away
5371         const-ness.
5372
5373 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
5374
5375         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5376
5377 2001-03-28  Richard Henderson  <rth@redhat.com>
5378
5379         IA-64 ABI Exception Handling:
5380         * Make-lang.in (except.o): Don't depend on eh-common.h.
5381         * check-init.c (check_init): Handle EXC_PTR_EXPR.
5382         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5383         [soft_exceptioninfo_call_node]: Remove.
5384         [eh_personality_libfunc, lang_eh_runtime_type]: New.
5385         (end_java_method): No emit_handlers.
5386         * except.c (java_set_exception_lang_code): Remove.
5387         (method_init_exceptions): Don't call it.
5388         (prepare_eh_table_type): No CATCH_ALL_TYPE.
5389         (build_exception_object_ref): New.
5390         (expand_end_java_handler): Update for except.h name changes.
5391         (emit_handlers, expand_resume_after_catch): Remove.
5392         * expr.c (java_lang_expand_expr): Update for except.h name changes.
5393         (process_jvm_instruction): Use build_exception_object_ref.
5394         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5395         (soft_exceptioninfo_call_node): Remove.
5396         (build_exception_object_ref): Declare.
5397         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5398         soft_exceptioninfo_call_node.  Move processing ...
5399         [EXC_PTR_EXPR]: ... here.
5400         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5401         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5402         (source_end_java_method): No java_set_exception_lang_code or
5403         emit_handlers.
5404         (build_dot_class_method): Use build_exception_object_ref.
5405         (try_reference_assignconv): Check EXC_PTR_EXPR not
5406         soft_exceptioninfo_call_node.
5407
5408 2001-03-28  Richard Henderson  <rth@redhat.com>
5409
5410         * java-tree.h (throw_node): Define as a single member of
5411         java_global_trees instead of a separate array.
5412         (JTI_THROW_NODE): New.
5413         * decl.c (throw_node): Don't declare.
5414         (init_decl_processing): Init a scalar throw_node.
5415         Don't register it for gc.
5416         * check-init.c (check_init): Reference scalar throw_node.
5417         * expr.c (build_java_athrow): Likewise.
5418         * jcf-write.c (generate_bytecode_insns): Likewise.
5419         * parse.h (BUILD_THROW): Likewise.
5420
5421 2001-03-28  Richard Henderson  <rth@redhat.com>
5422
5423         * decl.c (end_java_method): Do not save and restore
5424         flag_non_call_exceptions.
5425         * parse.y (source_end_java_method): Likewise.
5426         * lang.c (flag_exceptions): Don't declare.
5427         (java_init_options): Set flag_non_call_exceptions.  Set
5428         flag_exceptions here ...
5429         (java_init): ... not here.
5430
5431 2001-03-27  Richard Henderson  <rth@redhat.com>
5432
5433         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5434         exceptions_via_longjmp.
5435
5436         * lang.c (flag_new_exceptions): Don't declare it.
5437         (java_init_options): Or set it.
5438
5439 2001-03-27  Richard Henderson  <rth@redhat.com>
5440
5441         * decl.c (end_java_method): Rename asynchronous_exceptions to
5442         flag_non_call_exceptions.
5443         * parse.y (source_end_java_method): Likewise.
5444
5445 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5446
5447         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5448
5449 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5450
5451         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5452
5453 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5454
5455         * parse.y (find_as_inner_class): Follow current package
5456         indications not to mistakingly load an unrelated class.
5457
5458 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5459
5460         * constants.c (PUTN): Use memcpy, not bcopy.
5461
5462         * lex.c (java_read_char): Use memmove, not bcopy.
5463
5464         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5465
5466 2001-03-23  Per Bothner  <per@bothner.com>
5467
5468         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
5469         macro for better error pin-pointing.
5470         * java-tree.h:  Fix typo in comment.
5471
5472         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
5473         Don't include jsr/goto in exception range.
5474         Check if start and end of exception range are the same (also TRY_EXPR).
5475         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5476         However, do emit the following goto even if try_block is empty.
5477         Defer freeing exception_decl until after the finalizer, to make
5478         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
5479
5480         * parse.y (java_complete_lhs):  If the try-clause is empty, just
5481         return the finally-clause and vice versa.
5482
5483 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5484
5485         * gcj.texi (Input Options): documented the check for attribute
5486         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5487         * java-tree.h (flag_force_classes_archive_check): Declared extern.
5488         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5489         (jcf_parse): Check for the right classes archive if necessary.
5490         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5491         (jcf_parse_fields): Fixed indentation.
5492         * jcf-write.c (append_gcj_attribute): New function.
5493         (generate_classfile): Compute the attribute count, invoke
5494         `append_gcj_attribute'.
5495         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5496         turned into bit-fields. New bit-field `right_zip.'
5497         (JCF_ZERO): Set `right_zip' to zero.
5498         * lang-options.h (-fforce-classes-archive-check): Added flag.
5499         * lang.c (flag_force_classes_archive_check): New flag.
5500         (lang_f_options): New entry `force-classes-archive-check.'
5501         Fixes PR java/1213.
5502
5503 2001-02-07  Andrew Haley  <aph@redhat.com>
5504
5505         * gcj.texi (Configure-time Options): Add -fcheck-references.
5506         * expr.c (build_java_indirect_ref): New function.
5507         (java_check_reference): New function.
5508         (build_java_array_length_access): Use build_java_indirect_ref to
5509         check for null references.
5510         (build_java_arrayaccess): Likewise.
5511         (build_get_class): Likewise.
5512         (build_field_ref): Likewise.
5513         (invoke_build_dtable): Likewise.
5514         (build_invokeinterface): Likewise.
5515         * lang.c (lang_f_options): Add flag_check_references.
5516         * jvspec.c (jvgenmain_spec): Add flag_check_references.
5517         * java-tree.h (flag_check_references): New variable.
5518         * lang.c (flag_check_references): Likewise.
5519         * parse.y (patch_invoke): Use java_check_reference.
5520         (patch_assignment): Allow for extra nesting in
5521         _Jv_CheckArrayStore.
5522
5523 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
5524
5525         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5526         * lex.c (cxx_keywords): Likewise.
5527
5528 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5529
5530         * parse.y (qualify_ambiguous_name): Broaden `length'
5531         recognition. Help MODIFY_EXPR be resolved as expression names.
5532         Fixes PR java/2066. Fixes PR java/2400.
5533
5534 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
5535
5536         * gjavah.c (process_file): Mark interface definitions with
5537         "__attribute__ ((java_interface))".
5538
5539 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5540
5541         * class.c (layout_class): Fixed push_super_field's second
5542         argument. Fixes PR java/2333.
5543         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5544         too early to lay innerclasses out.
5545
5546 2001-03-20  Tom Tromey  <tromey@redhat.com>
5547             Alexandre Petit-Bianco <apbianco@redhat.com>
5548
5549         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5550         inside an array reference. Insertion of the array store check
5551         rewritten. Fixes PR java/2299.
5552
5553 2001-03-20  Tom Tromey  <tromey@redhat.com>
5554
5555         * lex.c (java_read_unicode): Only accept leading `u's.
5556
5557 2001-03-20  Tom Tromey  <tromey@redhat.com>
5558
5559         * jcf-parse.c (read_class): Initialize `class'.
5560
5561 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5562
5563         * jcf_parse.c (jcf_parse): Eliminate unused variable.
5564
5565 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5566
5567         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5568         (layout_class): Likewise.
5569         (layout_class_method): Likewise.
5570         (emit_register_classes): Likewise.
5571         * decl.c (builtin_function): Likewise.
5572         (give_name_to_locals): Likewise.
5573
5574 2001-03-19  Per Bothner  <per@bothner.com>
5575
5576         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
5577         before trying to load an inner class.
5578
5579         Fixes to process to command-line .class files in two passes.
5580         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
5581         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
5582         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
5583         * class.c (is_compiled_class):  Fix for renamed flag.
5584         * parse.y (maybe_create_class_interface_decl):  Likewise.
5585         * jcf-parse.c (yyparse):  Also set if compiling .class files.
5586         * jcf-parse.c (read_class);  Read current_class.
5587         (jcf_parse):  Make static.
5588         (load_inner_classes):  New function, with code moved from jcf_parse,
5589         because we need to inner classes after the command-line files are read.
5590         (yyparse):  Set finput to NULL when it doesn't need to be closed.
5591         Reduce use of main_jcf (basically only for archive) and
5592         use finput instead of main_jcf->read_state.
5593         Inline jcf_figure_file_type into yyparse.
5594         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5595         Defer load_inner_classes and parse_class_file to a second pass,
5596         after we've correctly mapped command-line .clas fiels to classes.
5597         (jcf_figure_file_type):  Removed.
5598         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
5599         (JCF_ZERO):  Also clear zipd field.
5600         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
5601
5602 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5603
5604         * jcf-parse.c (yyparse): Change ch from char * to char.
5605
5606 2001-03-19  Per Bothner  <per@bothner.com>
5607
5608         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
5609         Add constructed filelist-file at end, following -xjava.  Thus any .o
5610         and library files are not affected by the -xjava.  Also wrap
5611         explicit @FILE with -xjava and -xnone.
5612
5613 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
5614
5615         * class.c (build_static_field_ref): Call make_decl_rtl() after
5616         setting the DECL_EXTERNAL flag.
5617
5618 2001-03-17  Per Bothner  <per@bothner.com>
5619
5620         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
5621
5622         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
5623         when result is is needed (target is STACK_TARGET).
5624
5625         * parse.h (JDEP_SOLV):  Removed.
5626         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
5627
5628         * parse.y (incomplete_class_list): Removed.
5629         (obtain_incomplete_type): Don't use or set incomplete_class_list.
5630         It doesn't work if resolve_class changes the name of an array type
5631         that is on the list and then someone else looks for the modified name.
5632         Also, seems liable to break when compiling multiple source files at
5633         once.  So the simplest is to just remove incomplete_class_list -
5634         it is only a minor space win and it is not even clear it saves time.
5635
5636         * parse.y (resolve_class):  Remove unneeded promote_type.
5637
5638 2001-03-15  Per Bothner  <per@bothner.com>
5639
5640         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
5641         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
5642         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5643         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5644
5645         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
5646         * parse.y (java_expand_classes):  Likewise.
5647
5648         * parse.y (expand_start_java_method):  Was only called once and had a
5649         misleading name, so inline in caller java_complete_expand_method.
5650         (enter_a_block):  Likewise inline in enter_block and remove.
5651
5652         Remove junk from when gcc/java was created (by copying from C/C++).
5653         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
5654         (struct binding_level):  Remove fields keep, keep_if_subblocks,
5655         more_cleanups_ok, have_cleanups (which have never been used).
5656         (pushlevel, poplevel):  Remove related useless code.
5657
5658         * class.c (make_class_data):  The class_dtable_decl (i.e. the
5659         vtable for Class) should be external, except when compiling Class.
5660
5661         * jvspec.c (lang_specific_driver):  Fix -C handling.
5662         Check -save-temps to see if temp @FILE should be deleted.
5663         Follow-up to/fix for February 16 patch.
5664
5665         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
5666         (type_stack_dup):  Remove no-longer neded error check.
5667
5668 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
5669
5670         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5671         to 'for_pointer'. If this type is for a pointer (argument) mangling,
5672         don't surround the element with 'N..E' if the type name is
5673         unqualified.
5674
5675 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5676
5677         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5678         DECL_RTL_SET_P, etc.
5679         (make_method_value): Likewise.
5680         (get_dispatch_table): Likewise.
5681
5682         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5683
5684 2001-03-07  Tom Tromey  <tromey@redhat.com>
5685
5686         * config-lang.in (lang_requires): Define.
5687
5688 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
5689
5690         * typeck.c (convert): Check flag_unsafe_math_optimizations,
5691         not flag_fast_math.
5692
5693 2001-03-05  Per Bothner  <per@bothner.com>
5694
5695         Fix a problem where rest_of_decl_compilation applied to
5696         class_dtable_decl causes problems because it was done too early,
5697         before output file was opened.
5698         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
5699         * class.c (class_dtable_decl):  Add macro - element of class_roots.
5700         (make_class_data):  Define class_dtable_decl.
5701         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
5702
5703 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5704
5705         * java/class.c, java/decl.c, java/java-tree.h: Replace all
5706         uses of 'boolean' with 'bool'.
5707
5708 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5709
5710         * lang-specs.h: Add zero initializer for cpp_spec field to all
5711         array elements.
5712
5713 2001-02-16  Per Bothner  <per@bothner.com>
5714
5715         Handle compiling multiple input files at once, and @FILE syntax.
5716         * gcj.texi:  Updated documentation to match.
5717         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
5718         * jcf-parse.c (parse_source_file):  Split into ...
5719         (parse_source_file_1):  New function - and:
5720         (parse_source_file_2):  New function.
5721         (yyparse):  On -ffilelist-file, open and scan named file.
5722         On first pass over files, only do parse_source_file_1.
5723         A new second pass calls parse_source_file_2 for each file to compile.
5724         (init_jcf_parse):  Call init_src_parse.
5725         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
5726         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
5727         as multiple input file combined in one compilation.
5728         * lang-options.h:  Add -ffilelist-file
5729         * lang.c (flag_filelist_file):  New flag variable.
5730         (lang_f_options):  Handle -ffilelist-file.
5731         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5732         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
5733         gclass_list - use global fields of src_parse_roots instead.
5734         * parse.y (src_parse_roots):  New array.
5735         (incomplete_class_list, gclass_list):  New macros.
5736         (push_parser_context, java_pop_parser_context,
5737         java_parser_context_resume):  Don't fiddle with deleted fields.
5738         (various):  Use incomplete_class gclass_list and global macros
5739         instead of parse_ctxt fields - the lists are global.
5740         (init_src_parse):  New function.
5741
5742 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5743
5744         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5745
5746 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5747
5748         * parse.y (check_inner_class_access): Moved declaration of local
5749         `enclosing_decl_type' to the right location.
5750
5751 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
5752
5753         * parse.y (parser_check_super_interface): Don't call
5754         check_pkg_class_access for an inner interface.
5755         (parser_check_super): Don't call check_pkg_class_access for inner
5756         class.
5757         (do_resolve_class): Simplify enclosing type loop. Don't call
5758         check_pkg_class_access if CL and DECL are not set.
5759         (find_in_imports_on_demand): Set DECL if class_type needed to be
5760         loaded. Don't call check_pkg_class_access for an inner class.
5761         (check_inner_class_access): Rewritten to implement member access
5762         rules as per spec 6.6.1.
5763         (check_pkg_class_access): Handle the empty package correctly.
5764         (in_same_package): New function. Determine if two classes are in the
5765         same package.
5766
5767 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
5768
5769         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
5770         method into array types.
5771         * parse.y (patch_method_invocation): Bypass access check on clone call
5772         to array instance.
5773
5774 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5775
5776         * expr.c (build_instanceof): Check for arrays when trying fold to
5777         false.
5778
5779 2001-02-15  Jim Meyering  <meyering@lucent.com>
5780
5781         * Make-lang.in (java.install-common): Depend on `installdirs'.
5782         (java.install-info): Likewise.
5783
5784 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
5785
5786         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
5787
5788 2001-02-14  Tom Tromey  <tromey@redhat.com>
5789             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5790
5791         Fix for PR java/1261.
5792         * typeck.c (build_java_array_type): Add public `clone' method to
5793         arrays.
5794         * parse.y (resolve_qualified_expression_name): Use current_class
5795         when checking for inaccessibility.
5796         (patch_method_invocation): Fixed error message when accessibility
5797         denied.  Added `from_super' argument.
5798
5799 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5800
5801         * parse.y (resolve_class): Don't build a fake decl. Use the one
5802         already built.
5803         * typeck.c (build_java_array_type): Build and assign decl to array
5804         type.
5805
5806 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5807
5808         * parse.y (not_accessible_p): Changed leading comment. Added extra
5809         `where' argument. Use it to enforce protected access rules.
5810         (resolve_qualified_expression_name): Added extra argument to
5811         not_accessible_p.
5812         (patch_method_invocation): Use argument `primary' to provide
5813         not_accessible_p with an extra argument.
5814         (lookup_method_invoke): Added extra argument to not_accessible_p.
5815         (search_applicable_method_list): Likewise.
5816
5817 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5818
5819         * parse.y (resolve_qualified_expression_name): Try to resolve as
5820         an inner class access only if `decl' is a TYPE_DECL.
5821
5822 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5823
5824         * decl.c (classdollar_identifier_node): Initialize.
5825         * java-tree.h (enum java_tree_index): New entry
5826         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
5827         (classdollar_identifier_node): New macro.
5828         (ID_CLASSDOLLAR_P): Likewise.
5829         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
5830         (build_dot_class_method_invocation): Likewise.
5831         (find_applicable_accessible_methods_list): `class$' can't be
5832         inherited.
5833
5834 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
5835
5836         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
5837
5838 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5839
5840         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
5841         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
5842         gone.
5843
5844 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5845
5846         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
5847         outside of the `__U' sequence too.
5848         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
5849         sequence too.
5850
5851 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5852
5853         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
5854
5855 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5856
5857         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
5858         (JVGENMAIN_OBJS): Likewise.
5859         * java-tree.h (append_gpp_mangled_name): New prototype.
5860         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
5861         Removed cast calling `gcc_add_root.'
5862         * jvgenmain.c (mangle_obstack): New global, initialized.
5863         (main): Use it.
5864         (do_mangle_class): Constify local `ptr.'
5865         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
5866         append_gpp_mangle_name and update `count' if necessary.
5867         Use `mangle_obstack.'
5868         * mangle.c (append_unicode_mangled_name): Removed.
5869         (append_gpp_mangled_name): Likewise.
5870         (unicode_mangling_length): Likewise.
5871         (mangle_member_name): Return type set to `void.'
5872         (mangle_field_decl): Don't append `U' in escaped names.
5873         (mangle_method_decl): Likewise.
5874         (mangle_member_name): Just use `append_gpp_mangled_name.'
5875         * mangle_name.c: New file.
5876
5877 2001-02-07  Per Bothner  <per@bothner.com>
5878
5879         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
5880
5881         * check-init.c (check_init):  Don't call done_alternative after
5882         processing loop code, as a LOOP_EXPR never terminates normally.
5883
5884 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5885
5886         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
5887
5888 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5889
5890         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
5891         DECLs.
5892
5893 2001-02-06  Tom Tromey  <tromey@redhat.com>
5894
5895         * lex.c (java_new_lexer): Longer error message.
5896
5897 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
5898             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5899
5900         * typeck.c (build_prim_array_type): Added leading comment.
5901         (build_java_array_type): Moved locals out of
5902         block. Always create the `data' field, fixed alignment to match
5903         C++.
5904
5905 2001-02-04  Tom Tromey  <tromey@redhat.com>
5906
5907         * expr.c (java_lang_expand_expr): Don't bother recomputing
5908         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
5909         Fixes PR java/1866.
5910
5911 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5912
5913         * parse.y (process_imports): Save the original name of the import
5914         for better error report.
5915
5916 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
5917
5918         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
5919         of macros used when compiling jvspec.c.
5920         * jvspec.c (lang_specific_driver): Link with the shared
5921         libgcc by default.
5922
5923 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5924
5925         * check-init.c (check_init): Call internal_error instead of fatal.
5926         * expr.c (java_lang_expand_expr): Likewise.
5927         * jcf-parse.c (get_constant): Likewise.
5928         * mangle.c (java_mangle_decl): Likewise.
5929         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
5930         (operator_string): Likewise.
5931         * check-init.c (check_init): Call abort instead of fatal.
5932         * class.c (build_class_ref): Likewise.
5933         * constants.c (write_constant_pool): Likewise.
5934         * decl.c (start_java_method): Likewise.
5935         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
5936         (java_stack_dup, encode_newarray_type): Likewise.
5937         (build_java_array_length_access): Likewise.
5938         (build_java_check_indexed_type, expand_java_pushc): Likewise.
5939         (build_java_soft_divmod, build_invokeinterface): Likewise.
5940         * java-tree.h (INNER_CLASS_P): Likewise.
5941         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
5942         (give_name_to_class, get_class_constant): Likewise.
5943         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
5944         (find_constant_index, generate_bytecode_conditional): Likewise.
5945         (generate_bytecode_insns, perform_relocations): Likewise.
5946         * lex.c (java_unget_unicode, java_lex): Likewise.
5947         * mangle.c (mangle_type, mangle_record_type): Likewise.
5948         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
5949         (finish_mangling): Likewise.
5950         * parse.h (MARK_FINAL_PARMS): Likewise.
5951         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
5952         (obtain_incomplete_type, java_complete_class): Likewise.
5953         (java_check_regular_methods, java_complete_expand_method): Likewise.
5954         (cut_identifier_in_qualified, check_deprecation): Likewise.
5955         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
5956         (java_complete_lhs, lookup_name_in_blocks): Likewise.
5957         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
5958         * typeck.c (set_local_type, parse_signature_type): Likewise.
5959         (parse_signature_string, build_java_signature): Likewise;
5960         (set_java_signature): Likewise.
5961         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
5962         * class.c (add_method): Call fatal_error instead of fatal.
5963         (build_static_field_ref): Likewise.
5964         * expr.c (build_known_method_ref, expand_invoke): Likewise.
5965         * jcf-parse.c (get_constant, jcf_parse): Likewise.
5966         * lex.c (java_new_new_lexer): Likewise.
5967         * jv-scan.c (main): Likewise.
5968         (fatal_error): Renamed from fatal.
5969         * jcf-parse.c (yyparse): Call fatal_io_error instead of
5970         pfatal_with_name.
5971         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
5972         (yyparse): Likewise.
5973         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
5974         * lex.c (java_get_line_col): Likewise.
5975         * jcf-parse.c (load_class): Make errors non-fatal.
5976         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
5977
5978 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
5979
5980         * jvgenmain.c (class_mangling_suffix): Remove unused string.
5981         (error): Remove unused function.
5982         (main): Don't use "__attribute__ alias" on generated class symbol.
5983
5984 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5985
5986         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
5987         argument.
5988         * parse.y (finish_method_declaration): Code accounting for WFLed
5989         method DECL_NAMEs deleted.
5990         (check_abstract_method_definitions): Likewise.
5991         (resolve_type_during_patch): Layout resolved type.
5992         * typeck.c (lookup_do): Removed unused local.
5993
5994 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
5995
5996         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
5997         * decl.c (init_decl_processing): Use integer_minus_one_node, not
5998         integer_negative_one_node.
5999         * expr.c (build_java_binop): Likewise.
6000
6001 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
6002
6003         * zextract.c (read_zip_archive): Read file_offset before writing
6004         zipd and consequently clobbering the header contents.
6005
6006 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6007
6008         * Make-lang.in: Remove all dependencies on defaults.h.
6009         * decl.c: Don't include defaults.h.
6010         * expr.c: Likewise.
6011         * parse.y: Likewise.
6012
6013 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6014
6015         * ChangeLog (2001-01-21): Fixed typo.
6016         * class.c (layout_class_method): Code accounting for WFLed
6017         method DECL_NAMEs deleted.
6018         * constant.c (find_methodref_index): Likewise.
6019         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
6020         * java-tree.h (DECL_FUNCTION_WFL): New macro.
6021         (struct lang_decl): New field `wfl'.
6022         (java_get_real_method_name): Prototype deleted.
6023         * mangle.c (mangle_method_decl): Code accounting for WFLed
6024         method DECL_NAMEs deleted.
6025         * parse.h (GET_METHOD_NAME): Macro deleted.
6026         * parse.y (reset_method_name): Deleted.
6027         (method_header): Set DECL_FUNCTION_WFL.
6028         (check_abstract_method_header): Code accounting for WFLed method
6029         DECL_NAMEs deleted.
6030         (java_get_real_method_name): Deleted.
6031         (check_method_redefinition): Code accounting for WFLed method
6032         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
6033         (java_check_regular_methods): Likewise.
6034         (java_check_abstract_methods): Likewise.
6035         (java_expand_classes): Don't call `reset_method_name.'
6036         (search_applicable_method_list): Use DECL_NAMEs instead of
6037         GET_METHOD_NAME.
6038         * typeck.c (lookup_do): Code accounting for WFLed method
6039         DECL_NAMEs deleted.
6040
6041 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
6042
6043         * lex.c (java_read_char): Check for EOF from getc first.
6044
6045 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6046
6047         * class.c (layout_class): Don't lay the superclass out if it's
6048         already being laid out.
6049         * jcf-parse.c (handle_innerclass_attribute): New function.
6050         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
6051         handle_innerclasses_attribute.
6052         (jcf_parse): Don't load an innerclasses if it's already being
6053         laid out.
6054         * jcf-write.c (append_innerclass_attribute_entry): Static
6055         `anonymous_name' and its initialization deleted. `ocii' and `ini'
6056         to be zero for anonymous classes.
6057
6058 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6059
6060         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
6061         necessary.
6062         * jcf-parse.c (set_source_filename): Use
6063         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
6064
6065 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6066
6067         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
6068         gets a unique asm name.
6069
6070 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6071
6072         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
6073         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6074         if necessary.
6075         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
6076         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
6077         * parse.y (lookup_package_type_and_set_next): Deleted.
6078         (resolve_package): Removed unnecessary code.
6079         (find_applicable_accessible_methods_list): `finit$' can't be
6080         inherited.
6081         * verify.c (pop_argument_types): Added missing prototype.
6082
6083 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
6084
6085         * config-lang.in: Disable java by default.
6086
6087 2001-01-23  Tom Tromey  <tromey@redhat.com>
6088
6089         * gcj.texi (Copying): New node.
6090         Added copyright information.
6091
6092 2001-01-21  Per Bothner  <per@bothner.com>
6093
6094         Various fixes to allow compiling a compressed .jar/.zip archive.
6095         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
6096         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
6097         (struct ZipDirectory):  New field zipf points to owning ZipFile.
6098         * jcf.h (struct ZipDirectory):  Add forward declaration.
6099         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
6100         Remove seen_in_zip and zip_offset fields.
6101         (JCF_SEEN_IN_ZIP):  New macro.
6102         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
6103         * jcf-io.c:  Change all ZipFileCache to ZipFile.
6104         (read_zip_member):  New function.
6105         (open_in_zip):  Call read_zip_member.
6106         * jcf-parse.c (find_in_current_zip):  Remove function.
6107         (read_class):  Merge in find_in_current_zip functionality.
6108         Call read_zip_member if needed.
6109         (parse_zip_file_entries):  Use read_zip_member.
6110         (process_zip_dir):  Update for removed and added JCF fields.
6111         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
6112
6113 2001-01-21  Per Bothner  <per@bothner.com>
6114
6115         Minor optimization of static ggc roots.
6116         * jcf-parse.c (parse_roots):  New static field.
6117         (current_field, current_method, current_file_list):  Replace by macros
6118         naming fields of parse_roots.
6119         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
6120         * class.c (class_roots):  New static field.
6121         (registered_class, fields_ident, info_ident, class_list):
6122         New macros naming fields of parse_roots.
6123         (build_static_field_ref):  Don't register roots here.
6124         (layout_class):  Static field list replaced by macro class_list.
6125         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
6126         Initialize fields_ident and info_ident here.
6127
6128 2001-01-21  Per Bothner  <per@bothner.com>
6129
6130         * jcf-parse.c (ggc_mark_jcf):  New function.
6131         (init_jcf_parse):  Register current_jcf as ggc root.
6132
6133 2001-01-21  Per Bothner  <per@bothner.com>
6134
6135         * lang.c (put_decl_node):  Print method's name.
6136
6137 2001-01-21  Per Bothner  <per@bothner.com>
6138
6139         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
6140         (verify_jvm_instructions):  Use it, for better error messages on loads.
6141
6142 2001-01-21  Per Bothner  <per@bothner.com>
6143
6144         * verify.c (merge_type_state):  Still may have to merge even if
6145         LABEL_VERIFIED (label).
6146
6147 2001-01-21  Per Bothner  <per@bothner.com>
6148
6149         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
6150         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6151
6152 2001-01-19  Per Bothner  <per@bothner.com>
6153
6154         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
6155         if expeting an interface type.  Refines Tom's change of 2000-09-12.
6156
6157 2001-01-18  Per Bothner  <per@bothner.com>
6158
6159         * gcj.texi (Input Options): Mention .java files.
6160
6161 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6162
6163         * lang-options.h (-Wunsupported-jdk11): Removed.
6164         * lang.c (flag_not_overriding): Deleted.
6165         (flag_static_local_jdk1_1): Likewise.
6166         (lang_W_options): Removed "unsupported-jdk11" entry.
6167         * parse.y (java_check_methods): Removed dead code.
6168
6169 2001-01-17  Tom Tromey  <tromey@redhat.com>
6170
6171         Changes suggested by Per Bothner:
6172         * gcj.texi (Input Options): Don't mention input files.
6173         (Code Generation): Updated --main information.
6174         (Invoking jcf-dump): Mention that --javap is incomplete.
6175         From Alexandre Petit-Bianco:
6176         (Warnings): Don't mention -Wunsupported-jdk11.
6177         My stuff:
6178         (Compatibility): Mention JDK 1.2-ness of libraries.
6179         (Resources): Mention resources used when writing gcj.
6180
6181 2001-01-17  Tom Tromey  <tromey@redhat.com>
6182
6183         * gcj.texi: New file.
6184         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6185         (java.info): Depend on gcj.info.
6186         (java/gcj.dvi): New target.
6187         (java.dvi): Depend on gcj.dvi.
6188         (java.install-info): Wrote.
6189
6190 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
6191
6192         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6193         having called make_decl_rtl.
6194
6195 2001-01-14  Per Bothner  <per@bothner.com>
6196
6197         Various patches to emit better messages on verification errors.
6198         * expr.c (push_type_0):  Return error indication on stack overflow,
6199         instead of callinfg fatal.
6200         (push_type):  Now just call push_type_0 (nd fatal on overflow).
6201         (pop_type_0):  Return detailed error message (in a char** argument).
6202         (pop_type):  If pop_type_0 fails, print error message.
6203         (pop_argument_types):  Moved to verify.c.
6204         * verify.c (pop_argument_types):  Moved from expr.c.
6205         Return a (possible) error message, rather than void.
6206         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
6207         (verify_jvm_instruction):  Use new macros, improving error messages.
6208         For case OPCODE_astore use object_ptr_type_node.
6209         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
6210         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
6211
6212         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6213         constant, return body without wrapper.  (Improves constant folding.)
6214         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
6215
6216 2001-01-13  Per Bothner  <per@bothner.com>
6217
6218         * expr.c (expand_java_field_op):  Assigning to a final field outside
6219         an initializer does not violate JVM spec, so should be warning, not
6220         error.  (Sun's verifier does not complain - though MicroSoft's does.)
6221
6222 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
6223
6224         * gjavah.c (version), jcf-dump.c (version): Update copyright year
6225         to 2001.
6226
6227 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
6228
6229         * parse.y (resolve_expression_name): Permit instance variables from
6230         enclosing context in super constructor call.
6231         (resolve_qualified_expression_name): Permit enclosing class's qualified
6232         "this" in super constructor call.
6233
6234 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6235
6236         * class.c (build_utf8_ref): Remove last argument in call to
6237         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6238         (build_class_ref): Likewise.
6239         (build_static_field_ref): Likewise.
6240         (get_dispatch_table): Likewise.
6241         (layout_class_method): Likewise.
6242         (emit_register_classes): Likewise.
6243         * constants.c (build_constant_data_ref): Likewise.
6244         * decl.c (builtin_function): Likewise.
6245         (create_primitive_vtable): Likewise.
6246         * expr.c (build_known_method_def): Likewise.
6247         (build_jni_stub): Likewise.
6248         (java_lang_expand_expr): Likewise.
6249
6250 2001-01-10  Tom Tromey  <tromey@redhat.com>
6251
6252         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6253
6254 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6255
6256         * java-tree.h (lang_printable_name_wls): New prototype.
6257         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6258         rather than `current_class' to print type name. Don't prepend type
6259         names when printing constructor names.
6260         (lang_printable_name_wls): New function.
6261         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6262         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6263         * parse.y (patch_method_invocation): Message tuned for constructors.
6264         (not_accessible_p): Grant `private' access from within
6265         enclosing contexts.
6266
6267 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6268
6269         All files with updated copyright when applicable.
6270         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6271         * class.c (mangle_class_field): Function removed.
6272         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6273         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6274         (build_class_ref): Call `java_mangle_class_field' instead of
6275         `mangle_class_field.'
6276         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6277         (layout_class): Call `java_mangle_decl' instead of
6278         `mangle_static_field.'
6279         (cxx_keywords): Initialized static array moved to `lex.c.'
6280         (layout_class_method): Changed leading comment. Simplified to
6281         call `java_mangle_decl.' Local `ptr' moved in for loop body.
6282         * decl.c (lang_mark_tree): Mark field `package_list.'
6283         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6284         (struct lang_type): New field `package_list.'
6285         (unicode_mangling_length): Prototype removed.
6286         (append_gpp_mangled_name, append_gpp_mangled_classtype,
6287         emit_unicode_mangled_name): Likewise.
6288         (cxx_keyword_p): New prototype.
6289         (java_mangle_decl, java_mangle_class_field,
6290         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6291         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6292         `build_expr_wfl.'
6293         * jvgenmain.c (main_method_prefix): Global variable removed.
6294         (main_method_suffix): Likewise.
6295         (do_mangle_classname): New function.
6296         (main): Call it. Format changed to accommodate new mangling scheme.
6297         * lex.c: (utf8_cmp): Conditionally prototyped.
6298         (cxx_keywords): Moved from class.c, conditionally defined.
6299         (utf8_cmp, cxx_keyword_p): Likewise.
6300         * mangle.c (obstack.h, ggc.h): Included.
6301         (mangle_field_decl): New function.
6302         (mangle_method_decl, mangle_type, mangle_pointer_type,
6303         mangle_array_type, mangle_record_type,
6304         find_compression_pointer_match, find_compression_array_match,
6305         find_compression_record_match,
6306         find_compression_array_template_match, set_type_package_list,
6307         entry_match_pointer_p, emit_compression_string, init_mangling,
6308         finish_mangling, compression_table_add, mangle_member_name): Likewise.
6309         (mangle_obstack): New global.
6310         (MANGLE_RAW_STRING): New macro.
6311         (unicode_mangling_length): Turned static.
6312         (append_unicode_mangled_name): Renamed from
6313         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
6314         replaces `obstack', removed from the parameter list.
6315         (append_gpp_mangled_name): Turned static. `mangle_obstack'
6316         replaces parameter `obstack', removed from the parameter list. Call
6317         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6318         (append_gpp_mangled_classtype): Removed.
6319         (compression_table, compression_next): New static variables.
6320         * parse.y (temporary_obstack): Extern declaration removed.
6321
6322 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6323
6324         * parse.y (patch_binop): Compute missing type in error situations.
6325
6326 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6327
6328         * class.c (make_class_data): Push initial value for "arrayclass".
6329         * decl.c (init_decl_processing): Add new class field "arrayclass".
6330
6331 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6332
6333         From patha@softlab.ericsson.se:
6334         * parse.y (switch_label): Use build, not build1, to construct
6335         DEFAULT_EXPR.
6336
6337 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6338
6339         * lang.c (lang_decode_option): Change -MA to -MP.
6340         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6341         Update to new prototype; do quote targets.
6342         (jcf_dependency_write): Update.
6343
6344 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
6345
6346         Shorten primitive array allocation path:
6347         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6348         to create new primitive arrays.
6349         * expr.c (build_newarray): If generating native code, call
6350         soft_newarray_node with a reference to the primitive TYPE identifier
6351         instead of type_value.
6352
6353 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
6354
6355         Fix for PRs gcj/312 and gcj/253:
6356         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6357         dest if they arn't already.
6358         * class.c (layout_class): Call maybe_layout_super_class on
6359         superinterfaces also, but only if compiling from bytecode.
6360
6361         Fix for PR gcj/373:
6362         * parse.y (create_class): Set ACC_STATIC if class is declared in an
6363         interface.
6364
6365 2000-12-15  Tom Tromey  <tromey@redhat.com>
6366
6367         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6368         set.
6369
6370 2000-12-14  Andrew Haley  <aph@redhat.com>
6371
6372         * boehm.c (mark_reference_fields): Change test to correctly detect
6373         bitmap overflow.
6374
6375 2000-12-15  Andreas Jaeger  <aj@suse.de>
6376
6377         * config-lang.in (lang_dirs): Added.
6378
6379 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6380
6381         * parse.y (end_artificial_method_body): Fixed undefined behavior.
6382         Credits go to rth for finding it.
6383
6384 2000-12-13  Mike Stump  <mrs@wrs.com>
6385
6386         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6387
6388 2000-11-07  Tom Tromey  <tromey@cygnus.com>
6389
6390         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6391         * lex.c (java_ignorable_control_p): Removed.
6392         (java_letter_or_digit_p): Removed.
6393         (java_start_char_p): New function.
6394         (java_read_char): Return `int', not `unicode_t'.  Changed
6395         callers.
6396         (java_read_unicode): Likewise.
6397         (java_read_unicode_collapsing_terminators): Likewise.
6398         (java_get_unicode): Likewise.
6399         (java_new_lexer): Initialize hit_eof.
6400         (java_parse_end_comment): Take `int' argument.
6401         (java_parse_doc_section): Likewise.
6402         (java_parse_escape_sequence): Don't allow backlash-newline.
6403         Return `int'.
6404         * lex.h (JAVA_DIGIT_P): Removed.
6405         (_JAVA_LETTER_OR_DIGIT_P): Removed.
6406         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6407         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6408         (JAVA_PART_CHAR_P): New macro.
6409         (UEOF): Now -1.
6410         (JAVA_CHAR_ERROR): Now -2.
6411         (java_lexer): New field `hit_eof'.
6412         * chartables.h: New file.
6413         * gen-table.pl: new file.
6414
6415 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6416             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6417
6418         * parse.y (java_complete_lhs): Only allow compound assignment of
6419         reference type if type is String.
6420
6421 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6422
6423         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6424         jcf-path.c: Likewise.
6425
6426 2000-12-09  Anthony Green  <green@redhat.com>
6427
6428         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6429         filestart and filename_length as int values.
6430
6431 2000-12-07  Mo DeJong  <mdejong@redhat.com>
6432
6433         * jcf-io.c (find_class): Correct the logic that tests to see if a
6434         .java file is newer than its .class file. The compiler was
6435         incorrectly printing a warning when file mod times were equal.
6436
6437 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
6438
6439         * jvgenmain.c: Use ISPRINT not isascii.
6440
6441 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6442
6443         * parse.y (end_artificial_method_body): Fixed typo.
6444
6445 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6446
6447         * parse.y (patch_method_invocation): Pick the correct enclosing
6448         context when creating inner class instances.
6449         Fixes gcj/332.
6450
6451 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
6452
6453         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6454         Update copyright year to 2000.
6455
6456 2000-11-23  Anthony Green  <green@redhat.com>
6457
6458         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6459         Move current_file_list out of yyparse and make it static.
6460
6461         * expr.c: Declare quick_stack and tree_list_free_list as static
6462         (init_expr_processing): Register quick_stack and
6463         tree_list_free_list roots.
6464
6465 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6466
6467         * parse.y (build_outer_field_access): New local `decl_ctx', use
6468         it. Check for field's context and current class immediate outer
6469         context inheritance.
6470         (outer_field_access_p): Consider fields inherited from the last
6471         enclosing context.
6472         (build_access_to_thisn): Stop at the last enclosing context if
6473         necessary.
6474         Fixes gcj/367.
6475
6476 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
6477
6478         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6479
6480 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
6481
6482         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6483         scratch buffer.
6484
6485 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6486
6487         * jv-scan.c (help): Document --complexity.
6488         (options): Added --complexity.
6489         (flag_complexity): New global.
6490         (main): Call `report'.
6491         * parse-scan.y (complexity): New global.
6492         (if_then_statement, if_then_else_statement,
6493         if_then_else_statement_nsi, switch_block_statement_group,
6494         while_expression, do_statement, for_begin, continue_statement,
6495         throw_statement, catch_clause, finally, method_invocation,
6496         conditional_and_expression, conditional_or_expression,
6497         conditional_expression): Update complexity.
6498         (reset_report): Reset complexity.
6499         (report): New function.
6500
6501 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6502
6503         * lex.c (yylex): Added STRICT_TK case.
6504         * parse.y (STRICT_TK): Added.
6505         * parse-scan.y (STRICT_TK): Added.
6506         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6507         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
6508         file.
6509         * keyword.h: Rebuilt.
6510         * keyword.gperf (strictfp): Added.
6511
6512 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6513
6514         * lex.c (yylex): Recognize floating point constants with leading
6515         0.
6516
6517 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6518
6519         * java-tree.h (cyclic_inheritance_report): Constify.
6520         * parse.y (cyclic_inheritance_report): Likewise.
6521
6522 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6523
6524         * parse.y (goal): Remove call to ggc_add_string_root.
6525
6526 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6527
6528         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6529         Create string in scratch buffer, then pass to build_string.
6530
6531 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6532
6533         * parse.y (issue_warning_error_from_context): Add
6534         ATTRIBUTE_PRINTF.
6535
6536 2000-11-11  Anthony Green  <green@redhat.com>
6537
6538         * jcf-parse.c (process_zip_dir): Add finput parameter.
6539         (jcf_figure_file_type): Call process_zip_dir with appropriate
6540         argument.
6541
6542 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6543
6544         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6545         * jcf-parse.c (jcf_figure_file_type): Likewise.
6546
6547 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6548
6549         * parse.y (create_new_parser_context): Use memset () instead of
6550         bzero ().
6551
6552 2000-11-08  Tom Tromey  <tromey@cygnus.com>
6553
6554         * gjavah.c (process_file): Only include gcj/cni.h when generating
6555         CNI stubs.
6556
6557 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6558
6559         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6560         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6561         instead of bzero ().
6562
6563 2000-11-05  Tom Tromey  <tromey@cygnus.com>
6564
6565         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6566         * lex.c (IS_ZERO): New define.
6567         (java_perform_atof): Error on floating point underflow.
6568
6569 2000-11-04  Tom Tromey  <tromey@cygnus.com>
6570
6571         * lex.c (java_parse_escape_sequence): Only read two octal
6572         characters if the first one is greater than 3.  Don't allow
6573         "octal" numbers to include the digits 8 or 9.
6574
6575 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6576
6577         * Make-lang.in (java.distdir): Remove.
6578
6579 2000-11-03  Tom Tromey  <tromey@cygnus.com>
6580
6581         * Make-lang.in (java.dvi): New target.
6582         Partial fix for PR other/567.
6583
6584         * lang-options.h: Mention -Wout-of-date.
6585         * jcf-dump.c (flag_newer): New global.
6586         * gjavah.c (flag_newer): New global.
6587         * jcf-io.c (find_class): Only warn when flag_newer set.
6588         * lang.c (flag_newer): New global.
6589         (struct string_option): New declaration.
6590         (lang_W_options): New global.
6591         (process_option_with_no): New function.
6592         (lang_decode_option): Use it.
6593
6594         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6595         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6596         `$'.
6597
6598         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6599         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6600         * lex.c (java_read_unicode): Removed `term_context' argument.
6601         Recognize any number of `u' in `\u'.
6602         (java_read_unicode_collapsing_terminators): New function.
6603         (java_get_unicode): Use it.
6604         (java_lineterminator): Removed.
6605         (yylex): Produce error if character literal is newline or single
6606         quote.  Return if eof found in middle of `//' comment.  EOF in
6607         `//' comment is only an error if pedantic.
6608         (java_ignorable_control_p): New function.
6609         (java_parse_end_comment): Return if eof found in middle of
6610         comment.
6611         Include flags.h.
6612         * jv-scan.c (pedantic): New global.
6613
6614 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6615
6616         * parse.y (outer_field_access_p): Inherited fields aren't
6617         consider outer fields.
6618         (maybe_build_thisn_access_method): Use
6619         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6620         (resolve_expression_name): Trigger an error if a static field
6621         is being accessed as an outer field.
6622
6623 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6624
6625         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6626         Fixes gcj/365.
6627
6628 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6629
6630         * Make-lang.in: Move all build rules here from Makefile.in,
6631         adapt to new context.  Wrap all rules that change the current
6632         directory in parentheses.  Expunge all references to $(P).
6633         When one command depends on another and they're run all at
6634         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6635         all object-file generation rules.  Delete obsolete variables.
6636
6637         * Makefile.in: Delete.
6638         * config-lang.in: Delete outputs= line.
6639
6640 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6641
6642         * parse.y (patch_method_invocation): NULLify this_arg when already
6643         inserted.
6644         (maybe_use_access_method): Handle call to methods unrelated to the
6645         current class. Fixed comment.
6646         Fixes gcj/361.
6647
6648 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6649
6650        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6651        scope.
6652
6653 2000-10-24  Tom Tromey  <tromey@cygnus.com>
6654
6655         * lex.c (java_new_lexer): Initialize new fields.  Work around
6656         broken iconv() implementations.
6657         (java_read_char): Swap bytes if required.  Use fallback decoder if
6658         required.
6659         (byteswap_init, need_byteswap): New globals.
6660         (java_destroy_lexer): Only close iconv handle if it is in use.
6661         * lex.h (java_lexer): New fields read_anything, byte_swap,
6662         use_fallback.
6663         Made out_buffer unsigned.
6664
6665 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6666
6667         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6668         where an enclosing context can be set on the jdep.
6669         (do_resolve_class): Fixed identation.
6670
6671 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6672
6673         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6674
6675         * jcf-reader.c (peek_attribute, skip_attribute): Only define
6676         when requested.
6677
6678         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6679
6680         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6681
6682 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6683
6684         * jcf-write.c (OP1): Update `last_bc'.
6685         (struct jcf_block): Fixed indentation and typo in comments.  New
6686         field `last_bc'.
6687         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6688         follows `monitorenter'.
6689         * parse.y (patch_synchronized_statement): New local `tmp'. Call
6690         `patch_string'.
6691         Fixes gcj/232.
6692
6693 2000-10-16  Tom Tromey  <tromey@cygnus.com>
6694
6695         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6696         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6697         * lang-options.h: Added -MA, -MT, -MF..
6698         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6699         (DEPEND_TARGET_SET): New macro.
6700         (DEPEND_FILE_ALREADY_SET): Likewise.
6701         (init_parse): Handle new flags.
6702         * jcf.h (jcf_dependency_print_dummies): Declare.
6703         * Make-lang.in (s-java): Added mkdeps.o.
6704         * Makefile.in (BACKEND): Added mkdeps.o.
6705         (../gcjh$(exeext)): Added mkdeps.o.
6706         (../jcf-dump$(exeext)): Added mkdeps.o.
6707         * jcf-depend.c: Include mkdeps.h.
6708         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6709         add_entry): Removed.
6710         (jcf_dependency_reset): Rewrote.
6711         (dependencies): New global.
6712         (jcf_dependency_set_target): Rewrote.
6713         (jcf_dependency_add_target): Likewise.
6714         (jcf_dependency_add_file): Likewise.
6715         (munge): Removed.
6716         (print_ents): Removed.
6717         (jcf_dependency_write): Rewrote.
6718         (print_dummies): New global.
6719         (jcf_dependency_print_dummies): New function
6720         (jcf_dependency_write): Call deps_dummy_targets if required.
6721
6722 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6723
6724         * gjavah.c (add_class_decl): Removed unused variables `tname',
6725         `tlen' and `name_index'.
6726         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6727         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6728         in `wfl_operator' with value.
6729         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6730         (jcf_figure_file_type): Fixed identation.
6731         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6732         * parse.y (analyze_clinit_body): New function.
6733         (static_initializer:): Reset `current_static_block'.
6734         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6735         `wfl_operator' with new value.
6736         (lookup_cl): Use EXPR_WFL_FILENAME.
6737         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6738         analyze_clinit_body.
6739         (build_outer_field_access): Access to this$<n> built from
6740         current_class, not its outer context.
6741         (build_access_to_thisn): Fixed leading comment. Tidied things up.
6742         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6743         (patch_method_invocation): Use `is_static_flag' when already
6744         initialized.
6745         (patch_newarray): Removed assignment in ternary operator.
6746
6747 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6748
6749         * except.c (free_eh_ranges): Don't free `whole_range'.
6750
6751 2000-10-15  Anthony Green  <green@redhat.com>
6752
6753         * decl.c (init_decl_processing): Call init_class_processing before
6754         anything else.
6755
6756 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6757
6758         * check-init.c (check_init): Fixed leading comment. Use
6759         LOCAL_FINAL_P.
6760         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6761         (give_name_to_locals): Likewise.
6762         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6763         fields in lang_decl_var.
6764         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6765         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6766         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
6767         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
6768         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
6769         (LOCAL_FINAL): Rewritten.
6770         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
6771         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
6772         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
6773         `init_final' fields.
6774         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
6775         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
6776         (TYPE_HAS_FINAL_VARIABLE): New macro.
6777         (struct lang_type): Added `afv' field.
6778         * parse.y (check_static_final_variable_assignment_flag): New function.
6779         (reset_static_final_variable_assignment_flag): Likewise.
6780         (check_final_variable_local_assignment_flag): Likewise.
6781         (reset_final_variable_local_assignment_flag): Likewise.
6782         (check_final_variable_indirect_assignment): Likewise.
6783         (check_final_variable_global_assignment_flag): Likewise.
6784         (add_inner_class_fields): Use LOCAL_FINAL_P.
6785         (register_fields): Handle local finals and final variables.
6786         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
6787         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6788         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6789         on local finals.
6790         (java_complete_expand_methods): Loop to set
6791         TYPE_HAS_FINAL_VARIABLE. Call
6792         `reset_final_variable_local_assignment_flag' and
6793         `check_final_variable_local_assignment_flag' accordingly before
6794         and after constructor expansion. Call
6795         `reset_static_final_variable_assignment_flag'
6796         before expanding <clinit> and after call
6797         `check_static_final_variable_assignment_flag' if the
6798         current_class isn't an interface. After all methods have been
6799         expanded, call `check_final_variable_global_assignment_flag' and
6800         `check_static_final_variable_assignment_flag' if the current class
6801         is an interface.
6802         (maybe_yank_clinit): Fixed typo in comment.
6803         (build_outer_field_access_methods): Removed old sanity check. Use
6804         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6805         Don't create access methods for finals.
6806         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
6807         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
6808         existing DECL_INIT has been processed.
6809         (java_complete_lhs): Likewise.
6810         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
6811         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
6812         logic.
6813         (patch_assignment): Use LOCAL_FINAL_P.
6814         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
6815         DECL_INITIAL is nullified.
6816         Fixes gcj/163.
6817
6818 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6819
6820         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
6821
6822         * Makefile.in (parse.c, parse-scan.c): Likewise.
6823
6824 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6825
6826         * class.c (temporary_obstack): Remove.
6827         (make_class): Don't mess with obstascks.
6828         (push_class): Likewise.
6829         (set_super_info): Likewise.
6830         (add_method_1): Likewise.
6831         (add_method): Likewise.
6832         (add_field): Likewise.
6833         (build_utf8_ref): Likewise.
6834         (build_class_ref): Likewise.
6835         (build_static_field_ref): Likewise.
6836         (finish_class): Likewise.
6837         (push_super_field): Likewise.
6838         (layout_class): Likewise.
6839         (layout_class_methods): Likewise.
6840         (init_class_processing): Likewise.
6841         * constants.c (get_tag_node): Likewise.
6842         (build_constant_data_ref): Likewise.
6843         * decl.c (ggc_p): Remove.
6844         (copy_lang_decl): Use ggc_alloc.
6845         (complete_start_java_method): Don't mess with obstacks.
6846         (start_java_method): Likewise.
6847         (end_java_method): Likewise.
6848         * except.c (link_handler): Use xmalloc.
6849         (free_eh_ranges): New function.
6850         (method_init_exceptions): Use it.
6851         (add_handler): Use xmalloc.
6852         (expand_start_java_handler): Don't mess with obstacks.
6853         (prepare_eh_table_type): Likewise.
6854         (expand_end_java_handler): Likewise.
6855         * expr.c (push_value): Likewise.
6856         (create_label_decl): Likewise.
6857         (build_jni_stub): Likewise.
6858         (java_lang_expand_expr): Likewise.
6859         (note_instructions): Use xrealloc.
6860         (java_push_constant_from_pool): Don't mess with obstacks.
6861         (process_jvm_instruction): Likewise.
6862         * java-tree.h (cyclic_inheritance_report): Remove duplicate
6863         declaration.
6864         * jcf-parse.c (get_constant): Don't mess with obstacks.
6865         (read_class): Likewise.
6866         (jcf_parse): Likewise.
6867         * lex.c (expression_obstack): Remove.
6868         (java_lex): Don't use obstack_free.
6869         * parse.h (exit_java_complete_class): Don't mess with obstacks.
6870         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
6871         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
6872         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
6873         * parse.y (gaol): Add more GC roots.
6874         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
6875         (lookup_field_wrapper): Likewise.
6876         (obtain_incomplete_type): Don't mess with obstacks.
6877         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
6878         macros.
6879         (craft_constructor): Don't mess with obstacks.
6880         (safe_layout_class): Likewise.
6881         (java_complete_class): Likewise.
6882         (source_end_java_method): Likewise.
6883         (build_outer_field_access_methods): Likewise.
6884         (build_outer_method_access_method): Likewise.
6885         (maybe_build_thisn_access_method): Likewise.
6886         (build_dot_class_method_invocation): Likewise.
6887         (java_complete_tree): Likewise.
6888         (java_complete_lhs): Likewise.
6889         (do_merge_string_cste): Likewise.
6890         (patch_string_cst): Likewise.
6891         (array_constructor_check_entry): Likewise.
6892         * typeck.c (build_java_array_type): Likewise.
6893         (parse_signature_string): Likewise.
6894         (build_java_signature): Likewise.
6895
6896 2000-10-12  Tom Tromey  <tromey@cygnus.com>
6897
6898         Fix for PR gcj/356:
6899         * gjavah.c (add_class_decl): Don't special-case inner classes.
6900         (add_namelet): Likewise.
6901
6902 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
6903
6904         * java-tree.h: Constify current_encoding.
6905         * lang.c: Constify current_encoding.
6906
6907 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
6908
6909         * jvgenmain.c (class_mangling_suffix): Omit `.'.
6910         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
6911
6912 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6913
6914         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
6915         patch. Fixes gcj/340.
6916
6917 2000-10-10  Tom Tromey  <tromey@cygnus.com>
6918
6919         * lex.c (java_new_lexer): Initialize out_first and out_last
6920         fields.
6921         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
6922
6923 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6924
6925         * parse.y (pop_current_osb): New function.
6926         (array_type:): Use `dims:', changed actions
6927         accordingly. Suggested by Anthony Green.
6928         (array_creation_expression:): Used pop_current_osb.
6929         (cast_expression:): Likewise.
6930         (search_applicable_method_list): Fixed indentation.
6931
6932 2000-10-08  Anthony Green  <green@redhat.com>
6933
6934         * parse.y (array_type_literal): Remove production.
6935         (type_literals): Refer to array_type, not array_type_literal.
6936
6937 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6938
6939         Patch contributed by Corey Minyard.
6940         * decl.c (check_local_named_variable): New function.
6941         (tree check_local_unnamed_variable): Likewise.
6942         (find_local_variable): Splitted. Call check_local_{un}named_variable.
6943
6944 2000-10-07  Anthony Green  <green@redhat.com>
6945
6946         * class.c (layout_class): Handle case where superclass can't be
6947         layed out yet.
6948
6949 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6950
6951         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
6952         gperf.
6953
6954 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6955
6956         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
6957         * jvgenmain.c (class_mangling_prefix): Removed.
6958         (class_mangling_suffix): New global.
6959         (main): Use it.
6960         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
6961         `$'.
6962         (print_method_info): Handle overrides for static and final
6963         methods.
6964         (process_file): Generate declaration for class object field.
6965         * class.c (cxx_keywords): New array.
6966         (utf8_cmp): New function.
6967         (cxx_keyword_p): New function.
6968         (layout_class_method): Mangle C++ keywords by appending `$'.
6969         (mangle_field): New function.
6970         (mangle_class_field): Use mangle_field.  Mangle class name as
6971         `class$'.
6972         (mangle_static_field): Use mangle_field.
6973
6974 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6975
6976         * decl.c (find_local_variable): Removed uncessary type check and
6977         fixed range check typo. From Corey Minyard.
6978
6979 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6980
6981         * decl.c (give_name_to_locals): New local `code_offset'. Call
6982         `maybe_adjust_start_pc'.
6983         * expr.c (note_instructions): New function.
6984         (expand_byte_code): Don't collect insn starts here.
6985         (peek_opcode_at_pc): New function.
6986         (maybe_adjust_start_pc): Likewise.
6987         * java-tree.h (maybe_adjust_start_pc): Declare.
6988         (note_instructions): Likewise.
6989         * jcf-parse.c (parse_class_file): Call `note_instructions'.
6990
6991 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6992
6993         * parse.y (field_access:): Fixed indentation.
6994         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
6995
6996 2000-09-07  Tom Tromey  <tromey@cygnus.com>
6997
6998         Fix for PR gcj/307:
6999         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
7000         JPRIMITIVE_TYPE_P, for arithmetic operators.
7001         (patch_method_invocation): Indentation fix.
7002         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
7003         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
7004         (do_unary_numeric_promotion): Cleaned up code.
7005         (valid_cast_to_p): Handle boolean correctly.
7006
7007 2000-09-27  Tom Tromey  <tromey@cygnus.com>
7008
7009         * lex.c (java_read_unicode): Reset bs_count when finished with
7010         `\u' sequence.
7011
7012 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
7013
7014         Convert to GC.
7015         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
7016         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
7017         (typeck.o): Depend on ggc.h.
7018         * class.c (add_method_1): Use GC functions for allocation.
7019         (init_class_processing): Register roots.
7020         * decl.c (ggc_p): Set to 1.
7021         (pending_local_decls): Make it static.
7022         (push_jvm_slot): Use GC functions for allocation.
7023         (init_decl_processing): Register roots.
7024         (give_name_to_locals): Use GC functions for allocation.
7025         (lang_mark_tree): New function.
7026         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
7027         functions for allocation.
7028         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
7029         * lex.c (java_lex): Use build_string, rather than replicating it
7030         inline.
7031         * parse.y (goal): Add more roots.
7032         (mark_parser_ctxt): New function.
7033         * typeck.c: Include ggc.h.
7034
7035 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7036
7037         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
7038         contains something else than MODIFY_EXPR.
7039
7040 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
7041
7042         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
7043         * Makefile.in (parse.o): Depend on ggc.h.
7044         (class.o): Likewise.
7045         (constants.o): Likewise.
7046         (decl.o): Likewise.
7047         (expr.o): Likewise.
7048         (jcf-parse.o): Likewise.
7049         (jcf-write.o): Likewise.
7050         (mangle.o): Likewise.
7051         * class.c: Include ggc.h.
7052         (build_static_field_ref): Register GC roots.
7053         (layout_class): Likewise.
7054         (init_class_processing): Likewise.
7055         * constants.c: Include ggc.h.
7056         (current_constant_pool_data_ref): Remove.
7057         (tag_nodes): Move it to ...
7058         (get_tag_node): ... here.  Register GC roots.
7059         * decl.c: Include ggc.h.  Remove many global tree definitions.
7060         (throw_node): Define.
7061         (java_global_trees): Likewise.
7062         (predef_filenames): Make the size a constant.
7063         (init_decl_processing): Adjust accordingly.
7064         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
7065         * expr.c: Include ggc.h.
7066         (init_expr_processing): Register GC roots.
7067         (build_invokeinterface): Likewise.
7068         * java-tree.h: Replace extern tree declarations with macros.
7069         (java_global_trees): New variable.
7070         (java_tree_index): New enumeration.
7071         (init_jcf_parse): Declare.
7072         * jcf-parse.c: Include ggc.h.
7073         (current_class): Remove declaration.
7074         (main_class): Likewise.
7075         (all_class_list): Likewise.
7076         (predefined_filename_p): Adjust for constant size of
7077         predef_filenames.
7078         (init_jcf_parse): New function.
7079         * jcf-write.c: Include ggc.h.
7080         (generate_classfile): Register GC roots.
7081         (append_synthetic_attribute): Likewise.
7082         (append_innerclass_attribute_entry): Likewise.
7083         * lang.c: Include ggc.h.
7084         (lang_print_error): Register GC roots.
7085         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
7086         with macros.
7087         * parse.y: Include ggc.h.
7088         (wfl_operator): Remove.
7089         (goal): Register GC roots.
7090         (java_pop_parser_context): Adjust for new field names.
7091         (java_parser_context_save_global): Likewse.
7092         (java_parser_context_restore_global): Likewise.
7093         (java_parser_context_suspend): Likewise.
7094         (java_parser_context_resume): Likewise.
7095         (verify_constructor_circularity): Register GC roots.
7096         (lookup_cl): Likewise.
7097         (java_reorder_fields): Likewise.
7098         (build_current_this): Likewise.
7099         (class_in_current_package): Likewise.
7100         (argument_types_convertible): Likewise.
7101         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7102
7103 2000-09-14  Tom Tromey  <tromey@cygnus.com>
7104
7105         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7106
7107 2000-09-13  Tom Tromey  <tromey@cygnus.com>
7108
7109         * jcf-parse.c: Include <locale.h>.
7110         * jv-scan.c: Include <locale.h>.
7111
7112 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7113
7114         * expr.c (pop_type_0): Return `Object' if trying to merge two
7115         interface types.
7116         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7117         interface types; `Object' is always a valid supertype.
7118
7119 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7120
7121         Fix for PR gcj/33:
7122         * jv-scan.c (help): Document --encoding.
7123         (options): Added `encoding' entry.
7124         (OPT_ENCODING): New define.
7125         (main): Handle --encoding.
7126         Include <langinfo.h> if nl_langinfo exists.
7127         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7128         --encoding.
7129         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7130         (parse_source_file): Correctly call java_init_lex.  Added `finput'
7131         argument.  Use nl_langinfo to determine default encoding.
7132         * java-tree.h (current_encoding): Declare.
7133         * parse.y (java_parser_context_restore_global): Don't restore
7134         `finput'.
7135         (java_parser_context_save_global): Don't set `finput' field.
7136         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
7137         if required.
7138         * lang.c (current_encoding): New global.
7139         (lang_decode_option): Recognize `-fencoding='.
7140         (finish_parse): Don't close finput.
7141         * parse.h (struct parser_ctxt): Removed `finput' and
7142         `unget_utf8_value' fields.  Added `lexer' field.
7143         (java_init_lex): Fixed declaration.
7144         * lex.c (java_new_lexer): New function.
7145         (java_destroy_lexer): Likewise.
7146         (java_read_char): Added `lex' argument.  Handle iconv case.
7147         (java_read_unicode): Added `lex' argument.  Count backslashes in
7148         lexer structure.
7149         (java_init_lex): Added `finput' and `encoding' arguments.  Set
7150         `lexer' field in ctxp.
7151         (BAD_UTF8_VALUE): Removed.
7152         (java_lex): Handle seeing UEOF in the middle of a string literal.
7153         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7154         (java_lexer): New structure.
7155         (UNGETC): Removed.
7156         (GETC): Removed.
7157         (DEFAULT_ENCODING): New define.
7158         (java_destroy_lexer): Declare.
7159
7160 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7161
7162         Fix for PR gcj/343:
7163         * lex.c (java_init_lex): Initialize java_io_serializable.
7164         * parse.y (java_io_serializable): New global.
7165         (valid_ref_assignconv_cast_p): An array can be cast to
7166         serializable.
7167
7168 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7169
7170         * decl.c, expr.c: Include defaults.h if not already included.
7171         Don't define the *_TYPE_SIZE macros.
7172
7173 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
7174
7175         * typeck.c (build_java_array_type): Correct first parameter
7176         in ADJUST_FIELD_ALIGN invocation.
7177
7178 2000-09-06  Tom Tromey  <tromey@cygnus.com>
7179
7180         * lang-specs.h: Also recognize `-femit-class-files'.
7181
7182 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7183
7184         * verify.c (merge_types): Load the types to merge if necessary.
7185
7186 2000-09-02  Anthony Green  <green@redhat.com>
7187
7188         * jcf-io.c: Include zlib.h.
7189         (open_in_zip): Read compressed class file archives.
7190         * zipfile.h (ZipDirectory): Add uncompressed_size and
7191         compression_method fields.
7192         * zextract.c (read_zip_archive): Collect file compression info.
7193
7194 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
7195
7196         * parse.y (do_resolve_class): Also explore superclasses of
7197         intermediate enclosing contexts when searching for inner classes.
7198
7199 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7200
7201         * parse.y (variable_declarator_id:): Better error message.
7202         (expression_statement:): Use YYNOT_TWICE.
7203         (cast_expression:): Likewise.
7204         (assignment:): Likewise.
7205
7206 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7207
7208         * parse.y (do_merge_string_cste): New locals. Create new
7209         STRING_CSTs each time, use memcpy. Fixes gcj/311.
7210
7211 2000-08-07  Hans Boehm  <boehm@acm.org>
7212
7213         * boehm.c (mark_reference_fields): Set marking bits for all words in
7214         a multiple-word record.
7215         (get_boehm_type_descriptor): Use the procedure marking descriptor for
7216         java.lang.Class.
7217
7218 2000-08-31  Mike Stump  <mrs@wrs.com>
7219
7220         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7221         jcf-dump$(exeext)): Make parallel safe.
7222
7223 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7224
7225         * jcf-parse.c (set_source_filename): Constify a char *.
7226         * jcf-write.c (append_innerclasses_attribute,
7227         make_class_file_name): Constify a char *.  Don't recycle a
7228         variable for an unrelated purpose.
7229         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7230         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7231
7232 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7233
7234         * expr.c (can_widen_reference_to): Fixed indentation.
7235         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7236         * parse.y: `finit$' replaces `$finit$' in comments.
7237         (try_builtin_assignconv): Fixed leading comment.
7238
7239 2000-08-25  Greg McGary  <greg@mcgary.org>
7240
7241         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7242
7243 2000-08-24  Greg McGary  <greg@mcgary.org>
7244
7245         * lang.c (lang_decode_option): Use ARRAY_SIZE.
7246         * parse.y (BINOP_LOOKUP): Likewise.
7247
7248 2000-08-22  Andrew Haley  <aph@cygnus.com>
7249
7250         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7251         sign extending. Fixes gcj/321.
7252         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7253         combining to make a jlong. Fixes gcj/321.
7254
7255 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7256
7257         * lang-specs.h: Do not process -o or run the assembler if
7258         -fsyntax-only.
7259
7260 2000-08-16  Andrew Haley  <aph@cygnus.com>
7261
7262         * typeck.c (build_java_array_type): Rewrite code to do array
7263         alignment.  Take into account back-end macros when aligning array
7264         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7265         user to set alignment. Fixes gcj/252 and 160.
7266
7267 2000-08-09  Tom Tromey  <tromey@cygnus.com>
7268
7269         * parse.y (check_abstract_method_definitions): Now return `int'.
7270         Check implemented interfaces.  Fixes PR gcj/305.
7271
7272         * parse.y (patch_switch_statement): Disallow `long' in switch
7273         expressions.  Fixes PR gcj/310.
7274
7275 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7276
7277         * decl.c (finit_leg_identifier_node): New global.
7278         (init_decl_processing): Use `finit$' to initialize
7279         finit_identifier_node. Use `$finit$' to initialize
7280         finit_leg_identifier_node.
7281         * expr.c (expand_java_field_op): Use ID_FINIT_P.
7282         * java-tree.h (finit_identifier_node): Changed attached comment.
7283         (finit_leg_identifier_node): New declaration.
7284         (ID_FINIT_P): Take finit_identifier_node and
7285         finit_leg_identifier_node into account. This is a backward
7286         compatibility hack.
7287
7288 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7289
7290         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7291         Jan 6 2000 patch.
7292         (generate_bytecode_insns): Check `nargs' before emitting it.
7293         * verify.c (merge_type_state): Fixed typo.
7294         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7295         generate_bytecode_{conditional,insns}.
7296
7297 2000-08-13  Anthony Green  <green@redhat.com>
7298
7299         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7300         for -pg builds).
7301
7302 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7303
7304         * class.c (maybe_layout_super_class): Fixed indentation.
7305         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7306         (java_check_methods): New function declaration.
7307         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7308         instead of `str_ptr'.
7309         * jcf-write.c (generate_bytecode_insns): Emit number the of args
7310         of a `invokeinterface' at the right time.
7311         * parse.h (WFL_STRIP_BRACKET): New macro.
7312         (SET_TYPE_FOR_RESOLUTION): Use it.
7313         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7314         (check_class_interface_creation): Don't check for cross package
7315         innerclass name clashes.
7316         (method_header): Behave properly if MDECL is `error_mark_node'.
7317         (method_declarator): Return `error_mark_node' if bogus current
7318         class.
7319         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7320         (resolve_and_layout): New local `decl_type', set and used. Call
7321         java_check_methods.
7322         (java_check_methods): New method.
7323         (java_layout_classes): Use it.
7324         (resolve_qualified_expression_name): No EH check necessary in
7325         access$<n>.
7326         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7327         `case' statement.
7328         (patch_assignment): Set DECL_INITIAL on integral final local.
7329
7330 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7331
7332         * java-tree.h (flag_extraneous_semicolon): New extern.
7333         * lang-options.h: (-Wextraneous-semicolon): New option.
7334         * lang.c (flag_redundant): Fixed typo in leading comment.
7335         (flag_extraneous_semicolon): New global.
7336         (lang_decode_option): Set `flag_extraneous_semicolon' when
7337         -Wall. Decode `-Wextraneous-semicolon'.
7338         * parse.y (type_declaration:): Removed `SC_TK' hack, added
7339         `empty_statement' rule.
7340         (class_body_declaration): Likewise.
7341         (method_body:): Accept `;' as a method body.
7342         (static_initializer:): Removed `SC_TK' hack.
7343         (constructor_block_end:): Likewise.
7344         (empty_statement:): Report deprecated empty declaration. Fixes
7345         gcj/295
7346
7347 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7348
7349         * parse.y (build_dot_class_method_invocation): Changed parameter
7350         name to `type'. Build signature from `type' and convert it to a
7351         STRING_CST if it's an array.
7352         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7353         to use `ref_type' directly.
7354
7355 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
7356
7357         * lang-options.h: Added a comma after the last element to avoid
7358         syntax errors when other languages define additional options.
7359
7360 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7361
7362         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7363         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7364         (jc1): Link with $(BACKEND).
7365         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7366
7367 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7368
7369         * jvspec.c: Adjust type of second argument to
7370         lang_specific_driver, and update code as necessary.
7371
7372         * class.c (build_dtable_decl): Initialize dummy.
7373
7374 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7375
7376         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7377         method bodies not to rule out discarding `<clinit>'; don't use
7378         <clinit> to initialize static fields with constant initializers.
7379
7380 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7381
7382         * gjavah.c (print_method_info): Added `synth' parameter. Skip
7383         synthetic methods.
7384         (method_synthetic): New global.
7385         (HANDLE_METHOD): Recognize synthetic method and tell
7386         `print_method_info' about it.
7387         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7388         processing a synthetic method.
7389         * jcf-reader.c (skip_attribute): New function.
7390         ( skip_attribute): Likewise.
7391
7392 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7393
7394         * parse.y (build_outer_field_access): Fixed comments.
7395         (fix_constructors): Emit the initialization of this$<n> before
7396         calling $finit$.
7397         (resolve_qualified_expression_name): Build an access to `decl' if
7398         necessary.
7399
7400 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7401
7402         * parse-scan.y (curent_class): Non longer const.
7403         (inner_qualifier, inner_qualifier_length): Deleted.
7404         (current_class_length): New global.
7405         (bracket_count): Fixed typo in leading comment.
7406         (anonymous_count): New global.
7407         (class_instance_creation_expression:): Handle anonymous classes.
7408         (anonymous_class_creation:): New rule.
7409         (push_class_context): Rewritten.
7410         (pop_class_context): Likewise.
7411         (INNER_QUALIFIER): Macro deleted.
7412         (report_class_declaration): call `push_class_context' when
7413         entering the function. `fprintf' format modified not to use
7414         INNER_QUALIFIER.
7415         (report_class_declaration): Assign `package_name' and
7416         `current_class' to NULL separately.
7417
7418 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7419
7420         * expr.c (build_invokeinterface): Call layout_class_methods on
7421         target interface.
7422
7423 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7424             Anthony Green  <green@cygnus.com>
7425             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7426
7427         * class.c (make_class_data): Create vtable for abstract classes.
7428         (get_dispatch_table): Changed to cope with abstract classes.
7429
7430 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7431
7432         * parse.y (patch_method_invocation): Don't reverse the argument
7433         list when dealing with anonymous class constructors. Fixed typo in
7434         comment.
7435
7436 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7437
7438         * parse.y (build_alias_initializer_parameter_list): Reverse
7439         crafted list when building aliases for anonymous class
7440         constructors.
7441
7442 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7443
7444         * parse.y (jdep_resolve_class): Don't bother checking potential
7445         innerclass access if `decl' is NULL.
7446         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7447         WFL.
7448
7449 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7450
7451         * parse.c: Remove (again.)
7452
7453 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7454
7455         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7456         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7457         outside the `if' statement, alias to innerclass removed, `decl'
7458         used to mark the class complete.
7459
7460 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7461
7462         * parse.y (simple_name:): Fixed typo in error message.
7463
7464 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7465
7466         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7467         or its first operand can be error marks.
7468
7469 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7470
7471         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7472         * parse.y (method_header): Likewise.
7473
7474 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7475
7476         * parse.y (process_imports): Consider that one might be trying to
7477         import an innerclass. Fixes gcj/254
7478
7479 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7480
7481         * parse.y (find_as_inner_class): Handle the case where the
7482         enclosing context of an innerclass has been loaded as bytecode.
7483
7484 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7485
7486         * parse.y (simple_name:): Reject `$' in type names.
7487         (resolve_type_during_patch): Use `type' as a second
7488         argument to resolve_no_layout. Fixes gcj/257.
7489
7490 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
7491
7492         * parse.y (find_most_specific_methods_list): Select the only
7493         non-abstract method even if max has been set.
7494         Fixes gcj/285, gcj/298.
7495
7496 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
7497
7498         * lang-specs.h: Added %(jc1) to java compiler options.
7499
7500 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7501
7502         * .cvsignore: New file.
7503
7504 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7505
7506         * parse.y (not_accessible_p): Access granted to innerclasses
7507         (indirectly) extending the reference type. Fixes gcj/249.
7508
7509 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7510
7511         * parse.y (patch_method_invocation): Fixed comment.
7512         (maybe_use_access_method): Build this$<n>s to the context of the
7513         target method, or a type that extends it. Fixes gcj/242.
7514
7515 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7516
7517         * parse.c: Remove.
7518
7519 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7520
7521         * parse.y (fold_constant_for_init): Avoid bullish conversion.
7522
7523 2000-07-13  Tom Tromey  <tromey@cygnus.com>
7524
7525         * lang-specs.h: Added %{I*}.
7526
7527 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7528
7529         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7530
7531 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7532
7533         * parse-scan.c: Remove.
7534
7535 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7536
7537         * class.c (set_super_info): Handled protected inner classes.
7538         (common_enclosing_context_p): Bail early if arguments aren't both
7539         inner classes.
7540         (get_access_flags_from_decl): Handle private and protected inner
7541         classes.
7542         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7543         (CLASS_PROTECTED): Likewise.
7544         (struct lang_type): New bitfield `poic'.
7545         * parse.y (jdep_resolve_class): Call check_inner_class_access on
7546         inner classes only.
7547         (check_inner_class_access): Renamed arguments, added
7548         comments. Handles protected inner classes (fixes gcj/225)
7549         (not_accessible_p): Fixed comments. Avoid handling inner classes.
7550
7551 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7552
7553         * parse.y (resolve_qualified_expression_name): Verify qualified
7554         access to `this'. Fixes gcj/239.
7555
7556 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7557
7558         * jcf-write.c (generate_classfile): Don't install ConstantValue
7559         for null pointers.
7560
7561 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7562
7563         * parse.y (resolve_qualified_expression_name): Handle inner class
7564         access. Fixes gcj/256.
7565
7566 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7567
7568         * jcf-write.c (generate_classfile): Properly install the
7569         ConstantValue attribute and the initial value constant pool index
7570         on string constants.
7571         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7572         class files.
7573
7574 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7575
7576         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7577         construct.
7578         * parse.y (find_as_inner_class): Fixed typo.
7579         (do_resolve_class): Explore enclosing contexts when searching for
7580         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7581         (check_inner_class_access): Check `decl' which can be null in case
7582         of previous errors.
7583
7584 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7585
7586         * java-tree.h (java_debug_context): Declared `extern'.
7587         (safe_layout_class): Likewise.
7588         * parse.y (resolve_field_access): Field must be `static' in order
7589         to be replaced by its initial value. Added comments.
7590         (find_applicable_accessible_methods_list): Fixed typo.
7591         (find_most_specific_methods_list): Methods found in innerclasses
7592         take over methods founds in the enclosing contexts.
7593         (java_complete_tree): Loosen restrictions on the type of DECLs
7594         that can be replaced by their initialization values.
7595         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7596
7597 2000-07-05  Tom Tromey  <tromey@cygnus.com>
7598
7599         * Make-lang.in (PARSE_DIR): New macro.
7600         (PARSE_RELDIR): Likewise.
7601         (PARSE_C): Likewise.
7602         (PARSE_SCAN_C): Likewise.
7603         ($(PARSE_C)): New target.
7604         ($(PARSE_SCAN_C)): Likewise.
7605         (SET_BISON): New macro.
7606         (BISONFLAGS): Likewise.
7607         (JAVABISONFLAGS): Likewise.
7608
7609 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
7610
7611         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7612         argument on the first pass for CNI as well as JNI.
7613         (print_method_info): Set up method name on the first pass only.
7614
7615 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7616
7617         * parse.y (parser_qualified_classname): Removed parameter
7618         `is_static'.
7619         (create_interface): Removed first passed parameter to
7620         parser_qualified_classname.
7621         (create_class): Likewise. Don't install alias on static
7622         innerclasses. Fixes gcj/275.
7623
7624 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7625
7626         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7627         debugable statement with empty_stmt_node. Fixes gcj/272
7628
7629 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7630
7631         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7632         gcj/271.
7633
7634 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7635
7636         * jcf-write.c (push_long_const): Appropriately cast short negative
7637         constant to jword.
7638
7639 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7640
7641         * parse.y (verify_constructor_super): Use loop variable
7642         `m_arg_type' initialized with `mdecl_arg_type'.
7643
7644 2000-06-29  Tom Tromey  <tromey@cygnus.com>
7645
7646         * parse.y (resolve_field_access): Handle case where `type_found'
7647         is NULL.
7648
7649 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7650
7651         * expr.c (lookup_field): The same field can be found through two
7652         different interface. Don't declare it ambiguous in that case.
7653
7654 2000-06-27  Tom Tromey  <tromey@cygnus.com>
7655
7656         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
7657         follows \r, then unget it at a lower level.
7658
7659 2000-06-26  Tom Tromey  <tromey@cygnus.com>
7660
7661         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7662         java_complete_tree.
7663
7664 2000-06-25  Tom Tromey  <tromey@cygnus.com>
7665
7666         * parse.y (for_statement): Wrap expression in a WFL if it is a
7667         constant.  For PR gcj/268.
7668
7669 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7670
7671         * parse.y (do_resolve_class): Minor optimiztion in the package
7672         list search. Removed unnecessary test and return statement.
7673         (valid_ref_assignconv_cast_p): Order of arguments to
7674         enclosing_context_p fixed.
7675
7676 2000-06-24  Tom Tromey  <tromey@cygnus.com>
7677
7678         * expr.c (lookup_field): Print error and return error_mark_node if
7679         field reference is ambiguous.
7680
7681         * parse.y (check_abstract_method_definitions): Also check if
7682         `other_method' is abstract.
7683
7684 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7685
7686         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7687         classes.
7688         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7689         (struct lang_type): New field `pic'.
7690         (CLASS_PRIVATE): New macro.
7691         * parse.y (check_inner_class_access): New function.
7692         (jdep_resolve_class): Call it.
7693
7694 2000-06-23  Tom Tromey  <tromey@cygnus.com>
7695
7696         * parse.y (patch_incomplete_class_ref): Initialize the returned
7697         class.  For PR gcj/260.
7698
7699 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7700
7701         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7702
7703 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7704
7705         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7706         Java specific checks.
7707         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7708         screened by DECL_P.
7709         * java-tree.def (CASE_EXPR): Marked 'e'.
7710         (DEFAULT_EXPR): Likewise.
7711         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7712         screened by DECL_P.
7713         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7714         Java specific checks.
7715         (generate_bytecode_insns): Test try_block for BLOCK before using
7716         BLOCK_EXPR_BODY.
7717         * parse.y (build_wfl_wrap): Added `location' argument. Set
7718         EXPR_WFL_LINECOL accordingly.
7719         (dim_expr:): Wrap constants with WFLs.
7720         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7721         (resolve_package): Check for `stmt' not being a BLOCK before
7722         building a debuggable statement with it.
7723         (make_qualified_primary): Added extra parameter to build_wfl_wrap
7724         invocation.
7725         (resolve_field_access): Make sure `decl' is a DECL before treating
7726         it as such.
7727         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7728         IDENTIFIER_NODE before treating it as such.
7729         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7730         treating it as such.
7731         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7732         to be applied only on non array types.
7733
7734 2000-06-16  Per Bothner  <per@bothner.com>
7735
7736         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
7737         define in terms of DECL_RESULT, as that fails when --enable-checking.
7738
7739 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7740
7741         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
7742         types the same in comparison.
7743         (CHECK_OP): Add static prototype.
7744
7745 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7746
7747         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7748         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7749         * parse.c: Rebuilt.
7750
7751 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7752
7753         * decl.c (create_primitive_vtable): Prototype.
7754
7755         * jcf-write.c (generate_bytecode_insns): Initialize variable
7756         `saved_context'.
7757
7758         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7759
7760 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7761
7762         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7763         to track searched classes, and do not search the same class more than
7764         once. Call find_applicable_accessible_methods_list on immediate
7765         superclass, instead of search_applicable_method_list on all ancestors.
7766         Fix for PR gcj/238.
7767
7768 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7769
7770         * parse.y (register_fields): Permit static fields in inner classes
7771         if they are final. Fix for PR gcj/255.
7772
7773 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7774
7775         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
7776         * parse.y (find_in_imports): Returned type changed to void,
7777         leading comment fixed.
7778         (register_package): New function.
7779         (qualify_and_find): Likewise.
7780         (package_declaration:): Use `register_package'.
7781         (single_type_import_declaration:): Removed local variable
7782         `node'. Added missing `;' for consistency.
7783         (type_import_on_demand_declaration:): Use `chainon' to link new
7784         entries.
7785         (lookup_field_wrapper): Lookup local variables defined in outer
7786         contexts first.
7787         (java_complete_class): Don't reverse the list of imported on demand.
7788         (do_resolve_class): Reorganized. Removed local variable
7789         `original_name'. Call `qualify_and_find' with the current package
7790         name, invoke `find_in_imports_on_demand' right after. Call
7791         `qualify_and_find' with the packages we've seen so far. Fixed
7792         operations numbering in comments.
7793         (java_expand_class): Don't reverse `package_list'.
7794         (find_most_specific_methods_list): New local variables `abstract'
7795         and `candidates'. Use them to pick the right method.
7796
7797 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
7798
7799         * parse.y (check_modifiers_consistency): Don't subtract out
7800         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
7801
7802 2000-06-04  Philipp Thomas  <pthomas@suse.de>
7803
7804         * Makefile.in (INTLLIBS): New.
7805         (LIBS): Add above.
7806         (DEPLIBS): Ditto.
7807
7808 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7809
7810         * class.c (get_dispatch_table): Build the vtable dummy entry list
7811         element with a null purpose. Fixed leading comment.
7812         (build_dtable_decl): Build an accurate dtable type when appropriate
7813         and use it.
7814
7815 2000-06-02  Richard Henderson  <rth@cygnus.com>
7816
7817         * lang.c (lang_get_alias_set): New.
7818
7819 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7820
7821         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
7822         before using it as the accessed field.
7823
7824 2000-05-31  Tom Tromey  <tromey@cygnus.com>
7825
7826         * java-tree.h (boolean_array_vtable, byte_array_vtable,
7827         char_array_vtable, short_array_vtable, int_array_vtable,
7828         long_array_vtable, float_array_vtable, double_array_vtable):
7829         Declare.
7830         * expr.c (get_primitive_array_vtable): New function.
7831         (create_primitive_vtable): New function.
7832         (java_lang_expand_expr): Enable code to statically generate
7833         arrays.
7834         * decl.c (init_decl_processing): Create primitive vtables.
7835         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
7836         short_array_vtable, int_array_vtable, long_array_vtable,
7837         float_array_vtable, double_array_vtable): Define.
7838
7839 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
7840
7841         * java/parse.y (find_applicable_accessible_methods_list):
7842         Don't add an uninitialized value to the list.
7843
7844 2000-05-25  Tom Tromey  <tromey@cygnus.com>
7845
7846         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
7847         when trying to see if field's class should be initialized.  Always
7848         initialize field's declaring class, not qualified class.
7849         For PR gcj/162.
7850
7851         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
7852         `wfl_operator', to maybe_build_primttype_type_ref.
7853         Fixes PR gcj/235.
7854
7855 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
7856
7857        * parse.y (patch_method_invocation): Don't try to lookup methods
7858        in primitive types.
7859
7860 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7861
7862         * parse.y (resolve_field_access): Call the appropriate <clinit>
7863         before accessing the length of a static array. Craft a decl for
7864         the field while its time. Fixes PR gcj/129.
7865
7866 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7867
7868         * parse.y (resolve_package): Correctly set `*next' (was off by
7869         one.)
7870         (resolve_qualified_expression_name): Fixed comment.
7871
7872 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7873
7874         * jcf-parse.c (jcf_parse_source): Reset current_class and
7875         current_function_decl to NULL before parsing a new file.
7876
7877 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7878
7879         * parse.y (block_end:): If the collected block doesn't feature a
7880         statement, insert an empty statement.
7881
7882 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7883
7884         * parse.y (maybe_yank_clinit): New function.
7885         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
7886         end of the list of methods belonging to a class.
7887         (java_complete_expand_method): Check whether <clinit> is really
7888         necessary and expand it accordingly.
7889
7890 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7891
7892         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
7893         processed by the method's switch statement.
7894
7895 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7896
7897         * java-tree.h: Added init state enum.
7898         * decl.c (emit_init_test_initialization): Initialize class
7899         initialization check variable by looking at class' state.
7900
7901 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7902
7903         * java-tree.h (build_instanceof): Declare.
7904         (build_get_class): Declare.
7905         * parse.y (patch_binop): Use build_instanceof.
7906         * expr.c (build_instanceof): New function.  If class is final,
7907         don't make a function call.
7908         (expand_java_INSTANCEOF): Use it.
7909         (build_get_class): New function.
7910
7911 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
7912
7913         * jcf-write.c (generate_classfile): Scan the source_file for
7914         slashes with the right pointer variable.
7915
7916 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
7917
7918         * lang.c (lang_decode_option): Update -Wunused flags by calling
7919         set_Wunused.
7920         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
7921
7922 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7923
7924         * check_init.c (check_init): Constify local char *.
7925         * class.c (push_class): Constify local char *.
7926         * java_tree.h: Update prototypes.
7927         * jcf-io.c (open_class): Constify filename parameter and
7928         return value.
7929         (find_class): Remove redundant string copy.  Cast return from
7930         open_class.
7931         * jcf-parse.c (read_class, parse_class_file, yyparse):
7932         Constify local char *.
7933         * jcf-write.c (generate_bytecode_insns, generate_classfile):
7934         Constify local char *.
7935         * jcf.h (JCF): Constify filename and classname.
7936         (JCF_FINISH): Cast args to FREE to char * when appropriate.
7937         * lang.c (init_parse): Constify parameter and return value.
7938         * lex.c (java_get_line_col): Constify filename parameter.
7939         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
7940         * parse.y (java_parser_context_suspend,
7941         issue_warning_error_from_context, safe_layout_class): Constify
7942         local char *.
7943         * parse.c: Regenerate.
7944
7945 2000-05-08  Tom Tromey  <tromey@cygnus.com>
7946
7947         * expr.c (build_jni_stub): Cache the result of
7948         _Jv_LookupJNIMethod.
7949
7950 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7951
7952         * decl.c (predef_filenames_size): Now 7.
7953         (predef_filenames): New seventh entry.
7954
7955 2000-05-04  Tom Tromey  <tromey@cygnus.com>
7956
7957         * boehm.c (mark_reference_fields): Don't mark RawData fields.
7958         Keep track of when we've seen a reference field after a
7959         non-reference field.
7960         (get_boehm_type_descriptor): Handle case where we see
7961         non-reference fields but no trailing reference field.
7962         * decl.c (rawdata_ptr_type_node): Define.
7963         (init_decl_processing): Initialize rawdata_ptr_type_node.
7964         * java-tree.h (rawdata_ptr_type_node): Declare.
7965
7966 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7967
7968         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
7969         specifiers in calls to fprintf.
7970
7971 2000-05-03  Andrew Haley  <aph@cygnus.com>
7972
7973         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
7974
7975         * javaop.h (WORD_TO_INT): New function.
7976         (IMMEDIATE_s4): Use WORD_TO_INT.
7977         * jcf.h (JPOOL_INT): Ditto.
7978
7979         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
7980         separator.
7981
7982 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7983
7984         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
7985         on native function.
7986         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
7987         JNI methods.
7988         * expr.c (build_jni_stub): New function.
7989         * lang-specs.h: -fjni and -femit-class-file are incompatible.
7990         * parse.c: Rebuilt.
7991         * parse.y (java_complete_expand_methods): Expand a native method
7992         and call build_jni_stub if -fjni given.
7993         * lang-options.h: Document -fjni.
7994         * lang.c (flag_jni): New global.
7995         (lang_f_options): Added `jni' entry.
7996         * java-tree.h (soft_lookupjnimethod_node,
7997         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
7998         Declare.
7999         (flag_jni): Declare.
8000         (build_jni_stub): Declare.
8001         (struct lang_decl): Added `native' flag.
8002         (METHOD_NATIVE): Redefined to use `native' field of lang specific
8003         structure.
8004         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
8005         soft_jnipopsystemframe_node): New globals.
8006         (init_decl_processing): Set them.  _Jv_InitClass only takes one
8007         argument.
8008
8009         * java-tree.def: Put into `C' mode.
8010
8011 2000-04-27  Tom Tromey  <tromey@cygnus.com>
8012
8013         Fix for PR gcj/2:
8014         * expr.c (expand_invoke): Generate check to see if object pointer
8015         is null in nonvirtual invocation case.
8016         * java-tree.h (soft_nullpointer_node): Declare.
8017         * decl.c (soft_nullpointer_node): New global.
8018         (init_decl_processing): Initialize soft_nullpointer_node.
8019         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8020         or `private' methods.
8021         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8022
8023 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8024
8025         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8026         from <clinit>
8027
8028 2000-04-26  Tom Tromey  <tromey@cygnus.com>
8029
8030         * zextract.c (find_zip_file_start): New function.
8031         (read_zip_archive): Use it.
8032
8033 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8034
8035         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
8036
8037 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8038
8039         * class.c (common_enclosing_context_p): New function.
8040         * java-tree.h (common_enclosing_context_p): Added prototype.
8041         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
8042         classes sharing an outer context with the current instance.
8043         * parse.y (build_access_to_thisn): Fixed leading comment.
8044         (verify_constructor_super): New local `supper_inner'. Skip
8045         enclosing context argument in the case of inner class constructors.
8046         (patch_method_invocation): Insert proper context as second
8047         parameter to pure inner class constructor super invocations.
8048
8049 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8050
8051         * parse.y (end_class_declaration): Reset the interface number
8052         counter.
8053
8054 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8055
8056         * parse.y (source_start_java_method): Deleted unnecessary code.
8057         (patch_method_invocation): Fixed comment.
8058
8059 2000-04-24  Robert Lipe <robertlipe@usa.net>
8060
8061         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
8062
8063 2000-04-23  Tom Tromey  <tromey@cygnus.com>
8064
8065         * boehm.c (mark_reference_fields): Use int_byte_position.
8066
8067 2000-04-22  Tom Tromey  <tromey@cygnus.com>
8068
8069         * boehm.c (mark_reference_fields): Only call byte_position on
8070         non-static fields.
8071
8072 2000-04-22  Tom Tromey  <tromey@cygnus.com>
8073
8074         * boehm.c (mark_reference_fields): Added `last_view_index'
8075         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
8076
8077 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
8078
8079         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
8080         * parse.y (check_class_interface_creation): Fixed comments. Select
8081         permitted modifiers for (inner) interfaces. Changed error message
8082         to report rejected modifiers used with local classes.
8083
8084 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8085
8086         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
8087         of directly inherited type considered in scope.
8088         * parse.y (do_resolve_class): Search inherited classes for inner
8089         classes.
8090
8091 2000-04-20  Tom Tromey  <tromey@cygnus.com>
8092
8093         * parse.y (not_accessible_p): Use member's class, not current
8094         class, when doing inheritance check for protected reference.
8095         Fixes PR gcj/124.
8096
8097 2000-04-20  Jason Schroeder  <shrode@subnature.com>
8098
8099         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8100
8101 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8102
8103         * parse.y (lookup_field_wrapper): Search for final local aliases.
8104         (resolve_expression_name): Let lookup_field_wrapper search for
8105         final local aliases. Force the value of `name' if one is found.
8106         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8107         an expression name. Fixed comments.
8108
8109 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8110
8111         * parse.y (yyerror): `msg' can be null, don't use it in that case.
8112
8113 2000-04-19  Tom Tromey  <tromey@cygnus.com>
8114
8115         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8116
8117 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8118
8119         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8120
8121 2000-04-18  Tom Tromey  <tromey@cygnus.com>
8122
8123         PR gcj/211:
8124         * gjavah.c (utf8_cmp): Changed return value.
8125         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
8126         result.
8127         (cxx_keywords): New global.
8128         (get_field_name): Handle new result of cxx_keyword_subst.
8129         (print_method_info): Likewise.
8130
8131 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
8132
8133         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8134         with a newline, for CNI.
8135         (print_stub_or_jni): Print a space or newline before method name for
8136         CNI as well as JNI.
8137         (print_cxx_classname): Don't write leading "::" in CNI stub method.
8138         (process_file): Include gcj/cni.h if generating CNI stubs.
8139
8140 2000-04-16  Tom Tromey  <tromey@cygnus.com>
8141
8142         * gjavah.c (decompile_method): Use print_field_name.
8143         Fixes PR gcj/205.
8144
8145 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8146
8147         * parse.y (java_expand_classes): Reverse the package list once.
8148         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8149         reduction.
8150         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8151         the `==' and `!=' operators.
8152
8153 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8154
8155         * jcf-write.c (generate_bytecode_insns): At invocation time,
8156         always relate an interface method to the type of its selector.
8157
8158 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8159
8160         Fix for PR gcj/2:
8161         * expr.c (expand_invoke): Generate check to see if object pointer
8162         is null in nonvirtual invocation case.
8163         * java-tree.h (soft_nullpointer_node): Declare.
8164         * decl.c (soft_nullpointer_node): New global.
8165         (init_decl_processing): Initialize soft_nullpointer_node.
8166         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8167         or `private' methods.
8168         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8169
8170 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8171
8172         Fix for PR gcj/140:
8173         * parse.y (check_final_assignment): Recognize assignments to the
8174         `length' field of an array when generating class files.
8175
8176 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8177
8178         * class.c (decl_hash): Prototype removed.
8179         (decl_compare): Likewise.
8180
8181 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8182
8183         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8184         * parse.y (check_modifiers_consistency): Check for final/volatile
8185         clash.  Fixes PR gcj/164.
8186
8187 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8188
8189         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8190         made global.
8191         (java_hash_compare_tree_node): Renamed from `decl_compare, made
8192         global.
8193         (add_method_1): Use `java_hash_hash_tree_node' and
8194         `java_hash_compare_tree_node'.
8195         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8196         (java_hash_compare_tree_node): Likewise.
8197         * parse.y (find_applicable_accessible_methods_list): Create,
8198         delete and use a hash table to remember already searched interfaces.
8199
8200 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
8201
8202         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8203         with latest entry.
8204
8205 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8206
8207         * boehm.c (mark_reference_fields, set_bit): Prototype.
8208         (set_bit): Un-ANSI-fy definition.
8209
8210         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8211         Prototype.
8212
8213         * decl.c (emit_init_test_initialization): Likewise.
8214
8215         * gjavah.c (jni_print_char): Likewise.
8216
8217         * parse.y (create_new_parser_context): Likewise.
8218
8219 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8220
8221         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8222         patch missing hunk. Fixed indentation.
8223
8224 2000-03-30  Tom Tromey  <tromey@cygnus.com>
8225
8226         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8227         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8228
8229 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8230
8231         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8232         when negative *before* using it as an array index.
8233         * ChangeLog: Fixed typo.
8234
8235 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8236
8237         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8238         to 0 when it reaches -1.
8239
8240 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8241
8242         * jcf-parse.c (get_constant): Properly cast `num' during the
8243         invocation of `add_double'.
8244         * jcf-write.c (push_long_const): Properly cast `lo' before
8245         comparing it to short bounds.
8246         * parse-scan.y (interface_declaration:): Rule re-arrange so that
8247         `interface_body:' is reduced after the current interface is
8248         pushed.
8249
8250 2000-03-26  Tom Tromey  <tromey@cygnus.com>
8251
8252         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8253         Java-specific `-f' option.
8254
8255 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8256
8257         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8258         Adjust order of making types.
8259         Make bitsize_*_node values.
8260
8261 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8262
8263         * class.c (make_field_value): Use byte_position.
8264         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8265         (java_array_data_offset): Likewise.
8266         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8267         bzero call.
8268
8269 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8270
8271         * parse.y (check_abstract_method_definitions): New local
8272         `end_type_reached'. Make sure we also consider `end_type'.
8273         (java_check_abstract_method_definitions): Make sure we eventually
8274         consider `java.lang.Object'.
8275         (maybe_use_access_method): Don't use access method if not in the
8276         context of a pure inner class or if the method's context is right.
8277         (find_applicable_accessible_methods_list): New static flag
8278         `object_done'. Don't search abstract classes as interfaces. Fixed
8279         indentation. Fixed the `java.lang.Object' only search. Search
8280         class interface(s) first, then fully search enclosing contexts.
8281         (find_most_specific_methods_list): Pick the closest candidate when
8282         they're all abstract.
8283
8284 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8285
8286         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8287         properly initialize `finished_label'. Don't emit gotos for empty
8288         try statements.
8289
8290 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8291
8292         * except.c (emit_handlers): Clear catch_clauses_last.
8293
8294 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8295
8296         * parse.y (check_method_types_complete): New function.
8297         (create_class): Reset anonymous class counter only when seeing an
8298         non inner classe.
8299         (java_complete_class): JDEP_METHOD: Don't recompute signature
8300         if incomplete.
8301
8302 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8303
8304         * class.c (build_static_ref): Fixed indentation in comment.
8305         * java-tree.def (TRY_EXPR): Fixed typo in name.
8306         (CLASS_LITERAL): Likewise.
8307         * java-tree.h: (TYPE_DOT_CLASS): New macro.
8308         (struct lang_type): New field `dot_class'.
8309         * jcf-write.c (generate_bytecode_insns): Fixed error message.
8310         (generate_classfile): Method `class$' is synthetic.
8311         * parse.y (build_do_class_method): New function.
8312         (build_dot_class_method_invocation): Likewise.
8313         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8314         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8315         (qualify_ambiguous_name): Likewise.
8316         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8317         (build_try_statement): Fixed leading comment.
8318
8319 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8320
8321         * class.c (make_field_value): Properly handle sizes.
8322         (get_dispatch_vector): Use tree_low_cst and host_integerp.
8323         (layout_class_method): Count using trees.
8324         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8325         * expr.c (java_array_data_offset): Use int_bit_position.
8326         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8327         (build_invokevirtual): Use tree_low_cst and do computations with trees.
8328
8329 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8330
8331         * lang.c (flag_hash_synchronization): New global.
8332         (lang_f_options): Added `hash-synchronization'.
8333         * lang-options.h: Mention -fhash-synchronization.
8334         * java-tree.h (flag_hash_synchronization): Declare.
8335         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8336         hash table synchronization is disabled.
8337         * decl.c (init_decl_processing): Only push `sync_info' value when
8338         hash table synchronization is disabled.
8339         * class.c (make_class_data): Only push `sync_info' field when hash
8340         table synchronization is disabled.  Removed dead code.
8341
8342 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8343
8344         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8345
8346 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8347
8348         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8349         classes.
8350         * parse.y (patch_method_invocation): Handle anonymous classes
8351         creation in static context.
8352
8353 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8354
8355         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8356         * parse.y (resolve_qualified_expression_name): Use it.
8357         (patch_method_invocation): Likewise.
8358
8359 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8360
8361         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8362         depending on the type of dependency which dictates what the
8363         current class is.
8364         (unresolved_type_p): Resolved types limited to the current class.
8365
8366 2000-03-15  Tom Tromey  <tromey@cygnus.com>
8367
8368         * decl.c (init_decl_processing): Set type of `sync_info' to be
8369         pointer to Object.
8370
8371         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8372         Correctly compute bit number for current slot.  Zero `high' and
8373         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
8374         mark_reference_fields.
8375         (mark_reference_fields): New function.
8376
8377 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8378
8379         * parse.y (register_incomplete_type): Fixed initialization of
8380         JDEP_ENCLOSING.
8381
8382 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8383
8384         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8385         static globals.
8386         (push_class_context, pop_class_context): New function.
8387         (class_body:): Call pop_class_context.
8388         (interface_body:): Likewise.
8389         (INNER_QUALIFIER): New macro.
8390         (report_class_declaration): Changed output format and use
8391         INNER_QUALIFIER. Call push_class_context.
8392
8393 2000-02-14  Andrew Haley  <aph@cygnus.com>
8394
8395         * check-init.c (check_init): Add new cases for unary and binary
8396         tree nodes.
8397
8398 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8399
8400         * parse.y (resolve_package): Set `next' once a type name has been
8401         progressively discovered.
8402         (resolve_qualified_expression_name): Propagate resolution only if
8403         there are remaining qualifiers. Take into account `q' might have
8404         been cleared after re-qualification.
8405         * parse.y (patch_method_invocation): New local `resolved'.
8406         Section dealing with qualified expression rewritten to use
8407         resolve_field_access.
8408
8409 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8410
8411         * parse.h (PUSH_CPC): Fixed indentation.
8412         (DEBUG_CPC): New macro.
8413         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8414         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8415         * parse.y (class_body_declaration:): Use
8416         SET_CPC_INSTANCE_INITIALIZER_STMT.
8417         (method_declaration:): Check for null current_function_decl.
8418         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8419         (java_parser_context_pop_initialized_field): Better handling of
8420         empty lists.
8421         (maybe_make_nested_class_name): Mark nested class name as
8422         qualified when necessary.
8423         (end_class_declaration): Don't call java_parse_context_resume when
8424         one or more error occurred.
8425         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8426         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8427         SET_CPC_INITIALIZER_STMT.
8428         (method_header): Check for inner classes declaring static methods.
8429         (resolve_qualified_expression_name): Handle situation where `this'
8430         is implied.
8431
8432 2000-03-13  Hans Boehm <boehm@acm.org>
8433
8434         * typeck.c (build_prim_array_type): Correctly set the high word too.
8435
8436 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8437
8438         * parse.y (java_complete_expand_methods): Leave <clinit> out of
8439         ordinary methods.
8440         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8441         list of methods for interfaces.
8442
8443 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8444
8445         * parse.y (qualify_ambiguous_name): Properly handle expressions
8446         using `null'.
8447
8448 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8449
8450         * parse.y (check_final_assignment): Extended to process
8451         COMPOUND_EXPR.
8452         (patch_assignment): Have check_final_assignment called only once.
8453
8454 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8455
8456         * java-tree.h (IS_INIT_CHECKED): New flag.
8457         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8458         * parse.y (patch_string): Call force_evaluation_order on the
8459         completed string concatenation tree.
8460         * expr.c (force_evaluation_order): Call force_evaluation_order on
8461         function's arguments too.
8462
8463 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8464
8465         * decl.c (emit_init_test_initialization): Mark KEY as unused.
8466         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8467         (build_anewarray): Likewise.
8468         * parse.y (patch_newarray): Likewise.
8469         * parse.c: Regenerated.
8470
8471 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
8472
8473         * decl.c (init_decl_processing): Added new class fields `depth',
8474         `ancestors', and `idt' to class_type_node. Use
8475         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8476         * class.c (make_class_data): Push initial values for new fields.
8477         * java-tree.h: Updated prototype for `build_invokeinterface'.
8478         * expr.c (build_invokeinterface): Changed parameters to accept
8479         `method' tree. Calculate index of `method' in its declaring
8480         interface. Build call to _Jv_LookupInterfaceMethodIdx.
8481         (expand_invoke): Call `build_invokeinterface' with new parameters.
8482         * parse.y (patch_invoke): Call `build_invokeinterface' with new
8483         parameters.
8484
8485 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
8486
8487         * typeck.c (lookup_do): Search superinterfaces first
8488         when looking up an interface method. From Godmar Back
8489         <gback@cs.utah.edu>
8490
8491 2000-03-06  Tom Tromey  <tromey@cygnus.com>
8492
8493         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8494
8495 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8496
8497         * java-tree.h (lookup_argument_method2): Declared.
8498         (safe_layout_class): Prototype moved from parse.h.
8499         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8500         * parse.y (java_check_regular_methods): Local `super_class' gone.
8501         Call lookup_argument_method2 instead of lookup_argument_method.
8502         Perform modifier match for methods found declared in implemented
8503         interfaces. Fixed indentation problem. Overriding/hiding error
8504         report to take place only for methods found in classes.
8505         * typeck.c (lookup_argument_method): Changed leading
8506         comment. Re-written by calling lookup_do.
8507         (lookup_argument_method2): New function.
8508         (lookup_java_method): Re-written by calling lookup_do.
8509         (lookup_do): New function.
8510
8511 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8512
8513         * check-init.c (check_init): Removed dead code. Handle (blank)
8514         final variables.
8515         * parse.y (declare_local_variables): New local `final_p', set it
8516         and use it to initialize LOCAL_FINAL.
8517         (check_final_assignment): Only check FIELD_DECLs.
8518
8519 2000-02-17  Tom Tromey  <tromey@cygnus.com>
8520
8521         * Makefile.in (JAVA_OBJS): Added boehm.o.
8522         (boehm.o): New target.
8523         * Make-lang.in (JAVA_SRCS): Added boehm.c.
8524         * java-tree.h (flag_use_boehm_gc): Declare.
8525         (get_boehm_type_descriptor): Declare.
8526         * lang.c (lang_f_options): Added `use-boehm-gc'.
8527         (flag_use_boehm_gc): New global.
8528         * lang-options.h: Added -fuse-boehm-gc.
8529         * boehm.c: New file.
8530         * class.c (get_dispatch_table): If class uses a Boehm type
8531         descriptor, put it in the vtable.
8532         (make_class_data): Removed dead code.
8533
8534 2000-03-03  Per Bothner  <per@bothner.com>
8535
8536         * decl.c (init_decl_processing):  Initialize sizetype properly.
8537
8538 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8539
8540         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8541         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8542         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8543         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8544         (jcf_parse): New local `current'. Load innerclasses seen in outer
8545         context being processed.
8546         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8547         * jcf-write.c (append_innerclasses_attribute): New function.
8548         (append_innerclasses_attribute_entry): Likewise.
8549         (get_access_flags): Handle static classes. Set anonymous and local
8550         classes to be private.
8551         (generate_classfile): Attribute count adjusted. Call
8552         append_innerclasses_attribute.
8553         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8554         PURE_INNER_CLASS_TYPE_P.
8555         * parse.y (parser_qualified_classname): New parameter `is_static',
8556         produce non qualified name accordingly.
8557         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8558         (create_interface): Added argument to parser_qualified_classname.
8559         (create_class): Added argument to parser_qualified_classname. Setup
8560         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8561         (add_inner_class_fields): Fixed indentation.
8562         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8563         (method_declarator): Fixed typo in comment.
8564         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8565         (build_current_thisn): Likewise.
8566         (patch_method_invocation): Likewise.
8567
8568 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8569
8570         * decl.c (current_function_decl): Move to toplev.c.
8571
8572 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8573
8574         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8575         (DECL_BIT_INDEX): Use underlying representation.
8576         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8577
8578 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8579
8580         * expr.c (build_java_ret): Pass proper type to size_binop.
8581
8582 2000-02-25  Anthony Green  <green@cygnus.com>
8583
8584         * expr.c (build_class_init): Mark the decl to be ignored by
8585         check_init.
8586         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8587         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8588         * class.c (init_test_hash_newfunc): New function.
8589         (decl_hash): New function.
8590         (decl_compare): New function.
8591         * decl.c (emit_init_test_initialization): New function.
8592         (complete_start_java_method): Traverse the init test hashtable,
8593         calling emit_init_test_initialization.
8594         (always_initialize_class_p): Define.
8595         * expr.c (build_class_init): Use initialization tests when
8596         emitting class initialization code.
8597         (always_initialize_class_p): Declare.
8598         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8599         1.
8600         * java-tree.h: Include hash.h.
8601         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8602         (struct lang_decl): Add init_test_table field.
8603         (init_test_hash_entry): Define.
8604
8605 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8606
8607         * gjavah.c (main): Avoid using `argi' to report unimplemented
8608         options.
8609
8610 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8611
8612         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8613         initialize locals to avoid warnings. Local `exception_type' moved
8614         into if statement.
8615
8616 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8617
8618         * parse.y (resolve_expression_name): Use `orig' as a second
8619         argument to resolve_field_access.
8620         (resolve_field_access): Removed unnecessary code when dealing with
8621         static fields.
8622
8623 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8624
8625         * class.c (push_super_field): Don't push the field twice.
8626         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8627         * parse.h (java_reorder_fields): Prototyped.
8628         * parse.y (java_reorder_fields): New function.
8629         (java_layout_class): Simplified not to worry about re-ordering.
8630
8631 2000-02-23  Tom Tromey  <tromey@cygnus.com>
8632
8633         * gjavah.c (print_name): In JNI case, correctly quote string.
8634         (print_method_info): Don't handle overrides in JNI mode.
8635
8636 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8637
8638         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8639         value type set to `boolean_type_node'.
8640
8641 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8642
8643         * jcf-dump.c (main): Test for correct condition after
8644         output file creation.
8645
8646 2000-02-19  Anthony Green  <green@cygnus.com>
8647
8648         * jcf-depend.c (add_entry): Fix test for first list entry.
8649
8650 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8651
8652         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8653         * constants.c (build_constants_constructor): Likewise.
8654
8655 2000-02-19  Anthony Green  <green@cygnus.com>
8656
8657         * jcf-depend.c (add_entry): Add entries to the end of the list.
8658
8659 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
8660
8661         * decl.c (INT_TYPE_SIZE): Define if necessary.
8662         (expand_java_return): Handle the case of a native integer smaller
8663         than a JVM integer.
8664
8665 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8666
8667         * gjavah.c (help): Use GCCBUGURL.
8668         * jv-scan.c (help): Likewise.
8669         * jcf-dump.c (help): Likewise.
8670
8671 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8672
8673         * jcf-write.c (generate_bytecode_insns): Don't generate empty
8674         `finally' clauses.
8675
8676 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8677
8678         * jcf-parse.c (load_class): Call `fatal' if no file containing
8679         the target class are found.
8680
8681 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
8682
8683         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8684         lex.c, lex.h, and PARSE_H to...
8685         (parse.o, parse-scan.o): ...here, respectively.
8686
8687         * lex.c: Split out code that may trigger SIGFPE from yylex()
8688         to its own function.
8689         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8690
8691 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8692
8693         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8694
8695 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8696
8697         * parse.y (outer_field_access_p): Stop in time when outer contexts
8698         are exhausted.
8699         (resolve_qualified_expression_name): Properly qualify *everything*
8700         after a package.type to be resoled as expression names.
8701         (find_applicable_accessible_methods_list): Save/restore `class' to
8702         isolate it from a possible outer context search.
8703
8704 2000-02-15  Tom Tromey  <tromey@cygnus.com>
8705
8706         * gjavah.c (jni_print_char): New function.
8707         (print_full_cxx_name): Use it.
8708         (decode_signature_piece): Likewise.
8709         (print_cxx_classname): Likewise.
8710
8711 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8712
8713         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8714         version.o.
8715         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8716
8717         * gjavah.c: Include version.h.
8718
8719         * jcf-dump.c: Likewise.
8720
8721         * jv-scan.c: Likewise.
8722
8723 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8724
8725         * parse.y (outer_field_access_fix): First parameter now a tree
8726         node. Check for assignment to final. First argument to
8727         build_outer_field_access_fix modified to accommodate prototype.
8728         (build_outer_field_access): Don't check for assignment to final
8729         here.
8730         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8731         possibly returned by outer_field_access_fix. Changed
8732         outer_field_access_fix's first argument.
8733         (check_final_assignment): $finit$'s context is OK.
8734         (patch_unaryop): Use node instead of its line/column value when
8735         calling outer_field_access_fix.
8736
8737 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8738
8739         * parse.y (interface_declaration:): No longer tagged
8740         <node>. Re-installed default action.
8741         (class_member_declaration:): Handle inner interfaces.
8742         (interface_member_declaration): Handle inner interfaces and
8743         classes.
8744         (create_interface): Push error if one seen. Suspend parsing
8745         context when processing an inner interface.
8746         (register_fields): Inner class static field limitations not to
8747         apply to inner interfaces.
8748
8749 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8750
8751         * jcf-parse.c (load_class): Update `java_error_count' when a
8752         class' file can't be found.
8753         (parse.y): Avoid (byte)code generation when errors seen.
8754
8755 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8756
8757         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8758         decodes a valid node.
8759         (patch_binop): Handle TRUNC_DIV_EXPR.
8760
8761 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8762
8763         * parse.y (resolve_package): New local `acc'. Try to progressively
8764         build and guess a package and type name.
8765
8766 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8767
8768         * parse.y (find_applicable_accessible_methods_list): Load and
8769         layout the search class if necessary.
8770         (java_complete_tree): Keep to original type of the folded initial
8771         value.
8772
8773 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8774
8775         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
8776         Generate error message if circularity is detected. New static
8777         local `list'.
8778         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
8779         * jcf-write.c (generate_bytecode_insns): Very simply handle
8780         SAVE_EXPR.
8781         * parse.y (java_check_circular_reference): Use
8782         `cyclic_inheritance_report' during report, if necessary.
8783         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
8784         walking NEW_ARRAY_INIT twice.
8785
8786 2000-02-09  Tom Tromey  <tromey@cygnus.com>
8787
8788         * parse.y (check_class_interface_creation): Allow inner classes to
8789         be `private' or `protected', check modifiers' consistency. Prevent
8790         block local classes from bearing any modifiers.
8791
8792 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8793
8794         * except.c (check_start_handlers): Re-add prototype lost in last
8795         patch.
8796         (maybe_start_try): Remove excess argument to `check_start_handlers'.
8797
8798 2000-02-09  Andrew Haley  <aph@cygnus.com>
8799
8800         * decl.c (clear_binding_level): Remove excess initializer.
8801         (maybe_poplevels): Remove unused variable.
8802         (force_poplevels): Ditto.
8803         (struct binding_level): Add comment.
8804
8805 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8806
8807         * jcf-write.c (generate_classfile): Don't consider
8808         pre-initialization with reference value (use <clinit> instead.)
8809         * parse.y (java_fix_constructors): No generated constructor for
8810         interfaces.
8811         (build_outer_field_access): Removed debug message.
8812         (outer_field_expanded_access_p): Adapted to bytecode generation.
8813         (build_outer_field_access_method): Use fix_method_argument_names.
8814         (build_outer_method_access_method): Fixed indentation. Added
8815         comment. Handle access method generation for static and also void
8816         methods.
8817         (build_access_to_thisn): Inserted debug message.
8818         (maybe_build_thisn_access_method): Use fix_method_argument_names.
8819         (resolve_qualified_expression_name): Fixed comment.
8820         (not_accessible_p): Adapted to bytecode generation. Added comment.
8821         (patch_method_invocation): Added comment.
8822         (maybe_use_access_method): Fixed leading comment. Handle static
8823         methods.
8824         (java_complete_lhs): Don't shortcut handling of initialized upon
8825         declaration String type static fields when generating bytecode.
8826         (patch_unaryop): Handle outer field access when generating
8827         bytecode.
8828
8829 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8830
8831         * java-tree.h (FIELD_THISN): New macro.
8832         * jcf-write.c (append_synthetic_attribute): New function.
8833         (generate_classfile): Set "Synthetic" attribute on this$<n>,
8834         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
8835         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
8836         this$<n> fields.
8837         (build_outer_field_access): Turned on access functions usage and
8838         generation when compiling to bytecode.
8839         (maybe_use_access_method): Likewise.
8840
8841 2000-01-25  Andrew Haley  <aph@cygnus.com>
8842
8843         * java-except.h (struct eh_range): Add `expanded' field.
8844         (maybe_start_try): Add end_pc arg.
8845         (maybe_end_try): Ditto.
8846         * java-tree.h (force_poplevels): new function.
8847         * expr.c (expand_byte_code): Don't call maybe_start_try or
8848         maybe_end_try.
8849         * except.c (add_handler): Reset expanded.
8850         (expand_start_java_handler): Set expanded.
8851         (check_start_handlers): Don't expand a start handler that's
8852         already been expanded.
8853         (maybe_start_try): Add end_pc arg.  Only expand a handler which
8854         ends after end_pc.
8855         (expand_end_java_handler): call force_poplevels.
8856         (force_poplevels): new function.
8857         * decl.c (binding_level): Add start_pc of binding level.
8858         (maybe_pushlevels): Call maybe_start_try when pushing binding
8859         levels.
8860         (maybe_poplevels): Call maybe_end_try when popping binding levels.
8861         (LARGEST_PC): Define.
8862         (clear_binding_level): Use LARGEST_PC.
8863
8864         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
8865         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
8866         (binding_depth, is_class_level, current_pc): new variables.
8867         (struct binding_level): ditto.
8868         (indent): new function.
8869         (push_jvm_slot): add debugging info.
8870         (maybe_pushlevels): ditto.
8871         (maybe_poplevels): ditto.
8872         (pushlevel): ditto.
8873         (poplevel): ditto.
8874         (start_java_method): ditto.
8875         (give_name_to_locals): comment only.
8876         * except.c (binding_depth, is_class_level, current_pc):
8877         new variables.
8878         (expand_start_java_handler): add debugging info.
8879         (expand_end_java_handler): ditto.
8880
8881 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8882
8883         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
8884         (print_name_for_stub_or_jni, process_file): Constify a char*.
8885
8886 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8887
8888         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
8889
8890 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8891
8892         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
8893         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
8894         defined to be 1.
8895
8896 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8897
8898         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
8899         * java-tree.h (TYPE_II_STMT_LIST): New macro.
8900         (struct lang_type): New field `ii_block'.
8901         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
8902         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
8903         * parse.h (struct parser_ctxt): New field `instance_initializers'.
8904         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
8905         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
8906         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
8907         macros.
8908         * parse.y (add_instance_initializer): New function.
8909         (in_instance_initializer): New static global.
8910         (class_body_declaration:): Link instance initializer block.
8911         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
8912         (array_creation_expression:): Remove unused local.
8913         (java_parser_context_push_initialized_field): Fixed leading
8914         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
8915         CPC_INSTANCE_INITIALIZER_LIST.
8916         (java_parser_context_pop_initialized_field): Likewise.
8917         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
8918         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
8919         CPC_INITIALIZER_STMT.
8920         (fix_constructors): New local `class_type'. Use it. Call
8921         add_instance_initializer.
8922         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
8923         (patch_return): Forbid return in instance initializers.
8924         (patch_throw_statement): Enforce exception handling in the context
8925         of instance initializers.
8926
8927 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8928
8929         * Make-lang.in (java.mostlyclean): Remove executables in
8930         `mostlyclean'.
8931
8932 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8933
8934         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
8935         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
8936         (java_float_finite): Convert to use union Word from javaop.h.
8937         (java_double_finite): Convert to use union DWord from javaop.h.
8938
8939 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8940
8941         * gjavah.c (options): Added `jni' entry.
8942         (help): Document -jni.
8943         (flag_jni): New global.
8944         (process_file): Handle JNI output.  Don't print text from
8945         -prepend, -add, etc, when generating stubs.  Only remove `.class'
8946         suffix if it actually exists.
8947         (main): Create a `.c' file when run with `--jni --stubs'.  Create
8948         correct output file name with `--jni'.
8949         (print_include): Mangle header name differently in JNI case.
8950         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
8951         method list.
8952         (print_method_info): Handle JNI case.  Put signature info into
8953         method name.  Handle case when STREAM is NULL.
8954         (print_name_for_stub_or_jni): New function.
8955         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
8956         (print_cxx_classname): Handle JNI.
8957         (print_full_cxx_name): Likewise.
8958         (decode_signature_piece): Likewise.
8959         (overloaded_jni_method_exists_p): New function.
8960         (struct method_name): Added `signature' and `sig_length' fields.
8961         (HANDLE_END_FIELD): Do nothing in JNI mode.
8962
8963 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8964
8965         * jv-scan.c: Include version.c, <getopt.h>.
8966         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
8967         (options): New array.
8968         (usage): New function.
8969         (version): New function.
8970         (main): Use getopt_long to parse command line.
8971         * jcf-dump.c: Include version.c, <getopt.h>.
8972         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
8973         OPT_JAVAP): New macros.
8974         (options): New array.
8975         (usage): Return `void'.  Changed message.
8976         (help): New function.
8977         (version): New function.
8978         (main): Use getopt_long_only to parse command line.
8979         * gjavah.c: Include <getopt.h>.
8980         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
8981         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
8982         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
8983         (options): New array.
8984         (java_no_argument): Removed.
8985         (help): Updated with missing options.
8986         (main): Use getopt_long_only to parse command line.
8987         (usage): Changed message.
8988
8989 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8990
8991         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
8992         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
8993         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
8994         * parse.y (array_creation_expression:): Handle anonymous arrays.
8995         (build_array_from_name): Don't set `ret_name' if null.
8996         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
8997         (qualify_ambiguous_name): Likewise.
8998         (java_complete_expand_class): Likewise.
8999
9000 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9001
9002         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
9003         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
9004         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
9005         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
9006         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
9007         AIPL_FUNCTION_COMPLETED_INVOCATION.
9008         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
9009         AIPL_FUNCTION_INVOCATION_READY.
9010         (AIPL_FUNCTION_DECLARATION): New enum entry.
9011         * parse.y (reorder_static_initialized): New function.
9012         (java_parser_context_pop_initialized_field): Use it.
9013         (add_inner_class_fields): Use
9014         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
9015         augmented. Install marker after last alias initializer, if any.
9016         (generate_finit): Fixed typo. Don't try to retain only the used
9017         fields.
9018         (method_header): Compute and set DECL_FUNCTION_NAP.
9019         (method_declarator): Fixed comment. Insert alias initializer in
9020         parameter list.
9021         (build_alias_initializer_parameter_list): Fixed leading
9022         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
9023         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
9024         (java_complete_expand_class): Code to retain only used aliases
9025         removed.
9026         (java_complete_expand_methods): New local `first_decl'. Generate
9027         $finit$ first, then expand the constructors, regular methods and
9028         <clinit>.
9029         (java_complete_expand_method): Don't report error on missing
9030         return statement if previously detected bogus.
9031         (fix_constructors): Don't patch constructor parameters list.
9032         (patch_method_invocation): Use new AIPL enum values. Reverse
9033         alias initializer list for anonymous classes.
9034
9035 2000-01-30  Anthony Green  <green@redhat.com>
9036
9037         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
9038         determine how many stack slots to pop.
9039
9040 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9041
9042         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
9043         error handling/recovery.
9044         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
9045
9046 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9047
9048         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
9049         FIELD_LOCAL_ALIAS_USED): New macros.
9050         (DECL_FUNCTION_NAP): New macro.
9051         (struct lang_decl): New field `nap'.
9052         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
9053         (struct lang_type): New fields `finit_stmt_list' and
9054         `clinit_stmt_list'.
9055         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
9056         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
9057         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
9058         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
9059         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
9060         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
9061         (BUILD_THROW): Macro line separator re-indented.
9062         * parse.y (end_class_declaration): New function.
9063         (maybe_generate_pre_expand_clinit): New name for
9064         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
9065         pre-expand static fields.
9066         (maybe_generate_clinit): Function deleted.
9067         (check_for_static_method_reference): Prototype's parameter list
9068         indented.
9069         (generate_finit): New name for maybe_generate_finit. Changed
9070         leading comment. Function rewritten to use
9071         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
9072         (build_alias_initializer_parameter_list): New function.
9073         (java_parser_context_pop_initialized_field): Likewise.
9074         (add_inner_class_fields): Likewise.
9075         (type_declaration:): Call end_class_declaration.
9076         (class_member_declaration:): Likewise.
9077         (formal_parameter_list:): Fixed typos.
9078         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
9079         element. Improved error handling.
9080         (block_statement:): Call end_class_declaration.
9081         (anonymous_class_creation:): Likewise.
9082         (create_anonymous_class): Fixed comments.
9083         (create_class): Call add_inner_class_fields.
9084         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
9085         (method_header): Use MARK_FINAL_PARMS.
9086         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
9087         (method_declarator): Propagate final argument flag.
9088         (craft_constructor): New local `artificial'. Call
9089         build_alias_initializer_parameter_list. Use
9090         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9091         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9092         necessary.
9093         (complete_expand_class): Get rid of unused outer context local
9094         alias fields.
9095         (java_complete_expand_methods): Fixed leading
9096         comment. Generate/pre-expand <clinit> first. Changed method
9097         expansion order to regular, $finit$, constructors, <clinit>.
9098         (java_complete_expand_method): Set current_function_decl.
9099         (fix_constructors): Fix constructor parameter list to account for
9100         outer context local alias initializers.
9101         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9102         (resolve_expression_name): Lookup outer context local aliases. New
9103         local `access', use it.
9104         (patch_method_invocation): Patch inner class ctor invocation with
9105         outer context local aliases initialization values. $finit$
9106         invocation patching now includes things generated with
9107         build_alias_initializer_parameter_list.
9108         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9109         (build_super_invocation): Likewise.
9110         (patch_assignment): Changed comment.
9111
9112 2000-01-27  Andrew Haley  <aph@cygnus.com>
9113
9114         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9115         (emit_if): Ditto.
9116         (emit_jsr): Ditto.
9117
9118 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9119
9120         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9121         concatenation.
9122         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9123
9124         * parse.y (register_fields): Don't pass a format specifier to
9125         OBSOLETE_MODIFIER_WARNING.
9126         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9127         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9128         specifier.
9129         (check_modifiers): Change function into a macro.
9130         (check_class_interface_creation): Pass a literal format string.
9131
9132 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9133
9134         * buffer.h: PROTO -> PARAMS.
9135         * check-init.c: Likewise.
9136         * class.c: Likewise.
9137         * constants.c: Likewise.
9138         * convert.h: Likewise.
9139         * decl.c: Likewise.
9140         * except.c: Likewise.
9141         * expr.c: Likewise.
9142         * gjavah.c: Likewise.
9143         * java-except.h: Likewise.
9144         * java-tree.h: Likewise.
9145         * jcf-depend.c: Likewise.
9146         * jcf-dump.c: Likewise.
9147         * jcf-parse.c: Likewise.
9148         * jcf-path.c: Likewise.
9149         * jcf-reader.c: Likewise.
9150         * jcf-write.c: Likewise.
9151         * jcf.h: Likewise.
9152         * jv-scan.c: Likewise.
9153         * jvgenmain.c: Likewise.
9154         * jvspec.c: Likewise.
9155         * lang.c: Likewise.
9156         * lex.c: Likewise.
9157         * lex.h: Likewise.
9158         * parse-scan.y: Likewise.
9159         * parse.h: Likewise.
9160         * parse.y: Likewise.
9161         * typeck.c: Likewise.
9162         * verify.c: Likewise.
9163         * xref.c: Likewise.
9164         * xref.h: Likewise.
9165         * zextract.c: Likewise.
9166         * zipfile.h: Likewise.
9167
9168 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9169
9170         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9171         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9172         * constants.c (build_constant_data_ref): Check for cached
9173         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9174         in TYPE_CPOOL_DATE_REF.
9175         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9176         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9177         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9178         (LOCAL_FINAL): New macro.
9179         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9180         constant pool -- don't try to reuse.
9181         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9182         TYPE_LANG_SPECIFIC.
9183         (find_in_current_zip): Use TYPE_JCF.
9184         * parse.h (java_check_final): Prototype removed.
9185         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9186         (maybe_create_class_interface_decl,
9187         check_class_interface_creation): Likewise.
9188         (java_expand_finals): Function removed.
9189         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9190         (block_statement:): Fixed comment.
9191         (anonymous_class_creation:): Likewise.
9192         (check_class_interface_creation): Reversed Jan 12, 2000 extra
9193         argument patch.
9194         (check_class_interface_creation): Loosened error report on (inner)
9195         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9196         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9197         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9198         argument patch.
9199         (create_interface): Likewise.
9200         (anonymous_class_counter): New static global.
9201         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9202         patch. Fixed comments.
9203         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9204         anonymous_class_counter when declaring a toplevel class.
9205         (craft_constructor): Fixed constructor name when handling
9206         anonymous classes. Anonymous class constructors to feature hidden
9207         this$<n> parameter.
9208         (java_fix_constructors): Added comment.
9209         (java_check_final): Function removed.
9210         (java_complete_expand_methods): Fixed comment. Don't generate
9211         class data, save its outgoing constant pool instead.
9212         (verify_constructor_super): Skip anonymous class constructor
9213         hidden this$<n> parameter.
9214         (java_expand_classes): New local `saved_ctxp'. Removed call to
9215         java_expand_finals and java_check_final. Expand anonymous class
9216         constructors. Generate class data.
9217         (build_super_invocation): Skip anonymous class hidden this$<n>
9218         parameter.
9219         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9220         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9221         (set_java_signature): Likewise.
9222
9223 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9224
9225         * gjavah.c: Delete ACC_VISIBILITY define.
9226         * jcf.h: Add ACC_VISIBILITY define.
9227         * parse.y: final: rule tagged <value>.
9228         (java_check_regular_methods): Use ACC_VISIBILITY define for
9229         default package access check.
9230         (local_variable_declaration_statement): Use final: rule.
9231
9232 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9233
9234         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9235         (final:): New rule.
9236
9237 2000-01-17  Tom Tromey  <tromey@cygnus.com>
9238
9239         * gjavah.c (print_field_info): Allow non-static final fields.
9240
9241 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9242
9243         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9244         * parse.y (patch_anonymous_class): New function.
9245         (create_anonymous_class): Register incomplete type when the
9246         class/interface to extends/implement isn't known yet.
9247         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9248         (verify_constructor_super): Tuned error message.
9249
9250 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9251
9252         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9253         (ANONYMOUS_CLASS_P): New macro.
9254         (TYPE_SIGNATURE, TYPE_JCF): New macros.
9255         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9256         * parse.y (create_class): Added leading argument.
9257         (maybe_create_class_interface_decl,
9258         check_class_interface_creation): Likewise.
9259         (craft_constructor): New function.
9260         (verify_constructor_super): Added argument in prototype.
9261         (class_declaration:): Inserted leading argument.
9262         (for_begin:): Use FOR_LOOP_P.
9263         (anonymous_class_creation): Create WFL of the anonymous class to
9264         instantiate. Call build_new_invocation. Added comments.
9265         (check_class_interface_creation): Handle parameter `anonymous' in
9266         verbose mode class creation announce.
9267         (link_nested_class_to_enclosing): Exclude anonymous classes.
9268         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9269         anonymous class, even though they appear to have an enclosing
9270         context.
9271         (create_interface): Pass extra argument to
9272         check_class_interface_creation.
9273         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9274         (create_class): Call check_class_interface_creation and
9275         maybe_create_class_interface_decl with extra new argument. Don't
9276         add private this$<n> to anonymous classes.
9277         (method_declarator): Insert hidden this$<n> to anonymous class
9278         constructors.
9279         (java_fix_constructors): Deleted code creating default
9280         constructor. Call craft_constructor instead.
9281         (java_check_regular_methods): Set `saw_constructor' to 1 for
9282         anonymous classes.
9283         (fix_constructors): Pass extra argument to verify_constructor_super.
9284         (verify_constructor_super): New local `sdecl', use it. Search for
9285         matching constructor (possibly featuring arguments) in super
9286         class.
9287         (lookup_method_invoke): Craft constructor according to arguments
9288         list when dealing with anonymous class constructors.
9289         (build_super_invocation): Pass arguments to anonymous class super
9290         constructors.
9291         (search_loop): Use FOR_LOOP_P.
9292         (labeled_block_contains_loop_p): Likewise.
9293
9294 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9295
9296         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9297         (enclosing_context_p): New function.
9298         (get_access_flags_from_decl): Handle CLASS_STATIC.
9299         (maybe_layout_super_class): Extra first argument passed to
9300         do_resolve_class.
9301         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9302         ID_INIT_P.
9303         * decl.c (access0_identifier_node): New global.
9304         (init_decl_processing): access0_identifier_node initialized.
9305         (pushdecl): Set DECL_CONTEXT only on non type decls.
9306         * expr.c (lookup_field): Lookup inner class fields in enclosing
9307         contexts.
9308         (expand_invoke): Use ID_INIT_P.
9309         (expand_java_field_op): Use DECL_CLINIT_P.
9310         * java-tree.def (CLASS_LITERAL): New tree code.
9311         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9312         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9313         (struct lang_decl): New field `inner_access'.
9314         (enclosing_context_p): Prototyped.
9315         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9316         ID_CLINIT_P): New macros.
9317         (CLASS_STATIC): New macro.
9318         (CLASS_ACCESS0_GENERATED_P): New macro.
9319         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9320         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9321         INNER_CLASS_P): New macros.
9322         (DECL_INNER_CLASS_LIST): New macro.
9323         * jcf-parse.c (yyparse): Avoid the use of ANSI string
9324         concatenation.
9325         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9326         the shift value to int. Fixed typo in comment.
9327         * lex.c (inst_id, wpv_id): Initialize.
9328         * mangle.c (unicode_mangling_length): Take `$' into account.
9329         * parse.h (DRECOVER, RECOVER): Terminate properly.
9330         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9331         (typedef struct _jdep): New field `enclosing'.
9332         (JDEP_ENCLOSING): New macro.
9333         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9334         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9335         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9336         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9337         GET_ENCLOSING_CPC_CONTEXT): New macros.
9338         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9339         (do_resolve_class): Added extra argument in prototype.
9340         * parse.y (resolve_class): Added extra argument in prototype.
9341         (maybe_create_class_interface_decl): Likewise.
9342         (maybe_use_access_method, build_wfl_wrap): New functions.
9343         (java_complete_expand_classes, java_complete_expand_class):
9344         Likewise.
9345         (java_parser_context_push_initialized_field,
9346         java_parser_context_suspend, java_parser_context_resume):
9347         Likewise.
9348         (maybe_make_nested_class_name, make_nested_class_name,
9349         set_nested_class_simple_name_value,
9350         link_nested_class_to_enclosing, find_as_inner_class,
9351         find_as_inner_class_do, check_inner_class_redefinition,
9352         build_thisn_assign, build_current_thisn, build_access_to_thisn,
9353         maybe_build_thisn_access_method, build_outer_field_access,
9354         build_outer_field_access_methods, build_outer_field_access_expr,
9355         build_outer_method_access_method, build_new_access_id,
9356         build_outer_field_access_method, outer_field_access_p,
9357         outer_field_expanded_access_p, outer_field_access_fix,
9358         build_incomplete_class_ref, patch_incomplete_class_ref,
9359         create_anonymous_class): Likewise.
9360         (inst_id, wpv_id): New static global variables.
9361         (synchronized:): New rule, tagged <node>.
9362         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9363         rules.
9364         (anonymous_class_creation:): New rule, tagged <node>.
9365         (NEW_TK): Tagged <node>.
9366         (type_literals, array_type_literal): New rules, tagged <node>.
9367         (class_declaration:): Removed action when reducing by class_body:
9368         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9369         using GET_CPC in sub-rules.
9370         (class_member_declaration): Handle inner classes.
9371         (method_declaration): When reducing method_header:, reset
9372         current_function_decl when appropriate.
9373         (method_declarator:): Set the number of formal parameter to 0 for
9374         method declared without arguments.
9375         (constructor_declarator:): Likewise.
9376         (static_initializer:): List of elements kept in a list.
9377         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9378         use of the keyword `static' for type declarations.
9379         (block_statement:): Handle inner class declarations.
9380         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9381         type qualified `this'.
9382         (class_instance_creation_expression): Use anonymous_class_creation:
9383         to handle inner class instances creation. Handle qualified `new'.
9384         (something_dot_new): Added appropriate actions.
9385         (create_new_parser_context): New function.
9386         (java_push_parser_context, java_parser_context_save_global,
9387         java_parser_context_suspend): Use create_new_parser_context.
9388         (check_modifiers): Changed leading comment.
9389         (check_class_interface_creation): Handle interclasses.
9390         (add_superinterfaces): Fixed comment.
9391         (create_interface): Build qualified name from the raw_name instead
9392         of its matching WFL. Push the initialized fields list. raw_name added
9393         as an extra argument to maybe_create_class_interface_decl.
9394         (create_class): Build qualified name from the raw_name instead of
9395         its matching WFL. Removed assignment to current_parsed_class_un.
9396         Call PUSH_ERROR before returning an error. Suspend the current
9397         parser context when processing an inner class. Push the
9398         initialized fields list. raw_name added as an extra argument to
9399         maybe_create_class_interface_decl. Add the private this$<n>
9400         field.
9401         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9402         (register_fields): Get the class type from GET_CPC and handle
9403         previous errors.  Added code to handle the creation of static
9404         fields in inner classes. Initialized fields initialization
9405         statements kept in a list of lists.
9406         (maybe_generate_finit): Initialized fields initialization
9407         statements kept in a list of lists. Use GET_CPC.
9408         (maybe_generate_clinit): Likewise.
9409         (method_header): Use GET_CPC and GET_CPC_UN.
9410         (parser_qualified_classname): Handle inner classes.
9411         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9412         (java_fix_constructors): Hide pointer to enclosing context
9413         instance in constructor list when dealing with inner classes.
9414         (jdep_resolve_class): Call resolve_class with extra first argument
9415         JDEP_ENCLOSING.
9416         (resolve_class): Add enclosing context as a first extra argument
9417         to do_resolve_class.
9418         (do_resolve_class): Call find_as_inner_class. Handle WFLs
9419         properly.
9420         (resolve_no_layout): Extra argument added to resolve_class
9421         invocation.
9422         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9423         (java_get_real_method_name): Use GET_CPC_UN.
9424         (check_abstract_method_definitions): Use DECL_CLINIT_P.
9425         (java_check_abstract_methods): Handle static method declared in
9426         inner classes by an error.
9427         (java_check_regular_methods): Use DECL_CLINIT_P.
9428         (source_start_java_method): Also set DECL_MAX_LOCALS.
9429         (create_artificial_method): Call java_parser_context_save_global
9430         and java_parser_context_restore_global instead of saving/restoring
9431         the context by hand.
9432         (expand_start_java_method): Improved verbose mode message.
9433         (java_complete_expand_methods): Fixed leading comment. Use
9434         DECL_CLINIT_P.
9435         (fix_constructors): Added assignment to this$<n> if necessary.
9436         (java_expand_classes): Call java_complete_expand_classes instead
9437         of java_complete_expand_methods.
9438         (make_qualified_primary): Simplified.
9439         (merge_qualified_name): Optimized for missing left or right parts.
9440         (resolve_expression_name): Handle access to outer class fields from
9441         interclasses.
9442         (resolve_qualified_expression_name): New macro
9443         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9444         classes. Report error on non appropriate qualification of
9445         `new'. Handle qualified `this'.
9446         (not_accessible_p): Allow access to outer class private fields from
9447         inner classes.
9448         (patch_method_invocation): Handle method invocations through
9449         access methods and inner class constructor invocations.
9450         (find_applicable_accessible_methods_list): Search enclosing
9451         contexts of an inner class.
9452         (search_applicable_methods_list): Fixed typo.
9453         (argument_types_convertible): Handle inner class constructors'
9454         hidden outer context reference argument.
9455         (qualify_ambiguous_name): Handle qualified `this'.
9456         (java_complete_lhs): Handle use of field accessed through
9457         artificial access methods in various cases of assignments. Handle
9458         CLASS_LITERAL node.
9459         (check_final_assignment): Use DECL_CLINIT_P.
9460         (valid_ref_assignconv_cast_p): Handle the destination being an
9461         enclosing context of the source.
9462         (patch_unaryop): Handle use of field accessed through artificial
9463         access methods.
9464         (patch_return): Use DECL_CLINIT_P.
9465         (patch_throw_statement): Use DECL_CLINIT_P.
9466         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9467         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9468         ID_INIT_P.
9469
9470 2000-01-16  Anthony Green  <green@cygnus.com>
9471
9472         * parse.y (build_string_concatenation): Only use
9473         StringBuffer(String) shortcut if String arg is constant.
9474
9475 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9476
9477         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9478         the shift value to int. Fixed typo in comment.
9479
9480 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9481
9482         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9483         * jcf-write.c: Likewise.
9484         * parse.y: Likewise.
9485         * parse.c: Regenerate.
9486
9487 2000-01-09  Anthony Green  <green@cygnus.com>
9488
9489         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9490         bytecodes in the correct order.
9491
9492 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9493
9494         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9495
9496 2000-01-06  Anthony Green  <green@cygnus.com>
9497
9498         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9499         before building constant array decl.
9500
9501 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9502
9503         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9504         method invocation and typo in conditional expression.
9505         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9506         the appropriate NOTE_POP.
9507         * parse.y (patch_binop): Shift value mask to feature the right
9508         type.
9509
9510 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9511
9512         * class.c (assume_compiled, assume_compiled_node): Add static
9513         prototype.
9514         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9515
9516         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9517
9518         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9519
9520         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9521         to `__modifier' to avoid stringifying it.
9522
9523         * parse.y (verify_constructor_circularity): Don't call a variadic
9524         function with a non-literal format string.
9525         (java_check_abstract_methods): Move unreachable code inside
9526         `continue' statement.
9527         (lookup_method_invoke): Call xstrdup, not strdup.
9528
9529         * expr.c (expand_java_field_op): Avoid the use of ANSI string
9530         concatenation.
9531
9532         * jcf-parse.c (yyparse): Likewise.
9533
9534         * jv-scan.c (main): Likewise.
9535
9536 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9537
9538         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9539         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9540         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9541         concatenation.
9542
9543         * parse.y (synchronized, variable_redefinition_error,
9544         check_class_interface_creation, create_interface, create_class,
9545         method_header, finish_method_declaration,
9546         check_modifiers_consistency, method_declarator,
9547         complete_class_report_errors, check_abstract_method_definitions,
9548         java_check_regular_methods, check_throws_clauses,
9549         java_check_abstract_methods, read_import_dir,
9550         check_pkg_class_access, declare_local_variables, fix_constructors,
9551         cut_identifier_in_qualified, resolve_expression_name,
9552         resolve_qualified_expression_name, patch_method_invocation,
9553         java_complete_lhs, patch_assignment, try_builtin_assignconv,
9554         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9555         patch_exit_expr, patch_exit_expr, patch_switch_statement,
9556         patch_try_statement, patch_synchronized_statement,
9557         patch_throw_statement, check_thrown_exceptions,
9558         patch_conditional_expr): Likewise.
9559
9560 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9561
9562         * Makefile.in (LIBDEPS): Added gcc's errors.o
9563         (../jcf-dump$(exeext):): Link with gcc's errors.o
9564         (../gcjh$(exeext):): Likewise.
9565         * expr.c (expand_java_NEW): Layout the entire target type instead of
9566         laying out its methods only.
9567         (lookup_field): Layout the class after having loaded it.
9568         * java-tree.h (java_debug_context): Declared.
9569         * jcf-io.c (toplev.h): Included.
9570         (find_class): Removed assignment to jcf's outofsynch
9571         field. Force source file to be read if newer than its matching
9572         class file. Tweaked debug messages.
9573         * jcf-parse.c (jcf_out_of_synch): Deleted.
9574         (read_class): Call to jcf_out_of_synch removed.
9575         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9576         (jcf_out_of_synch): Prototype deleted.
9577         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9578         `deprecated' and `class_err': integer turned into bit-fields.
9579         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9580         * parse.y (package_list): New global.
9581         (package_declaration:): Record newly parsed package name.
9582         (extra_ctxp_pushed_p): Static global deleted.
9583         (java_parser_context_save_global): Create buffer context for the
9584         purpose of saving globals, if necessary.
9585         (java_parser_context_restore_global): Pop context pushed for the
9586         purpose of saving globals, if necessary.
9587         (java_debug_context_do): New prototype and function.
9588         (java_debug_context): Likewise.
9589         (do_resolve_class): Use already parsed package names to qualify
9590         and lookup class candidate.
9591         (java_pre_expand_clinit): Removed unnecessary local variable.
9592
9593 1999-12-17  Tom Tromey  <tromey@cygnus.com>
9594
9595         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
9596         fixes PR gcj/119.
9597         (process_file): Use `\n\' at end of each line in string.
9598
9599 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9600
9601         * expr.c (expand_invoke): Layout the loaded class before
9602         attempting to use it.
9603         (expand_java_field_op): Allow final field assignments to take
9604         place in $finit$.
9605         * typeck.c (convert): Return error_mark_node if expr is null.
9606
9607 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9608
9609         * class.c (class_depth): Return -1 if the class doesn't load
9610         properly.
9611         * expr.c (can_widen_reference_to): Check for errors during depth
9612         computation and return 0 accordingly.
9613         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9614         create default constructors and add an other error check.
9615         * parse.h (java_fix_constructors): Prototyped.
9616         * parse.y (java_pre_expand_clinit): Likewise.
9617         (build_super_invocation): Re-prototyped to feature one argument.
9618         (java_check_circular_reference): Directly use `current'.
9619         (java_fix_constructors): New function.
9620         (java_check_regular_methods): Don't create default constructors
9621         here, but abort if none were found.
9622         (java_complete_expand_methods): Pre-process <clinit> calling
9623         java_pre_expand_clinit.
9624         (java_pre_expand_clinit): New function.
9625         (fix_constructors): build_super_invocation invoked with the
9626         current method declaration as an argument.
9627         (build_super_invocation): Use the context of the processed method
9628         decl argument instead of current_class.
9629         * typeck.c (lookup_java_method): Take WFLs in method names into
9630         account.
9631
9632 1999-12-14  Per Bothner  <per@bothner.com>
9633
9634         * class.c (make_class_data): flag_keep_inline_functions to keep
9635         private methods in the method array.
9636
9637 1999-12-15  Anthony Green  <green@cygnus.com>
9638
9639         * check-init.c (check_init): Take into account both types of
9640         `throw's when checking for uninitialized variables.
9641
9642 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9643
9644         * parse.y (java_complete_lhs): Force conversion of array
9645         dimensions to int_type_node, that's what runtime's ABI expects.
9646
9647 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9648
9649         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9650         operand of a WFL, until the Java front-end gets fixed with regard
9651         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9652
9653 1999-12-10  Andrew Haley  <aph@cygnus.com>
9654
9655         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9656         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9657         expr.c (build_java_athrow): Add support for sjlj-exceptions.
9658         java-tree.h: Ditto.
9659         jcf-write.c: Ditto.
9660
9661 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9662
9663         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9664         before calling expand_eh_region_start and expand_start_all_catch.
9665         * except.c (expand_start_java_handler): Switch to permanent
9666         obstack before calling expand_eh_region_start.
9667         (expand_end_java_handler): Switch to permanent obstack before
9668         calling expand_start_all_catch.
9669
9670 1999-12-5  Anthony Green  <green@cygnus.com>
9671
9672         * decl.c (init_decl_processing): Mark throw_node as a noreturn
9673         function with side effects.
9674         (init_decl_processing): Mark all memory allocating DECLs with
9675         DECL_IS_MALLOC.
9676
9677 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9678
9679         * except.c (expand_end_java_handler): Call
9680         expand_resume_after_catch and end_catch_handler.
9681
9682 1999-11-30  Anthony Green  <green@cygnus.com>
9683
9684         * verify.c (verify_jvm_instructions): Create new return label
9685         chain if non existent (don't rely on the verified state of the jsr
9686         target.)
9687
9688 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9689
9690         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9691         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9692
9693         * parse.y (patch_assignment): Removed bogus final class test on
9694         lhs when checking on whether to emit an ArrayStoreException runtime
9695         check.
9696         * expr.c (expand_java_arraystore): Likewise.
9697
9698 1999-11-28 Anthony Green <green@cygnus.com>
9699
9700         * decl.c (find_local_variable): Reuse single slot decls when
9701           appropriate.
9702
9703 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9704
9705         * jcf-parse.c (saw_java_source): Global variable removed.
9706         (read_class): Don't use `saw_java_source'. Added extra braces.
9707         (yyparse): Code setting `saw_java_source' removed.
9708
9709 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
9710
9711         * except.c (emit_handlers): Zero catch_clauses after emitting them.
9712
9713 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9714
9715         * verify.c (merge_type_state): Non verified subroutines being
9716         considered more than once to trigger passive type merge.
9717
9718 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9719
9720         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9721         in case of error. Error message tuned.
9722
9723 1999-11-21  Anthony Green  <green@cygnus.com>
9724
9725         * constants.c (find_methodref_index): Unwrap method names before
9726         inserting them in the constant pool.
9727
9728         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9729
9730         * class.c (assume_compiled_node): New typedef.
9731         (assume_compiled_tree): New static data.
9732         (find_assume_compiled_node): New function.
9733         (add_assume_compiled): New function.
9734         (assume_compiled): New function.
9735         * class.c (make_class_data): Use assume_compiled.
9736         (is_compiled_class): Use assume_compiled.
9737
9738         * java-tree.h (add_assume_compiled): Declare.
9739
9740         * lang.c (lang_decode_option): Parse new options.
9741
9742 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9743
9744         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9745         int_type_node: that's what `_Jv_AllocObject' expects.
9746
9747 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9748
9749         * parse.y (lookup_method_invoke): Use lang_printable_name to
9750         reliably build the type name during error report. Fixes PR gcj/97.
9751
9752 1999-11-09  Tom Tromey  <tromey@cygnus.com>
9753
9754         * jcf-path.c: Include <sys/stat.h>.
9755         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
9756         (DIR_UP): New macro.
9757
9758 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9759
9760         * parse.y (source_end_java_method): Resume permanent allocation,
9761         reversing Apr 27 1998 patch.
9762         (patch_string_cst): Pop obstacks after having pushed the permanent
9763         ones.
9764
9765 1999-11-05  Tom Tromey  <tromey@cygnus.com>
9766
9767         * class.c (finish_class): Emit inlined methods if any native
9768         methods exist in the class.  Fixes PR gcj/85.
9769
9770 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9771
9772         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
9773         (qualify_ambiguous_name): Likewise.
9774
9775 1999-11-03  Godmar Back <gback@cs.utah.edu>
9776
9777         * typeck.c: (lookup_java_method):  search all inherited
9778         interfaces when looking up interface method.
9779
9780 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9781
9782         * parse.y (method_header:): Issue error message for rule `type
9783         error'.
9784         (synchronized:): Error report when not using synchronized.
9785
9786 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9787
9788         * parse.y (resolve_qualified_expression_name): Prevent `this' from
9789         being used before the superclass constructor has been called.
9790         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
9791         instead of `CALL_THIS_CONSTRUCTOR_P'.
9792
9793 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
9794
9795         * check-init.c: Fix typo in comment.
9796
9797 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9798
9799         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
9800         and final method.
9801
9802 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9803
9804         * parse.y (expression_statement:): Call function to report
9805         improper invocation of a constructor.
9806         (parse_ctor_invocation_error): New function.
9807
9808 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
9809
9810         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
9811         remember_end_note.
9812
9813 1999-10-21  Tom Tromey  <tromey@cygnus.com>
9814
9815         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
9816         in generated `main'.
9817
9818 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9819
9820         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
9821         (qualify_ambiguous_name): Likewise.
9822
9823 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9824
9825         * parse.y (java_complete_tree): fold_constant_for_init to work on
9826         permanent_obstack.
9827         (java_complete_lhs): Likewise.
9828         (array_constructor_check_entry): Complete an initializer element
9829         on permanent_obstack.
9830
9831 1999-10-19  Tom Tromey  <tromey@cygnus.com>
9832
9833         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
9834         From Mike Moreton <mike@pillim.demon.co.uk>.
9835
9836 1999-10-15  Greg McGary  <gkm@gnu.org>
9837
9838         * java-tree.h (flag_bounds_check): Remove extern decl.
9839         * lang.c (flag_bounds_check): Remove global variable.
9840         (lang_f_options): Remove "bounds-check" entry.
9841         (lang_init_options): Default flag_bounds_check to "on".
9842
9843 1999-10-14  Tom Tromey  <tromey@cygnus.com>
9844
9845         * jvgenmain.c (usage): New function.
9846         (main): Use it.  Also, handle `-D' options.
9847         * jvspec.c (lang_specific_driver): Recognize -D.
9848         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
9849
9850         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
9851
9852 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9853
9854         * jcf-dump.c (print_constant, disassemble_method): Don't call a
9855         variadic function with a non-literal format string.
9856
9857         * parse-scan.y (report_main_declaration): Likewise.
9858
9859         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
9860
9861         * parse.y (read_import_dir, patch_assignment, patch_binop,
9862         patch_array_ref): Likewise.
9863
9864         * typeck.c (build_java_array_type): Likewise.
9865
9866         * verify.c (verify_jvm_instructions): Likewise.
9867
9868 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9869
9870         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
9871
9872 1999-10-07  Anthony Green  <green@cygnus.com>
9873
9874         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
9875         where CHECK_PUT may fail for valid reasons.
9876
9877         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
9878         UNSAFE_PUTN): New macros.
9879
9880 1999-10-04  Tom Tromey  <tromey@cygnus.com>
9881
9882         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
9883         well.  Fixes Java PR gcj/59.
9884         * parse-scan.y (yyerror): Report errors.
9885
9886 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
9887
9888         * decl.c (insert_block): Remove unconditional `abort'.
9889
9890 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
9891
9892         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
9893         FUNCTION_CODE now of type int.  All callers changed.
9894         Set the builtin's DECL_BUILT_IN_CLASS.
9895
9896 1999-09-23  Tom Tromey  <tromey@cygnus.com>
9897
9898         * jvspec.c (lang_specific_driver): Don't read spec file if
9899         -fsyntax-only given.
9900
9901 1999-09-22  Tom Tromey  <tromey@cygnus.com>
9902
9903         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
9904
9905         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
9906         (WORDS_TO_LONG): Likewise.
9907         (WORDS_TO_DOUBLE): Likewise.
9908
9909 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9910
9911         * jcf-write.c (RELOCATION_VALUE_0): New macro.
9912         (RELOCATION_VALUE_1): Likewise.
9913         (emit_iinc, emit_reloc, push_constant1, push_constant2,
9914         push_in_const, push_long_const): Prototyped.
9915         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
9916         (push_constant2): Likewise.
9917         (push_int_const): Cast find_constant1's integer arguments to `jword'.
9918         (find_constant_wide): Cast find_constant2's integer arguments to
9919         `jword'.
9920         (find_constant_index): Cast find_constant2's and find_constant2's
9921         integer arguments to `jword'.
9922         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
9923         (emit_switch_reloc): Use RELOCATION_VALUE_0.
9924         (emit_if): Use RELOCATION_VALUE_1.
9925         (emit_goto): Likewise.
9926         (emit_jsr): Likewise.
9927         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
9928         argument to push_long_const to HOST_WIDE_INT.
9929
9930 1999-09-15  Andreas Schwab  <schwab@suse.de>
9931
9932         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
9933
9934 1999-09-20  Nick Clifton  <nickc@cygnus.com>
9935
9936         * lang.c (lang_decode_option): Extend comment.
9937
9938 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9939
9940         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
9941         instead of fndecl.
9942
9943 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9944
9945         * gjavah.c (get_field_name, print_method_info, print_include,
9946         add_namelet): Use xmalloc, not malloc.
9947
9948         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
9949         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
9950         NULL pointer.
9951
9952         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
9953
9954         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
9955
9956         * jcf-path.c (add_entry): Likewise.
9957
9958         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
9959
9960         * jv-scan.c (xmalloc): Remove definition.
9961
9962         * jvgenmain.c (xmalloc): Likewise.
9963
9964         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
9965
9966         * lex.c (java_store_unicode): Use xrealloc, not realloc.
9967
9968         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
9969         concat, not xmalloc/sprintf.
9970         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
9971         (xstrdup): Remove definition.
9972
9973         * parse.y (duplicate_declaration_error_p,
9974         constructor_circularity_msg, verify_constructor_circularity,
9975         check_abstract_method_definitions, java_check_regular_methods,
9976         java_check_abstract_methods, patch_method_invocation,
9977         check_for_static_method_reference, patch_assignment, patch_binop,
9978         patch_cast, array_constructor_check_entry, patch_return,
9979         patch_conditional_expr): Use xstrdup, not strdup.
9980
9981         * zextract.c (ALLOC): Use xmalloc, not malloc.
9982
9983 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9984
9985         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
9986
9987         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
9988         (do_spec, lang_specific_pre_link, lang_specific_driver,
9989         input_filename, input_filename_length): Don't declare.
9990         (main_class_name, jvgenmain_spec, lang_specific_driver):
9991         Constify a char*.
9992         (lang_specific_driver): All calls to the function pointer
9993         parameter now explicitly call `fatal'.
9994
9995 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9996
9997         * parse.y (find_applicable_accessible_methods_list): Search
9998         abstract classes as interfaces.
9999
10000 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10001
10002         * class.c (finish_class): We're now outside a valid method
10003         declaration. Tell the rest of gcc so.
10004
10005 1999-09-08  Bruce Korb  autogen@linuxbox.com
10006
10007         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
10008
10009 1999-09-07  Tom Tromey  <tromey@cygnus.com>
10010
10011         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
10012         java-array.h.
10013         (decode_signature_piece): Don't emit "::" in JArray<>.
10014         (print_namelet): Only print trailing `;' when printing a class.
10015
10016 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
10017
10018         * java-tree.h: Delete declarations for all tree nodes now moved to
10019         global_trees.
10020         * decl.c: Delete their definitions.
10021
10022 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
10023
10024         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
10025         * Makefile.in (OBJS): Add ggc-callbacks.o.
10026         (OBJDEPS): Likewise.
10027
10028 1999-09-03  Tom Tromey  <tromey@cygnus.com>
10029
10030         * parse.y (strip_out_static_field_access_decl): Return operand if
10031         it satisfies JDECL_P.
10032
10033 1999-09-02  Tom Tromey  <tromey@cygnus.com>
10034
10035         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
10036         Handle nested arrays, like `[[I'.
10037
10038 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10039
10040         * class.c (finish_class): Remove unused parameter, all callers
10041         changed.
10042
10043         * expr.c (build_java_athrow): Change return type to void.
10044         (java_lang_expand_expr): Make sure each case in switch returns a
10045         value.
10046
10047         * java-tree.h (finish_class): Fix prototype to take void args.
10048
10049         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
10050         (main): Issue return from main, not exit.
10051
10052         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
10053
10054         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
10055
10056         * jv-scan.c (main): Issue return from main, not exit.
10057
10058         * parse.y (check_abstract_method_definitions,
10059         java_check_abstract_method_definitions): Add static prototypes.
10060         (java_complete_expand_methods): Fix call to `finish_class'.
10061
10062         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
10063         and `prevpc'.
10064
10065 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10066
10067         * lang.c (language_string): Constify.
10068
10069 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10070
10071         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
10072         Remove hacks for stuff which comes from libiberty.
10073
10074         * Make-lang.in: Likewise.
10075
10076 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
10077
10078         * Makefile.in (xref.o): Depend on xref.c explicitly.
10079
10080 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10081
10082         * java-tree.h (lang_printable_name): Constify a char*.
10083
10084         * lang.c (lang_printable_name): Likewise.
10085
10086 1999-08-27  Jeffrey A Law  (law@cygnus.com)
10087
10088         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
10089         comments in C code.
10090
10091 1999-08-26  Tom Tromey  <tromey@cygnus.com>
10092
10093         * gjavah.c (print_cxx_classname): Print "::" before qualified
10094         name.
10095
10096 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10097
10098         * parse.y (lookup_cl): Changed leading comment. Now does its best
10099         to set the column number.
10100         (qualify_ambiguous_name): Take WFL wrappers into account.
10101
10102 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
10103
10104         * verify.c (verify_jvm_instructions): Don't check instruction
10105         validity beyond end of method.
10106
10107 1999-08-25  Tom Tromey  <tromey@cygnus.com>
10108
10109         * jvspec.c (lang_specific_driver): Correctly handle --help again.
10110
10111 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10112
10113         * gjavah.c (print_name, print_base_classname, utf8_cmp,
10114         cxx_keyword_subst, generate_access, name_is_method_p,
10115         get_field_name, print_field_name, super_class_name, print_include,
10116         decode_signature_piece, print_class_decls, usage, help,
10117         java_no_argument, version, add_namelet, print_namelet): Add static
10118         prototype.
10119         (print_base_classname, utf8_cmp, cxx_keyword_subst,
10120         name_is_method_p): Constify a char*.
10121         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
10122         Provide a final else clause in an if-else-if.
10123         (print_field_info): Add missing final arg in function call to
10124         `print_field_name'.
10125         (print_method_info, decompile_method, decode_signature_piece,
10126         print_c_decl, print_full_cxx_name, print_stub,
10127         print_mangled_classname, super_class_name, print_include,
10128         add_namelet, add_class_decl, print_class_decls, process_file,
10129         help): Constify a char*.
10130
10131         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10132         push_int_const, find_constant_wide, find_constant_index,
10133         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10134         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10135         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10136         emit_if, emit_goto, emit_jsr, call_cleanups,
10137         make_class_file_name): Add static prototypes.
10138         (generate_bytecode_return, generate_bytecode_insns): Pass a
10139         NULL_PTR, not a NULL_TREE.
10140
10141         * jv-scan.c: Include "jcf.h".
10142         (main): Declare using DEFUN macro.
10143
10144         * jvspec.c (find_spec_file, lang_specific_pre_link,
10145         lang_specific_driver): Add prototypes.
10146         (find_spec_file): Constify a char*.
10147
10148         * keyword.gperf (hash, java_keyword): Add prototypes.
10149
10150         * lang.c (lang_print_error): Add static prototype.
10151         (lang_init): Prefer memcpy over bcopy to avoid casts.
10152
10153         * lex.c (yylex): Add static prototype.
10154
10155         * parse-scan.y: Include "lex.c" earlier.
10156
10157         * parse.h: Remove redundant declaration for `yylex'.
10158
10159         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10160         labeled_block_contains_loop_p): Add static prototypes.
10161         (not_accessible_p): Make static to match prototype.
10162
10163         * verify.c (start_pc_cmp): Don't needlessly cast away const.
10164
10165 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10166
10167         * parse.y (check_method_redefinition): Changed leading comment.
10168         (check_abstract_method_definitions): New function.
10169         (java_check_abstract_method_definitions): New function.
10170         (java_check_regular_methods): Call it.
10171         (verify_constructor_super): Fixed indentation.
10172         (lookup_method_invoke): Likewise.
10173
10174 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10175
10176         * parse.y (method_header): Return a null pointer if the current
10177         class node is null.
10178         (finish_method_declaration): Return if the current function decl
10179         is null.
10180         (source_start_java_method): Likewise.
10181         (java_method_add_stmt): Likewise.
10182
10183 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10184
10185         * class.c (emit_register_class): Removed unnecessary call to
10186         start_sequence.
10187         * parse.y (labeled_block_contains_loop_p): Removed unused local
10188         variable.
10189
10190 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10191
10192         * parse.y (java_refold): Added prototype.
10193
10194 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10195
10196         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10197         (java_stabilize_reference): Removed unnecessary `else'.
10198         (java_complete_lhs): Set flag to remember boolean. Call
10199         java_refold. Added comments.
10200         (java_decl_equiv): New function.
10201         (binop_compound_p): Likewise.
10202         (java_refold): Likewise.
10203         (patch_unaryop): Striped static field access assigned to decl and
10204         op. Changed promotion scheme for ++/-- operators.
10205         (search_loop): New function.
10206         (labeled_block_contains_loop_p): Likewise.
10207         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10208         comment.
10209         (patch_bc_statement): Call search_loop. Fixed comment.
10210
10211 1999-08-14  Anthony Green  <green@cygnus.com>
10212
10213         * expr.c (java_lang_expand_expr): Mark static array data as
10214         referenced.
10215
10216 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10217
10218         * jvgenmain.c (main): NUL-terminate name_obstack.
10219
10220 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10221
10222         * check-init.c (check_bool2_init, done_alternative): Add static
10223         prototypes.
10224
10225         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10226         (add_method, build_utf8_ref, build_class_ref,
10227         append_gpp_mangled_type, layout_class_method): Constify a char*.
10228
10229         * decl.c (push_promoted_type, make_binding_level): Add static
10230         prototypes.
10231         (push_promoted_type, pushdecl): Constify a char*.
10232
10233         * except.c (find_handler_in_range, link_handler,
10234         check_start_handlers): Add static prototypes.
10235
10236         * expr.c (process_jvm_instruction): Constify a char*.
10237
10238         * gjavah.c (main): Constify a char*.
10239
10240         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10241         Constify a char*.
10242
10243         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10244         static prototypes.
10245         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10246         munge, print_ents): Constify a char*.
10247
10248         * jcf-dump.c (disassemble_method): Constify a char*.
10249         (print_constant_pool, print_exception_table): Add static prototypes.
10250         (print_constant, print_exception_table, main, disassemble_method):
10251         Constify a char*.
10252
10253         * jcf-io.c (find_classfile, find_class): Likewise.
10254
10255         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10256         (set_source_filename, predefined_filename_p): Add static prototypes.
10257         (set_source_filename, get_constant, get_class_constant,
10258         find_in_current_zip): Constify a char*.
10259
10260         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10261         static prototypes.
10262         (add_entry, add_path, jcf_path_classpath_arg,
10263         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10264
10265         * jcf-reader.c (get_attribute, jcf_parse_preamble,
10266         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10267         jcf_parse_one_method, jcf_parse_methods,
10268         jcf_parse_final_attributes): Add static prototypes.
10269         (get_attribute): Constify a char*.
10270
10271         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10272         jcf_dependency_add_target, jcf_path_classpath_arg,
10273         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10274
10275         * jv-scan.c (main): Constify a char*.
10276         (gcc_obstack_init): Add prototype arguments.
10277
10278         * jvgenmain.c (gcc_obstack_init): Likewise.
10279         (main): Constify a char*.
10280
10281         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10282         static prototypes.
10283         (put_decl_string, lang_print_error): Constify a char*.
10284         (lang_init): Remove redundant extern prototype.
10285
10286         * mangle.c (emit_unicode_mangled_name): Constify a char*.
10287
10288         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10289         Add static prototypes.
10290         (get_type_from_signature): Constify a char*.
10291
10292         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10293         Add static prototypes.
10294         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10295         (verify_jvm_instructions): Constify a char*.
10296
10297         * xref.c (xref_flag_value): Likewise.
10298
10299         * xref.h (xref_flag_value): Likewise.
10300
10301         * zextract.c (makeword, makelong): Add static prototypes.
10302         (makeword, makelong): Constify a uch*.
10303
10304 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10305
10306         * lang.c (java_dummy_print): Constify a char*.
10307         (lang_print_error): Likewise.
10308         (lang_init): Remove redundant prototype for `print_error_function'.
10309         (lang_init_source): Likewise.
10310         (lang_identify): Constify a char*.
10311
10312 1999-08-09  Tom Tromey  <tromey@cygnus.com>
10313
10314         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10315         (WORDS_TO_LONG): Likewise.
10316         (WORDS_TO_DOUBLE): Likewise.
10317
10318 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10319
10320         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10321
10322         * expr.c (java_stack_pop, java_array_data_offset,
10323         build_java_throw_out_of_bounds_exception, case_identity,
10324         build_java_check_indexed_type): Add static prototypes.
10325         (linenumber_table, expand_invoke, expand_java_field_op,
10326         build_primtype_type_ref, expand_byte_code): Constify a char*.
10327
10328         * java-tree.h (build_primtype_type_ref, linenumber_table):
10329         Constify a char*.
10330         (java_lang_expand_expr): Add prototype.
10331
10332         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
10333         `java_lang_expand_expr'.
10334
10335         * lex.c (java_lex_error): Constify a char*.
10336         (java_get_unicode, java_read_char, java_allocate_new_line,
10337         java_unget_unicode, java_sneak_unicode): Prototype.
10338
10339         * parse-scan.y (current_class, package_name, method_declarator,
10340         report_class_declaration, yyerror): Constify a char*.
10341
10342         * parse.h (java_report_errors): Prototype.
10343         (yyerror): Constify a char*.
10344
10345         * parse.y (classitf_redefinition_error, check_modifiers,
10346         parse_jdk1_1_error, lookup_package_type,
10347         lookup_package_type_and_set_next, get_printable_method_name,
10348         purify_type_name): Constify a char*.
10349         (build_super_invocation, maybe_generate_finit,
10350         verify_constructor_super, parser_add_interface,
10351         add_superinterfaces, jdep_resolve_class, note_possible_classname,
10352         java_complete_expand_methods, java_expand_finals,
10353         cut_identifier_in_qualified, java_stabilize_reference,
10354         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10355         merge_string_cste): Prototype.
10356         (single_type_import_declaration, yyerror,
10357         variable_redefinition_error, build_array_from_name,
10358         build_unresolved_array_type, check_class_interface_creation,
10359         resolve_class, complete_class_report_errors,
10360         note_possible_classname, read_import_dir,
10361         find_in_imports_on_demand, resolve_package, fix_constructors,
10362         check_deprecation, lookup_method_invoke,
10363         maybe_build_primttype_type_ref, array_constructor_check_entry):
10364         Constify a char*.
10365         (java_complete_expand_methods, java_expand_finals): Make static.
10366         (convert_narrow): Remove static prototype.
10367
10368 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
10369
10370         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10371
10372 1999-08-02  Richard Henderson  <rth@cygnus.com>
10373
10374         * decl.c: Include defaults.h instead of expr.h.
10375         * parse.y: Likewise.
10376
10377 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
10378
10379         * java/decl.c (start_java_method): Change all uses of
10380         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10381         Ensure expr.h is included.
10382         * java/expr.c (pop_arguments): Ditto.
10383         * java/parse.y (expand_start_java_method): Ditto.
10384
10385 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10386
10387         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10388
10389 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
10390
10391         * decl.c: Include "function.h".
10392         * except.c: Likewise.
10393         * parse.y: Likewise.
10394         * Makefile.in: Update dependencies.
10395
10396 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10397
10398         * expr.c (build_java_soft_divmod): Provide a default case in switch.
10399         (java_lang_expand_expr): Mark parameters `target', `tmode' and
10400         `modifier' with ATTRIBUTE_UNUSED.
10401
10402         * gjavah.c (process_file): Add braces around ambiguous `else'.
10403
10404         * jcf-dump.c (print_access_flags, localvar_free): Change return
10405         type to void.
10406
10407         * parse.y (java_complete_expand_method): Initialize variable
10408         `exception_copy'.
10409         (resolve_qualified_expression_name): Likewise for `field_decl'.
10410         (patch_method_invocation): Likewise for `class_to_search'.
10411         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10412         (patch_assignment): Likewise for `lhs_type'.
10413
10414         * verify.c (verify_jvm_instructions): Remove unused variable
10415         `caller'.
10416
10417 1999-07-25  Richard Henderson  <rth@cygnus.com>
10418
10419         * decl.c (va_list_type_node): New.
10420
10421 1999-07-25  Anthony Green  <green@cygnus.com>
10422
10423         * gjavah.c (print_stub): New function.
10424         (METHOD_IS_NATIVE): New macro.
10425         (print_mangled_classname): Make static.
10426         (HANDLE_END_FIELD): Don't emit fields during stub generation.
10427         (process_file): Perform stub generation.
10428         (HANDLE_METHOD): Don't emit class decls during stub
10429         generation.
10430         (HANDLE_END_METHOD): Take into account stub generation.
10431         (print_method_info): Handle stub generation.
10432         (print_stub): New function.
10433         (print_cxx_classname): Make signature consistant with others.
10434         (help): Describe -stubs option.
10435         (main): Create stub file.
10436         (version): Use version.c.
10437         (print_full_cxx_name): New function.
10438         (print_c_decl): Use print_full_cxx_name.
10439
10440 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10441
10442         * check-init.c (check_init): Handle MAX_EXPR.
10443
10444 1999-07-15  Andrew Haley  <aph@cygnus.com>
10445
10446         * lang.c (flag_use_divide_subroutine): New variable.
10447         * typeck.c: (convert_ieee_real_to_integer): Bounds check
10448         fp-to-integer conversion.
10449         (convert): Call convert_ieee_real_to_integer when flag_fast_math
10450         is not set.
10451
10452         * expr.c (build_java_soft_divmod): New function.
10453         (build_java_binop): Call build_java_soft_divmod if
10454         flag_use_divide_subroutine is set.
10455         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10456         soft_lrem_node: new builtin functions.
10457         (init_decl_processing) Initialize the new builtins.
10458         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10459         soft_lrem_node: new builtin functions.
10460         (build_java_soft_divmod): New function.
10461         * parse.y: Call build_java_soft_divmod if
10462         flag_use_divide_subroutine is set.
10463         * parse.c: Rebuilt.
10464
10465         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10466         a --specs= arg) even if not linking.
10467         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10468         -fuse-divide-subroutine
10469
10470 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10471
10472         * parse.y (resolve_and_layout): Check methods only once.
10473         (resolve_qualified_expression_name): Verify thrown exceptions
10474         compatibility.
10475         (check_thrown_exceptions): Reject exceptions thrown in
10476         initializer. Error message tuned.
10477
10478 1999-07-14  Andrew Haley  <aph@cygnus.com>
10479
10480         * expr.c (expand_expr): Do not return the last statement in a
10481         block as the block's value.
10482
10483 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10484
10485         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10486         CALL_EXPR, to avoid order of evaluation changes.
10487
10488 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10489
10490         * parse.y (qualify_ambiguous_name): Do not use
10491         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10492
10493 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10494
10495         * check-init.c (check_init): Handle MAX_EXPR.
10496         * expr.c (force_evaluation_order): Force method call arguments to
10497         be evaluated in left-to-right order.
10498         * parse.y (qualify_ambiguous_name): Loop again to qualify
10499         NEW_ARRAY_EXPR properly.
10500
10501 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10502
10503         * parse.y (patch_invoke): Resolve unresolved invoked method
10504         returned type.
10505         (qualify_ambiguous_name): STRING_CST to qualify expression for
10506         type name resolution.
10507
10508 1999-06-24  Andrew Haley  <aph@cygnus.com>
10509
10510         * class.c (finish_class): Whenever a deferred method is
10511         output, rescan the list of methods to see if a new candidate for
10512         output can be found.
10513
10514 1999-06-28  Tom Tromey  <tromey@cygnus.com>
10515
10516         * jvspec.c (lang_specific_driver): Recognize --help.
10517
10518 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10519
10520         * parse.y (resolve_package): Fixed bogus return statement.
10521         (patch_method_invocation): Resolve method invocation beginning with
10522         a package name qualifier.
10523
10524 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10525
10526         * Make-lang.in (java.stage1): Depend on stage1-start.
10527         (java.stage2): Likewise for stage2-start.
10528         (java.stage3): Likewise for stage3-start.
10529         (java.stage4): Likewise for stage4-start.
10530
10531 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10532
10533         * parse.y (java_complete_lhs): When doing cross referencing, don't
10534         try to keep file location on a WFL expanded as a CALL_EXPR.
10535
10536 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10537
10538         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10539         compiling to class file a void method with an empty method body.
10540         As a side effect, the bytecode backend will generate the
10541         appropriate `return' instruction.
10542
10543 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10544
10545         * parse.y (lookup_package_type_and_set_next): New function prototype.
10546         (resolve_package): Search current and imported packages.
10547         (lookup_package_type_and_set_next): New function.
10548
10549 1999-06-22  Andrew Haley  <aph@cygnus.com>
10550
10551         * verify.c (verify_jvm_instructions): Check for pending blocks
10552         before invalid PC test and opcode switch, not after.
10553
10554 1999-06-21  Andrew Haley  <aph@cygnus.com>
10555
10556         * except.c (find_handler_in_range): The upper limit for exception
10557         ranges is exclusive, not inclusive: (start <= pc < end).
10558         (link_handler): find child pointer which points to outer by
10559         searching sibling list: previous code incorrectly assumed that
10560         outer->outer->first_child must point to outer.
10561         * verify.c (verify_jvm_instructions): FIXME added to code for
10562         `athrow'.
10563         (verify_jvm_instructions): Do not assume that the last block
10564         processed in a subroutine is a block which ends with a `ret'
10565         instruction.  With some control flows it is possible that the last
10566         block ends with an `athrow'.
10567
10568 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10569
10570         * parse.y (qualify_ambiguous_name): Reorganized the post
10571         evaluation of non WFL leading expression nodes.
10572
10573 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10574
10575         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10576         CONVERT_EXPR.
10577
10578 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10579
10580         * parse.y (qualify_ambiguous_name): Handle qualified expression
10581         beginning with a STRING_CST.
10582
10583 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10584
10585         * parse.y (register_fields): Set DECL_INITIAL on both
10586         pre-initialized static and public fields.
10587         (resolve_field_access): Static field access expressions to always
10588         use pointer types.
10589         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10590         qualification. CONVERT_EXPR to be resolved as an expression name.
10591         (java_complete_lhs): Identify and access qualified final
10592         initialized field in switch statement case expression.
10593         (fold_constant_for_init): Pre-initialized field decl constant to
10594         be folded.
10595
10596 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10597
10598         * parse.y (note_possible_classname): Mark returned node with
10599         QUALIFIED_P only if the original class name contained a '/'.
10600
10601 1999-06-05  Anthony Green  <green@cygnus.com>
10602
10603         * Make-lang.in (gcjh): More parallel build fixes.
10604
10605 1999-06-03  Mike Stump  <mrs@wrs.com>
10606
10607         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10608
10609 1999-06-02  Anthony Green  <green@cygnus.com>
10610
10611         * except.c (link_handler): Chain exception handlers in order.
10612
10613 1999-06-02  Anthony Green  <green@cygnus.com>
10614
10615         * expr.c (expand_byte_code): Fill unreachable bytecode regions
10616         with nops and process as usual in order to always set correct EH
10617         ranges.  Emit detailed warnings about unreachable bytecodes.
10618
10619 1999-06-02  Anthony Green  <green@cygnus.com>
10620
10621         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10622         constant.
10623
10624 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10625
10626         * parse.y (lookup_field_wrapper): Unified returned value to NULL
10627           or the searched field decl.
10628
10629 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10630
10631         * parse.y (fold_constant_for_init): Convert numerical constant
10632         values to the type of the assigned field.
10633
10634 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10635
10636         * expr.c (lookup_field): Relaxed the test on class loading error
10637         detection.
10638         * parse.y (fold_constant_for_init): Enabeled old code.
10639
10640 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10641
10642         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10643         decide the validity of the cast of a java.lang.Cloneable reference
10644         to an array.
10645         (patch_conditional_expr): Fixed first argument passed to
10646         binary_numeric_promotion.
10647
10648 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10649
10650         * parse.y (qualify_ambiguous_name): Take into account that a
10651         CONVERT_EXPR might specify a type as a WFL.
10652
10653 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10654
10655         * parse.y (patch_assignment): Save the rhs before using it as an
10656         argument to _Jv_CheckArrayStore.
10657
10658 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10659
10660         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10661
10662 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10663
10664         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10665         floating point literal only when the exponent indicator has been
10666         parsed.
10667
10668 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10669
10670         * parse.y (formal_parameter:): Construct argument tree list
10671         element even if a yet unsupported final parameter was encountered.
10672
10673 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10674
10675         * parse.y (finish_method_declaration): Issue errors for native or
10676         abstract methods declared with a method body, as well as for non
10677         native or non abstract methods with no method body.
10678
10679 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10680
10681         * class.c (build_utf8_ref): Initialize variable `field'.
10682
10683         * decl.c (init_decl_processing): Initialize variable `field'.
10684
10685         * expr.c (build_known_method_ref): Mark parameters `method_type',
10686         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10687         (process_jvm_instruction): Likewise for parameter `length'.
10688
10689         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10690         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10691         ATTRIBUTE_UNUSED.
10692
10693         * parse.y (maybe_generate_clinit): Remove unused variable
10694         `has_non_primitive_fields'.
10695         (find_in_imports_on_demand): Initialize variables `node_to_use'
10696         and `cl'.
10697         (patch_binop): Likewise for variable `prom_type'.
10698         (patch_unaryop): Likewise for variable `prom_type'.
10699
10700         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10701
10702         * xref.c (xref_table): Add missing initializer.
10703
10704 1999-05-14  Tom Tromey  <tromey@cygnus.com>
10705
10706         * java-except.h (struct eh_range): Removed unused `next' member.
10707         * verify.c (verify_jvm_instructions): Call check_nested_ranges
10708         after adding all exception handlers.  Sort exception ranges in
10709         order of start PC.
10710         (struct pc_index): New structure.
10711         (start_pc_cmp): New function.
10712         * except.c (add_handler): Return `void'.  Don't call link_handler;
10713         instead construct an ordinary linked list and do range
10714         coalescing.
10715         (check_nested_ranges): New function.
10716         (link_handler): Changed interface to allow merging of eh_ranges.
10717         Split overlapping ranges.  Return `void'.
10718
10719 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10720
10721         * parse.y (constructor_block_end:): New rule, tagged <node>.
10722         (constructor_body:): Use `constructor_block_end' instead of
10723         `block_end'.
10724
10725 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10726
10727         * parse.y (statement_nsi:): Pop `for' statement block.
10728         (java_complete_lhs): Labeled blocks containing no statement are
10729         marked as completing normally.
10730
10731 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10732
10733         * xref.c (xref_set_current_fp): New function, defined.
10734         * xref.h (xref_set_current_fp): New function, prototyped.
10735
10736 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10737
10738         * check-init.c (check_init): Take into account that
10739         LABELED_BLOCK_STMT can be empty.
10740
10741 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10742
10743         * parse.y (java_check_regular_methods): Warning check on not
10744         overriding methods with default access in other packages does not
10745         apply to `<clinit>'.
10746         (java_complete_lhs): If block body is an empty_stmt_node, replace
10747         it by NULL_TREE. This prevents gcc from generating an irrelevant
10748         warning.
10749
10750 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10751
10752         * check-init.c (check_init): Removed code accepting to see things
10753         falling through default:, when doing xrefs.
10754         * java-tree.h (do_not_fold): New global variable, declared.
10755         * parse.y (do_not_fold): New global variable, defined.
10756         (java_complete_expand_method): Set `do_not_fold' to the value of
10757         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10758         and reinstall them after them have been purged; do not check for
10759         initializations; do not issue missing return errors.
10760         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10761         when doing xrefs.
10762         (patch_binop): Skip the fold part when doing xrefs.
10763         (build_string_concatenation): Skip the concatenation part when
10764         doing xrefs.
10765         (patch_synchronized_statement): Do not generate a try-finally when
10766         doing xrefs.
10767         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
10768         and keep the location where the throw was seen.
10769         * typeck.c (convert): When `do_not_fold' is set, do not attempt
10770         any treatment on the converted node an simply return a NOP_EXPR of
10771         the targeted type.
10772         * xref.c (xref_get_data): New function, defined.
10773         * xref.h (xref_get_data): New function, declared.
10774         (XREF_GET_DATA): Use xref_get_data.
10775
10776 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10777
10778         * gjavah.c (print_include): Cast the result of `strlen' to int
10779         when comparing against a signed value.
10780         (add_namelet): Likewise.
10781
10782 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10783
10784         * expr.c (expand_invoke): Mark parameter `nargs' with
10785         ATTRIBUTE_UNUSED.
10786         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
10787
10788         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
10789         ATTRIBUTE_UNUSED.
10790
10791         * jcf-reader.c (get_attribute): Cast a value to long
10792         when comparing against a signed expression.  Likewise.
10793
10794         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
10795         HOST_BITS_PER_CHAR.
10796
10797 1999-05-11  Andrew Haley  <aph@cygnus.com>
10798
10799         * parse.y (source_end_java_method): If the current method contains
10800         any exception handlers, force asynchronous_exceptions: this is
10801         necessary because signal handlers in libjava may throw exceptions.
10802         * decl.c (end_java_method): Ditto.
10803
10804 1999-05-11  Tom Tromey  <tromey@cygnus.com>
10805
10806         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
10807         flags.
10808         * jvspec.c (THREAD_NAME): Removed.
10809         (GC_NAME): Likewise.
10810         (MATHLIB): Likewise.
10811         (WITHLIBC): Likewise.
10812         (GCLIB): Likewise.
10813         (THREADLIB): Likewise.
10814         (MATH_LIBRARY): Likewise.
10815         (lang_specific_driver): Don't add `-l' options to command line.
10816         Instead, add a single --specs option.  Recognize `-L' options and
10817         use them to search for spec file.
10818         (find_spec_file): New function.
10819         (SPEC_FILE): New define.
10820
10821 1999-05-11  Dave Brolley  <brolley@cygnus.com>
10822
10823         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
10824         cpplib-enabled build.
10825
10826 1999-05-05  Per Bothner  <bothner@cygnus.com>
10827
10828         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
10829         temporarily zero it while calling rest_of_decl_compilation.
10830
10831         * java-tree.h (string_ptr_type_node):  Add declaration.
10832         * decl.c:  Define and initialize string_ptr_type_node.
10833         * parse.y (patch_string_cst):  Use string_ptr_type_node.
10834
10835         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
10836         * parse.y (for_statement):  Now unconditionally exit_block.
10837         (finish_labeled_statement):  No longer exit_block if for-loop.
10838         (patch_loop_statement):  Check harder if the loop is already labeled.
10839
10840         * parse.y (patch_initialized_static_field):  Removed function.
10841         (maybe_generate_clinit):  Removed special handling for interfaces.
10842         (java_complete_expand_methods):  Do a preliminary java_complete_tree
10843         on <clinit> to determine if it can be removed.
10844         (java_complete_expand_method):  Remove special handling for <clinit>.
10845         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
10846         optimize if we get back empty_stmt_node.
10847         For MODIFY_EXPR, re-do checking of static initializers.
10848         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
10849         For VAR_DECL, pass correct context.
10850
10851         * verify.c (verify_jvm_instructions):  Better error messages.
10852
10853 1999-05-03  Tom Tromey  <tromey@cygnus.com>
10854
10855         * parse-scan.y (interface_declaration): Call
10856         report_class_declaration for interfaces.
10857
10858 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
10859
10860         * Makefile.in: Remove -v from bison command lines.
10861
10862 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10863
10864         * check-init.c (check_init): Exclude a case of error when doing
10865         xrefs.
10866         * class.c (layout_class_method): Don't generate the error message
10867         twice when compiling from source.
10868         * lang-options.h: Added `-Wredundant-modifers' and
10869         `-Wunusupported-jdk11' flags and help text.
10870         * lang.c (lang_decode_option): Added support for
10871         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
10872         flag_static_local_jdk11 and flag_redundant set accordingly.
10873         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
10874         * parse.h (EXPR_WFL_ADD_COL): New macro.
10875         (DECL_END_SOURCE_LINE): Likewise.
10876         (DECL_INHERITED_SOURCE_LINE): Likewise.
10877         * parse.y (static_ref_err): New function, prototyped.
10878         (CCB_TK): Now tagged <operator>.
10879         (class_body:): Remember the location of the closing '}' of a class
10880         definition when doing xrefs.
10881         (block:): Likewise.
10882         (block_end:): Likewise.
10883         (create_class): Remember the location of the inherited class
10884         identifier when doing xrefs.
10885         (register_fields): Added test on first operand of `init' before
10886         testing it TREE_CODE.
10887         (method_header): Store the location of the class identifier in the
10888         class decl when doing xrefs.
10889         (finish_method_declaration): Don't combine first/last method line
10890         when doing xref.
10891         (java_check_regular_methods): Warning check on not overriding
10892         methods with default access on other packages move before check on
10893         static methods. Initialization of `aflags' also moved up.
10894         (resolve_expression_name): Call static_ref_err to report the error.
10895         (static_ref_err): New function, implemented.
10896         (resolve_field_access): Returned simplified static field access
10897         when doing xrefs.
10898         (resolve_qualified_expression_name): Check for illegal use of
10899         static fields in a non static context. Call static_ref_err to
10900         report error in various places.
10901         (java_complete_tree): Do not fold initialized static fields when
10902         doing xrefs.
10903         (java_complete_lhs): Likewise.
10904
10905 1999-04-29  Anthony Green  <green@cygnus.com>
10906
10907         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
10908         create internal labels.
10909         (lookup_label): Ditto.
10910
10911 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10912
10913         * class.c (layout_class_method): Generate <clinit>'s rtl for
10914         interfaces.
10915         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10916         for interfaces' <clinit>.
10917         * expr.c (lookup_field): Search for fields in interfaces.
10918         (expand_invoke): Fixed indentation.
10919         (expand_java_field_op): Likewise. Use IS_CLINIT.
10920         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
10921         (IS_CLINIT): New macro.
10922         * parse.y (type_declaration:): Call maybe_generate_clinit after an
10923         interface was parsed.
10924         (maybe_generate_clinit): Don't generate if the current class is an
10925         interface with only fields of primitive types.
10926         (reset_method_name): Use IS_CLINIT.
10927         (java_complete_expand_method): Expand <clinit> when it exists for
10928         interfaces. Use IS_CLINIT.
10929         (resolve_expression_name): Use DECL_CONTEXT instead of
10930         current_class to build static field references.
10931         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
10932         ARRAY_REF when doing xreferencing.
10933         (check_final_assignment): Fixed typo in leading comment. Use
10934         IS_CLINIT.
10935         (patch_array_ref): Don't fully expand array references when
10936         xreferencing.
10937         (patch_return): Use IS_CLINIT.
10938         (patch_throw_statement): Likewise.
10939
10940 1999-04-22  Tom Tromey  <tromey@cygnus.com>
10941
10942         * Make-lang.in (JAVA_SRCS): Added check-init.c.
10943
10944 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10945
10946         * decl.c (predef_filenames, predef_filenames_size): New globals
10947         (init_decl_processing): predef_filenames and predef_filenames_size
10948         initialized.
10949         * java-tree.h (predef_filenames, predef_filenames_size): Declared
10950         extern.
10951         * jcf-parse.c (predefined_filename_p): New function.
10952         (yyparse): Check that files on the command line are specified only
10953         once and issue a warning otherwise.
10954         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
10955         * parse.y (source_end_java_method): Nullify NOP method bodies, to
10956         avoid a gcc warning with -W -Wall turned on.
10957         (java_expand_classes): Abort if errors were encountered.
10958         (java_complete_lhs): If the cross reference flag is set, wrap
10959         field DECL node around a WFL when resolving expression name.
10960
10961 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10962
10963         * lang.c (lang_decode_option): Fixed returned value when parsing
10964         `-fxref=...' and `-Wall'.
10965         * parse.y (source_end_java_method): Do not generate code when
10966         flag_emit_xref is set.
10967         (resolve_expression_name): Do not build static field access when
10968         flag_emit_xref is set.
10969         (resolve_field_access): No special treatment on `length' when
10970         flag_emit_xref is set. Do not build qualified static field access
10971         when flag_emit_xref is set.
10972         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
10973         when flag_emit_xref is set.
10974         (patch_assignment): Do not generate array store runtime check when
10975         flag_emit_xref is set.
10976         * xref.c (xref_flag_value): Fixed function declaration
10977         indentation.
10978         (xset_set_data): New function.
10979         * xref.h (xref_set_data): Added prototype for new function.
10980         (typedef struct xref_flag_table): New field data.
10981         (XREF_GET_DATA): New macro.
10982
10983 1999-04-19  Tom Tromey  <tromey@cygnus.com>
10984
10985         * xref.h (enum): Removed trailing comma.
10986
10987         * parse.y (resolve_qualified_expression_name): Added missing
10988         `break'.
10989
10990 1999-04-15  Anthony Green  <green@cygnus.com>
10991
10992         * gjavah.c: New prototypes for java_float_finite and
10993         java_double_finite.
10994
10995 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10996
10997         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
10998         references.
10999
11000 1999-04-06  Jeffrey A Law  (law@cygnus.com)
11001
11002         * Makefile.in (TREE_H): Add tree-check.h.
11003         (RTL_H): Add genrtl.h.
11004
11005 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11006
11007         * parse.y (patch_assignment): Added ArrayStoreException runtime
11008         check.
11009
11010 1999-04-06  Per Bothner  <bothner@cygnus.com>
11011
11012         * expr.c (pop_type_0):  New function.
11013         (pop_type):  Use pop_type_0.
11014         * java-tree.h (pop_type_0):  New declaration.
11015         * verify.c (verify_jvm_instructions):  Check return instructions.
11016
11017         * parse.y (patch_binop):  Don't fold if non-constant and emiting
11018         class files.
11019
11020 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11021
11022         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
11023
11024         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
11025         (main_jcf): Don't define.
11026         (process_file): Don't set `main_jcf'.
11027
11028         * java-tree.h (main_jcf): Don't declare.
11029
11030         * jcf-parse.c (main_jcf): Add static definition.
11031
11032         * lang.c (main_jcf): Don't define.
11033
11034 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11035
11036         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
11037
11038         * decl.c (copy_lang_decl): Likewise for `bcopy'.
11039
11040         * jcf-depend.c: Include "config.h", not <config.h>.
11041
11042         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
11043         `bcopy' to PTR.
11044
11045         * jcf-path.c: Include "config.h", not <config.h>.
11046
11047         * lex.c: Don't include various system header files.
11048         (java_init_lex): Cast the argument of `bzero' to PTR
11049
11050         * parse-scan.y (java_push_parser_context): Likewise.
11051
11052         * parse.y (java_push_parser_context): Likewise.
11053         (patch_bc_statement): Match format specifier to variable argument.
11054
11055         * xref.c: Don't include <stdio.h>.
11056
11057 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11058
11059         * parse.y (struct parser_ctxt *ctxp): Now global.
11060         (declare_local_variables): Use WFL compound value for the
11061         declaration source line value, when doing cross-referencing.
11062
11063 1999-03-31  Tom Tromey  <tromey@cygnus.com>
11064
11065         * gjavah.c (print_field_info): Allow constants of other types.
11066         (print_include): Generate include when new name is proper prefix
11067         of already printed name.
11068         (add_namelet): Likewise.
11069         (cxx_keyword_subst): New function.
11070         (print_method_info): Use it.
11071         (print_field_name): New function.
11072         (get_field_name): New function.
11073         (print_field_info): Use get_field_name and print_field_name.
11074
11075 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11076
11077         * Makefile.in (keyword.h): Generate using gperf language 'C', not
11078         'KR-C', so gperf uses the `const' keyword on strings.
11079
11080         * keyword.gperf (java_keyword): Const-ify a char*.
11081
11082 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11083
11084         * parse.y (patch_bc_statement): Fixed identation and a bogus
11085         `printf' format.
11086
11087 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11088
11089         * parse.y (patch_assignment): Allow static variables in other
11090         classes to be assigned.
11091
11092 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11093
11094         * class.c (maybe_add_interface): Remove unused variable
11095         `interface_binfo'.
11096         (make_class_data): Use = for assignment, not ==.  Likewise.
11097         (emit_register_classes): Remove unused variable `decl'.
11098
11099         * lex.c: Fix comment so as not to contain an embedded `/*'.
11100
11101         * verify.c (verify_jvm_instructions): Remove unused variable
11102         `self_type'.
11103
11104 1999-03-27  Per Bothner  <bothner@cygnus.com>
11105
11106         * parse.y (complete_loop_body):  Rename to finish_loop_body.
11107         (complete_labeled_statement):  Rename to finish_labeled_statement.
11108         (complete_for_loop):  Rename to finish_for_loop.
11109         (complete_method_declaration):  Rename to finish_method_declaration.
11110
11111         * java-tree.h (continue_identifier_node):  New global node.
11112         * decl.c:  Define and initialize continue_identifier_node.
11113         * parse.y (generate_labeled_block):  Remove - no longer needed.
11114         (build_loop_body):  Use continue_identifier_node for continue block.
11115         (finish_labeled_statement):  Also do pop_labeled_block actions.
11116         (java_complete_lhs):  POP_LOOP even if error.
11117         (build_labeled_block):  Special handling for continue_identifier_node.
11118         (patch_loop_statement):  Re-organize.
11119         (patch_bc_statement):  Re-write.
11120
11121 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11122
11123         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11124         using a WFL compound value.
11125         * parse.y (xref.h): Include.
11126         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11127         WFL compound value.
11128         (register_fields): Set WFL compound value to lineno if doing
11129         xrefs.
11130         (java_complete_expand_method): Call expand_xref if flag_emit_xref
11131         is set.
11132         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11133         * xref.h (expand_xref): Prototype renamed from xref_generate.
11134
11135 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11136
11137         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11138         (GET_CURRENT_BLOCK): New macro.
11139         * parse.y (current_static_block): New global variable.
11140         (method_body:): Define action.
11141         (complete_method_declaration): Set current_function_decl to NULL
11142         when work on the current method is done.
11143         (declare_local_variables): Use GET_CURRENT_BLOCK.
11144         (java_method_add_stmt): Likewise.
11145         (java_complete_expand_method): Disable the use of `this' when
11146         expanding <clinit>.
11147         (enter_a_block): If no current method exist, use
11148         current_static_block to link static initializer blocks.
11149         (exit_block): Rewritten to use current_static_block when no current
11150         method decl exists.
11151         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11152         (patch_return): Forbid the use of `return' in static initializers.
11153         (patch_throw_statement): Fixed indentation. Issue specific error
11154         for uncaught thrown checked exception in static initializer
11155         blocks. Removed FIXME.
11156
11157 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
11158
11159         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11160         Link gcj from gcc.o.
11161
11162 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11163
11164         * parse.y (find_applicable_accessible_methods_list): When dealing
11165         with interface: ensure that a given interface or java.lang.Object
11166         are searched only once.
11167
11168 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11169
11170         * gjavah.c (print_c_decl): Remove unused argument `flags'.
11171
11172         * jcf-dump.c (print_access_flags): Add braces around if-else.
11173
11174         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11175         COMBINE_INPUTS.
11176
11177         * lex.c (build_wfl_node): Add static prototype.
11178
11179         * lex.h (build_wfl_node): Remove static prototype.
11180
11181         * parse.y: Include lex.c early enough to declare everything needed.
11182         Ensure calls to `build_wfl_node' pass the proper arguments.
11183         (create_class): Remove unused variable `super_decl'.
11184         (get_printable_method_name): Initialize variable `name'.
11185
11186 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11187
11188         * Changelog: Fixed 1999-03-22 typos.
11189         * lang.c (lang_decode_option): Fixed typo in error string in the
11190         XARG section.
11191
11192 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11193
11194         * Makefile.in (JAVA_OBJS): Added entry xref.o.
11195         (xref.o): New rule.
11196         * java-tree.h (flag_emit_xref): Declared extern.
11197         * lang.c (xref.h): Included.
11198         (flag_emit_xref): New global variable.
11199         (lang_decode_option): Added support for -fxref.
11200         * xref.c: Created.
11201         * xref.h: Likewise.
11202
11203 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
11204
11205         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11206         linked with.
11207
11208 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11209
11210         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11211         $(srcdir)/../system.h and $(JAVA_TREE_H).
11212         (jcf-io.o): Depend on $(JAVA_TREE_H).
11213         (mangle.o): Likewise.
11214
11215         * check-init.c (check_cond_init): Add static prototype.
11216
11217         * class.c (build_java_method_type, hashUtf8String,
11218         make_field_value, get_dispatch_vector, get_dispatch_table,
11219         append_gpp_mangled_type, mangle_static_field): Likewise.
11220         (strLengthUtf8): Hide unused definition.
11221         (hashUtf8String): Const-ify.
11222         (make_field_value): Un-ANSI-fy.
11223
11224         * constants.c: Move inclusion of jcf.h above java-tree.h.
11225         (set_constant_entry, find_class_or_string_constant,
11226         find_name_and_type_constant, get_tag_node,
11227         build_constant_data_ref): Add static prototype.
11228
11229         * decl.c (push_jvm_slot, builtin_function,
11230         lookup_name_current_level): Likewise.
11231         (builtin_function): Const-ify.
11232
11233         * except.c (expand_start_java_handler, expand_end_java_handler):
11234         Add static prototype.
11235
11236         * expr.c (flush_quick_stack, push_value, pop_value,
11237         java_stack_swap, java_stack_dup, build_java_athrow,
11238         build_java_jsr, build_java_ret, expand_java_multianewarray,
11239         expand_java_arraystore, expand_java_arrayload,
11240         expand_java_array_length, build_java_monitor, expand_java_pushc,
11241         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11242         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11243         expand_compare, expand_test, expand_cond, expand_java_goto,
11244         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11245         expand_java_field_op, java_push_constant_from_pool): Likewise.
11246
11247         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11248         (build_java_arraynull_check): Mark parameters `node' and `type'
11249         with ATTRIBUTE_UNUSED.
11250         (note_label): Likewise for parameter `current_pc'.
11251         (expand_java_call, expand_java_ret): Hide unused definition.
11252
11253         * java-tree.h (make_class, build_constants_constructor,
11254         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11255         init_outgoing_cpool, register_class, emit_register_classes,
11256         java_layout_seen_class_methods): Prototype.
11257         (unicode_mangling_length): Const-ify.
11258         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11259         emit_unicode_mangled_name, format_int, format_uint,
11260         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11261         jcf_print_utf8_replace, open_class): Prototype.
11262
11263         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
11264         <stdio.h>.  Include tree.h/java-tree.h.
11265         (utf8_equal_string usage, process_class): Add static prototype.
11266         (open_class): Don't prototype this here.
11267         (utf8_equal_string): Match arguments to format specifiers.
11268         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11269         TABLE_SWITCH, disassemble_method): Likewise.
11270
11271         * jcf-io.c: Include tree.h/java-tree.h.
11272         (open_class, find_classfile, jcf_print_utf8,
11273         jcf_print_utf8_replace): Const-ify.
11274
11275         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11276         parse_class_file): Add static prototype.
11277         (find_in_current_zip): Match definition to existing static
11278         prototype.
11279
11280         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11281         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11282         finish_jcf_block, define_jcf_label, get_jcf_label_here,
11283         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11284         write_chunks, adjust_typed_op, generate_bytecode_conditional,
11285         generate_bytecode_return, perform_relocations, init_jcf_state,
11286         init_jcf_method, release_jcf_state, generate_classfile):
11287         Add static prototype.
11288         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11289         (make_class_file_name): Const-ify.
11290
11291         * jcf.h (find_classfile): Const-ify.
11292
11293         * jv-scan.c (reset_report): Remove prototype.
11294
11295         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11296         (error): Rewrite to allow varargs.
11297
11298         * lang.c (lang_f_options): Const-ify.
11299
11300         * lex.c (java_parse_escape_sequence): Add static prototype.
11301         (java_allocate_new_line): Match definition to existing static
11302         prototype.
11303
11304         * mangle.c Include tree.h/java-tree.h.
11305         (unicode_mangling_length, emit_unicode_mangled_name,
11306         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11307
11308         * parse.h (jdep_code): Remove trailing comma in enumeration.
11309         (java_get_line_col): Move prototype outside of !JC1_LITE test.
11310         (reset_report): Add prototype.
11311
11312         * verify.c (push_pending_label, merge_types): Add static
11313         prototypes.
11314
11315         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11316
11317 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11318
11319         * parse.y (find_applicable_accessible_methods_list): Extend the
11320         search to superinterfaces when relevant.
11321         (search_applicable_methods_list): New function.
11322
11323 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11324
11325         * class.c (unmangle_classname): Implemented stricter testing
11326         before setting the QUALIFIED_P flag on an identifier.
11327
11328 1999-03-16  Per Bothner  <bothner@cygnus.com>
11329
11330         * parse.y (java_complete_lhs):  Call force_evaluation_order
11331         after patch_newarray.
11332         (patch_binop):  Don't call fold if there are side effects.
11333
11334 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11335
11336         * parse.y (java_stabilize_reference): Use save_expr instead of
11337         building a SAVE_EXPR node.
11338         (java_complete_lhs): Patch the resulting string of the `+='
11339         operator (if necessary) and complete the RHS after having built
11340         the cast.
11341
11342 1999-03-15  Per Bothner  <bothner@cygnus.com>
11343
11344         * class.c (make_class):  Don't set CLASS_P here (because
11345         this function is also called by build_java_array_type).
11346         (push_class):  Set CLASS_P here instead.
11347         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
11348
11349         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
11350         context.  If the context is class, perfer "super" over "synchronized".
11351         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
11352
11353         * parse.y (create_class):  Don't call parser_check_super here;
11354         it is not robust.  Always wait until later.
11355
11356         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
11357         match what JDK 1.2 does), but don't set ACC_PUBLIC.
11358
11359 1999-03-13  Per Bothner  <bothner@cygnus.com>
11360
11361         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
11362         * lex.h (UNGETC):  Change misleading macro.
11363
11364 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11365
11366         * parse.y (java_stabilize_reference): Return NODE when patching a
11367         COMPOUND_EXPR.
11368         (java_complete_lhs): Put parenthesis around truth values.
11369
11370 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11371
11372         * class.c (layout_class_method): Don't make rtl for interface
11373         methods.
11374         * parse.h (GET_TYPE_NAME): New macro.
11375         * parse.y (if_then_statement:): Fixed indentation.
11376         (if_then_else_statement:): Likewise.
11377         (for_statement:): Fixed spacing.
11378         (try_statement:): Fixed indentation.
11379         (create_interface): Don't force interfaces to be abstract.
11380         (method_header): Abstract methods are OK in interfaces.
11381         (declare_local_variables): Fixed typo in comment.
11382         (java_complete_expand_method): Fixed indentation.
11383         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11384         non accessible fields.
11385         (java_stabilize_reference): New function.
11386         (java_complete_lhs): Fixed indentation. Use
11387         java_stabilize_reference in compound assignment. Insert the
11388         cast. If not processing `+' fix string constants before processing
11389         binop.
11390
11391 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11392
11393         * constants.c (find_class_or_string_constant): Cast variable `j'
11394         to a `jword' when comparing against one.
11395
11396         * expr.c (java_lang_expand_expr): Remove unused variables
11397         `has_finally_p' and `op0'.
11398
11399         * gjavah.c (print_field_info): Cast a value to jint when comparing
11400         against one.  Likewise for a jlong.
11401         (add_namelet): Likewise cast a `sizeof' to an int when comparing
11402         against a signed quantity.
11403
11404         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11405         (print_signature): Don't needlessly dereference variable `str'
11406
11407         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11408         `max_locals' with ATTRIBUTE_UNUSED.
11409         (jcf_parse_class): Likewise for variable `index'.
11410
11411         * parse.h (reverse_jdep_list): Remove static prototype.
11412
11413         * parse.y (build_jump_to_finally): Remove prototype and definition.
11414         (reverse_jdep_list): Add static prototype.
11415
11416         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11417         `assignment' and `expr_decl'.
11418
11419         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11420
11421 1999-03-12  Andrew Haley  <aph@cygnus.com>
11422
11423         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11424         we'll need a directory separator and a null character.
11425
11426 1999-03-10  Per Bothner  <bothner@cygnus.com>
11427
11428         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
11429
11430   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11431
11432         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11433         interfaces.
11434
11435 1999-03-05  Per Bothner  <bothner@cygnus.com>
11436
11437         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
11438
11439         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
11440
11441         * class.c (layout_class_method):  A static method in a base class
11442         is never overridden, so treat it like it doesn't exist.
11443         However, do complain about private non-static method overriding
11444         public static method.
11445
11446         * parse.y:  Don't set unused INITIALIZED_P flag.
11447         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
11448
11449         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
11450         (build_array_from_name):  Re-order &index[string] to &string[index].
11451
11452         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
11453         error_mark (it might catch more errors, but it is more likely to lose).
11454
11455 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11456
11457         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11458         (parse-scan.o): Depend on toplev.h.
11459
11460         * class.c (make_method_value): Add prototype.  Make it static.
11461         Remove unused second argument, caller changed.
11462
11463         * expr.c (java_lang_expand_expr): Remove unused variable
11464         `return_label'.
11465
11466         * java-tree.h: Don't prototype find_in_current_zip.
11467         Add prototypes for verify_constant_pool, start_java_method,
11468         end_java_method, give_name_to_locals, expand_byte_code,
11469         open_in_zip, set_constant_value, find_constant1, find_constant2,
11470         find_utf8_constant, find_string_constant, find_class_constant,
11471         find_fieldref_index, find_methodref_index, write_constant_pool,
11472         count_constant_pool_bytes and encode_newarray_type.
11473
11474         * jcf-dump.c: Remove unused variable `LONG_temp'.
11475
11476         * jcf-parse.c: Include parse.h.
11477         (jcf_parse_source): Remove unused parameter, all callers changed.
11478         (jcf_figure_file_type): Add static prototype.
11479         (find_in_current_zip): Likewise.  Also remove unused parameter,
11480         all callers changed.
11481         (read_class): Initialize variable `saved_pos'.
11482
11483         * jcf-reader.c (jcf_parse_preamble): Mark variables
11484         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11485
11486         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11487         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11488         (java_parse_doc_section): Initialize variable `seen_star'.
11489         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11490         (java_lex_error): Mark parameters `msg' and `forward' with
11491         ATTRIBUTE_UNUSED.
11492         (java_get_line_col): Mark parameters `filename' and `line' with
11493         ATTRIBUTE_UNUSED.
11494
11495         * parse-scan.y: Include toplev.h.
11496         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11497
11498         * parse.h: use `struct JCF', not plain `JCF'.
11499         (java_parser_context_save_global, java_expand_classes
11500         java_parser_context_restore_global, java_parse): Add prototypes.
11501
11502         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11503         `node'.
11504
11505 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
11506
11507         *  check-init.c (check_init):  COPYN takes word count, not bit count.
11508
11509 1999-02-26  Per Bothner  <bothner@cygnus.com>
11510
11511         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
11512         explicit build_decl.  (Avoids crash in reload when optimizing.)
11513
11514 1999-02-25  Per Bothner  <bothner@cygnus.com>
11515
11516         * decl.c (complete_start_java_method):  Handle synchronized method
11517         even when compiling from bytecode.
11518
11519 1999-02-26  Tom Tromey  <tromey@cygnus.com>
11520
11521         * gjavah.c (add_class_decl): Only generate `#include' if outer
11522         class is not the name of the class we are processing.  Correctly
11523         append `.h' in #include.
11524         (process_file): Clean up newlines around generated `#include's.
11525         (decode_signature_piece): Correctly handle inner classes.
11526         (struct include): New structure.
11527         (all_includes): New global.
11528         (print_include): New function.
11529         (add_class_decl): Use it.
11530         (process_file): Likewise.
11531         (add_class_decl): Generate include for java-array.h if array
11532         seen.
11533         (process_file): Don't generate java-array.h include.
11534
11535         * gjavah.c (add_namelet): Check for standard package names here.
11536         (add_class_decl): Don't check for standard package names here.
11537
11538 1999-02-25  Tom Tromey  <tromey@cygnus.com>
11539
11540         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11541         When reading a zip file, only use strncmp if both strings are
11542         bigger than the buffer length.  Initialize `k' when looping
11543         through zip file.
11544
11545 1999-02-24  Tom Tromey  <tromey@cygnus.com>
11546
11547         * gjavah.c (struct namelet): New structure.
11548         (add_namelet): New function.
11549         (print_namelet): New function.
11550         (print_class_decls): Use add_namelet and print_namelet to generate
11551         namespaces and not classes.
11552         (method_printed): New global.
11553         (HANDLE_END_METHOD): Examine method_printed.
11554         (print_method_info): Set method_printed when required.  Print
11555         error if function to be ignored is marked virtual.  Handle $finit$
11556         method.
11557         (METHOD_IS_FINAL): New macro.
11558         (print_field_info): Use it.
11559         (HANDLE_METHOD): Clear method_printed.
11560         (method_pass): New global.
11561         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11562         (process_file): Do two passes over both fields and methods.
11563         (HANDLE_METHOD): Examine method_pass.
11564         (root): New global.
11565         (add_class_decl): New function.
11566         (print_class_decls): Don't scan over entire constant pool.
11567
11568 1999-02-23  Tom Tromey  <tromey@cygnus.com>
11569
11570         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11571         disable linking in that case.
11572
11573 1999-02-20  Tom Tromey  <tromey@cygnus.com>
11574
11575         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11576         not 0x1f.
11577
11578 1999-02-21  Per Bothner  <bothner@cygnus.com>
11579
11580         * decl.c (build_result_decl), java-tree.h:  New method.
11581         (complete_start_java_method):  Handle synchronized methods.
11582         Don't build DECL_RESULT here.  (Ordering dependency problem.)
11583         (start_java_method):  Call build_result_decl here instead  ...
11584         * parse.y (java_complete_expand_method):  ... and here.
11585         (expand_start_java_method): Don't call complete_start_java_method here.
11586         (java_complete_expand_method):  Call it here instead.
11587         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
11588         * java-tree.h:  ... here.
11589
11590         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
11591         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
11592         for ARRAY_REF - it doesn't work when array bounds are checked.
11593         (patch_array_ref):  Handle it here instead.
11594
11595         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
11596
11597 1999-02-19  Per Bothner  <bothner@cygnus.com>
11598
11599         Force left-to-right evaluation of binary operations etc.
11600         * expr.c (force_evaluation_order), java-tree.h:  New function.
11601         * parse.y (java_complete_lhs):  Pass binary operations, procedure
11602         calls, and ARRAY_REFs to force_evaluation_order.
11603         (various):  Set TREE_SIDE_EFFECTS more carefully.
11604
11605         Tolerate random (non-UTF8) encoding in comments without complaining.
11606         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
11607         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
11608
11609         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
11610         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
11611
11612         * parse.y (java_complete_lhs):  Ignore an empty statement in a
11613         COMPOUND_EXPR.  Don't complain about empty statement after return.
11614
11615 1999-02-19  Per Bothner  <bothner@cygnus.com>
11616
11617         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
11618         in TREE_LIST - just chain the POINTER_TYPEs together.
11619         (resolve_class):  If type already resolved, return decl.
11620         After resolving, update TREE_TYPE(class_type), and name (if array).
11621         * parse.h (do_resolve_class), parse.y:  Make non-static.
11622         * class.c (maybe_layout_super_class):  Take this_class argument.
11623         Do do_resolve_class if necessary.
11624         (layout_class, layout_class_methods): Adjust calls appropriately.
11625         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11626         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
11627         * typeck.c (build_java_array_type):  Don't call layout_class.
11628
11629 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11630
11631         * parse.y (check_pkg_class_access): Allow private class access
11632         within the same package.
11633         (strip_out_static_field_access_decl): New function.
11634         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11635         operator argument before testing its nature.
11636
11637 1999-02-03  Per Bothner  <bothner@cygnus.com>
11638
11639         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
11640         (TRY_EXPR):  Simplify - it no longer has a finally clause.
11641         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
11642         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11643         * expr.c (java_lang_expand_expr):  Likewise.
11644         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
11645         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
11646         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
11647         (build_try_statement):  Remove finally parameter and handling.
11648         (build_try_finally_statement):  New function.
11649         (patch_try_statement):   No longer need to support finally clause.
11650         (try_statement):  Update grammar action rules.
11651         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
11652         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11653
11654 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
11655
11656         * jcf-parse.c (get_constant): Add braces around computation of 'd'
11657         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
11658
11659 1999-02-17  Andrew Haley  <aph@cygnus.com>
11660
11661         * class.c (build_utf8_ref): Back out broken patch which was
11662         intended to to output signatures using '.' as a separator.
11663
11664         * class.c (make_class_data): Output signatures using '.' as a
11665         separator, rather than '/'.
11666         (mangled_classname): Likewise.
11667         (make_field_value): Likewise.
11668         (make_method_value): Likewise.
11669         * constants.c (alloc_class_constant): Likewise.
11670         * expr.c (build_invokeinterface): Likewise.
11671
11672 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11673
11674         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11675         of an ancient workaround.
11676
11677 1999-02-10  Jeffrey A Law  (law@cygnus.com)
11678
11679         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
11680         here anymore.
11681
11682 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11683
11684         * lex.c (yylex): Encode \0 as UTF8.
11685
11686 1999-02-10  Tom Tromey  <tromey@cygnus.com>
11687
11688         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11689         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11690         (libgcj_zip): Renamed.
11691         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11692         LIBJAVA_ZIP_FILE.
11693         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11694
11695         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11696         (GC_NAME): Renamed -lgc to -lgcjgc.
11697
11698 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11699
11700         * lex.c (java_lang_cloneable): Initialize.
11701         * parse.y (java_lang_cloneable): New static variable.
11702         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11703         doing one more qualification round.
11704         (valid_ref_assignconv_cast_p): Reject null source or
11705         destination. Allow an array to be cast into java.lang.Cloneable.
11706         (patch_cast): Swapped two first arguments to first call to
11707         valid_ref_assignconv_cast_p.
11708
11709 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11710
11711         * parse.h: DECL_P renamed JDECL_P.
11712         * parse.y: DECL_P replaced by JDECL_P.
11713         (build_array_from_name): Always use pointer's type.
11714         (patch_bc_statement): Extra code to search continue target in a
11715         for loop. Fixed comments. Continue target is current loop when
11716         unlabeled.
11717
11718 1999-02-05  Andrew Haley  <aph@cygnus.com>
11719
11720         * class.c (make_class_data): The superclass of an interface should
11721         be null, not class Object.
11722
11723         * lex.c (java_lex): Sign extend hex literals.
11724
11725 1999-02-04  Andrew Haley  <aph@cygnus.com>
11726
11727         * class.c (build_utf8_ref): Output signatures using '.' as a
11728         separator, rather than '/'.
11729         (make_class_data): Likewise.
11730
11731 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
11732
11733         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11734         mkstemp.o.  Get them from libiberty now.
11735
11736 1999-02-02  Jeffrey A Law  (law@cygnus.com)
11737
11738         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11739
11740 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11741
11742         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11743         from libiberty.h
11744
11745 1999-02-02  Per Bothner  <bothner@cygnus.com>
11746
11747         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11748         * jcf-write.c (generate_bytecode_return):  New function.
11749         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
11750
11751         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
11752         generate special [fd]const_[01] instructions.
11753
11754         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
11755
11756         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
11757         handling OPCODE_lookupswitch or OPCODE_tableswitch.
11758
11759 1999-02-01  Per Bothner  <bothner@cygnus.com>
11760
11761         * parse.y (patch_method_invocation):  Handle calling static methods,
11762         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11763
11764         * parse.y (java_complete_lhs):  Don't complain about unreachable
11765         exit condition in a do-while statement.
11766
11767 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11768
11769         * lex.c (java_read_char): Fixed utf8 decoding.
11770         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
11771         range.
11772         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
11773         comments. Local variable `all_primitive' is gone. Broadened
11774         acceptance of `0' to floating point targets. `long' can now be
11775         widened to `double' or `float'.
11776         (valid_method_invocation_conversion_p): Added leading
11777         comment. Fixed tabulation.
11778         (build_string_concatenation): Optimize out left or right empty
11779         string constants.
11780
11781 1999-01-28  Per Bothner  <bothner@cygnus.com>
11782
11783         * jcf-write.c (localvar_alloc):  Only emit entry for
11784         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
11785         (generate_bytecode_insns):  Only call put_linenumber if
11786         debug_info_level > DINFO_LEVEL_NONE.
11787         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
11788         is specified, add -g1 (for compatibility wih javac).
11789
11790 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
11791
11792         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
11793         gjavah.o, check-init.o, jv-scan.o
11794
11795 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11796
11797         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
11798
11799         * gjavah.c: Include config.h and system.h.
11800
11801         * javaop.h (inline): Don't define, its handled by system.h.
11802         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
11803         from `inline' to `static inline'.
11804
11805         * jcf.h (inline): Don't define, its handled by system.h.
11806
11807         * lex.c (inline): Likewise.
11808
11809 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
11810
11811         * lang-specs.h: Map -Qn to -fno-ident.
11812
11813 1999-01-29  Richard Henderson  <rth@cygnus.com>
11814
11815         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
11816
11817 1999-01-29  Tom Tromey  <tromey@cygnus.com>
11818
11819         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
11820         then cast it to Object before calling `append' method.
11821
11822 1999-01-28  Per Bothner  <bothner@cygnus.com>
11823
11824         * check-init.c (check_bool2_init, check_bool_init, check_init):
11825         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
11826         * jcf-write.c (generate_bytecode_insns):  Likewise.
11827
11828 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11829
11830         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
11831         * parse.y (patch_cast): Allow a boolean to be cast into a
11832         boolean.
11833
11834 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11835
11836         * parse.y: (class_declaration:): Fixed indentation.
11837         (class_member_declaration:): Extra `;' after field declaration now
11838         accepted.
11839         (interface_declaration:): Removed debug messages in error reports.
11840         (patch_binop): Nodes created and returned inherit the orignal
11841         node's COMPOUND_ASSIGN_P flag value.
11842         (patch_cast): Fix cast from char to floating point.
11843
11844 1999-01-25  Andrew Haley  <aph@cygnus.com>
11845
11846         * except.c, java-except.h (expand_resume_after_catch): new
11847         function.
11848         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
11849         to branch back to main flow of control after a catch block.
11850
11851 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11852
11853         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
11854         $(srcdir)/../system.h.
11855         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
11856         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
11857         (jcf-write.o): Likewise.
11858         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11859         (mangle.o): Depend on $(srcdir)/../toplev.h.
11860         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11861         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11862
11863         * class.c: Include output.h and parse.h.
11864         (mangled_classname): Add the `const' keyword to a char*.
11865         (find_named_method): Hide unused function definition.
11866         (build_utf8_ref): Change type of variable `c' to unsigned char.
11867         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
11868         (build_class_ref): Add the `const' keyword to a char*.
11869         (layout_class_method): Remove unused variable `buf'.
11870
11871         * decl.c (find_local_variable): Remove unused variable `rtl'.
11872         (pushdecl): Likewise for variables `different_binding_level' and
11873         `oldglobal'.
11874         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
11875         (maybe_build_cleanup): Likewise for parameter `decl'.
11876
11877         * except.c (expand_start_java_handler): Mark parameter `range'
11878         with ATTRIBUTE_UNUSED.
11879
11880         * expr.c: Include except.h.
11881         (pop_type): Remove unused variable `i'.
11882         (pop_value): Likewise for variables `n_words' and `i'.
11883         (expand_java_arrayload): Likewise for variable `convert'.
11884         (java_lang_expand_expr): Likewise for variables `op0', `type',
11885         `mode', `unsignedp', `node' and `elements'.
11886         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
11887         `eh_ranges'.
11888         (process_jvm_instruction): Add a `const' qualifier to a char*.
11889
11890         * gjavah.c (output_directory): Add the `const' keyword to a char*.
11891         (temp_directory): Likewise.
11892         (print_c_decl): Likewise.
11893         (print_method_info): Likewise.
11894         (decode_signature_piece): Likewise.
11895         (print_mangled_classname): Likewise.
11896
11897         * java-except.h: Provide prototypes for maybe_start_try,
11898         maybe_end_try and add_handler.
11899
11900         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
11901         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
11902         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
11903         init_expr_processing, push_super_field, init_class_processing,
11904         can_widen_reference_to, class_depth, verify_jvm_instructions,
11905         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
11906         set_local_type, merge_type_state, push_type, load_type_state,
11907         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
11908         emit_unicode_mangled_name): Add prototypes.
11909
11910         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
11911         (print_signature_type): Use ISDIGIT, not isdigit.
11912         (print_signature): Remove unused variable `j'.
11913
11914         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
11915         int when comparing against one.
11916
11917         * jcf-parse.c: Include toplev.h.
11918
11919         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
11920         (localvar_free): Remove unused variable `i'.
11921         (generate_bytecode_conditional): Likewise for variable `kind'.
11922
11923         * jv-scan.c: Include config.h and system.h.  Remove redundant
11924         OS header and gansidecl.h includes.
11925         (warning): Add the `const' keyword to a char*.  Also add
11926         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
11927         __STDC__, when determining whether to use ANSI-isms.
11928         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
11929         (xmalloc): Don't redundantly prototype here.
11930         (main): Remove unused parameter `envp'.  Also fix the arguments
11931         passed to function `fatal' to match the format specifier.
11932
11933         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
11934
11935         * mangle.c: Include toplev.h.
11936         (emit_unicode_mangled_name): Declare parameter `len'.
11937
11938         * parse.y (parse_warning_context): Add the `const' keyword to a
11939         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
11940         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
11941         (issue_warning_error_from_context): Add the `const' keyword to
11942         a char*.
11943         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
11944         not `__STDC__' for whether to use ANSI-isms.
11945
11946         * typeck.c (incomplete_type_error): Mark parameters `value' and
11947         `type' with ATTRIBUTE_UNUSED.
11948         (parse_signature_type): Use ISDIGIT, not isdigit.
11949
11950         * verify.c (check_pending_block): Add the `const' keyword to a char*.
11951         (verify_jvm_instructions): Likewise.  Remove unused variables
11952         `field_name' and `default_val'.
11953
11954         * zextract.c: Include config.h and system.h.  Remove redundant
11955         OS header includes.
11956
11957         * zipfile.h: Prototype `read_zip_archive'.
11958
11959 1999-01-21  Andrew Haley  <aph@cygnus.com>
11960
11961         * typeck.c (convert): Allow conversions to void type: some
11962         optimizations in gcc do this.
11963
11964 1999-01-21  Andrew Haley  <aph@cygnus.com>
11965
11966         * typeck.c (convert_ieee_real_to_integer): New function.
11967         (convert): When not using fast-math and using hardware fp, convert
11968         an IEEE NaN to zero.
11969
11970 1999-01-18  Andrew Haley  <aph@cygnus.com>
11971
11972         * parse.y (patch_binop): Do a type conversion from signed to
11973         unsigned and then back to signed when a ">>>" is found.
11974
11975 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11976
11977         * java-tree.h: (check_for_initialization): Added prototype.
11978         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
11979         * parse.y (do_resolve_class): Removed unused locals.
11980         (read_import_dir): Likewise.
11981         (resolve_qualified_expression_name): Array creation
11982         expressions are valid primary expressions.
11983         (qualify_ambiguous_name): Likewise.
11984         (patch_synchronized_statement): Removed unused local.
11985
11986 1999-01-17  Jeffrey A Law  (law@cygnus.com)
11987
11988         * Makefile.in (zextract.o): Add dependencies.
11989
11990         * Makefile.in: Do not put ^Ls at the start of a line.
11991
11992 1999-01-15  Per Bothner  <bothner@cygnus.com>
11993
11994         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
11995         sub-type the result of the call that gets the exception value.
11996
11997         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
11998         don't call finish_class.
11999
12000         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
12001         clear found before continuing.
12002
12003         * verify.c (verify_jvm_instructions):  On an array load, allow
12004         and handle top of stack to be TYPE_NULL.
12005
12006         * gjavah.c (generate_access):  Translate Java package private or
12007         protected access to C++ public, but with a comment.
12008
12009 1999-01-13  Andrew Haley  <aph@cygnus.com>
12010
12011         * expr.c (generate_name): Name prefix changed to avoid clashes
12012         with assembler temp labels.
12013
12014         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
12015         MODIFY_EXPR.  Without this, code for the assignment may not be
12016         generated at all and the synchronized statement will read an
12017         uninitialized variable.
12018
12019 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12020
12021         * class.c (maybe_layout_super_class): Fixed returned value.
12022         * lex.c: Added 1999 to the copyright.
12023         (java_init_lex): Initialize java_lang_imported.
12024         * lex.h: Added 1999 to the copyright.
12025         * parse.h: Added 1999 to the copyright.
12026         (REGISTER_IMPORT): Fixed typo in trailing macro.
12027         (CURRENT_OSB): New macro.
12028         (struct parser_ctxt): New fields osb_depth, osb_limit.
12029         * parse.y (java_lang_id): New global variable.
12030         (type_import_on_demand_declaration): Don't import java.lang.* twice.
12031         (array_creation_expression:): Use CURRENT_OSB.
12032         (dims:): Uses a stack to keep track of array dimensions.
12033         (cast_expression:): Use CURRENT_OSB.
12034         (find_expr_with_wfl): Return NULL if node found doesn't meet the
12035         conditions.
12036         (register_fields): Fixed typos in comment.
12037         (check_method_redefinition): Fixed comment indentation.
12038         (java_check_regular_methods): Set saved found wfl to NULL after
12039         having reinstalled it in the previously found DECL_NAME.
12040
12041 1999-01-10  Richard Henderson  <rth@cygnus.com>
12042
12043         * gjavah.c (java_float_finite): Use a union to do type punning.
12044         (java_double_finite): Likewise.
12045
12046 1999-01-09  Per Bothner  <bothner@cygnus.com>
12047
12048         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
12049         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
12050         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
12051         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
12052         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
12053         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
12054
12055 1999-01-08  Per Bothner  <bothner@cygnus.com>
12056
12057         * check-init.c (check_init):  If compiling to native, we don't
12058         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
12059
12060 1999-01-08  Tom Tromey  <tromey@cygnus.com>
12061
12062         * parse-scan.y (variable_declarator_id): Set or increment
12063         bracket_count.
12064         (bracket_count): New global.
12065         (formal_parameter): Handle case where bracket pairs trail variable
12066         declarator id.
12067
12068 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
12069
12070         * jcf-parse.c (yyparse): variable len changed from a char to an
12071         int to prevent overflow.
12072
12073 1999-01-06  Per Bothner  <bothner@cygnus.com>
12074
12075         * java-tree.h:  Declare read_class.
12076         * jcf-parse.c (read_class):  New function.
12077         (load_class):  Now just call read_class.
12078
12079         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
12080         * jcf-parse.c (parse_source_file):  Declare save_error_count,
12081         which is needed by java_parse_abort_on_error macro,
12082         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
12083
12084         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
12085         constructor, if initializing a static field.
12086         (patch_new_array_init):  Set TREE_CONSTANT if it is.
12087         * expr.c (java_lang_expand_expr):  For a static array constructor
12088         of primitive elements, allocate the array itself statically.
12089         Disabled until we can set the vtable field statically.
12090
12091         * check-init.c:  New file.  Checks for definite assignment.
12092         * Makefile.in (JAVA_OBJS):  Add check-init.o.
12093         * parse.y (java_complete_expand_method): Call check_for_initialization.
12094         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
12095
12096 1999-01-06  Graham <grahams@rcp.co.uk>
12097
12098         * parse.y : include system.h instead of including
12099         standard headers directly with the exception of <dirent.h>.
12100
12101 1999-01-06  Per Bothner  <bothner@cygnus.com>
12102
12103         * lex.h:  Moved static function declarations to lex.c,
12104         to shut up some -Wall warnings.
12105         * lex.c:  Static function declarations moved here.
12106         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
12107
12108 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12109
12110         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12111
12112 1998-12-22  Per Bothner  <bothner@cygnus.com>
12113
12114         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
12115         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
12116
12117         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
12118         (localvar_alloc):  Change return type to void,
12119         (emit_unop):  Remove unused variable size.
12120
12121         * jcf-write.c (struct jcf_block):  Add new union.
12122         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
12123         (call_cleanups):  New functions.
12124         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
12125         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
12126         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12127         * lang.c (lang_init):  Call using_eh_for_cleanups.
12128         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
12129         completing operands to patch_synchronized_statement.
12130         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12131         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12132         WITH_CLEANUP_EXPR instead of TRY_EXPR.
12133
12134 1998-12-20  John F. Carr  <jfc@mit.edu>
12135
12136         * Make-lang.in: Comment out control-Ls; they upset some makes.
12137
12138 1998-12-18  Tom Tromey  <tromey@cygnus.com>
12139
12140         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12141         consistently.
12142
12143 1998-12-17  Tom Tromey  <tromey@cygnus.com>
12144
12145         * parse.y (DIR_SEPARATOR): New define.
12146         (check_class_interface_creation): Use it.
12147
12148         * parse-scan.y (report_main_declaration): Recognize
12149         `java.lang.String' in argument to main.
12150
12151 1998-12-16  Per Bothner  <bothner@cygnus.com>
12152
12153         * parse.y (create_interface):  Remove bogus test.
12154
12155 1998-12-16  Per Bothner  <bothner@cygnus.com>
12156
12157         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
12158         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
12159
12160 1998-12-16  Tom Tromey  <tromey@cygnus.com>
12161
12162         * parse-scan.y (qualified_name): Use correct sprintf format.
12163
12164 1998-12-15  Tom Tromey  <tromey@cygnus.com>
12165
12166         * gjavah.c (print_field_info): Changed how most negative number is
12167         printed.
12168
12169 1998-12-14  Per Bothner  <bothner@cygnus.com>
12170
12171         * parse.y (fold_constant_for_init):  New function.
12172         (resolve_expression_name):  Don't replace static final
12173         constant-initialized fields by its value.
12174         (java_complete_lhs):  New.  Same as java_complete_tree, except does
12175         not replace static final constant-initialized fields by their values.
12176         (register_fields):  If there is an initializer, set DECL_INITIAL and
12177         MODIFY_EXPR_FROM_INITIALIZATION_P.
12178         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
12179         Only call patch_initialized_static_field if
12180         MODIFY_EXPR_FROM_INITIALIZATION_P.
12181         (patch_initialized_static_field):  If not valid constant, clear
12182         DECL_INITIAL.
12183
12184         * parse.y (lookup_field_wrapper):  Fix thinko.
12185
12186         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
12187         set and restore global lineno.
12188
12189 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12190
12191         * gjavah.c (print_field_info): If value to print is the smallest
12192         value of its size, then print as hex to avoid later warnings from
12193         C++ compiler.
12194
12195 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12196
12197         * gjavah.c (decompile_method): Decompile `return null'.
12198         (process_file): Generate `#pragma interface'.
12199         (method_declared): New global.
12200         (print_method_info): Set it.
12201         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12202         (print_method_info): Handle abstract methods.
12203
12204 1998-12-13  Per Bothner  <bothner@cygnus.com>
12205
12206         * parse.y (patch_method_invocation):  If class_decl is null
12207         (e.g. an array type), use original type.
12208
12209         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
12210         errors about uncaught exception from clone (of array, specifically).
12211
12212 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12213
12214         * gjavah.c (decompile_method): Handle all types of `return'
12215         opcode.  Decompile `return this' and `return'.
12216         (method_access): New global.
12217         (print_method_info): Set it.
12218         (decompile_method): Don't decompile a synchronized method.
12219
12220 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12221
12222         * jcf-reader.c (jcf_parse_one_method): Recognize
12223         HANDLE_END_METHOD.
12224         * gjavah.c (HANDLE_END_METHOD): New macro.
12225         (HANDLE_CODE_ATTRIBUTE): New macro.
12226         (decompile_method): New function.
12227         (print_method_info): Don't print `;\n' at end of function decl.
12228         Include java-opcodes.h.
12229         (decompiled): New global.
12230
12231 1998-12-12  Per Bothner  <bothner@cygnus.com>
12232
12233         * class.c (build_class_ref):  Handle PRIMTYPE.class if
12234         flag_emit_class_files.
12235         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
12236         if flag_emit_class_files.
12237         * parse.y (java_complete_tree):  Pre-liminary support for
12238         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12239
12240         * parse.y (patch_synchronized_statement):   Don't call monitorexit
12241         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
12242
12243         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
12244
12245         * zipfile.h (opendir_in_zip):  New declaration.
12246         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
12247         (opendir_in_zip):  New function, using code from open_in_zip.
12248         (open_in_zip):  Call opendir_in_zip.
12249         (find_class):  Remove no-longer-used do_class_file parameter,
12250         but add source_ok parameter.  Change logic so if we find a .java file,
12251         we don't look for .class in later classpath emtries.
12252         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
12253         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
12254         * gjavah.c: Update call to find_class.
12255         * jcf-dump.c:  Likewise.
12256
12257         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
12258         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
12259         nothing if body is empty_stmt_node.
12260         Various little fixes so SP gets correctly adjusted.
12261         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12262         For CALL_EXPR, test if static first.
12263         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
12264         such as the ones we create for Object and Class.
12265         Set and restore current_function_decl.
12266         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12267         (note_possible_classname):  New function.
12268         (read_import_entry):  Removed.  Merged with read_import_dir.
12269         (read_import_dir):  Don't call find_class - that only gives us
12270         the first classpath entry having the needed package.
12271         Use the struct buffer data structure from buffer.h.
12272         (read_import_dir, find_in_imports_on_demand):  The remembered
12273         class names now use '.' (not '/') as package separator.
12274
12275         * parse.y (java_complete_expand_methods):  Call write_classfile
12276         here, and not in java_expand_classes (which only gets first class).
12277
12278 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12279
12280         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
12281         (register_fields):  If a static fields has an initializer, just
12282         chain it on ctxp->static_initialized, and handle later.
12283         (java_complete_expand_methods):  Force <clinit> first.
12284         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
12285         - it's already been completed.
12286         (patch_initialized_static_field):  New function.
12287         (java_complete_field):  Call it.
12288
12289 1998-12-12  Per Bothner  <bothner@cygnus.com>
12290
12291         * expr.c (encode_newarray_type, build_new_array):  New functions.
12292         * java-tree.h:  Declare build_new_array.
12293         * jcf-write.c (patch_newarray):  Use build_new_array.
12294
12295         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
12296         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
12297
12298         * parse.y (patch_new_array_init):  Re-organize.
12299         Now is passed the actual array (pointer) type of the value.
12300         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12301         (patch_array_constructor):  Removed - merged into patch_new_array_init.
12302         (java_complete_tree):  Update patch_new_array_init.
12303
12304         * jcf-write.c (find_constant_index):  New function.
12305         (generate_bytecode_insns):  Use find_constant_index.
12306         (generate_classfile):  Use find_constant_index for ConstantValue.
12307
12308 1998-12-11  Tom Tromey  <tromey@cygnus.com>
12309
12310         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12311         * decl.c (init_decl_processing): Renamed dtable -> vtable.
12312         * class.c (make_class_data): Renamed dtable -> vtable, and
12313         dtable_method_count -> vtable_method_count.
12314
12315 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12316
12317         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12318         global variables, initialized.
12319         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12320         Declared new global variables.
12321         * lex.c (java_lex): Return long_zero_node, float_zero_node,
12322         double_zero_node, integer_zero_node upon direct matching.
12323         * parse.y (purify_type_name): Added function prototype.
12324         (duplicate_declaration_error_p): Consider new_type as potentially
12325         being a incomplete type. Use purify_type_name on type string.
12326         (method_header): saved_type: unused variable removed. Don't figure
12327         return type if method name is invalid.
12328         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12329         processed by patch_unaryop.
12330         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12331         increment/decrement node into its original type after binary
12332         numeric promotion on its operands.
12333
12334 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12335
12336         * parse.y (array_initializer:): Array init operand is NULL_TREE
12337         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12338         now an error. Fixed indentation problems.
12339         (patch_string): Handle error_mark_node as an argument.
12340         (patch_new_array_init): Fixed indentation problems.
12341         (array_constructor_check_entry): Removed check on null wfl_value.
12342         Return an error if wfl_value's walk returns an error.
12343
12344 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12345
12346         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12347         * lex.c (java_lex): Remember column position before advancing one
12348         token. Retain location information on OCB_TK.
12349         * lex.h (typedef struct java_lc): Added new field.
12350         * parse.h (GET_SKIP_TYPE): New macro.
12351         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12352         * parse.y (build_new_array_init, patch_new_array_init,
12353         patch_array_constructor, maybe_build_array_element_wfl,
12354         array_constructor_check_entry): New function prototypes.
12355         (switch_block:): Tagged <node>.
12356         (OCB_TK): Tagged <operator>.
12357         (array_initializer:): Installed actions.
12358         (variable_initializer): Build location information on element if
12359         necessary.
12360         (switch_statement:): Fixed indentation typo.
12361         (switch_block:): Redefined default action.
12362         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12363         (patch_assignment): Removed duplicate code.
12364         (maybe_build_array_element_wfl, build_new_array_init,
12365         patch_new_array_init, patch_array_constructor,
12366         array_constructor_check_entry): New functions.
12367
12368 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12369
12370         * parse.y (array_initializer): Tagged <node>.
12371         (variable_initializer:): Use default rule.
12372         (array_initializer:): Defined actions.
12373         (variable_initializers:): Likewise.
12374         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12375         non-static field accesses.
12376         (patch_invoke): Fixed indentation typo.
12377         (java_complete_tree): Likewise.
12378         (build_labeled_block): Changed leading comment. Generate an error
12379         in case of duplicate loop labels.
12380         (patch_conditional_expr): Patch results of string concatenation
12381         operations.
12382
12383 1998-12-06  Per Bothner  <bothner@cygnus.com>
12384
12385         * constants.c (find_methodref_index):  When the class is an interface,
12386         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12387
12388         * decl.c (finit_identifier_node):  Use "$finit$", rather than
12389         "<finit>" (which Sun's verifier rejects).
12390         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
12391         (generate_field_initialization_code):  Removed.
12392         (fix_constructors)  Don't add call to $finit$ here (wrong order).
12393         (patch_method_invocation):  Add $finit$ call here.
12394
12395         * java-tree.h (CALL_USING_SUPER):  New macro.
12396         * parse.y (patch_invoke):  Remove im local variable.
12397         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
12398         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
12399         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
12400
12401         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
12402
12403         * parse.y (java_complete_tree):  Don't complain about unreachable
12404         statement if it is empty_stmt_node.
12405
12406         * jcf-write.c (find_constant_wide):  New function.
12407         (push_long_const):  Use find_constant_wide.
12408
12409         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
12410         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
12411         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12412         Emit invokeinterface when calling an interface method.
12413         Emit invokespecial also when calling super or private methods.
12414
12415         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
12416
12417 1998-12-06  Per Bothner  <bothner@cygnus.com>
12418
12419         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
12420
12421 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12422
12423         * java-tree.h (java_layout_seen_class_methods): New function
12424         prototype.
12425         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12426         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12427         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12428         * parse.y (method_declarator:): Defined action.
12429         (issue_warning_error_from_context): input_filename saved, set to
12430         the appropriate value and restored after java_error is called.
12431         (build_unresolved_array_type): Fixed comment.
12432         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12433         (method_header): Deal with return type the same way type are
12434         handled for fields and method's parameters and local variables
12435         types are handled.
12436         (check_method_redefinition): Removed extra CR.
12437         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12438         (java_layout_seen_class_methods): New function.
12439         (java_layout_classes): Call java_layout_seen_class_methods.
12440
12441 1998-12-03  Per Bothner  <bothner@cygnus.com>
12442
12443         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
12444
12445 1998-12-03  Per Bothner  <bothner@cygnus.com>
12446
12447         * jcf-dump.c (main):  Fix error message.
12448         * jcf-path.c (add_entry):  Style fix.
12449
12450 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12451
12452         * class.c (layout_class_method): Call build_java_argument_signature
12453         on constructors too.
12454         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12455         (patch_method_invocation): Define a primary when resolving an
12456         expression name. Augmented comment on code checking illegal `this'
12457         usage. Loosened it test by accepting NEW_CLASS_EXPR.
12458
12459 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12460
12461         * class.c (layout_class_method): Don't report error on non-static
12462         overriding static if the method is private.
12463         * java-tree.h (finish_class): Prototype added.
12464         * lex.c (java_get_line_col): Handle col argument -2 value.
12465         * parse.h: All static method declarations moved to parse.y.
12466         * parse.y: Now contains all static method declarations previously
12467         found in parse.h.
12468         (find_expr_with_wfl, missing_return_error,
12469         unreachable_stmt_error): New functions.
12470         (java_get_real_method_name): Identify constructors bearing class
12471         names in source code compiled classes only.
12472         (java_complete_expand_methods): Call missing_return_error.
12473         (invocation_mode): Private methods invoked as static methods.
12474         (java_complete_tree): Call unreachable_stmt_error.
12475
12476 1998-12-01  Tom Tromey  <tromey@cygnus.com>
12477
12478         * Makefile.in (+target): Removed.
12479         (+xmake_file): Likewise.
12480         (+tmake_file): Likewise.
12481         (.NOEXPORT): Removed duplicate.
12482
12483 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12484
12485         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12486
12487         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
12488
12489         * jvgenmain.c: Remove the xmalloc prototype, we get it from
12490         libiberty.h.  Provide an xmalloc definition.
12491
12492         * jvspec.c: Remove the xmalloc prototype.
12493
12494         * parse-scan.y: Include config.h and system.h.  Don't include
12495         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
12496         Provide an xstrdup definition.
12497
12498 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
12499
12500         * jcf-path.c (add_entry): Recognize ".jar" too.
12501         * lang-specs.h: Likewise.
12502
12503 1998-11-26  Per Bothner  <bothner@cygnus.com>
12504
12505         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
12506         soft_monitorenter_node, soft_monitorexit_node, throw_node.
12507
12508         * jcf-write.c (generate_bytecode_insns):
12509         Handle pre/post-increment/decrement of long.
12510
12511         * jcf-write.c (generate_bytecode_insns):
12512         Handle missing exception handler (finally for synchronized).
12513
12514 1998-11-25  Per Bothner  <bothner@cygnus.com>
12515
12516         * java-tree.h (end_params_node):  Declare global.
12517         * decl.c (end_params_node):  New global.
12518         (init_decl_processing, start_java_method):  Use end_params_node for
12519         end of list of parameter types.  Follows correct gcc conventions.
12520         * expr.c (pop_argument_types, pop_arguments):  Likewise.
12521         * lang.c (put_decl_node):  Likewise.
12522         * typeck.c (various places):  Likewise.
12523         * class.y (various places):  Likewise.
12524         * parse.y (various places):  Likewise.
12525
12526         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
12527         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
12528
12529         * class.c:  Add #include flags.h, remove no-longer needed declaration.
12530
12531         * class.c (layout_class_method):  Remove commented-out code, re-format.
12532         Don't add vtable entry (or index) for private methods.
12533         * expr.c (expand_invoke):  A private method is implicitly final.
12534         * class.c (make_class_data):  If inlining or optimizing,
12535         skip private methods.
12536
12537         * class.c (finish_class):  New function.  Calls existing methods,
12538         but alls emits deferred inline functions.
12539         * jcf-parse.c (parse_class_file):  Call finish_class.
12540         * parse.y (java_complete_expand_methods):  Likewise.
12541
12542         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
12543
12544         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
12545
12546 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
12547
12548         * jcf-write.c (generate_bytecode_conditional): Fix typo.
12549
12550 1998-11-24  Per Bothner  <bothner@cygnus.com>
12551
12552         * (generate_classfile): Always write class access flag with
12553         ACC_SUPER set.
12554
12555 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12556
12557         * class.c (maybe_layout_super_class): New function.
12558         (layout_class): Reorganized. Loop on class methods dispatched into
12559         a new function. Call maybe_layout_super_class.
12560         (layout_class_methods, layout_class_method): New functions.
12561         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12562         class.
12563         (expand_invoke): Likewise.
12564         * java-tree.h (all_class_list): New global variable declared.
12565         (layout_class_methods, layout_class_method): New function
12566         prototypes.
12567         (LAYOUT_SEEN_CLASS_METHODS): New macro.
12568         * jcf-parse.c (all_class_list): New global variable.
12569         (load_class): Extended what class_or_name can be. Use parser
12570         context mechanism to save globals before calling jcf_parse.
12571         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12572         is set on the file name.
12573         (jcf_parse): Layout class methods when Object is loaded, otherwise
12574         record class in all_class_list for delayed method layout.
12575         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12576         * lang.c (put_decl_node): Decode <init> into the decl context
12577         class name.
12578         * lex.c (java_allocate_new_line): Use xmalloc.
12579         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12580         pointers, not TREE_LIST elements.
12581         (struct parser_ctxt): Fixed comment indentations, added comments
12582         and reordered some fields.
12583         (java_check_methods): Function prototype removed.
12584         * parse.y (java_push_parser_context): Use xmalloc.
12585         (java_parser_context_restore_global): Pop extra pushed ctxp only
12586         when there's nothing next.
12587         (maybe_create_class_interface_decl): Fixed comment, add new
12588         created class decl to all_class_list.
12589         (method_header): Use GET_REAL_TYPE on argument's types.
12590         (method_declarator): Use GET_REAL_TYPE, change type to the real
12591         type in TREE_LIST dependency node. Build argument list with the
12592         real type.
12593         (create_jdep_list): Use xmalloc. Removed allocation error message.
12594         (obtain_incomplete_type): Fixed leading comment. Broadened
12595         incoming argument meaning.
12596         (register_incomplete_type): Use xmalloc. Removed allocation error
12597         message.
12598         (safe_layout_class): Fixed leading comment.
12599         (jdep_resolve_class): Reversed if statement condition and switch
12600         if and else bodies.
12601         (resolve_and_layout): Fixed leading comment. Broadened incoming
12602         argument meaning.
12603         (complete_class_report_errors): New local variable name, for
12604         clarity. purify_type_name used for all error cases.
12605         (java_get_real_method_name): Stricter check on constructors.
12606         (java_check_regular_methods): Reverse methods list only if not
12607         already laid out. Layout artificial constructor.
12608         (java_check_methods): Deleted.
12609         (source_start_java_method): Obtain incomplete type for patchable
12610         method arguments.
12611         (java_layout_classes): Fixed leading comment. Use
12612         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12613         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12614         before returning. Fixed comments.
12615         (java_expand_classes): Check for errors up front.
12616         (patch_method_invocation): Class to search is resolved and laid
12617         out.
12618
12619 1998-11-24  Per Bothner  <bothner@cygnus.com>
12620
12621         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
12622
12623         * javaop.h (int8):  Removed - not used.
12624         (jbyte):  Redefine portably with correct signedness.
12625
12626         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
12627
12628         * jcf-write.c (generate_bytecode_insns):  Fix typo
12629         OPCODE_getstatic to OPCODE_getfield.
12630
12631         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
12632         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
12633         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12634
12635 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12636
12637         * jcf-parse.c (jcf_parse_source): Function returned type is
12638         void. Added prototype.
12639         (jcf_parse): Function returned type is void.
12640         (yyparse): Remove call to fclose on the last parsed file.
12641
12642         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12643
12644 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12645
12646         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12647         (layout_class): Cope with methods featuring WFL in decl names.
12648         * decl.c (unqualified_object_id_node): New global variable,
12649         initialized.
12650         (build_decl_no_layout): Removed.
12651         * expr.c (build_primtype_type_ref): Handle Double.
12652         (java_lang_expand_expr): Fixed indentations.
12653         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12654         (flag_wall, flag_redundant, flag_not_overriding,
12655         flag_static_local_jdk1_1, unqualified_object_id_node): Global
12656         variable declarations.
12657         (build_decl_no_layout): Removed prototype.
12658         (java_get_real_method_name): Added prototype.
12659         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12660         (java_parse_abort_on_error): Macro now just returns.
12661         * jcf-parse.c (jcf_parse_source): Check fclose returned
12662         value. Call emit_register_classes if java_report_errors returns
12663         zero.
12664         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12665         flag_static_local_jdk1_1): New integer flags.
12666         (lang_decode_option): New flags set here.
12667         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12668         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12669         the flag_redundant variable.
12670         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12671         when parsing java.lang.Object class.
12672         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12673         NULL_TREE to build.
12674         (resolve_qualified_expression_name): Fixed indentation.
12675         (patch_array_ref): Changed prototype.
12676         (not_initialized_as_it_should_p): Prototype removed.
12677         (java_report_errors): Added function prototype.
12678         * parse.y (formal_parameter:): Changed error message for not yet
12679         supported final parameters.
12680         (class_type_list:): Set both PURPOSE and VALUE of created
12681         TREE_LIST to be class_type.
12682         (primary_no_new_array:): Handle class literals on primitive types.
12683         (parse_warning_context): Reinstalled correct force_error and
12684         do_warning flags setups.
12685         (java_report_errors): Changed prototype. Return java_error_count
12686         value.
12687         (variable_redefinition_error): Consider treating variable type as
12688         a fake pointer.
12689         (create_interface): Warn about redundant abstract modifier if
12690         flag_redundant is set. Changed error message.
12691         (lookup_field_wrapper): Save/restore globals before/after looking
12692         up field.
12693         (duplicate_declaration_error_p): Consider treating declaration
12694         type as a fake pointer.
12695         (register_fields): Extract real type from dependency node. Check
12696         for duplicate field declaration after type adjustment. Use
12697         DECL_INITIAL to store static final initialized values.
12698         (method_header): Extract real function type from dependency node.
12699         (check_abstract_method_header): Use GET_METHOD_NAME.
12700         (obtain_incomplete_type): Layout fake pointer type.
12701         (safe_layout_class): Don't try to check for methods before layout.
12702         (java_complete_class): Don't check for correct throws clause
12703         elements inheritance here.
12704         (resolve_and_layout): Broadened name parameter meaning.
12705         (reset_method_name): Use GET_METHOD_NAME.
12706         (java_get_real_method_name): New function.
12707         (java_check_regular_methods): Don't check methods in
12708         java.lang.Object.  Verify lineage of throws clause elements. Use
12709         flag_no_overriding in warning report.
12710         (check_throws_clauses): Don't check if class was from
12711         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12712         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12713         (declare_local_variables): Use flag_static_local_jdk1_1 to report
12714         warning on unsupported final local variables. Use build_decl
12715         instead of build_decl_no_layout. Get real local variable type from
12716         dependency node.
12717         (source_start_java_method): Get real parameter type from
12718         dependency node. Call build_decl instead of build_decl_no_layout.
12719         (java_layout_classes): Reverse tree and layout type and class as
12720         required. Mark class as loaded when done.
12721         (resolve_field_access): Fixed indentation. Restricted condition
12722         leading to static field access code generation. Set field_type
12723         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12724         (resolve_qualified_expression_name): Initialize type_found to
12725         null. Handle static field resolved during qualification. Fixed
12726         layout on non primitive field decl types.
12727         (not_accessible_p): Fixed typo in comment.
12728         (patch_method_invocation): Resolve and layout class to search from
12729         type.
12730         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12731         layout non primitive type, if necessary. Make method node only to
12732         report errors.
12733         (find_applicable_accessible_methods_list): Consider WFL'ed method
12734         decl names. Fixed indentation.
12735         (argument_types_convertible): Resolve and layout target type if
12736         necessary.
12737         (java_complete_tree): Fixed indentation problems. Rewrote
12738         CALL_EXPR thrown exceptions check. Re-installed further processing
12739         of the assignment in certain cases.
12740         (patch_assignment): Call maybe_build_primttype_type_ref to perform
12741         inlining on class literals.
12742         (valid_builtin_assignconv_identity_widening_p): Cope with constant
12743         0 literal.
12744         (valid_method_invocation_conversion_p): Likewise.
12745         (patch_string): Temporary disable forbidden use of `this' in
12746         explicit constructor invocations when doing string concatenation
12747         within their scope.
12748         (patch_unaryop): Added comment. Reinstalled code to disable
12749         further check on assignment operation with cast expression RHS.
12750         (patch_switch_statement): Fixed indentation.
12751         (build_try_statement): Call build_decl instead of
12752         build_decl_no_layout.
12753         (patch_synchronized_statement): Likewise.
12754         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12755         IS_UNCHECKED_EXPRESSION_P.
12756         (check_thrown_exceptions_do): Changed leading comment. Resolve and
12757         layout argument exception type.
12758         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12759         of IS_UNCHECKED_EXPRESSION_P.
12760
12761 1998-11-18  Anthony Green  <green@cygnus.com>
12762
12763         * jcf-parse.c (yyparse): Open class file in binary mode.
12764
12765 1998-11-15  Per Bothner  <bothner@cygnus.com>
12766
12767         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
12768
12769         * jcf-write.c (perform_relocations):  Move check out one loop.
12770
12771 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
12772
12773         * Make-lang.in: Fix reference to srcdir.
12774         * jv-scan.c: Add missing xmalloc prototype.
12775         * jvgenmain.c: Ditto.
12776
12777 1998-11-15  Per Bothner  <bothner@cygnus.com>
12778
12779         * decl.c (error_mark_node), java-tree.h:  New global.
12780         * parse.y:  Use empty_stmt_node instead of size_zero_node.
12781         (build_if_else_statement):  If missing else, use empty_stmt_node.
12782
12783         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
12784         (java_complete_expand_method):  Complain if return is missing.
12785         (java_check_regular_methods):  Comment out incorrect error check.
12786         (not_accessible_p):  Fix incorrect handling of protected methods.
12787         (patch_method_invocation):  Pass correct context to not_accessible_p.
12788         (find_applicable_accessible_methods_list):  Likewise.
12789         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
12790         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
12791         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
12792         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
12793
12794         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
12795         (push_int_const):  Remove reundant NOTE_PUSH.
12796         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
12797         (- case SWITCH_EXPR):  Fix code generation bug.
12798         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
12799         (generate_classfile):  More robust for abstract methods.
12800
12801 1998-11-15  Anthony Green  <green@cygnus.com>
12802
12803         * Makefile.in: jv-scan and jvgenmain all require libiberty.
12804         * Make-lang.in: Ditto.
12805
12806         * jv-scan.c: Remove xmalloc and xstrdup definitions.
12807         * jvgenmain: Ditto.
12808
12809 1998-11-15  Per Bothner  <bothner@cygnus.com>
12810
12811         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
12812
12813         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
12814
12815 1998-11-14  Per Bothner  <bothner@cygnus.com>
12816
12817         Allow uses of interface types to verify.  This is not really
12818         type-safe, but it matches what Sun does, and is OK as long as
12819         there are appropriate run-time checks.
12820         * verify.c (merge_types):  If merging two interface types,
12821         just set the result to java.lang.Object.
12822         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
12823
12824 1998-11-13  Tom Tromey  <tromey@cygnus.com>
12825
12826         * gjavah.c (main): Handle --output-class-directory argument.
12827         * jvspec.c (lang_specific_driver): Translate `-d' into
12828         -foutput-class-dir.
12829         * jcf.h (jcf_write_base_directory): Declare.
12830         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
12831         * lang-options.h: Mention -foutput-class-dir.
12832         * jcf-write.c (jcf_write_base_directory): New global.
12833         (make_class_file_name): Put generated .class file into `-d'
12834         directory, or into source directory if -d not given.  Function now
12835         static.
12836         (write_classfile): Free class file name.  Handle case where class
12837         file name is NULL.
12838         (DIR_SEPARATOR): New macro.
12839         Include <sys/stat.h>
12840
12841         * Makefile.in (prefix): New macro.
12842
12843 1998-11-12  Per Bothner  <bothner@cygnus.com>
12844
12845         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
12846         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
12847         here (done in patch_invoke instead).
12848         (case_identity):  Moved here from parse.y.
12849
12850         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
12851         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
12852         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
12853         so they can be efficiently scanned without recursion.
12854         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
12855         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
12856         in BLOCK iteratively, rather than recursively.
12857
12858         * parse.y (do_unary_numeric_promotion):  New function.
12859         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
12860
12861         * parse.y (patch_newarray):  Various fixes.
12862
12863         Re-do handling of switch statements (for proper block scoping).
12864         * parse.y:  Add just a single block for the enture switch block,
12865         but don't create any "case blocks".
12866         (group_of_labels):  Rmeoved unneeded non-terminal.
12867         CASE_EXPR and DEFAULT_EXPR are added to current block.
12868         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
12869         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
12870         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
12871         * parse.y (wfl_operator, print_int_node): Make non-static.
12872         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
12873         as part of recursive scan of block.
12874         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
12875         (patch_switch_statement):  Most tests move dinto java_complete_tree.
12876
12877         * parse.y:  Make various production be non-typed (void).
12878         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
12879         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
12880         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
12881
12882         * jcf-write.c (struct jcf_handler):  New type.
12883         (struct jcf_switch_state):  New type.
12884         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
12885         (alloc_handler, emit_unop, emit_reloc):  New functions.
12886         (adjust_typed_op):  Add extra parameter ("max type" offset).
12887         (emit_switch_reloc, emit_case-reloc):  New function.
12888         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
12889         (generate_bytecode_insns):  Support REAL_CST, switch statements,
12890         exception handling, method calls, object/array creation, and more.
12891
12892         * class.c:  Remove some unused variables.
12893         * constants.c (find_string_constant):  New function.
12894         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
12895         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
12896         if flag_emit_class_files.
12897
12898 1998-11-12  Tom Tromey  <tromey@cygnus.com>
12899
12900         * jcf-io.c (find_class): Added explanatory comment.
12901
12902         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
12903         trailing slash to `.zip' entries.
12904
12905         * jvspec.c (lang_specific_driver): Correctly handle case where
12906         GC_NAME not defined.
12907
12908 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12909
12910         * jvspec.c (GC_NAME): New define.
12911         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
12912         if required.
12913         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
12914
12915 1998-11-11  Per Bothner  <bothner@cygnus.com>
12916
12917         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
12918
12919 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12920
12921         * jcf-dump.c (main): Correctly recognize `--'-style long options.
12922
12923 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12924
12925         * class.c (is_compiled_class): Call safe_layout_class for class
12926         compiled from source.
12927         * conver.h (convert_to_integer, convert_to_real,
12928         convert_to_pointer): Added prototypes.
12929         * decl.c (init_decl_processing): Non longer push the decls of
12930         `methodtable', `constants', `Class', `Field', `dispatchTable'
12931         `jexception' and `Method'.
12932         * expr.c (build_invokeinterface): New function.
12933         (expand_invoke): static variable CLASS_IDENT now in
12934         build_invokeinterface. Use build_invokeinterface.
12935         (expand_java_field_op): Moved code to inline
12936         java.lang.PRIMTYPE.TYPE into a function.
12937         (build_primtype_type_ref): New function.
12938         * java-tree.def (INSTANCEOF_EXPR): New tree code.
12939         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
12940         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
12941         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
12942         (DECL_LOCAL_STATIC_VALUE): New macro.
12943         (build_invokeinterface, build_primtype_type_ref): New function
12944         prototypes.
12945         (java_parse_abort_on_error): Macro rewritten.
12946         * jcf-parse.c (current_method): Add comment to declaration.
12947         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
12948         Function prototypes fixed.
12949         (jcf_parse_source): push/pop parser context. save/restore global.
12950         (parse_source_file): Fixed leading comment. Now take a
12951         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
12952         classes and pop the parser context anymore.
12953         (yyparse): Push parser context, save globals, parse the source
12954         file, restore globals and pop the parser context when processing a
12955         source file.
12956         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
12957         * lex.c (java_parse_doc_section): New function.
12958         (java_lex): Call java_parse_doc_section when appropriate. Build an
12959         operator around INSTANCEOF_TK.
12960         * lex.h (java_lineterminator, java_sprint_unicode,
12961         java_unicode_2_utf8, java_lex_error, java_store_unicode):
12962         Prototypes rewritten.
12963         (java_parse_escape_sequence, java_letter_or_digit_p,
12964         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
12965         java_read_unicode, java_store_unicode, java_read_char,
12966         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
12967         Added function prototypes.
12968         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
12969         define.
12970         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
12971         New macros
12972         (struct parser_ctxt): New fields: deprecated,
12973         current_parsed_class_un, gclass_list.
12974         (fix_method_argument_names, issue_warning_error_from_context,
12975         resolve_package, lookup_package_type): New function prototypes.
12976         (resolve_expression_name): Fixed function prototype.
12977         (find_applicable_accessible_methods_list): Fixed indentation, added
12978         extra argument in prototype.
12979         (check_final_assignment, build_null_of_type, check_deprecation,
12980         check_method_redefinition, reset_method_name,
12981         java_check_regular_methods, java_check_abstract_methods,
12982         maybe_build_primttype_type_ref): New function prototype.
12983         * parse.y (conver.h): Include.
12984         (INSTANCEOF_TK): Tagged <operator>.
12985         (single_type_import_declaration): Use REGISTER_IMPORT macro.
12986         (relational_expression:): Build binop for instanceof.
12987         (java_push_parser_context): Remember ctxp->gclass_list across
12988         contexts.
12989         (java_pop_parser_context): Simply return if no context
12990         exists. Remember gclass_list across contexts.
12991         (issue_warning_error_from_context): New function.
12992         (parse_error_context): Don't setup ctxp->elc here. Call
12993         issue_warning_error_from_context instead.
12994         (parse_warning_context): Likewise.
12995         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
12996         setup. Link new class/interface to ctxp->gclass_list.
12997         (add_superinterfaces): Register interface as incomplete if not
12998         loaded.
12999         (create_class): Remember class unqualified name in
13000         ctxp->current_parsed_class_un. Check class deprecation.
13001         (register_fields): Check field deprecation. Remember static final
13002         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
13003         processing INIT.
13004         (method_header): New local variable ORIG_ARG. Use unqualified
13005         current class name for check on constructor errors. Promote return
13006         type if of record type. Argument list fix moved in
13007         fix_method_argument_names, called here. Check method deprecation.
13008         (fix_method_argument_names): New function.
13009         (method_declarator): Promote record typed arguments.
13010         (safe_layout_class): Check class methods before layout.
13011         (java_complete_class): Compute field layout when patched.
13012         (do_resolve_class): Try to load class after having it renamed
13013         after the package name.
13014         (get_printable_method_name): Use DECL_CONTEXT.
13015         (reset_method_name): New function.
13016         (check_method_redefinition): Use reset_method_name.
13017         (java_check_regular_methods): New local variable
13018         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
13019         names for error report. Check for compile-time error when method
13020         found has default (package) access.
13021         (java_check_abstract_methods): Now takes an interface DECL node as
13022         an argument. Also reinstall real name on unchecked
13023         overriding/hiding methods for error report.
13024         (java_check_methods): Fixed leading comment. Get classes to verify
13025         from ctxp->gclass_list. Use CHECK_METHODS macro and set
13026         CLASS_METHOD_CHECKED_P on class verification.
13027         (lookup_java_method2): Get real method name if necessary.
13028         (find_in_imports): Don't check package class access here.
13029         (resolve_package, lookup_package_type): New functions.
13030         (java_layout_classes): Fixed leading comment. Take classes to be
13031         laid out from ctxp->gclass_list.
13032         (java_complete_expand_methods): Don't expand native and abstract
13033         methods.
13034         (java_expand_classes): New function.
13035         (resolve_expression_name): Use additional argument ORIG.  Retrieve
13036         values of static final field of primitive types.
13037         (resolve_field_access): Handles static final field of promotive
13038         type.
13039         (resolve_qualified_expression_name): Handle STRING_CST as
13040         primaries and package name resolution. Check deprecation on found
13041         decls. Set where_found and type_found on non static field resolved
13042         during qualification. Layout non primitive field decl types.
13043         (check_deprecation): New function.
13044         (maybe_access_field): Simplified.
13045         (patch_method_invocation_stmt): Local variable CLASS_TYPE
13046         removed. Reverse method's argument when primary is a type. Don't
13047         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
13048         instead. Include abstract class in the list of class searchable
13049         for constructors. Use DECL_CONTEXT of found method for access
13050         checks. Check method deprecation.
13051         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
13052         converting arguments. Handle INVOKE_INTERFACE.
13053         (lookup_method_invoke): Search constructor using existing
13054         infrastructure (don't rely on lookup_java_constructor anymore).
13055         (find_applicable_accessible_methods_list): Extra argument flag
13056         LC. Now include constructor in the search.
13057         (qualify_ambiguous_name): Conditional expression are primaries.
13058         (not_initialized_as_it_should_p): static final are always
13059         initialized.
13060         (java_complete_tree): Pass extra NULL argument to
13061         resolve_expression_name. Stricter test to carry on patching
13062         assignments. New case for INSTANCEOF_EXPR.
13063         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
13064         (check_final_assignment, maybe_build_primttype_type_ref): New
13065         functions.
13066         (patch_assignment): Detect resolved static finals and carry normal
13067         assignment error check on them. Inline PRIMTYPE.TYPE read access.
13068         (try_builtin_assignconv): Access constant 0 on all primitive
13069         types.
13070         (valid_builtin_assignconv_identity_widening_p): Accept identical
13071         types. Accept all promoted type on int type.
13072         (valid_ref_assignconv_cast_p): Accept a null pointer to be
13073         assigned to a reference.
13074         (valid_method_invocation_conversion_p): Accept to check null
13075         pointers.
13076         (build_binop): Merge declaration and initialization of local
13077         variable BINOP.
13078         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
13079         numeric types. Improved validity test for qualify operators on
13080         references.
13081         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
13082         and PREINCREMENT_EXPR. Also detect resolved static finals of a
13083         primitive type and issue the appropriate error message.
13084         (resolve_type_during_patch): Mark class loaded when resolved.
13085         (patch_cast): Allow null to be cased to reference types.
13086         (build_null_of_type): New function.
13087         (patch_array_ref): Handle array on references correctly.
13088         (patch_return): Removed unused local variable MODIFY. Force
13089         boolean to be returned as integers. Allows null to be returned by
13090         a function returning a reference.
13091         * typeck.c (convert_to_integer, convert_to_real,
13092         convert_to_pointer): Prototypes moved to convert.h
13093         (lookup_argument_method): Use method real name, if necessary.
13094
13095 1998-10-30  Tom Tromey  <tromey@cygnus.com>
13096
13097         * class.c (build_class_ref): Changed name of primitive classes to
13098         start with `_Jv_'.
13099
13100         * class.c (make_class_data): Renamed fields: nmethods to
13101         method_count, method_count to dtable_method_count.  Always set
13102         `state' field to 0.
13103         * decl.c (init_decl_processing): Likewise.
13104
13105 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13106
13107         * class.c (layout_class): Don't mangle <finit>, produce
13108         __finit<class> instead. Don't verify artificial methods.
13109         * decl.c (finit_identifier_node): New declared global.
13110         (init_decl_processing): finit_identifier_node initialized.
13111         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13112         * java-tree.h (finit_identifier_node): Declared as extern.
13113         (struct lang_decl): New field called_constructor.
13114         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13115         (CLASS_HAS_FINIT_P): New macro.
13116         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13117         explicit constructor invocation.
13118         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13119         CALL_SUPER_CONSTRUCTOR_P): New macros.
13120         (write_classfile): Added prototype.
13121         * jcf-parse.c (jcf_parse_source): Parse and remember for
13122         generation if the file was seen on the command line.
13123         (parse_source_file): Don't write the class file here.
13124         (yyparse): Loop on files rewritten. Set current_jcf.
13125         (parse_zip_file_entries): Parse class file only if it was found.
13126         * lang.c (init_parse): Don't open command line provided filename
13127         here.
13128         (lang_parse): Don't set main_jcf anymore.
13129         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13130         (JCONSTRUCTOR_CHECK): New macro.
13131         (JBSC_TYPE_P): New macro.
13132         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13133         (COMPLETE_CHECK_OP_2): New macro.
13134         (struct parse_ctxt): New field explicit_constructor_p.
13135         (check_class_interface_creation): Fixed prototype indentation.
13136         (patch_method_invocation_stmt): Prototype reflects added argument.
13137         (patch_invoke): Likewise.
13138         (complete_method_declaration, build_super_invocation,
13139         verify_constructor_circularity,
13140         build_this_super_qualified_invocation, get_printable_method_name,
13141         patch_conditional_expr, maybe_generate_finit, fix_constructors,
13142         verify_constructor_super, create_artificial_method,
13143         start_artificial_method_body, end_artificial_method_body,
13144         generate_field_initialization_code): New function prototypes.
13145         * parse.y: Fixed leading comment
13146         (constructor_header:, constructor_body:, block_end:): Rules tagged
13147         <node>.
13148         (type_declaration:): Call maybe_generate_finit.
13149         (method_declaration:): Action for method_body: placed in new
13150         function complete_method_declaration, called here.
13151         (constructor_declaration:): Defined actions. Removed leading
13152         FIXME.
13153         (constructor_header:): New rule with action.
13154         (constructor_body:): Rule rewritten using block_begin: and
13155         block_end:. Defined actions.
13156         (constructor_declarator:, explicit_constructor_invocation:):
13157         Defined actions.
13158         (block:): Use new rules block_begin: block_end:.
13159         (block_begin:, block_end:): New rules and actions.
13160         (block_statements:): Fixed error message for explicit
13161         constructors.
13162         (method_invocation:): Call build_this_super_qualified_invocation
13163         if primary is `this' or `super' was seen.
13164         (conditional_expression:): Action defined.
13165         (extra_ctxp_pushed_p): New static global flag.
13166         (java_parser_context_save_global): Create parser context if
13167         necessary. Use extra_ctxp_pushed_p to remember it.
13168         (java_parser_context_restore_global): Pop extra parser context if
13169         one exists.
13170         (build_array_from_name): Array on primitive types are marked
13171         loaded.
13172         (register_fields): Restore new name in field initializer
13173         expression if type was altered. Non static fields initialized upon
13174         declaration marked initialized.
13175         (maybe_generate_finit): New function.
13176         (maybe_generate_clinit): Use create_artificial_method,
13177         start_artificial_method_body, end_artificial_method_body. Generate
13178         debug info for enclosed initialization statements.
13179         (method_header): Fixed leading comment. Check constructor
13180         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13181         accordingly.
13182         (complete_method_declaration, constructor_circularity_msg,
13183         verify_constructor_circularity): New functions.
13184         (get_printable_method_name): New function.
13185         (check_method_redefinition): Don't rename <finit> methods. Fix
13186         declared constructor names. Error message for
13187         constructors modified.
13188         (java_check_regular_methods): Local variable seen_constructor
13189         renamed saw_constructor. Skip verification on constructors. Create
13190         default constructor with create_artificial_method.
13191         (java_check_methods): Removed unnecessary empty line.
13192         (create_artificial_method, start_artificial_method_body,
13193         end_artificial_method_body): New functions.
13194         (java_layout_classes): Changed leading comment. Reverse fields
13195         list if necessary. Always layout java.lang.Object if being
13196         defined.
13197         (java_complete_expand_methods): Verify constructor circularity.
13198         (java_complete_expand_method): Call fix_constructor on
13199         constructors.  Local variable no_ac_found removed. Restore
13200         bindings if method body expansion failed.
13201         (fix_constructors, verify_constructor_super,
13202         generate_field_initialization_code): New function.
13203         (java_expand_classes): Fixed leading comment. Write class file
13204         here.
13205         (resolve_expression_name): Check for illegal instance variable
13206         usage within the argument scope of an explicit constructor
13207         invocation.
13208         (resolve_qualified_expression_name): Pass extra from_super flag
13209         when invoking patch_method_invocation_stmt. New case for
13210         conditional expression when used as a primary. Check for error
13211         when acquiring super.
13212         (patch_method_invocation_stmt): Added extra argument super. New
13213         local variable is_static_flag. Set class_to_search according to
13214         the nature of the constructor invocation. Don't add `this'
13215         argument when expanding NEW_CLASS_EXPR. Check for illegal method
13216         invocation within the argument scope of explicit constructor
13217         invocation. Set is_static according to is_static_flag. Provide
13218         extra `super' argument to patch_invoke invocation.
13219         (patch_invoke): New argument from_super. Loop on arguments
13220         indentation fixed. Pass from_super to invocation_mode. New switch
13221         case INVOKE_SUPER. Fixed error message in switch default case.
13222         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13223         value.
13224         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13225         (lookup_method_invoke): Fixed prototypes in candidates list. Error
13226         message takes constructors into account.
13227         (find_applicable_accessible_methods_list): Fixed indentation.
13228         (qualify_ambiguous_name): Take explicit constructor invocation
13229         into account. Deal with a conditional expression as a primary to
13230         a method call.
13231         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13232         case. Added extra argument to patch_method_invocation_stmt.
13233         Register calls made to explicit constructor `this'. Don't call
13234         save_expr in ARRAY_REF case when emitting class files. Check for
13235         illegal use of this when expanding explicit constructor invocation
13236         arguments.
13237         (complete_function_arguments): Set and reset parser context
13238         explicit_constructor_p field value when appropriate.
13239         (build_super_invocation, build_this_super_qualified_invocation):
13240         New functions.
13241         (patch_assignment): Fixed typo.
13242         (patch_unaryop): Check on final fields occurs only when a decl
13243         exits.
13244         (patch_return): Take constructors into account.
13245         (patch_conditional_expr): New function.
13246         * typeck.c (build_java_signature): Removed unnecessary empty line.
13247
13248 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13249
13250         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13251
13252 1998-10-28  Tom Tromey  <tromey@cygnus.com>
13253
13254         * decl.c (init_decl_processing): Renamed fields.
13255         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13256         interface_len, msize fields.
13257
13258         * class.c (make_class_data): Removed subclass_head and
13259         subclass_next fields.
13260         * decl.c (init_decl_processing): Removed subclass_head and
13261         subclass_next fields.
13262
13263 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13264
13265         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13266         * mangle.c (emit_unicode_mangled_name): Similarly.
13267
13268 1998-10-26  Nick Clifton  <nickc@cygnus.com>
13269
13270         * jcf-parse.c (get_constant): Place braces around code to compute
13271         'd' when REAL_ARITHMETIC is not defined.
13272
13273 1998-10-25  H.J. Lu  (hjl@gnu.org)
13274
13275         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13276         dependency.
13277
13278 1998-10-23  Tom Tromey  <tromey@cygnus.com>
13279
13280         * lang-specs.h: `.zip' files are input to jc1.
13281
13282 1998-10-22  Per Bothner  <bothner@cygnus.com>
13283
13284         * jvspecs.c:  Add (but don't enable) support for combining multiple
13285         .class and .java input filenames to a single jc1 invocation.
13286         Add support for -C flag (copile to .class files).
13287         Translate -classpath and -CLASSPATH arguments.
13288         * lang-specs.h:  Don't set %2 spec.
13289
13290 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13291
13292         * jcf-path.c (add_entry): Don't add trailing separator if entry is
13293         a .zip file.
13294         (add_path): Don't add trailing separator to non-empty path
13295         elements.
13296
13297         * lang.c (lang_decode_option): Check for -fclasspath and
13298         -fCLASSPATH before examining other `-f' options.
13299
13300         * java-tree.h (finalize_identifier_node): Don't declare.
13301         * class.c (make_class_data): Don't push "final" field.
13302         * decl.c (init_decl_processing): Don't push "final" field.
13303         (finalize_identifier_node): Removed.
13304         (init_decl_processing): Don't set finalize_identifier_node.
13305
13306         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13307
13308 1998-10-11  Anthony Green  <green@cygnus.com>
13309
13310         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13311         (JV_SCAN_SOURCES): New macro.
13312         (JCF_DUMP_SOURCES): Likewise.
13313         (jcf-dump$(exeext)): New target.
13314         (jv-scan$(exeext)): New target.
13315
13316 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13317
13318         * Makefile.in (LEX): Removed.
13319         (LEXFLAGS): Likewise.
13320         (SET_BISON): New macro.
13321         (BISON): Removed.
13322         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
13323         spurious diffs in parse.c.
13324         ($(PARSE_SCAN_C)): Likewise.
13325         (PARSE_DIR): New macro.
13326         (PARSE_C): Use it.
13327         (PARSE_SCAN_C): Likewise.
13328         (PARSE_RELDIR): New macro.
13329
13330         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13331
13332         * jcf-io.c (find_class): Use saw_java_source to determine when to
13333         look for `.java' file.
13334         * jcf-parse.c (saw_java_source): New global.
13335         (yyparse): Set it if `.java' file seen.
13336
13337         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13338         (GCJH_SOURCES): Likewise.
13339         * Makefile.in (datadir): New macro.
13340         (libjava_zip): Likewise.
13341         (JAVA_OBJS): Added jcf-path.o.
13342         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13343         (../gcjh$(exeext)): Likewise.
13344         (jcf-path.o): New target.
13345         * java-tree.h (fix_classpath): Removed decl.
13346         * jcf-parse.c (fix_classpath): Removed.
13347         (load_class): Don't call fix_classpath.
13348         * parse.y (read_import_dir): Don't call fix_classpath.
13349         * lex.h: Don't mention classpath.
13350         * lex.c (java_init_lex): Don't initialize classpath.
13351         * jcf-io.c (classpath): Removed global.
13352         (find_class): Use jcf_path iteration functions.  Correctly search
13353         class path for .java file.
13354         (open_in_zip): New argument `is_system'.
13355         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
13356         classpath-related options.
13357         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13358         and -I.
13359         (lang_init): Call jcf_path_init.
13360         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13361         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
13362         Correctly put braces around second string in each entry.
13363         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
13364         classpath-related options.
13365         (help): Updated for new options.
13366         * jcf.h: Declare functions from jcf-path.c.  Don't mention
13367         `classpath' global.
13368         * jcf-path.c: New file.
13369
13370         * jcf-depend.c: Include jcf.h.
13371
13372         * jcf-write.c (localvar_alloc): Returns `void'.
13373         (localvar_free): Removed unused variable.
13374
13375         * lang.c (OBJECT_SUFFIX): Define if not already defined.
13376         (init_parse): Use OBJECT_SUFFIX, not ".o".
13377
13378 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13379
13380         * class.c (emit_register_classes): Renamed from
13381         emit_register_class.
13382         * java-tree.h (emit_register_classes): Prototype renamed from
13383         emit_register_class.
13384         * jcf-parse.c (yyparse): Call emit_register_classes once before
13385         returning.
13386         * parse.y (java_expand_classes): No longer register classes.
13387
13388 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13389
13390         * class.c (is_compiled_class): New local variable
13391         seen_in_zip. Identify classes found in currently compiled source
13392         file(s).
13393         * decl.c (complete_start_java_method): Fixed typo.
13394         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13395         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13396         (CLASS_P): Moved around.
13397         (java_parse_abort_on_error): Macro moved from jcf-parse.c
13398         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13399         java-parse.h
13400         (jcf_parse_source): Changed leading comment. Removed unnecessary
13401         fclose and CLASS_FROM_SOURCE_P marking.
13402         (parse_source_file): New local variables remember_for_generation
13403         and filename. Mark parsed file name identifier node. Removed block
13404         executed when parse_only was null. Set remember_for_generation.
13405         Use it as an argument to java_pop_parser_context.
13406         (yyparse): New local variables several_files, list, next node and
13407         current_file_list. Split ampersand separated file names into
13408         current_file_list. Iterate through the list and parse accordingly.
13409         * parse.h (java_pop_parser_context): New function prototype.
13410         * parse.y (ctxp_for_generation): New static global variable.
13411         (java_pop_parser_context): New argument generate. Link popped ctxp
13412         to ctxp_for_generation list accordingly.
13413         (java_complete_expand_methods): Fixed indentation.
13414         (java_expand_classes): New function.
13415
13416 1998-10-17  Per Bothner  <bothner@cygnus.com>
13417
13418         * Makefile.in:  Link with libiberty.a instead of memmove.o.
13419
13420 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13421
13422         * lex.c (setjmp.h): No longer included.
13423         * lex.h (setjmp.h): Included.
13424         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13425         (duplicate_declaration_error_p): Renamed from
13426         duplicate_declaration_error.
13427         (build_array_from_name): New function prototype.
13428         * parse.y (setjmp.h): No longer included.
13429         (variable_declarator_id): Define action.
13430         (build_array_from_name): New function.
13431         (duplicate_declaration_error_p): Renamed from
13432         duplicate_declaration_error.  Fixed leading comment.
13433         (register_fields): Main `for' loop reorganized. Uses
13434         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13435         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13436         build_array_from_name.
13437         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13438         types.
13439         (read_import_dir): Don't try to skip `.' and `..'.
13440         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13441         build_array_from_name. Main `for' loop reorganized.
13442         (resolve_qualified_expression_name): When building access to a
13443         field, use the type where the field was found, not its own type.
13444         (maybe_access_field): Use field DECL_CONTEXT if the type where the
13445         field was found is null.
13446         (qualify_ambiguous_name): Sweep through all successive array
13447         dimensions.
13448
13449 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13450
13451         * java-tree.h (pop_labeled_block, lang_printable_name,
13452         maybe_add_interface, set_super_info, get_access_flags_from_decl,
13453         interface_of_p, inherits_from_p, fix_classpath,
13454         complete_start_java_method, emit_handlers, init_outgoing_cpool,
13455         make_class_data, register_class, alloc_name_constant): New
13456         function prototypes.
13457         * lang.c (lang_decode_option): Set argc argument unused. Fixed
13458         indentation. Added cast to remove warning.
13459         (lang_printable_name): Set v argument unused.
13460         (lang_print_error): Added argument to lang_printable_name call.
13461         (java_dummy_print, print_lang_decl, print_lang_type,
13462         print_lang_identifier, lang_print_xnode): All argument marked
13463         unused.
13464         * lex.c (java_unget_unicode): Removed unnecessary argument.
13465         (java_allocate_new_line): Unused local variable is gone.
13466         (java_read_char): Added parenthesis in expressions to remove
13467         warnings.  Added final return statement.
13468         (java_read_unicode): Added parenthesis in expression to remove
13469         warning.
13470         (java_parse_end_comment): Fixed java_unget_unicode invocation.
13471         (java_parse_escape_sequence): Likewise.
13472         (java_lex): Unused local variables are gone. Fixed
13473         java_unget_unicode invocation.
13474         * lex.h (set_float_handler): Prototype added when JC1_LITE not
13475         defined.
13476         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13477         lang_printable_name invocation in macro.
13478         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13479         Likewise.
13480         (duplicate_declaration_error): Suppressed unused argument in
13481         prototype.
13482         (identical_subpath_p): Function declaration is gone.
13483         (patch_invoke): Suppressed unused argument in prototype.
13484         (patch_cast, build_labeled_block, check_thrown_exceptions):
13485         Likewise.
13486         * parse.y (setjmp.h): Included
13487         (toplev.h): Likewise.
13488         (field_declaration:): Suppressed unused local
13489         (label_decl:): Fixed build_labeled_block invocation.
13490         (java_pop_parser_context): Put extra parenthesis around assignment
13491         in if.
13492         (yyerror): Suppressed unused local variables.
13493         (variable_redefinition_error): Fixed lang_printable_name
13494         invocation.
13495         (create_interface): Suppressed unused local variables.
13496         (create_class): Likewise.
13497         (duplicate_declaration_error): Suppressed unused argument. Fixed
13498         lang_printable_name invocation.
13499         (register_fields): Suppressed unused local variable. Fixed
13500         duplicate_declaration_error invocation.
13501         (method_header): Suppressed unused local variable.
13502         (method_declarator, parser_check_super): Likewise.
13503         (java_complete_class): Suppressed unused local variable. Fixed
13504         fatal error message.
13505         (complete_class_report_errors): Added default: in switch.
13506         (java_check_regular_methods): Fixed lang_printable_name
13507         invocations.
13508         (check_throws_clauses): Likewise.
13509         (java_check_abstract_methods): Suppressed unused local
13510         variable. Fixed lang_printable_name invocation.
13511         (read_import_entry): Added supplemental return statement.
13512         (read_import_dir): Suppressed unused local variables.
13513         (check_pkg_class_access, declare_local_variables): Likewise.
13514         (source_start_java_method): Suppressed unused extern variable
13515         declarations
13516         (expand_start_java_method): Suppressed unused extern and local
13517         variable declarations.
13518         (java_complete_expand_methods): Likewise.
13519         (java_complete_expand_method): Suppressed unused local variables.
13520         (make_qualified_name): Likewise.
13521         (resolve_qualified_expression_name): Added default: in
13522         switch. Fixed lang_printable_name invocation.
13523         (class_instance_creation_expression): Added parenthesis around
13524         expressions.
13525         (patch_method_invocation_stmt): Fixed lang_printable_name and
13526         patch_invoke invocations.
13527         (check_for_static_method_reference): Fixed lang_printable_name
13528         invocation.
13529         (patch_invoke): Suppressed unused arguments and local variables.
13530         (lookup_method_invoke): Suppressed unused local variables.
13531         (qualify_ambiguous_name): Added default: in switch.
13532         (identical_subpath_p): Function removed.
13533         (patch_assignment): Suppressed unused local variables. Suppressed
13534         unnecessary if statement. Fixed lang_printable_name invocations.
13535         (try_builtin_assignconv): Fixed lang_printable_name invocations.
13536         (valid_ref_assignconv_cast_p): Parenthesis around
13537         expression. Suppressed unused local variables.
13538         (build_binop): Suppressed unused local variables. fixed
13539         lang_printable_name invocations.
13540         (string_constant_concatenation): Suppressed unused local
13541         variables.
13542         (patch_unaryop): Fixed lang_printable_name invocation.
13543         (patch_cast): Suppressed unnecessary argument. Fixed
13544         lang_printable_name invocation.
13545         (patch_array_ref): Fixed lang_printable_name invocation.
13546         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13547         (build_labeled_block): Suppressed unused argument.
13548         (generate_labeled_block): Fixed build_labeled_block invocation.
13549         (build_loop_body): Suppressed unused local variables.
13550         (patch_loop_statement): Likewise.
13551         (patch_exit): Fixed lang_printable_name invocation.
13552         (patch_switch_statement): Likewise.
13553         (case_identity): First argument marked unused.
13554         (patch_try_statement): Fixed lang_printable_name invocations.
13555         (patch_synchronized_statement, patch_throw_statement): Likewise.
13556         (check_thrown_exceptions): Fixed check_thrown_exceptions and
13557         lang_printable_name invocations.
13558         (check_thrown_exceptions_do): Suppressed unused argument.
13559
13560 1998-10-14  Tom Tromey  <tromey@cygnus.com>
13561
13562         * jcf-write.c (write_classfile): Add output class file as target.
13563         * lang-options.h: Added -MD, -MMD, -M, and -MM.
13564         * jcf.h: Added declarations for dependency-tracking functions.
13565         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13566         * lang.c (lang_decode_option): Recognize -MD and -MMD.
13567         (finish_parse): Call jcf_dependency_write.
13568         (dependency_tracking): New global.
13569         (DEPEND_SET_FILE): New define.
13570         (DEPEND_ENABLE): New define.
13571         (init_parse): Enable dependency tracking if required.
13572         Include "flags.h".
13573         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13574         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13575         (../gcjh$(exeext)): Likewise.
13576         (jcf-depend.o): New target.
13577         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13578         (GCJH_SOURCES): Likewise.
13579         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
13580         dep_name argument.
13581         (find_classfile): Added dep_name argument.
13582         (find_class): Compute name of dependency.
13583         (open_in_zip): Call jcf_dependency_add_file.
13584         * gjavah.c (output_file): No longer global.
13585         (usage): Don't mention "gjavah".
13586         (help): Likewise.
13587         (java_no_argument): Likewise.
13588         (version): Likewise.
13589         (main): Recognize and handle -M family of options.
13590         (print_mangled_classname): Return is void.
13591         (process_file): Handle case where output is suppressed.
13592         (HANDLE_END_FIELD): Likewise.
13593         (HANDLE_METHOD): Likewise.
13594         * jcf-depend.c: New file.
13595
13596 1998-10-13  Jeffrey A Law  (law@cygnus.com)
13597
13598         * java-tree.def: Add missing newline at EOF.
13599
13600 1998-10-13  Tom Tromey  <tromey@cygnus.com>
13601
13602         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13603         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
13604         function.
13605         Include <config.h> and "system.h".
13606         (disassemble_method): Undefine RET to avoid clash with
13607         config/i386/i386.h.
13608
13609 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13610
13611         * decl.c (runtime_exception_type_node, error_exception_type_node):
13612         New global variables.
13613         (init_decl_processing): Initialized.
13614         * expr.c (java_lang_expand_expr): Set caught exception type to
13615         null if catch handler argument doesn't exit.
13616         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13617         tree codes.
13618         * java-tree.h (runtime_exception_type_node,
13619         error_exception_type_node): Global variables declared.
13620         (DECL_FUNCTION_THROWS): New macro.
13621         (DECL_FUNCTION_BODY): Modified comment.
13622         (DECL_SPECIFIC_COUNT): Likewise.
13623         (struct lang_decl): New field throws_list.
13624         (IS_UNCHECKED_EXPRESSION_P): New macro.
13625         * lex.c (java_lex): Generate location information for THROW_TK.
13626         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13627         EXCEPTIONS_P): New macros.
13628         (enum jdep_code): New value JDEP_EXCEPTION.
13629         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13630         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13631         PATCH_METHOD_RETURN_ERROR): New macros.
13632         (patch_method_invocation_stmt): Added new argument to prototype.
13633         (patch_synchronized_statement, patch_throw_statement,
13634         check_thrown_exceptions, check_thrown_exceptions_do,
13635         purge_unchecked_exceptions, check_throws_clauses): New function
13636         prototypes.
13637         * parse.y Fixed typo in keyword section.
13638         (throw:): Rule tagged <node>.
13639         (THROW_TK): Keyword tagged <operator>.
13640         (method_header:): Last argument to call to method_header passed
13641         from throws: rule.
13642         (throws:, class_type_list:, throw_statement:,
13643         synchronized_statement:, synchronized:): Defined actions.
13644         (method_header): New local variable current. Register exceptions
13645         from throws clause.
13646         (java_complete_tree): Complete and verify exceptions from throws
13647         clause.
13648         (complete_class_report_errors): Error message on exceptions not
13649         found
13650         (java_check_regular_methods): Fixed typo. Shortcut on private
13651         overriding methods. Changed error message on method
13652         redefinition. Check for throws clause compatibility.
13653         (check_throws_clauses): New function.
13654         (java_check_abstract_methods): Use DECL_NAME for wfl or current
13655         method. Changed error message on method redefinition.
13656         (currently_caught_type_list): New static variable.
13657         (java_complete_expand_methods): Purge unchecked exceptions from
13658         throws clause list. Call PUSH_EXCEPTIONS before walk and
13659         POP_EXCEPTIONS after.
13660         (resolve_qualified_expression_name): Pass new argument as NULL to
13661         patch_method_invocation_stmt.
13662         (patch_method_invocation_stmt): New argument ref_decl. Invoke
13663         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13664         argument list when appropriate. Use new argument if non null to
13665         store selected method decl.
13666         (patch_invoke): Convert if necessary args of builtin types before
13667         forming CALL_EXPR. Argument list no longer reversed here.
13668         (invocation_mode): Treat final methods as static methods.
13669         (java_complete_tree): New cases for THROW_EXPR: and
13670         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13671         function call.
13672         (complete_function_arguments): No more RECORD_TYPE
13673         conversion. Function parameter nodes no longer saved.
13674         (valid_ref_assignconv_cast_p): Avoid handling null type.
13675         (patch_binop): Fixed null constant reference handling.
13676         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13677         BUILD_THROW macros.
13678         (patch_try_statement): Fixed comments. Record caught types in
13679         list, push the list, expand try block and pop the list.
13680         (patch_synchronized_statement, patch_throw_statement,
13681         check_thrown_exceptions, check_thrown_exceptions_do,
13682         purge_unchecked_exceptions): New functions.
13683         * typeck.c (lookup_argument_method): Allow WFL in place of method
13684         DECL_NAME during method definition check
13685
13686 1998-10-09  Tom Tromey  <tromey@cygnus.com>
13687
13688         * gjavah.c (decode_signature_piece): New function.
13689         (print_c_decl): Use it.  Added `name_override' argument.
13690         (print_method_info): Use name_override argument to print_c_decl.
13691         (seen_fields): Removed.
13692         (print_field_info): Don't update seen_fields.
13693         (struct method_name): New structure.
13694         (method_name_list): New global.
13695         (print_method_info): Add new method to list of methods.
13696         (name_is_method_p): New function.
13697         (print_field_info): If field name has same name as method, then
13698         change field name.
13699         (process_file): Parse methods before fields.
13700         (field_pass): New global.
13701         (HANDLE_END_FIELD): Take field_pass into account.
13702
13703 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13704
13705         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13706         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13707
13708 1998-10-03  Anthony Green  <green@cygnus.com>
13709
13710         * jvspec.c: Fix bug in jvgenmain_spec patch.
13711
13712 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13713
13714         * Makefile.in (lang.o:): Install dependency on java-tree.def.
13715         * decl.c (soft_exceptioninfo_call_node): New global variable.
13716         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13717         takes extra integer argument. soft_exceptioninfo_call_node
13718         initialized.
13719         * except.c (java_set_exception_lang_code): New function
13720         (method_init_exceptions): Called here.
13721         (prepare_eh_table_type): New function.
13722         (expand_end_java_handler): Called here.
13723         * expr.c (build_java_throw_out_of_bounds_exception): Now features
13724         one argument. Modified generation of call to
13725         soft_badarrayindex_node to use new argument.
13726         (build_java_arrayaccess): Pass faulty index value to
13727         build_java_throw_out_of_bounds_exception.
13728         (generate_name): New function.
13729         (java_lang_expand_expr): New local variables node, current,
13730         has_finally_p. Expand TRY_EXPR node.
13731         (process_jvm_instruction): Replace top of the stack with thrown
13732         object reference when entering exception handler.
13733         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13734         specific tree codes.
13735         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13736         global.
13737         (DECL_SPECIFIC_COUNT): New macro.
13738         (prepare_eh_table_type, java_set_exception_lang_code,
13739         generate_name): New function declarations.
13740         (match_java_method): Declaration deleted.
13741         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13742         macros.
13743         * lex.c (TRY_TK, CATCH_TK): Generate location information.
13744         * parse.h (redefinition_error, refine_accessible_methods_list,
13745         can_cast_to_p): Function declaration removed.
13746         (classitf_redefinition_error, variable_redefinition_error,
13747         parse_jdk1_1_error, find_applicable_accessible_methods_list,
13748         find_most_specific_methods_list, argument_types_convertible,
13749         enter_a_block, valid_builtin_assignconv_identity_widening_p,
13750         valid_cast_to_p, valid_method_invocation_conversion_p,
13751         try_reference_assignconv, add_stmt_to_compound,
13752         build_jump_to_finally, build_tree_list, patch_try_statement,
13753         java_get_catch_block): New function declarations.
13754         * parse.y (string_buffer_type): Global variable deleted.
13755         (group_of_labels, catches, catch_clause, catch_clause_parameter,
13756         finally): Rules tagged <node>.
13757         (TRY_TK, CATCH_TK): Token tagged <operator>.
13758         (class_body_declaration:, class_member_declaration:,
13759         formal_parameter:, explicit_constructor_invocation:,
13760         interface_member_declaration:, constant_declaration:,
13761         primary_no_new_array:, class_instance_creation_expression:,
13762         array_creation_expression:): Issue error on unsuported JDK1.1
13763         features.
13764         (try_statement:, catches:, finally:): Define actions.
13765         (catch_clause_parameter): New rule.
13766         (catch_clause:): Use new rule catch_clause_parameter.
13767         (parse_jdk1_1_error): New function.
13768         (redefinition_error): Renamed classitf_redefinition_error.
13769         (variable_redefinition_error): New function.
13770         (check_class_interface_creation): Call
13771         classitf_redefinition_error.
13772         (java_complete_tree): Added error message on JDEP_TYPE: case.
13773         (complete_class_report_errors): Fixed indentation.
13774         (declare_local_variables): Call variable_redefinition_error.
13775         (source_end_java_method): Call java_set_exception_lang_code and
13776         emit_handlers where appropriate.
13777         (java_method_add_stmt): Call add_stmt_to_block.
13778         (add_stmt_to_block): New function.
13779         (lookup_method_invoke): Fixed outside comment. new local variable
13780         candicates.  Call find_applicable_accessible_methods_list and
13781         find_most_specific_methods_list when searching for a
13782         method. Modified error report to list possible candidates when
13783         applicable.
13784         (find_applicable_accessible_methods_list,
13785         find_most_specific_methods_list, argument_types_convertible): New
13786         function.
13787         (refine_accessible_methods_list): Function deleted.
13788         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
13789         expr (if applicable) before calling patch_array_ref.
13790         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
13791         (enter_block): Fixed comment.
13792         (enter_a_block): New function.
13793         (patch_assignment): Reorganized. Call try_reference_assignconv for
13794         references. Call valid_cast_to_p instead of can_cast_to_p.
13795         (try_reference_assignconv,
13796         valid_builtin_assignconv_identity_widening_p): New functions.
13797         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
13798         (valid_cast_to_p, valid_method_invocation_conversion_p): New
13799         functions.
13800         (build_string_concatenation): Don't resolve StringBuffer.
13801         (patch_cast): Fixed inverted arguments.
13802         (patch_array_ref): Code to save array expr deleted. Call
13803         valid_cast_to_p instead of can_cast_to_p.
13804         (generate_labeled_block): Call generate_name.
13805         (build_jump_to_finally, build_try_statement, java_get_catch_block,
13806         patch_try_statement): New functions.
13807         * typeck.c (match_java_method): Function deleted.
13808
13809 1998-10-02  Anthony Green  <green@cygnus.com>
13810
13811         * jvspec.c: jvgenmain_spec uses different temporary file names.
13812
13813 1998-10-02  Anthony Green  <green@cygnus.com>
13814
13815         * jvspec.c (lang_specific_driver): Fail if user specifies
13816         --main= when not linking.
13817
13818 1998-09-28  Tom Tromey  <tromey@cygnus.com>
13819
13820         * class.c (make_class_data): Push value for `thread' field.
13821         * decl.c (init_decl_processing): Added `thread' field to class.
13822
13823         * class.c (add_field): Always make static fields externally
13824         visible.
13825
13826 1998-09-26  Anthony Green  <green@cygnus.com>
13827
13828         * expr.c (build_java_athrow,
13829         build_java_throw_out_of_bounds_exception, expand_invoke,
13830         build_newarray, expand_java_multianewarray, build_java_monitor):
13831         Update comments to reflect _Jv_* function names.
13832
13833 1998-09-25  Per Bothner  <bothner@cygnus.com>
13834
13835         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
13836         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
13837         * parse.y (expand_start_java_method):  Likewise.
13838
13839 1998-09-24  Per Bothner  <bothner@cygnus.com>
13840
13841         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
13842
13843         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
13844         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
13845         * expr.c:  Remove no-longer-needed calls to promote_type.
13846         * decl.c (give_name_to_locals):  Liekwise.
13847         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
13848         * parse.y:  Add/remove promote_type calls as appropriate.
13849         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
13850         (parse_signature_string):  Likewise.
13851         (build_java_array_type):  Fix for now signature convenions.
13852
13853         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
13854
13855 1998-09-23  Tom Tromey  <tromey@cygnus.com>
13856
13857         * class.c (init_class_processing): libjava function renamed to
13858         _Jv_RegisterClass.
13859
13860 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13861
13862         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
13863         * java-tree.def: Fixed DEFTREECODE third argument.
13864         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
13865         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
13866         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
13867         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13868         JAVA_THIS_EXPR): Now replaced by tree code definitions.
13869         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
13870         * lang.c (java_tree_code_type, java_tree_code_length,
13871         java_tree_code_name): New arrays.
13872         (lang_init): Append Java tree node definitions to Gcc ones.
13873         * lex.c (expression_obstack): Declared as extern when JC1_LITE
13874         defined.
13875         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
13876         wfl_to_string.
13877         (java_lex): Allow declaration of empty string constants. Retain
13878         location information on CASE_TK and DEFAULT_TK.
13879         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
13880         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
13881         Modified to be more robust.
13882         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
13883         (build_new_invocation, try_builtin_assignconv,
13884         patch_switch_statement, string_constant_concatenation,
13885         build_string_concatenation, patch_string_cst, patch_string,
13886         java_expand_switch): New function declarations.
13887         * parse.y: Rules related to switch and EH tagged <node>.
13888         (label_id): Set to NULL_TREE
13889         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
13890         tree nodes.
13891         (this_or_super:): Fixed indentation.
13892         (statement:, statement_nsi:, statement_without_trailing_substatement:,
13893         statement_expression:): Removed call to RULE on all sub-rules.
13894         (switch_expression:, switch_labels:): New rules.
13895         (switch_statement:, switch_block:, switch_block_statement_groups:,
13896         switch_block_statement_group:, switch_labels:, switch_label:):
13897         Defined actions.
13898         (throw_statement:, synchronized_statement:, try_statement:):
13899         Defined temporary actions.
13900         (class_instance_creation_expression:): Call
13901         build_new_invocation. Fixed indentation.
13902         (field_access): Fixed indentation.
13903         (method_invocation): Likewise.
13904         (make_qualified_primary): Use THIS_EXPR.
13905         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
13906         resolving from SUPER, set *type_found.
13907         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
13908         (java_complete_tree): Removed unused local variable `location'. Case
13909         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
13910         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
13911         on MODIFY_EXPR: and all binary operator tree code cases. Removed
13912         STRING_CST: case. default: checks for patchable strings.
13913         (complete_function_arguments): Transform string constant or
13914         crafted StringBuffer if necessary.
13915         (build_method_invocation): Fixed comments.
13916         (build_new_invocation): New function.
13917         (patch_assignment): Call try_builtin_assignconv to figure a valid
13918         assignment conversion between builtin types.
13919         (try_builtin_assignconv): New function.
13920         (build_binop): Use URSHIFT_EXPR directly to call build.
13921         (operator_string): Use UNARY_PLUS_EXPR.
13922         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
13923         operator.
13924         (do_merge_string_cste, merge_string_cste,
13925         string_constant_concatenation, build_string_concatenation,
13926         patch_string, patch_string_cst): New function.
13927         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
13928         (patch_unaryop): Likewise. New test of valid ++/-- operands.
13929         (build_newarray_node): Use NEW_ARRAY_EXPR.
13930         (build_this): Use THIS_EXPR.
13931         (build_return): Enable debug information on return statement.
13932         (build_if_else_statement): Likewise.
13933         (complete_labeled_statement): Fixed related comment.
13934         (build_loop_body): Fixed comment.
13935         (build_bc_statement): Enable debug information on break/continue
13936         statements.
13937         (patch_bc_statement): Fixed typos. Handle SWITCH statement
13938         context.
13939         (patch_switch_statement, case_identity, java_expand_switch): New
13940         functions.
13941
13942 1998-09-21  Per Bothner  <bothner@cygnus.com>
13943
13944         * buffer.h (BUFFER_INIT):  New macro.
13945         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
13946         Pass (struct jcf_partial *state) to most functions.
13947         (jcf_block, jcf_relocation):  New types.
13948         Support labels, branches, conditionals, loops.
13949
13950 1998-09-21  Tom Tromey  <tromey@cygnus.com>
13951
13952         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
13953
13954 1998-09-21  Per Bothner  <bothner@cygnus.com>
13955
13956         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
13957         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
13958         not integer_type_node (INT_TYPE_SIZ bits).
13959
13960         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
13961
13962         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
13963         * jcf-dump.c (print_exception_table):  New function.
13964         (disassemble_method):  Better handling of wide instructions.
13965         Make more robust for bad input.
13966
13967 1998-09-30  Jeffrey A Law  (law@cygnus.com)
13968
13969         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
13970         FreeBSD.
13971
13972 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13973
13974         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
13975
13976 1998-09-17  Tom Tromey  <tromey@cygnus.com>
13977
13978         * Makefile.in ($(PARSE_H)): Removed target.
13979
13980 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13981
13982         * Makefile.in (JAVA_OBJS): Add memmove.o
13983         (memmove.o): New target & rules.
13984
13985 1998-09-15  Tom Tromey  <tromey@cygnus.com>
13986
13987         * expr.c (expand_invoke): Don't generate a call to the class init
13988         code.
13989
13990 1998-09-14  Jeffrey A Law  (law@cygnus.com)
13991
13992         * Makefile.in: Add many missing dependencies.
13993         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
13994         as appropriate.
13995         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
13996         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
13997
13998 1998-09-11  Per Bothner  <bothner@cygnus.com>
13999
14000         * decl.c (complete_start_java_method):  If method is static (and
14001         not private) call _Jv_InitClass.
14002         * expr.c (expand_invoke):  Don't call build_class_init.
14003
14004         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
14005
14006 1998-09-10  Jeffrey A Law  (law@cygnus.com)
14007
14008         * Make-lang.in (GCJ): Define before using.
14009
14010 1998-09-09  Jeffrey A Law  (law@cygnus.com)
14011
14012         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
14013         losing due to namespace pollution in GNU getopt.h
14014
14015 1998-09-09  Tom Tromey  <tromey@cygnus.com>
14016
14017         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
14018         (java.all.cross): Likewise.
14019         (java.rest.encap): Likewise.
14020
14021 1998-09-08  Jeffrey A Law  (law@cygnus.com)
14022
14023         * gjavah.c (print_class_decls): Fix thinko in arglist
14024         * jcv-io.c (find_classfile): Similarly.
14025
14026 1998-09-07  Jeffrey A Law  (law@cygnus.com)
14027
14028         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
14029
14030 1998-09-05  Tom Tromey  <tromey@cygnus.com>
14031
14032         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
14033         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
14034         * Makefile.in (PARSE_C): New macro.
14035         (PARSE_H): Likewise.
14036         (PARSE_SCAN_C): Likewise.
14037         ($(PARSE_C)): Target renamed from parse.c.
14038         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
14039         (clean): Remove parse-scan.c as well.
14040         (parse.o): Depend on $(PARSE_C).
14041
14042 1998-09-05  Anthony Green  <green@cygnus.com>
14043
14044         * README, license.terms: Removed.
14045
14046         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
14047         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
14048         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
14049         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
14050         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
14051         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
14052         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
14053         and Java trademark attribution.
14054
14055 1998-09-04  Tom Tromey  <tromey@cygnus.com>
14056
14057         * Makefile.in: Use gcjh, not gjavah.
14058         * config-lang.in (stagestuff): Use gcjh, not gjavah.
14059         * Make-lang.in: Changed gjavah to gcjh everywhere.
14060
14061 1998-09-03  Per Bothner  <bothner@cygnus.com>
14062
14063         * gjavah.c:  Support new -prepend -add -append flags.
14064         (print_method_info):  Method is not virtual if class is final.
14065
14066 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14067
14068         * jv-scan.c: Fixed copyright assignment.
14069         * keyword.gperf: Likewise.
14070         * keyword.h: Likewise.
14071         * lex.c: Fixed copyright assignment.
14072         (java_lex): Push unicode back when parsing '<'.
14073         * lex.h: Fixed copyright assignment.
14074         * parse-scan.y: Likewise.
14075         * parse.h: Fixed copyright assignment.
14076         (build_debugable_stmt, complete_for_loop): New function prototypes.
14077         * parse.y: Fixed copyright assignment.
14078         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
14079         size_zero_node when completing a loop with no exit condition.
14080         (for_statement_nsi:): Define action.
14081         (for_init:, for_update:): Return size_zero_node when empty.
14082         (declare_local_variables): Call build_debugable_stmt.
14083         (build_debugable_stmt): New function.
14084         (build_loop_body): Build debugable statement around loop
14085         condition part.
14086         (complete_loop_body): Take into account the debugable statement
14087         around the EXIT_EXPR.
14088         (complete_loop_body): New function.
14089         (patch_exit_expr): Fixed condition inversion.
14090
14091 1998-09-02  Tom Tromey  <tromey@cygnus.com>
14092
14093         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14094         name of thread define.
14095         * jvspec.c (THREAD_NAME): New macro.
14096         (GCLIB): Likewise.
14097         (THREADLIB): Likewise.
14098         (lang_specific_driver): Recognize attempt to link with thread
14099         library or gc library.  Recognize -ljava on command line so it
14100         isn't linked against more than once.
14101
14102 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14103
14104         * parse-scan.y (report_main_declaration): Name of the class
14105         containing `main' can be a qualified name.
14106
14107 1998-08-31  Tom Tromey  <tromey@cygnus.com>
14108
14109         * config-lang.in: Changed gjavac to gjc everywhere.
14110         * Make-lang.in: Changed gjavac to gjc everywhere.
14111
14112 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14113
14114         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14115         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14116         and install the files.
14117         * Makefile.in (JAVA_OBJS_LITE): New variable.
14118         (compiler:): Now include jv-scan as a dependency.
14119         (../jv-scan$(exeext), parse-scan.c): New targets.
14120         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14121         * config-lang.in (compilers): Removed gcj, gjavah from the list.
14122         * jcf-parse.c (parse_source_file): Call java_layout_classes and
14123         check for errors even if parse_only.
14124         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14125         defined.
14126         (yylex): New function. Uses java_lex body.
14127         (java_lex): Removed commented out statement. Remove local variable
14128         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14129         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14130         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14131         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14132         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14133         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14134         where appropriate.
14135         (java_lex_error): Empty if JC1_LITE is defined.
14136         (java_get_line_col): Return 0 if JC1_LITE is defined.
14137         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14138         SET_MODIFIER_CTX): Moved into the section containing the macros
14139         conditionally defined by JC1_LITE.
14140         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14141         argument if JC1_LITE is defined.
14142         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14143         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14144         is defined.
14145         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14146         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14147         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14148         to different values according to JC1_LITE.
14149         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14150         declared if JC1_LITE set.
14151         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14152         defined if JC1_LITE not set.
14153         (struct parser_ctx): Reorganized and skip the jc1 front end part
14154         if JC1_LITE set.
14155         (java_layout_classes): New function definition.
14156         (java_push_parser_context, java_init_lex, yyparse, yylex,
14157         yyerror): Prototype always declared. All other static function
14158         prototypes declared only if JC1_LITE is not set.
14159         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14160         declared in parse.h.
14161         (java_layout_classes): New function.
14162         (java_complete_expand_methods): No longer layout the class here.
14163         * parse-scan.y: New file.
14164         * jv-scan.c: New file.
14165
14166 1998-08-25  Tom Tromey  <tromey@cygnus.com>
14167
14168         * gjavah.c (main): Handle -friend option.
14169         (friend_specs): New global.
14170         (generate_access): Handle friend_specs.
14171         (process_file): Likewise.
14172         (MAX_FRIENDS): New macro.
14173         (friend_count): New global.
14174         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
14175         Changed all callers.
14176
14177 1998-08-24  Per Bothner  <bothner@cygnus.com>
14178
14179         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
14180         (main):  Handle processing all the entries of a named .zip archive.
14181         * jcf-io.c (jcf_trim_old_input):  New function.
14182         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
14183
14184 1998-08-24  Per Bothner  <bothner@cygnus.com>
14185
14186         * lang.c (flag_assume_compiled):  Make default be on.
14187
14188 1998-08-21  Per Bothner  <bothner@cygnus.com>
14189
14190         * jcf-dump.c:  Add bunches of flags to control output more.
14191         (process_class):  New function;  support printing more than one class.
14192         (main): Support new --print-main and --javap flags.
14193         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
14194         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
14195
14196 1998-08-20  Per Bothner  <bothner@cygnus.com>
14197
14198         Change mangling of dispatch table to match C++ vtable (w/thunks).
14199         * class.c (build_dtable_decl), java-tree.h:  New function.
14200         (make_class_data):  Call it.
14201         * decl.c (init_decl_processing):  Likewise.
14202
14203 1998-08-19  Warren Levy  <warrenl@cygnus.com>
14204
14205         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14206         soft_anewarray; adjust args passed.
14207         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14208         match _Jv_NewObjectArray.
14209
14210 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14211
14212         * decl.c (push_labeled_block, pop_labeled_block): New functions.
14213         * expr.c (loopup_label): Call create_label_decl.
14214         (create_label_decl): New function.
14215         (java_lang_expand_expr): Call expand_start_bindings with argument
14216         set to zero.
14217         * java-tree.h Added space after PROTO in function declarations
14218         when necessary.
14219         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14220         (create_label_decl, push_labeled_block): New function
14221         declarations.
14222         * lex.c (label_id): Initialize.
14223         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14224         switch.
14225         * parse.h Added space after PROTO in function declarations when
14226         necessary.
14227         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14228         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14229         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14230         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14231         macros.
14232         (struct parser_ctxt): New fields current_loop,
14233         current_labeled_block.
14234         (build_if_else_statement, patch_if_else_statement,
14235         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14236         generate_labeled_block, complete_labeled_statement,
14237         build_bc_statement, patch_bc_statement, patch_loop_statement,
14238         build_new_loop, build_loop_body, complete_loop_body): New function
14239         declarations.
14240         * parse.y (java_warning_count): New global variable.
14241         (label_id): New static variable.
14242         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14243         (block:): Return size_zero_node when block is empty.
14244         (empty_statement:): Return size_zero_node.
14245         (statement:): Implement supplemental action when for_statement: is
14246         reduced.
14247         (label_decl:): New rule.
14248         (labeled_statement:): Rewritten using label_decl. Actions
14249         implemented.
14250         (labeled_statement_nsi:): Likewise.
14251         (if_then_statement): Actions implemented.
14252         (while_expression): New rule.
14253         (while_statement:): Rewritten using while_expression. Actions
14254         implemented.
14255         (while_statement_nsi:): Likewise.
14256         (do_statement_begin:): New rule.
14257         (do_statement:): Rewritten using do_statement_begin. Actions
14258         implemented.
14259         (for_statement:): Rewritten using for_begin. Actions implemented.
14260         (for_statement_nsi:): Likewise.
14261         (for_header:, for_begin:): New rules.
14262         (for_init:): Actions implemented.
14263         (statement_expression_list:, break_statement:,
14264         continue_statement:): Likewise.
14265         (yyerror): Count number of issued warning(s).
14266         (java_report_errors): Report error(s) and/or warning(s).
14267         (java_complete_class): Use build_java_argument_signature to
14268         recompute completed method signature.
14269         (java_check_regular_methods): New locals method_wfl and aflags.
14270         Use method_wfl instead of lookup_cl during error reports. Fixed
14271         indentation and modified some error messages. Use
14272         lang_printable_name in method instead of the DECL_NAME. New code
14273         to issue warnings on methods not overriding corresponding methods
14274         private to a different package.
14275         (java_method_add_stmt): Call add_stmt_to_compound.
14276         (add_stmt_to_compound): New function.
14277         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14278         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14279         (build_if_else_statement, patch_if_else_statement,
14280         build_labeled_block, generate_labeled_block,
14281         complete_labeled_statement, build_new_loop, build_loop_body,
14282         complete_loop_body, patch_loop_statement, build_bc_statement,
14283         patch_bc_statement, patch_exit_expr): New functions.
14284         * typeck.c (build_java_signature): Build argument signature before
14285         enclosing it in between parenthesis.
14286
14287 1998-08-17  Warren Levy  <warrenl@cygnus.com>
14288
14289         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14290         (JAVA_OBJS): Added reminder comment
14291
14292 1998-08-13  Nick Clifton  <nickc@cygnus.com>
14293
14294         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14295         be interpreted as a long long.
14296
14297 1998-08-13  Warren Levy  <warrenl@cygnus.com>
14298
14299         * decl.c (init_decl_processing): Use _Jv_InitClass, not
14300         soft_initialise_class.  Use _Jv_NewMultiArray, not
14301         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
14302         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
14303         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
14304         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14305
14306 1998-08-12  Per Bothner  <bothner@cygnus.com>
14307
14308         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14309         length_identifier_node):  New global tree node constants.
14310         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
14311         Replace uses by super_identifier_node etc.
14312         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
14313
14314         * parse.y (resolve_field_access):  Don't special-case ".length" if
14315         flag_emit_class_files.
14316         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
14317         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
14318         and ARRAY.length.
14319
14320 1998-08-11  Per Bothner  <bothner@cygnus.com>
14321
14322         * decl.c (init_decl_processing): Remove unused method_type_node fields.
14323         * class.c (make_method_value):  Remove init for removed fields.
14324
14325         * class.c (layout_class):  Use build_java_argument_signature.
14326         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
14327
14328         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
14329         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
14330         (build_java_signature):  Don't use push_java_argument_signature.
14331
14332         * typeck.c (lookup_argument_method):  New function.
14333         * parse.y (java_check_regular_methods):  Use lookup_argument_method
14334         instead of lookup_java_method2 followed by lookup_java_method.
14335
14336         * parse.y (check_method_redefinition):  Minor optimization.
14337
14338         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
14339         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14340
14341 1998-08-10  Tom Tromey  <tromey@cygnus.com>
14342
14343         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14344         c-pragma.o.
14345
14346         * gjavah.c (java_float_finite): Use K&R-style definition.
14347         (java_double_finite): Likewise.
14348         (generate_access): Now returns void.  Changed all callers.
14349         (last_access_generated): Removed.
14350         (process_file): Only make a single pass over the .class file.
14351
14352 1998-07-29  Per Bothner  <bothner@cygnus.com>
14353
14354         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
14355         for compatibility for G++ (with -fvtable-thunks).
14356         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
14357
14358         * gjavah.c (process_file):  Use public inheritance for super-class.
14359
14360 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14361
14362         * lex.c (java_init_lex): Initialize ctxp->package.
14363         * parse.h (struct parser_ctxt): package and package_len replaced
14364         by tree package, an identifier node. Field method_decl_list is
14365         gone. Fixed comments.
14366         (lookup_field_wrapper, merge_qualified_name, not_accessible,
14367         class_in_current_package): New function prototypes.
14368         * parse.y (array_type:): Set class loaded flag on primitive type
14369         arrays.
14370         (package_declaration:): Assign ctxp->package to the
14371         identifier node.
14372         (method_invocation:): Handle invocation of method qualified by
14373         `super'.
14374         (single_type_import_declaration:): Removed ambiguity check.
14375         (java_pop_parser_context): New local variable `next'. Reset and
14376         set IMPORT_CLASSFILE_NAME flags on current and previous import
14377         list.
14378         (java_accstring_lookup): Use new local macro COPY_RETURN.
14379         (lookup_field_wrapper): New function.
14380         (parser_qualified_classname): Use merge_qualified_name.
14381         (parser_check_super_interface): Broaden error message.
14382         (do_resolve_class): Check for qualified class name in the current
14383         compilation unit if appropriate.
14384         (process_imports): Check for already defined classes.
14385         (check_pkg_class_access): Got rid of call to
14386         get_access_flags_from_decl.
14387         (java_complete_expand_methods): Call safe_layout_class based on
14388         the current class size.
14389         (make_qualified_primary): Build a WFL qualification on primary if
14390         none exists.
14391         (merge_qualified_name): New function.
14392         (make_qualified_name): Use merge_qualified_name.
14393         (resolve_expression_name): Use safe_lookup_field.
14394         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14395         (resolve_qualified_expression_name): Likewise. Check on resolved
14396         element accessibility.
14397         (not_accessible_p, class_in_current_package): New functions.
14398         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14399         (patch_method_invocation_stmt): Merged common pieces. Check
14400         accessibility of invoked method.
14401         (check_for_static_method_reference): Add returned type in error
14402         message.
14403         (invocation_mode): Get rid of bogus check on PRIVATE methods.
14404         (refine_accessible_methods_list): Merged two conditions in test.
14405         (java_complete_class): Sanity check on stabilize_ref gone.
14406         * zextract.c (read_zip_archive): Cast lseek second argument to long.
14407
14408 1998-07-28  Per Bothner  <bothner@cygnus.com>
14409
14410         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
14411
14412 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14413
14414         * gjavah.c (F_NAN): Removed.
14415         (F_NAN_MASK): New macro.
14416         (F_POSITIVE_INFINITY): Removed.
14417         (F_NEGATIVE_INFINITY): Likewise.
14418         (java_float_finite): Rewrote.
14419         (D_NAN_MASK): Renamed.
14420         (java_double_finite): Rewrote.
14421         (D_POSITIVE_INFINITY): Removed.
14422         (D_NEGATIVE_INFINITY): Likewise.
14423
14424         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14425         If verbose, print underlying representation of value in hex.
14426
14427 1998-07-24  Per Bothner  <bothner@cygnus.com>
14428
14429         * buffer.h, buffer.c:  New files.
14430         * Makefile.in (JAVA_OBJS):  Add buffer.o.
14431
14432         Support locals variables and writing their debug entries to .class.
14433         * jcf-write.c:  Simplify some by user new buffer type.
14434         (vode_buffer_grow):  Removed.
14435         (struct localvar_info):  New type.
14436         (localsvars, localvartable):  New buffers.
14437         (localvar_alloc, localvar_free):  New functions.
14438         (generate_bytecode_insns):  Handle local variables.
14439         (generate_classfile):  Write LocalVariableTable attribute.
14440
14441 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14442
14443         * jcf-io.c (open_in_zip): Check the zipfile magic number.
14444         * zipfile.h (ZIPMAGIC): New macro.
14445
14446 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14447
14448         * Makefile.in (gjavah.o): Updated dependencies.
14449         (jcf-dump.o): Likewise.
14450         (all.indirect): Use ../gjavah.
14451         (../gjavah$(exeext)): Likewise.
14452         (clean): Don't remove gjavah.
14453         (clean): Remove parse.c, not java/parse.c.
14454         * Make-lang.in (java): Added gjavah.
14455         (gjavah$(exeext)): New target.
14456         (GJAVAH_SOURCES): New macro.
14457         (java.all.build): Added gjavah.
14458         (java.all.cross): Likewise.
14459         (java.rest.encap): Likewise.
14460         * config-lang.in (compilers, stagestuff): Added gjavah.
14461
14462 1998-07-23  Tom Tromey  <tromey@cygnus.com>
14463
14464         * gjavah.c (java_float_finite): New function.
14465         (java_double_finite): Likewise.
14466         (F_POSITIVE_INFINITY): New macro.
14467         (F_NEGATIVE_INFINITY): Likewise.
14468         (F_NAN): Likewise.
14469         (D_POSITIVE_INFINITY): Likewise.
14470         (D_NEGATIVE_INFINITY): Likewise.
14471         (D_NAN): Likewise.
14472         (print_field_info): Use java_float_finite and java_double_finite.
14473
14474 1998-07-23  Per Bothner  <bothner@cygnus.com>
14475
14476         * parse.y (method_header):  Name "this" implicit argument.
14477
14478 1998-07-22  Per Bothner  <bothner@cygnus.com>
14479
14480         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
14481         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
14482         (put_linenumber):  New function.
14483         (generate_bytecode_insns, generate_classfile):  Write line numbers.
14484
14485 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14486
14487         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14488         (lookup_name, build_known_method_ref, build_class_init,
14489         build_invokevirtual, invoke_build_dtable, match_java_method,
14490         build_field_ref, pushdecl_force_head, build_java_binop,
14491         binary_numeric_promotion, build_decl_no_layout,
14492         build_java_arrayaccess, build_newarray, build_anewarray,
14493         build_java_array_length_access, build_java_arraynull_check): New
14494         extern function prototypes.
14495         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14496         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14497         java-tree.h.
14498         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14499         to NULL
14500         * jcf.h (jcf_out_of_synch): New extern function prototype.
14501         * parse.h: Static/global function implemented in parse.y
14502         prototyped and declarations moved at the end of the file.
14503         (DECL_P): Check that the argument isn't null.
14504         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14505         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14506         (QUAL_DECL_TYPE): New macro.
14507         (PARAMS): Macro definition removed.
14508         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14509         (return_statement:): Call build_return.
14510         (field_access:): Call make_qualified_primary in sub rule.
14511         (method_invocation:): Build method invocation and call
14512         make_qualified_primary when processing primaries.
14513         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14514         get_type_from_signature.
14515         (java_check_regular_method): Extra integer 0 argument when calling
14516         lookup_java_method2.
14517         (lookup_java_interface_method2): Extra method DECL argument when
14518         calling lookup_java_interface_method2.
14519         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14520         COMPOUND_EXPR node.
14521         (java_complete_expand_method): Layout current class iff not
14522         already done. Don't process interface's methods.
14523         (java_complete_expand_method): Use super class only if it
14524         exists. Use current class otherwise.
14525         (make_qualified_primary): New function.
14526         (resolve_expression_name): Process qualified expression or
14527         expression from primary the same way.
14528         (resolve_expression_name): Two last arguments to
14529         resolve_field_access are now NULL_TREEs.
14530         (resolve_field_access): New variable is_static. Local field must
14531         be DECLs. is_static computed on field DECLs only. Append code in
14532         where_found to the field access if necessary. Use QUAL_DECL_TYPE
14533         to initialize field_type.
14534         (resolve_qualified_expression_name): New local variable,
14535         previous_call_static and is_static. Handle primaries with function
14536         calls, casts, array references and `this'. `super' now handled as
14537         `(super_class)this'. Use is_static to clarify boolean expressions.
14538         Added code to handle case where a proper handle is required to
14539         access a field. Use QUAL_DECL_TYPE where applicable.
14540         (maybe_access_field): New function.
14541         (patch_method_invocation_stmt): New arguments primary, where,
14542         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14543         deleted. Use `where' as a type to search from if specified. Check
14544         for static method reference where forbidden. Append primary or
14545         current_this to the argument list if not calling constructor nor
14546         static methods.
14547         (check_for_static_method_reference): New function.
14548         (patch_invoke): Layout the class on which new is done if
14549         necessary.
14550         (lookup_method_invoke): Changed format to report errors on
14551         methods.
14552         (qualify_ambiguous_name): New local variable this_found. Now
14553         handle things from primaries. Method call are considered
14554         expression names.
14555         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14556         changed into NULLs.
14557         (not_initialized_as_it_should_p): Comply with the new DECL_P.
14558         (java_complete_tree): New case fo RETURN_EXPR. Process function
14559         call arguments in separate function.
14560         (complete_function_arguments): New function.
14561         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14562         anymore.
14563         (patch_assignment): Take the return function slot into account as
14564         a RHS. Distinguish assignment from a return.
14565         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14566         when checking methods in interfaces.
14567         (resolve_type_during_patch): NULL argument to unresolve_type_p
14568         instead of NULL_TREE.
14569         (patch_newarray): Fixed typo in comment.
14570         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14571         (build_return, patch_return): New functions.
14572         * typeck.c (lookup_java_constructor): Fixed typo in comment.
14573
14574 1998-07-21  Per Bothner  <bothner@cygnus.com>
14575
14576         * constants.c (find_name_and_type_constant, find_fieldref_index,
14577         find_methodref_index):  New methods.
14578         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
14579         just return given method.  Also, rename to build_known_method_ref.
14580         (expand_invoke):  Rename call to build_invoke_non_interface.
14581         * java-tree.h, parse.h:  Update prototype.
14582         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
14583         (such as expand_expr_stmt) if flag_emit_class_files.
14584         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14585         STACK_TARGET, IGNORE_TARGET):  New macros.
14586         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
14587         (generate_bytecode_insn):  New function to generate method's bytecode.
14588         (generate_classfile):  Node generate Code attribute for a method.
14589         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14590         push_long_const, field_op, adjust_typed_op, maybe_wide):
14591         New functions used by generate_bytecode_insn.
14592
14593         * typeck.c (signature_include_return):  Remove variable.
14594         (push_java_argument_signature, build_java_argument_signature):  New.
14595         (build_java_signature):  Use push_java_argument_signature.
14596         * parse.y:  Use build_java_argument_signature instead of fiddling
14597         with signature_include_return.
14598
14599 1998-07-17  Tom Tromey  <tromey@cygnus.com>
14600
14601         * gjavah.c (print_c_decl): Always generate JArray<>* for array
14602         types.
14603
14604         * Makefile.in (all.indirect): Added gjavah$(exeext).
14605         (gjavah$(exeext)): Added $(exeext).
14606         (clean): Likewise.
14607
14608 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14609
14610         * class.c (layout_class): Call to java_layout_parsed_class replace
14611         by safe_layout_class.
14612         * expr.c (build_java_array_length_access): Removed static storage
14613         class in the function definition.
14614         (build_java_arraynull_check): Likewise.
14615         Also fixed typos in two comments.
14616         * lex.c (java_init_lex): Initialize static global kw_length.
14617         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14618         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14619         java_lex_error.
14620         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14621         * parse.h (resolve_no_layout): New static function declaration.
14622         (get_identifier_in_static): Declaration removed.
14623         (java_layout_parsed_class): Function name declaration changed to
14624         safe_layout_class.
14625         (build_newarray_node, patch_newarray, resolve_type_during_patch,
14626         not_initialized_as_it_should_p, build_this): New static function
14627         declarations.
14628         (pushdecl_force_head, build_java_binop, int_fits_type_p,
14629         binary_numeric_promotion, stabilize_reference,
14630         build_decl_no_layout, build_java_arrayaccess): Extern function
14631         declarations moved into their own section.
14632         (build_newarray, build_anewarray, build_java_array_length_access,
14633         build_java_arraynull_check): New extern function declarations.
14634         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14635         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14636         fake tree codes.
14637         (CALL_CONSTRUCTOR_P): New macro.
14638         * parse.y (kw_length): New static global tree node.
14639         (return_statement): Tagged <node>.
14640         (RETURN_TK): Tagged <operator>.
14641         (variable_declarator_id:): Build variable declaration with an
14642         empty initialization value if a syntax error was found in the
14643         initialization part of the variable declaration.
14644         (statement_without_trailing_substatement:): return_statement: now
14645         uses the default rule.
14646         (return_statement:): Temporarily fixed to return NULL_TREE.
14647         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14648         (class_instance_creation_expression:): Class creation rules now
14649         call build_method_invocation upon reduction.
14650         (array_creation_expression:): Rules call build_newarray_node upon
14651         reduction.
14652         (dim_exprs:): Build a list of dimension expressions.
14653         (dim_expr:): Store location of the OSB_TK in the dimension
14654         expression node.
14655         (method_invocation:): Added a new error rule.
14656         (build_unresolved_array_type): WFL argument may also be an array
14657         on a primitive type. Name of the argument changed to reflect this.
14658         (method_declarator): Insert argument type at the beginning of the
14659         argument type list and later reverse the list.
14660         (unresolved_type_p): Argument 'returned' may be optionally
14661         NULL_TREE.
14662         (java_layout_class_from_source): Function renamed
14663         safe_layout_class.
14664         (resolve_and_layout): Now call resolve_no_layout and
14665         safe_layout_class.
14666         (resolve_no_layout): New function.
14667         (purify_type_name): New function.
14668         (complete_class_report_errors): Call purify_type_name during error
14669         report on a type not found.
14670         (process_imports): error_found local variable doesn't need to be
14671         initialized to zero.
14672         (declare_local_variables): New local type_wfl. Fixed typo in error
14673         message. type_wfl assigned to unresolved type and used to register
14674         incomplete type. Build a WFL around the variable initialization
14675         statement so that debug info can be generated on it.
14676         (source_start_java_method): Reverse argument list after they've
14677         been processed.
14678         (current_this): New static global variable.
14679         (java_complete_expand_methods): Set current_this when appropriate.
14680         (resolve_expression_name): Build correct static and non static
14681         field access bearing a simple name.
14682         (resolve_field_access): Resolve the length field of arrays. Handle
14683         f.m() cases.
14684         (patch_method_invocation_stmt): Set the type of the method
14685         invocation to error_mark_node. This value is later overridden by a
14686         valid type, if any. Don't handle qualified constructor invocation
14687         as qualified method invocation. Call lookup_method_invoke with its
14688         new flag. It's no longer necessary to access the selected method
14689         as the value of a tree list. Handle constructor invocation.
14690         (patch_invoke): Reverse argument list when invoking non interface
14691         methods. Insert call to new as the first argument of the
14692         constructor.
14693         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14694         defined within a final class. Return INVOKE_STATIC if the invoked
14695         method is a constructor.
14696         (lookup_method_invoke): New lc argument is a flag to indicate a
14697         constructor lookup. Now handle constructor lookup. Choose the most
14698         specific method in case several were matching the invocation
14699         requirements. Return a method decl instead of a tree list featuring
14700         one single method decl element.
14701         (refine_accessible_methods_list): New lc flag argument to
14702         indicate that a constructor is being looked up.
14703         (not_initialized_as_it_should_p): New function.
14704         (java_complete_tree): Now process fake tree codes
14705         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14706         save_expr on resolved function call arguments. Case on
14707         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14708         (patch_assignment): LHS can be a field access expression. When
14709         dealing with reference, lhs_type is the promoted type of the
14710         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14711         applicable.
14712         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14713         (patch_binop): Use not_initialized_as_it_should_p where
14714         applicable.
14715         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14716         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14717         where applicable.
14718         (resolve_type_during_patch): New function.
14719         (patch_cast): Call resolve_type_during_patch to resolve type and
14720         report error accordingly.
14721         (patch_array_ref): Use not_initialized_as_it_should_p where
14722         applicable. Array base expression is saved before being
14723         used. Promote the type of an array elements if it contains non
14724         builtin types.
14725         (build_newarray_node, patch_newarray, build_this): New functions.
14726
14727 1998-07-16  Tom Tromey  <tromey@cygnus.com>
14728
14729         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14730         increment it in `for' statement.
14731         (print_field_info): If number is inf or nan, don't print it.
14732         (print_method_info): If method name is `delete', just ignore it.
14733         (print_c_decl): Special-case jstringArray.
14734
14735         * gjavah.c (help): New function.
14736         (no_argument): New function.
14737         (usage): Changed text.
14738         (main): Rewrote argument handling.  Now handles -v, --help,
14739         --version.
14740         (version): New function.
14741         (found_error): New global.
14742         (main): Return found_error.
14743         (generate_access): Set found_error.
14744         (print_c_decl): Likewise.
14745
14746 1998-07-15  Tom Tromey  <tromey@cygnus.com>
14747
14748         * gjavah.c (print_c_decl): Don't print "," when examining field.
14749         Skip type name when looking at "[L" types.
14750         (process_file): Now static.
14751         (generate_access): Now returns int.
14752         (last_access_generated): New global.
14753         (process_file): Clear last_access_generated; make multiple passes
14754         over the class.
14755         (print_field_info): Just return if generate_access returns true.
14756         (print_method_info): Likewise.  Also, allow <init> functions to
14757         pass through.
14758         (print_c_decl): Added is_init argument.  Print constructors
14759         properly.
14760         (print_cxx_classname): Use UTF8_GET to extract characters from
14761         string.
14762         (print_base_classname): New function.
14763         (print_class_decls): New function.
14764         (process_file): Use it.
14765         (utf8_cmp): New function.
14766
14767 1998-07-13  Nick Clifton  <nickc@cygnus.com>
14768
14769         * lang-options.h: Format changed to match changes in gcc/toplev.c
14770         to implement a --help option.
14771
14772 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
14773
14774         * decl.c (init_decl_processing): Revert change to dtable_type.
14775
14776 1998-07-09  Per Bothner  <bothner@cygnus.com>
14777
14778         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
14779
14780 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
14781
14782         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
14783
14784         * lang.c (lang_init): Default flag_exceptions to 1, without
14785         checking to see if it's 2 first.
14786
14787 1998-07-08  Jeffrey A Law  (law@cygnus.com)
14788
14789         * constants.c: Include "system.h".
14790         * decl.c: Likewise.
14791         * lang.c (flag_new_exceptions): Get via extern now.
14792         (lang_init_options): New functions.  Turn on flag_new_exceptions.
14793
14794 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14795
14796         * lex.c (java_lex): Return 0 when we see an invalid character in
14797         the input.
14798
14799         * lex.c (java_read_char): Specify extra argument when calling
14800         java_lex_error.
14801         (java_read_unicode, java_parse_end_comment,
14802         java_parse_escape_sequence): Likewise,
14803         (java_lex): Specify extra argument when calling
14804         java_lex_error. Test that IDs are beginning with a legal character
14805         for IDs. Handle invalid characters with an error message and a
14806         call to java_lex_error.
14807         (java_lex_error): Adjust column position by new argument
14808         `forward'. Issue an error even if in the middle of reporting an
14809         other error.
14810
14811 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
14812
14813         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
14814         we don't explicitly put a null pointer when we're copying it.
14815
14816 1998-07-07  Tom Tromey  <tromey@cygnus.com>
14817
14818         * gjavah.c (print_cxx_classname): New function.
14819         (super_class_name): Likewise.
14820         (print_super_fields): Removed.
14821         (in_super): Removed.
14822         (print_field_info): Never generate #defines.
14823         (print_c_decl): Changed generated types to match JNI.  No longer
14824         print class name before method name.
14825         (print_method_info): Print "static" before static methods.
14826         Print "virtual" before non-final methods.
14827         (usage): Use exit(1), not exit(-1).
14828         (main): Likewise.
14829         (print_field_info): Use %.17g to print a double.
14830         (last_access): New globals.
14831         (process_file): Initialize last_access.
14832         (usage): Now static.
14833         (ACC_VISIBILITY): New define.
14834         (generate_access): New function.
14835         (print_field_info): Call it.
14836         (print_method_info): Likewise.  Also, generate information for all
14837         methods, not just native methods.  Return void.
14838         (print_c_decl): Return void.
14839         (print_field_info): Return void.
14840
14841 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14842
14843         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
14844         processing the jc1 grammar file. Prefix bison functions and
14845         variables with java_.
14846         (parse.c): Dependencies on parse.h and lex.h
14847         * expr.c (build_java_arrayaccess): Function now global.
14848         * java-tree.h: Comment reorganized to carry on previous
14849         classification effort.
14850         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
14851         RESOLVE_TYPE_NAME_P): New flags on WFLs.
14852         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
14853         java_parse (new prefix java_ generated by bison).
14854         (java_layout_parsed_class, java_register_parsed_class): Function
14855         call removed.
14856         (yyparse): Removed unnecessary call to init_outgoing_cpool.
14857         * lex.c (static tree wfl_op): Variable deleted.
14858         (java_init_lex): Initialize kw_super and kw_this. Initialize more
14859         ctxp fields to NULL_TREE.
14860         (java_lex): No longer create WFL for operators. Filename caching
14861         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
14862         created as STRING_CST and later expanded. Removed extra argument
14863         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
14864         and SUPER.
14865         (build_wfl_node): Removed code in comments.
14866         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
14867         store token and location data in the current bison token.
14868         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
14869         static/extern function declaration at the beginning of the file.
14870         (struct qualification): Data structure definition deleted.
14871         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
14872         (qualify_ambiguous_name): Function declaration modified. Function
14873         now returns nothing.
14874         (build_array_ref, patch_array_ref, make_qualified_name,
14875         resolve_qualified_expression_name, maybe_generate_clinit,
14876         resolve_field_access): New static function declarations.
14877         (build_java_arrayaccess): New extern function declaration.
14878         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
14879         (CALL_EXPR_PRIMARY): Macro deleted.
14880         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
14881         (struct parser_ctxt): Field initialized_final
14882         removed. non_static_initialized, static_initialized: New fields.
14883         * parse.y (static tree kw_super, static tree kw_this): New global
14884         static.
14885         (%union): tree wfl field of operator member replaced by int
14886         location. WFLs are non longer created for operators.
14887         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
14888         (qualified_name:): Now calls make_qualified_name to build the
14889         identifier.
14890         (type_declaration:): Consider generating <clinit> when class
14891         parsing completed.
14892         (variable_declarator:): Directly build an assignment node when the
14893         variable is initialized when declared.
14894         (this_or_super:): Build a WFL and set current location when THIS
14895         or SUPER are parsed.
14896         (expression_statement:): Wrap statement around a WFL.
14897         (primary_no_new_array:): Fixed typo. Changed value returned by
14898         THIS_TK because of its new type (temporary).
14899         (dim_exprs:): Temporary fix because of OSB_TK's new type.
14900         (field_access:): Build qualified name with SUPER.
14901         (method_invocation:): Fixed returned value because of SUPER's new
14902         type.
14903         (array_access:): Use OSB_TK location information.
14904         (post_increment_expression:, post_decrement_expression:,
14905         unary_expression:, pre_increment_expression:,
14906         pre_decrement_expression:, unary_expression_not_plus_minus:,
14907         cast_expression:, multiplicative_expression:,
14908         additive_expression:, shift_expression:, relational_expression:,
14909         equality_expression:, and_expression:, exclusive_or_expression:,
14910         inclusive_or_expression:, conditional_and_expression:,
14911         conditional_or_expression:, assignment:): Use new location/token
14912         information available on operators.
14913         (create_class): Set super_decl_type to NULL_TREE when processing
14914         java.lang.Object.
14915         (register_fields): Field initialization is now a MODIFY_EXPR
14916         node. Chain initialization code to the matching lists (according
14917         to the field declaration modifiers).
14918         (maybe_generate_clinit): New function.
14919         (method_header): Don't set method's DECL_NAME to a WFL when adding
14920         methods to java.lang.Object.
14921         (resolve_and_layout): Now can return NULL_TREE if the type
14922         resolution fails. Otherwise, return the class DECL instead of its
14923         TYPE.
14924         (check_method_redefinition): Don't patch method DECL_NAME if it
14925         belongs to java.lang.Object.
14926         (process_imports): Simply assign error_found to the value returned
14927         by check_pkg_class_access.
14928         (declare_local_variables): Don't use their init statements (if
14929         any) when parsing error were previously found. Reuse MODIFY_EXPR
14930         build during parsing as an init statement.
14931         (java_method_add_stmt): Now return the current method body.
14932         (java_layout_parsed_class, java_register_parsed_class): Functions
14933         removed.
14934         (java_complete_expand_methods): Initialize the constant pool on a
14935         per class basis. Layout the classes before expanding their method
14936         bodies. Don't try expand artificial constructor code if error were
14937         found. Make the classes data and register them if no error were
14938         found.
14939         (java_complete_expand_method): Retrieve an artificial constructor
14940         argument list before entering its body. Assign the top block to
14941         the artificial constructor function body and set types of declared
14942         blocks and compound statements to void. Walk method body if not an
14943         artificial constructor.
14944         (make_qualified_name, cut_identifier_in_qualified): New functions.
14945         (resolve_expression_name): Fixed comments. Save/restore the
14946         current class CLASS_LOADED_P flag value. Build non qualified
14947         static field access and handle qualified expression names.
14948         (resolve_field_access, resolve_qualified_expression_name): New
14949         functions.
14950         (patch_method_invocation_stmt): Use the new expression resolution
14951         scheme, calling resolve_field_access when the function call is
14952         resolved as an expression.
14953         (qualify_ambiguous_name): Function rewritten to work on qualified
14954         expression produced by make_qualified_name.
14955         (java_complete_tree): Promote type when function's argument are
14956         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
14957         the assignment to discover further errors if RHS is a expression
14958         name that fails to evaluate. Declare LHS initialized even though
14959         the assignment failed. Don't use the location variable and removed
14960         extra argument in patch function calls. Now handle the ARRAY_REF
14961         case and build internal string representation when STRING_CSTs are
14962         walked.
14963         (build_method_invocation): Don't wrap function call around a WFL.
14964         (build_assignment): Likewise. Use the operator location
14965         information.
14966         (patch_assignment): Handle array access LHSs. Handle error
14967         provenance, resulting in a better error report.
14968         (build_binop): Use op_location from operator as binop location
14969         information.
14970         (build_unaryop, build_incdec, build_cast): Likewise.
14971         (patch_binop): Extract location information from the node. Fixed
14972         typo in error message.
14973         (patch_unary_op): Extract location information from the node.
14974         (build_array_ref, patch_array_ref): New functions.
14975
14976 1998-07-01  Tom Tromey  <tromey@cygnus.com>
14977
14978         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
14979         match _Jv_IsInstanceOf.
14980         * decl.c (init_decl_processing): Use _Jv_NewArray, not
14981         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
14982
14983 1998-06-30  Tom Tromey  <tromey@cygnus.com>
14984
14985         * decl.c (init_decl_processing): Functions are now named
14986         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
14987
14988 1998-06-29  Per Bothner  <bothner@cygnus.com>
14989
14990         * java-tree.h (load_class):  Add prototype.
14991         * class.c (is_compiled_class):  Add missing arg to load_class.
14992         * expr.c (expand_java_NEW):  Call load_class.
14993         * parse.y (process_import):  Removed bogus use of void return value.
14994
14995 1998-06-25  Per Bothner  <bothner@cygnus.com>
14996
14997         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
14998         Function name is "_Jv_Throw" instead of "soft_athrow".
14999         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
15000         Function name is "_Jv_AllocObject" instead of "soft_new".
15001         Takes an extra parameter (object size).
15002         * expr.c:  Update calls.
15003
15004 1998-06-24  Per Bothner  <bothner@cygnus.com>
15005
15006         * lex.c (java_get_line_col):  Handle end-of-file.
15007         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
15008
15009 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
15010
15011         * lang.c (lang_init): Make -fexceptions the default.
15012         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
15013         exception handling is not turned on.
15014
15015 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
15016
15017         * lang.c (flag_new_exceptions): Make this this default.
15018         * decl.c (end_java_method): Call emit_handlers.
15019         * except.c (method_init_exceptions): Set language code and version.
15020         (expand_start_java_handler): Enable exception, and call
15021         expand_eh_region_start.
15022         (expand_end_java_handler): Enable exception, and set up catch blocks.
15023         (emit_handlers): New routine to generate the saved handlers.
15024         * java-except.h (emit_handlers): Add prototype.
15025
15026 1998-06-12  Per Bothner  <bothner@cygnus.com>
15027
15028         We used to have three different representations of the constant pool:
15029         the CPool structure, the tree_constant_pool, and the constructures
15030         used to build the Class object (which may need class and string
15031         constants) in compiled code.  None were appropriate for compiling
15032         to .class files, so I did a major overhaul.
15033
15034         First, the tree_constant_pool array was removed.  Things were
15035         modified to the CPool structure in the JCF could be used.
15036         Second, a "capacity" field was added to the CPool, and functions
15037         written to search for a matching constant, adding one if not found.
15038         The code that generated the Class object was changed to use a CPool.
15039         The actual TREE_LISTs used to build the CONSTRUCTORs used for
15040         the static Class object are now only in build_constants_constructor.
15041         Finally, I wrote code which can generate a .class file (including its
15042         constant pool) from the RECORD_TYPE of a class.  This is a big step
15043         on the way to compiling Java source into .class files.
15044
15045         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
15046         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
15047
15048         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
15049         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
15050         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
15051         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
15052         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
15053         (lang_type):  Removed constant_pool field.
15054         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
15055         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
15056         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
15057         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
15058
15059         * constants.c (current_constant_pool_tags, current_constant_pool_data,
15060         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
15061         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
15062         (set_constant_entry, find_constant1, find_constant2,
15063         find_class_constant, count_constant_pool_bytes, write_constant_pool,
15064         find_utf8_constant, find_class_or_string_constant):  New functions.
15065
15066         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
15067         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
15068         (give_name_to_class, get_class_constant):  Likewise.
15069         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
15070         (get_name_and_type_constant, get_ref_constant):  Removed.
15071         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
15072         * parse.y:  Don't save/restore tree_constant_pool.
15073         * verify.c (verify_jvm_instructions):  Update for new approach.
15074         * expr.c (expand_invoke, expand_java_field_op): Likewise.
15075
15076         * lang-options.h:  Added -femit-class-file, -femit-class-files.
15077         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
15078         (lang_f_options):  Added "emit-class-file(s)".
15079
15080         * expr.c (build_java_arrayaccess):  Generate more efficient array
15081         bounds checking, by using unsigned compare.
15082
15083         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
15084
15085 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15086
15087         * parse.h: New comment on the handling of unresolved type
15088         identifiers. JDEPs are now part of the jdep_code enum.
15089         (typedef struct jdep): Now use enum jdep_code or int, depending on
15090         availability. Both are narrowed down to an 8 bits bitfield.
15091         (CALL_EXPR_PRIMARY): Fixed comment.
15092
15093 1998-06-10  Tom Tromey  <tromey@cygnus.com>
15094
15095         * Make-lang.in (java): Added gjavac and jvgenmain.
15096         (java.start.encap): Depend on gjavac.
15097         (java.rest.encap): Depend on jvgenmain.
15098
15099         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15100         (JAVA_CROSS_NAME): Likewise.
15101         (java.all.build): Depend on jvgenmain and gjavac.
15102         (java.all.cross): Depend on jvgenmain and gjavac-cross.
15103         (jvgenmain$(exeext)): New target.
15104         (java.install-common): Wrote.
15105         * config-lang.in (compilers, stagestuff): Added gjavac and
15106         jvgenmain.
15107
15108 1998-06-10  Dave Brolley  <brolley@cygnus.com>
15109
15110         * lang.c (lang_decode_option): New argc/argv interface.
15111
15112 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15113
15114         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15115         * decl.c (build_decl_no_layout): New function.
15116         * expr.c (java_lang_expand_expr): Layout declarations found in
15117         blocks before they're pushed.
15118         * jcf-parse.c (load_class): Save current line when parsing class
15119         file.
15120         (parse_source_file): Register class before expanding their
15121         methods.
15122         * lang.c (put_decl_node): Produce `null' when `void *' is
15123         processed.
15124         * lex.c (static tree wfl_op): New static global, for error report
15125         on casts.
15126         (java_init_lex): wfl_operator and wfl_op initialized
15127         here. Filename caching added for wfl_op. Return wfl_op when `(' is
15128         parsed.
15129         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15130         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15131         build_unresolved_array_type): New static function definitions.
15132         (build_decl_no_layout): New extern function declared.
15133         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15134         faulty modifier exists.
15135         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15136         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15137         (UNARY_PLUS_EXPR): New fake operator.
15138         (struct parser_ctxt): New field osb_number.
15139         * parse.y (static tree wfl_operator): New static WFL for operator
15140         bound error messages.
15141         (DECR_TK, INCR_TK): Moved.
15142         (OP_TK): Tagged <operator>.
15143         (array_type:): Now call build_unresolved_array_type.
15144         (dim_expr:): Count the number of '[' seen.
15145         (post_increment_expression, post_decrement_expression,
15146         pre_increment_expression, pre_decrement_expression,
15147         unary_expression_not_plus_minus, unary_expression:): Actions are
15148         now building the corresponding unary expressions.
15149         (cast_expression:): Actions are now building cast expressions.
15150         (build_unresolved_array_type): New function.
15151         (create_interface): Reset the number of declared interfaces.
15152         (create_class): Likewise.
15153         (method_header): Methods declared within the scope of an interface
15154         are now implicitly set public and abstract.
15155         (java_complete_class): Variable's and parameter's type are patched
15156         with a promoted type.
15157         (declare_local_variables): Resolved non builtin types are promoted
15158         before being used to build a variable decl. Removed type patch
15159         posted on variable initialization statement.
15160         (source_start_java_method): Use build_decl_no_layout to build the
15161         decl of a parameter of incomplete type.
15162         (java_register_parsed_class): Process interfaces too. Call
15163         rest_of_decl_compilation on each processed class declarations.
15164         (java_complete_expand_methods): Don't attempt to expand things in
15165         interfaces.
15166         (java_complete_tree): Process CONVERT_EXPR, even though it always
15167         has a type. Propagate error_mark_node to node's type too. Promote
15168         method's call argument type and return error_mark_node if
15169         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15170         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15171         handle unary operator nodes.
15172         (build_assignment): Added comment.
15173         (print_int_node): New function.
15174         (patch_assignment): New second argument. New error handling. Use
15175         print_int_node. Handle references. Use can_cast_to_p to issue
15176         different error message according to the context and check upon
15177         the initialization of the RHS.
15178         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15179         (operator_string): Handle more operators.
15180         (patch_binop): No longer use a function static
15181         wfl_operator. Improved error message on shift distance.
15182         (build_unaryop, build_incdec, build_cast, patch_unaryop,
15183         patch_cast): New functions.
15184
15185 1998-06-05  Per Bothner  <bothner@cygnus.com>
15186
15187         * jvspec.c:  New file.
15188         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
15189
15190         * java-tree.h (identifier_subst):  Add declaration.
15191
15192 1998-06-04  Tom Tromey  <tromey@cygnus.com>
15193
15194         * jvgenmain.c (main): Generate call to JvRunMain.
15195
15196         * class.c (make_class_data): Push value for "sync_info" field.
15197         * decl.c (init_decl_processing): Push "sync_info" field.
15198
15199 1998-06-03  Per Bothner  <bothner@cygnus.com>
15200
15201         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
15202         Java (source) name, not signature.
15203         Set TYPE_ALIGN to (at least) that of element_type.
15204
15205 1998-06-02  Per Bothner  <bothner@cygnus.com>
15206
15207         * class.c:  Moved classname-mangling-rekated code to ...
15208         * mangle.c:  ... this new file.
15209         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
15210         * Makefile.in:  Update for above changes.
15211
15212 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15213
15214         * expr.c (truthvalue_conversion): Convert integer and floating
15215         point value to their truth value.
15216         * lex.c (java_lex): Handle the `null' literal.
15217         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15218         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15219         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15220         New macros.
15221
15222         * parse.y: Reorganization/documentation on token declaration.
15223         (binop_lookup[]): New added new tree codes.
15224         (relational_expression): Build corresponding binary operators.
15225         (equality_expression, conditional_and_expression,
15226         conditional_or_expression): Likewise.
15227         (java_complete_class): Fix crash in debug message.
15228         (java_complete_tree): Check initialization of method call
15229         arguments. Further bogus node evaluation to detect more error
15230         during assignments. Handles more binary operators.
15231         (patch_assignment): Use DECL_P.
15232         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15233         code.
15234         (operator_string): Handle more case. Compacted source.
15235         (patch_binop): Changed function comment. Checking for
15236         uninitialized first operand takes the compound assignment into
15237         account and uses DECL_P. Checking for uninitialized second operand
15238         delayed to routine's end. Use macros to issue type bound error
15239         messages and issue messages on both operands if their types are
15240         different. Force fixed type into node. Handle all binary
15241         operators.
15242
15243 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15244
15245         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15246         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15247         build operator node and return tokens.
15248         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15249         * parse.h (java_complete_tree): Changed returned type in prototype.
15250         (build_method_invocation, build_assignment, patch_assignment,
15251         patch_binop): New static function declarations.
15252         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15253         BUILD_EXPR_WFL): New macros.
15254         * parse.y (enum tree_code binop_lookup[]): New static for token to
15255         TREE_CODE lookup.
15256         (%union): Parser union has new sub-structure `operator'.
15257         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15258         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15259         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15260         ASSIGN_ANY_TK): Tokens tagged `operator'.
15261         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15262         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15263         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15264         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15265         (assignment_operator:): Rule tagged `operator'.
15266         (expression_statement:): Re-installed default rule.
15267         (method_invocation:): Sub rules call build_method_invocation.
15268         (postfix_expression:): Don't attempt to resolve name here. Just
15269         return an ID.
15270         (multiplicative_expression:): Sub-rules build corresponding binop
15271         expression node.
15272         (additive_expression:, shift_expression:, and_expression:,
15273         exclusive_or_expression:, inclusive_or_expression:): Likewise.
15274         (assignment:): Sub rule invoke build_assignment.
15275         (assignment_operator:): Default rules on sub rules.
15276         (force_error): Added documentation on this variable.
15277         (declare_local_variables): Build initialization calling
15278         build_assignment.
15279         (expand_start_java_method): Removed unused rtx declaration. Mark
15280         arguments as already initialized.
15281         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15282         (java_complete_expand_methods): Don't process next method if
15283         completion of the previous one triggered errors.
15284         (java_complete_expand_method): Call source_end_java_method if no
15285         error were found during completion.
15286         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15287         locals declaratilon. Handle names found within a class. Return
15288         error_mark_node when things aren't found.
15289         (patch_method_invocation_stmt): Return error_mark_node on failures.
15290         (patch_invoke): Removed unused local. Return the correct node.
15291         (java_complete_tree): Now returns a value. The BLOCK section binds
15292         local identifiers and the type of a BLOCK is now void. Assign the
15293         result of operand completion on COMPOUND_EXPR. Assign the
15294         encapsulated node of a WFL to the result of its completion, except
15295         when the node is an identifier. Now handle MODIFY_EXPR and several
15296         binary operators. Return error_mark_node on errors.
15297         (build_method_invocation, build_assignment, patch_assignment,
15298         build_binop, operator_string, patch_binop): New functions.
15299         * typeck.c (binary_numeric_promotion): New function.
15300
15301 1998-05-21  Per Bothner  <bothner@cygnus.com>
15302
15303         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
15304         Replace most uses of ident_subst by identifier_subst.
15305
15306         * class.c (push_class_static_dummy_field):  Removed function.
15307         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
15308         instead of looking got "class" static field.  Create that decl here.
15309         (class_identifier_node):  Removed;  no longer needed.
15310         (init_class_processing):  Don't init class_identifier_node.
15311         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
15312         Do nreverse 0 times (instead of twice) for Object and Class.
15313         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15314
15315 1998-05-20  Per Bothner  <bothner@cygnus.com>
15316
15317         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
15318         while initializing linenumber_count and linenumber_table.
15319         Do it before init_function_start (which calls emit_line_note).
15320         * expr.c (expand_byte_code):  Don't need to clear lineno here.
15321
15322 1998-05-18  Tom Tromey  <tromey@cygnus.com>
15323
15324         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15325         then mangle number as _N_.
15326
15327         * class.c (mangle_class_field): New function.
15328         (build_class_ref): Set assembler name of class reference using
15329         mangle_class_field.
15330         (push_class_static_dummy_field): Likewise.
15331
15332 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
15333
15334         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15335         of assigning to TREE_CODE.  The latter method exploits a feature
15336         of GCC that is not ANSI compliant.
15337
15338 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15339
15340         * decl.c (pushdecl_force_head): New function.
15341         (pushlevel): Removed conditional printf.
15342         (complete_start_java_method): Don't enter local variable scope if
15343         function is compiled from source code.
15344         * expr.c: parse.h now included
15345         (java_lang_expand_expr): New function.
15346         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15347         printf. Terminate buffer when doing directories.
15348         * jcf-parse.c (parse_source_file): Call lang_init_source before
15349         parsing and before code generation.
15350         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15351         use printf if the macro is defined.
15352         * lang.c (lang_init): Install lang_expand_expr hook on
15353         java_lang_expand_expr.
15354         (java_dummy_print): New function.
15355         (lang_init_source): New function.
15356         * lex.c (java_lex): Remember location of an opening brace at the
15357         second nesting level.
15358         (java_is_eol): Unget character seen after a CR if it is EOF.
15359         * parse.h: Now includes lex.h
15360         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15361         printf if the macro is defined.
15362         (expand_start_java_method, build_expr_block, enter_block,
15363         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15364         New static function declarations.
15365         (pushdecl_force_head): New extern function declaration.
15366         (INCOMPLETE_TYPE_P): New macro.
15367         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15368         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15369         BLOCK_EXPR_ORIGIN): New macros.
15370         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15371         DECL_SOURCE_LINE_LAST): New macros.
15372         (struct parser_ctxt): Removed field current_method_decl, redundant
15373         with the field current_function_decl. Added fields
15374         first_ccb_indent1 and pending_block.
15375         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15376         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15377         tagged <node>
15378         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15379         (compilation_unit:): Cosmetic on sub rule.
15380         (type_declaration:): Cosmetic on sub rules. Added an error rule.
15381         (variable_initializer:): Installed default rule on expression:.
15382         (method_declaration:): method_header: starts a new
15383         method. method_body: installs the function body, absorbs blocks
15384         emitted for temporary variable scopings, pops function's body block
15385         and merges function's last statement lineno in DECL_SOURCE_LINE.
15386         (method_body:): Installed default rules.
15387         (block:): Call enter_block when an opening brace is seen.  Absorb
15388         scoping blocks and call exit_block when a closing brace is seen.
15389         (block_statement:): Cosmetic changes.
15390         (method_invocation:): Create WFL around CALL_EXPR node.
15391         (patch_stage): Added comment around definition.
15392         (method_header): Try to use first_ccb_indent1 as the first line of
15393         the method, so BP debug info are emitted at the first opening
15394         brace of the function. If the function has no body, use the
15395         location of the function's name. Override currently defined method
15396         name with the matching WFL so we can point redefinition errors
15397         using the location where the function's name was declared.
15398         (check_abstract_method_header): Interprets DECL_NAME as an
15399         identifier or as a WFL, accordingly.
15400         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15401         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15402         location and name information out of it and reinstall DECL_NAME to
15403         its original identifier node value.
15404         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15405         function's source code).
15406         (read_import_dir): Test the value returned by find_class and issue
15407         a fatal accordingly.
15408         (declare_local_variables): Push a new block for the scope of the
15409         new variable(s) if code has been already generated at that nesting
15410         level. Pinpoint redefinition errors using the variable id
15411         WFLs. Generate initialization code if necessary. If the variable
15412         type is incomplete, register a patch on its decl.
15413         (source_start_java_method): Rewritten. Define a new block for the
15414         function's parameters. Build parameter decl out of function's
15415         arguments and register them for a patch if their types are
15416         incomplete.
15417         (expand_start_java_method): Includes the part of
15418         source_start_java_method that was pushing the parameter decls and
15419         completing the method start code.
15420         (source_end_java_method): Removed call the expand_end_bindings and
15421         poplevel (already taken care of). Reinstall function's arguments
15422         and get function's last line of code before calling
15423         expand_function_end.
15424         (java_method_add_stmt): New comment before the function's
15425         code. Complement the second operand of the current COMPOUND_EXPR
15426         if necessary.
15427         (java_complete_expand_methods): Don't generate debug info on line
15428         zero when expanding a generated constructor.
15429         (java_complete_expand_method): Set start and end line numbers for
15430         a artificially generated constructor to one and manually call
15431         enter_block and exit_block when defining it. For all methods:
15432         expand function's start calling the new expand_start_java_method
15433         and invoke java_complete_tree on the effective method's body, if
15434         any.
15435         (resolve_expression_name): Now use lookup_name_in_blocks to search
15436         local variable decls and print out an error when variables are
15437         undefined.
15438         (patch_method_invocation_stmt): Inserted comment before the
15439         function's code.
15440         (lookup_method_invoke): Chain method's arguments using chainon
15441         with the current arg list as a second argument. Inserted missing
15442         IDENTIFIER_POINTER when reporting an error on methods not found.
15443         (refine_accessible_methods_list): Don't retain constructors.
15444         (patch_arguments): Function removed.
15445         (java_complete_tree): Inserted comment before the function's
15446         code. New case for BLOCKs. Moved the WFL case a bit
15447         further. Complete function's arguments.
15448         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15449         maybe_absorb_scoping_blocks): New functions.
15450
15451 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15452
15453         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15454         previously set.
15455         * jcf-parse.c (parse_source_file, java_error_count): New forward
15456         and extern declarations.
15457         (java_parse_abort_on_error): Macro moved.
15458         (jcf_parse_source): fatal called if fopen fails. Now calls
15459         parse_source_file.
15460         (parse_source_file): New parse_only parameter. Reflects the
15461         elimination of the second pass.
15462         (yyparse): parse_source_file called with argument set to 0.
15463         * jcf.h (JCF_ZERO): Sets java_source to zero.
15464         * lex.c (java_init_lex): pass argument is gone. Function modified
15465         to be called once during the analysis of a file.
15466         (java_unget_unicode): Fixed typo in fatal message.
15467         (java_get_line_col): Likewise.
15468         (java_lval): Likewise. String literals no longer built during
15469         second pass.
15470         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15471         account.
15472         * parse.h (MODIFIER_WFL): New macro.
15473         (parse_check_super, parser_check_super_interface): Now return int.
15474         (parser_chain_incomplete_item, not_builtin_p,
15475         complete_method_decl): Declarations removed.
15476         (build_method_invocation_stmt, build_invoke): Renamed using the
15477         `patch' instead of `build'
15478         (register-incomplete_type, obtain_incomplete_type,
15479         java_complete_tree, java_complete_expand_method,
15480         unresolved_type_p, create_jdep_list): New function declarations.
15481         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15482         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15483         (jdep): New typedef on new struct _jdep.
15484         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15485         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15486         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15487         JDEP_RESOLVED_P): New macros.
15488         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15489         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15490         JDEP_VARIABLE): New enum values and jdep kinds.
15491         (jdeplist): New typedef on struct _jdeplist.
15492         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15493         macros.
15494         (CALL_EXPR_PRIMARY): New macro.
15495         (struct parser_ctxt): Fields java_pass, current_method_decl,
15496         method_decl_list deleted. New field jdeplist.
15497         (INCOMPLETE_P): Macro deleted.
15498         * parse.y (single_type_import_declaration:): Removed pass switch.
15499         (type_import_on_demand_declaration): Likewise.
15500         (field_declaration:): Removed pass switch on all sub rules.
15501         (class_declaration:): Call the complete_class_decl removed on
15502         class_body rules.
15503         (method_declaration:): Removed second pass switch. No longer chain
15504         methods decl when method_header reduced.
15505         (method_header:): Sub rules no longer depend on pass switch.
15506         (method_declarator:): Likewise.
15507         (method_body:): Likewise.
15508         (abstract_method_declaration:): Likewise.
15509         (block_statement:): Likewise.
15510         (local_variable_declaration:): Likewise.
15511         (argument_list:): Likewise.
15512         (method_invocation:): Likewise. Call to build_method_invocation_stmt
15513         removed. Partial CLASS_EXPR tree node built instead.
15514         (postfix_expression:): Removed pass switch on all sub rules.
15515         (java_pop_parser_context): Free classd_list content.
15516         (yyerror): Call obstrack_grow0 to finalize error message.
15517         (check_class_interface_creation): Comment modified to reflect new
15518         returned value meaning. Removed second pass switch. Return 1 if an
15519         error was found, 0 otherwise. Adjust pointer on filename if a
15520         leading path separator was found.
15521         (maybe_create_class_interface_decl): Removed first pass switch
15522         when linking the class decl to the class_list. Install a new
15523         jdep_list for the class.
15524         (add_superinterfaces): List of unresolved interfaces is
15525         gone. Unresolved interfaces are directly added to the current
15526         dependencies list.
15527         (create_interface): Second pass shortcut removed.
15528         ctpx->modifier_ctx access through MODIFIER_WFL.
15529         (create_class): Second pass shortcut removed. Call to
15530         register_incomplete_type replaces the call to
15531         parser_chain_incomplete_item.
15532         (complete_class_decl): Function removed.
15533         (duplicate_declaration_error): New way of retrieving redeclared
15534         item type.
15535         (register_fields): Call to lookup_modifier_cl replaced by
15536         MODIFIER_WFL. New way of handling unresolved type, using
15537         unresolved_type_p and obtain_incomplete_type.
15538         register_incomplete_type replaces call to parser_chain_incomplete_item.
15539         (patch_stage): New static global variable.
15540         (method_header): New way of handling unresolved type, using
15541         unresolved_type_p and obtain_incomplete_type. patch_stage used to
15542         indicates that the method decl needs to be patched.
15543         (check_abstract_method_header): Call to lookup_modifier_cl
15544         replaced by MODIFIER_WFL.
15545         (method_declarator): Incomplete argument type are registered
15546         calling register_incomplete_type. Patch on the declared method is
15547         issued in that case.
15548         (unresolved_type_p): New function.
15549         (parser_check_super_interface): New comment to reflect function's
15550         modified returned type (int). Function and has a new argument
15551         this_wfl. Call to parse_error_context uses this_wfl instead of
15552         relying on lookup_cl.
15553         (parser_check_super): Comment reflects function's new returned
15554         type (int). Function returns nonzero value on error.
15555         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15556         register_incomplete_type, jdep_resolve_class): New functions to
15557         handle incomplete types in declarations.
15558         (java_complete_class): Rewritten to work with the new incomplete
15559         type handling scheme.
15560         (complete_class_report_errors): Likewise.
15561         (complete_method_decl): Removed: it jobs is now handled by
15562         java_complete_class.
15563         (do_resolve_class): Class loaded in not already loaded and not
15564         found in Java source code.
15565         (java_check_regular_methods, java_check_abstract_methods): Don't
15566         call complete_method_decl anymore.
15567         (lookup_modifier_cl, not_builtin_p): Functions deleted.
15568         (read_import_dir): Got rid of the pass number dependency.
15569         (declare_local_variables): New handling of unresolved types (patch
15570         issued).
15571         (source_start_java_method): New parameter level. Function called
15572         with level set to 1 when argument types are potentially
15573         unresolved.  Called to complete the job with level set to 2 once
15574         types are complete.
15575         (source_end_java_method): Call to permanent_allocation
15576         removed. Waiting to be replaced by a more suitable obstack
15577         management.
15578         (java_complete_expand_methods, java_complete_expand_method,
15579         java_expand_finals): New functions.
15580         (build_method_invocation_stmt): Renamed
15581         patch_method_invocation_stmt. Extracts function call expression
15582         (wfl) and arguments (args) from CALL_EXPR tree operands.
15583         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15584         call. Patch the function and argument operand of the CALL_EXPR
15585         tree argument.
15586         (patch_argument, java_complete_tree): New functions.
15587
15588 1998-04-20  Per Bothner  <bothner@cygnus.com>
15589
15590         Recover from missing fields and methods (i.e. error instead of fatal).
15591         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
15592         * expr.c (expand_invoke):  Recover from missing method.
15593         (expand_java_field_op):  Recover from missing field.
15594         Inline references to java.lang.{Integer,Char,...}.TYPE.
15595         * typeck.c (get_type_from_signature), java-tree.h:  New function.
15596         * class.c (add_method):  Use get_type_from_signature.
15597         (build_class_ref):  Handle a class that was not found.
15598         * typeck.c (convert):  Handle conversion to pointers (for convenience).
15599         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
15600         instead of lookup_field to handle missing fields.
15601
15602         * jcf-parse.c (process_zip_dir):  Set java_source.
15603
15604 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
15605
15606         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15607
15608 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15609
15610         * jcf-parse.c (load_class): Don't change input_filename before
15611         calling jcf_parse_source (but still do it before calling
15612         jcf_parse).
15613         (jcf_parse_source): Assign input_filename after having saved the
15614         parser context.
15615         * lex.c (java_init_lex): Chain a WFL node to the import on demand
15616         list. ctxp->modifier_ctx zeroed according to its new
15617         definition. ctxp->filename initialized. Removed
15618         JAVA_MODIFIER_CTX_UNMARK.
15619         (java_unget_unicode): Update the character based column position.
15620         (java_allocate_new_line): ref_count not used anymore. Always free
15621         ctxp->p_line. Initialize c_line->char_col to 0.
15622         (java_get_unicode): Update the character based column position.
15623         (java_lex): Use ctxp->elc to store current position in source
15624         file, at the beginning of the parsed token. Set modifier_ctx entry
15625         corresponding to the parse modifier to a WFL node. Return a WFL
15626         node when an identifier is parsed.
15627         (java_lex_error): Now uses ctxp->elc to store current position in
15628         source.
15629         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15630         * lex.h (build_wfl_node): New function definitions.
15631         (struct java_line): ref_count and next fields are gone. New field
15632         char_col.
15633         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15634         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15635         (JAVA_COLUMN_DELTA): New macro.
15636         (java_lc): New typedef on new struct _java_lc.
15637         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15638         (parse_error_context, parse_warning_context): Changed prototypes.
15639         (java_get_line_col): Added as an available global function.
15640         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15641         (IC_DECL): Replaced by macro IC_TYPE
15642         (DEPEND_WFL): New macro.
15643         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15644         wrong modifier.
15645         (exit_java_complete_class): Removed a commented out statement.
15646         (struct parser_ctxt): Added comments on fields. modifier_ctx is
15647         now an array of tree nodes. Deleted fields line_list and
15648         e_line. New field elc, to replace e_line.
15649         * parse.y (array_type:): Build WFL node.
15650         (qualified_name:): Build a single WFL node out of two. Retain
15651         the location information of the first node in the resulting node.
15652         (package_declaration:): Use package name as a WFL node
15653         (single_type_import_declaration:): Use imported name as a WFL node.
15654         (type_import_on_demand_declaration:): Use root of the imported
15655         packages as a WFL node.
15656         (field_declaration:): Removed unused local variable cl.
15657         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15658         (yyerror): New static elc. Removed static error_line, error_pos.
15659         New local code_from_source. Save ctxp->elc into elc at the first
15660         pass. Call java_get_line_col to get a string of the line where
15661         the error occurred.
15662         (debug_line): Removed static function.
15663         (parse_error_context, parse_warning_context): Parameter cl is now
15664         a WFL node. Use its value to initialize ctxp->elc.
15665         (redefinition_error): Parameter cl is now a WFL node.
15666         (parse_add_interface): New parameter wfl. No longer call
15667         lookup_cl, use wfl instead.
15668         (check_class_interface_creation): Parameter cl is now a WFL node.
15669         (maybe_create_class_interface_decl): Likewise.
15670         (add_superinterfaces): New function.
15671         (create_interface): Removed local cl, node, super_decl,
15672         super_decl_type.  Function now uses id as a WFL node. Better
15673         warning/error report on obsolete or forbidden mix of
15674         modifiers. Now calls add_superinterfaces to register interfaces.
15675         (create_class): Removed local cl, node. Local variable id is used
15676         as a WFL node. Better error report on forbidden modifier
15677         mix. Uses add_superinterfaces to register interfaces.
15678         (find_field): Argument cl is now a WFL node. Now store the WFL
15679         node of a fields that needs to be checked for their
15680         initialization.
15681         (method_header): Local variable node non longer used. Local
15682         variable id replaces cl.
15683         (check_modifiers_consistency): Local variable cl is now a WFL
15684         node.
15685         (method_declarator): Local variable cl replaced by parameter id.
15686         (parser_qualified_name): Now uses parameter name as a WFL node.
15687         (parser_check_super_interface): New parameter wfl, for achieve
15688         greater accuracy during error reports.
15689         (parser_chain_incomplete_item): New parameter named location. Used,
15690         along the decl, to construct the incomplete item node.
15691         (java_complete_class): resolve_class now uses WFL node extracted
15692         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15693         where appropriate.
15694         (complete_method_decl): Unresolved function's argument types are WFL.
15695         (resolve_class): Parameter cl is now a WFL node.
15696         (resolve_and_layout): Likewise.
15697         (do_resolve_class): Likewise. Try first to use cl and then do the
15698         lookup on the decl when calling check_pkg_class_access.
15699         (complete_class_report_errors): Use IC_TYPE in place of
15700         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15701         instead of doing a lookup over the decl.
15702         (java_check_final): Use WFL info from field tree list.
15703         (lookup_cl): Rewritten and returns a statically defined WFL node.
15704         (lookup_modifier_cl): Now uses information from WFL nodes.
15705         (process_imports): Likewise.
15706         (read_import_dir): name and cl arguments replaced by a single WFL
15707         node. Function modified accordingly.
15708         (find_in_imports_on_demand): Now uses WFL node.
15709         (check_pkg_class_access): cl argument is now a WFL node.
15710         (declare_local_variables): Fixed to use WFL nodes.
15711         (resolve_expression_name): Likewise.
15712         (build_method_invocation_stmt): name_combo argument renamed
15713         wfl. Function modified to use WFL nodes.
15714         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15715         (lookup_method_invoke): cl is now a WFL node. Added missing
15716         IDENTIFIER_POINTER to class type decl name.
15717
15718 1998-04-14  Dave Brolley  <brolley@cygnus.com>
15719
15720         * lang.c (init_parse): Now returns char* containing the filename.
15721
15722 1998-04-10  Per Bothner  <bothner@cygnus.com>
15723
15724         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
15725
15726         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
15727         * class.c (make_class_data):  If flag_assume_compiled, initial class
15728         state is CSTATE_PREPARED; make superclass and interfaces direct
15729         references, rather than constant pool indexes.
15730
15731 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15732
15733         * parser.y: Include flags.h. Removed debug variable pl.
15734         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15735         (block:): Likewise.
15736         (labeled_statement_nsi:): Generate debug info when reducing
15737         expression_statement:.
15738         (check_pkg_class_access): get_access_flags_from_decl invocation
15739         fixed for new CLASS_* flags location.
15740         (source_end_java_method): Save/restore parser context when
15741         entering/leaving this routine. Restore lineno to its right value
15742         before calling expand_end_bindings.
15743         (build_method_invocation_stmt): build_invoke called with the
15744         current line information.
15745         (build_invoke): New argument cl. Wrap the function call around a
15746         wfl node.
15747         (refine_accessible_methods_list): Changed comment, removed
15748         unnecessary code.
15749         * parse.h: Fixed typo in comments.
15750         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15751         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15752         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15753         parser_ccb_indent.
15754         * lex.c (java_lex): Record the last closing curly bracket of a
15755         function.
15756         * jcf-parse.c (jcf_parse_source): Now calls
15757         java_check_methods. Clarified comment, fixed typo.
15758
15759 1998-04-09  Dave Brolley  <brolley@cygnus.com>
15760
15761         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15762         (finish_parse): Expose for non USE_CPPLIB builds.
15763
15764 1998-04-08  Jeffrey A Law  (law@cygnus.com)
15765
15766         * lang.c (lang_print_xnode): New function.
15767
15768 1998-04-03  Per Bothner  <bothner@cygnus.com>
15769
15770         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
15771         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
15772         used to build a class's dispatch table.
15773         (make_class_data):  Generate dispatch table if flag_assume_compiled.
15774         Set dtable of class object to address of class_dtable_decl.
15775
15776         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
15777         be volatile and have side effects - generates better code.
15778
15779         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
15780         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
15781
15782         * expr.c (expand_invoke):  If class is final, method is
15783         effectively final, so can call it directly.
15784
15785         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
15786
15787         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
15788
15789 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15790
15791         * parse.y (build_method_invocation_stmt): Removed extra argument
15792         to build_invoke.
15793
15794 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15795
15796         * expr.c (dtable_indent): Now static global.
15797         (expand_invoke): Now call invoke_build_dtable and
15798         build_invokevirtual.
15799         (invoke_build_dtable, build_invokevirtual): New functions.
15800         * jcf-io.c (find_class): Defer issuing a warning by setting
15801         jcf->outofsynch to 1.
15802         * jcf-parse.c (jcf_out_of_synch): New function.
15803         (load_class): Test this_jcf.outofsynch flag and call
15804         jcf_out_of_synch accordingly.
15805         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
15806         comment indentation.
15807         * lex.c (java_get_unicode): Fixed code indentation.
15808         (java_lex): Create string literal. Fixed typo. Removed several
15809         premature obstack_free.
15810         * parse.h: New enums for name resolution and invocation mode.
15811         (struct qualification): New data structure.
15812         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
15813         (do_resolve_class, build_method_invocation_stmt,
15814         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
15815         debug_line, identical_subpath_p, invocation_mode,
15816         refine_accessible_methods_list, build_invoke,
15817         lookup_method_invoke): New functions declared.
15818         (build_invokevirtual, invoke_build_dtable, match_java_method,
15819         build_field_ref, jcf_out_of_synch): New references to external
15820         functions.
15821         (struct parse_ctxt): Removed artificial_constructor field.
15822         * parse.y: (array_type:): Type defined for this rule.
15823         (class_type:): Installed default rule for interface_type:.
15824         (array_type:): Now build Java array type.
15825         (qualified_name:): Now use obstack_grow0.
15826         (method_declaration:): Skip the artificial constructor added to
15827         the list, if any.
15828         (abstract_method_declaration:): Execute the code only during pass 1.
15829         (block:): Installed default rule in block_statements:.
15830         (block_statement:): Add the statement to the method during pass 2.
15831         (statement_expression): Installed default rule for
15832         method_invocation:.
15833         (argument_list:): Added code to build the argument list.
15834         (method_invocation:): Added call to create the method invocation
15835         node.
15836         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
15837         (debug_line): New function for debug.
15838         (complete_class_decl): No longer do something during pass 1.
15839         (method_header): Use BUILD_PTR_FROM_NAME.
15840         (parser_qualified_classname): Use obstack_grow0. Removed bogus
15841         obstack_free.
15842         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
15843         function's main comment.
15844         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
15845         classes.
15846         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
15847         (resolve_class): Now works with arrays.
15848         (do_resolve_class, resolve_and_layout): New functions.
15849         (java_check_regular_methods): Reverse method list before and after
15850         having processed it. No longer set ctxp->artificial_constructor.
15851         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
15852         accordingly. Fixed typo in issued error message. Now use
15853         obstack_grow0.
15854         (find_in_imports_on_demand): Now use obstack_grow0.
15855         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
15856         (source_end_java_method): Call expand_expr_stmt instead of
15857         expand_expr. Calls it before calling expand_function_end.
15858         (java_method_add_stmt): Do nothing if errors were found during
15859         parsing.
15860         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
15861         (build_method_invocation_stmt, build_invoke, invocation_mode,
15862         lookup_method_invoke, refine_accessible_methods_list,
15863         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
15864         New functions.
15865         * typeck.c (build_java_signature): Properly end method signature
15866         if return type skipped.
15867         (match_java_method): New function.
15868
15869 1998-03-16  Per Bothner  <bothner@cygnus.com>
15870
15871         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
15872
15873 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15874
15875         * expr.c (build_invoke_non_interface): New function.
15876         (methods_ident, ncode_ident): Now static globals.
15877         (expand_invoke): Use build_invoke_non_interface.
15878         * java-tree.h (struct lang_decl): New field function_decl_body.
15879         (DECL_FUNCTION_BODY): New macro.
15880         * jcf-parse.c (jcf_parse_source): Deeper check before setting
15881         CLASS_FROM_SOURCE_P.
15882         (parse_source_file): Fixed typos. Call java_layout_parsed_class
15883         before starting pass 2. Call to java_generate_parsed_class replaced
15884         by java_register_parsed_class.
15885         * lex.c: Fixed typo in header. Some line width related formating.
15886         * lex.h: Some line width related formating.
15887         * parse.h (source_end_java_method, resolve_expression_name,
15888         complete_class_decl, maybe_create_class_interface_decl,
15889         check_class_interface_creation): New static function declarations.
15890         (java_layout_parsed_class, java_method_add_stmt): New function
15891         declarations.
15892         (struct parser_ctxt): Field mark_class_generate removed. New
15893         fields class_list and artificial_constructor.
15894         * parse.y: Fixed typo in header.
15895         (class_declaration:): Call complete_class_decl when class body
15896         parsed.
15897         (method_declaration:): Call source_end_java_method in pass 2 when
15898         the method body is defined.
15899         (postfix_expression:): Do expression name resolution on sub-rule
15900         name during pass 2.
15901         (create_class, create_interface): Merged common pieces.
15902         (check_class_interface_creation, maybe_create_class_interface_decl):
15903         New functions.
15904         (complete_class_decl): New function.
15905         (register_fields): Fixed line width related typo.
15906         (method_header): Correctly skip first argument when fixing
15907         argument line. Changed the loop.
15908         (java_check_circular_reference): Now use ctxp->class_list.
15909         (java_complete_class): Removed start/stop marking.
15910         (java_check_regular_methods): Now takes a class decl as an
15911         argument.  Add default constructor if none were encountered.
15912         (java_check_methods): Now use ctxp->class_list. Changed call to
15913         java_check_regular_methods.
15914         (source_start_java_method): Set DECL_ARG_TYPE for each function
15915         arguments.
15916         (source_end_java_method, java_method_add_stmt): New functions.
15917         (java_generate_parsed_class): No longer exists.
15918         (java_layout_parsed_class, java_register_parsed_class): New functions.
15919         (resolve_expression_name): New function.
15920
15921 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15922
15923         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
15924         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
15925         until pass initializations are done. Call read_import_dir with
15926         pass set to 0.
15927         * parse.h: (lookup_modifier_cl): New function declared.
15928         (INTERFACE_FIELD_MODIFIERS): New macro.
15929         (OBSOLETE_MODIFIER_WARNING): New macro.
15930         * parse.y: (register_fields): Class type and current field name in
15931         local variables. Check modifier(s) if adding field(s) to an interface.
15932         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
15933         and report errors using the faulty modifier line context.
15934         (lookup_modifier_cl): New function.
15935         (read_import_dir): Detect and report default import processing
15936         failure.
15937
15938 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
15939
15940         Add a pair of -fassume-compiled/-fno-assume-compiled options.
15941         * class.c (is_compiled_class): Return 1 after making sure it
15942         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
15943         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
15944         * java-tree.h (flag_assume_compiled): Add decl.
15945         * lang.c (lang_f_options): Add the flag.
15946         (flag_assume_compiled): Add decl, default to 0.
15947
15948 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15949
15950         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
15951         (is_compiled_class): Likewise.
15952         (layout_class): Likewise.
15953         (layout_class): Detect and lay out classes defined in source code.
15954         (interface_of_p, add_interface_do, may_add_interface): New
15955         function.
15956         (add_interface): Now use add_interface_do.
15957         (add_method_1): New function.
15958         (add_method): Now use add_method_1.
15959         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
15960         (complete_start_java_method): New function.
15961         (start_java_mehod): Now call complete_start_java_method.
15962         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
15963         (expand_invoke): Likewise and fixed typo.
15964         *gjava.c: (print_super_field): Use new argument to find_class
15965         DO_CLASS_FILE.
15966         (main): Likewise.
15967         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
15968         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
15969         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
15970         IDENTIFIER_NODE.
15971         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
15972         (add_method_1, push_class): New prototypes.
15973         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
15974         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
15975         directory where the class was found.
15976         (find_class): New argument DO_CLASS_FILE. Function find_class
15977         modified accordingly.
15978         *jcf-parse.c: (fix_class_path): New function.
15979         (load_class): Use new VERBOSE argument. load_class now finds and
15980         loads/parses .class/.java files. Save read_state of current_jcf
15981         if necessary.
15982         (java_parser_abort_on_error): New macro.
15983         (jcf_parse_source, parse_source_file): New function.
15984         (jcf_parse): Fixed typo.
15985         (yyparse): Call parse_source_file () only.
15986         (process_zip_dir): Fixed typo, fix zdir->filename_length when
15987         writing the real class name back in the zip directory entry.
15988         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
15989         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
15990         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
15991         (find_class): Prototype fixed.
15992         *lex.c: Added 1998 time stamp.
15993         Removed all static global variables, moved into the parser
15994         context data structure.. Now include unistd.h if SEEK_SET not
15995         defined.
15996         (java_init_lex): Rewritten.
15997         (java_sneak_unicode): Modified current unicode access in current line.
15998         (java_unget_unicode): Likewise.
15999         (java_allocate_new_line): New allocation management.
16000         (java_read_char): Modified access and storage of unget_utf8_value.
16001         New way of processing current unicode.
16002         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
16003         (java_get_unicode): Now use the parser context.
16004         (java_lineterminator): Likewise.
16005         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
16006         of the reentrant parser implementation. Function now use the
16007         parser context data structure and java_lval. Fixed production of
16008         the float and double constant "out of range" error message. Fixed
16009         obstack use. Return integer value when hitting a modifier. Now
16010         return type for TRUE, FALSE and other predefined types. Return
16011         identifier as a TREE_LIST list containing the current line context
16012         as the TREE_VALUE sub-node.
16013         (java_unicode_2_utf8): Fixed typo in declaration.
16014         (java_lex_error): Now use the parser context data structure.
16015         *lex.h: Added 1998 time stamp.
16016         (struct java_line): New fields ref_count and next.
16017         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16018         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
16019         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
16020         *parse.h: Added 1998 time stamp.
16021         (java_parse_source_file): Renamed from parse_source_file.
16022         (YYERROR_NOW, YYNOT_TWICE): Fixed.
16023         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
16024         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
16025         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
16026         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
16027         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
16028         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
16029         (struct parser_ctxt): New data structure to keep the parser context.
16030         *parse.y: Added 1998 time stamp, got rid of static global variables.
16031         (java_error_count, ctxp): New global variables.
16032         (%union): New value field.
16033         (numeric_type, integral_type): Rules removed.
16034         (primitive_type): Rule defined to handle integral, float, double and
16035         boolean types.
16036         (qualified_name, package_declaration,
16037         single_type_import_declaration, type_import_on_demand_declaration,
16038         modifiers, class_declaration, super, interfaces,
16039         interface_type_list, class_body, field_declaration,
16040         field_declaration, variable_declarators, variable_declarator,
16041         variable_declarator_id, method_declaration, method_header,
16042         formal_parameter_list, formal_parameter, method_body, block,
16043         static, interface_declaration, extends_interfaces,
16044         abstract_method_declaration, local_variable_declarators): Rules now
16045         define actions.
16046         (force_error, do_warning): New global statics.
16047         (push_parser_context, parser_context_save_global,
16048         parser_context_restore_global, pop_parser_context): New functions.
16049         (yyerror): Now uses the global parser context. Fixed use of obstack.
16050         (parse_error, parse_error_context, parse_warning_context,
16051         java_accstring_lookup, redefinition_error, check_modifiers,
16052         parser_add_interface, create_interface, create_class, find_field,
16053         duplicate_declaration_error, register_fields, method_header,
16054         check_modifiers_consistency, check_abstract_method_header,
16055         method_declarator, parser_qualified_classname,
16056         parser_check_super_interface, parser_check_super,
16057         parser_chain_incomplete_item, java_check_circular_reference,
16058         layout_class_from_source, java_complete_class,
16059         complete_method_decl, resolve_class, complete_class_report_errors,
16060         java_check_final, check_method_redefinition,
16061         java_check_regular_methods, java_check_abstract_methods,
16062         java_check_methods, lookup_java_interface_method2,
16063         lookup_java_method2, lookup_cl, find_name_in_single_imports,
16064         process_imports, find_in_imports, read_import_entry,
16065         read_import_dir, find_in_imports_on_demand,
16066         check_pkg_class_access, not_builtin_p, declare_local_variables,
16067         source_start_java_method, java_generate_parsed_class): New
16068         functions.
16069         *typeck.c: (signature_include_return): New global variable.
16070         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
16071         to add the function returned type in the signature.
16072
16073 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
16074
16075         * jcf-io.c (open_in_zip): Use strncmp and LEN.
16076
16077 1998-01-29  Dave Brolley  <brolley@cygnus.com>
16078
16079         * Make-lang.in (java.info): Added.
16080         (java.install-info): Added
16081
16082 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
16083
16084         * Makefile.in (clean): Also remove java/parse.c.
16085
16086 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
16087
16088         Add a pair of -fbounds-check/-fno-bounds-check options.
16089         * lang.c (lang_decode_option): Add code to grok arguments.
16090         (flag_bounds_check): Add decl.
16091         (lang_f_options): New array w/ the option in it.
16092         * java-tree.h (flag_bounds_check): Add decl.
16093         * lang-options.h: New file.
16094         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16095         of a static macro value.
16096         (JAVA_ARRAY_EXCEPTION): Delete macro.
16097
16098 1998-01-23  Per Bothner  <bothner@cygnus.com>
16099
16100         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
16101         * expr.c (build_anewarray):  Add missing promote_type.
16102
16103 1998-01-22  Per Bothner  <bothner@cygnus.com>
16104
16105         Add array types with known length to optimize bounds checking.
16106         * typeck.c (build_java_array_type):  Take length parameter.
16107         (java_array_type_length, build_prim_array_type):  New functions.
16108         * java-tree.h:  Update for new functions.
16109         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16110         * class.c:  Use build_prim_array_type.
16111         * expr.c (can_widen_reference_to):  Handle known-length array types.
16112         (verify_jvm_instructions):  Keep track of integer push instructions
16113         followed by newarray/anewarray, so we can build known-length arrays.
16114         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
16115         (java_array_data_offset):  New function.
16116         (build_java_array_length_access):  New function.  Optimize if constant.
16117         (build_java_arrayaccess):  Constant fold bounds check.
16118         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
16119         (build_newarray, build_anewarray):  New functions.
16120         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
16121         * verify.c (merge_types):  Handle known-lengh array types.
16122
16123 1998-01-19  Per Bothner  <bothner@cygnus.com>
16124
16125         * expr.c (expand_byte_code):  Fix performace bug, which caused
16126         searching linenumber_table to be linear rather than constant.
16127
16128 1997-12-12  Per Bothner  <bothner@cygnus.com>
16129
16130         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
16131
16132         * decl.c, java-tree.h (soft_fmod_node):  New global.
16133         * decl.c (init_decl_processing):  Define __builtin_fmod.
16134         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
16135         using __builtin_fmod.
16136
16137 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16138
16139         * keyword.h: New file, output of keyword.gperf as processed by
16140         gperf.
16141         * lex.c (java_lex_init): Initialize java_error_flag.
16142         * parse.c (YYERROR_NOW): Uses java_error_flag.
16143         * parse.y: New static java_error_flag. Useless definition of
16144         buffer_error gone.
16145         * parse.y (java_error): Portable error recovery using
16146         java_error_flag (not yet completely tuned).
16147
16148 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
16149
16150         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16151
16152 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16153
16154         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16155         (parse.c, lex.c, keyword.h): New rules for Java source code
16156         front-end.
16157         * parse.c: Renamed into jcf-parse.c.
16158         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16159         * keyword.gperf: New file, Java keywords.
16160         * parse.y: New file, Java language grammar.
16161         * parse.h: New file, Java language grammar definitions.
16162         * lex.c: New file, Java language lexer.
16163         * lex.h: New file, Java language lexer definitions.
16164
16165 1997-12-03  Per Bothner  <bothner@cygnus.com>
16166
16167         * decl.c (clinit_identifier_node), java-tree.h:  New global.
16168         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
16169         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
16170         * expr.c (expand_java_field_op):  Check for invalid assignment
16171         to final field.
16172
16173         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
16174
16175 1997-10-27  Per Bothner  <bothner@cygnus.com>
16176
16177         * verify.c (verify_jvm_instructions):  When processing a handler,
16178         attempt to set the current_subr to the right value.
16179         (More complicated code combines Sep 17 and Oct 22 versions.)
16180
16181 1997-10-24  Per Bothner  <bothner@cygnus.com>
16182
16183         * class.c (push_class):  Figure out (guess) name of source file.
16184         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
16185         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
16186         (parse_class_file):  Change return type from int to void.
16187         Call debug_start_source_file/debug_end_source_file.
16188
16189         * expr.c (build_java_binop):  Fix masking 2nd operand.
16190         * decl.c (init_decl_processing):  Set sizetype first.
16191
16192 1997-10-22  Per Bothner  <bothner@cygnus.com>
16193
16194         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
16195         (Revert Sep 17 change.)
16196
16197 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16198
16199         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16200         .class extension in their name and fix thing so we don't process
16201         them parse_zip_file_entries().
16202         (parse_zip_file_entries): Cleaned unused local variables.
16203
16204 1997-10-20  Per Bothner  <bothner@cygnus.com>
16205
16206         * expr.c (can_widen_reference_to):  Allows equal array element types.
16207         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
16208         * jcf-dump.c (RET):  Get (and print) index.
16209
16210         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16211         Promote element type to POINTER_TYPE.
16212
16213 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16214
16215         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16216         find_in_current_zip, jcf_figure_file_type): Moved from
16217         jcf-reader.c to parse.c.
16218         * zextract.c: (read_zip_archive): takes file_comment_length possible
16219         field into account.
16220
16221 1997-10-20  Per Bothner  <bothner@cygnus.com>
16222
16223         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
16224
16225         * verify.c (merge_types):  Handle array types even better ...
16226
16227 1997-10-17  Per Bothner  <bothner@cygnus.com>
16228
16229         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
16230
16231         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
16232         * class.c (make_class_data):  Don't build fields_decl if no fields.
16233         When building fields_decl, skip if DECL_ARTIFICIAL.
16234
16235         * expr.c (java_stack_swap):  Update stack_type_map.
16236         * verify.c (merge_types):  Handle array types better.
16237
16238 1997-10-15  Per Bothner  <bothner@cygnus.com>
16239
16240         * class.c (add_field):  Don't promote short integral fields to
16241         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16242         * expr.c (push_value):  Promote and convert short integral values.
16243
16244         * decl.c, java-tree.h (integer_two_node):  New constant node.
16245         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
16246
16247 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16248
16249         * class.c (append_gpp_mangled_type): Use function argument
16250         unpromoted type to generate mangled name.
16251
16252 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16253
16254         * constants.c (build_constant_data_ref): Now uses current_class
16255         instead of main_class.
16256         (build_constants_constructor): Now uses current_class instead of
16257         main_class.
16258         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16259         of the global variable SeepZipFiles done here.
16260         * zextract.c (read_zip_archive): extra_field optional field taken
16261         into account while computing the position of the class file in the
16262         archive.
16263         * verify.c (verify_jvm_instructions): Use current_jcf to search
16264         the constant pool.
16265         * parse.c (load_class): First search for the class to load in the
16266         current zip file. Saves current_jcf (restored before returning
16267         from that function). Don't call JCF_FINISH in the class was found
16268         in the current ZIP file.
16269         (jcf_parse): If the class was found in the current ZIP file, save
16270         its tree_constant_pool (for later reuse).
16271         (parse_class_file): New function. Process each method defined in
16272         the current class and record the class as to be later registered.
16273         (yyparse): Rewritten. Figure the type of the current file and switch
16274         accordingly.
16275         * lang.c: New global variable current_jcf.
16276         (lang_init): Removed compiling_from_source test (done later, in
16277         yyparse). Removed call the jcf_parse ().
16278         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16279         (typedef struct JCF): New fields seen_in_zip (to mark a class found
16280         in the current ZIP file) and zip_offset (offset to the class data in
16281         the current zip file).
16282         * jcf-reader.c: zipfile.h included.
16283         localToFile: New ZipFileCache static global variable
16284         (parse_zip_file_entries): New function. Browse the current ZIP
16285         file directory and process each class found.
16286         (process_zip_dir): New function. Register each class found in the
16287         ZIP file directory. The class aren't parsed but a valid JCF is
16288         link to each of them.
16289         (find_in_current_zip): New function. Search for a class in the
16290         current ZIP file directory. If found, prepare the class so that it
16291         can be loaded.
16292         (jcf_figure_file_type): New function. Examine the file structure
16293         to figure a class file, a ZIP file. If none of these categories are
16294         matched, a source file is assumed.
16295         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16296         SeenZipFile: New global variable.
16297         (open_in_zip): Use zipmember's length to accelerate the search for
16298         a member. If zipmember was NULL and zip file successfully read,
16299         return 0.
16300         * java-tree.h: New global variable current_jcf declared.  Added
16301         declaration for current_constant_pool_tags, current_constant_pool_data,
16302         current_constant_pool_length, current_constant_pool_data_ref.
16303         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16304         store the JCF of classes seen in a zip file) and tree *constant_pool
16305         (to save a loaded class constant pool). current_class declared here.
16306         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16307         retrieve method_ref_constant.
16308         (PUSHC): java_push_constant_from_pool now uses current_jcf.
16309         (OBJECT): get_class_constant now uses current_jcf.
16310         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16311         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16312         (expand_invoke): Now uses current_class instead of main_class
16313         (build_class_init): Now uses current_class instead of main_class
16314         * class.c: New static global variable registered_class.
16315         (register_class): New function.
16316         (emit_register_class): Modified to use registered_class instead of
16317         main_class
16318         (is_compiled_class): Now take into account class seen in the archive.
16319
16320 1997-10-06  Per Bothner  <bothner@cygnus.com>
16321
16322         * except.h:  Renamed to: java-except.h.
16323         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
16324         * except.c:  Add semi-working (commented out) implementation.
16325
16326         * expr.c (expand_iinc):  Add needed flush_quick_stack.
16327         * parse.c (set_source_filename):  New function.
16328         (give_name_to_class):  Set input_filename from package.classname.java.
16329
16330         * jcf-io.c (find_class):  Don't look first in ".".
16331
16332 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16333
16334         * zextract.c (read_zip_archive): Now takes into account the
16335         extra_field field.
16336         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16337
16338 1997-09-20  Per Bothner  <bothner@cygnus.com>
16339
16340         * constants.c, java-tree.h (build_internal_class_name):  New function.
16341         (alloc_class_constant):  Re-implement using build_internal_class_name.
16342         * class.c (make_class_data):  Likewise.
16343         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
16344
16345 1997-09-17  Per Bothner  <bothner@cygnus.com>
16346
16347         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
16348         to NULL before pushing an exception handler target.
16349
16350         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
16351         (java_stack_swap, java_stack_dup):  Re-write to be safe from
16352         clobbering registers.
16353         (build_class_init):  New function.
16354
16355 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16356
16357         * typeck.c (build_java_array_type): Temporary use
16358         permanent_obstack to create the array 'length' field.
16359         * expr.c (lookup_label): Temporay use permanent_obstack to create
16360         label if not found.
16361         * class.c (push_super_field): Tempory use permanent_obstack.
16362
16363 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16364
16365         * typeck.c (type_for_mode): Now handles double_type_node and
16366         float_type_node.
16367         * verify.c (verify_jvm_instructions): The instruction following
16368         the wide bytecode is checked. OPCODE_ret added to the list of
16369         wide.
16370
16371 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16372
16373         * class.c (make_class): Temporary use permanent_obstack. Set the
16374         class CLASS_P field to 1.
16375         (push_class): Temporary use permanent_obstack.
16376         (set_super_info): Temporary use permanent_obstack.
16377         (add_method): Temporary use permanent_obstack, set
16378         METHOD_TRANSIENT().
16379         (add_field): Temporary use permanent_obstack. Sets
16380         FIELD_VOLATILE() and FIELD_TRANSIENT().
16381         (build_class_ref): Temporary use permanent_obstack if the class
16382         isn't compiled.
16383         (build_static_field_ref): Temporary use permanent_obstack when
16384         creating field's rtl.
16385         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16386         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16387         and fields. Function finalized, as far as flag handling.
16388         (push_class_static_dummy_field): Temporary use permanent_obstack.
16389         (emit_register_class): Force generation of class registration at
16390         -O3 or deeper.
16391         * decl.c (end_java_method): Call permanent_allocation() before
16392         returning.
16393         * expr.c (can_widen_reference_to): Added comment to interface
16394         handling, fixed typo.
16395         (lookup_field): Now uses CLASS_P() to correct FIXME
16396         (expand_invoke): Verification on public && !static &&
16397         !abstract moved into soft_lookupinterfacemethod (kaffe).
16398         Use Object class dtable if objectref is an array when expanding
16399         invokeinterface.
16400         (java_push_constant_from_pool): Temporary use permanent_obstack
16401         for CONSTANT_string
16402         * parse.c (get_ref_constant): Temporary use permanent_obstack to
16403         create constant references.
16404         (get_constant): Temporary use permanent_obstack to create constant.
16405         (load_class): Temporary use permanent_obstack to load class.
16406         (jcf_parse): Temporary use permanent_obstack to perform class
16407         layout.
16408         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16409         (build_java_signature): Temporary use permanent_obstack.
16410         * verify.c: (verify_jvm_instruction): removed unnecessary verification
16411         on ACC_SUPER flag.
16412         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16413         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16414         (CLASS_P): Defined
16415
16416 1997-09-11  Per Bothner  <bothner@cygnus.com>
16417
16418         * class.c (append_gpp_mangled_type):  Fix typo.
16419         (emit_register_class):  Use main_class to get class object, rather
16420         than looking for no-longer-existing static decl starting with _CL.
16421         * typeck.c (parse_signature_type):  Promote array element type
16422         if it is a RECORD_TYPE.
16423
16424 1997-09-10  Per Bothner  <bothner@cygnus.com>
16425
16426         * class.c (push_class_static_dummy_field):  New function.
16427         (mangle_static_field):  New. Do G++-style mangling of static fields.
16428         (layout_class):  Mandle static fields here, not in add_field.
16429         (build_class_ref):  The class object is now a dummy static field.
16430         * decl.c (find_local_variable):  Look for best, instead of first match.
16431         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
16432         (build_java_athrow):  Don't check here if exception is Throwable.
16433         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
16434         (TYPE_USED):  Removed.  No longer used ...
16435         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
16436         * verify.c (push_pending_label):  New function.
16437         (push_pending_block):  Renamed to check_pending_block.
16438         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
16439         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
16440         re-checking possible handlers) after a store (less wasted work).
16441         Check for null handler (finally) before calling add_handler.
16442         Various changes to (finally?) correctly handle try/finally.
16443
16444 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16445
16446         * class.c: Include stdio.h.
16447
16448 1997-09-04  Per Bothner  <bothner@cygnus.com>
16449
16450         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16451         to make sure class is initialized before static/special invoke.
16452
16453         * verify.c (verify_jvm_instructions):  On a store instruction,
16454         call find_local_variable to force pre-allocation of decl and rtx.
16455         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
16456
16457 1997-09-03  Per Bothner  <bothner@cygnus.com>
16458
16459         * class.c (build_class_ref):   Strip off "promoted_" if need be.
16460         (make_field_value): Call build_java_signature when needed.
16461         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
16462         * expr.c (build_java_athrow):  Don't push_value of exception.
16463         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16464         match specification of [fd]cmp[lg] for NaNs.
16465         (expand_byte_code):  Add support for exception handler ranges.
16466         * except.c:  Add skeleton for EH code-generation.
16467         * verify.c (merge_types):  Treat all promoted integral types as equal.
16468         * constants.c (build_constants_constructor):  To force creation of
16469         current_constant_pool_data_ref, call build_constant_data_ref.
16470
16471         * javaop.def (lload):  Fix typo.
16472         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
16473
16474 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
16475
16476         * parse.c: Don't include function.h.
16477
16478 1997-08-27  Per Bothner  <bothner@cygnus.com>
16479
16480         * except.[ch]:  New files.
16481         * Makefile.in (JAVA_OBJS):  Add except.o
16482         * expr.c:  Temporary warning about unimplemented exceptions.
16483         * verify.c:  Verify exception handlers.
16484
16485         * jcf-dump.c (disassemble_method):  Print exception table.
16486
16487 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16488
16489         * expr.c (verify_jvm_instructions): Started a thorough
16490         verification of invoke* bytecodes.
16491         (expand_byte_code): flush quick stack if PC is the target of a
16492         branch.  and undef RET (conflicting with config/i386/i386.h).
16493         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16494         used.
16495         (expand_invoke): Now handles invokeinterface and do more
16496         verification according to the bytecode.
16497         (lookup_field): Don't try to load the class if processing
16498         dtable_type.
16499         (can_widen_reference_to): Now handles interfaces.
16500         * decl.c (init_decl_processing): New global variable
16501         soft_lookupinterfacemethod_node, declared in java-tree.h.
16502         Call set_super_info on string_type_node.
16503         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16504         defined.
16505         * class.c (set_super_info): Fills the CLASS_* flags according to
16506         access_flags.
16507         (get_access_flags_from_decl): Handles all class flags.
16508
16509 1997-08-26  Per Bothner  <bothner@cygnus.com>
16510
16511         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
16512         * parse.c (yyparse):  Check for abstract method, and missing code.
16513         * expr.c (expand_byte_code):  Change interface.
16514         * lang.c (put_decl_node):  Print promoted types prettier.
16515         * verify.c (verify_jvm_instruction):  Change interface.
16516         Partial support for scanning exception table.
16517         For load instructions, handle promoted integral types.
16518
16519 1997-08-21  Per Bothner  <bothner@cygnus.com>
16520
16521         * verify.c:  New file, with contents moved from expr.c.
16522         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
16523         * typeck.c (is_array_type_p):  Moved here from expr.c.
16524         * java-tree.h:  Add some now-needed function declarations.
16525         * Makefile.in (JAVA_OBJS): Added verify.o.
16526
16527 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16528
16529         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16530         METHOD_ABSTRACT flag.
16531
16532         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16533         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16534         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16535
16536         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16537         variables.
16538         (start_java_method): Hook for SYNCHRONIZED methods.
16539
16540         * expr.c (build_java_jsr, build_java_ret): New functions
16541         (JSR,PRE): New macros
16542         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16543         (verify_jvm_instructions): tableswitch, lookupswitch,
16544         monitorenter, monitorexit, goto_w: verified.
16545         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16546         (build_java_monitor): New function.
16547         (MONITOR_OPERATION): Modified to call build_java_monitor()
16548         (verify_jvm_instructions): Started a thorough verification of
16549         invoke* bytecodes.
16550
16551 1997-08-19  Per Bothner  <bothner@cygnus.com>
16552
16553         Support verification of jsr/ret subroutines (used for try/finally).
16554         * decl.c (return_address_type_node):  New type node.
16555         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16556         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16557         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
16558         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16559         TYPE_USED):  New macros for special types in type_map.
16560
16561         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
16562         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
16563         BCODE_JUMP_TARGET.
16564         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
16565
16566         * expr.c (can_widen_reference_to):  New function.
16567         (pop_type):  Use it.
16568         (merge_type_state):  Support handling start of subroutine.
16569         (push_pending_block):  Return char* error message, instead of calling
16570         fatal on an error.  Also handle subroutines.
16571         (verify_jvm_instructions):  Handle errors from push_poending_block.
16572         Support jsr and ret instructions.
16573
16574 1997-08-19  Per Bothner  <bothner@cygnus.com>
16575
16576         * jcf-io.c (find_classfile):  Fix thinko.
16577         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
16578
16579 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
16580
16581         * Makefile.in (BISON): Remove.
16582
16583 1997-08-07  Per Bothner  <bothner@cygnus.com>
16584
16585         * Makefile.in:  Convert to autoconf.
16586         * config-lang.in (outputs):  Added java/Makefile.
16587
16588         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16589         Rename cc1java to jc1.
16590
16591         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
16592         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
16593
16594         * class.c (class_depth):  Do load_class if needed.
16595
16596         Mostly better verification.
16597         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
16598         (init_decl_processing):  Change return type of soft_checkcast.
16599         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
16600         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16601         lang_print_error):  New functions.
16602         (lang_init):  Set global hook print_error_function to lang_print_error.
16603         * expr.c:  In the type_map ptr_type_node is only used for null now.
16604         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
16605         (merge_types):  Dererence pointer to record types before comparing.
16606         (decode_newarray_type, merge_types):  On error just return NULL.
16607         (build_java_binop):  Add preliminary implementation (with warning)
16608         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16609         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
16610         (expand_compare, expand_java_goto, expand_java_call):  Don't
16611         push_pending_block, since that only makes sense when verifying.
16612         (merge_type_state):  Different return codes.
16613         (push_pending_block):  A block may need to be verified more than once.
16614         (expand_byte_code):  Warn about unused code at code generation time.
16615         (verify_jvm_instruction):  Changed logic, since code may need to be
16616         re-verified if type-state has changed.  Also, better error handling.
16617         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16618         Improve newarray, anewarray, ?aload, athrow,
16619         * java-tree.h (LABEL_CHANGED):  New macro.
16620
16621 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16622
16623         * decl.c (soft_athrow_node): New global variable initialized.
16624         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16625         * typeck.c (convert): Added support for REAL_TYPE.
16626         (convert_to_char): New function.
16627         (convert): Handle CHAR_TYPE.
16628         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16629         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16630         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16631         promoted type.
16632         (verify_jvm_instructions): Added break a the end of bogus unop: label.
16633         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16634         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16635         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16636         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16637         to Use The Right Things.
16638         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16639         compatible with INT. BOOLEAN is made equivalent to BYTE.
16640         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16641         OPCODE_ifnonnull): Now supported.
16642         (build_java_athrow): New function.
16643
16644 1997-08-04  Per Bothner  <bothner@cygnus.com>
16645
16646         Rename method name <init> to match G++ (and fix mangling).
16647         * class.c (layout_class):  Replace method name of <init> by class name.
16648         (make_method_value):  Do inverse renaming of constructor from <init>.
16649         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
16650         * typeck.c (lookup_java_constructor):  New function.
16651         * expr.c (expand_invoke):  If method_name is <init>, call
16652         lookup_java_constructor to find constructor.
16653
16654         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
16655
16656 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16657
16658         * parse.c (get_class_constant): Modified to handle array "classes"
16659         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16660         wide type.
16661         (convert): Modified to handle real type.
16662         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16663         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16664         variables declared.
16665         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16666         soft_multianewarray, soft_newarray_node, soft_throw_node): New
16667         global variables initialized.
16668         (find_local_variable): Handles the case of a pointer
16669         (end_java_method): Restore the use of one more scope
16670         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16671         build_java_array_length_access, expand_java_arrayload,
16672         expand_java_arraystore, expand_java_array_length,
16673         expand_java_multianewarray, expand_java_anewarray,
16674         build_java_check_indexed_type, is_array_type_p,
16675         build_java_throw_out_of_bound_exception): New functions.
16676         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16677         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16678         OPCODE_<t>aload): Implemented code for verification.
16679         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16680         ARRAY_NEW_MULTI): Macro defined.
16681         (CONVERT): Modified to invoke convert().
16682         (case OPCODE_aload2): Fixed index typo from 2 to 1.
16683
16684 1997-07-31  Per Bothner  <bothner@cygnus.com>
16685
16686         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
16687         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
16688         (make_class_data):  Field name needs '/' as package prefix.
16689         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
16690
16691 1997-07-25  Per Bothner  <bothner@cygnus.com>
16692
16693         Implement debug information for local variables.
16694         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16695         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16696         DECL_LOCAL_SLOT_CHAIN):  New macros.
16697         (struct lang_decl_var):  New type.
16698         * parse.c (give_name_to_locals):  Move to decl.c.
16699         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
16700         (start_java_method):  Re-write parameter handling.
16701         (pending_local_decls):  New global variable.
16702         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
16703         (find_local_variable):  Accept pc so we can skips decls not in range.
16704         (struct binding_level):  Add end_pc field.
16705         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16706         (various):  Change so current pc gets passed to find_local_variable.
16707
16708         * decl.c (init_decl_processing):  Re-arrange fields in
16709         class_type_node and and method_type_node to match kaffe 0.9.1.
16710         * class.c (make_method_value, make_class_data):  Update
16711         initializations to match.
16712
16713 1997-07-16  Per Bothner  <bothner@cygnus.com>
16714
16715         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16716         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
16717         (push_super_field):  New function.
16718         (make_class_data):  Handle inheritance of class static initializer.
16719         (layout_class):  New name mangling.
16720         * constants.c (build_constant_data_ref):  Init type of data array
16721         to a one-element array.
16722         (build_constants_constructor):  Set DECL_SIZE from complete array type.
16723         * decl.c:  Rename class_type, object_type etc to class_type_node,
16724         object_type_node etc.  Make former inherit from latter.
16725         * expr.c (expand_invoke):  Add cast of function address.
16726         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
16727         * parse.c (yyparse):  Don't call layout_class here.
16728         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
16729
16730 1997-06-14  Per Bothner  <bothner@cygnus.com>
16731
16732         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
16733         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
16734         (alloc_class_constant):  New.
16735         * expr.c (expand_invoke):  Make sure method's class is initialized.
16736         * class.c (interits_from_p, emit_register_class):  New functions.
16737         * parse.c (yyparse):  Call emit_register_class.
16738
16739 1997-06-09  Per Bothner  <bothner@cygnus.com>
16740
16741         * constants.c:  New file, to handle constant pool.
16742         * Makefile.in (JAVA_OBJS):  Add constants.o.
16743         * decl.c (init_decl_processing):  Update, fix, finish various structs.
16744         (pushdecl_top_level):  New.
16745         * parse.c (layout_class):  Moved to class.c.
16746         * expr.c (java_push_constant_from_pool):  New function.
16747         * class.c (build_class_ref):  Make work fully
16748         (make_class_data):  Emit super-class, constant pool, interface vector.
16749
16750 1997-06-03  Per Bothner  <bothner@cygnus.com>
16751
16752         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
16753         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
16754         * class.c (class_depth):  New function.
16755         (lookup_named_class):  Replaced by new function lookup_class.
16756         * decl.c (object_type_node, string_type_node):  New.
16757         Remove various types that we no longer need.
16758         * expr.c (verify_jvm_instructions):  New separate verifier pass.
16759         (push_type, pop_type):  New functions for verifier.
16760         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
16761         (expand_byte_code):  Simplify, since we assume already verified.
16762         (expand_invoke):  Now mostly works.
16763         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16764         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
16765         * parse.c:  Wait to allocate class object until we know its name.
16766         (layout_class):  Calculate DECL_VINDEX for each virtual method.
16767         * typeck.c (get_array_type):  Rename to ...
16768         (build_java_array_type):  ... and provide working implementation.
16769         (build_java_signature):  New function - build Java signature of type.
16770         (set_java_signature):  New function - cache signature with type.
16771         (lookup_java_method):  New function.
16772
16773 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
16774
16775         * class.c (ident_subst):  Take extra SUFFIX parameter.
16776         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
16777         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
16778         (build_class_ref):  Actually implement.
16779         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
16780         * decl.c (builtin_function):  New.
16781         (init_decl_processing):  Update for current Kaffe.  Declare some
16782         builtin Kaffe functions.
16783         * expr.c (build_address_of):  New.
16784         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
16785         Renamed (from expand_java_new etc), and added working implementations.
16786         (build_field_ref):  Now also handle static fields.
16787         (expand_invoke):  Implement invokestatic, and start implement rest.
16788         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
16789         * javaop.def:  Rename invokevirt -> invokevirtual.
16790         * lang.c (use_handles):  Removed.
16791         * parse.c:  Add support for ConstantValue attribute.
16792         Handle nested loading of a class.  (JPOOL_UTF):  New.
16793
16794 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
16795
16796         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
16797
16798 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
16799
16800         * Make-lang.in (java.install-man):  New empty rule.
16801         * typeck.c (set_local_type):  New function.
16802         * expr.c (STORE_INTERNAL):  Call find_local_variable,
16803         not find_stack_slot.  Call set_local_type.
16804
16805 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
16806
16807         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
16808         and building RECORD_TYPE CONSTRUCTORs.
16809         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
16810
16811         * lang.c (use_handles):  Change the default to 0.
16812         * decl.c:  Define and build class_type, field_type, utf8const_type.
16813         * class.c (make_class_data, make_field_value,
16814         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
16815         hashUtf8String, strLengthUtf8, mangled_classname:
16816         Functions to build reflective data structures.
16817         * parse.c (yyparse):  Call make_class_data.
16818
16819         * jcf-io.c (open_class, find_classfile):  New functions.
16820         * jcf-dump.c:  Support reading classfile from explicitly-named
16821         class file (without CLASSPATH searching).
16822
16823 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16824
16825         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
16826         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
16827         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
16828         (get_constant):  Now trivial for CONSTANT_Utf8.
16829
16830         * jcf.h:  Make NEW_CPOOL the default.
16831         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
16832
16833 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16834
16835         New directory.