OSDN Git Service

.:
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2
3         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4         * class.c (build_utf8_ref, build_static_field_ref,
5         make_field_value, make_method_value, get_dispatch_table,
6         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
7         * constants.c (get_tag_node,  build_ref_from_constant_pool, 
8         build_constants_constructor): Likewise.
9         * decl.c (java_init_decl_processing): Likewise.
10         * expr.c (build_java_array_length_access, build_newarray,
11         expand_java_multianewarray, expand_java_pushc, expand_iinc,
12         build_java_binop, build_field_ref, expand_java_add_case,
13         expand_java_call, build_known_method_ref, build_invokevirtual,
14         build_invokeinterface, build_jni_stub): Likewise.
15         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
16         * jcf-parse.c (get_constant): Likewise.
17         * lex.c (do_java_lex): Likewise.
18         * parse.y (patch_binop, patch_unaryop, patch_cast,
19         build_null_of_type, patch_newarray): Likewise.
20         * resource.c (compile_resource_data): Likewise.
21         * typeck.c (build_prim_array_type): Likewise.
22
23 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
24
25         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
26         Don't create BLOCK here or call java_gimplify_block.
27
28 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
29
30         * java-tree.h (flag_deprecated): Removed.
31         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
32         * parse.y (check_deprecation): Check warn_deprecated instead of
33         flag_deprecated.
34
35 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
36
37         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
38         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
39         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
40         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
41         flag_force_classes_archive_check, flag_optimize_sci,
42         flag_indirect_dispatch): Remove explicit declarations.
43         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
44         final comment.
45
46 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
47
48         PR bootstrap/14893
49         * Make-lang.in (java.install-man): Install from either build
50         tree or source tree, whichever has the file first.
51
52 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
53
54         * jcf-parse.c (get_constant): Adjust force_fit_type call.
55         * lex.h (SET_LVAL_NODE_TYPE): Remove.
56         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
57         (do_java_lex): Likewise. Adjust force_fit_type call.
58
59 2004-08-04  Roger Sayle  <roger@eyesopen.com>
60             Andrew Haley  <aph@redhat.com>
61
62         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
63         checking trees as they're being built.
64         (convert): Call convert_ieee_real_to_integer if we're
65         converting a constant, even if we're writing a class file.
66
67 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
68
69         PR java/16701
70         * parse.y (fold_constant_for_init): Call resolve_field_access with
71         correct current_class context.
72
73 2004-08-01  Roger Sayle  <roger@eyesopen.com>
74
75         * decl.c (update_aliases, initialize_local_variable): Replace calls
76         to build with calls to buildN.
77         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
78         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
79         * parse.h (BUILD_THROW): Likewise.
80         * parse.y (switch_expression, synchronized_statement,
81         catch_clause_parameter, array_creation_expression,
82         conditional_expression, make_qualified_name,
83         resolve_qualified_expression_name, patch_method_invocation,
84         patch_invoke, build_method_invocation, build_new_invocation,
85         build_assignment, patch_assignment, build_binop, patch_binop,
86         build_string_concatenation, build_incdec, patch_unaryop,
87         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
88         patch_return, build_if_else_statement, build_labeled_block,
89         build_new_loop, build_loop_body, build_bc_statement,
90         build_assertion, encapsulate_with_try_catch, build_try_statement,
91         build_try_finally_statement, patch_synchronized_statement,
92         emit_test_initialization): Likewise, replace build with buildN.
93
94 2004-07-28  Eric Christopher  <echristo@redhat.com>
95
96         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
97         (java_unsafe_for_reeval): Ditto.
98
99 2004-07-26    <hp@bitrange.com>
100
101         * parse.y (build_super_invocation): Adjust declaration order to
102         avoid declaration after statement.
103
104 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
105
106         * decl.c: Rename all identifiers named `class' to `cl'.
107
108 2004-07-25  Richard Henderson  <rth@redhat.com>
109
110         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
111
112 2004-07-23  Mike Stump  <mrs@apple.com>
113
114         * boehm.c (set_bit): Improve type safety wrt unsignedness.
115         * gjavah.c (throwable_p, decode_signature_piece,
116         print_full_cxx_name, print_include, add_namelet, add_class_decl,
117         process_file): Likewise.
118         * jcf-dump.c (main): Likewise.
119         * jcf-io.c (read_zip_member): Likewise.
120         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
121         give_name_to_class, get_class_constant): Likewise.
122         * jcf-write.c (find_constant_wide, push_long_const,
123         generate_classfile): Likewise.
124         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
125         * parse.y (read_import_dir): Likewise.
126         * typeck.c (parse_signature_type): Likewise.
127         * verify.c (verify_jvm_instructions): Likewise.
128         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
129
130 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
131
132         * Make-lang.in: Replace rmic and rmiregistry references with
133         grmic and grmiregistry.
134         * gcj.texi: Likewise.
135
136 2004-07-20  Andrew Haley  <aph@redhat.com>
137
138         PR java/16431.
139         * verify.c (verify_jvm_instructions): Comment change only.
140
141         * typeck.c (build_java_array_type): Add size field to array name.
142
143         * java-tree.h (LOCAL_SLOT_P): New.
144         (update_aliases): Add PC argument.
145         (pushdecl_function_level): New function.
146
147         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
148         MODIFY_EXPR, and SAVE_EXPR.
149         (java_gimplify_modify_expr): New function.
150
151         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
152         (expand_iinc): Pass PC to update_aliases().
153         (STORE_INTERNAL): Likewise.
154         (process_jvm_instruction): Likewise.
155
156         * decl.c (base_decl_map): New variable.
157         (uniq): New variable.
158         (update_aliases): Rewrite with more thorough checking.
159         (debug_variable_p): New function.
160         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
161         (check_local_named_variable): Delete whole function.
162         (initialize_local_variable): New function.
163         (check_local_unnamed_variable): Add checks and comments.
164         (find_local_variable): Rewrite.
165         (java_replace_reference): New function.
166         (function_binding_level): New variable.
167         (pushdecl_function_level): New function.
168         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
169         (maybe_pushlevels): Call pushdecl() on each of the new decls.
170         (start_java_method): Reset uniq.  Create base_decl_map.  Set
171         function_binding_level.
172         (end_java_method): Null unused fields to save memory.
173
174 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
175
176         * class.c (add_interface_do): Remove.
177         (set_super_info, interface_of_p, maybe_add_interface,
178         add_interface, make_class_data, layout_class,
179         add_miranda_methods): Adjust BINFO accessors and addition.
180         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
181         accessors.
182         * jcf-write.c (generate_classfile): Likewise.
183         * parse.y (patch_anonymous_class, check_inner_circular_reference,
184         check_circular_reference, java_complete_class,
185         check_abstract_method_definitions,
186         java_check_abstract_method_definitions,
187         check_interface_throws_clauses, java_check_abstract_methods,
188         lookup_java_interface_method2,
189         find_applicable_accessible_methods_list): Adjust BINFO accessors
190         and addition.
191         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
192
193 2004-07-18  Roger Sayle  <roger@eyesopen.com>
194
195         * builtins.c (max_builtin, min_builtin,
196         java_build_function_call_expr): Replace calls to build with buildN.
197         * class.c (build_class_ref, build_static_field_ref,
198         get_dispatch_table, make_class_data, layout_class_method): Likewise.
199         * constants.c (build_ref_from_constant_pool): Likewise.
200         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
201         add_stmt_to_compound): Likewise.
202         * except.c (build_exception_object_ref, expand_end_java_handler):
203         Likewise.
204         * java-gimplify.c (java_gimplify_case_expr,
205         java_gimplify_default_expr, java_gimplify_block,
206         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
207         * jcf-write.c (generate_bytecode_insns): Likewise.
208         * typeck.c (convert_ieee_real_to_integer): Likewise.
209
210 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
211
212         * java-tree.h (builtin_function): Declare.
213
214 2004-07-16  Steven Bosscher  <stevenb@suse.de>
215
216         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
217         abuse restore_line_number_status.
218
219 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
220
221         g++/15861
222         * jcf-parse.c (java_emit_static_constructor): Specify default
223         priority.
224
225 2004-07-13  Per Bothner  <per@bothner.com>
226
227         * java-tree.h (all_class_filename):  Remove useless macro.
228         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
229         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
230         * parse.y (java_parser_context_restore_global):  Replace
231         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
232         * jcf-parse.c (read_class, java_parse_file):  Likewise.
233
234 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
235
236         PR java/16474
237         gjavah.c (print_field_info): Emit constant only if field is static.
238
239 2004-07-11  Roger Sayle  <roger@eyesopen.com>
240
241         * expr.c (java_truthvalue_conversion, flush_quick_stack,
242         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
243         build_java_ret, build_java_throw_out_of_bounds_exception,
244         build_java_array_length_access, java_check_reference,
245         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
246         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
247         expand_java_arrayload, build_java_monitor, expand_java_return,
248         expand_load_internal, expand_java_NEW, build_get_class,
249         build_instanceof, expand_java_CHECKCAST, expand_iinc,
250         build_java_soft_divmod, build_java_binop, build_field_ref,
251         expand_compare, expand_java_goto, expand_java_switch,
252         expand_java_add_case, build_class_init, build_known_method_ref,
253         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
254         expand_invoke, build_jni_stub, expand_java_field_op,
255         java_expand_expr, expand_byte_code, STORE_INTERNAL,
256         force_evaluation_order, emit_init_test_initialization): Convert
257         calls to "build" into calls to the prefered "buildN" functions.
258
259 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
260
261         * java-tree.h (set_block): Remove.
262         * lang.c (java_clear_binding_stack): New.
263         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
264         * decl.c (struct binding_level): Remove this_block.
265         (clear_binding_level): Likewise.
266         (poplevel): Don't handle this_block.
267         (set_block): Remove.
268
269 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
270
271         * class.c (common_enclosing_context_p): Remove statement with no
272         side-effects.
273
274 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
275
276         PR java/8618
277         * parse.y (create_anonymous_class): Remove 'location' argument. Use
278         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
279         (craft_constructor): Inherit access flags for implicit constructor
280         from the enclosing class.
281         (create_class): Fix comment typo.
282         (resolve_qualified_expression_name): Pass type of qualifier to
283         not_accessible_p, not the type in which target field was found.
284         (not_accessible_p): Handle inner classes. Expand protected
285         qualifier-subtype check to enclosing instances, but don't apply this
286         check to static members. Allow protected access to inner classes
287         of a subtype. Allow private access within common enclosing context.
288         (build_super_invocation): Get WFL line number info from current
289         class decl.
290         (build_incomplete_class_ref): Update for new create_anonymous_class
291         signature.
292         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
293         common_enclosing_instance_p.
294         * class.c (common_enclosing_context_p): New. Determine if types
295         share a common enclosing context, even across static contexts.
296         (common_enclosing_instance_p): Renamed from
297         common_enclosing_context_p. Determines if types share a common
298         non-static enclosing instance.
299         * java-tree.h (common_enclosing_instance_p): Declare.
300         * jcf-write.c (get_method_access_flags): New. Surpress private flag
301         for inner class constructors.
302         (generate_classfile): Use get_method_access_flags.
303
304 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
305
306         * class.c (interface_of_p): Check for null TYPE_BINFO.
307
308 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
309
310         * class.c (make_class): Do not create binfo here.
311         (set_super_info): Create it here.
312         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
313
314 2004-07-08  Richard Henderson  <rth@redhat.com>
315
316         * expr.c (case_identity, get_primitive_array_vtable,
317         java_expand_expr, emit_init_test_initialization): Remove.
318         * java-tree.h (java_expand_expr): Remove.
319         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
320
321 2004-07-07  Per Bothner  <per@bothner.com>
322
323         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
324         get internal error due to mismatched types.
325
326         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
327
328         * gcj.texi (Linking):   New node.  Document -lgij usage.
329
330 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
331
332         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
333         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
334         * java/class.c (set_super_info, class_depth, interface_of_p,
335         maybe_add_interface, add_interface, make_class_data,
336         layout_class, add_miranda_methods): Adjust BINFO macros.
337         * expr.c (can_widen_reference_to, lookup_field): Likewise.
338         * jcf-write.c (generate_classfile): Likewise.
339         * parse.y (patch_anonymous_class,
340         check_inner_circular_reference, check_circular_reference,
341         java_complete_class, check_abstract_method_definitions,
342         java_check_abstract_method_definitions,
343         check_interface_throws_clauses, java_check_abstract_methods,
344         lookup_java_interface_method2,
345         find_applicable_accessible_methods_list): Likewise.
346         * typeck.c (find_method_in_interface): Likewise.
347         * verify.c (merge_types): Likewise.
348
349 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
350
351         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
352         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
353
354 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
355
356         * class.c (make_class): Use make_tree_binfo.
357         (set_super_info, add_interface_do): Likewise.
358         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
359
360 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
361
362         * verify.c: Correct array element access formatting thinko.
363
364 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
365
366         * verify.c: Insert a short blurb at the start referring to the JVMS.
367         (merge_type_state): Remove redundant nested if statement.
368         (verify_jvm_instructions): Ensure current_subr is initialised to
369         NULL_TREE.
370         Minor formatting fixes all over the place.
371
372 2004-07-02  Richard Henderson  <rth@redhat.com>
373
374         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
375
376 2004-07-01  Richard Henderson  <rth@redhat.com>
377
378         * class.c (registerClass_libfunc): Remove.
379         (init_class_processing): Don't set it.
380         (emit_register_classes): Take list_p parameter.  Fill it in
381         with _Jv_RegisterClass calls.
382         * decl.c (java_init_decl_processing): Don't call
383         init_resource_processing.
384         * jcf-parse.c (java_emit_static_constructor): New.
385         (java_parse_file): Call it.
386         * resource.c (registerResource_libfunc): Remove.
387         (init_resource_processing): Remove.
388         (write_resource_constructor): Take list_p parameter.  Fill it in
389         with _Jv_RegisterResource calls.
390         * java-tree.h: Update prototypes.
391
392 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
393
394         PR java/1262
395         * class.c (layout_class_method): Do not override package-private
396         method if its in a different package.
397         (split_qualified_name): Move here from parse.y. Rename from
398         breakdown_qualified. Add comment.
399         (in_same_package): Move here from parse.y. Add comment.
400         * java-tree.h (break_down_qualified, in_same_package): Declare.
401         (in_same_package): Likewise.
402         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
403         Callers updated.
404
405 2004-06-29  Andrew Haley  <aph@redhat.com>
406
407         * except.c (expand_start_java_handler): Push a new binding level.
408         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
409         register_exception_range() to register where we'll do it.
410         (expand_end_java_handler): Remove old bogus code.  Replace with
411         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
412         the top of the expression we're curently building.
413         (maybe_end_try): Delete.
414         * decl.c (binding_level.exception_range): New field.
415         (clear_binding_level): Add field exception_range.  Reformat.
416         (poplevel): Call expand_end_java_handler().
417         (poplevel): Call java_add_stmt only if functionbody is false.
418         (maybe_poplevels): Don't call maybe_end_try() from here.
419         (end_java_method): Clear no longer used trees in function decl.
420         (register_exception_range): New function.
421         * java-tree.h (register_exception_range, struct eh_range): Declare.
422
423 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
424
425         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
426
427 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
428
429         Formatting fixes.
430         * expr.c (class_has_finalize_method): Fix method name indentation.
431         (expand_java_call): Remove K&R style parameter declaration.
432         (expand_invoke): Fix statement indentation.
433         (expand_java_field_op): Likewise.
434         * parse-scan.y: Fix typo.
435         (reset_report): Fix method name indentation.
436         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
437         line. Fix typos.
438         * verify.c (verify_jvm_instructions): Document parameters, insert
439         page break.
440         * lang.c (lang_init_source): Fix method name indentation.
441         * class.c (common_enclosing_context_p): Likewise.
442         (emit_symbol_table): Fix parameter list indentation.
443         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
444         parameter declaration.
445         * constants.c: Fix copyright notice indentation.
446         * typeck.c (find_method_in_superclasses): Fix parameter list
447         indentation.
448         (find_method_in_interfaces): Likewise.
449         * zextract.c (makelong): Fix method name indentation.
450
451 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
452
453         PR java/15715.
454         * parse.y (create_interface): Set correct access modifiers for
455         interfaces.
456         * jcf-write.c (get_classfile_modifiers): New function.
457         (generate_classfile): Use get_classfile_modifiers, not
458         get_access_flags.
459
460 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
461
462         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
463         dependency to current parser context, not NULL_TREE, for top-level
464         classes.
465         (jdep_resolve_class): Enable member access check for all inner
466         class dependencies.
467
468 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
469
470         * parse.y (qualify_and_find): Pass type decl, not identifier, to
471         load_class.
472
473 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
474
475         PR java/15734
476         * expr.c (expand_java_field_op): Ensure that target class for static
477         field access has been loaded.
478
479 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
480             Ranjit Mathew  <rmathew@hotmail.com>
481
482         PR java/1207, java/16178
483         * jcf-parse.c (load_class): Return immediately if passed a type decl
484         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
485         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
486         before calling load_class.
487         (qualify_and_find): Likewise.
488         (find_in_imports_on_demand): Likewise.
489         (find_applicable_accessible_methods_list): Likewise.
490
491 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
492
493         * parse.y (java_layout_seen_class_methods): Don't call load_class
494         on class defined by source parser.
495
496 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
497
498         * parse.y (set_nested_class_simple_name_value): Removed.
499         (java_complete_expand_class): Remove calls to
500         set_nested_class_simple_name_value.
501
502 2004-06-22  Andrew Haley  <aph@redhat.com>
503             Ranjit Mathew  <rmathew@hotmail.com>
504
505         Fixes PR java/16113.
506         * decl.c (force_poplevels): Remove call to expand_end_bindings.
507
508 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
509
510         * parse.y (create_class): Correct diagnostic message about
511         java.lang.Object extending anything else.
512
513 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
514
515         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
516         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
517         * constants.c (build_ref_from_constant_pool): Likewise.
518         * expr.c (build_java_array_length_access): Likewise.
519         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
520         (invoke_build_dtable, build_invokevirtual): Likewise.
521         (build_invokeinterface, java_expand_expr): Likewise.
522         (emit_init_test_initialization): Likewise.
523         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
524         * parse.y (make_qualifed_name, build_array_ref): Likewise.
525
526 2004-06-21  Andrew Haley  <aph@redhat.com>
527
528         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
529         block.
530
531 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
532
533         * jcf.h (struct JCF): Change java_source, right_zip and finished
534         to unsigned int.
535         * lex.h (struct java_lexer): Change hit_eof, read_anything,
536         byte_swap and use_fallback to unsigned int.
537         * parse.h (struct _jdep): Change flag0 to unsigned int.
538
539 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
540
541         Fixes PR java/13948
542         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
543         before trying to lay out its methods.
544         * jcf-parse.c (read_class): Track parsed files using canonical paths
545         obtained via lrealpath from libiberty.
546         (java_parse_file): Likewise.
547         (parse_source_file_1): Rename formal parameter to reflect its
548         modified purpose. Minor formatting fix.
549
550 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
551
552         * class.c (emit_register_classes): Make the function uninlinable,
553         do not set current_function_cannot_inline.
554         * resource.c (write_resource_constructor): Do not reset
555         flag_inline_functions around rest_of_compilation.
556
557 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
558
559         PR java/15769
560         * expr.c (java_truthvalue_conversion): Handle
561         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
562         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
563         i.e. return the expression.
564
565 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
566
567         * gjavah.c: Include version.h
568
569 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
570
571         * jcf-write.c (generate_bytecode_conditional): Correct handling
572         of unordered conditionals. Add comment.
573
574 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
575             Per Bothner  <per@bothner.com>
576
577         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
578         local variable was initialised upon declaration.
579         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
580         variable was final and initialised upon declaration.
581         * check-init.c (check_final_reassigned): Give error only if a blank
582         final is not definitely unassigned or if an initialised final is
583         reassigned.
584         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
585         assignment expressions. Remove case MODIFY_EXPR, label do_default.
586         (check_init): Perform initialised-variable-removing-optimisation
587         only on non-final local variables.
588
589 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
590
591         * jcf-write.c (generate_bytecode_conditional): Handle binops
592         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
593         and LTGT_EXPR.
594         (generate_bytecode_insns): Likewise.
595
596 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
597
598         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
599         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
600
601 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
602
603         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
604         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
605
606 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
607
608         * decl.c (struct binding_level): Add GTY marker. Compile
609         binding_depth unconditionally.
610         (current_binding_level, free_binding_level, global_binding_level):
611         Likewise.
612         (clear_binding_level): Unconditionally set binding_depth.
613         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
614
615 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
616
617         * lex.c (java_new_lexer): Set 'encoding'.
618         (java_read_char): Improve error message for unrecognized characters.
619         * lex.h (struct java_lexer): New field 'encoding'.
620
621 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
622
623         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
624
625 2004-05-21  Mark Wielaard  <mark@klomp.org>
626
627         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
628         extern.
629
630 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
631
632         * typeck.c: Remove non-printable character 160.
633
634 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
635
636         * check-init.c: Correct minor typos.
637
638 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
639
640         * Make-lang.in, expr.c, java-gimplify.c: Rename
641         tree-simple.[ch] to tree-gimple.[ch].
642
643 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
644
645         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
646
647 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
648
649         Merge from tree-ssa-20020619-branch.  See
650         ChangeLog.tree-ssa for details.
651
652         * Make-lang.in, builtins.c, check-init.c, class.c,
653         constants.c, decl.c, except.c, expr.c, java-except.h,
654         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
655         lang.c, lang.opt, parse.y, resource.c: Merged.
656         * java-gimplify.c: New file.
657
658 2004-05-10  Andrew Haley  <aph@redhat.com>
659
660         * parse.y (create_class): Set TYPE_VFIELD.
661         * decl.c (java_init_decl_processing): Likewise.
662
663         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
664         * class.c (make_method_value): Replace DECL_VINDEX with call to
665         get_method_index().
666         (get_dispatch_vector): Likewise.
667         (layout_class_method): Likewise.
668         Replace set of DECL_VINDEX with call to set_method_index().
669         (set_method_index): New function.
670         (get_method_index): New function.
671         * java-tree.h (set_method_index): New function decl.
672         (get_method_index): New function decl.
673
674 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
675
676         * parse.y (check_pkg_class_access): Add new argument
677         and use it when cl is NULL to call lookup_cl on it.
678         (parser_check_super_interface): Do not call lookup_cl.
679         Pass this_decl to check_pkg_class_access and NULL
680         instead of lookup_cl.
681         (parser_check_super): Update for change in
682         check_pkg_class_access.
683         (do_resolve_class): Likewise.
684         (process_imports): Likewise.
685         (find_in_imports_on_demand): Likewise.
686         (resolve_qualified_expression_name): Likewise.
687
688 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
689
690         Fixes PR java/9685, PR java/15073
691         * parse.y (accessibility_string): New method.
692         (not_accessible_field_error): Use accessibility_string()
693         instead of java_accstring_lookup().
694         (resolve_qualified_expression_name): Check with
695         check_pkg_class_access() before allowing access using
696         qualified names.
697         Fix comment typo.
698         Use check_pkg_class_access() instead of not_accessible_p()
699         for unqualified types.
700         (not_accessible_p): Use DECL_CONTEXT (member) instead of
701         REFERENCE for package-private access checking.
702         (patch_method_invocation): Use accessibility_string() instead
703         of java_accstring_lookup().
704
705 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
706
707         Fixes PR java/15133
708         * gjavah.c (struct method_name): Add member is_native.
709         (overloaded_jni_method_exists_p): Match candidate method only if
710         it is native.
711         (print_method_info): Initialise is_native flag from the method's
712         access flags.
713
714 2004-04-30  Roger Sayle  <roger@eyesopen.com>
715
716         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
717         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
718
719 2004-04-22  Roger Sayle  <roger@eyesopen.com>
720
721         * resource.c (write_resource_constructor): Guard call to possibly
722         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
723
724 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
725
726         * class.c (make_class_data): Add new field aux_info.
727         * decl.c (java_init_decl_processing): Push type and decl for
728         `aux_info'.
729
730 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
731
732         * expr.c (expand_java_NEW): Don't use size argument for
733         _Jv_AllocObject calls.
734         * parse.y (patch_invoke): Likewise.
735
736 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
737
738         * expr.c (build_invokeinterface): Remove unused variables to
739         fix warnings.
740
741 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
742
743         * class.c (get_interface_method_index): New function. Return dispatch
744         index for interface method.
745         (make_method_value): For interface methods, set index field to
746         iface dispatch index, not DECL_VINDEX.
747         * expr.c (build_invokeinterface): Use get_interface_method_index.
748
749 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
750
751         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
752
753 2004-03-31  Andrew Haley  <aph@redhat.com>
754
755         PR java/14104
756         * jcf-io.c (opendir_in_zip): Tidy up error handling.
757
758 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
759
760         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
761         form of GTY markers.
762
763 2004-03-25  Marcus Meissner  <meissner@suse.de>
764
765         PR java/14689:
766         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
767
768 2004-03-23  Tom Tromey  <tromey@redhat.com>
769
770         PR java/14315:
771         * jcf-write.c (make_class_file_name): Don't report if mkdir
772         failed with EEXIST.
773
774 2004-03-23  Tom Tromey  <tromey@redhat.com>
775
776         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
777
778 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
779
780         * class.c, gjavah.c, lang.c: Fix comment typos.
781         * gcj.texi: Fix typos.
782
783 2004-03-19  Per Bothner  <per@bothner.com>
784
785         * gcj.texi (Code Generation):  Document new flags and assert defaults.
786
787         * class.c (assume_compiled_node_struct):  Rename type to
788         class_flag_node_struct, as it is now also used for enable_assertions.
789         Rename assume_compiled_node typedef.  Rename excludep field to value.
790         (find_assume_compiled_node):  Rename function to find_class_flag_node.
791         Minor optimization - avoid needless strlen.
792         (add_assume_compiled):  Some tweaking and optimization.
793         Rename and generalize to add_class_flag takem an extra parameter.
794         (add_assume_compled):  New just calls add_class_flag.
795         (add_enable_assert, enable_assertions):  New functions.
796         (enable_assert_tree):  New static.
797         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
798         * lang.opt (fenable-assertions, fenable-assertions=,
799         fdisable-assertions, fdisable-assertions=):  New options.
800         * lang.c (java_handle_option):  Handle new options.
801         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
802         class in an interface - create helper class nested in outer interface.
803         (build_assertion):  Short-circuit if enable_assertions is false.
804
805 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
806
807         * java-tree.h: Changes throughout to add checking to macros
808         and numerous whitespace changes.
809         (VAR_OR_FIELD_CHECK): New macro.
810         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
811         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
812
813 2004-03-16  Per Bothner  <per@bothner.com>
814
815         * jcf-jump.c (options):  New --print-constants option.
816         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
817
818         * jcf-dump.c (flag_print_constant_pool):  Default to off.
819         (print_constant_terse_with_index):  New helper function.
820         (various places):  Check flag_print_constant_pool where missing.
821         (main):  If verbose set flag_print_constant_pool.
822         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
823
824 2004-03-15  Andrew Haley  <aph@redhat.com>
825
826         PR java/14581
827         * parse.y (java_complete_lhs): Check that final variable has an
828         initializer.
829
830 2004-03-12  Andrew Haley  <aph@redhat.com>
831
832         PR java/14551
833         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
834         conversion.
835
836 2004-02-29  Roger Sayle  <roger@eyesopen.com>
837
838         * jcf-parse.c (java_parse_file): Handle the case that input_filename
839         is NULL.
840
841 2004-02-27  Per Bothner  <per@bothner.com>
842
843         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
844         suggestion:  Use build_incomplete_class_ref.
845         This fixes PR java/13508, java/11714.
846
847 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
848
849         * java/parse.h: Update copyright.
850
851 2004-02-26  Andrew Haley  <aph@redhat.com>
852
853         PR java/14231:
854         * parse.y (check_interface_throws_clauses): Check for
855         !METHOD_INVISIBLE (iface_method).
856         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
857         well as CLASS_ABSTRACT.
858
859 2004-02-25  Per Bothner  <per@bothner.com>
860
861         * parse.y (build_assertion):  If we're in an inner class, create the
862         class$ helper routine in the outer class.
863
864 2004-02-19  Richard Henderson  <rth@redhat.com>
865
866         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
867
868 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
869
870         * Make-lang.in (java.install-man): Add extra dependencies.
871
872 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
873
874         * Make-lang.in: Install man pages under the same names
875         (possibly transformed) as the program they document.
876
877 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
878
879         * gjavah.c: Include "intl.h".
880         (error): New function.
881         (main): Call gcc_init_libintl.
882         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
883         print_stub_or_jni, process_file, main): Use error rather than
884         fprintf.
885         (print_method_info, usage, help, version, main): Mark strings for
886         translation with _.  Avoid splitting up sentences.  Send
887         information messages to stdout.
888         * jcf-dump.c: Include "intl.h".
889         (main): Call gcc_init_libintl.
890         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
891         Mark error, usage and version messages for translation with _.
892         Avoid splitting up sentences.
893         * jv-scan.c: Include "intl.h".
894         (fatal_error, warning): Change parameter s to msgid.  Translate
895         messages.
896         (main): Call gcc_init_libintl.
897         (usage, help, version): Mark error, usage and version messages for
898         translation with _.  Avoid splitting up sentences.
899         * jvgenmain.c: Include "intl.h".
900         (main): Call gcc_init_libintl.
901         (usage, main): Mark error messages for translation with _.
902         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
903         JVGENMAIN_OBJS): Add intl.o.
904         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
905         java/jvgenmain.o): Update dependencies.
906
907 2004-02-08  Per Bothner  <per@bothner.com>
908
909         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
910         class don't use not_accessible_field_error, which can get confused.
911
912 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
913
914         Make-lang.in (po-generated):  Delete.
915
916 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
917
918         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
919         Depend on target.h.
920         * decl.c: Include target.h.
921         (start_java_method): Replace PROMOTE_PROTOTYPES with
922         targetm.calls.promote_prototypes.
923         * expr.c: Include target.h.
924         (pop_arguments): Replace PROMOTE_PROTOTYPES with
925         targetm.calls.promote_prototypes.
926         * parse.y: Include target.h.
927         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
928         with targetm.calls.promote_prototypes.
929
930 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
931
932         * typeck.c: Update copyright.
933
934 2004-02-02  Tom Tromey  <tromey@redhat.com>
935
936         * decl.c (java_init_decl_processing): Remove duplicate
937         gnu/gcj/RawData.
938
939 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
940
941         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
942
943 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
944
945         * expr.c (build_field_ref): Move variable
946         definition up.
947
948 2004-01-28  Andrew Haley  <aph@redhat.com>
949
950         * expr.c (build_field_ref): Widen field offset.
951
952 2004-01-27  Andrew Haley  <aph@redhat.com>
953
954         java/13273
955         * parse.y (check_interface_throws_clauses): Make sure class_decl
956         has been loaded.
957
958 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
959
960         PR java/13733
961         * parse.y (patch_assignment): Don't modify lhs_type for
962         reference assignments.
963
964 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
965
966         * Make-lang.in: Replace $(docdir) with doc.
967         (java.info, java.srcinfo, java.man, java.srcman): New rules.
968         (java.install-man): Revamp rule.
969
970 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
971
972         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
973         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
974         instead of deferred backquote.
975
976 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
977
978         * typeck.c (find_method_in_interfaces): Move variable
979         definition up.
980
981 2004-01-16  Andrew Haley  <aph@redhat.com>
982
983         PR java/13273:
984         * typeck.c (shallow_find_method): New.
985         (find_method_in_superclasses): New.
986         (find_method_in_interfaces): New.
987         (lookup_do): Rewrite.
988         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
989
990         * jcf-parse.c (read_class): Save and restore output_class.
991         * decl.c (java_expand_body): Set output_class from fndecl.
992
993 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
994
995         * class.c (gen_indirect_dispatch_tables): Fix string length
996         calculations.
997
998 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
999
1000         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
1001         (java.srcextra): Copy above back to source directory if requested.
1002         (po-generated): Delete reference to $(parsedir).
1003         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
1004         Use implicit rule.
1005
1006 2004-01-14  Jan Hubicka  <jh@suse.cz>
1007
1008         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
1009         estimation.
1010
1011 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
1012
1013         * java-tree.h (java_expand_expr): Change prototype.
1014         * expr.c (java_expand_expr): Add alt_rtl parameter.
1015
1016 2004-01-09  Andrew Haley  <aph@redhat.com>
1017
1018         PR java/12755:
1019         * parse.y (java_fix_constructors):  Set output_class.
1020         (java_reorder_fields): Likewise.
1021         (java_layout_classes): Likewise.
1022         (java_expand_classes): Generate indirect dispatch tables.
1023         (java_expand_classes): Set output_class.
1024         (java_finish_classes): Likewise.
1025         * lang.c (java_init): Turn on always_initialize_class_p if we're
1026         using indirect dis[atch.
1027         (java_decl_ok_for_sibcall): Use output_class, not current_class.
1028         (java_get_callee_fndecl): Use class local atable.
1029         * jcf-parse.c
1030         (always_initialize_class_p): Decl moved to java-tree.h.
1031         (HANDLE_CLASS_INFO): Set output_class.
1032         (read_class): Likewise.
1033         (parse_class_file): Call gen_indirect_dispatch_tables.
1034         (parse_zip_file_entries): Set output_class.
1035         (java_parse_file): Set output_class.  Don't emit symbol tables.
1036         * java-tree.h (output_class): New.
1037         Remove global declarations for otable, atable, and ctable.
1038         (always_initialize_class_p): moved here from decl.c.
1039         (DECL_OWNER): New.
1040         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
1041         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
1042         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
1043         (struct lang_type): Add otable_methods, otable_decl,
1044         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
1045         ctable_decl, catch_classes, type_to_runtime_map.
1046         * expr.c (build_field_ref): Make otable, atable, and ctable class
1047         local rather than global.
1048         (build_known_method_ref): Likewise.
1049         (build_invokeinterface): Likewise.
1050         (java_expand_expr): Pass runtime type (rather than actual type) to
1051         expand_start_catch.
1052         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
1053         this class.  Look up each class in that map to delete duplicates.
1054         (expand_end_java_handler): Pass runtime type (rather than actual
1055         type) to expand_start_catch.
1056         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
1057         (do_nothing): New.
1058         (java_init_decl_processing): Rearrange things.  Remove global
1059         declarations of otable, atable, and ctable.
1060         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
1061         (java_expand_body): Set output_class.
1062         * constants.c (build_constant_data_ref): Use output_class, not
1063         current_class.
1064         (alloc_name_constant): Likewise.
1065         * class.c (gen_indirect_dispatch_tables): New.
1066         (build_class_ref): Generate hard reference to superclass, even if
1067         using indirect dispatch.
1068         (build_static_field_ref): Use class local atable.
1069         (make_class_data): Generate hard reference to superclass, even if
1070         using indirect dispatch.
1071         Generate symbolic references to interfaces when using indirect
1072         dispatch.
1073         (make_class_data): Emit otable, atable, and ctable.
1074         Make otable, atable, and ctable class local rather than global.
1075         (emit_catch_table): Make otable, atable, and ctable class local
1076         rather than global.
1077
1078 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
1079
1080         * parse.y (catch_clause_parameter): Fix typo.
1081
1082         PR java/13404
1083         * parse.y: (catch_clause_parameter): Return early if $3, aka
1084         formal_parameter, is null.
1085
1086 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1087
1088         * class.c: Remove uses of "register" specifier in
1089         declarations of arguments and local variables.
1090         * decl.c: Likewise.
1091         * expr.c: Likewise.
1092         * gjavah.c: Likewise.
1093         * jcf-dump.c: Likewise.
1094         * jcf-io.c: Likewise.
1095         * jcf-parse.c: Likewise.
1096         * jcf-write.c: Likewise.
1097         * keyword.h: Likewise.
1098         * parse.y: Likewise.
1099         * typeck.c: Likewise.
1100         * verify.c: Likewise.
1101
1102 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
1103
1104         * Make-lang.in (GCJ_CROSS_NAME): Delete.
1105         (java.install_common, java.install-man): Adjust for above.
1106         (java.uninstall): Likewise.
1107
1108 2003-12-03  Michael Koch  <konqueror@gmx.de>
1109
1110         * class.c (make_class_data):
1111         Push field value to 'hack_signers' instead of 'signers'.
1112         * decl.c (java_init_decl_processing):
1113         Push field 'hack_signers' instead of 'signers'.
1114
1115 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
1116
1117         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
1118         including iconv.h.
1119
1120 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
1121
1122         PR java/12374:
1123         * parse.y (qualify_ambiguous_name): Remove lots of broken
1124         field access processing - there's no need to do that here,
1125         because we have resolve_field_access.  Remove
1126         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
1127         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
1128         used.
1129
1130 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
1131
1132         Fix PR java/13237
1133         * parse.y (java_complete_lhs): Save location prior to patching
1134         CALL_EXPR.
1135
1136 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
1137
1138         PR java/12548
1139         * resource.c (write_resource_constructor): Append
1140         "_resource" to constructor identifier name.
1141
1142 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
1143
1144         Fix PR java/13183.
1145         * constants.c (cpool_for_class): New function.
1146         (outgoing_cpool): Remove global variable.
1147         (alloc_name_constant): Use cpool_for_class.
1148         (build_constants_constructor): Likewise.
1149         * decl.c (java_expand_body): Set current_class.
1150         * java-tree.h (outgoing_cpool) Remove declaration.
1151         (init_outgoing_cpool): Likewise.
1152         * jcf-parse.c (init_outgoing_cpool): Remove function.
1153         (parse_class_file): Don't call init_outgoing_cpool.
1154         * parse.y (java_complete_expand_methods): Don't call
1155         init_outgoing_cpool.  Don't save outgoing_cpool.
1156         (java_expand_classes): Don't restore outgoing_cpool.
1157         (java_finish_classes): Likewise.
1158
1159 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
1160
1161         * Make-lang.in: (java.install-common) Add
1162         symlink for $(target_noncanonical)-gcjh for
1163         native builds.
1164
1165 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
1166
1167         * Make-lang.in (java.extraclean): Delete.
1168
1169 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
1170
1171         * Make-lang.in (check-java): Add.
1172
1173 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
1174
1175         Fix PR java/13024.
1176         * except.c (prepare_eh_table_type): Allocate variable-sized
1177         buffer `buf' with alloca.
1178
1179 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
1180
1181         Fix PR java/12857.
1182
1183         decl.c (java_init_decl_processing): Don't initialize
1184         class_not_found_type_node, no_class_def_found_type_node.
1185
1186         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
1187         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
1188         (class_not_found_type_node, no_class_def_found_type_node):
1189         Don't define.
1190
1191         parse.y (build_dot_class_method_invocation): Add this_class
1192         argument.  Qualify method invocations to a different class.
1193         (create_new_parser_context): Initialize saved_data_ctx to 0.
1194         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
1195         (build_dot_class_method): Don't load classes.  Register
1196         incomplete types.
1197         (build_incomplete_class_ref): Special cases for interfaces
1198         and inner classes.  Move build_dot_class_method call to here...
1199         (patch_incomplete_class_ref): ...from here.  Pass current_class
1200         to build_dot_class_method_invocation.
1201         (build_assertion): Pass class_type to
1202         build_dot_class_method_invocation.
1203         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
1204
1205 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
1206
1207         Fix PR java/12739.
1208         * java-tree.h (BLOCK_EMPTY_P): Define.
1209         * parse.y (java_complete_lhs): Check for empty blocks
1210         in TRY_FINALLY_EXPR case.
1211
1212 2003-11-17  Andrew Haley  <aph@redhat.com>
1213
1214         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
1215         (struct lang_decl_var:freed): New variable.
1216         * decl.c (poplevel): Mark local vars that have gone out of scope.
1217         (push_jvm_slot): Don't use the RTL of a var that has gone out of
1218         scope.
1219
1220 2003-11-16  Jason Merrill  <jason@redhat.com>
1221
1222         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
1223         and TAGS files that include them for each front end.
1224
1225 2003-11-15  Tom Tromey  <tromey@redhat.com>
1226
1227         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
1228
1229 2003-11-12  Jason Merrill  <jason@redhat.com>
1230
1231         PR optimization/12547
1232         * lang.c (java_tree_inlining_walk_subtrees): Just walk
1233         BLOCK_EXPR_BODY directly.
1234
1235 2003-11-12  Andrew Haley  <aph@redhat.com>
1236
1237         PR java/11045
1238         * parse.y (fold_constant_for_init): Check that we really do have a
1239         constant.
1240
1241         PR java/11533
1242         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
1243         init_test_decls being inlined.
1244
1245         PR java/12890:
1246         * parse.y (do_resolve_class): Check return value from
1247         breakdown_qualified().
1248
1249 2003-11-11  Tom Tromey  <tromey@redhat.com>
1250
1251         PR java/12915:
1252         * parse.y (merge_string_cste): Handle case where we have a
1253         pointer that happens to be zero, not null_pointer_node.
1254
1255 2003-11-10  Tom Tromey  <tromey@redhat.com>
1256
1257         * jcf-parse.c (classify_zip_file): Correctly compare
1258         filename_length against length of manifest file's name.
1259
1260 2003-11-08  Tom Tromey  <tromey@redhat.com>
1261
1262         PR java/12894:
1263         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
1264
1265 2003-11-06  Andrew Haley  <aph@redhat.com>
1266
1267         * expr.c (java_stack_swap): Make sure destination stack slots are
1268         of the correct type.
1269
1270 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
1271
1272         * Make-lang.in (dvi): Move targets to $(docobjdir).
1273         (gcj.dvi): Simplify rule and adjust target.
1274         (gcj.info): Simplify rule.
1275         (gcj.pod): New intermediate rule.
1276         (gcjh.pod): Likewise.
1277         (jv-scan.pod): Likewise.
1278         (jcf-dump.pod): Likewise.
1279         (gij.pod): Likewise.
1280         (jv-convert.pod): Likewise.
1281         (rmic.pod): Likewise.
1282         (rmiregistry.pod): Likewise.
1283         (gcj.1): Delete.
1284         (gcjh.1): Delete.
1285         (jv-scan.1): Delete.
1286         (jcf-dump.1): Delete.
1287         (gij.1): Delete.
1288         (jv-convert.1): Delete.
1289         (rmic.1): Delete.
1290         (rmiregistry.1): Delete.
1291
1292 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
1293
1294         Fixes PR java/12866.
1295         * parse.y (resolve_qualified_expression_name): Move test
1296         for outer field access methods from here...
1297         (check_thrown_exceptions) ...to here.
1298
1299 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
1300
1301         * .cvsignore: Delete.
1302
1303 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
1304
1305         * verify.c (verify_jvm_instructions): Don't warn about legal
1306         eh binding regions generated for example by jdk 1.4.1.
1307
1308 2003-10-24  David S. Miller  <davem@redhat.com>
1309
1310         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
1311
1312 2003-10-22  Andrew Haley  <aph@redhat.com>
1313
1314         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
1315         (java_get_callee_fndecl): New.
1316
1317         * jcf-parse.c (java_parse_file): Call emit_catch_table().
1318
1319         * java-tree.h (ctable_decl): New.
1320         (catch_classes):  New.
1321         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
1322
1323         * decl.c (java_init_decl_processing): Add catch_class_type.
1324         Add ctable_decl.
1325         Add catch_classes field.
1326
1327         * class.c (build_indirect_class_ref): Break out from
1328         build_class_ref.
1329         (make_field_value): Check flag_indirect_dispatch.
1330         (make_class_data): Ditto.
1331         Tidy uses of PUSH_FIELD_VALUE.
1332         Add field catch_classes.
1333         (make_catch_class_record): New.
1334
1335         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1336
1337 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1338
1339         * jcf-write.c: Follow spelling conventions.
1340         * parse.y: Likewise.
1341
1342 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1343
1344         * ChangeLog: Fix typos.
1345         * expr.c: Fix comment typos.
1346         * jcf-write.c: Likewise.
1347         * lang.c: Likewise.
1348         * lex.c: Likewise.
1349         * mangle.c: Likewise.
1350         * parse-scan.y: Likewise.
1351         * parse.y: Likewise.
1352
1353 2003-10-22  Tom Tromey  <tromey@redhat.com>
1354
1355         * expr.c (expand_byte_code): Only warn about dead bytecode when
1356         extra_warnings is set.
1357
1358 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
1359
1360         Fix for PR java/12586.
1361         * mangle.c (find_compression_record_match): Don't iterate through
1362         package namespace elements unless they all match compression_table
1363         entries.
1364
1365 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
1366
1367         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1368         (generate-manpages): Likewise.
1369         (java.maintainer-clean): Likewise.
1370         (gcj.info): Likewise.
1371         (gcj.1): Likewise.
1372         (gcjh.1): Likewise.
1373         (jv-scan.1): Likewise.
1374         (jcf-dump.1): Likewise.
1375         (gij.1): Likewise.
1376         (jv-convert.1): Likewise.
1377         (rmic.1): Likewise.
1378         (rmiregistry.1): Likewise.
1379         (java.install-man): Likewise.
1380         (parse-scan.o): Move and define complete compile line.
1381         (parse.o): Likewise.
1382         (jcf-tree-inline.o): Move.
1383
1384 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
1385
1386         * Make-lang.in (info): Update dependencies.
1387         (java.install-info): Remove.
1388         ($(srcdir)/java/gcj.info): Replace with ...
1389         ($(docobjdir)/gcj.info): ... this.
1390
1391 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
1392
1393         * Make-lang.in: Replace uses of $(target_alias) with
1394         $(target_noncanonical).
1395
1396 2003-10-09  Tom Tromey  <tromey@redhat.com>
1397
1398         * decl.c (java_init_decl_processing): Declare signers field.
1399         * class.c (make_class_data): Set signers field.
1400
1401 2003-10-09  Jason Merrill  <jason@redhat.com>
1402
1403         * parse.y (patch_assignment): Use make_node to create a BLOCK.
1404         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1405         POINTER_TYPE.
1406
1407 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1408
1409         * Make-lang.in (java.info): Replace with ...
1410         (info): ... this.
1411         (java.dvi): Replace with ...
1412         (dvi): ... this.
1413         (java.generated-manpages): Replace with ...
1414
1415 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
1416
1417         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1418
1419 2003-10-01  Andrew Haley  <aph@redhat.com>
1420
1421         * jcf-parse.c (java_parse_file): Write otable and atable.
1422         * java-tree.h (atable_methods): New.
1423         (atable_decl): New.
1424         (atable_syms_decl): New.
1425         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1426         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1427         (symbol_*type): Rename method_symbol* to symbol*type.
1428         (emit_offset_symbol_table): Delete.
1429         (emit_symbol_table): New.
1430         (get_symbol_table_index): New.
1431         (atable_type): New.
1432         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1433         (build_known_method_ref): Likewise.
1434         (get_symbol_table_index): Rename from get_offset_table_index.
1435         Parameterize to allow re-use by differing types of symbol table.
1436         (build_invokevirtual): Pass table to get_offset_table_index.
1437         * decl.c (java_init_decl_processing): Push types and decls for
1438         atable and atable_syyms.
1439         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1440         (make_class_data): Add new fields atable and atable_syms.
1441         (emit_symbol_table): Rename from emit_offset_symbol_table.
1442         Parameterize to allow re-use by different types of symbol table.
1443         (build_symbol_entry): Renamed from build_method_symbols_entry.
1444
1445 2003-09-30  Roger Sayle  <roger@eyesopen.com>
1446
1447         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1448         semantics for SAVE_EXPR, by caching the result in a temporary.
1449
1450 2003-09-28  Richard Henderson  <rth@redhat.com>
1451
1452         * check-init.c (check_init): Save and restore input_location
1453         instead of file and line separately.
1454         * decl.c (java_expand_body): Likewise.
1455         * jcf-write.c (generate_bytecode_insns): Likewise.
1456         * parse.y (safe_layout_class): Likewise.
1457         * jcf-parse.c (read_class, parse_class_file): Likewise.
1458         (java_parse_file): Use %H for warning locator.
1459
1460 2003-09-28  Roger Sayle  <roger@eyesopen.com>
1461
1462         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1463         with void-type branches instead of using a COMPOUND_EXPR.
1464
1465 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
1466
1467         * decl.c (java_optimize_inline, dump_function): Remove.
1468         * java-tree.h (java_optimize_inline): Remove declaration.
1469         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1470         * parse.y (source_end_java_method, java_expand_classes):
1471         Likewise.  Remove dead code.
1472
1473 2003-09-27  Roger Sayle  <roger@eyesopen.com>
1474
1475         * lang.c (java_init_options): Set flag_evaluation_order.
1476         * expr.c (force_evaluation_order): Don't attempt to force
1477         evaluation order of binary operations using save_expr.
1478         * parse.y (java_complete_lhs): No longer need to call
1479         force_evaluation_order when constructing binary operators.
1480
1481 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1482             Bryce McKinlay  <bryce@mckinlay.net.nz>
1483
1484         PR java/1333:
1485         * parse.y (not_accessible_field_error): New function.
1486         (resolve_expression_name): Check field access permissions.
1487         (resolve_qualified_expression_name): Use
1488         not_accessible_field_error.
1489         (resolve_qualified_expression_name): Likewise.
1490
1491 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1492
1493         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1494
1495 2003-09-23  Roger Sayle  <roger@eyesopen.com>
1496
1497         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1498         with equal operands without side-effects.
1499
1500 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
1501
1502         * decl.c (java_init_decl_processing): Don't emit otable decls
1503         if flag_indirect_dispatch is not set.
1504
1505 2003-09-21  Richard Henderson  <rth@redhat.com>
1506
1507         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1508         resource.c: Revert.
1509
1510 2003-09-21  Richard Henderson  <rth@redhat.com>
1511
1512         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1513         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1514
1515 2003-09-20  Richard Henderson  <rth@redhat.com>
1516
1517         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1518
1519 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1520
1521         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1522         * check-init.c (check_init): Likewise.
1523
1524 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1525
1526         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1527
1528 2003-09-16  Andrew Haley  <aph@redhat.com>
1529
1530         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1531
1532 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
1533
1534         Fixes PR java/9577
1535         * mangle.c (find_compression_record_match): Skip
1536         over a "6JArray" (the array template mangled string)
1537         IDENTIFIER_NODE.
1538         (mangle_array_type): Correct minor typo.
1539         (atms): Move definition to the beginning.
1540
1541 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
1542
1543         * class.c (add_miranda_methods): Ensure super-interfaces are laid
1544         out. Fix for PR java/12254.
1545
1546 2003-09-11  Richard Henderson  <rth@redhat.com>
1547
1548         * parse.y (source_end_java_method): Update for new
1549         cgraph_finalize_function argument.
1550
1551 2003-09-09  Richard Henderson  <rth@redhat.com>
1552
1553         * parse.y (source_end_java_method): Update call to
1554         cgraph_finalize_function.
1555
1556 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
1557
1558         * decl.c (java_expand_body): New function.
1559         * expr.c (build_class_init): Set DECL_IGNORED_P.
1560         * java-tree.h (start_complete_expand_method,
1561         java_expand_body): Declare.
1562         * jcf-parse.c (cgraph.h): Include.
1563         (java_parse_file): Handle flag_unit_at_a_time.
1564         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1565         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1566         (java_estimate_num_insns): Use walk_tree_without_duplicates.
1567         (java_start_inlining): New function.
1568         * parse.h (java_finish_classes): Declare.
1569         * parse.y: Include cgraph.h.
1570         (block): Don't special-case empty block production.
1571         (craft_constructor): Set DECL_INLINE.
1572         (source_end_java_method): Handle flag_unit_at_a_time.
1573         Replace inline code with call to java_expand_body.
1574         (start_complete_expand_method): Remove static modifier.
1575         (java_expand_method_bodies): Patch function tree for
1576         class initialization and/or synchronization as needed.
1577         Don't begin RTL expansion yet.
1578         (java_expand_classes): Check flag_unit_at_a_time before
1579         calling finish_class.
1580         (java_finish_classes): New function.
1581         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1582         (patch_assignment): Set DECL_CONTEXT on temporary variable.
1583         (emit_test_initialization): Set DECL_IGNORED_P.
1584
1585 2003-09-03  Roger Sayle  <roger@eyesopen.com>
1586
1587         * builtins.c (enum builtin_type): Delete unused enumeration.
1588         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1589
1590 2003-08-28  Tom Tromey  <tromey@redhat.com>
1591
1592         * gcj.texi (Extensions): Document gcjlib URLs.
1593
1594 2003-08-20  Tom Tromey  <tromey@redhat.com>
1595
1596         * gcj.texi (Extensions): Added xref.
1597         (libgcj Runtime Properties): Document
1598         gnu.gcj.runtime.VMClassLoader.library_control.
1599
1600 2003-08-20  Andrew Haley  <aph@redhat.com>
1601
1602         * except.c (prepare_eh_table_type): Use new encoding for exception
1603         handlers when using -fno-assume-compiled.
1604
1605 2003-08-13  Tom Tromey  <tromey@redhat.com>
1606
1607         * gcj.texi (Invoking gij): Document -X and -?.
1608
1609 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
1610
1611         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1612         GCJH_OBJS, JCFDUMP_OBJS
1613         * win32-host.c: Removed the unnecessary and broken dependency
1614         on jcf.h
1615
1616 2003-08-11  Tom Tromey  <tromey@redhat.com>
1617
1618         * parse.y (java_check_regular_methods): Typo fixes.  Call
1619         check_interface_throws_clauses.  Use
1620         check_concrete_throws_clauses.
1621         (check_interface_throws_clauses): New function.
1622         (check_concrete_throws_clauses): New function.
1623         (hack_is_accessible_p): New function.
1624         (find_most_specific_methods_list): Added FIXME.
1625         * typeck.c (lookup_do): Use `flags' argument to decide what to
1626         do.  Reimplemented.
1627         (lookup_argument_method_generic): New function.
1628         (lookup_argument_method2): Removed.
1629         * jcf.h (ACC_INVISIBLE): New define.
1630         * jcf-write.c (generate_classfile): Skip invisible methods.
1631         * class.c (add_miranda_methods): New function.
1632         (layout_class_methods): Use it.
1633         (get_access_flags_from_decl): Use ACC_INVISIBLE.
1634         * java-tree.h (METHOD_INVISIBLE): New define.
1635         (lang_decl_func) [invisible]: New field.
1636         (lookup_argument_method_generic): Declare.
1637         (SEARCH_INTERFACE): New define.
1638         (SEARCH_SUPER): Likewise.
1639         (SEARCH_ONLY_INTERFACE): Likewise.
1640         (SEARCH_VISIBLE): Likewise.
1641         (lookup_argument_method2): Removed declaration.
1642
1643 2003-08-05  Tom Tromey  <tromey@redhat.com>
1644
1645         Fix for PR java/11600:
1646         * parse.y (java_complete_lhs): See whether we're calling a method
1647         on an array.
1648         (check_thrown_exceptions): Added `is_array_call' argument;
1649         fixed `clone' checking; updated all callers.
1650
1651 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1652
1653         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1654
1655 2003-08-03  Tom Tromey  <tromey@redhat.com>
1656
1657         * java-tree.h (METHOD_TRANSIENT): Removed.
1658         * decl.c (pushdecl): Removed some dead code.
1659         * class.c (get_access_flags_from_decl): Can't have transient
1660         method.
1661         (add_method_1): Can't have a transient method.
1662
1663 2003-07-28  Andreas Jaeger  <aj@suse.de>
1664
1665         * jvspec.c: Convert to ISO C90 prototypes.
1666
1667 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1668
1669         * decl.c (force_poplevels): Fix warning call.
1670
1671 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1672
1673         * expr.c (expand_java_field_op): Don't use xxx_with_decl
1674         (expand_java_field_op): Likewise.
1675         * class.c (layout_class_method): Likewise
1676         (emit_register_classes): Likewise.
1677         * decl.c (pushdecl): Likewise.
1678         (poplevel): Likewise.
1679         (force_poplevels): Likewise.
1680         (give_name_to_locals): Likewise.
1681         * check-init.c (check_for_initialization): Likewise.
1682
1683 2003-07-24  Jason Merrill  <jason@redhat.com>
1684
1685         * java-tree.h: Move boolean_type_node et al to the back end.
1686
1687 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1688
1689         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1690         casts.
1691
1692 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
1693
1694         * lang.opt: Don't show -MD_ and -MDD_.
1695
1696 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
1697
1698         * lang-options.h: Remove.
1699         * lang.opt: Add help text.
1700
1701 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
1702
1703         * expr.c: Remove the last argument to expand_assignment().
1704
1705 2003-07-09  Jan Hubicka  <jh@suse.cz>
1706
1707         * java-tree.h (DECL_NUM_STMTS): Rename to...
1708         (DECL_ESTIMATED_INSNS): ... this.
1709         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1710         New static functions.
1711         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1712         * parser.y (add_stmt_to_compound): Do not account statements.
1713
1714 2003-07-08  Mark Wielaard  <mark@klomp.org>
1715
1716         * gcj.texi: CNI now expands to Compiled Native Interface.
1717
1718 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1719
1720         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1721
1722 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1723
1724         * expr.c (expand_byte_code): Adjist emit_line_note call.
1725
1726 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1727
1728         * lang.c (java_handle_option): Don't handle filenames.
1729
1730 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
1731
1732         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1733         DIR_SEPARATOR.
1734         Use FILENAME_CMP.
1735         * jcf-write.c: Don't default-define DIR_SEPARATOR.
1736         * jcf.h: Delete COMPARE_FILENAMES definition.
1737
1738 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
1739
1740         * lang.c (java_init_options): Update prototype.
1741
1742 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1743
1744         * decl.c (poplevel): Adjust define_label call.
1745
1746 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1747
1748         * gjavah.c (flag_jni): Make non-static.
1749         * parse-scan.y (ctxp): Make non-static.
1750
1751         * class.c (build_method_symbols_entry)
1752         * expr.c (get_offset_table_index)
1753         * jcf-parse.c (jcf_parse):
1754         Mark the definition static, matching the forward declaration.
1755
1756 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
1757
1758         * lang.c (java_handle_option): Don't check for missing arguments.
1759
1760 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1761
1762         * class.c (push_class): Use a location_t to save place.
1763         (emit_register_classes): Set input_location. Adjust
1764         expand_function_end call.
1765         * resource.c (write_resource_constructor): Likewise.
1766         * decl.c (end_java_method): Adjust expand_function_end call.
1767         * parse.y (source_end_java_method): Likewise.
1768
1769 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1770
1771         * lang.c (java_handle_option): Likewise.
1772
1773 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
1774
1775         * lang.c (java_handle_option): Special-casing of optional
1776         joined arguments no longer needed.
1777         * lang.opt: Update switches that take optional argument.
1778
1779 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1780
1781         * lang.opt: Declare Java.
1782         * lang.c (java_init_options): Update.
1783
1784 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1785
1786         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1787
1788 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1789
1790         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1791         * lang.c (java_handle_option): -MD and -MMD have an underscore.
1792         * lang.opt: -MD and -MMD have an underscore.
1793
1794 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1795
1796         * class.c (emit_register_classes): Adjust init_function_start
1797         call.
1798         * decl.c (complete_start_java_method): Likewise.
1799         * resource.c (write_resource_constructor): Likewise.
1800
1801 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1802
1803         * Make-lang.in: Update to use options.c and options.h.
1804         * lang.c: Include options.h not j-options.h.
1805         (java_handle_option): Abort on unrecognized option.
1806         (java_init_options): Request Java switches.
1807
1808 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
1809
1810         * Make-lang.in: Handle mostlyclean.
1811
1812 2003-06-11  Tom Tromey  <tromey@redhat.com>
1813
1814         * lang.c (java_handle_option): Update dependency_tracking for
1815         OPT_MF case.
1816
1817         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1818         empty argument.
1819
1820 2003-06-10  Andrew Haley  <aph@redhat.com>
1821
1822         * resource.c (write_resource_constructor): Use expand_expr to
1823         generate the address of the label attached to a resource.
1824         * Make-lang.in (java/resource.o): Add expr.h
1825
1826 2003-06-10  Andrew Haley  <aph@redhat.com>
1827
1828         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1829         (java_decl_ok_for_sibcall): New.
1830
1831 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
1832
1833         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1834         (java/j-options.c, java/j-options.h): New.
1835         * java-tree.h (resource_name, compile_resource_file,
1836         compile_resource_data): Constify.
1837         * jcf-write.c (jcf_write_base_directory): Similarly.
1838         * jcf.h (jcf_write_base_directory): Similarly.
1839         * lang.c: Include j-options.h.
1840         (cl_options_count, cl_options, string_option, java_decode_option,
1841         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1842         process_option_with_no): Remove.
1843         (resource_name): Constify.
1844         (LANG_HOOKS_HANDLE_OPTION): Override.
1845         (java_handle_option): New.
1846         (java_init): Don't call jcf_path_init.
1847         (java_init_options): Call jcf_path_init.
1848         * lang.opt: New.
1849         * resource.c (compile_resource_data, compile_resource_file): Constify.
1850
1851 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
1852
1853         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1854         (struct lang_decl_func): Add last_line field.
1855         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1856         DECL_SOURCE_LINE_LAST): Remove.
1857         * parse.y (missing_return_error, finish_method_declaration,
1858         lookup_cl, start_artificial_method_body, source_end_java_method,
1859         start_complete_expand_method): Adjust.
1860
1861 2003-06-08  Tom Tromey  <tromey@redhat.com>
1862
1863         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1864         fno-assume-compiled.
1865
1866 2003-06-08  Roger Sayle  <roger@eyesopen.com>
1867
1868         * builtins.c (define_builtin_type, builtin_types): Delete.
1869         (define_builtin): Rewritten to take just the built-in code,
1870         the function's name, type and fallback library function name.
1871         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1872         (initialize_builtins): Overhaul to define the GCC builtins
1873         used by gcj manually, providing the Java run-time's
1874         implementations as the fallback library function.
1875
1876 2003-06-08  Anthony Green  <green@redhat.com>
1877
1878         * parse.y (patch_cast): Fix conversions from floating-point to
1879         integral types.
1880
1881 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
1882
1883         * Make-lang.in: Update.
1884         * lang.c: Include opts.h. Define cl_options_count and cl_options.
1885
1886 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1887
1888         * lang.c (java_init_options): Update.
1889
1890 2003-06-05  Jan Hubicka  <jh@suse.cz>
1891
1892         * Make-lang.in:  Add support for stageprofile and stagefeedback
1893
1894 2003-05-31  Roger Sayle  <roger@eyesopen.com>
1895
1896         * lang.c (java_init_options): Prescribe wrap-around two's
1897         complement arithmetic overflow by setting flag_wrapv.
1898
1899 2003-05-29  Roger Sayle  <roger@eyesopen.com>
1900
1901         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1902         (builtin_record): Add an additional builtin_code field to
1903         record which GCC built-in corresponds to the Java function.
1904         (java_builtins):  Add new entries for atan, atan2, exp, log,
1905         pow and tan.
1906         (max_builtin, min_builtin, abs_builtin): Perform constant
1907         folding on the resulting tree.
1908         (java_build_function_call_expr): Likewise, perform constant
1909         folding on the resulting tree.
1910         (initialize_builtins): The NULL creators are now allowed in
1911         the java_builtins table, which is now terminated by an entry
1912         with builtin_code == END_BUILTINS.
1913         (check_for_builtin): Likewise.  If the matching creator is
1914         NULL, construct the call using java_build_function_call_expr
1915         directly with the decl for the corresponding builtin_code.
1916
1917 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1918
1919         * win32-host.c: Normalize copyright boilerplate.
1920
1921 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1922
1923         * parse.y (print_int_node): Use string concatentation on
1924         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1925         function calls into one.
1926
1927 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
1928
1929         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1930         fatal_io_error with calls to fatal_error; add ": %m" to the end of
1931         all the affected error messages.
1932
1933 2003-05-13  Richard Henderson  <rth@redhat.com>
1934
1935         * class.c (layout_class_method): Set DECL_EXTERNAL.
1936         * decl.c (java_mark_decl_local, java_mark_class_local): New.
1937         * java-tree.h (java_mark_class_local): Declare.
1938         * jcf-parse.c (parse_class_file): Use it.
1939         * parse.y (java_expand_classes): Likewise.
1940
1941 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
1942
1943         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1944         * lex.h: #include input.h.
1945         * jv-scan.c (input_filename): Remove.
1946
1947 2003-05-02  Tom Tromey  <tromey@redhat.com>
1948
1949         PR java/10491:
1950         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1951         (handle_inner_classes): New function.
1952
1953 2003-05-01  Tom Tromey  <tromey@redhat.com>
1954
1955         PR java/10459:
1956         * parse.y (finish_for_loop): Do nothing if update expression is a
1957         EXPR_WFL_NODE wrapping nothing.
1958         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1959
1960 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
1961
1962         * lex.h (input_lineno): Remove declaration.
1963         * parse-scan.y: #include input.h.
1964         (input_filename): Remove declaration.
1965         (input_location): Add definition.
1966         (input_line): Remove definition.
1967
1968 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1969
1970         * lex.h (lineno): Rename to ...
1971         (input_line): ... here
1972         * parse-scan.y (lineno): Rename to ...
1973         (input_line): ... here.
1974         (reset_report): Rename lineno to input_line.
1975         * check-init.c (check_init): Likewise.
1976         * class.c (push_class): Likewise.
1977         * decl.c (complete_start_java_method, end_java_method): Likewise.
1978         * expr.c (expand_byte_code): Likewise.
1979         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1980         * jcf-write.c (generate_bytecode_insns): Likewise.
1981         * lex.c (java_init_lex, java_allocate_new_line,
1982         do_java_lex): Likewise.
1983         * parse.h (YYNOT_TWICE): Likewise.
1984         * parse.y (empty_statement, expression_statement,
1985         java_pop_parser_context, java_parser_context_save_global,
1986         yyerror, register_fields, method_header, safe_layout_class,
1987         find_in_imports_on_demand, create_artificial_method,
1988         source_end_java_method, start_complete_expand_method,
1989         build_thisn_assign, java_complete_lhs,
1990         maybe_absorb_scoping_block): Likewise.
1991
1992 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
1993
1994         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1995         '/' when computing java source filename
1996
1997 2003-04-13  Tom Tromey  <tromey@redhat.com>
1998
1999         * gjavah.c (print_c_decl): Indentation fix.
2000
2001 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2002
2003         * class.c (make_field_value, make_method_value, get_dispatch_table)
2004         (make_class_data, emit_offset_symbol_table)
2005         * constants.c (build_constants_constructor)
2006         * java-tree.h (START_RECORD_CONSTRUCTOR)
2007         * parse.y (maybe_build_array_element_wfl):
2008         Use build_constructor.
2009
2010 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
2011
2012         PR java/10253:
2013         * parse.y (string_convert_int_cst): Always use at least one digit
2014         in string conversion. Remove ASCII dependence.
2015         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
2016
2017 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
2018
2019         * Make-lang.in: added win32-host.c
2020         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
2021         resolves to open() on non-Win32 platforms and
2022         Win32-specific jcf_open_exact_case() on Win32
2023         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
2024         when trying .java and .class files
2025         * win32-host.c: added to repository. Defines
2026         Win32-specific jcf_open_exact_case()
2027
2028 2003-04-10  Andrew Haley  <aph@redhat.com>
2029
2030         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
2031         (maybe_free_localvar): Renamed from localvar_free.
2032         Add new arg, really.
2033         (generate_bytecode_insns): Set new variable, jsrs.
2034         Only free local vars if no jsr insns have been emittted.
2035         Call maybe_free_localvar, not localvar_free.
2036
2037 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
2038
2039         * gcj.texi: Remove @ at start of file.
2040
2041 2003-03-25  Tom Tromey  <tromey@redhat.com>
2042
2043         * parse.y (create_interface): Call CHECK_DEPRECATED.
2044
2045 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
2046
2047         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
2048
2049 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
2050
2051         * javaop.h (jfloat, jdouble): Make them structures mirroring
2052         the bit fields of IEEE float and double respectively.
2053         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
2054         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
2055         (union Word, union DWord): Delete.
2056         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
2057
2058         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
2059         D_NAN_MASK): Delete.
2060         (jni_print_float, jni_print_double): New.  Generate
2061         hexadecimal floating constants.
2062         (print_field_info): Use jni_print_float/double.
2063
2064         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
2065         finite floating point numbers for output; special case
2066         non-finite floats.
2067
2068 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
2069
2070         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
2071         Replace 0 and 1 with true and false in return statements.
2072
2073 2003-03-19  Tom Tromey  <tromey@redhat.com>
2074
2075         * lex.c (do_java_lex): Renamed from java_lex.
2076         (java_lex): New function.
2077         Include timevar.h.
2078
2079 2003-03-13  Tom Tromey  <tromey@redhat.com>
2080
2081         * parse.y (resolve_inner_class): Error if qualifier is a primitive
2082         type.
2083
2084 2003-03-04  Andrew Haley  <aph@redhat.com>
2085
2086         * gjavah.c (is_first_data_member): New global variable.
2087         (print_c_decl): If it's the first data member, align it as the
2088         superclass.
2089         (process_file): Set is_first_data_member.
2090
2091 2003-03-11  Tom Tromey  <tromey@redhat.com>
2092
2093         * parse.y (resolve_field_access): Initialize class if field is
2094         found in another static field.
2095         * expr.c (build_class_init): Don't optimize out initialization of
2096         implemented interface.
2097
2098 2003-03-11  Andrew Haley  <aph@redhat.com>
2099
2100         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
2101         warning.
2102
2103 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2104
2105         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
2106         and DIR_SEPARATOR_2 for a target.
2107         Correct minor typos.
2108
2109         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
2110         and DIR_SEPARATOR_2 for a target into account.
2111
2112 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
2113
2114         * lang.c (java_init): Update prototype, move code to java_post_options.
2115         (java_post_options): Similarly.
2116
2117 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
2118
2119         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
2120         compare file name components depending on the case-sensitivity
2121         or otherwise of the host file system.
2122
2123         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
2124         "strcmp" to compare file name components.
2125         Use IS_DIR_SEPARATOR instead of comparing directly against
2126         DIR_SEPARATOR.
2127         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
2128         comparing directly against DIR_SEPARATOR.
2129
2130 2003-03-04  Tom Tromey  <tromey@redhat.com>
2131
2132         * Make-lang.in (java.tags): New target.
2133
2134 2003-03-01  Roger Sayle  <roger@eyesopen.com>
2135
2136         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
2137         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
2138
2139 2003-03-01  Tom Tromey  <tromey@redhat.com>
2140
2141         * parse.y (jdep_resolve_class): Only check deprecation if we found
2142         a decl.
2143
2144 2003-02-28  Tom Tromey  <tromey@redhat.com>
2145
2146         PR java/9695:
2147         * class.c (maybe_layout_super_class): Always pass a WFL to
2148         do_resolve_class.
2149         * parse.y (do_resolve_class): Updated comment to explain
2150         parameters.
2151
2152 2003-02-26  Tom Tromey  <tromey@redhat.com>
2153
2154         * jcf-write.c (generate_classfile): Check whether class is
2155         deprecated before writing attribute count.
2156
2157 2003-02-25  Roger Sayle  <roger@eyesopen.com>
2158
2159         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
2160         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
2161
2162 2003-02-23  Tom Tromey  <tromey@redhat.com>
2163
2164         * lang-options.h: Added -Wdeprecated.
2165         * gcj.texi (Warnings): Document -Wdeprecated.
2166         * java-tree.h (flag_deprecated): Declare.
2167         * lang.c (lang_W_options): Added deprecated.
2168         (flag_deprecated): New global.
2169         * chartables.h: Rebuilt.
2170         * gen-table.pl (process_one): Look at whitespace.
2171         (print_tables): Define LETTER_SPACE, LETTER_MASK.
2172         * parse.h (CLEAR_DEPRECATED): New macro.
2173         (CHECK_DEPRECATED_NO_RESET): New macro.
2174         * jcf-parse.c (handle_deprecated): New function.
2175         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
2176         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
2177         * parse.y (resolve_type_during_patch): Check deprecation.
2178         (jdep_resolve_class): Likewise.
2179         (process_imports): Likewise.
2180         (resolve_expression_name): Likewise.
2181         (check_deprecation): Strip arrays from decl.  Check
2182         flag_deprecated.
2183         (patch_method_invocation): Also check the particular constructor
2184         for deprecation.
2185         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
2186         * jcf-write.c (append_deprecated_attribute): New function.
2187         (generate_classfile): Generate deprecated attribute when
2188         appropriate.
2189         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
2190         (java_lex) [case '*']: Simplify logic.
2191         (java_start_char_p): Use LETTER_MASK.
2192         (java_part_char_p): Likewise.
2193         (java_space_char_p): New function.
2194
2195 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
2196
2197         Change base class access representation.
2198         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
2199         (add_interface_do): Likewise.
2200
2201 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
2202
2203         * decl.c (java_init_decl_processing): Change
2204         soft_lookupjnimethod_node to reflect the change in
2205         signature of _Jv_LookupJNIMethod in libjava/jni.cc
2206         * expr.c (build_jni_stub): Calculate and pass the size
2207         on the stack of the arguments to a JNI function. Use
2208         new target macro MODIFY_JNI_METHOD_CALL to allow a
2209         target to modify the call to a JNI method.
2210
2211 2003-02-08  Roger Sayle  <roger@eyesopen.com>
2212
2213         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
2214         instead of basename to avoid compiler warnings on Tru64.
2215
2216 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2217
2218         * gcj.texi: Update to GFDL 1.2.
2219
2220 2003-01-31  Andrew Haley  <aph@redhat.com>
2221
2222         * parse.y (java_expand_classes): Scan the whole class list looking
2223         for access methods that haven't yet been expanded.
2224
2225 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
2226
2227         Fix for java/4269:
2228
2229         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
2230         to fix bootstrap on sparc-unknown-netbsdelf1.5.
2231         * jcf-parse.c: Likewise.
2232
2233 2003-01-31  Mark Wielaard  <mark@klomp.org>
2234
2235         * gjavah.c (throwable_p): Allocate 1 more byte for string.
2236
2237 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
2238
2239         * class.c (make_class): Use BINFO_ELTS.
2240         (set_super_info): Likewse.
2241         (add_interface_do): Likewise.
2242
2243 2003-01-30  Tom Tromey  <tromey@redhat.com>
2244
2245         * jcf-parse.c (read_class): Update identifier's class value if it
2246         changed during parsing.
2247
2248 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
2249
2250         * Make-lang.in (po-generated): Find the targets in $(parsedir).
2251         Propagate change to all other rules as required.
2252         (java/parse-scan.o): Add explicit dependency on
2253         $(parsedir)/java/parse-scan.c .
2254
2255 2003-01-29  Tom Tromey  <tromey@redhat.com>
2256
2257         * parse.y (patch_assignment): Only transform the rhs of an
2258         assignment when compiling to native.
2259
2260 2003-01-28  Tom Tromey  <tromey@redhat.com>
2261
2262         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
2263
2264 2003-01-28  Tom Tromey  <tromey@redhat.com>
2265
2266         * lex.c (java_lex): Don't include UEOF as part of token.
2267         (java_read_unicode): Error if \u sequence prematurely terminated.
2268
2269 2003-01-27  Tom Tromey  <tromey@redhat.com>
2270
2271         * parse.y (java_check_regular_methods): Check for construct after
2272         checking types in throws clause.
2273
2274 2003-01-24  Tom Tromey  <tromey@redhat.com>
2275
2276         * class.c (build_static_field_ref): Only a String or numeric field
2277         can fold to a constant.
2278
2279 2003-01-23  Tom Tromey  <tromey@redhat.com>
2280
2281         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
2282         file name in resource buffer.
2283
2284 2003-01-23  Tom Tromey  <tromey@redhat.com>
2285
2286         * expr.c (build_known_method_ref): Use method's context to find
2287         method table index.
2288
2289 2003-01-23  Tom Tromey  <tromey@redhat.com>
2290
2291         * constants.c (set_constant_entry): Allocated cleared memory.
2292
2293 2003-01-22  Tom Tromey  <tromey@redhat.com>
2294
2295         * java-tree.h: Don't use PARAMS.
2296         * resource.c: Add prototypes for all functions.
2297         (write_resource_constructor): Use `const char *' to avoid
2298         warning.
2299
2300 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
2301
2302         * jcf-parse.c (process_zip_dir): Remove unused variable.
2303
2304 2003-01-22  Tom Tromey  <tromey@redhat.com>
2305
2306         * expr.c (build_invokeinterface): Abort if method's context is not
2307         an interface.
2308
2309 2003-01-22  Tom Tromey  <tromey@redhat.com>
2310
2311         * gcj.texi (Input and output files): Mention non-class entries.
2312         * decl.c (java_init_decl_processing): Call
2313         init_resource_processing.
2314         * java-tree.h (compile_resource_data, write_resource_constructor,
2315         compile_resource_file, init_resource_processing): Declare.
2316         * config-lang.in (gtfiles): Added resource.c.
2317         * Make-lang.in (gt-java-resource.h): New target.
2318         (JAVA_OBJS): Added resource.o.
2319         (java/resource.o): New target.
2320         * resource.c: New file.
2321         * class.c (compile_resource_file): Moved to resource.c.
2322         (registerResource_libfunc): Likewise.
2323         (utf8_decl_list): Mark with GTY; now static.
2324         * jcf-parse.c (classify_zip_file): New function.
2325         (parse_zip_file_entries): Use it; compile .properties files.
2326         (process_zip_dir): Use classify_zip_file and compute_class_name.
2327         Don't write class name into zip directory.
2328         (java_parse_file): Call write_resource_constructor.
2329         (compute_class_name): New function.
2330         * jcf-io.c (read_zip_member): Reindented.
2331
2332 2003-01-21  Tom Tromey  <tromey@redhat.com>
2333
2334         * class.c (supers_all_compiled): New function.
2335         (make_class_data): Use it.
2336
2337 2003-01-21  Tom Tromey  <tromey@redhat.com>
2338
2339         * parse.y (method_header): Native method can't be strictfp.
2340         No method can be transient or volatile.
2341
2342 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2343
2344         Make-lang.in (jvspec.o-warn): Add -Wno-error.
2345
2346 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
2347
2348         * check-init.c: Fix comment typos.
2349         * class.c: Likewise.
2350         * constants.c: Likewise.
2351         * decl.c: Likewise.
2352         * except.c: Likewise.
2353         * expr.c: Likewise.
2354         * java-except.h: Likewise.
2355         * java-tree.h: Likewise.
2356         * javaop.h: Likewise.
2357         * jcf-dump.c: Likewise.
2358         * jcf-io.c: Likewise.
2359         * jcf-parse.c: Likewise.
2360         * jcf-write.c: Likewise.
2361         * lang.c: Likewise.
2362         * mangle.c: Likewise.
2363         * typeck.c: Likewise.
2364         * verify.c: Likewise.
2365
2366 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2367
2368         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2369         * jcf-write.c: Include "tm_p.h".
2370
2371 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2372
2373         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2374
2375 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2376
2377         * builtins.c (java_build_function_call_expr): Renamed from
2378         build_function_call_expr.  All callers changed.
2379
2380         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2381         * jcf-parse.c: Include tm_p.h.
2382
2383         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2384         warning.
2385
2386 2003-01-14  Tom Tromey  <tromey@redhat.com>
2387
2388         * class.c (make_class_data): Check that super is compiled before
2389         building class reference to it.
2390
2391 2003-01-14  Andrew Haley  <aph@redhat.com>
2392
2393         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2394         varargs function -- correct.
2395
2396 2003-01-14  Andrew Haley  <aph@redhat.com>
2397
2398         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2399
2400 2003-01-14  Andrew Haley  <aph@redhat.com>
2401
2402         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2403         varargs function -- correct.
2404
2405         * parse.y (patch_assignment): Copy the rhs of an assignment into a
2406         temporary if the RHS is a reference.
2407
2408 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2409
2410         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2411         * keyword.h: Regenerated.
2412
2413         * All Files: Convert to ISO C style function definitions.
2414
2415 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2416
2417         * parse.y (check_pkg_class_access): ANSIfy definition.
2418
2419 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2420
2421         * decl.c, parse-scan.y, parse.y: Don't cast return value of
2422         xmalloc et al.
2423
2424         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2425
2426 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2427
2428         Merge from pch-branch:
2429
2430         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
2431
2432         * Make-lang.in (java/gjavah.o): Update dependencies.
2433         * gjavah.c: Include ggc.h.
2434
2435         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
2436
2437         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2438         (JCFDUMP_OBJS): Add ggc-none.o.
2439         (java/jcf-dump.o): Depend on GGC_H.
2440         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2441         CPool substructures.
2442         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2443         * jcf-dump.c: Include ggc.h.
2444
2445         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2446
2447         * jcf.h (union cpool_entry): New.
2448         (struct CPool): Use gengtype to mark.  Change field 'data' to be
2449         an array of unions.
2450         (struct JCF): Use gengtype to mark.
2451         (CPOOL_UINT): Update for new cpool_entry type.
2452         (CPOOL_USHORT1): Likewise.
2453         (CPOOL_USHORT2): Likewise.
2454         (CPOOL_FINISH): Use GC to free cpool subfields.
2455         * parse.h (struct parser_ctxt): Mark field current_jcf.
2456         * lex.c (java_init_lex): Use GC to allocate struct JCF.
2457         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2458         (main_jcf): Use gengtype to mark.
2459         (ggc_mark_jcf): Delete.
2460         (get_constant): Update for new cpool_entry type.
2461         (give_name_to_class): Likewise.
2462         (get_class_constant): Likewise.
2463         (init_outgoing_cpool): Use GGC to allocate struct CPool.
2464         (java_parse_file): Use GGC to allocate struct JCF.
2465         (init_jcf_parse): Don't call ggc_add_root.
2466         * jcf-reader.c (jcf_parse_constant_pool): Update for new
2467         cpool_entry type.
2468         * java-tree.h (current_jcf): Use gengtype to mark.
2469         (CPOOL_UTF): Update for new cpool_entry type.
2470         (outgoing_cpool): Use gengtype to mark.
2471         (struct lang_type): GC struct JCF and struct CPool.
2472         * config-lang.in (gtfiles): Add jcf.h.
2473         * constants.c (find_tree_constant): New.
2474         (set_constant_entry): Allocate cpool subfields using GGC.  Update
2475         for new cpool_entry type.
2476         (find_constant1): Update for new cpool_entry type.
2477         (find_constant2): Likewise.
2478         (find_utf8_constant): Use find_tree_constant.
2479         (find_class_or_string_constant): Remove unnecessary cast to jword.
2480         Update for new cpool_entry type.
2481         (count_constant_pool_bytes): Update for new cpool_entry type.
2482         (write_constant_pool): Likewise.
2483         (alloc_name_constant): Use find_tree_constant.
2484         (build_constants_constructor): Update for new cpool_entry type.
2485
2486         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2487
2488         * parse.y (mark_parser_ctxt): Delete.
2489         (goal): Don't use ggc_add_root.
2490         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2491         (java_pop_parser_context): Let GC free parser_ctxt.
2492         (java_parser_context_resume): Likewise.
2493         * parse.h (struct parser_ctxt): Use gengtype to mark.
2494         (ctxp): Likewise.
2495         (ctxp_for_generation): Likewise.
2496         * lex.h (struct java_lc_s): Mark for gengtype.
2497         (java_lexer): Rearrange for gengtype.
2498         * config-lang.in (gtfiles): Add lex.h, parse.h.
2499
2500 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2501
2502         * All Files: Remove PARAMS macro.
2503
2504         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2505         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2506         `__STDC__' macros.
2507
2508         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2509         VA_CLOSE.
2510
2511 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2512
2513         * Make-lang.in (java.install-common, java.uninstall,
2514         java.install-info, java.install-man): Prepend $(DESTDIR)
2515         to destination paths in all (un)installation commands.
2516         (java.install-common): Rewrite $(LN) command to support
2517         DESTDIR with "ln" as well as with "ln -s".
2518
2519 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2520
2521         * java-tree.h: Protect against multiple inclusion.
2522
2523 2003-01-07  Tom Tromey  <tromey@redhat.com>
2524
2525         * class.c (add_assume_compiled): Don't adjust parent if we're
2526         already at the root of tree.
2527
2528 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2529
2530         * lang.c (dump_compound_expr): Prototype.
2531
2532 2003-01-03  Tom Tromey  <tromey@redhat.com>
2533
2534         Fix for PR java/8712:
2535         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2536         when simply checking against `null'.
2537
2538 2003-01-03  Tom Tromey  <tromey@redhat.com>
2539
2540         * gcj.texi (Standard Properties): Document http.proxyHost and
2541         http.proxyPort.
2542
2543         * gcj.texi (GNU Classpath Properties): Document new properties.
2544
2545 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2546
2547         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2548         java/lang-options.h, java/mangle.c, java/mangle_name.c,
2549         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2550
2551 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2552
2553         * Make-lang.in, boehm.c, buffer.c,
2554           buffer.h, builtins.c, class.c,
2555           config-lang.in, constants.c,
2556           convert.h, decl.c, except.c,
2557           expr.c, java-except.h,
2558           java-tree.h, javaop.def,
2559           jcf-parse.c, jcf-write.c,
2560           jv-scan.c, jvgenmain.c,
2561           jvspec.c, keyword.gperf,
2562           keyword.h, lang-options.h,
2563           lang-specs.h, lang.c, lex.c,
2564           lex.h, mangle.c, mangle_name.c,
2565           parse-scan.y, parse.h, parse.y,
2566           typeck.c, verify.c, xref.c,
2567           xref.h: Replace "GNU CC" with
2568           "GCC" in the copyright header.
2569
2570         * check-init.c, gjavah.c, javaop.h,
2571           jcf-depend.c, jcf-dump.c, jcf-io.c,
2572           jcf-path.c, jcf-reader.c, jcf.h,
2573           zextract.c, zipfile.h: These files are
2574           "part of GCC". Also say "GCC" not "GNU CC".
2575
2576 2002-12-30  DJ Delorie  <dj@redhat.com>
2577
2578         * Make-lang.in: Protect against texi2pod/pod2man failing.
2579
2580 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
2581
2582         * gcj.texi: Use @copying.
2583
2584 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2585
2586         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2587         print_cxx_classname.
2588         (print_cxx_classname): Add add_scope parameter.
2589         (print_class_decls): Do not emit a semicolon after the extern
2590         "Java" block.
2591         (process_file): Adjust calls to print_cxx_classname.
2592
2593 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2594
2595         * gcj.texi: Include Cover Texts in man page.
2596
2597 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
2598
2599         * class.c (build_static_field_ref): Check FIELD_FINAL.
2600
2601         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2602         instead of current_constant_pool_data_ref.
2603         * java-tree.h (current_constant_pool_data_ref): Undefine.
2604         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2605         * jcf-parse.c (init_outgoing_cpool): Don't initialize
2606         current_constant_pool_data_ref.
2607
2608         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2609         not build_internal_class_name.
2610
2611         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2612         Use it when class ref isn't certain to be compiled.
2613
2614 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2615
2616         * gcj.texi: Include gcc-common.texi.
2617         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2618         $(srcdir)/doc/include/gcc-common.texi.
2619
2620 2002-12-22  Anthony Green  <green@redhat.com>
2621
2622         * gcj.texi (Limitations): Add note about org.xml.sax and
2623         org.w3c.dom.
2624
2625 2002-12-20  Tom Tromey  <tromey@redhat.com>
2626
2627         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2628         where minimum case value is Integer.MIN_VALUE.
2629         Fixes PR java/8955.
2630
2631 2002-12-18  Andrew Haley  <aph@redhat.com>
2632
2633         * parse.y (patch_invoke): Force evaluation order when `check' is
2634         set.  For PR libgcj/8945.
2635
2636 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
2637
2638         * gcj.texi: Change version number to 3.4.
2639
2640 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
2641         Andrew Haley <aph@redhat.com>
2642
2643         * parse.y (source_end_java_method): Remove custom encoding of line
2644         numbers for a function decl before passing it to the back end.
2645
2646 2002-12-03  Andrew Haley  <aph@redhat.com>
2647
2648         * class.c (make_class_data): New field, "chain".
2649         * decl.c (java_init_decl_processing): Likewise.
2650
2651 2002-12-02  Tom Tromey  <tromey@redhat.com>
2652
2653         For PR java/8740:
2654         * parse.y (do_resolve_class): Handle qualified name via
2655         recursion.
2656
2657 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2658
2659         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2660         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2661         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2662         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2663         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2664         Include coretypes.h and tm.h.
2665         * Make-lang.in: Update dependencies.
2666
2667 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2668
2669         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2670
2671 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2672
2673         * jcf-reader.c: Don't expand JCF_readu4 inside the
2674         expansion of JCF_SKIP.
2675
2676 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2677
2678         * jcf-reader.c: Don't expand JCF_readu4 inside the
2679         expansion of JCF_SKIP.
2680
2681 2002-11-22  Tom Tromey  <tromey@redhat.com>
2682
2683         * parse.y (patch_binop): Cast right hand side of shift expression
2684         to `int'.  Fixes PR java/8676.
2685
2686 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
2687             Andrew Haley <aph@redhat.com>
2688
2689         * gcc/java/jcf-write.c (write_classfile): Remove target
2690         class file, if it exists, before renaming the temporary
2691         class file to it.
2692
2693 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2694
2695         * jvspec.c (lang_specific_spec_functions): New.
2696
2697 2002-11-18  Tom Tromey  <tromey@redhat.com>
2698
2699         Fix for PR java/7912:
2700         * expr.c (can_widen_reference_to): Allow cast of array to
2701         Cloneable or Serializable.
2702         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2703         (java_io_serializable_identifier_node): Likewise.
2704         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2705         (valid_ref_assignconv_cast_p): Use new identifier nodes.
2706         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2707         java_io_serializable.
2708         * decl.c (java_init_decl_processing): Initialize
2709         java_lang_cloneable_identifier_node and
2710         java_io_serializable_identifier_node.
2711         (java_lang_cloneable_identifier_node): New global.
2712         (java_io_serializable_identifier_node): Likewise.
2713
2714 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2715
2716         * buffer.c: Remove unnecessary casts.
2717         * check-init.c: Likewise.
2718         * class.c: Likewise.
2719         * constants.c: Likewise.
2720         * decl.c: Likewise.
2721         * except.c: Likewise.
2722         * gjavah.c: Likewise.
2723         * jcf-io.c: Likewise.
2724         * jcf-parse.c: Likewise.
2725         * jcf-path.c: Likewise.
2726         * jvspec.c: Likewise.
2727         * lang.c: Likewise.
2728         * lex.c: Likewise.
2729         * verify.c: Likewise.
2730
2731 2002-11-06  Tom Tromey  <tromey@redhat.com>
2732
2733         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2734         a JNI header.
2735
2736 2002-11-05  Tom Tromey  <tromey@redhat.com>
2737
2738         Fix for PR java/6388.
2739         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2740         * java-tree.h (enum java_tree_index): New values
2741         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2742         (decimal_int_max, decimal_long_max): New defines.
2743         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
2744         (error_if_numeric_overflow): Rewrote range checking.
2745         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2746         decimal_long_max.
2747
2748 2002-11-02  Tom Tromey  <tromey@redhat.com>
2749
2750         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2751
2752         * class.c (make_method_value): Put class name, not signature, into
2753         `throws' field.  For PR java/8415.
2754
2755 2002-10-24  Tom Tromey  <tromey@redhat.com>
2756
2757         * gcj.texi (Invoking gij): Document --showversion.
2758         (Standard Properties): java.library.path now set.
2759
2760 2002-10-23  Tom Tromey  <tromey@redhat.com>
2761
2762         * gjavah.c (decode_signature_piece): In JNI mode, print
2763         `jobjectArray' when array depth is nonzero.
2764         Fixes PR java/8296.
2765
2766 2002-10-15  Andrew Haley  <aph@redhat.com>
2767
2768         * parse.y (patch_invoke): Call force_evaluation_order on a static
2769         arg list.
2770         (resolve_qualified_expression_name): Call force_evaluation_order
2771         on a arg list that is part of a Qualified Expression Name.
2772
2773         * lang.c (dump_compound_expr): New.
2774         (java_dump_tree): New.
2775
2776 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
2777
2778         * gcj.texi: Added item describing the GCJ runtime property
2779         "gnu.gcj.progname".
2780
2781 2002-10-15  Richard Henderson  <rth@redhat.com>
2782
2783         * jcf-parse.c (get_constant): Fix type warning.
2784
2785 2002-10-15  Andrew Haley  <aph@redhat.com>
2786
2787         * java-tree.h (java_inlining_merge_static_initializers): Declare.
2788         (java_inlining_map_static_initializers): Declare.
2789
2790 2002-10-14  Andrew Haley  <aph@redhat.com>
2791
2792         * tree-inline.c (remap_block): All local class initialization
2793         flags go in the outermost scope.
2794         (expand_call_inline): Call java_inlining_map_static_initializers.
2795         (expand_call_inline): Call java_inlining_merge_static_initializers.
2796         * java/lang.c (merge_init_test_initialization): New.
2797         (java_inlining_merge_static_initializers): New.
2798         (inline_init_test_initialization): New.
2799         (java_inlining_map_static_initializers): New.
2800
2801 2002-10-11  Mark Wielaard  <mark@klomp.org>
2802
2803         * gcj.texi (Compatibility): Add Limitations and Extensions section.
2804
2805 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2806
2807         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2808
2809 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2810
2811         * parse.y (merge_string_cste): Add parentheses around & within |.
2812
2813 2002-10-08  Tom Tromey  <tromey@redhat.com>
2814
2815         * parse.y (variable_declarator_id): Simplify error path for
2816         array declarator error.  For PR java/8003.
2817
2818 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
2819
2820         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2821         bug_report_url.
2822
2823 2002-10-08  Andrew Haley  <aph@redhat.com>
2824
2825         * parse.y (attach_init_test_initialization_flags): Check for
2826         error_mark_node.
2827
2828 2002-10-07  Anthony Green  <green@redhat.com>
2829
2830         * parse.y (merge_string_cste): Fix bug in string concatenation.
2831
2832 2002-10-03  Michael Koch  <konqueror@gmx.de>
2833
2834         * gcj.texi (Standard properties):
2835         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2836
2837 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2838
2839         PR optimization/6627
2840         * lang.c (java_init): If storing the vbit in function
2841         pointers, ensure that force_align_functions_log is atleast
2842         one to aid compatability with g++ vtables.
2843
2844 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
2845
2846         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2847         foul of type-based aliasing.
2848
2849 2002-09-30  Anthony Green  <green@redhat.com>
2850
2851         * gcj.texi (Invoking jv-scan): Fix texinfo.
2852
2853 2002-09-28  Anthony Green  <green@redhat.com>
2854
2855         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2856         (Code Generation): Add -fno-assert documentation.
2857         * jv-scan.c (flag_assert): New global.
2858         (options): Add assert option.
2859         (help): Add --no-assert documentation.
2860         * parse-scan.y (flag_assert): New global.
2861         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2862         (flag_assert): New global.
2863         * java-tree.h (flag_assert): New global.
2864         * lex.c (java_lex): Obey flag_assert.
2865         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2866         calling cc1.
2867
2868 2002-09-26  Andrew Haley  <aph@redhat.com>
2869
2870         * expr.c (build_java_array_length_access): Check for null pointer.
2871         * expr.c (expand_java_arrayload): Likewise.
2872
2873 2002-09-21  Richard Henderson  <rth@redhat.com>
2874
2875         * jcf-parse.c (get_constant): Decode from IEEE no matter
2876         what the target format.
2877
2878 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
2879
2880         * ChangeLog: Follow spelling conventions.
2881         * class.c: Likewise.
2882         * decl.c: Likewise.
2883         * expr.c: Likewise.
2884         * gjavah.c: Likewise.
2885         * java-tree.h: Likewise.
2886         * jcf-dump.c: Likewise.
2887         * jcf-parse.c: Likewise.
2888         * jvspec.c: Likewise.
2889         * lang.c: Likewise.
2890         * mangle.c: Likewise.
2891         * parse.y: Likewise.
2892
2893 2002-09-17  Tom Tromey  <tromey@redhat.com>
2894
2895         * lex.c (java_read_unicode_collapsing_terminators): Handle case
2896         where \r appears at EOF.  Fixes PR java/7950.
2897
2898 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2899
2900         * jvspec.c (lang_specific_driver): Remove unused variable.
2901
2902 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2903
2904         * java-tree.h (union lang_tree_node): Add chain_next option.
2905
2906 2002-09-16  Richard Henderson  <rth@redhat.com>
2907
2908         * jcf-parse.c (get_constant): Runtime check for IEEE format;
2909         use new real.h interface.
2910         * jcf-write.c (find_constant_index): Use new real.h interface.
2911         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2912
2913 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2914
2915         * lang.c: Follow spelling conventions.
2916
2917 2002-09-11  Per Bothner  <per@bothner.com>
2918
2919         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
2920         constant to the type of the field.
2921         (java_complete_tree):  Remove now-redundant code.
2922
2923         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
2924
2925 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
2926
2927         For PR java/5794:
2928         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2929         return label if a ret instruction for the jsr has been reached.
2930
2931 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
2932
2933         * parse.y (DIR_SEPARATOR): Don't define.
2934         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2935
2936 2002-08-28  Andrew Haley  <aph@redhat.com>
2937
2938         * verify.c (verify_jvm_instructions): Allow exception handler
2939         inside code that is being protected, but generate a warning.
2940         * except.c (link_handler): Initialize `expanded' in new eh_range.
2941         (binding_depth, is_class_level, current_pc): Declare extern.
2942
2943 2002-09-01  Mark Wielaard <mark@klomp.org>
2944
2945         * gcj.texi: Add chapter about system properties.
2946         Fixed some typos.
2947
2948 2002-08-26  Tom Tromey  <tromey@redhat.com>
2949
2950         * parse.y (try_builtin_assignconv): Allow narrowing primitive
2951         conversion if RHS_TYPE is byte, short, or char.
2952
2953 2002-08-22  Tom Tromey  <tromey@redhat.com>
2954
2955         * gcj.texi (Invoking gij): Document -cp and -classpath.
2956
2957 2002-08-21  Tom Tromey  <tromey@redhat.com>
2958
2959         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2960         $(prefix)/share.  For PR libgcj/7633.
2961
2962         For PR java/6005 and PR java/7611:
2963         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2964         (java_can_use_bit_fields_p): New function.
2965
2966 2002-08-16  Tom Tromey  <tromey@redhat.com>
2967
2968         * gcj.texi (Class Initialization): Mention class initialization of
2969         arrays.
2970
2971 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
2972
2973         * Make-lang.in (java-tree-inline.o): New.
2974         (JAVA_OBJS): Add java-tree-inline.o.
2975         * parse.y (source_end_java_method): Call java_optimize_inline.
2976         (java_expand_method_bodies): Save method's tree in
2977         DECL_SAVED_TREE.
2978         (add_stmt_to_compound): Keep track of the number of statments.
2979         * lang.c (java_init): Enable flag_inline_trees.
2980         (java_post_options): If flag_inline_functions is on, enable
2981         flag_inline_trees instread.
2982         (decl_constant_value): New.
2983         (java_tree_inlining_walk_subtrees): New.
2984         * java-tree.h (DECL_NUM_STMTS): New macro.
2985         (java_optimize_inline): Declare.
2986         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2987         Handle a LABEL_EXPR.
2988         * decl.c (build_result_decl): If we already have a DECL_RESULT
2989         don't make another.
2990         (dump_function): New.
2991         (java_optimize_inline): New.
2992         (dump_function): New.
2993
2994 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
2995
2996         For PR java/7483:
2997         * parse.y (build_assertion): Invert return from
2998         desiredAssertionStatus.
2999
3000 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3001
3002         * jcf-write.c (get_access_flags): Return correct access flags for
3003         private and protected inner classes.
3004
3005 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3006
3007         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
3008
3009 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3010
3011         * mangle_name.c: Don't include obstack.h twice.
3012         * xref.c: Don't include obstack.h.
3013
3014 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3015
3016         * class.c: (permanent_obstack): Delete declaration.
3017         * constants.c: (permanent_obstack): Delete declaration.
3018         * except.c: (permanent_obstack): Delete declaration.
3019         * expr.c: (permanent_obstack): Delete declaration.
3020         * jcf-parse.c: (permanent_obstack): Delete declaration.
3021         (saveable_obstack): Delete declaration.
3022         * parse.h: (permanent_obstack): Delete declaration.
3023         * typeck.c: (permanent_obstack): Delete declaration.
3024
3025 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
3026
3027         * gcj.texi (version-gcc): Increase to 3.3.
3028
3029 2002-07-22  Tom Tromey  <tromey@redhat.com>
3030
3031         * lex.c (java_lex): Check for `e' or `E' after 0.
3032
3033 2002-07-21  Richard Henderson  <rth@redhat.com>
3034
3035         * lang.c (java_unsafe_for_reeval): New.
3036         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
3037
3038 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
3039
3040         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
3041         (jcf_path_init): Use GET_ENVIRONMENT.
3042
3043 2002-07-10  Roger Sayle  <roger@eyesopen.com>
3044             Zack Weinberg <zack@codesourcery.com>
3045
3046         * builtins.c (initialize_builtins): Remove defines that
3047         handled C/C++ specific junk hereby removed from builtins.def.
3048
3049 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
3050
3051         * lang.c (java_post_options): Update prototype.
3052
3053 2002-07-05  Roger Sayle  <roger@eyesopen.com>
3054
3055         * builtins.c (initialize_builtins): Ignore the additional
3056         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
3057         the builtins.def file.
3058
3059 2002-07-01  Tom Tromey  <tromey@redhat.com>
3060
3061         For PR libgcj/7073:
3062         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
3063         specially.
3064
3065 2002-07-01  Roger Sayle  <roger@eyesopen.com>
3066
3067         * java/decl.c (builtin_function): Accept additional parameter.
3068         (java_init_decl_processing): Pass an additional NULL_TREE
3069         argument to builtin_function.
3070
3071 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
3072
3073         * gcj.texi: Fixed gcj invocation example so that it compiles.
3074
3075 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3076
3077         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
3078         * parse.y (mark_parser_ctxt): Likewise.
3079         (check_modifiers, declare_local_variables): Avoid incorrect
3080         hardcoded constant 10.
3081
3082         * lex.c (java_read_char): Avoid "comparison is always true"
3083         warning.
3084
3085 2002-06-25  Andreas Schwab  <schwab@suse.de>
3086
3087         * expr.c (JSR): Avoid undefined operation on PC.
3088
3089 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3090
3091         * decl.c (clear_binding_level): Const-ify.
3092
3093 2002-06-13  Akim Demaille  <akim@epita.fr>
3094
3095         * parse.y (class_declaration, interface_declaration): Make sure
3096         all their rules have an action, in order to avoid meaningless `$$
3097         = $1' and their type clashes.
3098
3099 2002-06-11  Tom Tromey  <tromey@redhat.com>
3100
3101         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
3102         * parse-scan.y (statement_without_trailing_substatement): Added
3103         assert_statement.
3104         (assert_statement): New rule.
3105         * java-tree.h (struct lang_type) [assertions]: New field.
3106         (TYPE_USES_ASSERTIONS): New macro.
3107         (CLASS_USES_ASSERTIONS): Likewise.
3108         (FIELD_SYNTHETIC): New define.
3109         * lex.c (java_lval;): Added ASSERT_TK.
3110         * parse.y (ASSERT_TK): Added.
3111         (statement_without_trailing_substatement): Added assert_statement.
3112         (assert_statement): New rule.
3113         (build_assertion): New function.
3114         (maybe_generate_pre_expand_clinit): Create and initialize
3115         $assertionsDisabled.
3116         (lookup_package_type): Removed decl.
3117         * keyword.h: Rebuilt.
3118         * keyword.gperf (assert): New token.
3119
3120 2002-06-10  Akim Demaille  <akim@epita.fr>
3121
3122         * parse.y (interface_type_list, class_member_declaration)
3123         (unary_expression_not_plus_minus): Remove duplicate %type.
3124         Whitespace changes.
3125
3126 2002-06-09  Tom Tromey  <tromey@redhat.com>
3127
3128         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
3129
3130         * parse.y (method_header): Give error message in all cases.
3131         Fixes PR java/6865.
3132
3133 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3134
3135         Don't use RTL inlining. Fix for PR java/6820.
3136         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
3137         (flag_really_inline): New.
3138         (java_decode_option): Set flag_really_inline if -finline-functions
3139         is seen.
3140         (java_post_options): New function. Turn off inlining unless
3141         flag_really_inline is set.
3142
3143 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3144
3145         * gjavah.c (throwable_p): Accept argument as either a classname or
3146         signature fragment. Create null-terminated classname string for super
3147         when calling itself recursively.
3148         (decode_signature_piece): Skip first character from class name
3149         signature when calling throwable_p.
3150
3151 2002-06-08  H.J. Lu  (hjl@gnu.org)
3152
3153         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
3154
3155 2002-06-04  Tom Tromey  <tromey@redhat.com>
3156
3157         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
3158
3159 2002-06-04  Michael Koch  <konqueror@gmx.de>
3160
3161         * gcj.texi (Input Options): Fixed typo.
3162
3163 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
3164
3165         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
3166         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
3167         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
3168         and all now-pointless local variables.  Rename other local
3169         variables to reflect their not being handles.
3170
3171         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
3172         #if JCF_USE_STDIO blocks.
3173
3174         * parse.y: Add missing semicolon at end of rule.
3175
3176 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3177
3178         * check-init.c (attach_initialized_static_class): Delete, unused.
3179         * parse.y: Use htab_t instead of struct hashtable, update
3180         all uses.
3181         * java-tree.h: Include hashtab.h instead of hash.h.
3182         (struct lang_decl_func): Use htab_t, set up for gengtype.
3183         (struct init_test_hash_entry): Delete.
3184         (struct treetreehash_entry): New.
3185         (java_treetreehash_find): New
3186         (java_treetreehash_new): New prototype.
3187         (java_treetreehash_create): New prototype.
3188         (java_mark_tree): Delete prototype.
3189         (java_hash_hash_tree_node): Delete prototype.
3190         (java_hash_compare_tree_node): Delete prototype.
3191         (attach_initialized_static_class): Delete prototype.
3192         * expr.c (build_class_init): Update to use java_treetreehash
3193         functions.
3194         (java_expand_expr): Update to use htab_t.
3195         (emit_init_test_initialization): Likewise.
3196         * decl.c (java_mark_tree): Delete.
3197         * class.c (init_test_hash_newfunc): Delete.
3198         (java_hash_hash_tree_node): Delete.
3199         (java_hash_compare_tree_node): Delete.
3200         (add_method_1): Update to use java_treetreehash functions.
3201         (JAVA_TREEHASHHASH_H): New macro.
3202         (java_treetreehash_hash): New function.
3203         (java_treetreehash_compare): New function.
3204         (java_treetreehash_find): New function.
3205         (java_treetreehash_new): New function.
3206         (java_treetreehash_create): New function.
3207         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
3208
3209         * Make-lang.in (java/parse.o): Depend on debug.h.
3210         * java-tree.h (struct lang_identifier): Use gengtype.
3211         (union lang_tree_node): New.
3212         (struct lang_decl_func): Use gengtype.
3213         (struct lang_decl_var): Likewise.
3214         (struct lang_decl): Likewise.
3215         * parse.y: Include debug.h.
3216         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
3217
3218         * lang.c (struct language_function): New dummy structure.
3219
3220         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
3221         descriminator for DECL_LANG_SPECIFIC.
3222         (struct lang_decl_func): Rename from struct lang_decl.
3223         (enum lang_decl_desc): New.
3224         (struct lang_decl): Make it a union.  Update all the accessor macros.
3225         (struct lang_type): Use gengtype.
3226         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
3227         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
3228         are now the same size.
3229         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
3230         use discriminator to mark DECL_LANG_SPECIFIC.
3231
3232         * Make-lang.in (gt-java-builtins.h): New rule.
3233         (java/builtins.o): Add dependency on gt-<filename>.h.
3234         * builtins.c: Use gengtype for roots.
3235         (union string_or_tree): Use gengtype.
3236         (struct builtin_record): Use gengtype.
3237         * config-lang.in (gtfiles): Add builtins.c.
3238
3239         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
3240         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
3241         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
3242         gt-java-parse.h, gtype-java.h): Add rules to generate.
3243         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
3244         (class.o): Add dependency on gt-*.h.
3245         (constants.o): Likewise.
3246         (decl.o): Likewise.
3247         (expr.o): Likewise.
3248         (jcf-parse.o): Likewise.
3249         (jcf-write.o): Likewise.
3250         (lang.o): Likewise.
3251         * config-lang.in (gtfiles): New.
3252         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3253         * constants.c: Replace uses of ggc_add_* with GTY markers.
3254         Include gt-*.h.
3255         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3256         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3257         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
3258         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
3259         Include gt-*.h.
3260         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
3261         Include gt-*.h.
3262         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3263         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
3264         gt-*.h.
3265         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3266         Include gtype-java.h.
3267
3268 2002-06-02  Tom Tromey  <tromey@redhat.com>
3269
3270         Fix for PR java/5913:
3271         * parse.y (patch_binop): Call patch_string on op1.
3272
3273 2002-06-02  Tom Tromey  <tromey@redhat.com>
3274
3275         Fix for PR java/1343, PR java/6336:
3276         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
3277         formatting.  Changed return type.
3278         (anonymous_class_counter): Moved to top of file.
3279         (maybe_make_nested_class_name): Append number to class name for
3280         function-local classes.
3281
3282 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3283
3284         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
3285         * Make-lang.in: Update dependency lists.
3286
3287 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
3288
3289         * gjavah.c (throwable_p): Do not free the name of the class after
3290         passing it to find_class.
3291         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
3292         * jcf-io.c (dirent.h): Include it.
3293         (fnmatch.h): Likewise.
3294         (compare_path): New function.
3295         (java_or_class_file): Likewise.
3296         (memoized_dirlist_entry): New type.
3297         (memoized_dirlist_lookup_eq): New function.
3298         (memoized_dirlists): New variable.
3299         (caching_stat): New function.
3300         (memoized_class_lookup_eq): New function.
3301         (memoized_class_lookups): Likewise.
3302         (find_class): Use memoized_class_lookups and caching_stat.
3303         * jcf.h (JCF_USE_SCANDIR): Define.
3304         * parse.y (java_expand_classes): Write the class files in reverse
3305         order.
3306
3307 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3308
3309         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
3310
3311 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
3312
3313         * jcf-write.c (write_classfile): Unlink the temporary file if it
3314         cannot be renamed.  Use concat to build up the name of the
3315         temporary file.
3316
3317 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
3318
3319         * jcf-write.c (write_classfile): Write the file to a
3320         temporary file and then rename it.
3321
3322 2002-05-07  Tom Tromey  <tromey@redhat.com>
3323
3324         * gjavah.c (throwable_p): Use xstrdup, not strdup.
3325
3326         Fix for PR java/1200:
3327         * gjavah.c (throwable_p): New function.
3328         (decode_signature_piece): Use it.  A `WeakReference' isn't the
3329         same as a `jweak'.
3330         Include hashtab.h.
3331         (gcjh_streq): New function.
3332
3333 2002-05-07  Andreas Jaeger  <aj@suse.de>
3334
3335         * parse.y (finish_for_loop): Fix if statement.
3336
3337 2002-05-06  Tom Tromey  <tromey@redhat.com>
3338
3339         Fix for PR java/5941:
3340         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3341         loop update expression.
3342         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3343         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3344
3345 2002-05-04  Mark Wielaard  <mark@klomp.org>
3346
3347         For PR java/6519:
3348         * parse.y (build_string_concatenation): Return just op1 only when op2
3349         is null and op1 is a STRING_CST, otherwise always construct a
3350         StringBuffer.
3351
3352 2002-04-27  Tom Tromey  <tromey@redhat.com>
3353
3354         For PR java/6382:
3355         * parse.y (string_convert_int_cst): New function.
3356         (merge_string_cste): Use it.
3357
3358 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3359
3360         * java-tree.h (java_parse_file): Update.
3361         (java_set_yydebug): Remove.
3362         * jcf-parse.c (yydebug): Remove.
3363         (java_set_yydebug): Die.
3364         (java_parse_file): Update.
3365         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3366
3367 2002-04-24  Tom Tromey  <tromey@redhat.com>
3368
3369         For PR java/6425:
3370         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3371         EXPR_WFL_QUALIFICATION of qual_wfl.
3372
3373 2002-04-23  Per Bothner  <per@bothner.com>
3374
3375         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
3376         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
3377         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
3378
3379 2002-04-23  Tom Tromey  <tromey@redhat.com>
3380
3381         For PR java/6314:
3382         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
3383         recognize `-fcompile-resource='.
3384         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
3385         a bit.
3386
3387 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3388
3389         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3390         paths. Fixes PR java/2791.
3391
3392 2002-04-19  Andrew Haley  <aph@redhat.com>
3393
3394         * jcf-write.c (push_long_const): lo, hi: New variables.
3395         Use rshift_double to extract the high part of a 64-bit long.
3396         Use WORD_TO_INT to extract the low part.
3397
3398         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3399         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
3400         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3401
3402 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3403
3404         * typeck.c (incomplete_type_error): Remove.
3405
3406 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3407
3408         * class.c (make_class_data): Set DECL_ALIGN on static class data,
3409         for hash synchronization.
3410         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3411         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3412         class_type_node.
3413
3414 2002-04-16  Mark Wielaard  <mark@klomp.org>
3415
3416         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3417         negative zero.
3418
3419 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3420
3421         Fix for PR java/6294:
3422         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3423         interfaces.
3424
3425 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3426
3427         Fix for PR java/6085:
3428         * parse.y (patch_method_invocation): Always use build_access_to_thisn
3429         to get enclosing "this" argument for inner-class constructor
3430         invocation. Pass correct arguments to build_access_to_thisn.
3431
3432 2002-04-10  Andreas Jaeger  <aj@suse.de>
3433
3434         * gcj.texi (Input Options): Fix extdirs patch.
3435
3436 2002-04-10  Anthony Green  <green@redhat.com>
3437
3438         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3439
3440 2002-04-09  Anthony Green  <green@redhat.com>
3441
3442         * gcj.texi (Input Options): Add --extdirs documentation.
3443         * jcf-dump.c (OPT_extdirs): New macro.
3444         (options): Add extdirs option.
3445         (help): Describe --extdirs.
3446         (main): Handle OPT_extdirs.
3447         * gjavah.c (OPT_extdirs): New macro.
3448         (options): Add extdirs option.
3449         (help): Describe --extdirs.
3450         (main): Handle OPT_extdirs.
3451         * jcf-path.c (jcf_path_init): Add extdirs support.
3452         (jcf_path_extdirs_arg): New function.
3453         (extensions): New variable to hold extensions path entries.
3454         * jvspec.c: Remove -fextdirs= when compiling main().
3455         * lang.c (java_decode_option): Handle -fextdirs=.
3456         * jcf.h (jcf_path_extdirs_arg): Declare new function.
3457         * Make-lang.in: Compile jcf-path with version info for use in
3458         identifying the appropriate libgcj.jar.
3459
3460 2002-04-08  Tom Tromey  <tromey@redhat.com>
3461
3462         For PR libgcj/5303:
3463         * .cvsignore: Added rmic.1 and rmiregistry.1.
3464         * gcj.texi (Top): Link to new nodes.
3465         (Invoking rmic): New node.
3466         (Invoking rmiregistry): Likewise.
3467         * Make-lang.in (java.generated-manpages): Added rmic.1 and
3468         rmiregistry.1.
3469         (java.maintainer-clean): Likewise.
3470         ($(srcdir)/java/rmic.1): New target.
3471         ($(srcdir)/java/rmiregistry.1): Likewise.
3472         (java.install-man): Handle rmic.1 and rmiregistry.1.
3473
3474 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3475
3476         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3477         Add note about handling uncaught exceptions. Add an exception handler
3478         to example.
3479
3480 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3481
3482         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3483         after using it to patch CALL_EXPR.
3484
3485 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3486
3487         * gcj.texi (Invocation): Document CNI invocation API.
3488
3489 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3490
3491         * expr.c (truthvalue_conversion): Rename.  Update.
3492         (expand_compare): Update.
3493         * java-tree.h (java_truthvalue_conversion): New.
3494         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3495
3496 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3497
3498         * java-tree.h (java_mark_addressable): New.
3499         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3500         * typeck.c (mark_addressable): Rename, update.
3501
3502 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3503
3504         * expr.c (build_java_binop): Update.
3505         * java-tree.h (java_signed_type, java_unsigned_type,
3506         java_signed_or_unsigned_type): Update.
3507         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3508         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3509         * parse.y (patch_binop): Update.
3510         * typeck.c (signed_or_unsigned_type, unsigned_type,
3511         signed_type): Update.
3512
3513 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3514
3515         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3516         (java_dummy_print): Remove.
3517         (lang_print_error): Rename.  Exit early if inhibiting output.
3518         (inhibit_error_printing_function): New.
3519         (java_init): Don't set hook.
3520         (lang_init_source): Use new boolean.
3521
3522 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3523
3524         * parse.y (do_resolve_class): Fix infinite recursion.
3525
3526 2002-03-29  Tom Tromey  <tromey@redhat.com>
3527
3528         * parse.y (check_inner_circular_reference): Ignore incomplete
3529         types.
3530
3531 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3532
3533         * Make-lang.in (builtins.o): Update.
3534         * boehm.c (get_boehm_type_descriptor): Update.
3535         * builtins.c: Include langhooks.h.
3536         * decl.c (java_init_decl_processing): Update.
3537         * java-tree.h (java_type_for_mode, java_type_for_size): New.
3538         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3539         Redefine.
3540         * typeck.c (type_for_mode, type_for_size): Update.
3541
3542 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3543
3544         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3545
3546 2002-03-28  Tom Tromey  <tromey@redhat.com>
3547
3548         * except.c (expand_end_java_handler): If the handler type is NULL,
3549         use java.lang.Throwable.  Fixes PR java/5986.
3550
3551 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3552
3553         Fix for PR java/4715:
3554         * jcf-parse.c (parse_source_file_3): New function.
3555         (read_class): Call it.
3556         (java_parse_file): Likewise.
3557
3558 2002-03-28  Jan Hubicka  <jh@suse.cz>
3559
3560         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3561
3562 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3563
3564         * parse.y (resolve_package): Initialize "decl".
3565         (lookup_package_type): Remove unused function.
3566
3567 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3568
3569         Fix for PR java/5993:
3570         * parse.y (resolve_package): Return the decl if resolution was
3571         successful. Don't special case "java.lang" and "java.lang.reflect"
3572         packages. Set type_name to the merged identifier.
3573         (resolved_qualified_expression_name): Print error using "name" if
3574         resolve_package returns NULL_TREE.
3575
3576 2002-03-27  Tom Tromey  <tromey@redhat.com>
3577
3578         * expr.c (expand_invoke): Don't generate null pointer check if
3579         we're calling <init>.
3580
3581 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3582
3583         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3584         fix prototype.
3585         * java-tree.h (java_lang_expand_expr): Similarly.
3586         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3587         (java_init): Don't set hook.
3588
3589 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3590
3591         Fix for PR java/5850:
3592         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3593         context if field was not found in the current scope.
3594         * expr.c (lookup_field): Don't look in enclosing contexts.
3595
3596 2002-03-26  Tom Tromey  <tromey@redhat.com>
3597
3598         Fix for PR java/5942:
3599         * parse.y (init_src_parse): Added sanity check.
3600         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3601         elements, not 11.
3602
3603 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3604
3605         * decl.c (lang_mark_tree): Rename java_mark_tree.
3606         * java-tree.h (java_mark_tree): New.
3607         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3608
3609 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
3610
3611         * lex.c: Change java_perform_atof to take normal parameters
3612         instead of a pointer to a parameter block.  Call it directly
3613         from java_lex.
3614
3615 2002-03-22  Mark Wielaard  <mark@klomp.org>
3616
3617         Fix for PR java/5368:
3618         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3619         when printing error message.
3620
3621 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3622
3623         * decl.c (maybe_build_cleanup): Remove.
3624
3625 2002-03-22  Tom Tromey  <tromey@redhat.com>
3626
3627         Andrew Haley  <aph@cambridge.redhat.com>
3628
3629         * expr.c (build_field_ref): Don't build a check if the field is a
3630         member of `this'.
3631
3632 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
3633
3634         Fix for PR java/6026:
3635         * lex.c (java_lex): Fix parsing of consecutive floats.
3636
3637 2002-03-21  Tom Tromey  <tromey@redhat.com>
3638
3639         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3640         class.
3641
3642 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3643
3644         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3645         insert_block, getdecls, kept_level_p, global_bindings_p): New.
3646
3647 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3648
3649         * gcj.texi: @code{gcj} becomes @command{gcj}.
3650         @code{gcc} becomes @command{gcc}.
3651         GcjRaw changed to gnu.gcc.RawData.
3652
3653 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3654
3655         * decl.c (start_java_method): Use new hook.
3656         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3657         (java_init): Remove old hook.
3658
3659 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3660
3661         * builtins.c (define_builtin): Do nothing if `type' is null.
3662         Fixes PR java/5876.
3663
3664 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3665
3666         * parse.y (parser_check_super_interface): Fix error message
3667         grammar/order.
3668
3669 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3670
3671         * jcf-parse.c (get_constant): Delete unused variables.
3672
3673 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3674
3675         * java-tree.h (java_parse_file): New.
3676         * jcf-parse.c (yyparse): Rename java_parse_file.
3677         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3678
3679 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3680
3681         * parse.y (craft_constructor): Return the constructor decl.
3682         (java_expand_classes): Update comments.
3683         (lookup_method_invoke): Call fix_constructors immediately for
3684         anonymous class. Fixes PR java/5935.
3685
3686 2002-03-15  Anthony Green  <green@redhat.com>
3687
3688         * jcf-parse.c (yyparse): Don't emit class registration
3689         constructor when compiling resource files.
3690
3691 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3692
3693         * lang.c (java_tree_code_type, java_tree_code_length,
3694         tree_code_name): Delete.
3695         (tree_code_type, tree_code_length, tree_code_name): Define.
3696         (java_init): Don't try to copy into the various tree_code
3697         arrays.
3698
3699 2002-03-12  Tom Tromey  <tromey@redhat.com>
3700
3701         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3702         UTF-8, not UCS-2.  Fixes PR java/5923.
3703
3704         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3705         a call_expr wrapped in a convert.  Fixes PR java/5848.
3706
3707 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3708
3709         * jcf-write.c (write_classfile): Improve error strings.
3710
3711 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3712
3713         * lex.c: Adjust comments to GNU standards.
3714
3715 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3716
3717         Fix for PR java/5902:
3718         * lex.c (java_lex): Fix parsing of literals.
3719
3720 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3721
3722         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3723         to prevent it getting evaluated twice in the store checking case.
3724         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3725         examining OBJECT.
3726
3727 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3728
3729         * decl.c (java_init_decl_processing): Make sure class_type_node
3730         alignment is not less than 64 bits if hash synchronization is enabled.
3731
3732 2002-03-08  Per Bothner  <per@bothner.com>
3733
3734         * parse.y (java_complete_lhs):  Check if patch_assignment
3735         returned an error-mark.
3736
3737         * parse.y (try_builtin_assignconv):  Don't special-case zero.
3738
3739 2002-03-08  Per Bothner  <per@bothner.com>
3740
3741         Fix for PR java/5812.
3742         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
3743         here instead of in JSR macro.  Likewise with load_type_state call.
3744         Do the latter on if the return_pc has been verified (the jsr returns).
3745         (JSR):  Now just call build_java_jsr.
3746
3747 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
3748
3749         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3750         (java.install-common): Link native driver to
3751         JAVA_TARGET_INSTALL_NAME.
3752
3753 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
3754
3755         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3756         * builtins.c(sin_builtin): Likewise
3757         * builtins.c(sqrt_builtin): Likewise
3758
3759 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
3760
3761         * java/expr.c, java/jcf-parse.c, java/lex.c:
3762         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3763         REAL_ARITHMETIC blocks unconditional.  Delete some further
3764         #ifdef blocks predicated on REAL_ARITHMETIC.
3765
3766 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3767
3768         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3769         explicit sizeof/sizeof.
3770         * decl.c (java_init_decl_processing): Likewise.
3771         * jcf-parse.c (init_jcf_parse): Likewise.
3772         * parse.y (init_src_parse): Likewise.
3773
3774 2002-03-02  Per Bothner  <per@bothner.com>
3775
3776         Make --CLASSPATH by a synonym for --classpath and -classpath.
3777         Implement --bootclasspath.
3778         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
3779         (classpath_l):  Remove.
3780         (jcf_path_CLASSPATH_arg):  Remove.
3781         (jcf_path_bootclasspath_arg):  New function.
3782         (jcf_path_seal):  Simplify accordingly.
3783
3784         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
3785         (jcf_path_CLASSPATH):  Remove declaration.
3786         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
3787         (lang_specific_driver):  Translate -bootclasspath.
3788         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
3789         * lang.c (decode_lang_options):  Do jcf_path_init first.
3790         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
3791         * gjavah.c:  Also handle --bootclasspath.
3792         Handle --CLASSPATH as a synonum for --classpath.
3793         * jcf-dump.c: Likewise.
3794
3795         "." is not part of system path, but is the default for --classpath.
3796         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
3797         (jcf_path_seal):  Add "." if no CLASSPATH specified.
3798
3799         * gcj.texi:  Document changes.
3800
3801 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3802
3803         * expr.c (build_java_arraystore_check): Fix formatting.
3804
3805 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3806
3807         Fix for PR java/5758, java/5632:
3808         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3809         inner-class separator too.
3810         * parse.y (do_resolve_class): New local `decl_result.'
3811         Progressively build a name for what can have been loaded.
3812
3813 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3814
3815         * expr.c (java_array_data_offset): Removed function.
3816         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3817         (build_java_array_length_access): Obtain "length" value using a
3818         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3819         (build_java_arrayaccess): Correct comment. Access "data" using a
3820         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3821         (build_java_arraystore_check): New function.
3822         (expand_java_arraystore): Use build_java_arraystore_check.
3823         * parse.y (patch_assignment): Simplify code to insert a store check
3824         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3825         * check-init.c (check_init): Update to reflect that an array length
3826         access is now a COMPONENT_REF.
3827         * gcj.texi (Code Generation): Improve documentation of
3828         -fno-bounds-check. Add documentation for -fno-store-check.
3829         * java-tree.h (flag_store_check): Declare.
3830         (build_java_arraystore_check): Declare.
3831         * lang.c (flag_store_check): Initialize to 1.
3832         (lang_f_options): Add store-check option.
3833         * jvspec.c: Don't pass store-check option to jvgenmain.
3834         * lang-options.h: Add help string for -fno-store-check.
3835
3836 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3837
3838         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3839         * java-tree.h (java_dup_lang_specific_decl): New.
3840         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3841
3842 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3843
3844         * builtins.c, decl.c: Delete traditional-mode-related code
3845         copied from the C front end but not used, or used only to
3846         permit the compiler to link.
3847
3848 2002-02-22  Tom Tromey  <tromey@redhat.com>
3849
3850         Fix for PR java/2369:
3851         * jvspec.c (verify_class_name): New function.
3852         (lang_specific_driver): Call it.
3853         (JAVA_START_CHAR_P): New macro.
3854         (JAVA_PART_CHAR_P): Likewise.
3855
3856 2002-02-22  Per Bothner  <per@bothner.com>
3857
3858         * class.c:  Change vtable to be more compatible with g++ v3 abi.
3859         (get_dispatch_table):  Prepend offset-to-top (always 0) and
3860         type_info pointer (currently unimplemented hence NULL) to vtable.
3861         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3862         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
3863         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3864         (build_dtable_decl):  Add declarations for new fields.
3865
3866 2002-02-20  Per Bothner  <per@bothner.com>
3867
3868         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3869         to finit$ (otherwise generate_bytecode_insns drops it). However, we
3870         don't need to set it on the COMPOUND_EXPR - the caller does that.
3871
3872 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3873
3874         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3875         `--CLASSPATH' becomes `--classpath.'
3876         * gjavah.c: Likewise.
3877         * jcf-dump.c: Likewise.
3878         * lang-options.h: Likewise.
3879         * lang.c: Likewise.
3880         * jcf-path.c: Updated comment.
3881         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3882         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3883         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3884         (jcf_path_CLASSPATH_arg): Ditto.
3885         (classpath_u): Updated leading comment.
3886
3887 2002-02-20  Per Bothner  <per@bothner.com>
3888
3889         * builtins.c (check_for_builtin):  New function.
3890         (build_call_or_builtin):  Remove.
3891         * java-tree.h:  Update accordingly.
3892         * expr.c (expand_invoke):  Use build + check_for_builtin instead
3893         of build_call_or_builtin.
3894         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
3895         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3896         flag (which had caused jcf-write to incorrectly emit invokevirtual).
3897
3898 2002-02-17  Tom Tromey  <tromey@redhat.com>
3899
3900         * java-tree.h (TYPE_STRICTFP): New macro.
3901         (struct lang_type) [strictfp]: New field.
3902         (CLASS_STRICTFP): New macro.
3903         (METHOD_STRICTFP): New macro.
3904         (struct lang_decl) [strictfp]: New field.
3905         * parse.y (method_header): Disallow strictfp constructor or
3906         abstract method.
3907         (STRICT_TK): Move before MODIFIER_TK.
3908         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3909         (METHOD_MODIFIERS): Likewise.
3910         (INTERFACE_MODIFIERS): Likewise.
3911         * jcf-write.c (get_access_flags): Likewise.
3912         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3913         (add_method_1): Likewise.
3914         (get_access_flags_from_decl): Likewise.
3915         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
3916         recognize strictfp flag.
3917         * jcf.h (ACC_STRICT): New define.
3918
3919 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
3920
3921         * class.c(build_utf8_ref): Move declaration of decl_size
3922
3923 2002-02-07  Tom Tromey  <tromey@redhat.com>
3924
3925         * gcj.texi (Input Options): --CLASSPATH does not suppress system
3926         path.
3927
3928 2002-02-04  Anthony Green  <green@redhat.com>
3929
3930         * class.c (build_utf8_ref): Put UTF-8 constants into merged
3931         sections if available.
3932
3933 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3934
3935         * parse.y (java_expand_classes): Fix typo in static field loop.
3936
3937 2002-02-02  Richard Henderson  <rth@redhat.com>
3938
3939         * class.c (add_field): Mark static fields external.
3940         (build_class_ref): Remove redundant set.
3941         * parse.y (java_expand_classes): Mark static fields of classes
3942         to be compiled as local.
3943         * jcf-parse.c (parse_class_file): Likewise.
3944
3945 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3946
3947         * gcj.texi (About CNI): New node.
3948
3949 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3950
3951         PR java/5080
3952         * jcf-parse.c : Check for HAVE_LOCALE_H before using
3953         setlocale() with LC_CTYPE as a parameter.
3954         * jv-scan.c: Same.
3955
3956 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
3957
3958         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3959         Follow GNU Coding Standards for --version.
3960
3961 2002-01-28  Tom Tromey  <tromey@redhat.com>
3962
3963         * expr.c (build_jni_stub): Ensure storage for `meth' is
3964         generated.
3965         * parse.y (java_complete_expand_methods): Set
3966         current_function_decl before building JNI stub.
3967
3968 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3969
3970         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3971         BUILT_IN_SQRTF.
3972
3973 2002-01-22  Tom Tromey  <tromey@redhat.com>
3974
3975         * decl.c (java_init_decl_processing): Use add_predefined_file.
3976         Predefine RawData.java.
3977         (predef_filenames): Removed.
3978         (java_init_decl_processing): Don't register predef_filenames.
3979         * jcf-parse.c (add_predefined_file): New function.
3980         (predefined_filename_p): Rewrote.
3981         (predefined_filename_p): No longer static.
3982         * decl.c (java_init_decl_processing): Call initialize_builtins.
3983         * Make-lang.in (JAVA_OBJS): Added builtins.o.
3984         (java/builtins.o): New target.
3985         * builtins.c: New file.
3986         * parse.y (patch_invoke): Use build_call_or_builtin.
3987         * java-tree.h (build_call_or_builtin): Declare.
3988         (initialize_builtins): Declare.
3989         (java_set_exception_lang_code): Removed unused declaration.
3990         (PREDEF_FILENAMES_SIZE): Removed.
3991         (java_tree_index): Added JTI_PREDEF_FILENAMES.
3992         (predef_filenames): New define.
3993         (add_predefined_file): Declare.
3994         (predefined_filename_p): Declare.
3995         * expr.c (expand_invoke): Use build_call_or_builtin.
3996
3997 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3998
3999         * parse.y (patch_switch_statement): Fix format specifier.
4000
4001 2002-01-16  Tom Tromey  <tromey@redhat.com>
4002
4003         More for PR java/5365:
4004         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
4005         default.
4006         (process_file): Generate include for
4007         java.lang.UnsupportedOperationExceptions.
4008
4009 2002-01-15  Andreas Jaeger  <aj@suse.de>
4010
4011         * .cvsignore: Add man pages.
4012
4013 2002-01-15  Tom Tromey  <tromey@redhat.com>
4014
4015         Fix for PR java/5365:
4016         * gjavah.c (process_file): Turn class name into a file name.
4017
4018 2002-01-14  Matthias Klose  <doko@debian.org>
4019
4020         * gcj.texi: Fix whitespace and formatting errors in the
4021         synopsis of the man pages. Update copyright.
4022
4023 2002-01-14  Tom Tromey  <tromey@redhat.com>
4024
4025         For PR libgcj/5303:
4026         * Make-lang.in (java.install-man): Handle jv-convert man page.
4027         (java.generated-manpages): Added jv-convert.1.
4028         (java.uninstall): Remove jv-convert.1.
4029         (java.maintainer-clean): Likewise.
4030         ($(srcdir)/java/jv-convert.1): New target.
4031         * gcj.texi (Top): Link to jv-convert node.
4032         (Individual utilities): Likewise.
4033         (Invoking jv-convert): New node.
4034
4035 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
4036             Martin Kahlert  <martin.kahlert@infineon.com>
4037
4038         * jcf-parse.c (get_constant): Don't swap lo/hi for big
4039         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
4040
4041 2002-01-03  Graham Stott  <grahams@redhat.com>
4042
4043         * class.c (compile_resource_file): Update copyright date.
4044         Constify filename parameter.
4045         (java-tree.h): Update copyright date.
4046         (compile_resource_file): Constify filename parameter.
4047
4048 2002-01-03  Graham Stott  <grahams@redhat.com>
4049
4050         * gcc/jcf-parse.c: Update copyright date.
4051         (yyparse): Constify resource_filename.
4052
4053 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4054
4055         * parse.y (src_parse_roots): Don't needlessly zero init.
4056
4057 2001-12-31  Tom Tromey  <tromey@redhat.com>
4058
4059         * parse.y (dump_java_tree): New function.
4060         (source_end_java_method): Call it.
4061         (end_class_declaration): Likewise.
4062         * lang.c (java_decode_option): Call dump_switch_p.
4063
4064 2001-12-28  Tom Tromey  <tromey@redhat.com>
4065
4066         * gen-table.pl: Don't process characters after \uffff.  Added
4067         comment pointing to input file.
4068
4069 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4070
4071         * gen-table.pl: Const-ify output.  Document the location of a
4072         suitable unicode input file.
4073
4074         * chartables.h: Regenerate.
4075
4076 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4077
4078         * chartables.h: Const-ify.
4079         * gjavah.c (options): Likewise.
4080         * jcf-dump.c (options): Likewise.
4081         * jv-scan.c (options): Likewise.
4082         * lex.c (java_start_char_p, java_part_char_p): Likewise.
4083         * parse.y (binop_lookup): Likewise.
4084
4085 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4086
4087         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
4088         the static arrays that are output.
4089         * jvspec.c (jvgenmain_spec): Make static.
4090         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
4091         * keyword.h: Regenerate.
4092         * lang.c (string_option, process_option_with_no, lang_f_options,
4093         lang_W_options): Const-ify.
4094         * lex.c (java_lex): Likewise.
4095
4096 2001-12-21  Richard Henderson  <rth@redhat.com>
4097
4098         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
4099         (get_boehm_type_descriptor): ... here.  Arrange for the
4100         TREE_TYPE to get set properly.
4101
4102 2001-12-21  Richard Henderson  <rth@redhat.com>
4103
4104         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
4105         only if the target requires collect2.
4106
4107         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
4108
4109 2001-12-20  Tom Tromey  <tromey@redhat.com>
4110
4111         For PR java/4509:
4112         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
4113         CAN_COMPLETE_NORMALLY for the node.
4114         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
4115         generate code for second branch if first branch can't complete
4116         normally.
4117         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
4118         the loop head if the loop body can't complete normally.
4119
4120 2001-12-20  Tom Tromey  <tromey@redhat.com>
4121
4122         For PR java/4766:
4123         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
4124         case where `finally' clause can't complete normally.
4125
4126 2001-12-20  Tom Tromey  <tromey@redhat.com>
4127
4128         Fixes PR java/5057:
4129         * parse.y (analyze_clinit_body): Added this_class parameter.
4130         Check for more cases where we must keep <clinit>.
4131         (maybe_yank_clinit): Cleaned up flow control.
4132
4133 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4134
4135         * decl.c (java_init_decl_processing): Don't initialize
4136         finit_leg_identifier_node.
4137         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
4138         (finit_leg_identifier_node): Remove.
4139         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
4140
4141 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4142
4143         * mangle.c (mangle_member_name): Don't special-case for
4144         NO_DOLLAR_IN_LABEL.
4145         * mangle_name.c (unicode_mangling_length): Likewise.
4146         (append_unicode_mangled_name): Likewise.
4147         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
4148         code.
4149
4150 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4151
4152         * expr.c (build_java_array_length_access): Don't force null pointer
4153         check unless flag_check_references is set.
4154
4155 2001-12-20  Tom Tromey  <tromey@redhat.com>
4156
4157         Fix for PR java/3417:
4158         * parse.y (patch_assignment): Added special processing for
4159         `return'.
4160         (patch_return): Don't convert booleans to integers, and don't
4161         special-case `null'.
4162
4163 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4164
4165         * config-lang.in (diff_excludes): Remove.
4166
4167 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
4168
4169         * gcj.texi: Update link to GCC manual.
4170
4171 2001-12-17  Tom Tromey  <tromey@redhat.com>
4172
4173         * parse.y (link_nested_class_to_enclosing): Removed useless
4174         statement.
4175
4176 2001-12-16  Tom Tromey  <tromey@redhat.com>
4177
4178         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
4179         Fixes PR java/5088.
4180
4181 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4182
4183         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
4184         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
4185         spelling errors.
4186
4187 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4188
4189         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
4190
4191 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4192
4193         * decl.c (java_init_decl_processing): Build otable_type correctly.
4194         otable_decl is an otable_type.
4195
4196 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4197
4198         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
4199         otable_type, otable_ptr_type, method_symbol_type,
4200         method_symbols_array_type, method_symbols_array_ptr_type): New
4201         field/global tree definitions.
4202         (flag_indirect_dispatch): New flag.
4203         * decl.c (java_init_decl_processing): Initialize new otable and
4204         otable_syms type nodes and decls. Add new field "index" to
4205         method_type_node.
4206         * class.c (build_method_symbols_entry): New function.
4207         (make_method_value): Set "index" to to method's vtable index for
4208         virtual methods when indirect-dispatch is not used.
4209         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
4210         and set vtable_method_count to -1. Set otable and otable_syms field
4211         if indirect-dispatch is used and there was something to put in them.
4212         (build_method_symbols_entry): New function.
4213         (emit_offset_symbol_table): New function.
4214         * expr.c (get_offset_table_index): New function.
4215         (build_invokevirtual): Build array reference to otable at the index
4216         returned by get_offset_table_index, and use the result as the vtable
4217         offset.
4218         (build_invokeinterface): Similar.
4219         * jcf-parse.c (yyparse): If indirect-dispatch, call
4220         emit_offset_symbol_table at the end of compilation, after all classes
4221         have been generated.
4222         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
4223         * lang.c (flag_indirect_dispatch): Define.
4224         (lang_f_options): Add indirect-dispatch flag.
4225
4226 2001-12-14  Matthias Klose  <doko@debian.org>
4227
4228         * gcj.texi: Markup for man page generation. Document missing
4229         options printed by <tool> --help.
4230         Terminate description of gij's -ms option with a dot.
4231         * Make-lang.in ($(srcdir)/java/*.1): New targets.
4232         (java.generated-manpages java.install-man, java.uninstall,
4233         java-maintainer-clean) Updated.
4234
4235 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
4236
4237         * class.c (get_dispatch_table): Fix java vtable layout
4238         for TARGET_VTABLE_USES_DESCRIPTORS.
4239         * decl.c (java_init_decl_processing): Initialize
4240         alloc_no_finalizer_node, finalize_identifier_node.
4241         * expr.c (class_has_finalize_method): New function.
4242         (expand_java_NEW): Generate calls for finalizer-free allocation.
4243         (build_invokevirtual): Fix java vtable layout for
4244         TARGET_VTABLE_USES_DESCRIPTORS.
4245         * java-tree.h (enum java_tree_index): New entries:
4246         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
4247         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
4248         (class_has_finalize_method): declare.
4249         (HAS_FINALIZER_P): New macro.
4250         * parse.y (patch_invoke): Generate calls for finalizer-free
4251         allocation.
4252
4253 2001-12-12  Matthias Klose  <doko@debian.org>
4254
4255         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
4256         whitespace at end of line.
4257
4258 2001-12-11  Tom Tromey  <tromey@redhat.com>
4259
4260         * lex.c (java_init_lex): Define wfl_to_string as
4261         gnu.gcj.runtime.StringBuffer unless generating bytecode.
4262
4263 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
4264
4265         * class.c (make_method_value): Use null_pointer_node to
4266         represent empty exception table.
4267
4268 2001-12-10  Tom Tromey  <tromey@redhat.com>
4269
4270         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
4271
4272 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
4273
4274         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
4275
4276 2001-12-09  Per Bothner  <per@bothner.com>
4277
4278         * check-init.c (current_switch_has_default):  New static field.
4279         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
4280         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
4281         DEFAULT_EXPR seen, simulate a default alternative that copies state.
4282
4283 2001-12-09  Tom Tromey  <tromey@redhat.com>
4284
4285         * check-init.c (check_init): Don't allow pre- or post- increment
4286         or decrement of final variable.
4287         (final_assign_error): Minor error message rewording.
4288
4289 2001-12-08  Tom Tromey  <tromey@redhat.com>
4290
4291         * java-tree.h: Fixed typo.
4292
4293         * gjavah.c (decompile_method): Don't decompile to `return this'
4294         for static methods.
4295
4296         * gjavah.c (cxx_keywords): Re-sorted.
4297         * lex.c (cxx_keywords): Re-sorted.
4298
4299         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
4300         else.
4301
4302         * gjavah.c (print_namelet): Clear subnamelets.
4303         (HANDLE_METHOD): Set `method_printed' earlier.
4304
4305 2001-12-07  Tom Tromey  <tromey@redhat.com>
4306
4307         * lang.c (lang_f_options): Added
4308         optimize-static-class-initialization.
4309         (java_decode_option): Removed special case.
4310
4311 2001-12-07  Per Bothner  <per@bothner.com>
4312
4313         * check-init.c (check_init):  Fix typo freeing memory twice.
4314
4315 2001-12-05  Per Bothner  <per@bothner.com>
4316
4317         Restore support for static class initialization optimization.
4318         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
4319         * check-init.c (check_int):  At end of BLOCK handle initialization
4320         blocks, which used to be done in java_complete_expand_method but did
4321         not handle the case where check_for_initialization might allocate
4322         more than a word of bits.
4323         * decl.c (lang_make_tree):  The smic field is now a tree.
4324         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
4325         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
4326
4327         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
4328
4329         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4330         Change from a hash table to a list.
4331         (struct_lang_decl):  Change field 'smic' to match.
4332         * class.c (add_method_1):  Initialize
4333         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4334         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
4335         (java_expand_method_bodies): -here, since 'smic' is now a list.
4336         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
4337
4338         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
4339
4340         * class.c (java_hash_compare_tree_node):  Fix casts.
4341
4342 2001-12-04  Per Bothner  <per@bothner.com>
4343
4344         * check-init.c:   Handle definite unassignment to finals in addition
4345         to definite assignment.
4346         (loop_current_locals):  New field.
4347         (num_current_locals, int start_current_locals, num_current_words):
4348         Make static.
4349         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
4350         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4351         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
4352         (get_variable_decl, check_final_reassigned):  New functions.
4353         (check_init, check_bool_init):  Modify as needed for checking finals.
4354         (check_for_initialization):  Take extra parameter and return void.
4355         Do extra start-up logic to check final fields for assignment.
4356         * parse.y (check_static_final_variable_assignment_flag,
4357         reset_static_final_variable_assignment_flag, check_final_assignment,
4358         check_final_variable_local_assignment_flag,
4359         reset_final_variable_indirect_assignment_flag,
4360         reset_final_variable_global_assignment_flag):  Remove functions.
4361         (java_complete_expand_methods, outer_field_access_fix,
4362         patch_assignment): Remove no-longer used logic.
4363         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
4364         * parse.y (register_fields, java_complete_tree):  Update accordingly.
4365
4366         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
4367         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
4368         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
4369
4370         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
4371
4372         * java-tree.h (DECL FINAL):  New bit-field.
4373         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
4374         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
4375         (DECL_INIT_CALLS_THIS):  New macro.
4376         (struct lang_decl):  New bit-field init_calls_this.
4377         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4378         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4379         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
4380         use it for both local variables and final fields.
4381         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
4382         and local_final.
4383         (struct lang_type):  Remove hfv bit-field.
4384         (check_for_initialization):  Change to return void.
4385
4386         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
4387         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
4388         * check-init.c (final_assign_error):  New helper function.
4389         (check_final_reassigned, check_init):  Use it.
4390         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4391
4392         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
4393         bit-fields to unsigned.
4394
4395 2001-12-03  Per Bothner  <per@bothner.com>
4396
4397         * parse.y (patch_binop):  Minor constant folding.
4398
4399         * parse.y (build_current_thisn):  Shorter 'buffer'.
4400
4401 2001-12-03  Per Bothner  <per@bothner.com>
4402
4403         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
4404         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4405         * jcf-write.c (generate_bytecode_insns):  Remove support for
4406         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4407         * check-init.c (check_init):  Likewise.
4408
4409 2001-12-03  Per Bothner  <per@bothner.com>
4410
4411         * verify.c (subroutine_nesting):  New function.
4412         (verify_jvm_instructions):  Use it to fix logic for checking that
4413         we're done with the current subroutine.
4414
4415         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4416         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4417
4418 2001-12-03  Per Bothner  <per@bothner.com>
4419
4420         * jcf.h:  Fix obvious typo in comment.
4421         * typeck.c (build_null_signature):  Add comment.
4422
4423 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4424
4425         * expr.c: Remove leading capital from diagnostic messages, as
4426         per GNU coding standards.
4427         * jcf-io.c: Similarly.
4428         * jcf-parse.c: Similarly.
4429         * jv-scan.c: Similarly.
4430         * jvspec.c: Similarly.
4431         * mangle.c: Similarly.
4432
4433 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
4434             Alexandre Petit-Bianco  <apbianco@redhat.com>
4435
4436         * expr.c (build_java_arrayaccess): Call save_expr on array for
4437         correct evaluation order, modified comment, fixed indentation.
4438         * parse.y: (patch_assignment): Correctly extract the array base
4439         from the tree generate by build_java_arrayaccess, added comments.
4440         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4441         Fixes PR java/3096, PR java/3803, PR java/3965.
4442
4443 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4444
4445         * expr.c (expand_byte_code): Remove trailing periods from messages.
4446         * jcf-parse.c (load_class, jcf_parse): Similarly.
4447         * jcf-write.c (generate_classfile): Similarly.
4448         * lex.c (java_lex): Similarly.
4449
4450 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4451
4452         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4453
4454 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4455
4456         * Make-lang.in (java.generated-manpages): New dummy target.
4457
4458 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4459
4460         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4461         ASM_FINAL_SPEC.
4462         (lang_specific_pre_link): Use set_input to set input_filename.
4463         Append `main' here.
4464         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4465         (main): Fix definition.
4466         Strip `main' from classname.
4467         Fixes PR java/227.
4468
4469 2001-11-18  Roger Sayle <roger@eyesopen.com>
4470
4471         * parse.h (java_expand_switch): Remove old prototype.
4472
4473 2001-11-18  Tom Tromey  <tromey@redhat.com>
4474
4475         Fix for PR java/1401:
4476         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4477         arg0 is null.
4478         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4479         correctly.
4480
4481 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4482
4483         * lang.c (finish_parse): Rename to java_finish.
4484         (LANG_HOOKS_FINISH, java_finish): New.
4485
4486 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4487
4488         * decl.c (init_decl_processing): Rename java_init_decl_processing.
4489         * java-tree.h: New prototype.
4490         * lang.c (java_init): Update prototype.  Combine with old init_parse.
4491
4492 2001-11-13  Tom Tromey  <tromey@redhat.com>
4493
4494         * gjavah.c (method_signature): New global.
4495         (HANDLE_METHOD): Set it.
4496         (decompile_return_statement): New function.
4497         (decompile_method): Use it.
4498         (print_method_info): Removed `synth' argument.
4499
4500 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4501
4502         * java-tree.h (java_set_yydebug): New.
4503         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4504         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4505         (print_lang_decl, print_lang_type, print_lang_identifier,
4506         print_lang_statistics, lang_print_xnode): Remove.
4507
4508 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4509
4510         * jcf-parse.c (init_lex): Remove.
4511         * lang.c (language_string, lang_identify): Remove.
4512         (struct lang_hooks): Constify.
4513         (LANG_HOOKS_NAME): Override.
4514         (init_parse): Update.
4515
4516 2001-11-08  Andreas Franck  <afranck@gmx.de>
4517
4518         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4519         program_transform_name the way suggested by autoconf.
4520         (java.install-common): Also transform auxiliary program names with
4521         program_transform_name.
4522
4523 2001-11-08  Tom Tromey  <tromey@cygnus.com>
4524
4525         * parse.y (trap_overflow_corner_case): New rule.
4526         (unary_expression): Use it.
4527         * lex.c (java_init_lex): Don't set minus_seen.
4528         (yylex): Don't use minus_seen.  Communicate overflow to parser for
4529         it to handle.
4530         (error_if_numeric_overflow): New function.
4531         * parse.h (minus_seen): Removed field.
4532         (JAVA_RADIX10_FLAG): New define.
4533
4534 2001-11-07  Tom Tromey  <tromey@redhat.com>
4535
4536         Patch for PR java/1414:
4537         * parse.y (case_label_list): New global.
4538         (goal): Register case_label_list with GC.
4539         (java_complete_lhs): Save new case on case_label_list.
4540         (patch_switch_statement): Check for duplicate case labels.
4541
4542 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4543
4544         * parse.y (patch_assignment): Removed unused third argument.
4545         (java_complete_lhs): Removed unused third argument to patch_assignment.
4546
4547 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4548
4549         * lang.c: Include langhooks-def.h.
4550         * Make-lang.in: Update.
4551
4552 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
4553
4554         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4555
4556 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4557
4558         * mangle.c (find_compression_record_match): Don't match compression
4559         records for package name elements unless they occur at the start of
4560         the name. Fix for PR java/4717.
4561
4562 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4563
4564         * expr.c (expand_java_field_op): Don't special-case references to
4565         java.lang.PRIMTYPE.TYPE.
4566         (build_primtype_type_ref): Removed.
4567         * java-tree.h (build_primtype_type_ref): Remove prototype.
4568         * parse.y (maybe_build_primttype_type_ref): Removed.
4569         (complete_function_arguments): Don't special-case references to
4570         java.lang.PRIMTYPE.TYPE.
4571         (patch_assignment): Likewise.
4572         (array_constructor_check_entry): Likewise.
4573
4574 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4575
4576         * mangle.c (static tree compression_table): Fixed leading comment.
4577         * parse.h (struct parser_ctxt): Fixed field comment.
4578         * parse.y (check_pkg_class_access): New prototype, fixed leading
4579         comment, new parameter used to emit error only if passed as true.
4580         (parse_check_super): Pass extra argument to check_pkg_class_access.
4581         (do_resolve_class): Likewise.
4582         (process_imports): Likewise.
4583         (read_import_dir): Fixed indentation.
4584         (find_in_imports_on_demand): New local class_type_name. Local
4585         node_to_use deleted. while loop changed into for loop. Report
4586         multiple definition only for accessible classes. Improved error
4587         message.
4588         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4589         assigned to parameter list, fixed indentation. while loop changed
4590         into for loop, restore TREE_CHAIN on local `tem' before the next
4591         iteration.
4592
4593 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4594
4595         * lang.c (lang_get_alias_set): Deleted.
4596
4597 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4598
4599         * gjavah.c (jni_print_char): Fix thinko in last change.
4600
4601         * gjavah.c (jni_print_char, decode_signature_piece): Use
4602         safe-ctype macros and/or fold extra calls into fewer ones.
4603         * lex.c (java_read_unicode, java_lex): Likewise.
4604         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4605         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4606         * mangle_name.c (append_unicode_mangled_name,
4607         unicode_mangling_length): Likewise.
4608
4609 2001-10-17  Richard Henderson  <rth@redhat.com>
4610
4611         * Make-lang.in (java/lang.o): Depend on langhooks.h.
4612
4613 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4614
4615         * lang.c (langhooks.h): Included.
4616         (LANG_HOOKS_INIT): Redefined.
4617         (LANG_HOOKS_INIT_OPTIONS): Likewise.
4618         (LANG_HOOKS_DECODE_OPTION): Likewise.
4619         (struct lang_hooks lang_hooks): New initialization.
4620
4621 2001-10-11  Per Bothner  <per@bothner.com>
4622
4623         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
4624         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4625         The former is simpler, and jcf-write.c handles it better.
4626         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
4627         or WITH_CLEANUP_EXPR.
4628         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
4629         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4630
4631         * parse.y (patch_if_else_statement):  If the condition is constant,
4632         optimize away the test.
4633
4634 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4635
4636         * parse.y (patch_cast): Call patch_string on the first operand of
4637         the incoming node, update it if necessary. Fixes PR java/4510.
4638
4639 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4640
4641         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4642         when name qualifier matches a package name.
4643
4644 2001-10-08  Tom Tromey  <tromey@redhat.com>
4645
4646         Fix for PR java/4489:
4647         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4648         force a new label when computing `body_block'.
4649
4650 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4651
4652         * jcf-io.c (format_uint): Const-ify.
4653         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4654         * lex.c (java_get_line_col): Likewise.
4655         * parse.y (build_incdec): Likewise.
4656
4657 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4658
4659         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4660         a NULL enclosing context if appropriate. Fixes PR java/4466.
4661
4662 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4663
4664         * parse.y (patch_assignment): Use lvalue's original TYPE when
4665         building the final COMPOUND_EXPR.
4666         (try_reference_assignconv): Fixed leading comment.
4667
4668 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4669
4670         * parse.y (check_final_variable_indirect_assignment): For
4671         COMPOUND_EXPR, return only if finals were found initialized
4672         properly, if not, keep on checking.
4673         (check_final_variable_global_assignment_flag): New local
4674         error_found, set when appropriate and used to decide whether to
4675         report uninitialized finals. Fixed typo in comment.
4676
4677 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4678
4679         * decl.c (init_decl_processing): Fixed typo in predef_filenames
4680         last three initializations. Fixes PR java/4360.
4681
4682 2001-09-21  Richard Henderson  <rth@redhat.com>
4683
4684         * class.c (get_dispatch_table): Handle function descriptors.
4685         (build_dtable_decl): Likewise.
4686         * expr.c (build_invokevirtual): Likewise.
4687
4688 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4689
4690         * parse.y (patch_method_invocation): Build class initialization
4691         when static finals are used to qualify method invocation.
4692         Fixes PR java/4366.
4693
4694 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
4695
4696         * parse.h: (WFL_STRIP_BRACKET): Re-written using
4697         build_type_name_from_array_name.
4698         (STRING_STRIP_BRACKETS): New macro.
4699         * parse.y (build_type_name_from_array_name): New function.
4700         (array_creation_expression:): Accumulate []s instead of [s.
4701         (cast_expression:): Accumulate []s instead of [s after cast type
4702         name.
4703         (build_array_from_name): Local string deleted, use
4704         build_type_name_from_array_name.
4705         (build_unresolved_array_type): Accumulate []s instead of [s after
4706         type name.
4707         (register_fields): Fixed comment.
4708         (resolve_class): Local name, base deleted, new locals tname and
4709         array_dims. Use build_type_name_from_array_name. Use array_dims to
4710         build array type.
4711         (purify_type_name): Use STRING_STRIP_BRACKETS.
4712
4713 2001-09-18  Andreas Jaeger  <aj@suse.de>
4714
4715         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4716         * jv-scan.c: Likewise.
4717
4718 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4719
4720         * parse.y (patch_method_invocation): Inner class creation context
4721         check not enforced within constructors. Fixes PR java/1873.
4722
4723 2001-09-16  Tom Tromey  <tromey@redhat.com>
4724
4725         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4726         NOTE_PUSH for single-case push.  Fixes PR java/4189.
4727
4728 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4729
4730         * java-tree.h (TYPE_IMPORT_LIST): New macro.
4731         (TYPE_IMPORT_DEMAND_LIST): Likewise.
4732         (struct lang_type): New fields import_list and import_demand_list.
4733         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4734         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4735         (do_resolve_class): New local saved_enclosing_type, initialized,
4736         passed as parameter to find_in_imports and find_in_imports_on_demand.
4737         (find_in_imports): Added paramater enclosing_type, use its
4738         TYPE_IMPORT_LIST when applicable.
4739         (find_in_imports_on_demand): Added parameter enclosing_type, use
4740         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4741         declaration and initialization.
4742         (fold_constant_for_init): Switch/restore current_class to the
4743         appropriate context.
4744
4745 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
4746
4747         * verify.c (verify_jvm_instructions): Fix typo.
4748
4749 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4750
4751         * expr.c (expand_invoke): Const-ification.
4752         * parse.y (patch_method_invocation): Likewise.
4753
4754 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4755
4756         * gjavah.c (cxx_keywords): Const-ification.
4757         * keyword.gperf (java_keyword): Likewise.
4758         * lang.c (java_tree_code_name): Likewise.
4759         * lex.c (cxx_keywords): Likewise.
4760         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4761
4762 2001-09-11  Richard Henderson  <rth@redhat.com>
4763
4764         * parse.h (ctxp_for_generation): Mark extern.
4765
4766 2001-09-10  Richard Henderson  <rth@redhat.com>
4767
4768         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4769
4770 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4771
4772         * typeck.c (java_array_type_length, build_prim_array_type):
4773         Represent empty arrays by NULL index.
4774
4775 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
4776
4777         * java-tree.h (compile_resource_file): Grouped with other prototypes.
4778         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4779
4780 2001-09-06  Anthony Green  <green@redhat.com>
4781
4782         * class.c (O_BINARY): Define if necessary.
4783         (registerResource_libfunc): Declare.
4784         (init_class_processing): Initilize registerResource_libfunc.
4785         (compile_resource_file): New function.
4786         * java-tree.h (resource_name): Declare.
4787         (compile_resource_file): Declare.
4788         * jcf-parse.c (yyparse): Handle compiling java resource files.
4789         * lang.c (java_decode_option): Handle -fcompile-resource option.
4790         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4791         resource files.
4792         * gcj.texi (Code Generation): Add documentation for -R flag.
4793
4794 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
4795
4796         * jcf-write.c (generate_classfile): Issue an error in case of
4797         field/initial value mismatch.
4798         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4799         being initialized and we're generating bytecode.
4800         (java_complete_lhs): In MODIFY_EXPR section: added comments,
4801         set DECL_INITIAL properly when appropriate.
4802         Fixes PR java/4230
4803         Fixes PR java/4204
4804
4805 2001-09-01  Per Bothner  <per@bothner.com>
4806
4807         * parse.y (maybe_yank_clinit):  A field without an initializer is not
4808         relevant.  All initializers except static final and constant require
4809         <clinit>, regardless of flag_emit_class_files.
4810
4811 2001-08-31  Per Bothner  <per@bothner.com>
4812
4813         * class.c (set_constant_value):  When not emitting class files, then a
4814         String ConstantValue is a utf8const_ptr_type.
4815
4816 2001-08-30  Per Bothner  <per@bothner.com>
4817
4818         * jcf-write.c (generate_classfile):  Check that field is primitive
4819         or string before emitting ConstantValue attribute.
4820
4821 2001-08-30  Per Bothner  <per@bothner.com>
4822
4823         * parse.y (resolve_qualified_expression_name):  If creating a
4824         COMPOUND_EXPR, set it's type correctly.
4825
4826 2001-08-30  Per Bothner  <per@bothner.com>
4827
4828         * jcf-io.c (open_class):  Set filename field.
4829
4830         * jcf-parse,c (parse_class_file):  Set current_function_decl
4831         for better error message when Code attribute is missing.
4832
4833         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
4834         better diagnostics, especially for constructors.
4835
4836 2001-08-30  Per Bothner  <per@bothner.com>
4837
4838         * jcf-write.c (generate_classfile):  Don't write ConstantValue
4839         attribute if field is not final, for compatibility with jdk.
4840
4841         * jcf-write.c (generate_classfile):  Convert ConstantValue values
4842         to correct type.  Work-around for front-end bug.
4843         * class.c (set_constant_value):  Error if constant has wrong type.
4844
4845 2001-08-30  Per Bothner  <per@bothner.com>
4846
4847         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
4848         "Double" are printed at verbosity 1.
4849
4850         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
4851
4852         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
4853
4854 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4855
4856         * parse.y (patch_assignment): Don't verify final re-assignment here.
4857         (java_complete_lhs): Verify assignments to finals calling
4858         patch_assignment. Verify re-assignments to finals before calling
4859         patch_assignment.
4860
4861 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
4862
4863         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4864         Fixes PR java/1413
4865
4866 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4867
4868         * lex.c (java_lex): new local found_hex_digits. Set and then used
4869         in test to reject invalid hexadecimal numbers.
4870         * parse.y (java_complete_tree): Prevent unwanted cast with
4871         initialized floating point finals.
4872         (patch_binop): Emit a warning when detecting a division by zero,
4873         mark result not constant, don't simplify non integer division.
4874
4875 2001-08-28  Per Bothner  <per@bothner.com>
4876
4877         * jcf-write.c  (generate_bytecode_insns):  For increments and
4878         decrements just recurse to push constant.  Improvement on Mark's patch.
4879
4880 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
4881
4882         * jcf-write.c (generate_bytecode_insns): Generate an integer to
4883         real conversion for increments and decrements of reals.
4884
4885 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4886
4887         * parse.y (resolve_qualified_expression_name): Handle unresolved
4888         qualified expressions, prevent numerical qualifiers, fixed typo.
4889         Fixes PR java/4141
4890
4891 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4892
4893         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4894         don't report anything but deprecated class when marked so. Handle
4895         VAR_DECL.
4896         (patch_method_invocation): Check deprecation on methods and types.
4897         (patch_binop): code becomes an enum tree_code, added default: to
4898         switch to handle that. Detect division by zero, try to fold and
4899         return before using a subroutine.
4900
4901 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4902
4903         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4904         file smaller than 4 bytes.
4905         * parse.y (check_inner_circular_reference): New function.
4906         (check_circular_reference): Likewise.
4907         (array_initializer:): Accept {,}.
4908         (java_check_circular_reference): Rewritten using
4909         check_circular_reference and check_inner_circular_reference.
4910         (java_complete_expand_method): Unconditionally save and restore
4911         the unpurged exception list.
4912         (build_dot_class_method_invocation): Unmangle signature parameter.
4913
4914 2001-08-21  Tom Tromey  <tromey@redhat.com>
4915
4916         * decl.c (init_decl_processing): Add `throws' field to method
4917         descriptor.
4918         * class.c (make_method_value): Compute `throws' field for method.
4919
4920 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4921
4922         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4923         circularity is detected.
4924         (ctors_unchecked_throws_clause_p): Fixed leading comment.
4925
4926 2001-08-17  Richard Henderson  <rth@redhat.com>
4927
4928         * class.c (emit_register_classes): Add align parameter to
4929         call to assemble_integer.
4930
4931 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
4932
4933         * jcf-parse.c (load_class): New locals saved and class_loaded. If
4934         loading a class_or_name fails, try considering an innerclass name
4935         and load the enclosing context.
4936         * parse.y (resolve_inner_class): New function.
4937         (find_as_inner_class): Added leading comment.
4938         (register_incomplete_type): Keep the current context as enclosing
4939         context for JDEP_FIELD dependencies.
4940         (do_resolve_class): Locals new_class_decl and super initialized to
4941         NULL. Call resolve_inner_class, explore the enclosing context
4942         superclass if necessary.
4943         Fixes PR java/4007
4944
4945 2001-08-16  Tom Tromey  <tromey@redhat.com>
4946
4947         * jcf-dump.c (main): Updated for change to jcf_path_seal.
4948         * gjavah.c (main): Updated for change to jcf_path_seal.
4949         * lang.c (version_flag): New global.
4950         (java_decode_option): Recognize `-version'.
4951         (java_init): Update for change to jcf_path_seal.
4952         * jcf.h (jcf_path_seal): Added `print' argument.
4953         * jcf-path.c (jcf_path_seal): Added `print' argument.
4954
4955 2001-08-13  Zack Weinberg  <zackw@panix.com>
4956
4957         * Make-lang.in (java/decl.o): Update dependencies.
4958         * decl.c: Include libfuncs.h, don't include toplev.h.
4959
4960 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4961
4962         * decl.c (init_decl_processing): exception_type_node,
4963         class_not_found_type_node, and no_class_def_found_type_node
4964         initialized. predef_filenames augmented accordingly.
4965         instinit_identifier_node initialized.
4966         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4967         * java-tree.h (enum java_tree_index): New entries
4968         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4969         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4970         (exception_type_node): New macro.
4971         (class_not_found_type_node): Likewise.
4972         (no_class_def_found_type_node): Likewise.
4973         (instinit_identifier_node): Likewise.
4974         (PREDEF_FILENAMES_SIZE): Adjusted.
4975         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4976         (struct lang_type): Fixed typo in bitfield name.
4977         (DECL_INSTINIT_P): New macro.
4978         (ID_INSTINIT_P): Likewise.
4979         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4980         attribute.
4981         * parse.y (encapsulate_with_try_catch): New function.
4982         (generate_instinit): Likewise.
4983         (build_instinit_invocation): Likewise.
4984         (ctors_unchecked_throws_clause_p): Likewise.
4985         (add_instance_initializer): Deleted.
4986         (build_instance_initializer): Likewise.
4987         (in_instance_initializer): Likewise.
4988         (check_method_redefinition): instinit$ not to be verified.
4989         (java_complete_expand_methods): Generate instinit$, simplified code.
4990         (build_dot_class_method): Eliminated unnecessary locals. Use
4991         encapsulate_with_try_catch, removed unnecessary code.
4992         (fix_constructors): New local iii. Use build_instinit_invocation.
4993         (patch_method_invocation): Added comment.
4994         (maybe_use_access_method): Don't consider instinit$.
4995         (find_applicable_accessible_methods_list): Shorten the search for
4996         instinit$ too.
4997         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4998         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4999         (patch_throw_statement): Likewise. Fixed typo.
5000
5001 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
5002
5003         Revert:
5004         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5005         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5006         ASM_FINAL_SPEC.
5007         (lang_specific_pre_link): Use set_input to set input_filename.
5008         Append `main' here.
5009         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5010         (main): Fix definition.
5011         Strip `main' from classname.
5012         Fixes PR java/227.
5013
5014 2001-08-11  Zack Weinberg  <zackw@panix.com>
5015
5016         * lex.h: Don't include setjmp.h.  Don't define
5017         SET_FLOAT_HANDLER or prototype set_float_handler.
5018
5019 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5020
5021         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
5022         `poplevel' in the right order.
5023
5024 2001-08-09  Richard Henderson  <rth@redhat.com>
5025
5026         * Make-lang.in (class.o): Depend on TARGET_H.
5027         * class.c (emit_register_classes): Use target hooks instead of
5028         assemble_constructor and assemble_destructor.
5029
5030 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
5031
5032         * check-init.c (flags.h): Include
5033         (check_init): Don't report uninitialized static class
5034         initialization flags, don't free bit index when doing static class
5035         initialization optimization.
5036         (check_for_initialization): Return type changed to `unsigned int.'
5037         (attach_initialized_static_class): New function.
5038         * class.c (add_method_1): Create the initialized static class
5039         table if necessary.
5040         (finish_class): Always emit deferred inline methods.
5041         * decl.c (emit_init_test_initialization): Moved to expr.c
5042         (complete_start_java_method): Don't traverse
5043         DECL_FUNCTION_INIT_TEST_TABLE.
5044         (lang_mark_tree): Mark hash tables in function decls.
5045         * expr.c (emit_init_test_initialization): Moved from decl.c.
5046         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
5047         initialization flag, set DECL_CONTEXT and
5048         LOCAL_CLASS_INITIALIZATION_FLAG.
5049         (java_lang_expand_expr): Emit initialization code for static class
5050         initialized flags when entering block, if necessary.
5051         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
5052         * java-tree.h (flag_optimize_sci): New global variable declaration.
5053         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
5054         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
5055         (LOCAL_FINAL_P): Fixed typo in comment.
5056         (FINAL_VARIABLE_P): Likewise.
5057         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
5058         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
5059         (struct lang_decl): New fields `ict', `smic' and `cif.'
5060         (check_for_initialization): New returned value for global.
5061         (attach_initialized_static_class): New global function.
5062         (STATIC_CLASS_INIT_OPT_P): New macro.
5063         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
5064         * lang.c (java_decode_option): Handle
5065         `-fno-optimize-static-class-initialization'
5066         * parse.y (start_complete_expand_method): New function.
5067         (java_expand_method_bodies): Likewise.
5068         (attach_init_test_initialization_flags): Likewise.
5069         (adjust_init_test_initialization): Likewise.
5070         (emit_test_initialization): Likewise.
5071         (java_complete_expand_methods): Nullify abstract and native method
5072         bodies.
5073         (java_complete_expand_method): New locals `fbody', `block_body'
5074         and `exception_copy.' Reorganized: directly return on empty method
5075         bodies, call `start_complete_expand_method', remember definitely
5076         initialized static class in function, don't expand method bodies.
5077         (java_expand_classes): Call `java_expand_method_bodies' before
5078         `finish_class' when compiling to native.
5079         (resolve_expression_name): Use `orig' after building outer class
5080         field access.
5081         (patch_invoke): Remember static method invocations.
5082
5083 2001-08-06  Richard Henderson  <rth@redhat.com>
5084
5085         * class.c (emit_register_classes): Pass a symbol_ref and priority
5086         to assemble_constructor.
5087
5088 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
5089
5090         * java-tree.h (all_class_filename): New macro.
5091         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
5092         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
5093         newly created IDENTIFIER_NODE to `all_class_filename.'
5094
5095 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
5096
5097         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
5098         Use ggc_add_tree_root to register roots.
5099
5100 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5101
5102         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
5103         second operand calling check_init.
5104         * decl.c (complete_start_java_method): Swaped second and third
5105         arguments while creating WITH_CLEANUP_EXPR node.
5106         * jcf-write.c (generate_bytecode_insns): Use second operand
5107         instead of third when handling WITH_CLEANUP_EXPR.
5108         * parse.y (java_complete_lhs): Expand second operand of
5109         WITH_CLEANUP_EXPR nodes.
5110         (patch_synchronized_statement): Swaped second and third arguments
5111         while creating WITH_CLEANUP_EXPR node.
5112
5113 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
5114
5115         * parse.y (create_interface): Avoid cyclic inheritance report when
5116         syntax error encountered during class definition.
5117         Fixes PR java/2956
5118
5119 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5120
5121         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5122         ASM_FINAL_SPEC.
5123         (lang_specific_pre_link): Use set_input to set input_filename.
5124         Append `main' here.
5125         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5126         (main): Fix definition.
5127         Strip `main' from classname.
5128         Fixes PR java/227.
5129
5130 2001-07-18  Tom Tromey  <tromey@redhat.com>
5131
5132         For PR java/2812:
5133         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
5134         * lex.c (java_new_lexer): Use ICONV_CONST.
5135         (java_read_char): Likewise.
5136         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
5137         (jv-scan$(exeext)): Likewise.
5138
5139 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
5140
5141         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
5142         * parse.y (check_class_interface_creation): Allow `private' if the
5143         enclosing is not an interface.
5144         (create_interface): Interface tagged public if the enclosing
5145         context is an interface.
5146         (create_class): Class tagged public if the enclosing context
5147         is an interface.
5148         Fixes PR java/2959
5149
5150 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
5151
5152         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
5153         Fixes PR java/2665
5154
5155 2001-07-14  Tim Josling  <tej@melbpc.org.au>
5156
5157         * check-init.c (check_init): Remove references to EXPON_EXPR.
5158
5159 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5160
5161         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
5162         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
5163         Fixes PR java/3602
5164
5165 2001-07-13  Tom Tromey  <tromey@redhat.com>
5166
5167         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
5168         invocation.
5169
5170 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
5171
5172         * parse.y (patch_method_invocation): Don't override primary if one
5173         is already provided, but let this$<n> be built. Fixed comment.
5174
5175 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
5176
5177         * parse.y (empty_statement:): Report empty statement error only
5178         when found at class declaration level.
5179         Fixes PR java/3635
5180
5181 2001-07-12  Tom Tromey  <tromey@redhat.com>
5182
5183         * expr.c (expand_load_internal): New function.
5184         (LOAD_INTERNAL): Use it.
5185
5186 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
5187
5188         * parse.y (verify_constructor_super): Compare anonymous class ctor
5189         args with `valid_method_invocation_conversion_p.'
5190         Fixes PR java/3285
5191
5192 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
5193
5194         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
5195         `-fsyntax-only.' Fixes PR java/3248
5196
5197 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
5198
5199         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
5200
5201 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
5202
5203         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
5204         current function is static. Fixes PR java/1970
5205
5206 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5207
5208         * parse.y (patch_method_invocation): Add enclosing context to ctor
5209         calls if necessary. Fixes PR java/2953
5210
5211 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5212
5213         * parse.y (resolve_package): Abort if qualified expression member
5214         isn't right.
5215         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
5216         Fixes PR java/1391
5217
5218 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
5219
5220         * verify.c: Don't use // comments.
5221
5222 2001-07-05  Tom Tromey  <tromey@redhat.com>
5223
5224         * lang.c (flag_assume_compiled): Removed.
5225         * java-tree.h (flag_assume_compiled): Removed.
5226         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
5227         -fhash-synchronization, -fuse-divide-subroutine,
5228         -fcheck-references, -femit-class-file, -femit-class-files,
5229         -fassume-compiled.  Updated --encoding information.  Changed
5230         -foutput-class-dir to `-d'.
5231
5232 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
5233
5234         * jcf-parse.c (parse_class_file): Add lineno parameter to
5235         debug_start_source_file call.
5236
5237 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5238
5239         * gcj.texi: Use gpl.texi.
5240         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
5241         dependencies and use doc/include in search path.
5242
5243 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
5244
5245         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
5246         `this'.  If so, don't build instance initializers.
5247
5248 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
5249
5250         * parse.y (resolve_expression_name): Improved error message for
5251         inner class cases. Fixes PR java/1958
5252
5253 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
5254
5255         * lang.c: #include diagnostic.h
5256         (lang_print_error): Add a `diagnostic_context *' parameter.
5257         (java_dummy_print): Likewise.
5258         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
5259
5260 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5261
5262         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
5263         * jcf.h (typedef struct JCF): New bitfield `finished.'
5264         (JCF_FINISH): Set `finished.'
5265         (JCF_ZERO): Reset `finished.'
5266         Fixes PR java/2633
5267
5268 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5269
5270         * parse.y (class_body_declaration:): Don't install empty instance
5271         initializers.
5272         Fixes PR java/1314
5273
5274 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5275
5276         * class.c (set_super_info): Call `set_class_decl_access_flags.'
5277         (set_class_decl_access_flags): New function.
5278         * java-tree.h (set_class_decl_access_flags): New prototype.
5279         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
5280         (parse_class_file): New local `decl_max_locals.' Take wide types
5281         into account to compute DECL_MAX_LOCALS.
5282         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
5283         imports on demand.
5284
5285 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
5286
5287         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
5288
5289 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5290
5291         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
5292         * parse.y (do_resolve_class): Moved comments out to leading comment
5293         section. Removed local `start', New local `_ht' and
5294         `circularity_hash.'  Record `enclosing' in hash table and search
5295         it to detect circularity.  Use `enclosing' as an argument to
5296         `lookup_cl.' Free the hash table when done.
5297
5298 2001-06-19  Tom Tromey  <tromey@redhat.com>
5299
5300         * lex.c (java_read_char): Disallow invalid and overlong
5301         sequences.  Fixes PR java/2319.
5302
5303 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
5304
5305         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
5306
5307 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5308
5309         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
5310         arguments accordingly.
5311
5312 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5313
5314         * gcj.texi: Move contents to just after title page.
5315
5316 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
5317
5318         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
5319         builtin type.
5320         (patch_incomplete_class_ref): Build the class ref, build the class
5321         init if necessary, complete the tree.
5322         Fixes PR java/2605
5323
5324 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5325
5326         * parse.y (lookup_field_wrapper): Test `name' code.
5327         (resolve_qualified_expression_name): Test `qual_wfl' code.
5328         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5329         handle `qual_wfl' by code.
5330         (maybe_build_primttype_type_ref): Test `wfl' code.
5331
5332 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5333
5334         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5335         fdl.texi.
5336         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
5337         the dvi file in the java directory.
5338
5339 2001-05-25  Sam TH  <sam@uchicago.edu>
5340
5341         * gen-table.pl javaop.h jcf.h lex.h,
5342         parse.h: Fix header include guards.
5343
5344 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
5345
5346         * jv-scan.c (version): Update copyright year.
5347
5348 2001-05-21  Per Bothner  <per@bothner.com>
5349
5350         * jcf-parse.c (read_class):  If class is from .class or .zip file
5351         and it's already been read, don't push/pop parser context.
5352
5353 2001-05-18  Per Bothner  <per@bothner.com>
5354
5355         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
5356         command line so the jvgenmain-generated main program comes first.
5357
5358 2001-05-15  Tom Tromey  <tromey@redhat.com>
5359
5360         * class.c (build_utf8_ref): Don't generate identifier based on
5361         utf8const contents.
5362
5363 2001-05-12  Richard Henderson  <rth@redhat.com>
5364
5365         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5366         * expr.c (java_lang_expand_expr): Expand it.
5367         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5368         calling build_exception_object_ref.
5369         * parse.y (catch_clause_parameter): Likewise.
5370         (build_dot_class_method): Likewise.
5371         (try_reference_assignconv): Likewise.
5372         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5373         * jcf-write.c (generate_bytecode_insns): Likewise.
5374
5375 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5376
5377         * parse.y (build_unresolved_array_type): Set
5378         EXPR_WFL_QUALIFICATION on the newly created wfl.
5379         Fixes PR java/2538. Fixes PR java/2535.
5380
5381 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5382
5383         * parse.y (fix_constructors): Removed unnecessary assignment to
5384         local. Moved assignment to `this$<n>', fixed comments and
5385         indentation.
5386         (build_wfl_wrap): Fixed indentation.
5387         Fixes PR java/2598, java/2579 and java/2658.
5388
5389 2001-05-03  Mo DeJong  <mdejong@redhat.com>
5390
5391         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5392         check for byte swap.
5393
5394 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
5395
5396         * expr.c (build_class_init): Move MODIFY_EXPR
5397         outside of COND_EXPR.  Remove variable `call'.
5398
5399 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5400
5401         * decl.c: NULL_PTR -> NULL.
5402         * jcf-write.c: Likewise.
5403
5404 2001-05-01  Tom Tromey  <tromey@redhat.com>
5405
5406         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5407         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5408         * gcj.texi: Updated copyright text.  Include fdl.texi.
5409         (Top): Link to new node.
5410
5411 2001-05-01  Per Bothner  <per@bothner.com>
5412
5413         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
5414
5415 2001-05-01  Per Bothner  <per@bothner.com>
5416
5417         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
5418         import_list contains the name, not the TREE_PURPOSE.
5419
5420 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5421
5422         * jcf-io.c (read_zip_member): Cast to long in comparison with
5423         signed value.
5424
5425         * jvspec.c (lang_specific_driver): Initialize variables.
5426
5427         * mangle.c (find_compression_record_match): Likewise.
5428
5429         * typeck.c (build_null_signature): Provide static prototype.  Mark
5430         parameter with ATTRIBUTE_UNUSED.
5431
5432         * verify.c (verify_jvm_instructions): Initialize variable.
5433
5434 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5435
5436         * parse.y (do_resolve_class): Check for cyclic inheritance during
5437         inner class resolution.
5438
5439 2001-04-27  Per Bothner  <per@bothner.com>
5440
5441         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
5442         while iterating, since that could cause gc to lose stuff.
5443
5444 2001-04-26  Per Bothner  <per@bothner.com>
5445
5446         Fix method search wrt scope of inner classes to match JLS2.
5447         * typeck.c (build_null_signature):  New static function.
5448         (has_method):  New function.  Uses build_null_signature and lookup_do.
5449         * java-tree.h (has_method):  New declaration.
5450         * parse.y (find_applicable_accessible_methods_list):  Do not search
5451         context of inner classes here.
5452         (patch_method_invocation):  Search scope, ie. current and outer clases,
5453         for method matching simple name, to find class.
5454
5455 2001-04-26  Per Bothner  <per@bothner.com>
5456
5457         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5458         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
5459
5460         * constants.c (find_methodref_with_class_index):  New function.
5461         (find_methodref_index):  Use find_methodref_with_class_index.
5462         * java-tree.h (find_methodref_with_class_index):  New declaration.
5463         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
5464         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5465         If context changed from interface to class, don't use invokeinterface.
5466
5467 2001-04-25  Per Bothner  <per@bothner.com>
5468
5469         * verify.c (verify_jvm_instructions):  For field instructions,
5470         check that field index is valid.  For invoke instructions, check that
5471         method index is valid.
5472
5473 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
5474
5475         * config-lang.in (target_libs): Copy from $libgcj_saved.
5476
5477 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5478
5479         * decl.c (init_decl_processing): Add new class "protectionDomain"
5480         field.
5481         * class.c (make_class_data): Set initial value for "protectionDomain".
5482
5483 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5484
5485         * jvspec.c (lang_specific_driver): Fix memory allocation
5486         deficit, by using concat in lieu of xmalloc/sprintf.
5487
5488 2001-04-20  Per Bothner  <per@bothner.com>
5489
5490         Fixes to compile multiple .class files at once.
5491         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
5492         * java-tree.h (CLASS_PARSED_P):  New macro.
5493         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5494         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
5495         (read_class):  Avoid some code duplication.
5496         Don't call JCF_FINISH for a .class file - might be needed later.
5497         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
5498         rather than CLASS_LOADED_P, since latter implies class laid out.
5499         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
5500         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
5501
5502 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5503
5504         * Make-lang.in (java/boehm.o): Depend on toplev.h.
5505
5506         * boehm.c: Include toplev.h.
5507
5508 2001-04-06  Tom Tromey  <tromey@redhat.com>
5509             Alexandre Petit-Bianco  <apbianco@redhat.com>
5510
5511         Fix for PR gcj/1404 and PR gcj/2332:
5512         * parse.y (build_array_from_name): If we use the type_wfl then
5513         accumulate dimensions from the original type as well.
5514         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5515
5516 2001-04-06  Tom Tromey  <tromey@redhat.com>
5517
5518         * parse.y (analyze_clinit_body): Return true if the second operand
5519         of a METHOD_EXPR is nonzero.
5520
5521 2001-04-06  Tom Tromey  <tromey@redhat.com>
5522
5523         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5524         directory.
5525         ($(srcdir)/java/parse.c): Likewise.
5526
5527 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5528
5529         * gcj.texi: Use `which-gcj' instead of `which-g77.'
5530         (version-gcc): Initialized.
5531         (which-gcj): Likewise.
5532
5533 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5534
5535         * java-tree.h (struct lang_decl): New macro
5536         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5537         * parse.y (build_instance_initializer): New function.
5538         (add_instance_initializer): Use it.
5539         (java_fix_constructors): Set `current_class' before fix pass.
5540         (fix_constructors): Just return if already fixed. Move `super()'
5541         invocation ahead. Use `build_instance_initializer.'
5542         Fixes PR java/1315.
5543
5544 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5545
5546         * parse.y (resolve_qualified_expression_name): Pass field's
5547         DECL_CONTEXT to `not_accessible_p.'
5548         (not_accessible_p): Changed parameters order in `inherits_from_p'
5549         invocation.
5550
5551 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
5552
5553         * lang-options.h: Add flag_check_references.
5554
5555 2001-04-04  Per Bothner  <per@bothner.com>
5556
5557         * java-tree.h (CONSTANT_VALUE_P):  New macro.
5558         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
5559         * parse.y (maybe_build_class_init_for_field):  New static function.
5560         (resolve_expression_name, resolve_field_access):  Use
5561         maybe_build_class_init_for_field instead of build_class_init
5562         This does not do the init if the field is compile-time-constant.
5563         (resolve_field_access):  Simplify.
5564
5565         * parse.y (fold_constant_for_init):  Merge test into switch.
5566
5567 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
5568
5569         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5570         on gansidecl.h.
5571         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5572
5573 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
5574
5575         * expr.c (pop_type_0): Save the result of the first
5576         lang_printable_name call in a scratch buffer, so it
5577         won't be clobbered by the second call.
5578
5579 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
5580
5581         * parse-scan.y (array_type:): Rewritten.
5582         (type_declaration:): `empty_statement' replaces `SC_TK.'
5583         (class_member_declaration:): `empty statement' added.
5584         (method_body:): Simplified.
5585         (static_initializer:): Likewise.
5586         (primary_no_new_array:): Use `type_literals.'
5587         (type_literals:): New rule.
5588         (dims:): Set and update `bracket_count.'
5589         Fixes PR java/1074. Fixes PR java/2412.
5590
5591 2001-03-28  Hans Boehm  <boehm@acm.org>
5592
5593         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5594         (get_boehm_type_descriptor): Set type on returned value to be a
5595         pointer length integer.
5596
5597 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5598
5599         * expr.c (pop_type_0): Call `concat' rather than building the
5600         string manually.
5601         (pop_type): Add format specifier in call to `error'.
5602
5603         * parse.y (patch_method_invocation): Avoid casting away
5604         const-ness.
5605
5606 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
5607
5608         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5609
5610 2001-03-28  Richard Henderson  <rth@redhat.com>
5611
5612         IA-64 ABI Exception Handling:
5613         * Make-lang.in (except.o): Don't depend on eh-common.h.
5614         * check-init.c (check_init): Handle EXC_PTR_EXPR.
5615         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5616         [soft_exceptioninfo_call_node]: Remove.
5617         [eh_personality_libfunc, lang_eh_runtime_type]: New.
5618         (end_java_method): No emit_handlers.
5619         * except.c (java_set_exception_lang_code): Remove.
5620         (method_init_exceptions): Don't call it.
5621         (prepare_eh_table_type): No CATCH_ALL_TYPE.
5622         (build_exception_object_ref): New.
5623         (expand_end_java_handler): Update for except.h name changes.
5624         (emit_handlers, expand_resume_after_catch): Remove.
5625         * expr.c (java_lang_expand_expr): Update for except.h name changes.
5626         (process_jvm_instruction): Use build_exception_object_ref.
5627         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5628         (soft_exceptioninfo_call_node): Remove.
5629         (build_exception_object_ref): Declare.
5630         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5631         soft_exceptioninfo_call_node.  Move processing ...
5632         [EXC_PTR_EXPR]: ... here.
5633         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5634         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5635         (source_end_java_method): No java_set_exception_lang_code or
5636         emit_handlers.
5637         (build_dot_class_method): Use build_exception_object_ref.
5638         (try_reference_assignconv): Check EXC_PTR_EXPR not
5639         soft_exceptioninfo_call_node.
5640
5641 2001-03-28  Richard Henderson  <rth@redhat.com>
5642
5643         * java-tree.h (throw_node): Define as a single member of
5644         java_global_trees instead of a separate array.
5645         (JTI_THROW_NODE): New.
5646         * decl.c (throw_node): Don't declare.
5647         (init_decl_processing): Init a scalar throw_node.
5648         Don't register it for gc.
5649         * check-init.c (check_init): Reference scalar throw_node.
5650         * expr.c (build_java_athrow): Likewise.
5651         * jcf-write.c (generate_bytecode_insns): Likewise.
5652         * parse.h (BUILD_THROW): Likewise.
5653
5654 2001-03-28  Richard Henderson  <rth@redhat.com>
5655
5656         * decl.c (end_java_method): Do not save and restore
5657         flag_non_call_exceptions.
5658         * parse.y (source_end_java_method): Likewise.
5659         * lang.c (flag_exceptions): Don't declare.
5660         (java_init_options): Set flag_non_call_exceptions.  Set
5661         flag_exceptions here ...
5662         (java_init): ... not here.
5663
5664 2001-03-27  Richard Henderson  <rth@redhat.com>
5665
5666         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5667         exceptions_via_longjmp.
5668
5669         * lang.c (flag_new_exceptions): Don't declare it.
5670         (java_init_options): Or set it.
5671
5672 2001-03-27  Richard Henderson  <rth@redhat.com>
5673
5674         * decl.c (end_java_method): Rename asynchronous_exceptions to
5675         flag_non_call_exceptions.
5676         * parse.y (source_end_java_method): Likewise.
5677
5678 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5679
5680         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5681
5682 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5683
5684         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5685
5686 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5687
5688         * parse.y (find_as_inner_class): Follow current package
5689         indications not to mistakingly load an unrelated class.
5690
5691 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5692
5693         * constants.c (PUTN): Use memcpy, not bcopy.
5694
5695         * lex.c (java_read_char): Use memmove, not bcopy.
5696
5697         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5698
5699 2001-03-23  Per Bothner  <per@bothner.com>
5700
5701         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
5702         macro for better error pin-pointing.
5703         * java-tree.h:  Fix typo in comment.
5704
5705         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
5706         Don't include jsr/goto in exception range.
5707         Check if start and end of exception range are the same (also TRY_EXPR).
5708         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5709         However, do emit the following goto even if try_block is empty.
5710         Defer freeing exception_decl until after the finalizer, to make
5711         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
5712
5713         * parse.y (java_complete_lhs):  If the try-clause is empty, just
5714         return the finally-clause and vice versa.
5715
5716 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5717
5718         * gcj.texi (Input Options): documented the check for attribute
5719         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5720         * java-tree.h (flag_force_classes_archive_check): Declared extern.
5721         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5722         (jcf_parse): Check for the right classes archive if necessary.
5723         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5724         (jcf_parse_fields): Fixed indentation.
5725         * jcf-write.c (append_gcj_attribute): New function.
5726         (generate_classfile): Compute the attribute count, invoke
5727         `append_gcj_attribute'.
5728         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5729         turned into bit-fields. New bit-field `right_zip.'
5730         (JCF_ZERO): Set `right_zip' to zero.
5731         * lang-options.h (-fforce-classes-archive-check): Added flag.
5732         * lang.c (flag_force_classes_archive_check): New flag.
5733         (lang_f_options): New entry `force-classes-archive-check.'
5734         Fixes PR java/1213.
5735
5736 2001-02-07  Andrew Haley  <aph@redhat.com>
5737
5738         * gcj.texi (Configure-time Options): Add -fcheck-references.
5739         * expr.c (build_java_indirect_ref): New function.
5740         (java_check_reference): New function.
5741         (build_java_array_length_access): Use build_java_indirect_ref to
5742         check for null references.
5743         (build_java_arrayaccess): Likewise.
5744         (build_get_class): Likewise.
5745         (build_field_ref): Likewise.
5746         (invoke_build_dtable): Likewise.
5747         (build_invokeinterface): Likewise.
5748         * lang.c (lang_f_options): Add flag_check_references.
5749         * jvspec.c (jvgenmain_spec): Add flag_check_references.
5750         * java-tree.h (flag_check_references): New variable.
5751         * lang.c (flag_check_references): Likewise.
5752         * parse.y (patch_invoke): Use java_check_reference.
5753         (patch_assignment): Allow for extra nesting in
5754         _Jv_CheckArrayStore.
5755
5756 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
5757
5758         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5759         * lex.c (cxx_keywords): Likewise.
5760
5761 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5762
5763         * parse.y (qualify_ambiguous_name): Broaden `length'
5764         recognition. Help MODIFY_EXPR be resolved as expression names.
5765         Fixes PR java/2066. Fixes PR java/2400.
5766
5767 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
5768
5769         * gjavah.c (process_file): Mark interface definitions with
5770         "__attribute__ ((java_interface))".
5771
5772 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5773
5774         * class.c (layout_class): Fixed push_super_field's second
5775         argument. Fixes PR java/2333.
5776         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5777         too early to lay innerclasses out.
5778
5779 2001-03-20  Tom Tromey  <tromey@redhat.com>
5780             Alexandre Petit-Bianco <apbianco@redhat.com>
5781
5782         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5783         inside an array reference. Insertion of the array store check
5784         rewritten. Fixes PR java/2299.
5785
5786 2001-03-20  Tom Tromey  <tromey@redhat.com>
5787
5788         * lex.c (java_read_unicode): Only accept leading `u's.
5789
5790 2001-03-20  Tom Tromey  <tromey@redhat.com>
5791
5792         * jcf-parse.c (read_class): Initialize `class'.
5793
5794 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5795
5796         * jcf_parse.c (jcf_parse): Eliminate unused variable.
5797
5798 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5799
5800         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5801         (layout_class): Likewise.
5802         (layout_class_method): Likewise.
5803         (emit_register_classes): Likewise.
5804         * decl.c (builtin_function): Likewise.
5805         (give_name_to_locals): Likewise.
5806
5807 2001-03-19  Per Bothner  <per@bothner.com>
5808
5809         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
5810         before trying to load an inner class.
5811
5812         Fixes to process to command-line .class files in two passes.
5813         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
5814         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
5815         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
5816         * class.c (is_compiled_class):  Fix for renamed flag.
5817         * parse.y (maybe_create_class_interface_decl):  Likewise.
5818         * jcf-parse.c (yyparse):  Also set if compiling .class files.
5819         * jcf-parse.c (read_class);  Read current_class.
5820         (jcf_parse):  Make static.
5821         (load_inner_classes):  New function, with code moved from jcf_parse,
5822         because we need to inner classes after the command-line files are read.
5823         (yyparse):  Set finput to NULL when it doesn't need to be closed.
5824         Reduce use of main_jcf (basically only for archive) and
5825         use finput instead of main_jcf->read_state.
5826         Inline jcf_figure_file_type into yyparse.
5827         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5828         Defer load_inner_classes and parse_class_file to a second pass,
5829         after we've correctly mapped command-line .clas fiels to classes.
5830         (jcf_figure_file_type):  Removed.
5831         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
5832         (JCF_ZERO):  Also clear zipd field.
5833         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
5834
5835 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5836
5837         * jcf-parse.c (yyparse): Change ch from char * to char.
5838
5839 2001-03-19  Per Bothner  <per@bothner.com>
5840
5841         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
5842         Add constructed filelist-file at end, following -xjava.  Thus any .o
5843         and library files are not affected by the -xjava.  Also wrap
5844         explicit @FILE with -xjava and -xnone.
5845
5846 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
5847
5848         * class.c (build_static_field_ref): Call make_decl_rtl() after
5849         setting the DECL_EXTERNAL flag.
5850
5851 2001-03-17  Per Bothner  <per@bothner.com>
5852
5853         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
5854
5855         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
5856         when result is is needed (target is STACK_TARGET).
5857
5858         * parse.h (JDEP_SOLV):  Removed.
5859         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
5860
5861         * parse.y (incomplete_class_list): Removed.
5862         (obtain_incomplete_type): Don't use or set incomplete_class_list.
5863         It doesn't work if resolve_class changes the name of an array type
5864         that is on the list and then someone else looks for the modified name.
5865         Also, seems liable to break when compiling multiple source files at
5866         once.  So the simplest is to just remove incomplete_class_list -
5867         it is only a minor space win and it is not even clear it saves time.
5868
5869         * parse.y (resolve_class):  Remove unneeded promote_type.
5870
5871 2001-03-15  Per Bothner  <per@bothner.com>
5872
5873         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
5874         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
5875         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5876         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5877
5878         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
5879         * parse.y (java_expand_classes):  Likewise.
5880
5881         * parse.y (expand_start_java_method):  Was only called once and had a
5882         misleading name, so inline in caller java_complete_expand_method.
5883         (enter_a_block):  Likewise inline in enter_block and remove.
5884
5885         Remove junk from when gcc/java was created (by copying from C/C++).
5886         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
5887         (struct binding_level):  Remove fields keep, keep_if_subblocks,
5888         more_cleanups_ok, have_cleanups (which have never been used).
5889         (pushlevel, poplevel):  Remove related useless code.
5890
5891         * class.c (make_class_data):  The class_dtable_decl (i.e. the
5892         vtable for Class) should be external, except when compiling Class.
5893
5894         * jvspec.c (lang_specific_driver):  Fix -C handling.
5895         Check -save-temps to see if temp @FILE should be deleted.
5896         Follow-up to/fix for February 16 patch.
5897
5898         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
5899         (type_stack_dup):  Remove no-longer neded error check.
5900
5901 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
5902
5903         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5904         to 'for_pointer'. If this type is for a pointer (argument) mangling,
5905         don't surround the element with 'N..E' if the type name is
5906         unqualified.
5907
5908 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5909
5910         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5911         DECL_RTL_SET_P, etc.
5912         (make_method_value): Likewise.
5913         (get_dispatch_table): Likewise.
5914
5915         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5916
5917 2001-03-07  Tom Tromey  <tromey@redhat.com>
5918
5919         * config-lang.in (lang_requires): Define.
5920
5921 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
5922
5923         * typeck.c (convert): Check flag_unsafe_math_optimizations,
5924         not flag_fast_math.
5925
5926 2001-03-05  Per Bothner  <per@bothner.com>
5927
5928         Fix a problem where rest_of_decl_compilation applied to
5929         class_dtable_decl causes problems because it was done too early,
5930         before output file was opened.
5931         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
5932         * class.c (class_dtable_decl):  Add macro - element of class_roots.
5933         (make_class_data):  Define class_dtable_decl.
5934         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
5935
5936 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5937
5938         * java/class.c, java/decl.c, java/java-tree.h: Replace all
5939         uses of 'boolean' with 'bool'.
5940
5941 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5942
5943         * lang-specs.h: Add zero initializer for cpp_spec field to all
5944         array elements.
5945
5946 2001-02-16  Per Bothner  <per@bothner.com>
5947
5948         Handle compiling multiple input files at once, and @FILE syntax.
5949         * gcj.texi:  Updated documentation to match.
5950         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
5951         * jcf-parse.c (parse_source_file):  Split into ...
5952         (parse_source_file_1):  New function - and:
5953         (parse_source_file_2):  New function.
5954         (yyparse):  On -ffilelist-file, open and scan named file.
5955         On first pass over files, only do parse_source_file_1.
5956         A new second pass calls parse_source_file_2 for each file to compile.
5957         (init_jcf_parse):  Call init_src_parse.
5958         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
5959         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
5960         as multiple input file combined in one compilation.
5961         * lang-options.h:  Add -ffilelist-file
5962         * lang.c (flag_filelist_file):  New flag variable.
5963         (lang_f_options):  Handle -ffilelist-file.
5964         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5965         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
5966         gclass_list - use global fields of src_parse_roots instead.
5967         * parse.y (src_parse_roots):  New array.
5968         (incomplete_class_list, gclass_list):  New macros.
5969         (push_parser_context, java_pop_parser_context,
5970         java_parser_context_resume):  Don't fiddle with deleted fields.
5971         (various):  Use incomplete_class gclass_list and global macros
5972         instead of parse_ctxt fields - the lists are global.
5973         (init_src_parse):  New function.
5974
5975 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5976
5977         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5978
5979 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5980
5981         * parse.y (check_inner_class_access): Moved declaration of local
5982         `enclosing_decl_type' to the right location.
5983
5984 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
5985
5986         * parse.y (parser_check_super_interface): Don't call
5987         check_pkg_class_access for an inner interface.
5988         (parser_check_super): Don't call check_pkg_class_access for inner
5989         class.
5990         (do_resolve_class): Simplify enclosing type loop. Don't call
5991         check_pkg_class_access if CL and DECL are not set.
5992         (find_in_imports_on_demand): Set DECL if class_type needed to be
5993         loaded. Don't call check_pkg_class_access for an inner class.
5994         (check_inner_class_access): Rewritten to implement member access
5995         rules as per spec 6.6.1.
5996         (check_pkg_class_access): Handle the empty package correctly.
5997         (in_same_package): New function. Determine if two classes are in the
5998         same package.
5999
6000 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
6001
6002         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
6003         method into array types.
6004         * parse.y (patch_method_invocation): Bypass access check on clone call
6005         to array instance.
6006
6007 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
6008
6009         * expr.c (build_instanceof): Check for arrays when trying fold to
6010         false.
6011
6012 2001-02-15  Jim Meyering  <meyering@lucent.com>
6013
6014         * Make-lang.in (java.install-common): Depend on `installdirs'.
6015         (java.install-info): Likewise.
6016
6017 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
6018
6019         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
6020
6021 2001-02-14  Tom Tromey  <tromey@redhat.com>
6022             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6023
6024         Fix for PR java/1261.
6025         * typeck.c (build_java_array_type): Add public `clone' method to
6026         arrays.
6027         * parse.y (resolve_qualified_expression_name): Use current_class
6028         when checking for inaccessibility.
6029         (patch_method_invocation): Fixed error message when accessibility
6030         denied.  Added `from_super' argument.
6031
6032 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
6033
6034         * parse.y (resolve_class): Don't build a fake decl. Use the one
6035         already built.
6036         * typeck.c (build_java_array_type): Build and assign decl to array
6037         type.
6038
6039 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
6040
6041         * parse.y (not_accessible_p): Changed leading comment. Added extra
6042         `where' argument. Use it to enforce protected access rules.
6043         (resolve_qualified_expression_name): Added extra argument to
6044         not_accessible_p.
6045         (patch_method_invocation): Use argument `primary' to provide
6046         not_accessible_p with an extra argument.
6047         (lookup_method_invoke): Added extra argument to not_accessible_p.
6048         (search_applicable_method_list): Likewise.
6049
6050 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6051
6052         * parse.y (resolve_qualified_expression_name): Try to resolve as
6053         an inner class access only if `decl' is a TYPE_DECL.
6054
6055 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6056
6057         * decl.c (classdollar_identifier_node): Initialize.
6058         * java-tree.h (enum java_tree_index): New entry
6059         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
6060         (classdollar_identifier_node): New macro.
6061         (ID_CLASSDOLLAR_P): Likewise.
6062         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
6063         (build_dot_class_method_invocation): Likewise.
6064         (find_applicable_accessible_methods_list): `class$' can't be
6065         inherited.
6066
6067 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
6068
6069         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
6070
6071 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6072
6073         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
6074         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
6075         gone.
6076
6077 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6078
6079         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
6080         outside of the `__U' sequence too.
6081         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
6082         sequence too.
6083
6084 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6085
6086         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
6087
6088 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6089
6090         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
6091         (JVGENMAIN_OBJS): Likewise.
6092         * java-tree.h (append_gpp_mangled_name): New prototype.
6093         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
6094         Removed cast calling `gcc_add_root.'
6095         * jvgenmain.c (mangle_obstack): New global, initialized.
6096         (main): Use it.
6097         (do_mangle_class): Constify local `ptr.'
6098         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
6099         append_gpp_mangle_name and update `count' if necessary.
6100         Use `mangle_obstack.'
6101         * mangle.c (append_unicode_mangled_name): Removed.
6102         (append_gpp_mangled_name): Likewise.
6103         (unicode_mangling_length): Likewise.
6104         (mangle_member_name): Return type set to `void.'
6105         (mangle_field_decl): Don't append `U' in escaped names.
6106         (mangle_method_decl): Likewise.
6107         (mangle_member_name): Just use `append_gpp_mangled_name.'
6108         * mangle_name.c: New file.
6109
6110 2001-02-07  Per Bothner  <per@bothner.com>
6111
6112         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
6113
6114         * check-init.c (check_init):  Don't call done_alternative after
6115         processing loop code, as a LOOP_EXPR never terminates normally.
6116
6117 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6118
6119         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
6120
6121 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6122
6123         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
6124         DECLs.
6125
6126 2001-02-06  Tom Tromey  <tromey@redhat.com>
6127
6128         * lex.c (java_new_lexer): Longer error message.
6129
6130 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
6131             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6132
6133         * typeck.c (build_prim_array_type): Added leading comment.
6134         (build_java_array_type): Moved locals out of
6135         block. Always create the `data' field, fixed alignment to match
6136         C++.
6137
6138 2001-02-04  Tom Tromey  <tromey@redhat.com>
6139
6140         * expr.c (java_lang_expand_expr): Don't bother recomputing
6141         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
6142         Fixes PR java/1866.
6143
6144 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6145
6146         * parse.y (process_imports): Save the original name of the import
6147         for better error report.
6148
6149 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
6150
6151         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
6152         of macros used when compiling jvspec.c.
6153         * jvspec.c (lang_specific_driver): Link with the shared
6154         libgcc by default.
6155
6156 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6157
6158         * check-init.c (check_init): Call internal_error instead of fatal.
6159         * expr.c (java_lang_expand_expr): Likewise.
6160         * jcf-parse.c (get_constant): Likewise.
6161         * mangle.c (java_mangle_decl): Likewise.
6162         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
6163         (operator_string): Likewise.
6164         * check-init.c (check_init): Call abort instead of fatal.
6165         * class.c (build_class_ref): Likewise.
6166         * constants.c (write_constant_pool): Likewise.
6167         * decl.c (start_java_method): Likewise.
6168         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
6169         (java_stack_dup, encode_newarray_type): Likewise.
6170         (build_java_array_length_access): Likewise.
6171         (build_java_check_indexed_type, expand_java_pushc): Likewise.
6172         (build_java_soft_divmod, build_invokeinterface): Likewise.
6173         * java-tree.h (INNER_CLASS_P): Likewise.
6174         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
6175         (give_name_to_class, get_class_constant): Likewise.
6176         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
6177         (find_constant_index, generate_bytecode_conditional): Likewise.
6178         (generate_bytecode_insns, perform_relocations): Likewise.
6179         * lex.c (java_unget_unicode, java_lex): Likewise.
6180         * mangle.c (mangle_type, mangle_record_type): Likewise.
6181         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
6182         (finish_mangling): Likewise.
6183         * parse.h (MARK_FINAL_PARMS): Likewise.
6184         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
6185         (obtain_incomplete_type, java_complete_class): Likewise.
6186         (java_check_regular_methods, java_complete_expand_method): Likewise.
6187         (cut_identifier_in_qualified, check_deprecation): Likewise.
6188         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
6189         (java_complete_lhs, lookup_name_in_blocks): Likewise.
6190         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
6191         * typeck.c (set_local_type, parse_signature_type): Likewise.
6192         (parse_signature_string, build_java_signature): Likewise;
6193         (set_java_signature): Likewise.
6194         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
6195         * class.c (add_method): Call fatal_error instead of fatal.
6196         (build_static_field_ref): Likewise.
6197         * expr.c (build_known_method_ref, expand_invoke): Likewise.
6198         * jcf-parse.c (get_constant, jcf_parse): Likewise.
6199         * lex.c (java_new_new_lexer): Likewise.
6200         * jv-scan.c (main): Likewise.
6201         (fatal_error): Renamed from fatal.
6202         * jcf-parse.c (yyparse): Call fatal_io_error instead of
6203         pfatal_with_name.
6204         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
6205         (yyparse): Likewise.
6206         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
6207         * lex.c (java_get_line_col): Likewise.
6208         * jcf-parse.c (load_class): Make errors non-fatal.
6209         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
6210
6211 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
6212
6213         * jvgenmain.c (class_mangling_suffix): Remove unused string.
6214         (error): Remove unused function.
6215         (main): Don't use "__attribute__ alias" on generated class symbol.
6216
6217 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6218
6219         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
6220         argument.
6221         * parse.y (finish_method_declaration): Code accounting for WFLed
6222         method DECL_NAMEs deleted.
6223         (check_abstract_method_definitions): Likewise.
6224         (resolve_type_during_patch): Layout resolved type.
6225         * typeck.c (lookup_do): Removed unused local.
6226
6227 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
6228
6229         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
6230         * decl.c (init_decl_processing): Use integer_minus_one_node, not
6231         integer_negative_one_node.
6232         * expr.c (build_java_binop): Likewise.
6233
6234 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
6235
6236         * zextract.c (read_zip_archive): Read file_offset before writing
6237         zipd and consequently clobbering the header contents.
6238
6239 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6240
6241         * Make-lang.in: Remove all dependencies on defaults.h.
6242         * decl.c: Don't include defaults.h.
6243         * expr.c: Likewise.
6244         * parse.y: Likewise.
6245
6246 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6247
6248         * ChangeLog (2001-01-21): Fixed typo.
6249         * class.c (layout_class_method): Code accounting for WFLed
6250         method DECL_NAMEs deleted.
6251         * constant.c (find_methodref_index): Likewise.
6252         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
6253         * java-tree.h (DECL_FUNCTION_WFL): New macro.
6254         (struct lang_decl): New field `wfl'.
6255         (java_get_real_method_name): Prototype deleted.
6256         * mangle.c (mangle_method_decl): Code accounting for WFLed
6257         method DECL_NAMEs deleted.
6258         * parse.h (GET_METHOD_NAME): Macro deleted.
6259         * parse.y (reset_method_name): Deleted.
6260         (method_header): Set DECL_FUNCTION_WFL.
6261         (check_abstract_method_header): Code accounting for WFLed method
6262         DECL_NAMEs deleted.
6263         (java_get_real_method_name): Deleted.
6264         (check_method_redefinition): Code accounting for WFLed method
6265         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
6266         (java_check_regular_methods): Likewise.
6267         (java_check_abstract_methods): Likewise.
6268         (java_expand_classes): Don't call `reset_method_name.'
6269         (search_applicable_method_list): Use DECL_NAMEs instead of
6270         GET_METHOD_NAME.
6271         * typeck.c (lookup_do): Code accounting for WFLed method
6272         DECL_NAMEs deleted.
6273
6274 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
6275
6276         * lex.c (java_read_char): Check for EOF from getc first.
6277
6278 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6279
6280         * class.c (layout_class): Don't lay the superclass out if it's
6281         already being laid out.
6282         * jcf-parse.c (handle_innerclass_attribute): New function.
6283         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
6284         handle_innerclasses_attribute.
6285         (jcf_parse): Don't load an innerclasses if it's already being
6286         laid out.
6287         * jcf-write.c (append_innerclass_attribute_entry): Static
6288         `anonymous_name' and its initialization deleted. `ocii' and `ini'
6289         to be zero for anonymous classes.
6290
6291 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6292
6293         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
6294         necessary.
6295         * jcf-parse.c (set_source_filename): Use
6296         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
6297
6298 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6299
6300         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
6301         gets a unique asm name.
6302
6303 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6304
6305         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
6306         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6307         if necessary.
6308         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
6309         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
6310         * parse.y (lookup_package_type_and_set_next): Deleted.
6311         (resolve_package): Removed unnecessary code.
6312         (find_applicable_accessible_methods_list): `finit$' can't be
6313         inherited.
6314         * verify.c (pop_argument_types): Added missing prototype.
6315
6316 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
6317
6318         * config-lang.in: Disable java by default.
6319
6320 2001-01-23  Tom Tromey  <tromey@redhat.com>
6321
6322         * gcj.texi (Copying): New node.
6323         Added copyright information.
6324
6325 2001-01-21  Per Bothner  <per@bothner.com>
6326
6327         Various fixes to allow compiling a compressed .jar/.zip archive.
6328         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
6329         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
6330         (struct ZipDirectory):  New field zipf points to owning ZipFile.
6331         * jcf.h (struct ZipDirectory):  Add forward declaration.
6332         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
6333         Remove seen_in_zip and zip_offset fields.
6334         (JCF_SEEN_IN_ZIP):  New macro.
6335         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
6336         * jcf-io.c:  Change all ZipFileCache to ZipFile.
6337         (read_zip_member):  New function.
6338         (open_in_zip):  Call read_zip_member.
6339         * jcf-parse.c (find_in_current_zip):  Remove function.
6340         (read_class):  Merge in find_in_current_zip functionality.
6341         Call read_zip_member if needed.
6342         (parse_zip_file_entries):  Use read_zip_member.
6343         (process_zip_dir):  Update for removed and added JCF fields.
6344         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
6345
6346 2001-01-21  Per Bothner  <per@bothner.com>
6347
6348         Minor optimization of static ggc roots.
6349         * jcf-parse.c (parse_roots):  New static field.
6350         (current_field, current_method, current_file_list):  Replace by macros
6351         naming fields of parse_roots.
6352         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
6353         * class.c (class_roots):  New static field.
6354         (registered_class, fields_ident, info_ident, class_list):
6355         New macros naming fields of parse_roots.
6356         (build_static_field_ref):  Don't register roots here.
6357         (layout_class):  Static field list replaced by macro class_list.
6358         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
6359         Initialize fields_ident and info_ident here.
6360
6361 2001-01-21  Per Bothner  <per@bothner.com>
6362
6363         * jcf-parse.c (ggc_mark_jcf):  New function.
6364         (init_jcf_parse):  Register current_jcf as ggc root.
6365
6366 2001-01-21  Per Bothner  <per@bothner.com>
6367
6368         * lang.c (put_decl_node):  Print method's name.
6369
6370 2001-01-21  Per Bothner  <per@bothner.com>
6371
6372         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
6373         (verify_jvm_instructions):  Use it, for better error messages on loads.
6374
6375 2001-01-21  Per Bothner  <per@bothner.com>
6376
6377         * verify.c (merge_type_state):  Still may have to merge even if
6378         LABEL_VERIFIED (label).
6379
6380 2001-01-21  Per Bothner  <per@bothner.com>
6381
6382         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
6383         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6384
6385 2001-01-19  Per Bothner  <per@bothner.com>
6386
6387         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
6388         if expeting an interface type.  Refines Tom's change of 2000-09-12.
6389
6390 2001-01-18  Per Bothner  <per@bothner.com>
6391
6392         * gcj.texi (Input Options): Mention .java files.
6393
6394 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6395
6396         * lang-options.h (-Wunsupported-jdk11): Removed.
6397         * lang.c (flag_not_overriding): Deleted.
6398         (flag_static_local_jdk1_1): Likewise.
6399         (lang_W_options): Removed "unsupported-jdk11" entry.
6400         * parse.y (java_check_methods): Removed dead code.
6401
6402 2001-01-17  Tom Tromey  <tromey@redhat.com>
6403
6404         Changes suggested by Per Bothner:
6405         * gcj.texi (Input Options): Don't mention input files.
6406         (Code Generation): Updated --main information.
6407         (Invoking jcf-dump): Mention that --javap is incomplete.
6408         From Alexandre Petit-Bianco:
6409         (Warnings): Don't mention -Wunsupported-jdk11.
6410         My stuff:
6411         (Compatibility): Mention JDK 1.2-ness of libraries.
6412         (Resources): Mention resources used when writing gcj.
6413
6414 2001-01-17  Tom Tromey  <tromey@redhat.com>
6415
6416         * gcj.texi: New file.
6417         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6418         (java.info): Depend on gcj.info.
6419         (java/gcj.dvi): New target.
6420         (java.dvi): Depend on gcj.dvi.
6421         (java.install-info): Wrote.
6422
6423 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
6424
6425         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6426         having called make_decl_rtl.
6427
6428 2001-01-14  Per Bothner  <per@bothner.com>
6429
6430         Various patches to emit better messages on verification errors.
6431         * expr.c (push_type_0):  Return error indication on stack overflow,
6432         instead of callinfg fatal.
6433         (push_type):  Now just call push_type_0 (nd fatal on overflow).
6434         (pop_type_0):  Return detailed error message (in a char** argument).
6435         (pop_type):  If pop_type_0 fails, print error message.
6436         (pop_argument_types):  Moved to verify.c.
6437         * verify.c (pop_argument_types):  Moved from expr.c.
6438         Return a (possible) error message, rather than void.
6439         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
6440         (verify_jvm_instruction):  Use new macros, improving error messages.
6441         For case OPCODE_astore use object_ptr_type_node.
6442         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
6443         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
6444
6445         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6446         constant, return body without wrapper.  (Improves constant folding.)
6447         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
6448
6449 2001-01-13  Per Bothner  <per@bothner.com>
6450
6451         * expr.c (expand_java_field_op):  Assigning to a final field outside
6452         an initializer does not violate JVM spec, so should be warning, not
6453         error.  (Sun's verifier does not complain - though MicroSoft's does.)
6454
6455 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
6456
6457         * gjavah.c (version), jcf-dump.c (version): Update copyright year
6458         to 2001.
6459
6460 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
6461
6462         * parse.y (resolve_expression_name): Permit instance variables from
6463         enclosing context in super constructor call.
6464         (resolve_qualified_expression_name): Permit enclosing class's qualified
6465         "this" in super constructor call.
6466
6467 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6468
6469         * class.c (build_utf8_ref): Remove last argument in call to
6470         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6471         (build_class_ref): Likewise.
6472         (build_static_field_ref): Likewise.
6473         (get_dispatch_table): Likewise.
6474         (layout_class_method): Likewise.
6475         (emit_register_classes): Likewise.
6476         * constants.c (build_constant_data_ref): Likewise.
6477         * decl.c (builtin_function): Likewise.
6478         (create_primitive_vtable): Likewise.
6479         * expr.c (build_known_method_def): Likewise.
6480         (build_jni_stub): Likewise.
6481         (java_lang_expand_expr): Likewise.
6482
6483 2001-01-10  Tom Tromey  <tromey@redhat.com>
6484
6485         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6486
6487 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6488
6489         * java-tree.h (lang_printable_name_wls): New prototype.
6490         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6491         rather than `current_class' to print type name. Don't prepend type
6492         names when printing constructor names.
6493         (lang_printable_name_wls): New function.
6494         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6495         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6496         * parse.y (patch_method_invocation): Message tuned for constructors.
6497         (not_accessible_p): Grant `private' access from within
6498         enclosing contexts.
6499
6500 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6501
6502         All files with updated copyright when applicable.
6503         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6504         * class.c (mangle_class_field): Function removed.
6505         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6506         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6507         (build_class_ref): Call `java_mangle_class_field' instead of
6508         `mangle_class_field.'
6509         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6510         (layout_class): Call `java_mangle_decl' instead of
6511         `mangle_static_field.'
6512         (cxx_keywords): Initialized static array moved to `lex.c.'
6513         (layout_class_method): Changed leading comment. Simplified to
6514         call `java_mangle_decl.' Local `ptr' moved in for loop body.
6515         * decl.c (lang_mark_tree): Mark field `package_list.'
6516         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6517         (struct lang_type): New field `package_list.'
6518         (unicode_mangling_length): Prototype removed.
6519         (append_gpp_mangled_name, append_gpp_mangled_classtype,
6520         emit_unicode_mangled_name): Likewise.
6521         (cxx_keyword_p): New prototype.
6522         (java_mangle_decl, java_mangle_class_field,
6523         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6524         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6525         `build_expr_wfl.'
6526         * jvgenmain.c (main_method_prefix): Global variable removed.
6527         (main_method_suffix): Likewise.
6528         (do_mangle_classname): New function.
6529         (main): Call it. Format changed to accommodate new mangling scheme.
6530         * lex.c: (utf8_cmp): Conditionally prototyped.
6531         (cxx_keywords): Moved from class.c, conditionally defined.
6532         (utf8_cmp, cxx_keyword_p): Likewise.
6533         * mangle.c (obstack.h, ggc.h): Included.
6534         (mangle_field_decl): New function.
6535         (mangle_method_decl, mangle_type, mangle_pointer_type,
6536         mangle_array_type, mangle_record_type,
6537         find_compression_pointer_match, find_compression_array_match,
6538         find_compression_record_match,
6539         find_compression_array_template_match, set_type_package_list,
6540         entry_match_pointer_p, emit_compression_string, init_mangling,
6541         finish_mangling, compression_table_add, mangle_member_name): Likewise.
6542         (mangle_obstack): New global.
6543         (MANGLE_RAW_STRING): New macro.
6544         (unicode_mangling_length): Turned static.
6545         (append_unicode_mangled_name): Renamed from
6546         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
6547         replaces `obstack', removed from the parameter list.
6548         (append_gpp_mangled_name): Turned static. `mangle_obstack'
6549         replaces parameter `obstack', removed from the parameter list. Call
6550         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6551         (append_gpp_mangled_classtype): Removed.
6552         (compression_table, compression_next): New static variables.
6553         * parse.y (temporary_obstack): Extern declaration removed.
6554
6555 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6556
6557         * parse.y (patch_binop): Compute missing type in error situations.
6558
6559 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6560
6561         * class.c (make_class_data): Push initial value for "arrayclass".
6562         * decl.c (init_decl_processing): Add new class field "arrayclass".
6563
6564 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6565
6566         From patha@softlab.ericsson.se:
6567         * parse.y (switch_label): Use build, not build1, to construct
6568         DEFAULT_EXPR.
6569
6570 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6571
6572         * lang.c (lang_decode_option): Change -MA to -MP.
6573         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6574         Update to new prototype; do quote targets.
6575         (jcf_dependency_write): Update.
6576
6577 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
6578
6579         Shorten primitive array allocation path:
6580         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6581         to create new primitive arrays.
6582         * expr.c (build_newarray): If generating native code, call
6583         soft_newarray_node with a reference to the primitive TYPE identifier
6584         instead of type_value.
6585
6586 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
6587
6588         Fix for PRs gcj/312 and gcj/253:
6589         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6590         dest if they arn't already.
6591         * class.c (layout_class): Call maybe_layout_super_class on
6592         superinterfaces also, but only if compiling from bytecode.
6593
6594         Fix for PR gcj/373:
6595         * parse.y (create_class): Set ACC_STATIC if class is declared in an
6596         interface.
6597
6598 2000-12-15  Tom Tromey  <tromey@redhat.com>
6599
6600         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6601         set.
6602
6603 2000-12-14  Andrew Haley  <aph@redhat.com>
6604
6605         * boehm.c (mark_reference_fields): Change test to correctly detect
6606         bitmap overflow.
6607
6608 2000-12-15  Andreas Jaeger  <aj@suse.de>
6609
6610         * config-lang.in (lang_dirs): Added.
6611
6612 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6613
6614         * parse.y (end_artificial_method_body): Fixed undefined behavior.
6615         Credits go to rth for finding it.
6616
6617 2000-12-13  Mike Stump  <mrs@wrs.com>
6618
6619         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6620
6621 2000-11-07  Tom Tromey  <tromey@cygnus.com>
6622
6623         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6624         * lex.c (java_ignorable_control_p): Removed.
6625         (java_letter_or_digit_p): Removed.
6626         (java_start_char_p): New function.
6627         (java_read_char): Return `int', not `unicode_t'.  Changed
6628         callers.
6629         (java_read_unicode): Likewise.
6630         (java_read_unicode_collapsing_terminators): Likewise.
6631         (java_get_unicode): Likewise.
6632         (java_new_lexer): Initialize hit_eof.
6633         (java_parse_end_comment): Take `int' argument.
6634         (java_parse_doc_section): Likewise.
6635         (java_parse_escape_sequence): Don't allow backlash-newline.
6636         Return `int'.
6637         * lex.h (JAVA_DIGIT_P): Removed.
6638         (_JAVA_LETTER_OR_DIGIT_P): Removed.
6639         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6640         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6641         (JAVA_PART_CHAR_P): New macro.
6642         (UEOF): Now -1.
6643         (JAVA_CHAR_ERROR): Now -2.
6644         (java_lexer): New field `hit_eof'.
6645         * chartables.h: New file.
6646         * gen-table.pl: new file.
6647
6648 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6649             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6650
6651         * parse.y (java_complete_lhs): Only allow compound assignment of
6652         reference type if type is String.
6653
6654 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6655
6656         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6657         jcf-path.c: Likewise.
6658
6659 2000-12-09  Anthony Green  <green@redhat.com>
6660
6661         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6662         filestart and filename_length as int values.
6663
6664 2000-12-07  Mo DeJong  <mdejong@redhat.com>
6665
6666         * jcf-io.c (find_class): Correct the logic that tests to see if a
6667         .java file is newer than its .class file. The compiler was
6668         incorrectly printing a warning when file mod times were equal.
6669
6670 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
6671
6672         * jvgenmain.c: Use ISPRINT not isascii.
6673
6674 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6675
6676         * parse.y (end_artificial_method_body): Fixed typo.
6677
6678 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6679
6680         * parse.y (patch_method_invocation): Pick the correct enclosing
6681         context when creating inner class instances.
6682         Fixes gcj/332.
6683
6684 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
6685
6686         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6687         Update copyright year to 2000.
6688
6689 2000-11-23  Anthony Green  <green@redhat.com>
6690
6691         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6692         Move current_file_list out of yyparse and make it static.
6693
6694         * expr.c: Declare quick_stack and tree_list_free_list as static
6695         (init_expr_processing): Register quick_stack and
6696         tree_list_free_list roots.
6697
6698 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6699
6700         * parse.y (build_outer_field_access): New local `decl_ctx', use
6701         it. Check for field's context and current class immediate outer
6702         context inheritance.
6703         (outer_field_access_p): Consider fields inherited from the last
6704         enclosing context.
6705         (build_access_to_thisn): Stop at the last enclosing context if
6706         necessary.
6707         Fixes gcj/367.
6708
6709 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
6710
6711         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6712
6713 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
6714
6715         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6716         scratch buffer.
6717
6718 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6719
6720         * jv-scan.c (help): Document --complexity.
6721         (options): Added --complexity.
6722         (flag_complexity): New global.
6723         (main): Call `report'.
6724         * parse-scan.y (complexity): New global.
6725         (if_then_statement, if_then_else_statement,
6726         if_then_else_statement_nsi, switch_block_statement_group,
6727         while_expression, do_statement, for_begin, continue_statement,
6728         throw_statement, catch_clause, finally, method_invocation,
6729         conditional_and_expression, conditional_or_expression,
6730         conditional_expression): Update complexity.
6731         (reset_report): Reset complexity.
6732         (report): New function.
6733
6734 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6735
6736         * lex.c (yylex): Added STRICT_TK case.
6737         * parse.y (STRICT_TK): Added.
6738         * parse-scan.y (STRICT_TK): Added.
6739         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6740         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
6741         file.
6742         * keyword.h: Rebuilt.
6743         * keyword.gperf (strictfp): Added.
6744
6745 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6746
6747         * lex.c (yylex): Recognize floating point constants with leading
6748         0.
6749
6750 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6751
6752         * java-tree.h (cyclic_inheritance_report): Constify.
6753         * parse.y (cyclic_inheritance_report): Likewise.
6754
6755 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6756
6757         * parse.y (goal): Remove call to ggc_add_string_root.
6758
6759 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6760
6761         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6762         Create string in scratch buffer, then pass to build_string.
6763
6764 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6765
6766         * parse.y (issue_warning_error_from_context): Add
6767         ATTRIBUTE_PRINTF.
6768
6769 2000-11-11  Anthony Green  <green@redhat.com>
6770
6771         * jcf-parse.c (process_zip_dir): Add finput parameter.
6772         (jcf_figure_file_type): Call process_zip_dir with appropriate
6773         argument.
6774
6775 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6776
6777         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6778         * jcf-parse.c (jcf_figure_file_type): Likewise.
6779
6780 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6781
6782         * parse.y (create_new_parser_context): Use memset () instead of
6783         bzero ().
6784
6785 2000-11-08  Tom Tromey  <tromey@cygnus.com>
6786
6787         * gjavah.c (process_file): Only include gcj/cni.h when generating
6788         CNI stubs.
6789
6790 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6791
6792         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6793         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6794         instead of bzero ().
6795
6796 2000-11-05  Tom Tromey  <tromey@cygnus.com>
6797
6798         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6799         * lex.c (IS_ZERO): New define.
6800         (java_perform_atof): Error on floating point underflow.
6801
6802 2000-11-04  Tom Tromey  <tromey@cygnus.com>
6803
6804         * lex.c (java_parse_escape_sequence): Only read two octal
6805         characters if the first one is greater than 3.  Don't allow
6806         "octal" numbers to include the digits 8 or 9.
6807
6808 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6809
6810         * Make-lang.in (java.distdir): Remove.
6811
6812 2000-11-03  Tom Tromey  <tromey@cygnus.com>
6813
6814         * Make-lang.in (java.dvi): New target.
6815         Partial fix for PR other/567.
6816
6817         * lang-options.h: Mention -Wout-of-date.
6818         * jcf-dump.c (flag_newer): New global.
6819         * gjavah.c (flag_newer): New global.
6820         * jcf-io.c (find_class): Only warn when flag_newer set.
6821         * lang.c (flag_newer): New global.
6822         (struct string_option): New declaration.
6823         (lang_W_options): New global.
6824         (process_option_with_no): New function.
6825         (lang_decode_option): Use it.
6826
6827         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6828         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6829         `$'.
6830
6831         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6832         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6833         * lex.c (java_read_unicode): Removed `term_context' argument.
6834         Recognize any number of `u' in `\u'.
6835         (java_read_unicode_collapsing_terminators): New function.
6836         (java_get_unicode): Use it.
6837         (java_lineterminator): Removed.
6838         (yylex): Produce error if character literal is newline or single
6839         quote.  Return if eof found in middle of `//' comment.  EOF in
6840         `//' comment is only an error if pedantic.
6841         (java_ignorable_control_p): New function.
6842         (java_parse_end_comment): Return if eof found in middle of
6843         comment.
6844         Include flags.h.
6845         * jv-scan.c (pedantic): New global.
6846
6847 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6848
6849         * parse.y (outer_field_access_p): Inherited fields aren't
6850         consider outer fields.
6851         (maybe_build_thisn_access_method): Use
6852         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6853         (resolve_expression_name): Trigger an error if a static field
6854         is being accessed as an outer field.
6855
6856 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6857
6858         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6859         Fixes gcj/365.
6860
6861 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6862
6863         * Make-lang.in: Move all build rules here from Makefile.in,
6864         adapt to new context.  Wrap all rules that change the current
6865         directory in parentheses.  Expunge all references to $(P).
6866         When one command depends on another and they're run all at
6867         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6868         all object-file generation rules.  Delete obsolete variables.
6869
6870         * Makefile.in: Delete.
6871         * config-lang.in: Delete outputs= line.
6872
6873 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6874
6875         * parse.y (patch_method_invocation): NULLify this_arg when already
6876         inserted.
6877         (maybe_use_access_method): Handle call to methods unrelated to the
6878         current class. Fixed comment.
6879         Fixes gcj/361.
6880
6881 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6882
6883        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6884        scope.
6885
6886 2000-10-24  Tom Tromey  <tromey@cygnus.com>
6887
6888         * lex.c (java_new_lexer): Initialize new fields.  Work around
6889         broken iconv() implementations.
6890         (java_read_char): Swap bytes if required.  Use fallback decoder if
6891         required.
6892         (byteswap_init, need_byteswap): New globals.
6893         (java_destroy_lexer): Only close iconv handle if it is in use.
6894         * lex.h (java_lexer): New fields read_anything, byte_swap,
6895         use_fallback.
6896         Made out_buffer unsigned.
6897
6898 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6899
6900         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6901         where an enclosing context can be set on the jdep.
6902         (do_resolve_class): Fixed identation.
6903
6904 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6905
6906         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6907
6908         * jcf-reader.c (peek_attribute, skip_attribute): Only define
6909         when requested.
6910
6911         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6912
6913         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6914
6915 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6916
6917         * jcf-write.c (OP1): Update `last_bc'.
6918         (struct jcf_block): Fixed indentation and typo in comments.  New
6919         field `last_bc'.
6920         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6921         follows `monitorenter'.
6922         * parse.y (patch_synchronized_statement): New local `tmp'. Call
6923         `patch_string'.
6924         Fixes gcj/232.
6925
6926 2000-10-16  Tom Tromey  <tromey@cygnus.com>
6927
6928         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6929         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6930         * lang-options.h: Added -MA, -MT, -MF..
6931         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6932         (DEPEND_TARGET_SET): New macro.
6933         (DEPEND_FILE_ALREADY_SET): Likewise.
6934         (init_parse): Handle new flags.
6935         * jcf.h (jcf_dependency_print_dummies): Declare.
6936         * Make-lang.in (s-java): Added mkdeps.o.
6937         * Makefile.in (BACKEND): Added mkdeps.o.
6938         (../gcjh$(exeext)): Added mkdeps.o.
6939         (../jcf-dump$(exeext)): Added mkdeps.o.
6940         * jcf-depend.c: Include mkdeps.h.
6941         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6942         add_entry): Removed.
6943         (jcf_dependency_reset): Rewrote.
6944         (dependencies): New global.
6945         (jcf_dependency_set_target): Rewrote.
6946         (jcf_dependency_add_target): Likewise.
6947         (jcf_dependency_add_file): Likewise.
6948         (munge): Removed.
6949         (print_ents): Removed.
6950         (jcf_dependency_write): Rewrote.
6951         (print_dummies): New global.
6952         (jcf_dependency_print_dummies): New function
6953         (jcf_dependency_write): Call deps_dummy_targets if required.
6954
6955 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6956
6957         * gjavah.c (add_class_decl): Removed unused variables `tname',
6958         `tlen' and `name_index'.
6959         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6960         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6961         in `wfl_operator' with value.
6962         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6963         (jcf_figure_file_type): Fixed identation.
6964         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6965         * parse.y (analyze_clinit_body): New function.
6966         (static_initializer:): Reset `current_static_block'.
6967         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6968         `wfl_operator' with new value.
6969         (lookup_cl): Use EXPR_WFL_FILENAME.
6970         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6971         analyze_clinit_body.
6972         (build_outer_field_access): Access to this$<n> built from
6973         current_class, not its outer context.
6974         (build_access_to_thisn): Fixed leading comment. Tidied things up.
6975         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6976         (patch_method_invocation): Use `is_static_flag' when already
6977         initialized.
6978         (patch_newarray): Removed assignment in ternary operator.
6979
6980 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6981
6982         * except.c (free_eh_ranges): Don't free `whole_range'.
6983
6984 2000-10-15  Anthony Green  <green@redhat.com>
6985
6986         * decl.c (init_decl_processing): Call init_class_processing before
6987         anything else.
6988
6989 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6990
6991         * check-init.c (check_init): Fixed leading comment. Use
6992         LOCAL_FINAL_P.
6993         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6994         (give_name_to_locals): Likewise.
6995         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6996         fields in lang_decl_var.
6997         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6998         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6999         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
7000         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
7001         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
7002         (LOCAL_FINAL): Rewritten.
7003         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
7004         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
7005         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
7006         `init_final' fields.
7007         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
7008         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
7009         (TYPE_HAS_FINAL_VARIABLE): New macro.
7010         (struct lang_type): Added `afv' field.
7011         * parse.y (check_static_final_variable_assignment_flag): New function.
7012         (reset_static_final_variable_assignment_flag): Likewise.
7013         (check_final_variable_local_assignment_flag): Likewise.
7014         (reset_final_variable_local_assignment_flag): Likewise.
7015         (check_final_variable_indirect_assignment): Likewise.
7016         (check_final_variable_global_assignment_flag): Likewise.
7017         (add_inner_class_fields): Use LOCAL_FINAL_P.
7018         (register_fields): Handle local finals and final variables.
7019         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
7020         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7021         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7022         on local finals.
7023         (java_complete_expand_methods): Loop to set
7024         TYPE_HAS_FINAL_VARIABLE. Call
7025         `reset_final_variable_local_assignment_flag' and
7026         `check_final_variable_local_assignment_flag' accordingly before
7027         and after constructor expansion. Call
7028         `reset_static_final_variable_assignment_flag'
7029         before expanding <clinit> and after call
7030         `check_static_final_variable_assignment_flag' if the
7031         current_class isn't an interface. After all methods have been
7032         expanded, call `check_final_variable_global_assignment_flag' and
7033         `check_static_final_variable_assignment_flag' if the current class
7034         is an interface.
7035         (maybe_yank_clinit): Fixed typo in comment.
7036         (build_outer_field_access_methods): Removed old sanity check. Use
7037         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7038         Don't create access methods for finals.
7039         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
7040         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
7041         existing DECL_INIT has been processed.
7042         (java_complete_lhs): Likewise.
7043         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
7044         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
7045         logic.
7046         (patch_assignment): Use LOCAL_FINAL_P.
7047         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
7048         DECL_INITIAL is nullified.
7049         Fixes gcj/163.
7050
7051 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7052
7053         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
7054
7055         * Makefile.in (parse.c, parse-scan.c): Likewise.
7056
7057 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
7058
7059         * class.c (temporary_obstack): Remove.
7060         (make_class): Don't mess with obstascks.
7061         (push_class): Likewise.
7062         (set_super_info): Likewise.
7063         (add_method_1): Likewise.
7064         (add_method): Likewise.
7065         (add_field): Likewise.
7066         (build_utf8_ref): Likewise.
7067         (build_class_ref): Likewise.
7068         (build_static_field_ref): Likewise.
7069         (finish_class): Likewise.
7070         (push_super_field): Likewise.
7071         (layout_class): Likewise.
7072         (layout_class_methods): Likewise.
7073         (init_class_processing): Likewise.
7074         * constants.c (get_tag_node): Likewise.
7075         (build_constant_data_ref): Likewise.
7076         * decl.c (ggc_p): Remove.
7077         (copy_lang_decl): Use ggc_alloc.
7078         (complete_start_java_method): Don't mess with obstacks.
7079         (start_java_method): Likewise.
7080         (end_java_method): Likewise.
7081         * except.c (link_handler): Use xmalloc.
7082         (free_eh_ranges): New function.
7083         (method_init_exceptions): Use it.
7084         (add_handler): Use xmalloc.
7085         (expand_start_java_handler): Don't mess with obstacks.
7086         (prepare_eh_table_type): Likewise.
7087         (expand_end_java_handler): Likewise.
7088         * expr.c (push_value): Likewise.
7089         (create_label_decl): Likewise.
7090         (build_jni_stub): Likewise.
7091         (java_lang_expand_expr): Likewise.
7092         (note_instructions): Use xrealloc.
7093         (java_push_constant_from_pool): Don't mess with obstacks.
7094         (process_jvm_instruction): Likewise.
7095         * java-tree.h (cyclic_inheritance_report): Remove duplicate
7096         declaration.
7097         * jcf-parse.c (get_constant): Don't mess with obstacks.
7098         (read_class): Likewise.
7099         (jcf_parse): Likewise.
7100         * lex.c (expression_obstack): Remove.
7101         (java_lex): Don't use obstack_free.
7102         * parse.h (exit_java_complete_class): Don't mess with obstacks.
7103         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
7104         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
7105         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
7106         * parse.y (gaol): Add more GC roots.
7107         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
7108         (lookup_field_wrapper): Likewise.
7109         (obtain_incomplete_type): Don't mess with obstacks.
7110         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
7111         macros.
7112         (craft_constructor): Don't mess with obstacks.
7113         (safe_layout_class): Likewise.
7114         (java_complete_class): Likewise.
7115         (source_end_java_method): Likewise.
7116         (build_outer_field_access_methods): Likewise.
7117         (build_outer_method_access_method): Likewise.
7118         (maybe_build_thisn_access_method): Likewise.
7119         (build_dot_class_method_invocation): Likewise.
7120         (java_complete_tree): Likewise.
7121         (java_complete_lhs): Likewise.
7122         (do_merge_string_cste): Likewise.
7123         (patch_string_cst): Likewise.
7124         (array_constructor_check_entry): Likewise.
7125         * typeck.c (build_java_array_type): Likewise.
7126         (parse_signature_string): Likewise.
7127         (build_java_signature): Likewise.
7128
7129 2000-10-12  Tom Tromey  <tromey@cygnus.com>
7130
7131         Fix for PR gcj/356:
7132         * gjavah.c (add_class_decl): Don't special-case inner classes.
7133         (add_namelet): Likewise.
7134
7135 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
7136
7137         * java-tree.h: Constify current_encoding.
7138         * lang.c: Constify current_encoding.
7139
7140 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
7141
7142         * jvgenmain.c (class_mangling_suffix): Omit `.'.
7143         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
7144
7145 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7146
7147         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
7148         patch. Fixes gcj/340.
7149
7150 2000-10-10  Tom Tromey  <tromey@cygnus.com>
7151
7152         * lex.c (java_new_lexer): Initialize out_first and out_last
7153         fields.
7154         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
7155
7156 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7157
7158         * parse.y (pop_current_osb): New function.
7159         (array_type:): Use `dims:', changed actions
7160         accordingly. Suggested by Anthony Green.
7161         (array_creation_expression:): Used pop_current_osb.
7162         (cast_expression:): Likewise.
7163         (search_applicable_method_list): Fixed indentation.
7164
7165 2000-10-08  Anthony Green  <green@redhat.com>
7166
7167         * parse.y (array_type_literal): Remove production.
7168         (type_literals): Refer to array_type, not array_type_literal.
7169
7170 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7171
7172         Patch contributed by Corey Minyard.
7173         * decl.c (check_local_named_variable): New function.
7174         (tree check_local_unnamed_variable): Likewise.
7175         (find_local_variable): Splitted. Call check_local_{un}named_variable.
7176
7177 2000-10-07  Anthony Green  <green@redhat.com>
7178
7179         * class.c (layout_class): Handle case where superclass can't be
7180         layed out yet.
7181
7182 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
7183
7184         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
7185         gperf.
7186
7187 2000-10-05  Tom Tromey  <tromey@cygnus.com>
7188
7189         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
7190         * jvgenmain.c (class_mangling_prefix): Removed.
7191         (class_mangling_suffix): New global.
7192         (main): Use it.
7193         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
7194         `$'.
7195         (print_method_info): Handle overrides for static and final
7196         methods.
7197         (process_file): Generate declaration for class object field.
7198         * class.c (cxx_keywords): New array.
7199         (utf8_cmp): New function.
7200         (cxx_keyword_p): New function.
7201         (layout_class_method): Mangle C++ keywords by appending `$'.
7202         (mangle_field): New function.
7203         (mangle_class_field): Use mangle_field.  Mangle class name as
7204         `class$'.
7205         (mangle_static_field): Use mangle_field.
7206
7207 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7208
7209         * decl.c (find_local_variable): Removed uncessary type check and
7210         fixed range check typo. From Corey Minyard.
7211
7212 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7213
7214         * decl.c (give_name_to_locals): New local `code_offset'. Call
7215         `maybe_adjust_start_pc'.
7216         * expr.c (note_instructions): New function.
7217         (expand_byte_code): Don't collect insn starts here.
7218         (peek_opcode_at_pc): New function.
7219         (maybe_adjust_start_pc): Likewise.
7220         * java-tree.h (maybe_adjust_start_pc): Declare.
7221         (note_instructions): Likewise.
7222         * jcf-parse.c (parse_class_file): Call `note_instructions'.
7223
7224 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7225
7226         * parse.y (field_access:): Fixed indentation.
7227         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
7228
7229 2000-09-07  Tom Tromey  <tromey@cygnus.com>
7230
7231         Fix for PR gcj/307:
7232         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
7233         JPRIMITIVE_TYPE_P, for arithmetic operators.
7234         (patch_method_invocation): Indentation fix.
7235         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
7236         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
7237         (do_unary_numeric_promotion): Cleaned up code.
7238         (valid_cast_to_p): Handle boolean correctly.
7239
7240 2000-09-27  Tom Tromey  <tromey@cygnus.com>
7241
7242         * lex.c (java_read_unicode): Reset bs_count when finished with
7243         `\u' sequence.
7244
7245 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
7246
7247         Convert to GC.
7248         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
7249         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
7250         (typeck.o): Depend on ggc.h.
7251         * class.c (add_method_1): Use GC functions for allocation.
7252         (init_class_processing): Register roots.
7253         * decl.c (ggc_p): Set to 1.
7254         (pending_local_decls): Make it static.
7255         (push_jvm_slot): Use GC functions for allocation.
7256         (init_decl_processing): Register roots.
7257         (give_name_to_locals): Use GC functions for allocation.
7258         (lang_mark_tree): New function.
7259         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
7260         functions for allocation.
7261         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
7262         * lex.c (java_lex): Use build_string, rather than replicating it
7263         inline.
7264         * parse.y (goal): Add more roots.
7265         (mark_parser_ctxt): New function.
7266         * typeck.c: Include ggc.h.
7267
7268 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7269
7270         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
7271         contains something else than MODIFY_EXPR.
7272
7273 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
7274
7275         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
7276         * Makefile.in (parse.o): Depend on ggc.h.
7277         (class.o): Likewise.
7278         (constants.o): Likewise.
7279         (decl.o): Likewise.
7280         (expr.o): Likewise.
7281         (jcf-parse.o): Likewise.
7282         (jcf-write.o): Likewise.
7283         (mangle.o): Likewise.
7284         * class.c: Include ggc.h.
7285         (build_static_field_ref): Register GC roots.
7286         (layout_class): Likewise.
7287         (init_class_processing): Likewise.
7288         * constants.c: Include ggc.h.
7289         (current_constant_pool_data_ref): Remove.
7290         (tag_nodes): Move it to ...
7291         (get_tag_node): ... here.  Register GC roots.
7292         * decl.c: Include ggc.h.  Remove many global tree definitions.
7293         (throw_node): Define.
7294         (java_global_trees): Likewise.
7295         (predef_filenames): Make the size a constant.
7296         (init_decl_processing): Adjust accordingly.
7297         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
7298         * expr.c: Include ggc.h.
7299         (init_expr_processing): Register GC roots.
7300         (build_invokeinterface): Likewise.
7301         * java-tree.h: Replace extern tree declarations with macros.
7302         (java_global_trees): New variable.
7303         (java_tree_index): New enumeration.
7304         (init_jcf_parse): Declare.
7305         * jcf-parse.c: Include ggc.h.
7306         (current_class): Remove declaration.
7307         (main_class): Likewise.
7308         (all_class_list): Likewise.
7309         (predefined_filename_p): Adjust for constant size of
7310         predef_filenames.
7311         (init_jcf_parse): New function.
7312         * jcf-write.c: Include ggc.h.
7313         (generate_classfile): Register GC roots.
7314         (append_synthetic_attribute): Likewise.
7315         (append_innerclass_attribute_entry): Likewise.
7316         * lang.c: Include ggc.h.
7317         (lang_print_error): Register GC roots.
7318         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
7319         with macros.
7320         * parse.y: Include ggc.h.
7321         (wfl_operator): Remove.
7322         (goal): Register GC roots.
7323         (java_pop_parser_context): Adjust for new field names.
7324         (java_parser_context_save_global): Likewse.
7325         (java_parser_context_restore_global): Likewise.
7326         (java_parser_context_suspend): Likewise.
7327         (java_parser_context_resume): Likewise.
7328         (verify_constructor_circularity): Register GC roots.
7329         (lookup_cl): Likewise.
7330         (java_reorder_fields): Likewise.
7331         (build_current_this): Likewise.
7332         (class_in_current_package): Likewise.
7333         (argument_types_convertible): Likewise.
7334         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7335
7336 2000-09-14  Tom Tromey  <tromey@cygnus.com>
7337
7338         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7339
7340 2000-09-13  Tom Tromey  <tromey@cygnus.com>
7341
7342         * jcf-parse.c: Include <locale.h>.
7343         * jv-scan.c: Include <locale.h>.
7344
7345 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7346
7347         * expr.c (pop_type_0): Return `Object' if trying to merge two
7348         interface types.
7349         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7350         interface types; `Object' is always a valid supertype.
7351
7352 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7353
7354         Fix for PR gcj/33:
7355         * jv-scan.c (help): Document --encoding.
7356         (options): Added `encoding' entry.
7357         (OPT_ENCODING): New define.
7358         (main): Handle --encoding.
7359         Include <langinfo.h> if nl_langinfo exists.
7360         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7361         --encoding.
7362         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7363         (parse_source_file): Correctly call java_init_lex.  Added `finput'
7364         argument.  Use nl_langinfo to determine default encoding.
7365         * java-tree.h (current_encoding): Declare.
7366         * parse.y (java_parser_context_restore_global): Don't restore
7367         `finput'.
7368         (java_parser_context_save_global): Don't set `finput' field.
7369         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
7370         if required.
7371         * lang.c (current_encoding): New global.
7372         (lang_decode_option): Recognize `-fencoding='.
7373         (finish_parse): Don't close finput.
7374         * parse.h (struct parser_ctxt): Removed `finput' and
7375         `unget_utf8_value' fields.  Added `lexer' field.
7376         (java_init_lex): Fixed declaration.
7377         * lex.c (java_new_lexer): New function.
7378         (java_destroy_lexer): Likewise.
7379         (java_read_char): Added `lex' argument.  Handle iconv case.
7380         (java_read_unicode): Added `lex' argument.  Count backslashes in
7381         lexer structure.
7382         (java_init_lex): Added `finput' and `encoding' arguments.  Set
7383         `lexer' field in ctxp.
7384         (BAD_UTF8_VALUE): Removed.
7385         (java_lex): Handle seeing UEOF in the middle of a string literal.
7386         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7387         (java_lexer): New structure.
7388         (UNGETC): Removed.
7389         (GETC): Removed.
7390         (DEFAULT_ENCODING): New define.
7391         (java_destroy_lexer): Declare.
7392
7393 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7394
7395         Fix for PR gcj/343:
7396         * lex.c (java_init_lex): Initialize java_io_serializable.
7397         * parse.y (java_io_serializable): New global.
7398         (valid_ref_assignconv_cast_p): An array can be cast to
7399         serializable.
7400
7401 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7402
7403         * decl.c, expr.c: Include defaults.h if not already included.
7404         Don't define the *_TYPE_SIZE macros.
7405
7406 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
7407
7408         * typeck.c (build_java_array_type): Correct first parameter
7409         in ADJUST_FIELD_ALIGN invocation.
7410
7411 2000-09-06  Tom Tromey  <tromey@cygnus.com>
7412
7413         * lang-specs.h: Also recognize `-femit-class-files'.
7414
7415 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7416
7417         * verify.c (merge_types): Load the types to merge if necessary.
7418
7419 2000-09-02  Anthony Green  <green@redhat.com>
7420
7421         * jcf-io.c: Include zlib.h.
7422         (open_in_zip): Read compressed class file archives.
7423         * zipfile.h (ZipDirectory): Add uncompressed_size and
7424         compression_method fields.
7425         * zextract.c (read_zip_archive): Collect file compression info.
7426
7427 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
7428
7429         * parse.y (do_resolve_class): Also explore superclasses of
7430         intermediate enclosing contexts when searching for inner classes.
7431
7432 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7433
7434         * parse.y (variable_declarator_id:): Better error message.
7435         (expression_statement:): Use YYNOT_TWICE.
7436         (cast_expression:): Likewise.
7437         (assignment:): Likewise.
7438
7439 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7440
7441         * parse.y (do_merge_string_cste): New locals. Create new
7442         STRING_CSTs each time, use memcpy. Fixes gcj/311.
7443
7444 2000-08-07  Hans Boehm  <boehm@acm.org>
7445
7446         * boehm.c (mark_reference_fields): Set marking bits for all words in
7447         a multiple-word record.
7448         (get_boehm_type_descriptor): Use the procedure marking descriptor for
7449         java.lang.Class.
7450
7451 2000-08-31  Mike Stump  <mrs@wrs.com>
7452
7453         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7454         jcf-dump$(exeext)): Make parallel safe.
7455
7456 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7457
7458         * jcf-parse.c (set_source_filename): Constify a char *.
7459         * jcf-write.c (append_innerclasses_attribute,
7460         make_class_file_name): Constify a char *.  Don't recycle a
7461         variable for an unrelated purpose.
7462         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7463         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7464
7465 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7466
7467         * expr.c (can_widen_reference_to): Fixed indentation.
7468         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7469         * parse.y: `finit$' replaces `$finit$' in comments.
7470         (try_builtin_assignconv): Fixed leading comment.
7471
7472 2000-08-25  Greg McGary  <greg@mcgary.org>
7473
7474         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7475
7476 2000-08-24  Greg McGary  <greg@mcgary.org>
7477
7478         * lang.c (lang_decode_option): Use ARRAY_SIZE.
7479         * parse.y (BINOP_LOOKUP): Likewise.
7480
7481 2000-08-22  Andrew Haley  <aph@cygnus.com>
7482
7483         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7484         sign extending. Fixes gcj/321.
7485         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7486         combining to make a jlong. Fixes gcj/321.
7487
7488 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7489
7490         * lang-specs.h: Do not process -o or run the assembler if
7491         -fsyntax-only.
7492
7493 2000-08-16  Andrew Haley  <aph@cygnus.com>
7494
7495         * typeck.c (build_java_array_type): Rewrite code to do array
7496         alignment.  Take into account back-end macros when aligning array
7497         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7498         user to set alignment. Fixes gcj/252 and 160.
7499
7500 2000-08-09  Tom Tromey  <tromey@cygnus.com>
7501
7502         * parse.y (check_abstract_method_definitions): Now return `int'.
7503         Check implemented interfaces.  Fixes PR gcj/305.
7504
7505         * parse.y (patch_switch_statement): Disallow `long' in switch
7506         expressions.  Fixes PR gcj/310.
7507
7508 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7509
7510         * decl.c (finit_leg_identifier_node): New global.
7511         (init_decl_processing): Use `finit$' to initialize
7512         finit_identifier_node. Use `$finit$' to initialize
7513         finit_leg_identifier_node.
7514         * expr.c (expand_java_field_op): Use ID_FINIT_P.
7515         * java-tree.h (finit_identifier_node): Changed attached comment.
7516         (finit_leg_identifier_node): New declaration.
7517         (ID_FINIT_P): Take finit_identifier_node and
7518         finit_leg_identifier_node into account. This is a backward
7519         compatibility hack.
7520
7521 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7522
7523         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7524         Jan 6 2000 patch.
7525         (generate_bytecode_insns): Check `nargs' before emitting it.
7526         * verify.c (merge_type_state): Fixed typo.
7527         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7528         generate_bytecode_{conditional,insns}.
7529
7530 2000-08-13  Anthony Green  <green@redhat.com>
7531
7532         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7533         for -pg builds).
7534
7535 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7536
7537         * class.c (maybe_layout_super_class): Fixed indentation.
7538         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7539         (java_check_methods): New function declaration.
7540         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7541         instead of `str_ptr'.
7542         * jcf-write.c (generate_bytecode_insns): Emit number the of args
7543         of a `invokeinterface' at the right time.
7544         * parse.h (WFL_STRIP_BRACKET): New macro.
7545         (SET_TYPE_FOR_RESOLUTION): Use it.
7546         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7547         (check_class_interface_creation): Don't check for cross package
7548         innerclass name clashes.
7549         (method_header): Behave properly if MDECL is `error_mark_node'.
7550         (method_declarator): Return `error_mark_node' if bogus current
7551         class.
7552         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7553         (resolve_and_layout): New local `decl_type', set and used. Call
7554         java_check_methods.
7555         (java_check_methods): New method.
7556         (java_layout_classes): Use it.
7557         (resolve_qualified_expression_name): No EH check necessary in
7558         access$<n>.
7559         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7560         `case' statement.
7561         (patch_assignment): Set DECL_INITIAL on integral final local.
7562
7563 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7564
7565         * java-tree.h (flag_extraneous_semicolon): New extern.
7566         * lang-options.h: (-Wextraneous-semicolon): New option.
7567         * lang.c (flag_redundant): Fixed typo in leading comment.
7568         (flag_extraneous_semicolon): New global.
7569         (lang_decode_option): Set `flag_extraneous_semicolon' when
7570         -Wall. Decode `-Wextraneous-semicolon'.
7571         * parse.y (type_declaration:): Removed `SC_TK' hack, added
7572         `empty_statement' rule.
7573         (class_body_declaration): Likewise.
7574         (method_body:): Accept `;' as a method body.
7575         (static_initializer:): Removed `SC_TK' hack.
7576         (constructor_block_end:): Likewise.
7577         (empty_statement:): Report deprecated empty declaration. Fixes
7578         gcj/295
7579
7580 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7581
7582         * parse.y (build_dot_class_method_invocation): Changed parameter
7583         name to `type'. Build signature from `type' and convert it to a
7584         STRING_CST if it's an array.
7585         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7586         to use `ref_type' directly.
7587
7588 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
7589
7590         * lang-options.h: Added a comma after the last element to avoid
7591         syntax errors when other languages define additional options.
7592
7593 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7594
7595         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7596         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7597         (jc1): Link with $(BACKEND).
7598         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7599
7600 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7601
7602         * jvspec.c: Adjust type of second argument to
7603         lang_specific_driver, and update code as necessary.
7604
7605         * class.c (build_dtable_decl): Initialize dummy.
7606
7607 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7608
7609         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7610         method bodies not to rule out discarding `<clinit>'; don't use
7611         <clinit> to initialize static fields with constant initializers.
7612
7613 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7614
7615         * gjavah.c (print_method_info): Added `synth' parameter. Skip
7616         synthetic methods.
7617         (method_synthetic): New global.
7618         (HANDLE_METHOD): Recognize synthetic method and tell
7619         `print_method_info' about it.
7620         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7621         processing a synthetic method.
7622         * jcf-reader.c (skip_attribute): New function.
7623         ( skip_attribute): Likewise.
7624
7625 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7626
7627         * parse.y (build_outer_field_access): Fixed comments.
7628         (fix_constructors): Emit the initialization of this$<n> before
7629         calling $finit$.
7630         (resolve_qualified_expression_name): Build an access to `decl' if
7631         necessary.
7632
7633 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7634
7635         * parse-scan.y (curent_class): Non longer const.
7636         (inner_qualifier, inner_qualifier_length): Deleted.
7637         (current_class_length): New global.
7638         (bracket_count): Fixed typo in leading comment.
7639         (anonymous_count): New global.
7640         (class_instance_creation_expression:): Handle anonymous classes.
7641         (anonymous_class_creation:): New rule.
7642         (push_class_context): Rewritten.
7643         (pop_class_context): Likewise.
7644         (INNER_QUALIFIER): Macro deleted.
7645         (report_class_declaration): call `push_class_context' when
7646         entering the function. `fprintf' format modified not to use
7647         INNER_QUALIFIER.
7648         (report_class_declaration): Assign `package_name' and
7649         `current_class' to NULL separately.
7650
7651 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7652
7653         * expr.c (build_invokeinterface): Call layout_class_methods on
7654         target interface.
7655
7656 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7657             Anthony Green  <green@cygnus.com>
7658             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7659
7660         * class.c (make_class_data): Create vtable for abstract classes.
7661         (get_dispatch_table): Changed to cope with abstract classes.
7662
7663 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7664
7665         * parse.y (patch_method_invocation): Don't reverse the argument
7666         list when dealing with anonymous class constructors. Fixed typo in
7667         comment.
7668
7669 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7670
7671         * parse.y (build_alias_initializer_parameter_list): Reverse
7672         crafted list when building aliases for anonymous class
7673         constructors.
7674
7675 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7676
7677         * parse.y (jdep_resolve_class): Don't bother checking potential
7678         innerclass access if `decl' is NULL.
7679         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7680         WFL.
7681
7682 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7683
7684         * parse.c: Remove (again.)
7685
7686 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7687
7688         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7689         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7690         outside the `if' statement, alias to innerclass removed, `decl'
7691         used to mark the class complete.
7692
7693 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7694
7695         * parse.y (simple_name:): Fixed typo in error message.
7696
7697 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7698
7699         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7700         or its first operand can be error marks.
7701
7702 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7703
7704         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7705         * parse.y (method_header): Likewise.
7706
7707 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7708
7709         * parse.y (process_imports): Consider that one might be trying to
7710         import an innerclass. Fixes gcj/254
7711
7712 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7713
7714         * parse.y (find_as_inner_class): Handle the case where the
7715         enclosing context of an innerclass has been loaded as bytecode.
7716
7717 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7718
7719         * parse.y (simple_name:): Reject `$' in type names.
7720         (resolve_type_during_patch): Use `type' as a second
7721         argument to resolve_no_layout. Fixes gcj/257.
7722
7723 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
7724
7725         * parse.y (find_most_specific_methods_list): Select the only
7726         non-abstract method even if max has been set.
7727         Fixes gcj/285, gcj/298.
7728
7729 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
7730
7731         * lang-specs.h: Added %(jc1) to java compiler options.
7732
7733 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7734
7735         * .cvsignore: New file.
7736
7737 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7738
7739         * parse.y (not_accessible_p): Access granted to innerclasses
7740         (indirectly) extending the reference type. Fixes gcj/249.
7741
7742 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7743
7744         * parse.y (patch_method_invocation): Fixed comment.
7745         (maybe_use_access_method): Build this$<n>s to the context of the
7746         target method, or a type that extends it. Fixes gcj/242.
7747
7748 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7749
7750         * parse.c: Remove.
7751
7752 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7753
7754         * parse.y (fold_constant_for_init): Avoid bullish conversion.
7755
7756 2000-07-13  Tom Tromey  <tromey@cygnus.com>
7757
7758         * lang-specs.h: Added %{I*}.
7759
7760 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7761
7762         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7763
7764 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7765
7766         * parse-scan.c: Remove.
7767
7768 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7769
7770         * class.c (set_super_info): Handled protected inner classes.
7771         (common_enclosing_context_p): Bail early if arguments aren't both
7772         inner classes.
7773         (get_access_flags_from_decl): Handle private and protected inner
7774         classes.
7775         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7776         (CLASS_PROTECTED): Likewise.
7777         (struct lang_type): New bitfield `poic'.
7778         * parse.y (jdep_resolve_class): Call check_inner_class_access on
7779         inner classes only.
7780         (check_inner_class_access): Renamed arguments, added
7781         comments. Handles protected inner classes (fixes gcj/225)
7782         (not_accessible_p): Fixed comments. Avoid handling inner classes.
7783
7784 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7785
7786         * parse.y (resolve_qualified_expression_name): Verify qualified
7787         access to `this'. Fixes gcj/239.
7788
7789 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7790
7791         * jcf-write.c (generate_classfile): Don't install ConstantValue
7792         for null pointers.
7793
7794 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7795
7796         * parse.y (resolve_qualified_expression_name): Handle inner class
7797         access. Fixes gcj/256.
7798
7799 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7800
7801         * jcf-write.c (generate_classfile): Properly install the
7802         ConstantValue attribute and the initial value constant pool index
7803         on string constants.
7804         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7805         class files.
7806
7807 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7808
7809         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7810         construct.
7811         * parse.y (find_as_inner_class): Fixed typo.
7812         (do_resolve_class): Explore enclosing contexts when searching for
7813         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7814         (check_inner_class_access): Check `decl' which can be null in case
7815         of previous errors.
7816
7817 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7818
7819         * java-tree.h (java_debug_context): Declared `extern'.
7820         (safe_layout_class): Likewise.
7821         * parse.y (resolve_field_access): Field must be `static' in order
7822         to be replaced by its initial value. Added comments.
7823         (find_applicable_accessible_methods_list): Fixed typo.
7824         (find_most_specific_methods_list): Methods found in innerclasses
7825         take over methods founds in the enclosing contexts.
7826         (java_complete_tree): Loosen restrictions on the type of DECLs
7827         that can be replaced by their initialization values.
7828         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7829
7830 2000-07-05  Tom Tromey  <tromey@cygnus.com>
7831
7832         * Make-lang.in (PARSE_DIR): New macro.
7833         (PARSE_RELDIR): Likewise.
7834         (PARSE_C): Likewise.
7835         (PARSE_SCAN_C): Likewise.
7836         ($(PARSE_C)): New target.
7837         ($(PARSE_SCAN_C)): Likewise.
7838         (SET_BISON): New macro.
7839         (BISONFLAGS): Likewise.
7840         (JAVABISONFLAGS): Likewise.
7841
7842 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
7843
7844         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7845         argument on the first pass for CNI as well as JNI.
7846         (print_method_info): Set up method name on the first pass only.
7847
7848 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7849
7850         * parse.y (parser_qualified_classname): Removed parameter
7851         `is_static'.
7852         (create_interface): Removed first passed parameter to
7853         parser_qualified_classname.
7854         (create_class): Likewise. Don't install alias on static
7855         innerclasses. Fixes gcj/275.
7856
7857 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7858
7859         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7860         debugable statement with empty_stmt_node. Fixes gcj/272
7861
7862 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7863
7864         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7865         gcj/271.
7866
7867 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7868
7869         * jcf-write.c (push_long_const): Appropriately cast short negative
7870         constant to jword.
7871
7872 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7873
7874         * parse.y (verify_constructor_super): Use loop variable
7875         `m_arg_type' initialized with `mdecl_arg_type'.
7876
7877 2000-06-29  Tom Tromey  <tromey@cygnus.com>
7878
7879         * parse.y (resolve_field_access): Handle case where `type_found'
7880         is NULL.
7881
7882 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7883
7884         * expr.c (lookup_field): The same field can be found through two
7885         different interface. Don't declare it ambiguous in that case.
7886
7887 2000-06-27  Tom Tromey  <tromey@cygnus.com>
7888
7889         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
7890         follows \r, then unget it at a lower level.
7891
7892 2000-06-26  Tom Tromey  <tromey@cygnus.com>
7893
7894         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7895         java_complete_tree.
7896
7897 2000-06-25  Tom Tromey  <tromey@cygnus.com>
7898
7899         * parse.y (for_statement): Wrap expression in a WFL if it is a
7900         constant.  For PR gcj/268.
7901
7902 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7903
7904         * parse.y (do_resolve_class): Minor optimiztion in the package
7905         list search. Removed unnecessary test and return statement.
7906         (valid_ref_assignconv_cast_p): Order of arguments to
7907         enclosing_context_p fixed.
7908
7909 2000-06-24  Tom Tromey  <tromey@cygnus.com>
7910
7911         * expr.c (lookup_field): Print error and return error_mark_node if
7912         field reference is ambiguous.
7913
7914         * parse.y (check_abstract_method_definitions): Also check if
7915         `other_method' is abstract.
7916
7917 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7918
7919         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7920         classes.
7921         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7922         (struct lang_type): New field `pic'.
7923         (CLASS_PRIVATE): New macro.
7924         * parse.y (check_inner_class_access): New function.
7925         (jdep_resolve_class): Call it.
7926
7927 2000-06-23  Tom Tromey  <tromey@cygnus.com>
7928
7929         * parse.y (patch_incomplete_class_ref): Initialize the returned
7930         class.  For PR gcj/260.
7931
7932 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7933
7934         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7935
7936 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7937
7938         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7939         Java specific checks.
7940         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7941         screened by DECL_P.
7942         * java-tree.def (CASE_EXPR): Marked 'e'.
7943         (DEFAULT_EXPR): Likewise.
7944         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7945         screened by DECL_P.
7946         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7947         Java specific checks.
7948         (generate_bytecode_insns): Test try_block for BLOCK before using
7949         BLOCK_EXPR_BODY.
7950         * parse.y (build_wfl_wrap): Added `location' argument. Set
7951         EXPR_WFL_LINECOL accordingly.
7952         (dim_expr:): Wrap constants with WFLs.
7953         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7954         (resolve_package): Check for `stmt' not being a BLOCK before
7955         building a debuggable statement with it.
7956         (make_qualified_primary): Added extra parameter to build_wfl_wrap
7957         invocation.
7958         (resolve_field_access): Make sure `decl' is a DECL before treating
7959         it as such.
7960         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7961         IDENTIFIER_NODE before treating it as such.
7962         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7963         treating it as such.
7964         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7965         to be applied only on non array types.
7966
7967 2000-06-16  Per Bothner  <per@bothner.com>
7968
7969         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
7970         define in terms of DECL_RESULT, as that fails when --enable-checking.
7971
7972 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7973
7974         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
7975         types the same in comparison.
7976         (CHECK_OP): Add static prototype.
7977
7978 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7979
7980         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7981         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7982         * parse.c: Rebuilt.
7983
7984 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7985
7986         * decl.c (create_primitive_vtable): Prototype.
7987
7988         * jcf-write.c (generate_bytecode_insns): Initialize variable
7989         `saved_context'.
7990
7991         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7992
7993 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7994
7995         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7996         to track searched classes, and do not search the same class more than
7997         once. Call find_applicable_accessible_methods_list on immediate
7998         superclass, instead of search_applicable_method_list on all ancestors.
7999         Fix for PR gcj/238.
8000
8001 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
8002
8003         * parse.y (register_fields): Permit static fields in inner classes
8004         if they are final. Fix for PR gcj/255.
8005
8006 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8007
8008         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
8009         * parse.y (find_in_imports): Returned type changed to void,
8010         leading comment fixed.
8011         (register_package): New function.
8012         (qualify_and_find): Likewise.
8013         (package_declaration:): Use `register_package'.
8014         (single_type_import_declaration:): Removed local variable
8015         `node'. Added missing `;' for consistency.
8016         (type_import_on_demand_declaration:): Use `chainon' to link new
8017         entries.
8018         (lookup_field_wrapper): Lookup local variables defined in outer
8019         contexts first.
8020         (java_complete_class): Don't reverse the list of imported on demand.
8021         (do_resolve_class): Reorganized. Removed local variable
8022         `original_name'. Call `qualify_and_find' with the current package
8023         name, invoke `find_in_imports_on_demand' right after. Call
8024         `qualify_and_find' with the packages we've seen so far. Fixed
8025         operations numbering in comments.
8026         (java_expand_class): Don't reverse `package_list'.
8027         (find_most_specific_methods_list): New local variables `abstract'
8028         and `candidates'. Use them to pick the right method.
8029
8030 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
8031
8032         * parse.y (check_modifiers_consistency): Don't subtract out
8033         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
8034
8035 2000-06-04  Philipp Thomas  <pthomas@suse.de>
8036
8037         * Makefile.in (INTLLIBS): New.
8038         (LIBS): Add above.
8039         (DEPLIBS): Ditto.
8040
8041 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8042
8043         * class.c (get_dispatch_table): Build the vtable dummy entry list
8044         element with a null purpose. Fixed leading comment.
8045         (build_dtable_decl): Build an accurate dtable type when appropriate
8046         and use it.
8047
8048 2000-06-02  Richard Henderson  <rth@cygnus.com>
8049
8050         * lang.c (lang_get_alias_set): New.
8051
8052 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8053
8054         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
8055         before using it as the accessed field.
8056
8057 2000-05-31  Tom Tromey  <tromey@cygnus.com>
8058
8059         * java-tree.h (boolean_array_vtable, byte_array_vtable,
8060         char_array_vtable, short_array_vtable, int_array_vtable,
8061         long_array_vtable, float_array_vtable, double_array_vtable):
8062         Declare.
8063         * expr.c (get_primitive_array_vtable): New function.
8064         (create_primitive_vtable): New function.
8065         (java_lang_expand_expr): Enable code to statically generate
8066         arrays.
8067         * decl.c (init_decl_processing): Create primitive vtables.
8068         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
8069         short_array_vtable, int_array_vtable, long_array_vtable,
8070         float_array_vtable, double_array_vtable): Define.
8071
8072 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
8073
8074         * java/parse.y (find_applicable_accessible_methods_list):
8075         Don't add an uninitialized value to the list.
8076
8077 2000-05-25  Tom Tromey  <tromey@cygnus.com>
8078
8079         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
8080         when trying to see if field's class should be initialized.  Always
8081         initialize field's declaring class, not qualified class.
8082         For PR gcj/162.
8083
8084         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
8085         `wfl_operator', to maybe_build_primttype_type_ref.
8086         Fixes PR gcj/235.
8087
8088 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
8089
8090        * parse.y (patch_method_invocation): Don't try to lookup methods
8091        in primitive types.
8092
8093 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8094
8095         * parse.y (resolve_field_access): Call the appropriate <clinit>
8096         before accessing the length of a static array. Craft a decl for
8097         the field while its time. Fixes PR gcj/129.
8098
8099 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8100
8101         * parse.y (resolve_package): Correctly set `*next' (was off by
8102         one.)
8103         (resolve_qualified_expression_name): Fixed comment.
8104
8105 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8106
8107         * jcf-parse.c (jcf_parse_source): Reset current_class and
8108         current_function_decl to NULL before parsing a new file.
8109
8110 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8111
8112         * parse.y (block_end:): If the collected block doesn't feature a
8113         statement, insert an empty statement.
8114
8115 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8116
8117         * parse.y (maybe_yank_clinit): New function.
8118         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
8119         end of the list of methods belonging to a class.
8120         (java_complete_expand_method): Check whether <clinit> is really
8121         necessary and expand it accordingly.
8122
8123 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8124
8125         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
8126         processed by the method's switch statement.
8127
8128 2000-05-19  Tom Tromey  <tromey@cygnus.com>
8129
8130         * java-tree.h: Added init state enum.
8131         * decl.c (emit_init_test_initialization): Initialize class
8132         initialization check variable by looking at class' state.
8133
8134 2000-05-19  Tom Tromey  <tromey@cygnus.com>
8135
8136         * java-tree.h (build_instanceof): Declare.
8137         (build_get_class): Declare.
8138         * parse.y (patch_binop): Use build_instanceof.
8139         * expr.c (build_instanceof): New function.  If class is final,
8140         don't make a function call.
8141         (expand_java_INSTANCEOF): Use it.
8142         (build_get_class): New function.
8143
8144 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
8145
8146         * jcf-write.c (generate_classfile): Scan the source_file for
8147         slashes with the right pointer variable.
8148
8149 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
8150
8151         * lang.c (lang_decode_option): Update -Wunused flags by calling
8152         set_Wunused.
8153         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
8154
8155 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
8156
8157         * check_init.c (check_init): Constify local char *.
8158         * class.c (push_class): Constify local char *.
8159         * java_tree.h: Update prototypes.
8160         * jcf-io.c (open_class): Constify filename parameter and
8161         return value.
8162         (find_class): Remove redundant string copy.  Cast return from
8163         open_class.
8164         * jcf-parse.c (read_class, parse_class_file, yyparse):
8165         Constify local char *.
8166         * jcf-write.c (generate_bytecode_insns, generate_classfile):
8167         Constify local char *.
8168         * jcf.h (JCF): Constify filename and classname.
8169         (JCF_FINISH): Cast args to FREE to char * when appropriate.
8170         * lang.c (init_parse): Constify parameter and return value.
8171         * lex.c (java_get_line_col): Constify filename parameter.
8172         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
8173         * parse.y (java_parser_context_suspend,
8174         issue_warning_error_from_context, safe_layout_class): Constify
8175         local char *.
8176         * parse.c: Regenerate.
8177
8178 2000-05-08  Tom Tromey  <tromey@cygnus.com>
8179
8180         * expr.c (build_jni_stub): Cache the result of
8181         _Jv_LookupJNIMethod.
8182
8183 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8184
8185         * decl.c (predef_filenames_size): Now 7.
8186         (predef_filenames): New seventh entry.
8187
8188 2000-05-04  Tom Tromey  <tromey@cygnus.com>
8189
8190         * boehm.c (mark_reference_fields): Don't mark RawData fields.
8191         Keep track of when we've seen a reference field after a
8192         non-reference field.
8193         (get_boehm_type_descriptor): Handle case where we see
8194         non-reference fields but no trailing reference field.
8195         * decl.c (rawdata_ptr_type_node): Define.
8196         (init_decl_processing): Initialize rawdata_ptr_type_node.
8197         * java-tree.h (rawdata_ptr_type_node): Declare.
8198
8199 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8200
8201         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
8202         specifiers in calls to fprintf.
8203
8204 2000-05-03  Andrew Haley  <aph@cygnus.com>
8205
8206         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
8207
8208         * javaop.h (WORD_TO_INT): New function.
8209         (IMMEDIATE_s4): Use WORD_TO_INT.
8210         * jcf.h (JPOOL_INT): Ditto.
8211
8212         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
8213         separator.
8214
8215 2000-04-19  Tom Tromey  <tromey@cygnus.com>
8216
8217         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
8218         on native function.
8219         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
8220         JNI methods.
8221         * expr.c (build_jni_stub): New function.
8222         * lang-specs.h: -fjni and -femit-class-file are incompatible.
8223         * parse.c: Rebuilt.
8224         * parse.y (java_complete_expand_methods): Expand a native method
8225         and call build_jni_stub if -fjni given.
8226         * lang-options.h: Document -fjni.
8227         * lang.c (flag_jni): New global.
8228         (lang_f_options): Added `jni' entry.
8229         * java-tree.h (soft_lookupjnimethod_node,
8230         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
8231         Declare.
8232         (flag_jni): Declare.
8233         (build_jni_stub): Declare.
8234         (struct lang_decl): Added `native' flag.
8235         (METHOD_NATIVE): Redefined to use `native' field of lang specific
8236         structure.
8237         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
8238         soft_jnipopsystemframe_node): New globals.
8239         (init_decl_processing): Set them.  _Jv_InitClass only takes one
8240         argument.
8241
8242         * java-tree.def: Put into `C' mode.
8243
8244 2000-04-27  Tom Tromey  <tromey@cygnus.com>
8245
8246         Fix for PR gcj/2:
8247         * expr.c (expand_invoke): Generate check to see if object pointer
8248         is null in nonvirtual invocation case.
8249         * java-tree.h (soft_nullpointer_node): Declare.
8250         * decl.c (soft_nullpointer_node): New global.
8251         (init_decl_processing): Initialize soft_nullpointer_node.
8252         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8253         or `private' methods.
8254         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8255
8256 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8257
8258         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8259         from <clinit>
8260
8261 2000-04-26  Tom Tromey  <tromey@cygnus.com>
8262
8263         * zextract.c (find_zip_file_start): New function.
8264         (read_zip_archive): Use it.
8265
8266 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8267
8268         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
8269
8270 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8271
8272         * class.c (common_enclosing_context_p): New function.
8273         * java-tree.h (common_enclosing_context_p): Added prototype.
8274         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
8275         classes sharing an outer context with the current instance.
8276         * parse.y (build_access_to_thisn): Fixed leading comment.
8277         (verify_constructor_super): New local `supper_inner'. Skip
8278         enclosing context argument in the case of inner class constructors.
8279         (patch_method_invocation): Insert proper context as second
8280         parameter to pure inner class constructor super invocations.
8281
8282 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8283
8284         * parse.y (end_class_declaration): Reset the interface number
8285         counter.
8286
8287 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8288
8289         * parse.y (source_start_java_method): Deleted unnecessary code.
8290         (patch_method_invocation): Fixed comment.
8291
8292 2000-04-24  Robert Lipe <robertlipe@usa.net>
8293
8294         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
8295
8296 2000-04-23  Tom Tromey  <tromey@cygnus.com>
8297
8298         * boehm.c (mark_reference_fields): Use int_byte_position.
8299
8300 2000-04-22  Tom Tromey  <tromey@cygnus.com>
8301
8302         * boehm.c (mark_reference_fields): Only call byte_position on
8303         non-static fields.
8304
8305 2000-04-22  Tom Tromey  <tromey@cygnus.com>
8306
8307         * boehm.c (mark_reference_fields): Added `last_view_index'
8308         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
8309
8310 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
8311
8312         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
8313         * parse.y (check_class_interface_creation): Fixed comments. Select
8314         permitted modifiers for (inner) interfaces. Changed error message
8315         to report rejected modifiers used with local classes.
8316
8317 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8318
8319         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
8320         of directly inherited type considered in scope.
8321         * parse.y (do_resolve_class): Search inherited classes for inner
8322         classes.
8323
8324 2000-04-20  Tom Tromey  <tromey@cygnus.com>
8325
8326         * parse.y (not_accessible_p): Use member's class, not current
8327         class, when doing inheritance check for protected reference.
8328         Fixes PR gcj/124.
8329
8330 2000-04-20  Jason Schroeder  <shrode@subnature.com>
8331
8332         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8333
8334 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8335
8336         * parse.y (lookup_field_wrapper): Search for final local aliases.
8337         (resolve_expression_name): Let lookup_field_wrapper search for
8338         final local aliases. Force the value of `name' if one is found.
8339         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8340         an expression name. Fixed comments.
8341
8342 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8343
8344         * parse.y (yyerror): `msg' can be null, don't use it in that case.
8345
8346 2000-04-19  Tom Tromey  <tromey@cygnus.com>
8347
8348         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8349
8350 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8351
8352         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8353
8354 2000-04-18  Tom Tromey  <tromey@cygnus.com>
8355
8356         PR gcj/211:
8357         * gjavah.c (utf8_cmp): Changed return value.
8358         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
8359         result.
8360         (cxx_keywords): New global.
8361         (get_field_name): Handle new result of cxx_keyword_subst.
8362         (print_method_info): Likewise.
8363
8364 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
8365
8366         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8367         with a newline, for CNI.
8368         (print_stub_or_jni): Print a space or newline before method name for
8369         CNI as well as JNI.
8370         (print_cxx_classname): Don't write leading "::" in CNI stub method.
8371         (process_file): Include gcj/cni.h if generating CNI stubs.
8372
8373 2000-04-16  Tom Tromey  <tromey@cygnus.com>
8374
8375         * gjavah.c (decompile_method): Use print_field_name.
8376         Fixes PR gcj/205.
8377
8378 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8379
8380         * parse.y (java_expand_classes): Reverse the package list once.
8381         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8382         reduction.
8383         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8384         the `==' and `!=' operators.
8385
8386 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8387
8388         * jcf-write.c (generate_bytecode_insns): At invocation time,
8389         always relate an interface method to the type of its selector.
8390
8391 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8392
8393         Fix for PR gcj/2:
8394         * expr.c (expand_invoke): Generate check to see if object pointer
8395         is null in nonvirtual invocation case.
8396         * java-tree.h (soft_nullpointer_node): Declare.
8397         * decl.c (soft_nullpointer_node): New global.
8398         (init_decl_processing): Initialize soft_nullpointer_node.
8399         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8400         or `private' methods.
8401         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8402
8403 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8404
8405         Fix for PR gcj/140:
8406         * parse.y (check_final_assignment): Recognize assignments to the
8407         `length' field of an array when generating class files.
8408
8409 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8410
8411         * class.c (decl_hash): Prototype removed.
8412         (decl_compare): Likewise.
8413
8414 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8415
8416         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8417         * parse.y (check_modifiers_consistency): Check for final/volatile
8418         clash.  Fixes PR gcj/164.
8419
8420 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8421
8422         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8423         made global.
8424         (java_hash_compare_tree_node): Renamed from `decl_compare, made
8425         global.
8426         (add_method_1): Use `java_hash_hash_tree_node' and
8427         `java_hash_compare_tree_node'.
8428         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8429         (java_hash_compare_tree_node): Likewise.
8430         * parse.y (find_applicable_accessible_methods_list): Create,
8431         delete and use a hash table to remember already searched interfaces.
8432
8433 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
8434
8435         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8436         with latest entry.
8437
8438 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8439
8440         * boehm.c (mark_reference_fields, set_bit): Prototype.
8441         (set_bit): Un-ANSI-fy definition.
8442
8443         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8444         Prototype.
8445
8446         * decl.c (emit_init_test_initialization): Likewise.
8447
8448         * gjavah.c (jni_print_char): Likewise.
8449
8450         * parse.y (create_new_parser_context): Likewise.
8451
8452 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8453
8454         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8455         patch missing hunk. Fixed indentation.
8456
8457 2000-03-30  Tom Tromey  <tromey@cygnus.com>
8458
8459         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8460         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8461
8462 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8463
8464         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8465         when negative *before* using it as an array index.
8466         * ChangeLog: Fixed typo.
8467
8468 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8469
8470         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8471         to 0 when it reaches -1.
8472
8473 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8474
8475         * jcf-parse.c (get_constant): Properly cast `num' during the
8476         invocation of `add_double'.
8477         * jcf-write.c (push_long_const): Properly cast `lo' before
8478         comparing it to short bounds.
8479         * parse-scan.y (interface_declaration:): Rule re-arrange so that
8480         `interface_body:' is reduced after the current interface is
8481         pushed.
8482
8483 2000-03-26  Tom Tromey  <tromey@cygnus.com>
8484
8485         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8486         Java-specific `-f' option.
8487
8488 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8489
8490         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8491         Adjust order of making types.
8492         Make bitsize_*_node values.
8493
8494 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8495
8496         * class.c (make_field_value): Use byte_position.
8497         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8498         (java_array_data_offset): Likewise.
8499         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8500         bzero call.
8501
8502 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8503
8504         * parse.y (check_abstract_method_definitions): New local
8505         `end_type_reached'. Make sure we also consider `end_type'.
8506         (java_check_abstract_method_definitions): Make sure we eventually
8507         consider `java.lang.Object'.
8508         (maybe_use_access_method): Don't use access method if not in the
8509         context of a pure inner class or if the method's context is right.
8510         (find_applicable_accessible_methods_list): New static flag
8511         `object_done'. Don't search abstract classes as interfaces. Fixed
8512         indentation. Fixed the `java.lang.Object' only search. Search
8513         class interface(s) first, then fully search enclosing contexts.
8514         (find_most_specific_methods_list): Pick the closest candidate when
8515         they're all abstract.
8516
8517 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8518
8519         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8520         properly initialize `finished_label'. Don't emit gotos for empty
8521         try statements.
8522
8523 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8524
8525         * except.c (emit_handlers): Clear catch_clauses_last.
8526
8527 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8528
8529         * parse.y (check_method_types_complete): New function.
8530         (create_class): Reset anonymous class counter only when seeing an
8531         non inner classe.
8532         (java_complete_class): JDEP_METHOD: Don't recompute signature
8533         if incomplete.
8534
8535 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8536
8537         * class.c (build_static_ref): Fixed indentation in comment.
8538         * java-tree.def (TRY_EXPR): Fixed typo in name.
8539         (CLASS_LITERAL): Likewise.
8540         * java-tree.h: (TYPE_DOT_CLASS): New macro.
8541         (struct lang_type): New field `dot_class'.
8542         * jcf-write.c (generate_bytecode_insns): Fixed error message.
8543         (generate_classfile): Method `class$' is synthetic.
8544         * parse.y (build_do_class_method): New function.
8545         (build_dot_class_method_invocation): Likewise.
8546         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8547         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8548         (qualify_ambiguous_name): Likewise.
8549         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8550         (build_try_statement): Fixed leading comment.
8551
8552 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8553
8554         * class.c (make_field_value): Properly handle sizes.
8555         (get_dispatch_vector): Use tree_low_cst and host_integerp.
8556         (layout_class_method): Count using trees.
8557         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8558         * expr.c (java_array_data_offset): Use int_bit_position.
8559         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8560         (build_invokevirtual): Use tree_low_cst and do computations with trees.
8561
8562 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8563
8564         * lang.c (flag_hash_synchronization): New global.
8565         (lang_f_options): Added `hash-synchronization'.
8566         * lang-options.h: Mention -fhash-synchronization.
8567         * java-tree.h (flag_hash_synchronization): Declare.
8568         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8569         hash table synchronization is disabled.
8570         * decl.c (init_decl_processing): Only push `sync_info' value when
8571         hash table synchronization is disabled.
8572         * class.c (make_class_data): Only push `sync_info' field when hash
8573         table synchronization is disabled.  Removed dead code.
8574
8575 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8576
8577         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8578
8579 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8580
8581         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8582         classes.
8583         * parse.y (patch_method_invocation): Handle anonymous classes
8584         creation in static context.
8585
8586 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8587
8588         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8589         * parse.y (resolve_qualified_expression_name): Use it.
8590         (patch_method_invocation): Likewise.
8591
8592 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8593
8594         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8595         depending on the type of dependency which dictates what the
8596         current class is.
8597         (unresolved_type_p): Resolved types limited to the current class.
8598
8599 2000-03-15  Tom Tromey  <tromey@cygnus.com>
8600
8601         * decl.c (init_decl_processing): Set type of `sync_info' to be
8602         pointer to Object.
8603
8604         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8605         Correctly compute bit number for current slot.  Zero `high' and
8606         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
8607         mark_reference_fields.
8608         (mark_reference_fields): New function.
8609
8610 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8611
8612         * parse.y (register_incomplete_type): Fixed initialization of
8613         JDEP_ENCLOSING.
8614
8615 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8616
8617         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8618         static globals.
8619         (push_class_context, pop_class_context): New function.
8620         (class_body:): Call pop_class_context.
8621         (interface_body:): Likewise.
8622         (INNER_QUALIFIER): New macro.
8623         (report_class_declaration): Changed output format and use
8624         INNER_QUALIFIER. Call push_class_context.
8625
8626 2000-02-14  Andrew Haley  <aph@cygnus.com>
8627
8628         * check-init.c (check_init): Add new cases for unary and binary
8629         tree nodes.
8630
8631 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8632
8633         * parse.y (resolve_package): Set `next' once a type name has been
8634         progressively discovered.
8635         (resolve_qualified_expression_name): Propagate resolution only if
8636         there are remaining qualifiers. Take into account `q' might have
8637         been cleared after re-qualification.
8638         * parse.y (patch_method_invocation): New local `resolved'.
8639         Section dealing with qualified expression rewritten to use
8640         resolve_field_access.
8641
8642 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8643
8644         * parse.h (PUSH_CPC): Fixed indentation.
8645         (DEBUG_CPC): New macro.
8646         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8647         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8648         * parse.y (class_body_declaration:): Use
8649         SET_CPC_INSTANCE_INITIALIZER_STMT.
8650         (method_declaration:): Check for null current_function_decl.
8651         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8652         (java_parser_context_pop_initialized_field): Better handling of
8653         empty lists.
8654         (maybe_make_nested_class_name): Mark nested class name as
8655         qualified when necessary.
8656         (end_class_declaration): Don't call java_parse_context_resume when
8657         one or more error occurred.
8658         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8659         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8660         SET_CPC_INITIALIZER_STMT.
8661         (method_header): Check for inner classes declaring static methods.
8662         (resolve_qualified_expression_name): Handle situation where `this'
8663         is implied.
8664
8665 2000-03-13  Hans Boehm <boehm@acm.org>
8666
8667         * typeck.c (build_prim_array_type): Correctly set the high word too.
8668
8669 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8670
8671         * parse.y (java_complete_expand_methods): Leave <clinit> out of
8672         ordinary methods.
8673         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8674         list of methods for interfaces.
8675
8676 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8677
8678         * parse.y (qualify_ambiguous_name): Properly handle expressions
8679         using `null'.
8680
8681 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8682
8683         * parse.y (check_final_assignment): Extended to process
8684         COMPOUND_EXPR.
8685         (patch_assignment): Have check_final_assignment called only once.
8686
8687 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8688
8689         * java-tree.h (IS_INIT_CHECKED): New flag.
8690         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8691         * parse.y (patch_string): Call force_evaluation_order on the
8692         completed string concatenation tree.
8693         * expr.c (force_evaluation_order): Call force_evaluation_order on
8694         function's arguments too.
8695
8696 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8697
8698         * decl.c (emit_init_test_initialization): Mark KEY as unused.
8699         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8700         (build_anewarray): Likewise.
8701         * parse.y (patch_newarray): Likewise.
8702         * parse.c: Regenerated.
8703
8704 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
8705
8706         * decl.c (init_decl_processing): Added new class fields `depth',
8707         `ancestors', and `idt' to class_type_node. Use
8708         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8709         * class.c (make_class_data): Push initial values for new fields.
8710         * java-tree.h: Updated prototype for `build_invokeinterface'.
8711         * expr.c (build_invokeinterface): Changed parameters to accept
8712         `method' tree. Calculate index of `method' in its declaring
8713         interface. Build call to _Jv_LookupInterfaceMethodIdx.
8714         (expand_invoke): Call `build_invokeinterface' with new parameters.
8715         * parse.y (patch_invoke): Call `build_invokeinterface' with new
8716         parameters.
8717
8718 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
8719
8720         * typeck.c (lookup_do): Search superinterfaces first
8721         when looking up an interface method. From Godmar Back
8722         <gback@cs.utah.edu>
8723
8724 2000-03-06  Tom Tromey  <tromey@cygnus.com>
8725
8726         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8727
8728 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8729
8730         * java-tree.h (lookup_argument_method2): Declared.
8731         (safe_layout_class): Prototype moved from parse.h.
8732         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8733         * parse.y (java_check_regular_methods): Local `super_class' gone.
8734         Call lookup_argument_method2 instead of lookup_argument_method.
8735         Perform modifier match for methods found declared in implemented
8736         interfaces. Fixed indentation problem. Overriding/hiding error
8737         report to take place only for methods found in classes.
8738         * typeck.c (lookup_argument_method): Changed leading
8739         comment. Re-written by calling lookup_do.
8740         (lookup_argument_method2): New function.
8741         (lookup_java_method): Re-written by calling lookup_do.
8742         (lookup_do): New function.
8743
8744 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8745
8746         * check-init.c (check_init): Removed dead code. Handle (blank)
8747         final variables.
8748         * parse.y (declare_local_variables): New local `final_p', set it
8749         and use it to initialize LOCAL_FINAL.
8750         (check_final_assignment): Only check FIELD_DECLs.
8751
8752 2000-02-17  Tom Tromey  <tromey@cygnus.com>
8753
8754         * Makefile.in (JAVA_OBJS): Added boehm.o.
8755         (boehm.o): New target.
8756         * Make-lang.in (JAVA_SRCS): Added boehm.c.
8757         * java-tree.h (flag_use_boehm_gc): Declare.
8758         (get_boehm_type_descriptor): Declare.
8759         * lang.c (lang_f_options): Added `use-boehm-gc'.
8760         (flag_use_boehm_gc): New global.
8761         * lang-options.h: Added -fuse-boehm-gc.
8762         * boehm.c: New file.
8763         * class.c (get_dispatch_table): If class uses a Boehm type
8764         descriptor, put it in the vtable.
8765         (make_class_data): Removed dead code.
8766
8767 2000-03-03  Per Bothner  <per@bothner.com>
8768
8769         * decl.c (init_decl_processing):  Initialize sizetype properly.
8770
8771 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8772
8773         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8774         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8775         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8776         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8777         (jcf_parse): New local `current'. Load innerclasses seen in outer
8778         context being processed.
8779         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8780         * jcf-write.c (append_innerclasses_attribute): New function.
8781         (append_innerclasses_attribute_entry): Likewise.
8782         (get_access_flags): Handle static classes. Set anonymous and local
8783         classes to be private.
8784         (generate_classfile): Attribute count adjusted. Call
8785         append_innerclasses_attribute.
8786         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8787         PURE_INNER_CLASS_TYPE_P.
8788         * parse.y (parser_qualified_classname): New parameter `is_static',
8789         produce non qualified name accordingly.
8790         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8791         (create_interface): Added argument to parser_qualified_classname.
8792         (create_class): Added argument to parser_qualified_classname. Setup
8793         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8794         (add_inner_class_fields): Fixed indentation.
8795         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8796         (method_declarator): Fixed typo in comment.
8797         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8798         (build_current_thisn): Likewise.
8799         (patch_method_invocation): Likewise.
8800
8801 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8802
8803         * decl.c (current_function_decl): Move to toplev.c.
8804
8805 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8806
8807         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8808         (DECL_BIT_INDEX): Use underlying representation.
8809         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8810
8811 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8812
8813         * expr.c (build_java_ret): Pass proper type to size_binop.
8814
8815 2000-02-25  Anthony Green  <green@cygnus.com>
8816
8817         * expr.c (build_class_init): Mark the decl to be ignored by
8818         check_init.
8819         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8820         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8821         * class.c (init_test_hash_newfunc): New function.
8822         (decl_hash): New function.
8823         (decl_compare): New function.
8824         * decl.c (emit_init_test_initialization): New function.
8825         (complete_start_java_method): Traverse the init test hashtable,
8826         calling emit_init_test_initialization.
8827         (always_initialize_class_p): Define.
8828         * expr.c (build_class_init): Use initialization tests when
8829         emitting class initialization code.
8830         (always_initialize_class_p): Declare.
8831         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8832         1.
8833         * java-tree.h: Include hash.h.
8834         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8835         (struct lang_decl): Add init_test_table field.
8836         (init_test_hash_entry): Define.
8837
8838 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8839
8840         * gjavah.c (main): Avoid using `argi' to report unimplemented
8841         options.
8842
8843 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8844
8845         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8846         initialize locals to avoid warnings. Local `exception_type' moved
8847         into if statement.
8848
8849 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8850
8851         * parse.y (resolve_expression_name): Use `orig' as a second
8852         argument to resolve_field_access.
8853         (resolve_field_access): Removed unnecessary code when dealing with
8854         static fields.
8855
8856 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8857
8858         * class.c (push_super_field): Don't push the field twice.
8859         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8860         * parse.h (java_reorder_fields): Prototyped.
8861         * parse.y (java_reorder_fields): New function.
8862         (java_layout_class): Simplified not to worry about re-ordering.
8863
8864 2000-02-23  Tom Tromey  <tromey@cygnus.com>
8865
8866         * gjavah.c (print_name): In JNI case, correctly quote string.
8867         (print_method_info): Don't handle overrides in JNI mode.
8868
8869 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8870
8871         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8872         value type set to `boolean_type_node'.
8873
8874 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8875
8876         * jcf-dump.c (main): Test for correct condition after
8877         output file creation.
8878
8879 2000-02-19  Anthony Green  <green@cygnus.com>
8880
8881         * jcf-depend.c (add_entry): Fix test for first list entry.
8882
8883 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8884
8885         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8886         * constants.c (build_constants_constructor): Likewise.
8887
8888 2000-02-19  Anthony Green  <green@cygnus.com>
8889
8890         * jcf-depend.c (add_entry): Add entries to the end of the list.
8891
8892 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
8893
8894         * decl.c (INT_TYPE_SIZE): Define if necessary.
8895         (expand_java_return): Handle the case of a native integer smaller
8896         than a JVM integer.
8897
8898 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8899
8900         * gjavah.c (help): Use GCCBUGURL.
8901         * jv-scan.c (help): Likewise.
8902         * jcf-dump.c (help): Likewise.
8903
8904 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8905
8906         * jcf-write.c (generate_bytecode_insns): Don't generate empty
8907         `finally' clauses.
8908
8909 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8910
8911         * jcf-parse.c (load_class): Call `fatal' if no file containing
8912         the target class are found.
8913
8914 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
8915
8916         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8917         lex.c, lex.h, and PARSE_H to...
8918         (parse.o, parse-scan.o): ...here, respectively.
8919
8920         * lex.c: Split out code that may trigger SIGFPE from yylex()
8921         to its own function.
8922         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8923
8924 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8925
8926         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8927
8928 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8929
8930         * parse.y (outer_field_access_p): Stop in time when outer contexts
8931         are exhausted.
8932         (resolve_qualified_expression_name): Properly qualify *everything*
8933         after a package.type to be resoled as expression names.
8934         (find_applicable_accessible_methods_list): Save/restore `class' to
8935         isolate it from a possible outer context search.
8936
8937 2000-02-15  Tom Tromey  <tromey@cygnus.com>
8938
8939         * gjavah.c (jni_print_char): New function.
8940         (print_full_cxx_name): Use it.
8941         (decode_signature_piece): Likewise.
8942         (print_cxx_classname): Likewise.
8943
8944 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8945
8946         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8947         version.o.
8948         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8949
8950         * gjavah.c: Include version.h.
8951
8952         * jcf-dump.c: Likewise.
8953
8954         * jv-scan.c: Likewise.
8955
8956 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8957
8958         * parse.y (outer_field_access_fix): First parameter now a tree
8959         node. Check for assignment to final. First argument to
8960         build_outer_field_access_fix modified to accommodate prototype.
8961         (build_outer_field_access): Don't check for assignment to final
8962         here.
8963         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8964         possibly returned by outer_field_access_fix. Changed
8965         outer_field_access_fix's first argument.
8966         (check_final_assignment): $finit$'s context is OK.
8967         (patch_unaryop): Use node instead of its line/column value when
8968         calling outer_field_access_fix.
8969
8970 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8971
8972         * parse.y (interface_declaration:): No longer tagged
8973         <node>. Re-installed default action.
8974         (class_member_declaration:): Handle inner interfaces.
8975         (interface_member_declaration): Handle inner interfaces and
8976         classes.
8977         (create_interface): Push error if one seen. Suspend parsing
8978         context when processing an inner interface.
8979         (register_fields): Inner class static field limitations not to
8980         apply to inner interfaces.
8981
8982 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8983
8984         * jcf-parse.c (load_class): Update `java_error_count' when a
8985         class' file can't be found.
8986         (parse.y): Avoid (byte)code generation when errors seen.
8987
8988 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8989
8990         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8991         decodes a valid node.
8992         (patch_binop): Handle TRUNC_DIV_EXPR.
8993
8994 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8995
8996         * parse.y (resolve_package): New local `acc'. Try to progressively
8997         build and guess a package and type name.
8998
8999 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9000
9001         * parse.y (find_applicable_accessible_methods_list): Load and
9002         layout the search class if necessary.
9003         (java_complete_tree): Keep to original type of the folded initial
9004         value.
9005
9006 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9007
9008         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
9009         Generate error message if circularity is detected. New static
9010         local `list'.
9011         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
9012         * jcf-write.c (generate_bytecode_insns): Very simply handle
9013         SAVE_EXPR.
9014         * parse.y (java_check_circular_reference): Use
9015         `cyclic_inheritance_report' during report, if necessary.
9016         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
9017         walking NEW_ARRAY_INIT twice.
9018
9019 2000-02-09  Tom Tromey  <tromey@cygnus.com>
9020
9021         * parse.y (check_class_interface_creation): Allow inner classes to
9022         be `private' or `protected', check modifiers' consistency. Prevent
9023         block local classes from bearing any modifiers.
9024
9025 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9026
9027         * except.c (check_start_handlers): Re-add prototype lost in last
9028         patch.
9029         (maybe_start_try): Remove excess argument to `check_start_handlers'.
9030
9031 2000-02-09  Andrew Haley  <aph@cygnus.com>
9032
9033         * decl.c (clear_binding_level): Remove excess initializer.
9034         (maybe_poplevels): Remove unused variable.
9035         (force_poplevels): Ditto.
9036         (struct binding_level): Add comment.
9037
9038 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9039
9040         * jcf-write.c (generate_classfile): Don't consider
9041         pre-initialization with reference value (use <clinit> instead.)
9042         * parse.y (java_fix_constructors): No generated constructor for
9043         interfaces.
9044         (build_outer_field_access): Removed debug message.
9045         (outer_field_expanded_access_p): Adapted to bytecode generation.
9046         (build_outer_field_access_method): Use fix_method_argument_names.
9047         (build_outer_method_access_method): Fixed indentation. Added
9048         comment. Handle access method generation for static and also void
9049         methods.
9050         (build_access_to_thisn): Inserted debug message.
9051         (maybe_build_thisn_access_method): Use fix_method_argument_names.
9052         (resolve_qualified_expression_name): Fixed comment.
9053         (not_accessible_p): Adapted to bytecode generation. Added comment.
9054         (patch_method_invocation): Added comment.
9055         (maybe_use_access_method): Fixed leading comment. Handle static
9056         methods.
9057         (java_complete_lhs): Don't shortcut handling of initialized upon
9058         declaration String type static fields when generating bytecode.
9059         (patch_unaryop): Handle outer field access when generating
9060         bytecode.
9061
9062 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9063
9064         * java-tree.h (FIELD_THISN): New macro.
9065         * jcf-write.c (append_synthetic_attribute): New function.
9066         (generate_classfile): Set "Synthetic" attribute on this$<n>,
9067         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
9068         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
9069         this$<n> fields.
9070         (build_outer_field_access): Turned on access functions usage and
9071         generation when compiling to bytecode.
9072         (maybe_use_access_method): Likewise.
9073
9074 2000-01-25  Andrew Haley  <aph@cygnus.com>
9075
9076         * java-except.h (struct eh_range): Add `expanded' field.
9077         (maybe_start_try): Add end_pc arg.
9078         (maybe_end_try): Ditto.
9079         * java-tree.h (force_poplevels): new function.
9080         * expr.c (expand_byte_code): Don't call maybe_start_try or
9081         maybe_end_try.
9082         * except.c (add_handler): Reset expanded.
9083         (expand_start_java_handler): Set expanded.
9084         (check_start_handlers): Don't expand a start handler that's
9085         already been expanded.
9086         (maybe_start_try): Add end_pc arg.  Only expand a handler which
9087         ends after end_pc.
9088         (expand_end_java_handler): call force_poplevels.
9089         (force_poplevels): new function.
9090         * decl.c (binding_level): Add start_pc of binding level.
9091         (maybe_pushlevels): Call maybe_start_try when pushing binding
9092         levels.
9093         (maybe_poplevels): Call maybe_end_try when popping binding levels.
9094         (LARGEST_PC): Define.
9095         (clear_binding_level): Use LARGEST_PC.
9096
9097         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
9098         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
9099         (binding_depth, is_class_level, current_pc): new variables.
9100         (struct binding_level): ditto.
9101         (indent): new function.
9102         (push_jvm_slot): add debugging info.
9103         (maybe_pushlevels): ditto.
9104         (maybe_poplevels): ditto.
9105         (pushlevel): ditto.
9106         (poplevel): ditto.
9107         (start_java_method): ditto.
9108         (give_name_to_locals): comment only.
9109         * except.c (binding_depth, is_class_level, current_pc):
9110         new variables.
9111         (expand_start_java_handler): add debugging info.
9112         (expand_end_java_handler): ditto.
9113
9114 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9115
9116         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
9117         (print_name_for_stub_or_jni, process_file): Constify a char*.
9118
9119 2000-02-03  Tom Tromey  <tromey@cygnus.com>
9120
9121         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
9122
9123 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
9124
9125         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
9126         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
9127         defined to be 1.
9128
9129 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9130
9131         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
9132         * java-tree.h (TYPE_II_STMT_LIST): New macro.
9133         (struct lang_type): New field `ii_block'.
9134         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
9135         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
9136         * parse.h (struct parser_ctxt): New field `instance_initializers'.
9137         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
9138         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
9139         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
9140         macros.
9141         * parse.y (add_instance_initializer): New function.
9142         (in_instance_initializer): New static global.
9143         (class_body_declaration:): Link instance initializer block.
9144         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
9145         (array_creation_expression:): Remove unused local.
9146         (java_parser_context_push_initialized_field): Fixed leading
9147         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
9148         CPC_INSTANCE_INITIALIZER_LIST.
9149         (java_parser_context_pop_initialized_field): Likewise.
9150         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
9151         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
9152         CPC_INITIALIZER_STMT.
9153         (fix_constructors): New local `class_type'. Use it. Call
9154         add_instance_initializer.
9155         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
9156         (patch_return): Forbid return in instance initializers.
9157         (patch_throw_statement): Enforce exception handling in the context
9158         of instance initializers.
9159
9160 2000-02-03  Tom Tromey  <tromey@cygnus.com>
9161
9162         * Make-lang.in (java.mostlyclean): Remove executables in
9163         `mostlyclean'.
9164
9165 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
9166
9167         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
9168         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
9169         (java_float_finite): Convert to use union Word from javaop.h.
9170         (java_double_finite): Convert to use union DWord from javaop.h.
9171
9172 2000-02-02  Tom Tromey  <tromey@cygnus.com>
9173
9174         * gjavah.c (options): Added `jni' entry.
9175         (help): Document -jni.
9176         (flag_jni): New global.
9177         (process_file): Handle JNI output.  Don't print text from
9178         -prepend, -add, etc, when generating stubs.  Only remove `.class'
9179         suffix if it actually exists.
9180         (main): Create a `.c' file when run with `--jni --stubs'.  Create
9181         correct output file name with `--jni'.
9182         (print_include): Mangle header name differently in JNI case.
9183         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
9184         method list.
9185         (print_method_info): Handle JNI case.  Put signature info into
9186         method name.  Handle case when STREAM is NULL.
9187         (print_name_for_stub_or_jni): New function.
9188         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
9189         (print_cxx_classname): Handle JNI.
9190         (print_full_cxx_name): Likewise.
9191         (decode_signature_piece): Likewise.
9192         (overloaded_jni_method_exists_p): New function.
9193         (struct method_name): Added `signature' and `sig_length' fields.
9194         (HANDLE_END_FIELD): Do nothing in JNI mode.
9195
9196 2000-02-02  Tom Tromey  <tromey@cygnus.com>
9197
9198         * jv-scan.c: Include version.c, <getopt.h>.
9199         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
9200         (options): New array.
9201         (usage): New function.
9202         (version): New function.
9203         (main): Use getopt_long to parse command line.
9204         * jcf-dump.c: Include version.c, <getopt.h>.
9205         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
9206         OPT_JAVAP): New macros.
9207         (options): New array.
9208         (usage): Return `void'.  Changed message.
9209         (help): New function.
9210         (version): New function.
9211         (main): Use getopt_long_only to parse command line.
9212         * gjavah.c: Include <getopt.h>.
9213         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
9214         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
9215         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
9216         (options): New array.
9217         (java_no_argument): Removed.
9218         (help): Updated with missing options.
9219         (main): Use getopt_long_only to parse command line.
9220         (usage): Changed message.
9221
9222 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9223
9224         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
9225         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
9226         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
9227         * parse.y (array_creation_expression:): Handle anonymous arrays.
9228         (build_array_from_name): Don't set `ret_name' if null.
9229         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
9230         (qualify_ambiguous_name): Likewise.
9231         (java_complete_expand_class): Likewise.
9232
9233 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9234
9235         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
9236         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
9237         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
9238         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
9239         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
9240         AIPL_FUNCTION_COMPLETED_INVOCATION.
9241         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
9242         AIPL_FUNCTION_INVOCATION_READY.
9243         (AIPL_FUNCTION_DECLARATION): New enum entry.
9244         * parse.y (reorder_static_initialized): New function.
9245         (java_parser_context_pop_initialized_field): Use it.
9246         (add_inner_class_fields): Use
9247         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
9248         augmented. Install marker after last alias initializer, if any.
9249         (generate_finit): Fixed typo. Don't try to retain only the used
9250         fields.
9251         (method_header): Compute and set DECL_FUNCTION_NAP.
9252         (method_declarator): Fixed comment. Insert alias initializer in
9253         parameter list.
9254         (build_alias_initializer_parameter_list): Fixed leading
9255         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
9256         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
9257         (java_complete_expand_class): Code to retain only used aliases
9258         removed.
9259         (java_complete_expand_methods): New local `first_decl'. Generate
9260         $finit$ first, then expand the constructors, regular methods and
9261         <clinit>.
9262         (java_complete_expand_method): Don't report error on missing
9263         return statement if previously detected bogus.
9264         (fix_constructors): Don't patch constructor parameters list.
9265         (patch_method_invocation): Use new AIPL enum values. Reverse
9266         alias initializer list for anonymous classes.
9267
9268 2000-01-30  Anthony Green  <green@redhat.com>
9269
9270         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
9271         determine how many stack slots to pop.
9272
9273 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9274
9275         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
9276         error handling/recovery.
9277         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
9278
9279 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9280
9281         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
9282         FIELD_LOCAL_ALIAS_USED): New macros.
9283         (DECL_FUNCTION_NAP): New macro.
9284         (struct lang_decl): New field `nap'.
9285         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
9286         (struct lang_type): New fields `finit_stmt_list' and
9287         `clinit_stmt_list'.
9288         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
9289         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
9290         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
9291         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
9292         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
9293         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
9294         (BUILD_THROW): Macro line separator re-indented.
9295         * parse.y (end_class_declaration): New function.
9296         (maybe_generate_pre_expand_clinit): New name for
9297         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
9298         pre-expand static fields.
9299         (maybe_generate_clinit): Function deleted.
9300         (check_for_static_method_reference): Prototype's parameter list
9301         indented.
9302         (generate_finit): New name for maybe_generate_finit. Changed
9303         leading comment. Function rewritten to use
9304         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
9305         (build_alias_initializer_parameter_list): New function.
9306         (java_parser_context_pop_initialized_field): Likewise.
9307         (add_inner_class_fields): Likewise.
9308         (type_declaration:): Call end_class_declaration.
9309         (class_member_declaration:): Likewise.
9310         (formal_parameter_list:): Fixed typos.
9311         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
9312         element. Improved error handling.
9313         (block_statement:): Call end_class_declaration.
9314         (anonymous_class_creation:): Likewise.
9315         (create_anonymous_class): Fixed comments.
9316         (create_class): Call add_inner_class_fields.
9317         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
9318         (method_header): Use MARK_FINAL_PARMS.
9319         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
9320         (method_declarator): Propagate final argument flag.
9321         (craft_constructor): New local `artificial'. Call
9322         build_alias_initializer_parameter_list. Use
9323         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9324         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9325         necessary.
9326         (complete_expand_class): Get rid of unused outer context local
9327         alias fields.
9328         (java_complete_expand_methods): Fixed leading
9329         comment. Generate/pre-expand <clinit> first. Changed method
9330         expansion order to regular, $finit$, constructors, <clinit>.
9331         (java_complete_expand_method): Set current_function_decl.
9332         (fix_constructors): Fix constructor parameter list to account for
9333         outer context local alias initializers.
9334         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9335         (resolve_expression_name): Lookup outer context local aliases. New
9336         local `access', use it.
9337         (patch_method_invocation): Patch inner class ctor invocation with
9338         outer context local aliases initialization values. $finit$
9339         invocation patching now includes things generated with
9340         build_alias_initializer_parameter_list.
9341         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9342         (build_super_invocation): Likewise.
9343         (patch_assignment): Changed comment.
9344
9345 2000-01-27  Andrew Haley  <aph@cygnus.com>
9346
9347         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9348         (emit_if): Ditto.
9349         (emit_jsr): Ditto.
9350
9351 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9352
9353         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9354         concatenation.
9355         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9356
9357         * parse.y (register_fields): Don't pass a format specifier to
9358         OBSOLETE_MODIFIER_WARNING.
9359         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9360         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9361         specifier.
9362         (check_modifiers): Change function into a macro.
9363         (check_class_interface_creation): Pass a literal format string.
9364
9365 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9366
9367         * buffer.h: PROTO -> PARAMS.
9368         * check-init.c: Likewise.
9369         * class.c: Likewise.
9370         * constants.c: Likewise.
9371         * convert.h: Likewise.
9372         * decl.c: Likewise.
9373         * except.c: Likewise.
9374         * expr.c: Likewise.
9375         * gjavah.c: Likewise.
9376         * java-except.h: Likewise.
9377         * java-tree.h: Likewise.
9378         * jcf-depend.c: Likewise.
9379         * jcf-dump.c: Likewise.
9380         * jcf-parse.c: Likewise.
9381         * jcf-path.c: Likewise.
9382         * jcf-reader.c: Likewise.
9383         * jcf-write.c: Likewise.
9384         * jcf.h: Likewise.
9385         * jv-scan.c: Likewise.
9386         * jvgenmain.c: Likewise.
9387         * jvspec.c: Likewise.
9388         * lang.c: Likewise.
9389         * lex.c: Likewise.
9390         * lex.h: Likewise.
9391         * parse-scan.y: Likewise.
9392         * parse.h: Likewise.
9393         * parse.y: Likewise.
9394         * typeck.c: Likewise.
9395         * verify.c: Likewise.
9396         * xref.c: Likewise.
9397         * xref.h: Likewise.
9398         * zextract.c: Likewise.
9399         * zipfile.h: Likewise.
9400
9401 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9402
9403         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9404         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9405         * constants.c (build_constant_data_ref): Check for cached
9406         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9407         in TYPE_CPOOL_DATE_REF.
9408         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9409         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9410         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9411         (LOCAL_FINAL): New macro.
9412         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9413         constant pool -- don't try to reuse.
9414         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9415         TYPE_LANG_SPECIFIC.
9416         (find_in_current_zip): Use TYPE_JCF.
9417         * parse.h (java_check_final): Prototype removed.
9418         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9419         (maybe_create_class_interface_decl,
9420         check_class_interface_creation): Likewise.
9421         (java_expand_finals): Function removed.
9422         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9423         (block_statement:): Fixed comment.
9424         (anonymous_class_creation:): Likewise.
9425         (check_class_interface_creation): Reversed Jan 12, 2000 extra
9426         argument patch.
9427         (check_class_interface_creation): Loosened error report on (inner)
9428         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9429         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9430         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9431         argument patch.
9432         (create_interface): Likewise.
9433         (anonymous_class_counter): New static global.
9434         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9435         patch. Fixed comments.
9436         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9437         anonymous_class_counter when declaring a toplevel class.
9438         (craft_constructor): Fixed constructor name when handling
9439         anonymous classes. Anonymous class constructors to feature hidden
9440         this$<n> parameter.
9441         (java_fix_constructors): Added comment.
9442         (java_check_final): Function removed.
9443         (java_complete_expand_methods): Fixed comment. Don't generate
9444         class data, save its outgoing constant pool instead.
9445         (verify_constructor_super): Skip anonymous class constructor
9446         hidden this$<n> parameter.
9447         (java_expand_classes): New local `saved_ctxp'. Removed call to
9448         java_expand_finals and java_check_final. Expand anonymous class
9449         constructors. Generate class data.
9450         (build_super_invocation): Skip anonymous class hidden this$<n>
9451         parameter.
9452         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9453         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9454         (set_java_signature): Likewise.
9455
9456 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9457
9458         * gjavah.c: Delete ACC_VISIBILITY define.
9459         * jcf.h: Add ACC_VISIBILITY define.
9460         * parse.y: final: rule tagged <value>.
9461         (java_check_regular_methods): Use ACC_VISIBILITY define for
9462         default package access check.
9463         (local_variable_declaration_statement): Use final: rule.
9464
9465 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9466
9467         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9468         (final:): New rule.
9469
9470 2000-01-17  Tom Tromey  <tromey@cygnus.com>
9471
9472         * gjavah.c (print_field_info): Allow non-static final fields.
9473
9474 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9475
9476         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9477         * parse.y (patch_anonymous_class): New function.
9478         (create_anonymous_class): Register incomplete type when the
9479         class/interface to extends/implement isn't known yet.
9480         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9481         (verify_constructor_super): Tuned error message.
9482
9483 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9484
9485         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9486         (ANONYMOUS_CLASS_P): New macro.
9487         (TYPE_SIGNATURE, TYPE_JCF): New macros.
9488         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9489         * parse.y (create_class): Added leading argument.
9490         (maybe_create_class_interface_decl,
9491         check_class_interface_creation): Likewise.
9492         (craft_constructor): New function.
9493         (verify_constructor_super): Added argument in prototype.
9494         (class_declaration:): Inserted leading argument.
9495         (for_begin:): Use FOR_LOOP_P.
9496         (anonymous_class_creation): Create WFL of the anonymous class to
9497         instantiate. Call build_new_invocation. Added comments.
9498         (check_class_interface_creation): Handle parameter `anonymous' in
9499         verbose mode class creation announce.
9500         (link_nested_class_to_enclosing): Exclude anonymous classes.
9501         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9502         anonymous class, even though they appear to have an enclosing
9503         context.
9504         (create_interface): Pass extra argument to
9505         check_class_interface_creation.
9506         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9507         (create_class): Call check_class_interface_creation and
9508         maybe_create_class_interface_decl with extra new argument. Don't
9509         add private this$<n> to anonymous classes.
9510         (method_declarator): Insert hidden this$<n> to anonymous class
9511         constructors.
9512         (java_fix_constructors): Deleted code creating default
9513         constructor. Call craft_constructor instead.
9514         (java_check_regular_methods): Set `saw_constructor' to 1 for
9515         anonymous classes.
9516         (fix_constructors): Pass extra argument to verify_constructor_super.
9517         (verify_constructor_super): New local `sdecl', use it. Search for
9518         matching constructor (possibly featuring arguments) in super
9519         class.
9520         (lookup_method_invoke): Craft constructor according to arguments
9521         list when dealing with anonymous class constructors.
9522         (build_super_invocation): Pass arguments to anonymous class super
9523         constructors.
9524         (search_loop): Use FOR_LOOP_P.
9525         (labeled_block_contains_loop_p): Likewise.
9526
9527 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9528
9529         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9530         (enclosing_context_p): New function.
9531         (get_access_flags_from_decl): Handle CLASS_STATIC.
9532         (maybe_layout_super_class): Extra first argument passed to
9533         do_resolve_class.
9534         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9535         ID_INIT_P.
9536         * decl.c (access0_identifier_node): New global.
9537         (init_decl_processing): access0_identifier_node initialized.
9538         (pushdecl): Set DECL_CONTEXT only on non type decls.
9539         * expr.c (lookup_field): Lookup inner class fields in enclosing
9540         contexts.
9541         (expand_invoke): Use ID_INIT_P.
9542         (expand_java_field_op): Use DECL_CLINIT_P.
9543         * java-tree.def (CLASS_LITERAL): New tree code.
9544         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9545         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9546         (struct lang_decl): New field `inner_access'.
9547         (enclosing_context_p): Prototyped.
9548         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9549         ID_CLINIT_P): New macros.
9550         (CLASS_STATIC): New macro.
9551         (CLASS_ACCESS0_GENERATED_P): New macro.
9552         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9553         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9554         INNER_CLASS_P): New macros.
9555         (DECL_INNER_CLASS_LIST): New macro.
9556         * jcf-parse.c (yyparse): Avoid the use of ANSI string
9557         concatenation.
9558         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9559         the shift value to int. Fixed typo in comment.
9560         * lex.c (inst_id, wpv_id): Initialize.
9561         * mangle.c (unicode_mangling_length): Take `$' into account.
9562         * parse.h (DRECOVER, RECOVER): Terminate properly.
9563         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9564         (typedef struct _jdep): New field `enclosing'.
9565         (JDEP_ENCLOSING): New macro.
9566         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9567         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9568         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9569         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9570         GET_ENCLOSING_CPC_CONTEXT): New macros.
9571         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9572         (do_resolve_class): Added extra argument in prototype.
9573         * parse.y (resolve_class): Added extra argument in prototype.
9574         (maybe_create_class_interface_decl): Likewise.
9575         (maybe_use_access_method, build_wfl_wrap): New functions.
9576         (java_complete_expand_classes, java_complete_expand_class):
9577         Likewise.
9578         (java_parser_context_push_initialized_field,
9579         java_parser_context_suspend, java_parser_context_resume):
9580         Likewise.
9581         (maybe_make_nested_class_name, make_nested_class_name,
9582         set_nested_class_simple_name_value,
9583         link_nested_class_to_enclosing, find_as_inner_class,
9584         find_as_inner_class_do, check_inner_class_redefinition,
9585         build_thisn_assign, build_current_thisn, build_access_to_thisn,
9586         maybe_build_thisn_access_method, build_outer_field_access,
9587         build_outer_field_access_methods, build_outer_field_access_expr,
9588         build_outer_method_access_method, build_new_access_id,
9589         build_outer_field_access_method, outer_field_access_p,
9590         outer_field_expanded_access_p, outer_field_access_fix,
9591         build_incomplete_class_ref, patch_incomplete_class_ref,
9592         create_anonymous_class): Likewise.
9593         (inst_id, wpv_id): New static global variables.
9594         (synchronized:): New rule, tagged <node>.
9595         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9596         rules.
9597         (anonymous_class_creation:): New rule, tagged <node>.
9598         (NEW_TK): Tagged <node>.
9599         (type_literals, array_type_literal): New rules, tagged <node>.
9600         (class_declaration:): Removed action when reducing by class_body:
9601         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9602         using GET_CPC in sub-rules.
9603         (class_member_declaration): Handle inner classes.
9604         (method_declaration): When reducing method_header:, reset
9605         current_function_decl when appropriate.
9606         (method_declarator:): Set the number of formal parameter to 0 for
9607         method declared without arguments.
9608         (constructor_declarator:): Likewise.
9609         (static_initializer:): List of elements kept in a list.
9610         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9611         use of the keyword `static' for type declarations.
9612         (block_statement:): Handle inner class declarations.
9613         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9614         type qualified `this'.
9615         (class_instance_creation_expression): Use anonymous_class_creation:
9616         to handle inner class instances creation. Handle qualified `new'.
9617         (something_dot_new): Added appropriate actions.
9618         (create_new_parser_context): New function.
9619         (java_push_parser_context, java_parser_context_save_global,
9620         java_parser_context_suspend): Use create_new_parser_context.
9621         (check_modifiers): Changed leading comment.
9622         (check_class_interface_creation): Handle interclasses.
9623         (add_superinterfaces): Fixed comment.
9624         (create_interface): Build qualified name from the raw_name instead
9625         of its matching WFL. Push the initialized fields list. raw_name added
9626         as an extra argument to maybe_create_class_interface_decl.
9627         (create_class): Build qualified name from the raw_name instead of
9628         its matching WFL. Removed assignment to current_parsed_class_un.
9629         Call PUSH_ERROR before returning an error. Suspend the current
9630         parser context when processing an inner class. Push the
9631         initialized fields list. raw_name added as an extra argument to
9632         maybe_create_class_interface_decl. Add the private this$<n>
9633         field.
9634         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9635         (register_fields): Get the class type from GET_CPC and handle
9636         previous errors.  Added code to handle the creation of static
9637         fields in inner classes. Initialized fields initialization
9638         statements kept in a list of lists.
9639         (maybe_generate_finit): Initialized fields initialization
9640         statements kept in a list of lists. Use GET_CPC.
9641         (maybe_generate_clinit): Likewise.
9642         (method_header): Use GET_CPC and GET_CPC_UN.
9643         (parser_qualified_classname): Handle inner classes.
9644         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9645         (java_fix_constructors): Hide pointer to enclosing context
9646         instance in constructor list when dealing with inner classes.
9647         (jdep_resolve_class): Call resolve_class with extra first argument
9648         JDEP_ENCLOSING.
9649         (resolve_class): Add enclosing context as a first extra argument
9650         to do_resolve_class.
9651         (do_resolve_class): Call find_as_inner_class. Handle WFLs
9652         properly.
9653         (resolve_no_layout): Extra argument added to resolve_class
9654         invocation.
9655         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9656         (java_get_real_method_name): Use GET_CPC_UN.
9657         (check_abstract_method_definitions): Use DECL_CLINIT_P.
9658         (java_check_abstract_methods): Handle static method declared in
9659         inner classes by an error.
9660         (java_check_regular_methods): Use DECL_CLINIT_P.
9661         (source_start_java_method): Also set DECL_MAX_LOCALS.
9662         (create_artificial_method): Call java_parser_context_save_global
9663         and java_parser_context_restore_global instead of saving/restoring
9664         the context by hand.
9665         (expand_start_java_method): Improved verbose mode message.
9666         (java_complete_expand_methods): Fixed leading comment. Use
9667         DECL_CLINIT_P.
9668         (fix_constructors): Added assignment to this$<n> if necessary.
9669         (java_expand_classes): Call java_complete_expand_classes instead
9670         of java_complete_expand_methods.
9671         (make_qualified_primary): Simplified.
9672         (merge_qualified_name): Optimized for missing left or right parts.
9673         (resolve_expression_name): Handle access to outer class fields from
9674         interclasses.
9675         (resolve_qualified_expression_name): New macro
9676         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9677         classes. Report error on non appropriate qualification of
9678         `new'. Handle qualified `this'.
9679         (not_accessible_p): Allow access to outer class private fields from
9680         inner classes.
9681         (patch_method_invocation): Handle method invocations through
9682         access methods and inner class constructor invocations.
9683         (find_applicable_accessible_methods_list): Search enclosing
9684         contexts of an inner class.
9685         (search_applicable_methods_list): Fixed typo.
9686         (argument_types_convertible): Handle inner class constructors'
9687         hidden outer context reference argument.
9688         (qualify_ambiguous_name): Handle qualified `this'.
9689         (java_complete_lhs): Handle use of field accessed through
9690         artificial access methods in various cases of assignments. Handle
9691         CLASS_LITERAL node.
9692         (check_final_assignment): Use DECL_CLINIT_P.
9693         (valid_ref_assignconv_cast_p): Handle the destination being an
9694         enclosing context of the source.
9695         (patch_unaryop): Handle use of field accessed through artificial
9696         access methods.
9697         (patch_return): Use DECL_CLINIT_P.
9698         (patch_throw_statement): Use DECL_CLINIT_P.
9699         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9700         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9701         ID_INIT_P.
9702
9703 2000-01-16  Anthony Green  <green@cygnus.com>
9704
9705         * parse.y (build_string_concatenation): Only use
9706         StringBuffer(String) shortcut if String arg is constant.
9707
9708 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9709
9710         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9711         the shift value to int. Fixed typo in comment.
9712
9713 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9714
9715         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9716         * jcf-write.c: Likewise.
9717         * parse.y: Likewise.
9718         * parse.c: Regenerate.
9719
9720 2000-01-09  Anthony Green  <green@cygnus.com>
9721
9722         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9723         bytecodes in the correct order.
9724
9725 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9726
9727         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9728
9729 2000-01-06  Anthony Green  <green@cygnus.com>
9730
9731         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9732         before building constant array decl.
9733
9734 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9735
9736         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9737         method invocation and typo in conditional expression.
9738         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9739         the appropriate NOTE_POP.
9740         * parse.y (patch_binop): Shift value mask to feature the right
9741         type.
9742
9743 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9744
9745         * class.c (assume_compiled, assume_compiled_node): Add static
9746         prototype.
9747         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9748
9749         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9750
9751         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9752
9753         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9754         to `__modifier' to avoid stringifying it.
9755
9756         * parse.y (verify_constructor_circularity): Don't call a variadic
9757         function with a non-literal format string.
9758         (java_check_abstract_methods): Move unreachable code inside
9759         `continue' statement.
9760         (lookup_method_invoke): Call xstrdup, not strdup.
9761
9762         * expr.c (expand_java_field_op): Avoid the use of ANSI string
9763         concatenation.
9764
9765         * jcf-parse.c (yyparse): Likewise.
9766
9767         * jv-scan.c (main): Likewise.
9768
9769 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9770
9771         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9772         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9773         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9774         concatenation.
9775
9776         * parse.y (synchronized, variable_redefinition_error,
9777         check_class_interface_creation, create_interface, create_class,
9778         method_header, finish_method_declaration,
9779         check_modifiers_consistency, method_declarator,
9780         complete_class_report_errors, check_abstract_method_definitions,
9781         java_check_regular_methods, check_throws_clauses,
9782         java_check_abstract_methods, read_import_dir,
9783         check_pkg_class_access, declare_local_variables, fix_constructors,
9784         cut_identifier_in_qualified, resolve_expression_name,
9785         resolve_qualified_expression_name, patch_method_invocation,
9786         java_complete_lhs, patch_assignment, try_builtin_assignconv,
9787         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9788         patch_exit_expr, patch_exit_expr, patch_switch_statement,
9789         patch_try_statement, patch_synchronized_statement,
9790         patch_throw_statement, check_thrown_exceptions,
9791         patch_conditional_expr): Likewise.
9792
9793 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9794
9795         * Makefile.in (LIBDEPS): Added gcc's errors.o
9796         (../jcf-dump$(exeext):): Link with gcc's errors.o
9797         (../gcjh$(exeext):): Likewise.
9798         * expr.c (expand_java_NEW): Layout the entire target type instead of
9799         laying out its methods only.
9800         (lookup_field): Layout the class after having loaded it.
9801         * java-tree.h (java_debug_context): Declared.
9802         * jcf-io.c (toplev.h): Included.
9803         (find_class): Removed assignment to jcf's outofsynch
9804         field. Force source file to be read if newer than its matching
9805         class file. Tweaked debug messages.
9806         * jcf-parse.c (jcf_out_of_synch): Deleted.
9807         (read_class): Call to jcf_out_of_synch removed.
9808         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9809         (jcf_out_of_synch): Prototype deleted.
9810         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9811         `deprecated' and `class_err': integer turned into bit-fields.
9812         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9813         * parse.y (package_list): New global.
9814         (package_declaration:): Record newly parsed package name.
9815         (extra_ctxp_pushed_p): Static global deleted.
9816         (java_parser_context_save_global): Create buffer context for the
9817         purpose of saving globals, if necessary.
9818         (java_parser_context_restore_global): Pop context pushed for the
9819         purpose of saving globals, if necessary.
9820         (java_debug_context_do): New prototype and function.
9821         (java_debug_context): Likewise.
9822         (do_resolve_class): Use already parsed package names to qualify
9823         and lookup class candidate.
9824         (java_pre_expand_clinit): Removed unnecessary local variable.
9825
9826 1999-12-17  Tom Tromey  <tromey@cygnus.com>
9827
9828         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
9829         fixes PR gcj/119.
9830         (process_file): Use `\n\' at end of each line in string.
9831
9832 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9833
9834         * expr.c (expand_invoke): Layout the loaded class before
9835         attempting to use it.
9836         (expand_java_field_op): Allow final field assignments to take
9837         place in $finit$.
9838         * typeck.c (convert): Return error_mark_node if expr is null.
9839
9840 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9841
9842         * class.c (class_depth): Return -1 if the class doesn't load
9843         properly.
9844         * expr.c (can_widen_reference_to): Check for errors during depth
9845         computation and return 0 accordingly.
9846         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9847         create default constructors and add an other error check.
9848         * parse.h (java_fix_constructors): Prototyped.
9849         * parse.y (java_pre_expand_clinit): Likewise.
9850         (build_super_invocation): Re-prototyped to feature one argument.
9851         (java_check_circular_reference): Directly use `current'.
9852         (java_fix_constructors): New function.
9853         (java_check_regular_methods): Don't create default constructors
9854         here, but abort if none were found.
9855         (java_complete_expand_methods): Pre-process <clinit> calling
9856         java_pre_expand_clinit.
9857         (java_pre_expand_clinit): New function.
9858         (fix_constructors): build_super_invocation invoked with the
9859         current method declaration as an argument.
9860         (build_super_invocation): Use the context of the processed method
9861         decl argument instead of current_class.
9862         * typeck.c (lookup_java_method): Take WFLs in method names into
9863         account.
9864
9865 1999-12-14  Per Bothner  <per@bothner.com>
9866
9867         * class.c (make_class_data): flag_keep_inline_functions to keep
9868         private methods in the method array.
9869
9870 1999-12-15  Anthony Green  <green@cygnus.com>
9871
9872         * check-init.c (check_init): Take into account both types of
9873         `throw's when checking for uninitialized variables.
9874
9875 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9876
9877         * parse.y (java_complete_lhs): Force conversion of array
9878         dimensions to int_type_node, that's what runtime's ABI expects.
9879
9880 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9881
9882         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9883         operand of a WFL, until the Java front-end gets fixed with regard
9884         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9885
9886 1999-12-10  Andrew Haley  <aph@cygnus.com>
9887
9888         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9889         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9890         expr.c (build_java_athrow): Add support for sjlj-exceptions.
9891         java-tree.h: Ditto.
9892         jcf-write.c: Ditto.
9893
9894 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9895
9896         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9897         before calling expand_eh_region_start and expand_start_all_catch.
9898         * except.c (expand_start_java_handler): Switch to permanent
9899         obstack before calling expand_eh_region_start.
9900         (expand_end_java_handler): Switch to permanent obstack before
9901         calling expand_start_all_catch.
9902
9903 1999-12-5  Anthony Green  <green@cygnus.com>
9904
9905         * decl.c (init_decl_processing): Mark throw_node as a noreturn
9906         function with side effects.
9907         (init_decl_processing): Mark all memory allocating DECLs with
9908         DECL_IS_MALLOC.
9909
9910 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9911
9912         * except.c (expand_end_java_handler): Call
9913         expand_resume_after_catch and end_catch_handler.
9914
9915 1999-11-30  Anthony Green  <green@cygnus.com>
9916
9917         * verify.c (verify_jvm_instructions): Create new return label
9918         chain if non existent (don't rely on the verified state of the jsr
9919         target.)
9920
9921 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9922
9923         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9924         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9925
9926         * parse.y (patch_assignment): Removed bogus final class test on
9927         lhs when checking on whether to emit an ArrayStoreException runtime
9928         check.
9929         * expr.c (expand_java_arraystore): Likewise.
9930
9931 1999-11-28 Anthony Green <green@cygnus.com>
9932
9933         * decl.c (find_local_variable): Reuse single slot decls when
9934           appropriate.
9935
9936 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9937
9938         * jcf-parse.c (saw_java_source): Global variable removed.
9939         (read_class): Don't use `saw_java_source'. Added extra braces.
9940         (yyparse): Code setting `saw_java_source' removed.
9941
9942 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
9943
9944         * except.c (emit_handlers): Zero catch_clauses after emitting them.
9945
9946 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9947
9948         * verify.c (merge_type_state): Non verified subroutines being
9949         considered more than once to trigger passive type merge.
9950
9951 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9952
9953         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9954         in case of error. Error message tuned.
9955
9956 1999-11-21  Anthony Green  <green@cygnus.com>
9957
9958         * constants.c (find_methodref_index): Unwrap method names before
9959         inserting them in the constant pool.
9960
9961         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9962
9963         * class.c (assume_compiled_node): New typedef.
9964         (assume_compiled_tree): New static data.
9965         (find_assume_compiled_node): New function.
9966         (add_assume_compiled): New function.
9967         (assume_compiled): New function.
9968         * class.c (make_class_data): Use assume_compiled.
9969         (is_compiled_class): Use assume_compiled.
9970
9971         * java-tree.h (add_assume_compiled): Declare.
9972
9973         * lang.c (lang_decode_option): Parse new options.
9974
9975 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9976
9977         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9978         int_type_node: that's what `_Jv_AllocObject' expects.
9979
9980 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9981
9982         * parse.y (lookup_method_invoke): Use lang_printable_name to
9983         reliably build the type name during error report. Fixes PR gcj/97.
9984
9985 1999-11-09  Tom Tromey  <tromey@cygnus.com>
9986
9987         * jcf-path.c: Include <sys/stat.h>.
9988         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
9989         (DIR_UP): New macro.
9990
9991 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9992
9993         * parse.y (source_end_java_method): Resume permanent allocation,
9994         reversing Apr 27 1998 patch.
9995         (patch_string_cst): Pop obstacks after having pushed the permanent
9996         ones.
9997
9998 1999-11-05  Tom Tromey  <tromey@cygnus.com>
9999
10000         * class.c (finish_class): Emit inlined methods if any native
10001         methods exist in the class.  Fixes PR gcj/85.
10002
10003 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10004
10005         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
10006         (qualify_ambiguous_name): Likewise.
10007
10008 1999-11-03  Godmar Back <gback@cs.utah.edu>
10009
10010         * typeck.c: (lookup_java_method):  search all inherited
10011         interfaces when looking up interface method.
10012
10013 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10014
10015         * parse.y (method_header:): Issue error message for rule `type
10016         error'.
10017         (synchronized:): Error report when not using synchronized.
10018
10019 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10020
10021         * parse.y (resolve_qualified_expression_name): Prevent `this' from
10022         being used before the superclass constructor has been called.
10023         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
10024         instead of `CALL_THIS_CONSTRUCTOR_P'.
10025
10026 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
10027
10028         * check-init.c: Fix typo in comment.
10029
10030 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10031
10032         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
10033         and final method.
10034
10035 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10036
10037         * parse.y (expression_statement:): Call function to report
10038         improper invocation of a constructor.
10039         (parse_ctor_invocation_error): New function.
10040
10041 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
10042
10043         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
10044         remember_end_note.
10045
10046 1999-10-21  Tom Tromey  <tromey@cygnus.com>
10047
10048         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
10049         in generated `main'.
10050
10051 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10052
10053         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
10054         (qualify_ambiguous_name): Likewise.
10055
10056 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10057
10058         * parse.y (java_complete_tree): fold_constant_for_init to work on
10059         permanent_obstack.
10060         (java_complete_lhs): Likewise.
10061         (array_constructor_check_entry): Complete an initializer element
10062         on permanent_obstack.
10063
10064 1999-10-19  Tom Tromey  <tromey@cygnus.com>
10065
10066         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
10067         From Mike Moreton <mike@pillim.demon.co.uk>.
10068
10069 1999-10-15  Greg McGary  <gkm@gnu.org>
10070
10071         * java-tree.h (flag_bounds_check): Remove extern decl.
10072         * lang.c (flag_bounds_check): Remove global variable.
10073         (lang_f_options): Remove "bounds-check" entry.
10074         (lang_init_options): Default flag_bounds_check to "on".
10075
10076 1999-10-14  Tom Tromey  <tromey@cygnus.com>
10077
10078         * jvgenmain.c (usage): New function.
10079         (main): Use it.  Also, handle `-D' options.
10080         * jvspec.c (lang_specific_driver): Recognize -D.
10081         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
10082
10083         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
10084
10085 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10086
10087         * jcf-dump.c (print_constant, disassemble_method): Don't call a
10088         variadic function with a non-literal format string.
10089
10090         * parse-scan.y (report_main_declaration): Likewise.
10091
10092         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
10093
10094         * parse.y (read_import_dir, patch_assignment, patch_binop,
10095         patch_array_ref): Likewise.
10096
10097         * typeck.c (build_java_array_type): Likewise.
10098
10099         * verify.c (verify_jvm_instructions): Likewise.
10100
10101 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10102
10103         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
10104
10105 1999-10-07  Anthony Green  <green@cygnus.com>
10106
10107         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
10108         where CHECK_PUT may fail for valid reasons.
10109
10110         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
10111         UNSAFE_PUTN): New macros.
10112
10113 1999-10-04  Tom Tromey  <tromey@cygnus.com>
10114
10115         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
10116         well.  Fixes Java PR gcj/59.
10117         * parse-scan.y (yyerror): Report errors.
10118
10119 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
10120
10121         * decl.c (insert_block): Remove unconditional `abort'.
10122
10123 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
10124
10125         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
10126         FUNCTION_CODE now of type int.  All callers changed.
10127         Set the builtin's DECL_BUILT_IN_CLASS.
10128
10129 1999-09-23  Tom Tromey  <tromey@cygnus.com>
10130
10131         * jvspec.c (lang_specific_driver): Don't read spec file if
10132         -fsyntax-only given.
10133
10134 1999-09-22  Tom Tromey  <tromey@cygnus.com>
10135
10136         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
10137
10138         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
10139         (WORDS_TO_LONG): Likewise.
10140         (WORDS_TO_DOUBLE): Likewise.
10141
10142 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10143
10144         * jcf-write.c (RELOCATION_VALUE_0): New macro.
10145         (RELOCATION_VALUE_1): Likewise.
10146         (emit_iinc, emit_reloc, push_constant1, push_constant2,
10147         push_in_const, push_long_const): Prototyped.
10148         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
10149         (push_constant2): Likewise.
10150         (push_int_const): Cast find_constant1's integer arguments to `jword'.
10151         (find_constant_wide): Cast find_constant2's integer arguments to
10152         `jword'.
10153         (find_constant_index): Cast find_constant2's and find_constant2's
10154         integer arguments to `jword'.
10155         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
10156         (emit_switch_reloc): Use RELOCATION_VALUE_0.
10157         (emit_if): Use RELOCATION_VALUE_1.
10158         (emit_goto): Likewise.
10159         (emit_jsr): Likewise.
10160         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
10161         argument to push_long_const to HOST_WIDE_INT.
10162
10163 1999-09-15  Andreas Schwab  <schwab@suse.de>
10164
10165         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
10166
10167 1999-09-20  Nick Clifton  <nickc@cygnus.com>
10168
10169         * lang.c (lang_decode_option): Extend comment.
10170
10171 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10172
10173         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
10174         instead of fndecl.
10175
10176 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10177
10178         * gjavah.c (get_field_name, print_method_info, print_include,
10179         add_namelet): Use xmalloc, not malloc.
10180
10181         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
10182         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
10183         NULL pointer.
10184
10185         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
10186
10187         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
10188
10189         * jcf-path.c (add_entry): Likewise.
10190
10191         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
10192
10193         * jv-scan.c (xmalloc): Remove definition.
10194
10195         * jvgenmain.c (xmalloc): Likewise.
10196
10197         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
10198
10199         * lex.c (java_store_unicode): Use xrealloc, not realloc.
10200
10201         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
10202         concat, not xmalloc/sprintf.
10203         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
10204         (xstrdup): Remove definition.
10205
10206         * parse.y (duplicate_declaration_error_p,
10207         constructor_circularity_msg, verify_constructor_circularity,
10208         check_abstract_method_definitions, java_check_regular_methods,
10209         java_check_abstract_methods, patch_method_invocation,
10210         check_for_static_method_reference, patch_assignment, patch_binop,
10211         patch_cast, array_constructor_check_entry, patch_return,
10212         patch_conditional_expr): Use xstrdup, not strdup.
10213
10214         * zextract.c (ALLOC): Use xmalloc, not malloc.
10215
10216 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10217
10218         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
10219
10220         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
10221         (do_spec, lang_specific_pre_link, lang_specific_driver,
10222         input_filename, input_filename_length): Don't declare.
10223         (main_class_name, jvgenmain_spec, lang_specific_driver):
10224         Constify a char*.
10225         (lang_specific_driver): All calls to the function pointer
10226         parameter now explicitly call `fatal'.
10227
10228 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10229
10230         * parse.y (find_applicable_accessible_methods_list): Search
10231         abstract classes as interfaces.
10232
10233 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10234
10235         * class.c (finish_class): We're now outside a valid method
10236         declaration. Tell the rest of gcc so.
10237
10238 1999-09-08  Bruce Korb  autogen@linuxbox.com
10239
10240         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
10241
10242 1999-09-07  Tom Tromey  <tromey@cygnus.com>
10243
10244         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
10245         java-array.h.
10246         (decode_signature_piece): Don't emit "::" in JArray<>.
10247         (print_namelet): Only print trailing `;' when printing a class.
10248
10249 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
10250
10251         * java-tree.h: Delete declarations for all tree nodes now moved to
10252         global_trees.
10253         * decl.c: Delete their definitions.
10254
10255 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
10256
10257         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
10258         * Makefile.in (OBJS): Add ggc-callbacks.o.
10259         (OBJDEPS): Likewise.
10260
10261 1999-09-03  Tom Tromey  <tromey@cygnus.com>
10262
10263         * parse.y (strip_out_static_field_access_decl): Return operand if
10264         it satisfies JDECL_P.
10265
10266 1999-09-02  Tom Tromey  <tromey@cygnus.com>
10267
10268         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
10269         Handle nested arrays, like `[[I'.
10270
10271 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10272
10273         * class.c (finish_class): Remove unused parameter, all callers
10274         changed.
10275
10276         * expr.c (build_java_athrow): Change return type to void.
10277         (java_lang_expand_expr): Make sure each case in switch returns a
10278         value.
10279
10280         * java-tree.h (finish_class): Fix prototype to take void args.
10281
10282         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
10283         (main): Issue return from main, not exit.
10284
10285         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
10286
10287         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
10288
10289         * jv-scan.c (main): Issue return from main, not exit.
10290
10291         * parse.y (check_abstract_method_definitions,
10292         java_check_abstract_method_definitions): Add static prototypes.
10293         (java_complete_expand_methods): Fix call to `finish_class'.
10294
10295         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
10296         and `prevpc'.
10297
10298 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10299
10300         * lang.c (language_string): Constify.
10301
10302 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10303
10304         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
10305         Remove hacks for stuff which comes from libiberty.
10306
10307         * Make-lang.in: Likewise.
10308
10309 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
10310
10311         * Makefile.in (xref.o): Depend on xref.c explicitly.
10312
10313 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10314
10315         * java-tree.h (lang_printable_name): Constify a char*.
10316
10317         * lang.c (lang_printable_name): Likewise.
10318
10319 1999-08-27  Jeffrey A Law  (law@cygnus.com)
10320
10321         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
10322         comments in C code.
10323
10324 1999-08-26  Tom Tromey  <tromey@cygnus.com>
10325
10326         * gjavah.c (print_cxx_classname): Print "::" before qualified
10327         name.
10328
10329 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10330
10331         * parse.y (lookup_cl): Changed leading comment. Now does its best
10332         to set the column number.
10333         (qualify_ambiguous_name): Take WFL wrappers into account.
10334
10335 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
10336
10337         * verify.c (verify_jvm_instructions): Don't check instruction
10338         validity beyond end of method.
10339
10340 1999-08-25  Tom Tromey  <tromey@cygnus.com>
10341
10342         * jvspec.c (lang_specific_driver): Correctly handle --help again.
10343
10344 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10345
10346         * gjavah.c (print_name, print_base_classname, utf8_cmp,
10347         cxx_keyword_subst, generate_access, name_is_method_p,
10348         get_field_name, print_field_name, super_class_name, print_include,
10349         decode_signature_piece, print_class_decls, usage, help,
10350         java_no_argument, version, add_namelet, print_namelet): Add static
10351         prototype.
10352         (print_base_classname, utf8_cmp, cxx_keyword_subst,
10353         name_is_method_p): Constify a char*.
10354         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
10355         Provide a final else clause in an if-else-if.
10356         (print_field_info): Add missing final arg in function call to
10357         `print_field_name'.
10358         (print_method_info, decompile_method, decode_signature_piece,
10359         print_c_decl, print_full_cxx_name, print_stub,
10360         print_mangled_classname, super_class_name, print_include,
10361         add_namelet, add_class_decl, print_class_decls, process_file,
10362         help): Constify a char*.
10363
10364         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10365         push_int_const, find_constant_wide, find_constant_index,
10366         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10367         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10368         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10369         emit_if, emit_goto, emit_jsr, call_cleanups,
10370         make_class_file_name): Add static prototypes.
10371         (generate_bytecode_return, generate_bytecode_insns): Pass a
10372         NULL_PTR, not a NULL_TREE.
10373
10374         * jv-scan.c: Include "jcf.h".
10375         (main): Declare using DEFUN macro.
10376
10377         * jvspec.c (find_spec_file, lang_specific_pre_link,
10378         lang_specific_driver): Add prototypes.
10379         (find_spec_file): Constify a char*.
10380
10381         * keyword.gperf (hash, java_keyword): Add prototypes.
10382
10383         * lang.c (lang_print_error): Add static prototype.
10384         (lang_init): Prefer memcpy over bcopy to avoid casts.
10385
10386         * lex.c (yylex): Add static prototype.
10387
10388         * parse-scan.y: Include "lex.c" earlier.
10389
10390         * parse.h: Remove redundant declaration for `yylex'.
10391
10392         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10393         labeled_block_contains_loop_p): Add static prototypes.
10394         (not_accessible_p): Make static to match prototype.
10395
10396         * verify.c (start_pc_cmp): Don't needlessly cast away const.
10397
10398 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10399
10400         * parse.y (check_method_redefinition): Changed leading comment.
10401         (check_abstract_method_definitions): New function.
10402         (java_check_abstract_method_definitions): New function.
10403         (java_check_regular_methods): Call it.
10404         (verify_constructor_super): Fixed indentation.
10405         (lookup_method_invoke): Likewise.
10406
10407 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10408
10409         * parse.y (method_header): Return a null pointer if the current
10410         class node is null.
10411         (finish_method_declaration): Return if the current function decl
10412         is null.
10413         (source_start_java_method): Likewise.
10414         (java_method_add_stmt): Likewise.
10415
10416 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10417
10418         * class.c (emit_register_class): Removed unnecessary call to
10419         start_sequence.
10420         * parse.y (labeled_block_contains_loop_p): Removed unused local
10421         variable.
10422
10423 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10424
10425         * parse.y (java_refold): Added prototype.
10426
10427 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10428
10429         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10430         (java_stabilize_reference): Removed unnecessary `else'.
10431         (java_complete_lhs): Set flag to remember boolean. Call
10432         java_refold. Added comments.
10433         (java_decl_equiv): New function.
10434         (binop_compound_p): Likewise.
10435         (java_refold): Likewise.
10436         (patch_unaryop): Striped static field access assigned to decl and
10437         op. Changed promotion scheme for ++/-- operators.
10438         (search_loop): New function.
10439         (labeled_block_contains_loop_p): Likewise.
10440         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10441         comment.
10442         (patch_bc_statement): Call search_loop. Fixed comment.
10443
10444 1999-08-14  Anthony Green  <green@cygnus.com>
10445
10446         * expr.c (java_lang_expand_expr): Mark static array data as
10447         referenced.
10448
10449 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10450
10451         * jvgenmain.c (main): NUL-terminate name_obstack.
10452
10453 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10454
10455         * check-init.c (check_bool2_init, done_alternative): Add static
10456         prototypes.
10457
10458         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10459         (add_method, build_utf8_ref, build_class_ref,
10460         append_gpp_mangled_type, layout_class_method): Constify a char*.
10461
10462         * decl.c (push_promoted_type, make_binding_level): Add static
10463         prototypes.
10464         (push_promoted_type, pushdecl): Constify a char*.
10465
10466         * except.c (find_handler_in_range, link_handler,
10467         check_start_handlers): Add static prototypes.
10468
10469         * expr.c (process_jvm_instruction): Constify a char*.
10470
10471         * gjavah.c (main): Constify a char*.
10472
10473         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10474         Constify a char*.
10475
10476         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10477         static prototypes.
10478         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10479         munge, print_ents): Constify a char*.
10480
10481         * jcf-dump.c (disassemble_method): Constify a char*.
10482         (print_constant_pool, print_exception_table): Add static prototypes.
10483         (print_constant, print_exception_table, main, disassemble_method):
10484         Constify a char*.
10485
10486         * jcf-io.c (find_classfile, find_class): Likewise.
10487
10488         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10489         (set_source_filename, predefined_filename_p): Add static prototypes.
10490         (set_source_filename, get_constant, get_class_constant,
10491         find_in_current_zip): Constify a char*.
10492
10493         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10494         static prototypes.
10495         (add_entry, add_path, jcf_path_classpath_arg,
10496         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10497
10498         * jcf-reader.c (get_attribute, jcf_parse_preamble,
10499         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10500         jcf_parse_one_method, jcf_parse_methods,
10501         jcf_parse_final_attributes): Add static prototypes.
10502         (get_attribute): Constify a char*.
10503
10504         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10505         jcf_dependency_add_target, jcf_path_classpath_arg,
10506         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10507
10508         * jv-scan.c (main): Constify a char*.
10509         (gcc_obstack_init): Add prototype arguments.
10510
10511         * jvgenmain.c (gcc_obstack_init): Likewise.
10512         (main): Constify a char*.
10513
10514         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10515         static prototypes.
10516         (put_decl_string, lang_print_error): Constify a char*.
10517         (lang_init): Remove redundant extern prototype.
10518
10519         * mangle.c (emit_unicode_mangled_name): Constify a char*.
10520
10521         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10522         Add static prototypes.
10523         (get_type_from_signature): Constify a char*.
10524
10525         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10526         Add static prototypes.
10527         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10528         (verify_jvm_instructions): Constify a char*.
10529
10530         * xref.c (xref_flag_value): Likewise.
10531
10532         * xref.h (xref_flag_value): Likewise.
10533
10534         * zextract.c (makeword, makelong): Add static prototypes.
10535         (makeword, makelong): Constify a uch*.
10536
10537 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10538
10539         * lang.c (java_dummy_print): Constify a char*.
10540         (lang_print_error): Likewise.
10541         (lang_init): Remove redundant prototype for `print_error_function'.
10542         (lang_init_source): Likewise.
10543         (lang_identify): Constify a char*.
10544
10545 1999-08-09  Tom Tromey  <tromey@cygnus.com>
10546
10547         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10548         (WORDS_TO_LONG): Likewise.
10549         (WORDS_TO_DOUBLE): Likewise.
10550
10551 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10552
10553         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10554
10555         * expr.c (java_stack_pop, java_array_data_offset,
10556         build_java_throw_out_of_bounds_exception, case_identity,
10557         build_java_check_indexed_type): Add static prototypes.
10558         (linenumber_table, expand_invoke, expand_java_field_op,
10559         build_primtype_type_ref, expand_byte_code): Constify a char*.
10560
10561         * java-tree.h (build_primtype_type_ref, linenumber_table):
10562         Constify a char*.
10563         (java_lang_expand_expr): Add prototype.
10564
10565         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
10566         `java_lang_expand_expr'.
10567
10568         * lex.c (java_lex_error): Constify a char*.
10569         (java_get_unicode, java_read_char, java_allocate_new_line,
10570         java_unget_unicode, java_sneak_unicode): Prototype.
10571
10572         * parse-scan.y (current_class, package_name, method_declarator,
10573         report_class_declaration, yyerror): Constify a char*.
10574
10575         * parse.h (java_report_errors): Prototype.
10576         (yyerror): Constify a char*.
10577
10578         * parse.y (classitf_redefinition_error, check_modifiers,
10579         parse_jdk1_1_error, lookup_package_type,
10580         lookup_package_type_and_set_next, get_printable_method_name,
10581         purify_type_name): Constify a char*.
10582         (build_super_invocation, maybe_generate_finit,
10583         verify_constructor_super, parser_add_interface,
10584         add_superinterfaces, jdep_resolve_class, note_possible_classname,
10585         java_complete_expand_methods, java_expand_finals,
10586         cut_identifier_in_qualified, java_stabilize_reference,
10587         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10588         merge_string_cste): Prototype.
10589         (single_type_import_declaration, yyerror,
10590         variable_redefinition_error, build_array_from_name,
10591         build_unresolved_array_type, check_class_interface_creation,
10592         resolve_class, complete_class_report_errors,
10593         note_possible_classname, read_import_dir,
10594         find_in_imports_on_demand, resolve_package, fix_constructors,
10595         check_deprecation, lookup_method_invoke,
10596         maybe_build_primttype_type_ref, array_constructor_check_entry):
10597         Constify a char*.
10598         (java_complete_expand_methods, java_expand_finals): Make static.
10599         (convert_narrow): Remove static prototype.
10600
10601 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
10602
10603         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10604
10605 1999-08-02  Richard Henderson  <rth@cygnus.com>
10606
10607         * decl.c: Include defaults.h instead of expr.h.
10608         * parse.y: Likewise.
10609
10610 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
10611
10612         * java/decl.c (start_java_method): Change all uses of
10613         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10614         Ensure expr.h is included.
10615         * java/expr.c (pop_arguments): Ditto.
10616         * java/parse.y (expand_start_java_method): Ditto.
10617
10618 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10619
10620         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10621
10622 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
10623
10624         * decl.c: Include "function.h".
10625         * except.c: Likewise.
10626         * parse.y: Likewise.
10627         * Makefile.in: Update dependencies.
10628
10629 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10630
10631         * expr.c (build_java_soft_divmod): Provide a default case in switch.
10632         (java_lang_expand_expr): Mark parameters `target', `tmode' and
10633         `modifier' with ATTRIBUTE_UNUSED.
10634
10635         * gjavah.c (process_file): Add braces around ambiguous `else'.
10636
10637         * jcf-dump.c (print_access_flags, localvar_free): Change return
10638         type to void.
10639
10640         * parse.y (java_complete_expand_method): Initialize variable
10641         `exception_copy'.
10642         (resolve_qualified_expression_name): Likewise for `field_decl'.
10643         (patch_method_invocation): Likewise for `class_to_search'.
10644         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10645         (patch_assignment): Likewise for `lhs_type'.
10646
10647         * verify.c (verify_jvm_instructions): Remove unused variable
10648         `caller'.
10649
10650 1999-07-25  Richard Henderson  <rth@cygnus.com>
10651
10652         * decl.c (va_list_type_node): New.
10653
10654 1999-07-25  Anthony Green  <green@cygnus.com>
10655
10656         * gjavah.c (print_stub): New function.
10657         (METHOD_IS_NATIVE): New macro.
10658         (print_mangled_classname): Make static.
10659         (HANDLE_END_FIELD): Don't emit fields during stub generation.
10660         (process_file): Perform stub generation.
10661         (HANDLE_METHOD): Don't emit class decls during stub
10662         generation.
10663         (HANDLE_END_METHOD): Take into account stub generation.
10664         (print_method_info): Handle stub generation.
10665         (print_stub): New function.
10666         (print_cxx_classname): Make signature consistant with others.
10667         (help): Describe -stubs option.
10668         (main): Create stub file.
10669         (version): Use version.c.
10670         (print_full_cxx_name): New function.
10671         (print_c_decl): Use print_full_cxx_name.
10672
10673 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10674
10675         * check-init.c (check_init): Handle MAX_EXPR.
10676
10677 1999-07-15  Andrew Haley  <aph@cygnus.com>
10678
10679         * lang.c (flag_use_divide_subroutine): New variable.
10680         * typeck.c: (convert_ieee_real_to_integer): Bounds check
10681         fp-to-integer conversion.
10682         (convert): Call convert_ieee_real_to_integer when flag_fast_math
10683         is not set.
10684
10685         * expr.c (build_java_soft_divmod): New function.
10686         (build_java_binop): Call build_java_soft_divmod if
10687         flag_use_divide_subroutine is set.
10688         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10689         soft_lrem_node: new builtin functions.
10690         (init_decl_processing) Initialize the new builtins.
10691         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10692         soft_lrem_node: new builtin functions.
10693         (build_java_soft_divmod): New function.
10694         * parse.y: Call build_java_soft_divmod if
10695         flag_use_divide_subroutine is set.
10696         * parse.c: Rebuilt.
10697
10698         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10699         a --specs= arg) even if not linking.
10700         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10701         -fuse-divide-subroutine
10702
10703 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10704
10705         * parse.y (resolve_and_layout): Check methods only once.
10706         (resolve_qualified_expression_name): Verify thrown exceptions
10707         compatibility.
10708         (check_thrown_exceptions): Reject exceptions thrown in
10709         initializer. Error message tuned.
10710
10711 1999-07-14  Andrew Haley  <aph@cygnus.com>
10712
10713         * expr.c (expand_expr): Do not return the last statement in a
10714         block as the block's value.
10715
10716 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10717
10718         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10719         CALL_EXPR, to avoid order of evaluation changes.
10720
10721 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10722
10723         * parse.y (qualify_ambiguous_name): Do not use
10724         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10725
10726 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10727
10728         * check-init.c (check_init): Handle MAX_EXPR.
10729         * expr.c (force_evaluation_order): Force method call arguments to
10730         be evaluated in left-to-right order.
10731         * parse.y (qualify_ambiguous_name): Loop again to qualify
10732         NEW_ARRAY_EXPR properly.
10733
10734 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10735
10736         * parse.y (patch_invoke): Resolve unresolved invoked method
10737         returned type.
10738         (qualify_ambiguous_name): STRING_CST to qualify expression for
10739         type name resolution.
10740
10741 1999-06-24  Andrew Haley  <aph@cygnus.com>
10742
10743         * class.c (finish_class): Whenever a deferred method is
10744         output, rescan the list of methods to see if a new candidate for
10745         output can be found.
10746
10747 1999-06-28  Tom Tromey  <tromey@cygnus.com>
10748
10749         * jvspec.c (lang_specific_driver): Recognize --help.
10750
10751 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10752
10753         * parse.y (resolve_package): Fixed bogus return statement.
10754         (patch_method_invocation): Resolve method invocation beginning with
10755         a package name qualifier.
10756
10757 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10758
10759         * Make-lang.in (java.stage1): Depend on stage1-start.
10760         (java.stage2): Likewise for stage2-start.
10761         (java.stage3): Likewise for stage3-start.
10762         (java.stage4): Likewise for stage4-start.
10763
10764 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10765
10766         * parse.y (java_complete_lhs): When doing cross referencing, don't
10767         try to keep file location on a WFL expanded as a CALL_EXPR.
10768
10769 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10770
10771         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10772         compiling to class file a void method with an empty method body.
10773         As a side effect, the bytecode backend will generate the
10774         appropriate `return' instruction.
10775
10776 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10777
10778         * parse.y (lookup_package_type_and_set_next): New function prototype.
10779         (resolve_package): Search current and imported packages.
10780         (lookup_package_type_and_set_next): New function.
10781
10782 1999-06-22  Andrew Haley  <aph@cygnus.com>
10783
10784         * verify.c (verify_jvm_instructions): Check for pending blocks
10785         before invalid PC test and opcode switch, not after.
10786
10787 1999-06-21  Andrew Haley  <aph@cygnus.com>
10788
10789         * except.c (find_handler_in_range): The upper limit for exception
10790         ranges is exclusive, not inclusive: (start <= pc < end).
10791         (link_handler): find child pointer which points to outer by
10792         searching sibling list: previous code incorrectly assumed that
10793         outer->outer->first_child must point to outer.
10794         * verify.c (verify_jvm_instructions): FIXME added to code for
10795         `athrow'.
10796         (verify_jvm_instructions): Do not assume that the last block
10797         processed in a subroutine is a block which ends with a `ret'
10798         instruction.  With some control flows it is possible that the last
10799         block ends with an `athrow'.
10800
10801 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10802
10803         * parse.y (qualify_ambiguous_name): Reorganized the post
10804         evaluation of non WFL leading expression nodes.
10805
10806 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10807
10808         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10809         CONVERT_EXPR.
10810
10811 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10812
10813         * parse.y (qualify_ambiguous_name): Handle qualified expression
10814         beginning with a STRING_CST.
10815
10816 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10817
10818         * parse.y (register_fields): Set DECL_INITIAL on both
10819         pre-initialized static and public fields.
10820         (resolve_field_access): Static field access expressions to always
10821         use pointer types.
10822         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10823         qualification. CONVERT_EXPR to be resolved as an expression name.
10824         (java_complete_lhs): Identify and access qualified final
10825         initialized field in switch statement case expression.
10826         (fold_constant_for_init): Pre-initialized field decl constant to
10827         be folded.
10828
10829 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10830
10831         * parse.y (note_possible_classname): Mark returned node with
10832         QUALIFIED_P only if the original class name contained a '/'.
10833
10834 1999-06-05  Anthony Green  <green@cygnus.com>
10835
10836         * Make-lang.in (gcjh): More parallel build fixes.
10837
10838 1999-06-03  Mike Stump  <mrs@wrs.com>
10839
10840         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10841
10842 1999-06-02  Anthony Green  <green@cygnus.com>
10843
10844         * except.c (link_handler): Chain exception handlers in order.
10845
10846 1999-06-02  Anthony Green  <green@cygnus.com>
10847
10848         * expr.c (expand_byte_code): Fill unreachable bytecode regions
10849         with nops and process as usual in order to always set correct EH
10850         ranges.  Emit detailed warnings about unreachable bytecodes.
10851
10852 1999-06-02  Anthony Green  <green@cygnus.com>
10853
10854         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10855         constant.
10856
10857 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10858
10859         * parse.y (lookup_field_wrapper): Unified returned value to NULL
10860           or the searched field decl.
10861
10862 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10863
10864         * parse.y (fold_constant_for_init): Convert numerical constant
10865         values to the type of the assigned field.
10866
10867 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10868
10869         * expr.c (lookup_field): Relaxed the test on class loading error
10870         detection.
10871         * parse.y (fold_constant_for_init): Enabeled old code.
10872
10873 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10874
10875         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10876         decide the validity of the cast of a java.lang.Cloneable reference
10877         to an array.
10878         (patch_conditional_expr): Fixed first argument passed to
10879         binary_numeric_promotion.
10880
10881 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10882
10883         * parse.y (qualify_ambiguous_name): Take into account that a
10884         CONVERT_EXPR might specify a type as a WFL.
10885
10886 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10887
10888         * parse.y (patch_assignment): Save the rhs before using it as an
10889         argument to _Jv_CheckArrayStore.
10890
10891 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10892
10893         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10894
10895 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10896
10897         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10898         floating point literal only when the exponent indicator has been
10899         parsed.
10900
10901 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10902
10903         * parse.y (formal_parameter:): Construct argument tree list
10904         element even if a yet unsupported final parameter was encountered.
10905
10906 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10907
10908         * parse.y (finish_method_declaration): Issue errors for native or
10909         abstract methods declared with a method body, as well as for non
10910         native or non abstract methods with no method body.
10911
10912 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10913
10914         * class.c (build_utf8_ref): Initialize variable `field'.
10915
10916         * decl.c (init_decl_processing): Initialize variable `field'.
10917
10918         * expr.c (build_known_method_ref): Mark parameters `method_type',
10919         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10920         (process_jvm_instruction): Likewise for parameter `length'.
10921
10922         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10923         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10924         ATTRIBUTE_UNUSED.
10925
10926         * parse.y (maybe_generate_clinit): Remove unused variable
10927         `has_non_primitive_fields'.
10928         (find_in_imports_on_demand): Initialize variables `node_to_use'
10929         and `cl'.
10930         (patch_binop): Likewise for variable `prom_type'.
10931         (patch_unaryop): Likewise for variable `prom_type'.
10932
10933         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10934
10935         * xref.c (xref_table): Add missing initializer.
10936
10937 1999-05-14  Tom Tromey  <tromey@cygnus.com>
10938
10939         * java-except.h (struct eh_range): Removed unused `next' member.
10940         * verify.c (verify_jvm_instructions): Call check_nested_ranges
10941         after adding all exception handlers.  Sort exception ranges in
10942         order of start PC.
10943         (struct pc_index): New structure.
10944         (start_pc_cmp): New function.
10945         * except.c (add_handler): Return `void'.  Don't call link_handler;
10946         instead construct an ordinary linked list and do range
10947         coalescing.
10948         (check_nested_ranges): New function.
10949         (link_handler): Changed interface to allow merging of eh_ranges.
10950         Split overlapping ranges.  Return `void'.
10951
10952 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10953
10954         * parse.y (constructor_block_end:): New rule, tagged <node>.
10955         (constructor_body:): Use `constructor_block_end' instead of
10956         `block_end'.
10957
10958 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10959
10960         * parse.y (statement_nsi:): Pop `for' statement block.
10961         (java_complete_lhs): Labeled blocks containing no statement are
10962         marked as completing normally.
10963
10964 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10965
10966         * xref.c (xref_set_current_fp): New function, defined.
10967         * xref.h (xref_set_current_fp): New function, prototyped.
10968
10969 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10970
10971         * check-init.c (check_init): Take into account that
10972         LABELED_BLOCK_STMT can be empty.
10973
10974 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10975
10976         * parse.y (java_check_regular_methods): Warning check on not
10977         overriding methods with default access in other packages does not
10978         apply to `<clinit>'.
10979         (java_complete_lhs): If block body is an empty_stmt_node, replace
10980         it by NULL_TREE. This prevents gcc from generating an irrelevant
10981         warning.
10982
10983 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10984
10985         * check-init.c (check_init): Removed code accepting to see things
10986         falling through default:, when doing xrefs.
10987         * java-tree.h (do_not_fold): New global variable, declared.
10988         * parse.y (do_not_fold): New global variable, defined.
10989         (java_complete_expand_method): Set `do_not_fold' to the value of
10990         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10991         and reinstall them after them have been purged; do not check for
10992         initializations; do not issue missing return errors.
10993         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10994         when doing xrefs.
10995         (patch_binop): Skip the fold part when doing xrefs.
10996         (build_string_concatenation): Skip the concatenation part when
10997         doing xrefs.
10998         (patch_synchronized_statement): Do not generate a try-finally when
10999         doing xrefs.
11000         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
11001         and keep the location where the throw was seen.
11002         * typeck.c (convert): When `do_not_fold' is set, do not attempt
11003         any treatment on the converted node an simply return a NOP_EXPR of
11004         the targeted type.
11005         * xref.c (xref_get_data): New function, defined.
11006         * xref.h (xref_get_data): New function, declared.
11007         (XREF_GET_DATA): Use xref_get_data.
11008
11009 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11010
11011         * gjavah.c (print_include): Cast the result of `strlen' to int
11012         when comparing against a signed value.
11013         (add_namelet): Likewise.
11014
11015 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11016
11017         * expr.c (expand_invoke): Mark parameter `nargs' with
11018         ATTRIBUTE_UNUSED.
11019         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
11020
11021         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
11022         ATTRIBUTE_UNUSED.
11023
11024         * jcf-reader.c (get_attribute): Cast a value to long
11025         when comparing against a signed expression.  Likewise.
11026
11027         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
11028         HOST_BITS_PER_CHAR.
11029
11030 1999-05-11  Andrew Haley  <aph@cygnus.com>
11031
11032         * parse.y (source_end_java_method): If the current method contains
11033         any exception handlers, force asynchronous_exceptions: this is
11034         necessary because signal handlers in libjava may throw exceptions.
11035         * decl.c (end_java_method): Ditto.
11036
11037 1999-05-11  Tom Tromey  <tromey@cygnus.com>
11038
11039         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
11040         flags.
11041         * jvspec.c (THREAD_NAME): Removed.
11042         (GC_NAME): Likewise.
11043         (MATHLIB): Likewise.
11044         (WITHLIBC): Likewise.
11045         (GCLIB): Likewise.
11046         (THREADLIB): Likewise.
11047         (MATH_LIBRARY): Likewise.
11048         (lang_specific_driver): Don't add `-l' options to command line.
11049         Instead, add a single --specs option.  Recognize `-L' options and
11050         use them to search for spec file.
11051         (find_spec_file): New function.
11052         (SPEC_FILE): New define.
11053
11054 1999-05-11  Dave Brolley  <brolley@cygnus.com>
11055
11056         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
11057         cpplib-enabled build.
11058
11059 1999-05-05  Per Bothner  <bothner@cygnus.com>
11060
11061         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
11062         temporarily zero it while calling rest_of_decl_compilation.
11063
11064         * java-tree.h (string_ptr_type_node):  Add declaration.
11065         * decl.c:  Define and initialize string_ptr_type_node.
11066         * parse.y (patch_string_cst):  Use string_ptr_type_node.
11067
11068         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
11069         * parse.y (for_statement):  Now unconditionally exit_block.
11070         (finish_labeled_statement):  No longer exit_block if for-loop.
11071         (patch_loop_statement):  Check harder if the loop is already labeled.
11072
11073         * parse.y (patch_initialized_static_field):  Removed function.
11074         (maybe_generate_clinit):  Removed special handling for interfaces.
11075         (java_complete_expand_methods):  Do a preliminary java_complete_tree
11076         on <clinit> to determine if it can be removed.
11077         (java_complete_expand_method):  Remove special handling for <clinit>.
11078         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
11079         optimize if we get back empty_stmt_node.
11080         For MODIFY_EXPR, re-do checking of static initializers.
11081         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
11082         For VAR_DECL, pass correct context.
11083
11084         * verify.c (verify_jvm_instructions):  Better error messages.
11085
11086 1999-05-03  Tom Tromey  <tromey@cygnus.com>
11087
11088         * parse-scan.y (interface_declaration): Call
11089         report_class_declaration for interfaces.
11090
11091 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
11092
11093         * Makefile.in: Remove -v from bison command lines.
11094
11095 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11096
11097         * check-init.c (check_init): Exclude a case of error when doing
11098         xrefs.
11099         * class.c (layout_class_method): Don't generate the error message
11100         twice when compiling from source.
11101         * lang-options.h: Added `-Wredundant-modifers' and
11102         `-Wunusupported-jdk11' flags and help text.
11103         * lang.c (lang_decode_option): Added support for
11104         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
11105         flag_static_local_jdk11 and flag_redundant set accordingly.
11106         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
11107         * parse.h (EXPR_WFL_ADD_COL): New macro.
11108         (DECL_END_SOURCE_LINE): Likewise.
11109         (DECL_INHERITED_SOURCE_LINE): Likewise.
11110         * parse.y (static_ref_err): New function, prototyped.
11111         (CCB_TK): Now tagged <operator>.
11112         (class_body:): Remember the location of the closing '}' of a class
11113         definition when doing xrefs.
11114         (block:): Likewise.
11115         (block_end:): Likewise.
11116         (create_class): Remember the location of the inherited class
11117         identifier when doing xrefs.
11118         (register_fields): Added test on first operand of `init' before
11119         testing it TREE_CODE.
11120         (method_header): Store the location of the class identifier in the
11121         class decl when doing xrefs.
11122         (finish_method_declaration): Don't combine first/last method line
11123         when doing xref.
11124         (java_check_regular_methods): Warning check on not overriding
11125         methods with default access on other packages move before check on
11126         static methods. Initialization of `aflags' also moved up.
11127         (resolve_expression_name): Call static_ref_err to report the error.
11128         (static_ref_err): New function, implemented.
11129         (resolve_field_access): Returned simplified static field access
11130         when doing xrefs.
11131         (resolve_qualified_expression_name): Check for illegal use of
11132         static fields in a non static context. Call static_ref_err to
11133         report error in various places.
11134         (java_complete_tree): Do not fold initialized static fields when
11135         doing xrefs.
11136         (java_complete_lhs): Likewise.
11137
11138 1999-04-29  Anthony Green  <green@cygnus.com>
11139
11140         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
11141         create internal labels.
11142         (lookup_label): Ditto.
11143
11144 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11145
11146         * class.c (layout_class_method): Generate <clinit>'s rtl for
11147         interfaces.
11148         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11149         for interfaces' <clinit>.
11150         * expr.c (lookup_field): Search for fields in interfaces.
11151         (expand_invoke): Fixed indentation.
11152         (expand_java_field_op): Likewise. Use IS_CLINIT.
11153         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
11154         (IS_CLINIT): New macro.
11155         * parse.y (type_declaration:): Call maybe_generate_clinit after an
11156         interface was parsed.
11157         (maybe_generate_clinit): Don't generate if the current class is an
11158         interface with only fields of primitive types.
11159         (reset_method_name): Use IS_CLINIT.
11160         (java_complete_expand_method): Expand <clinit> when it exists for
11161         interfaces. Use IS_CLINIT.
11162         (resolve_expression_name): Use DECL_CONTEXT instead of
11163         current_class to build static field references.
11164         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
11165         ARRAY_REF when doing xreferencing.
11166         (check_final_assignment): Fixed typo in leading comment. Use
11167         IS_CLINIT.
11168         (patch_array_ref): Don't fully expand array references when
11169         xreferencing.
11170         (patch_return): Use IS_CLINIT.
11171         (patch_throw_statement): Likewise.
11172
11173 1999-04-22  Tom Tromey  <tromey@cygnus.com>
11174
11175         * Make-lang.in (JAVA_SRCS): Added check-init.c.
11176
11177 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11178
11179         * decl.c (predef_filenames, predef_filenames_size): New globals
11180         (init_decl_processing): predef_filenames and predef_filenames_size
11181         initialized.
11182         * java-tree.h (predef_filenames, predef_filenames_size): Declared
11183         extern.
11184         * jcf-parse.c (predefined_filename_p): New function.
11185         (yyparse): Check that files on the command line are specified only
11186         once and issue a warning otherwise.
11187         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
11188         * parse.y (source_end_java_method): Nullify NOP method bodies, to
11189         avoid a gcc warning with -W -Wall turned on.
11190         (java_expand_classes): Abort if errors were encountered.
11191         (java_complete_lhs): If the cross reference flag is set, wrap
11192         field DECL node around a WFL when resolving expression name.
11193
11194 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11195
11196         * lang.c (lang_decode_option): Fixed returned value when parsing
11197         `-fxref=...' and `-Wall'.
11198         * parse.y (source_end_java_method): Do not generate code when
11199         flag_emit_xref is set.
11200         (resolve_expression_name): Do not build static field access when
11201         flag_emit_xref is set.
11202         (resolve_field_access): No special treatment on `length' when
11203         flag_emit_xref is set. Do not build qualified static field access
11204         when flag_emit_xref is set.
11205         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
11206         when flag_emit_xref is set.
11207         (patch_assignment): Do not generate array store runtime check when
11208         flag_emit_xref is set.
11209         * xref.c (xref_flag_value): Fixed function declaration
11210         indentation.
11211         (xset_set_data): New function.
11212         * xref.h (xref_set_data): Added prototype for new function.
11213         (typedef struct xref_flag_table): New field data.
11214         (XREF_GET_DATA): New macro.
11215
11216 1999-04-19  Tom Tromey  <tromey@cygnus.com>
11217
11218         * xref.h (enum): Removed trailing comma.
11219
11220         * parse.y (resolve_qualified_expression_name): Added missing
11221         `break'.
11222
11223 1999-04-15  Anthony Green  <green@cygnus.com>
11224
11225         * gjavah.c: New prototypes for java_float_finite and
11226         java_double_finite.
11227
11228 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11229
11230         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
11231         references.
11232
11233 1999-04-06  Jeffrey A Law  (law@cygnus.com)
11234
11235         * Makefile.in (TREE_H): Add tree-check.h.
11236         (RTL_H): Add genrtl.h.
11237
11238 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11239
11240         * parse.y (patch_assignment): Added ArrayStoreException runtime
11241         check.
11242
11243 1999-04-06  Per Bothner  <bothner@cygnus.com>
11244
11245         * expr.c (pop_type_0):  New function.
11246         (pop_type):  Use pop_type_0.
11247         * java-tree.h (pop_type_0):  New declaration.
11248         * verify.c (verify_jvm_instructions):  Check return instructions.
11249
11250         * parse.y (patch_binop):  Don't fold if non-constant and emiting
11251         class files.
11252
11253 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11254
11255         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
11256
11257         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
11258         (main_jcf): Don't define.
11259         (process_file): Don't set `main_jcf'.
11260
11261         * java-tree.h (main_jcf): Don't declare.
11262
11263         * jcf-parse.c (main_jcf): Add static definition.
11264
11265         * lang.c (main_jcf): Don't define.
11266
11267 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11268
11269         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
11270
11271         * decl.c (copy_lang_decl): Likewise for `bcopy'.
11272
11273         * jcf-depend.c: Include "config.h", not <config.h>.
11274
11275         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
11276         `bcopy' to PTR.
11277
11278         * jcf-path.c: Include "config.h", not <config.h>.
11279
11280         * lex.c: Don't include various system header files.
11281         (java_init_lex): Cast the argument of `bzero' to PTR
11282
11283         * parse-scan.y (java_push_parser_context): Likewise.
11284
11285         * parse.y (java_push_parser_context): Likewise.
11286         (patch_bc_statement): Match format specifier to variable argument.
11287
11288         * xref.c: Don't include <stdio.h>.
11289
11290 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11291
11292         * parse.y (struct parser_ctxt *ctxp): Now global.
11293         (declare_local_variables): Use WFL compound value for the
11294         declaration source line value, when doing cross-referencing.
11295
11296 1999-03-31  Tom Tromey  <tromey@cygnus.com>
11297
11298         * gjavah.c (print_field_info): Allow constants of other types.
11299         (print_include): Generate include when new name is proper prefix
11300         of already printed name.
11301         (add_namelet): Likewise.
11302         (cxx_keyword_subst): New function.
11303         (print_method_info): Use it.
11304         (print_field_name): New function.
11305         (get_field_name): New function.
11306         (print_field_info): Use get_field_name and print_field_name.
11307
11308 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11309
11310         * Makefile.in (keyword.h): Generate using gperf language 'C', not
11311         'KR-C', so gperf uses the `const' keyword on strings.
11312
11313         * keyword.gperf (java_keyword): Const-ify a char*.
11314
11315 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11316
11317         * parse.y (patch_bc_statement): Fixed identation and a bogus
11318         `printf' format.
11319
11320 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11321
11322         * parse.y (patch_assignment): Allow static variables in other
11323         classes to be assigned.
11324
11325 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11326
11327         * class.c (maybe_add_interface): Remove unused variable
11328         `interface_binfo'.
11329         (make_class_data): Use = for assignment, not ==.  Likewise.
11330         (emit_register_classes): Remove unused variable `decl'.
11331
11332         * lex.c: Fix comment so as not to contain an embedded `/*'.
11333
11334         * verify.c (verify_jvm_instructions): Remove unused variable
11335         `self_type'.
11336
11337 1999-03-27  Per Bothner  <bothner@cygnus.com>
11338
11339         * parse.y (complete_loop_body):  Rename to finish_loop_body.
11340         (complete_labeled_statement):  Rename to finish_labeled_statement.
11341         (complete_for_loop):  Rename to finish_for_loop.
11342         (complete_method_declaration):  Rename to finish_method_declaration.
11343
11344         * java-tree.h (continue_identifier_node):  New global node.
11345         * decl.c:  Define and initialize continue_identifier_node.
11346         * parse.y (generate_labeled_block):  Remove - no longer needed.
11347         (build_loop_body):  Use continue_identifier_node for continue block.
11348         (finish_labeled_statement):  Also do pop_labeled_block actions.
11349         (java_complete_lhs):  POP_LOOP even if error.
11350         (build_labeled_block):  Special handling for continue_identifier_node.
11351         (patch_loop_statement):  Re-organize.
11352         (patch_bc_statement):  Re-write.
11353
11354 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11355
11356         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11357         using a WFL compound value.
11358         * parse.y (xref.h): Include.
11359         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11360         WFL compound value.
11361         (register_fields): Set WFL compound value to lineno if doing
11362         xrefs.
11363         (java_complete_expand_method): Call expand_xref if flag_emit_xref
11364         is set.
11365         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11366         * xref.h (expand_xref): Prototype renamed from xref_generate.
11367
11368 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11369
11370         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11371         (GET_CURRENT_BLOCK): New macro.
11372         * parse.y (current_static_block): New global variable.
11373         (method_body:): Define action.
11374         (complete_method_declaration): Set current_function_decl to NULL
11375         when work on the current method is done.
11376         (declare_local_variables): Use GET_CURRENT_BLOCK.
11377         (java_method_add_stmt): Likewise.
11378         (java_complete_expand_method): Disable the use of `this' when
11379         expanding <clinit>.
11380         (enter_a_block): If no current method exist, use
11381         current_static_block to link static initializer blocks.
11382         (exit_block): Rewritten to use current_static_block when no current
11383         method decl exists.
11384         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11385         (patch_return): Forbid the use of `return' in static initializers.
11386         (patch_throw_statement): Fixed indentation. Issue specific error
11387         for uncaught thrown checked exception in static initializer
11388         blocks. Removed FIXME.
11389
11390 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
11391
11392         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11393         Link gcj from gcc.o.
11394
11395 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11396
11397         * parse.y (find_applicable_accessible_methods_list): When dealing
11398         with interface: ensure that a given interface or java.lang.Object
11399         are searched only once.
11400
11401 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11402
11403         * gjavah.c (print_c_decl): Remove unused argument `flags'.
11404
11405         * jcf-dump.c (print_access_flags): Add braces around if-else.
11406
11407         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11408         COMBINE_INPUTS.
11409
11410         * lex.c (build_wfl_node): Add static prototype.
11411
11412         * lex.h (build_wfl_node): Remove static prototype.
11413
11414         * parse.y: Include lex.c early enough to declare everything needed.
11415         Ensure calls to `build_wfl_node' pass the proper arguments.
11416         (create_class): Remove unused variable `super_decl'.
11417         (get_printable_method_name): Initialize variable `name'.
11418
11419 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11420
11421         * Changelog: Fixed 1999-03-22 typos.
11422         * lang.c (lang_decode_option): Fixed typo in error string in the
11423         XARG section.
11424
11425 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11426
11427         * Makefile.in (JAVA_OBJS): Added entry xref.o.
11428         (xref.o): New rule.
11429         * java-tree.h (flag_emit_xref): Declared extern.
11430         * lang.c (xref.h): Included.
11431         (flag_emit_xref): New global variable.
11432         (lang_decode_option): Added support for -fxref.
11433         * xref.c: Created.
11434         * xref.h: Likewise.
11435
11436 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
11437
11438         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11439         linked with.
11440
11441 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11442
11443         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11444         $(srcdir)/../system.h and $(JAVA_TREE_H).
11445         (jcf-io.o): Depend on $(JAVA_TREE_H).
11446         (mangle.o): Likewise.
11447
11448         * check-init.c (check_cond_init): Add static prototype.
11449
11450         * class.c (build_java_method_type, hashUtf8String,
11451         make_field_value, get_dispatch_vector, get_dispatch_table,
11452         append_gpp_mangled_type, mangle_static_field): Likewise.
11453         (strLengthUtf8): Hide unused definition.
11454         (hashUtf8String): Const-ify.
11455         (make_field_value): Un-ANSI-fy.
11456
11457         * constants.c: Move inclusion of jcf.h above java-tree.h.
11458         (set_constant_entry, find_class_or_string_constant,
11459         find_name_and_type_constant, get_tag_node,
11460         build_constant_data_ref): Add static prototype.
11461
11462         * decl.c (push_jvm_slot, builtin_function,
11463         lookup_name_current_level): Likewise.
11464         (builtin_function): Const-ify.
11465
11466         * except.c (expand_start_java_handler, expand_end_java_handler):
11467         Add static prototype.
11468
11469         * expr.c (flush_quick_stack, push_value, pop_value,
11470         java_stack_swap, java_stack_dup, build_java_athrow,
11471         build_java_jsr, build_java_ret, expand_java_multianewarray,
11472         expand_java_arraystore, expand_java_arrayload,
11473         expand_java_array_length, build_java_monitor, expand_java_pushc,
11474         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11475         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11476         expand_compare, expand_test, expand_cond, expand_java_goto,
11477         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11478         expand_java_field_op, java_push_constant_from_pool): Likewise.
11479
11480         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11481         (build_java_arraynull_check): Mark parameters `node' and `type'
11482         with ATTRIBUTE_UNUSED.
11483         (note_label): Likewise for parameter `current_pc'.
11484         (expand_java_call, expand_java_ret): Hide unused definition.
11485
11486         * java-tree.h (make_class, build_constants_constructor,
11487         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11488         init_outgoing_cpool, register_class, emit_register_classes,
11489         java_layout_seen_class_methods): Prototype.
11490         (unicode_mangling_length): Const-ify.
11491         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11492         emit_unicode_mangled_name, format_int, format_uint,
11493         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11494         jcf_print_utf8_replace, open_class): Prototype.
11495
11496         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
11497         <stdio.h>.  Include tree.h/java-tree.h.
11498         (utf8_equal_string usage, process_class): Add static prototype.
11499         (open_class): Don't prototype this here.
11500         (utf8_equal_string): Match arguments to format specifiers.
11501         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11502         TABLE_SWITCH, disassemble_method): Likewise.
11503
11504         * jcf-io.c: Include tree.h/java-tree.h.
11505         (open_class, find_classfile, jcf_print_utf8,
11506         jcf_print_utf8_replace): Const-ify.
11507
11508         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11509         parse_class_file): Add static prototype.
11510         (find_in_current_zip): Match definition to existing static
11511         prototype.
11512
11513         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11514         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11515         finish_jcf_block, define_jcf_label, get_jcf_label_here,
11516         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11517         write_chunks, adjust_typed_op, generate_bytecode_conditional,
11518         generate_bytecode_return, perform_relocations, init_jcf_state,
11519         init_jcf_method, release_jcf_state, generate_classfile):
11520         Add static prototype.
11521         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11522         (make_class_file_name): Const-ify.
11523
11524         * jcf.h (find_classfile): Const-ify.
11525
11526         * jv-scan.c (reset_report): Remove prototype.
11527
11528         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11529         (error): Rewrite to allow varargs.
11530
11531         * lang.c (lang_f_options): Const-ify.
11532
11533         * lex.c (java_parse_escape_sequence): Add static prototype.
11534         (java_allocate_new_line): Match definition to existing static
11535         prototype.
11536
11537         * mangle.c Include tree.h/java-tree.h.
11538         (unicode_mangling_length, emit_unicode_mangled_name,
11539         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11540
11541         * parse.h (jdep_code): Remove trailing comma in enumeration.
11542         (java_get_line_col): Move prototype outside of !JC1_LITE test.
11543         (reset_report): Add prototype.
11544
11545         * verify.c (push_pending_label, merge_types): Add static
11546         prototypes.
11547
11548         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11549
11550 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11551
11552         * parse.y (find_applicable_accessible_methods_list): Extend the
11553         search to superinterfaces when relevant.
11554         (search_applicable_methods_list): New function.
11555
11556 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11557
11558         * class.c (unmangle_classname): Implemented stricter testing
11559         before setting the QUALIFIED_P flag on an identifier.
11560
11561 1999-03-16  Per Bothner  <bothner@cygnus.com>
11562
11563         * parse.y (java_complete_lhs):  Call force_evaluation_order
11564         after patch_newarray.
11565         (patch_binop):  Don't call fold if there are side effects.
11566
11567 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11568
11569         * parse.y (java_stabilize_reference): Use save_expr instead of
11570         building a SAVE_EXPR node.
11571         (java_complete_lhs): Patch the resulting string of the `+='
11572         operator (if necessary) and complete the RHS after having built
11573         the cast.
11574
11575 1999-03-15  Per Bothner  <bothner@cygnus.com>
11576
11577         * class.c (make_class):  Don't set CLASS_P here (because
11578         this function is also called by build_java_array_type).
11579         (push_class):  Set CLASS_P here instead.
11580         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
11581
11582         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
11583         context.  If the context is class, perfer "super" over "synchronized".
11584         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
11585
11586         * parse.y (create_class):  Don't call parser_check_super here;
11587         it is not robust.  Always wait until later.
11588
11589         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
11590         match what JDK 1.2 does), but don't set ACC_PUBLIC.
11591
11592 1999-03-13  Per Bothner  <bothner@cygnus.com>
11593
11594         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
11595         * lex.h (UNGETC):  Change misleading macro.
11596
11597 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11598
11599         * parse.y (java_stabilize_reference): Return NODE when patching a
11600         COMPOUND_EXPR.
11601         (java_complete_lhs): Put parenthesis around truth values.
11602
11603 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11604
11605         * class.c (layout_class_method): Don't make rtl for interface
11606         methods.
11607         * parse.h (GET_TYPE_NAME): New macro.
11608         * parse.y (if_then_statement:): Fixed indentation.
11609         (if_then_else_statement:): Likewise.
11610         (for_statement:): Fixed spacing.
11611         (try_statement:): Fixed indentation.
11612         (create_interface): Don't force interfaces to be abstract.
11613         (method_header): Abstract methods are OK in interfaces.
11614         (declare_local_variables): Fixed typo in comment.
11615         (java_complete_expand_method): Fixed indentation.
11616         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11617         non accessible fields.
11618         (java_stabilize_reference): New function.
11619         (java_complete_lhs): Fixed indentation. Use
11620         java_stabilize_reference in compound assignment. Insert the
11621         cast. If not processing `+' fix string constants before processing
11622         binop.
11623
11624 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11625
11626         * constants.c (find_class_or_string_constant): Cast variable `j'
11627         to a `jword' when comparing against one.
11628
11629         * expr.c (java_lang_expand_expr): Remove unused variables
11630         `has_finally_p' and `op0'.
11631
11632         * gjavah.c (print_field_info): Cast a value to jint when comparing
11633         against one.  Likewise for a jlong.
11634         (add_namelet): Likewise cast a `sizeof' to an int when comparing
11635         against a signed quantity.
11636
11637         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11638         (print_signature): Don't needlessly dereference variable `str'
11639
11640         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11641         `max_locals' with ATTRIBUTE_UNUSED.
11642         (jcf_parse_class): Likewise for variable `index'.
11643
11644         * parse.h (reverse_jdep_list): Remove static prototype.
11645
11646         * parse.y (build_jump_to_finally): Remove prototype and definition.
11647         (reverse_jdep_list): Add static prototype.
11648
11649         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11650         `assignment' and `expr_decl'.
11651
11652         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11653
11654 1999-03-12  Andrew Haley  <aph@cygnus.com>
11655
11656         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11657         we'll need a directory separator and a null character.
11658
11659 1999-03-10  Per Bothner  <bothner@cygnus.com>
11660
11661         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
11662
11663   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11664
11665         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11666         interfaces.
11667
11668 1999-03-05  Per Bothner  <bothner@cygnus.com>
11669
11670         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
11671
11672         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
11673
11674         * class.c (layout_class_method):  A static method in a base class
11675         is never overridden, so treat it like it doesn't exist.
11676         However, do complain about private non-static method overriding
11677         public static method.
11678
11679         * parse.y:  Don't set unused INITIALIZED_P flag.
11680         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
11681
11682         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
11683         (build_array_from_name):  Re-order &index[string] to &string[index].
11684
11685         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
11686         error_mark (it might catch more errors, but it is more likely to lose).
11687
11688 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11689
11690         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11691         (parse-scan.o): Depend on toplev.h.
11692
11693         * class.c (make_method_value): Add prototype.  Make it static.
11694         Remove unused second argument, caller changed.
11695
11696         * expr.c (java_lang_expand_expr): Remove unused variable
11697         `return_label'.
11698
11699         * java-tree.h: Don't prototype find_in_current_zip.
11700         Add prototypes for verify_constant_pool, start_java_method,
11701         end_java_method, give_name_to_locals, expand_byte_code,
11702         open_in_zip, set_constant_value, find_constant1, find_constant2,
11703         find_utf8_constant, find_string_constant, find_class_constant,
11704         find_fieldref_index, find_methodref_index, write_constant_pool,
11705         count_constant_pool_bytes and encode_newarray_type.
11706
11707         * jcf-dump.c: Remove unused variable `LONG_temp'.
11708
11709         * jcf-parse.c: Include parse.h.
11710         (jcf_parse_source): Remove unused parameter, all callers changed.
11711         (jcf_figure_file_type): Add static prototype.
11712         (find_in_current_zip): Likewise.  Also remove unused parameter,
11713         all callers changed.
11714         (read_class): Initialize variable `saved_pos'.
11715
11716         * jcf-reader.c (jcf_parse_preamble): Mark variables
11717         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11718
11719         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11720         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11721         (java_parse_doc_section): Initialize variable `seen_star'.
11722         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11723         (java_lex_error): Mark parameters `msg' and `forward' with
11724         ATTRIBUTE_UNUSED.
11725         (java_get_line_col): Mark parameters `filename' and `line' with
11726         ATTRIBUTE_UNUSED.
11727
11728         * parse-scan.y: Include toplev.h.
11729         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11730
11731         * parse.h: use `struct JCF', not plain `JCF'.
11732         (java_parser_context_save_global, java_expand_classes
11733         java_parser_context_restore_global, java_parse): Add prototypes.
11734
11735         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11736         `node'.
11737
11738 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
11739
11740         *  check-init.c (check_init):  COPYN takes word count, not bit count.
11741
11742 1999-02-26  Per Bothner  <bothner@cygnus.com>
11743
11744         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
11745         explicit build_decl.  (Avoids crash in reload when optimizing.)
11746
11747 1999-02-25  Per Bothner  <bothner@cygnus.com>
11748
11749         * decl.c (complete_start_java_method):  Handle synchronized method
11750         even when compiling from bytecode.
11751
11752 1999-02-26  Tom Tromey  <tromey@cygnus.com>
11753
11754         * gjavah.c (add_class_decl): Only generate `#include' if outer
11755         class is not the name of the class we are processing.  Correctly
11756         append `.h' in #include.
11757         (process_file): Clean up newlines around generated `#include's.
11758         (decode_signature_piece): Correctly handle inner classes.
11759         (struct include): New structure.
11760         (all_includes): New global.
11761         (print_include): New function.
11762         (add_class_decl): Use it.
11763         (process_file): Likewise.
11764         (add_class_decl): Generate include for java-array.h if array
11765         seen.
11766         (process_file): Don't generate java-array.h include.
11767
11768         * gjavah.c (add_namelet): Check for standard package names here.
11769         (add_class_decl): Don't check for standard package names here.
11770
11771 1999-02-25  Tom Tromey  <tromey@cygnus.com>
11772
11773         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11774         When reading a zip file, only use strncmp if both strings are
11775         bigger than the buffer length.  Initialize `k' when looping
11776         through zip file.
11777
11778 1999-02-24  Tom Tromey  <tromey@cygnus.com>
11779
11780         * gjavah.c (struct namelet): New structure.
11781         (add_namelet): New function.
11782         (print_namelet): New function.
11783         (print_class_decls): Use add_namelet and print_namelet to generate
11784         namespaces and not classes.
11785         (method_printed): New global.
11786         (HANDLE_END_METHOD): Examine method_printed.
11787         (print_method_info): Set method_printed when required.  Print
11788         error if function to be ignored is marked virtual.  Handle $finit$
11789         method.
11790         (METHOD_IS_FINAL): New macro.
11791         (print_field_info): Use it.
11792         (HANDLE_METHOD): Clear method_printed.
11793         (method_pass): New global.
11794         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11795         (process_file): Do two passes over both fields and methods.
11796         (HANDLE_METHOD): Examine method_pass.
11797         (root): New global.
11798         (add_class_decl): New function.
11799         (print_class_decls): Don't scan over entire constant pool.
11800
11801 1999-02-23  Tom Tromey  <tromey@cygnus.com>
11802
11803         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11804         disable linking in that case.
11805
11806 1999-02-20  Tom Tromey  <tromey@cygnus.com>
11807
11808         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11809         not 0x1f.
11810
11811 1999-02-21  Per Bothner  <bothner@cygnus.com>
11812
11813         * decl.c (build_result_decl), java-tree.h:  New method.
11814         (complete_start_java_method):  Handle synchronized methods.
11815         Don't build DECL_RESULT here.  (Ordering dependency problem.)
11816         (start_java_method):  Call build_result_decl here instead  ...
11817         * parse.y (java_complete_expand_method):  ... and here.
11818         (expand_start_java_method): Don't call complete_start_java_method here.
11819         (java_complete_expand_method):  Call it here instead.
11820         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
11821         * java-tree.h:  ... here.
11822
11823         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
11824         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
11825         for ARRAY_REF - it doesn't work when array bounds are checked.
11826         (patch_array_ref):  Handle it here instead.
11827
11828         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
11829
11830 1999-02-19  Per Bothner  <bothner@cygnus.com>
11831
11832         Force left-to-right evaluation of binary operations etc.
11833         * expr.c (force_evaluation_order), java-tree.h:  New function.
11834         * parse.y (java_complete_lhs):  Pass binary operations, procedure
11835         calls, and ARRAY_REFs to force_evaluation_order.
11836         (various):  Set TREE_SIDE_EFFECTS more carefully.
11837
11838         Tolerate random (non-UTF8) encoding in comments without complaining.
11839         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
11840         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
11841
11842         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
11843         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
11844
11845         * parse.y (java_complete_lhs):  Ignore an empty statement in a
11846         COMPOUND_EXPR.  Don't complain about empty statement after return.
11847
11848 1999-02-19  Per Bothner  <bothner@cygnus.com>
11849
11850         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
11851         in TREE_LIST - just chain the POINTER_TYPEs together.
11852         (resolve_class):  If type already resolved, return decl.
11853         After resolving, update TREE_TYPE(class_type), and name (if array).
11854         * parse.h (do_resolve_class), parse.y:  Make non-static.
11855         * class.c (maybe_layout_super_class):  Take this_class argument.
11856         Do do_resolve_class if necessary.
11857         (layout_class, layout_class_methods): Adjust calls appropriately.
11858         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11859         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
11860         * typeck.c (build_java_array_type):  Don't call layout_class.
11861
11862 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11863
11864         * parse.y (check_pkg_class_access): Allow private class access
11865         within the same package.
11866         (strip_out_static_field_access_decl): New function.
11867         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11868         operator argument before testing its nature.
11869
11870 1999-02-03  Per Bothner  <bothner@cygnus.com>
11871
11872         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
11873         (TRY_EXPR):  Simplify - it no longer has a finally clause.
11874         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
11875         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11876         * expr.c (java_lang_expand_expr):  Likewise.
11877         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
11878         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
11879         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
11880         (build_try_statement):  Remove finally parameter and handling.
11881         (build_try_finally_statement):  New function.
11882         (patch_try_statement):   No longer need to support finally clause.
11883         (try_statement):  Update grammar action rules.
11884         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
11885         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11886
11887 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
11888
11889         * jcf-parse.c (get_constant): Add braces around computation of 'd'
11890         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
11891
11892 1999-02-17  Andrew Haley  <aph@cygnus.com>
11893
11894         * class.c (build_utf8_ref): Back out broken patch which was
11895         intended to to output signatures using '.' as a separator.
11896
11897         * class.c (make_class_data): Output signatures using '.' as a
11898         separator, rather than '/'.
11899         (mangled_classname): Likewise.
11900         (make_field_value): Likewise.
11901         (make_method_value): Likewise.
11902         * constants.c (alloc_class_constant): Likewise.
11903         * expr.c (build_invokeinterface): Likewise.
11904
11905 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11906
11907         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11908         of an ancient workaround.
11909
11910 1999-02-10  Jeffrey A Law  (law@cygnus.com)
11911
11912         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
11913         here anymore.
11914
11915 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11916
11917         * lex.c (yylex): Encode \0 as UTF8.
11918
11919 1999-02-10  Tom Tromey  <tromey@cygnus.com>
11920
11921         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11922         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11923         (libgcj_zip): Renamed.
11924         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11925         LIBJAVA_ZIP_FILE.
11926         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11927
11928         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11929         (GC_NAME): Renamed -lgc to -lgcjgc.
11930
11931 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11932
11933         * lex.c (java_lang_cloneable): Initialize.
11934         * parse.y (java_lang_cloneable): New static variable.
11935         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11936         doing one more qualification round.
11937         (valid_ref_assignconv_cast_p): Reject null source or
11938         destination. Allow an array to be cast into java.lang.Cloneable.
11939         (patch_cast): Swapped two first arguments to first call to
11940         valid_ref_assignconv_cast_p.
11941
11942 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11943
11944         * parse.h: DECL_P renamed JDECL_P.
11945         * parse.y: DECL_P replaced by JDECL_P.
11946         (build_array_from_name): Always use pointer's type.
11947         (patch_bc_statement): Extra code to search continue target in a
11948         for loop. Fixed comments. Continue target is current loop when
11949         unlabeled.
11950
11951 1999-02-05  Andrew Haley  <aph@cygnus.com>
11952
11953         * class.c (make_class_data): The superclass of an interface should
11954         be null, not class Object.
11955
11956         * lex.c (java_lex): Sign extend hex literals.
11957
11958 1999-02-04  Andrew Haley  <aph@cygnus.com>
11959
11960         * class.c (build_utf8_ref): Output signatures using '.' as a
11961         separator, rather than '/'.
11962         (make_class_data): Likewise.
11963
11964 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
11965
11966         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11967         mkstemp.o.  Get them from libiberty now.
11968
11969 1999-02-02  Jeffrey A Law  (law@cygnus.com)
11970
11971         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11972
11973 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11974
11975         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11976         from libiberty.h
11977
11978 1999-02-02  Per Bothner  <bothner@cygnus.com>
11979
11980         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11981         * jcf-write.c (generate_bytecode_return):  New function.
11982         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
11983
11984         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
11985         generate special [fd]const_[01] instructions.
11986
11987         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
11988
11989         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
11990         handling OPCODE_lookupswitch or OPCODE_tableswitch.
11991
11992 1999-02-01  Per Bothner  <bothner@cygnus.com>
11993
11994         * parse.y (patch_method_invocation):  Handle calling static methods,
11995         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11996
11997         * parse.y (java_complete_lhs):  Don't complain about unreachable
11998         exit condition in a do-while statement.
11999
12000 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12001
12002         * lex.c (java_read_char): Fixed utf8 decoding.
12003         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
12004         range.
12005         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
12006         comments. Local variable `all_primitive' is gone. Broadened
12007         acceptance of `0' to floating point targets. `long' can now be
12008         widened to `double' or `float'.
12009         (valid_method_invocation_conversion_p): Added leading
12010         comment. Fixed tabulation.
12011         (build_string_concatenation): Optimize out left or right empty
12012         string constants.
12013
12014 1999-01-28  Per Bothner  <bothner@cygnus.com>
12015
12016         * jcf-write.c (localvar_alloc):  Only emit entry for
12017         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
12018         (generate_bytecode_insns):  Only call put_linenumber if
12019         debug_info_level > DINFO_LEVEL_NONE.
12020         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
12021         is specified, add -g1 (for compatibility wih javac).
12022
12023 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
12024
12025         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
12026         gjavah.o, check-init.o, jv-scan.o
12027
12028 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12029
12030         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
12031
12032         * gjavah.c: Include config.h and system.h.
12033
12034         * javaop.h (inline): Don't define, its handled by system.h.
12035         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
12036         from `inline' to `static inline'.
12037
12038         * jcf.h (inline): Don't define, its handled by system.h.
12039
12040         * lex.c (inline): Likewise.
12041
12042 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
12043
12044         * lang-specs.h: Map -Qn to -fno-ident.
12045
12046 1999-01-29  Richard Henderson  <rth@cygnus.com>
12047
12048         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
12049
12050 1999-01-29  Tom Tromey  <tromey@cygnus.com>
12051
12052         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
12053         then cast it to Object before calling `append' method.
12054
12055 1999-01-28  Per Bothner  <bothner@cygnus.com>
12056
12057         * check-init.c (check_bool2_init, check_bool_init, check_init):
12058         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
12059         * jcf-write.c (generate_bytecode_insns):  Likewise.
12060
12061 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12062
12063         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
12064         * parse.y (patch_cast): Allow a boolean to be cast into a
12065         boolean.
12066
12067 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12068
12069         * parse.y: (class_declaration:): Fixed indentation.
12070         (class_member_declaration:): Extra `;' after field declaration now
12071         accepted.
12072         (interface_declaration:): Removed debug messages in error reports.
12073         (patch_binop): Nodes created and returned inherit the orignal
12074         node's COMPOUND_ASSIGN_P flag value.
12075         (patch_cast): Fix cast from char to floating point.
12076
12077 1999-01-25  Andrew Haley  <aph@cygnus.com>
12078
12079         * except.c, java-except.h (expand_resume_after_catch): new
12080         function.
12081         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
12082         to branch back to main flow of control after a catch block.
12083
12084 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12085
12086         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
12087         $(srcdir)/../system.h.
12088         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
12089         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
12090         (jcf-write.o): Likewise.
12091         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12092         (mangle.o): Depend on $(srcdir)/../toplev.h.
12093         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12094         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12095
12096         * class.c: Include output.h and parse.h.
12097         (mangled_classname): Add the `const' keyword to a char*.
12098         (find_named_method): Hide unused function definition.
12099         (build_utf8_ref): Change type of variable `c' to unsigned char.
12100         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
12101         (build_class_ref): Add the `const' keyword to a char*.
12102         (layout_class_method): Remove unused variable `buf'.
12103
12104         * decl.c (find_local_variable): Remove unused variable `rtl'.
12105         (pushdecl): Likewise for variables `different_binding_level' and
12106         `oldglobal'.
12107         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
12108         (maybe_build_cleanup): Likewise for parameter `decl'.
12109
12110         * except.c (expand_start_java_handler): Mark parameter `range'
12111         with ATTRIBUTE_UNUSED.
12112
12113         * expr.c: Include except.h.
12114         (pop_type): Remove unused variable `i'.
12115         (pop_value): Likewise for variables `n_words' and `i'.
12116         (expand_java_arrayload): Likewise for variable `convert'.
12117         (java_lang_expand_expr): Likewise for variables `op0', `type',
12118         `mode', `unsignedp', `node' and `elements'.
12119         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
12120         `eh_ranges'.
12121         (process_jvm_instruction): Add a `const' qualifier to a char*.
12122
12123         * gjavah.c (output_directory): Add the `const' keyword to a char*.
12124         (temp_directory): Likewise.
12125         (print_c_decl): Likewise.
12126         (print_method_info): Likewise.
12127         (decode_signature_piece): Likewise.
12128         (print_mangled_classname): Likewise.
12129
12130         * java-except.h: Provide prototypes for maybe_start_try,
12131         maybe_end_try and add_handler.
12132
12133         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
12134         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
12135         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
12136         init_expr_processing, push_super_field, init_class_processing,
12137         can_widen_reference_to, class_depth, verify_jvm_instructions,
12138         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
12139         set_local_type, merge_type_state, push_type, load_type_state,
12140         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
12141         emit_unicode_mangled_name): Add prototypes.
12142
12143         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
12144         (print_signature_type): Use ISDIGIT, not isdigit.
12145         (print_signature): Remove unused variable `j'.
12146
12147         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
12148         int when comparing against one.
12149
12150         * jcf-parse.c: Include toplev.h.
12151
12152         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
12153         (localvar_free): Remove unused variable `i'.
12154         (generate_bytecode_conditional): Likewise for variable `kind'.
12155
12156         * jv-scan.c: Include config.h and system.h.  Remove redundant
12157         OS header and gansidecl.h includes.
12158         (warning): Add the `const' keyword to a char*.  Also add
12159         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
12160         __STDC__, when determining whether to use ANSI-isms.
12161         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
12162         (xmalloc): Don't redundantly prototype here.
12163         (main): Remove unused parameter `envp'.  Also fix the arguments
12164         passed to function `fatal' to match the format specifier.
12165
12166         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
12167
12168         * mangle.c: Include toplev.h.
12169         (emit_unicode_mangled_name): Declare parameter `len'.
12170
12171         * parse.y (parse_warning_context): Add the `const' keyword to a
12172         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
12173         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
12174         (issue_warning_error_from_context): Add the `const' keyword to
12175         a char*.
12176         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
12177         not `__STDC__' for whether to use ANSI-isms.
12178
12179         * typeck.c (incomplete_type_error): Mark parameters `value' and
12180         `type' with ATTRIBUTE_UNUSED.
12181         (parse_signature_type): Use ISDIGIT, not isdigit.
12182
12183         * verify.c (check_pending_block): Add the `const' keyword to a char*.
12184         (verify_jvm_instructions): Likewise.  Remove unused variables
12185         `field_name' and `default_val'.
12186
12187         * zextract.c: Include config.h and system.h.  Remove redundant
12188         OS header includes.
12189
12190         * zipfile.h: Prototype `read_zip_archive'.
12191
12192 1999-01-21  Andrew Haley  <aph@cygnus.com>
12193
12194         * typeck.c (convert): Allow conversions to void type: some
12195         optimizations in gcc do this.
12196
12197 1999-01-21  Andrew Haley  <aph@cygnus.com>
12198
12199         * typeck.c (convert_ieee_real_to_integer): New function.
12200         (convert): When not using fast-math and using hardware fp, convert
12201         an IEEE NaN to zero.
12202
12203 1999-01-18  Andrew Haley  <aph@cygnus.com>
12204
12205         * parse.y (patch_binop): Do a type conversion from signed to
12206         unsigned and then back to signed when a ">>>" is found.
12207
12208 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12209
12210         * java-tree.h: (check_for_initialization): Added prototype.
12211         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
12212         * parse.y (do_resolve_class): Removed unused locals.
12213         (read_import_dir): Likewise.
12214         (resolve_qualified_expression_name): Array creation
12215         expressions are valid primary expressions.
12216         (qualify_ambiguous_name): Likewise.
12217         (patch_synchronized_statement): Removed unused local.
12218
12219 1999-01-17  Jeffrey A Law  (law@cygnus.com)
12220
12221         * Makefile.in (zextract.o): Add dependencies.
12222
12223         * Makefile.in: Do not put ^Ls at the start of a line.
12224
12225 1999-01-15  Per Bothner  <bothner@cygnus.com>
12226
12227         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
12228         sub-type the result of the call that gets the exception value.
12229
12230         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
12231         don't call finish_class.
12232
12233         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
12234         clear found before continuing.
12235
12236         * verify.c (verify_jvm_instructions):  On an array load, allow
12237         and handle top of stack to be TYPE_NULL.
12238
12239         * gjavah.c (generate_access):  Translate Java package private or
12240         protected access to C++ public, but with a comment.
12241
12242 1999-01-13  Andrew Haley  <aph@cygnus.com>
12243
12244         * expr.c (generate_name): Name prefix changed to avoid clashes
12245         with assembler temp labels.
12246
12247         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
12248         MODIFY_EXPR.  Without this, code for the assignment may not be
12249         generated at all and the synchronized statement will read an
12250         uninitialized variable.
12251
12252 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12253
12254         * class.c (maybe_layout_super_class): Fixed returned value.
12255         * lex.c: Added 1999 to the copyright.
12256         (java_init_lex): Initialize java_lang_imported.
12257         * lex.h: Added 1999 to the copyright.
12258         * parse.h: Added 1999 to the copyright.
12259         (REGISTER_IMPORT): Fixed typo in trailing macro.
12260         (CURRENT_OSB): New macro.
12261         (struct parser_ctxt): New fields osb_depth, osb_limit.
12262         * parse.y (java_lang_id): New global variable.
12263         (type_import_on_demand_declaration): Don't import java.lang.* twice.
12264         (array_creation_expression:): Use CURRENT_OSB.
12265         (dims:): Uses a stack to keep track of array dimensions.
12266         (cast_expression:): Use CURRENT_OSB.
12267         (find_expr_with_wfl): Return NULL if node found doesn't meet the
12268         conditions.
12269         (register_fields): Fixed typos in comment.
12270         (check_method_redefinition): Fixed comment indentation.
12271         (java_check_regular_methods): Set saved found wfl to NULL after
12272         having reinstalled it in the previously found DECL_NAME.
12273
12274 1999-01-10  Richard Henderson  <rth@cygnus.com>
12275
12276         * gjavah.c (java_float_finite): Use a union to do type punning.
12277         (java_double_finite): Likewise.
12278
12279 1999-01-09  Per Bothner  <bothner@cygnus.com>
12280
12281         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
12282         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
12283         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
12284         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
12285         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
12286         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
12287
12288 1999-01-08  Per Bothner  <bothner@cygnus.com>
12289
12290         * check-init.c (check_init):  If compiling to native, we don't
12291         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
12292
12293 1999-01-08  Tom Tromey  <tromey@cygnus.com>
12294
12295         * parse-scan.y (variable_declarator_id): Set or increment
12296         bracket_count.
12297         (bracket_count): New global.
12298         (formal_parameter): Handle case where bracket pairs trail variable
12299         declarator id.
12300
12301 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
12302
12303         * jcf-parse.c (yyparse): variable len changed from a char to an
12304         int to prevent overflow.
12305
12306 1999-01-06  Per Bothner  <bothner@cygnus.com>
12307
12308         * java-tree.h:  Declare read_class.
12309         * jcf-parse.c (read_class):  New function.
12310         (load_class):  Now just call read_class.
12311
12312         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
12313         * jcf-parse.c (parse_source_file):  Declare save_error_count,
12314         which is needed by java_parse_abort_on_error macro,
12315         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
12316
12317         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
12318         constructor, if initializing a static field.
12319         (patch_new_array_init):  Set TREE_CONSTANT if it is.
12320         * expr.c (java_lang_expand_expr):  For a static array constructor
12321         of primitive elements, allocate the array itself statically.
12322         Disabled until we can set the vtable field statically.
12323
12324         * check-init.c:  New file.  Checks for definite assignment.
12325         * Makefile.in (JAVA_OBJS):  Add check-init.o.
12326         * parse.y (java_complete_expand_method): Call check_for_initialization.
12327         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
12328
12329 1999-01-06  Graham <grahams@rcp.co.uk>
12330
12331         * parse.y : include system.h instead of including
12332         standard headers directly with the exception of <dirent.h>.
12333
12334 1999-01-06  Per Bothner  <bothner@cygnus.com>
12335
12336         * lex.h:  Moved static function declarations to lex.c,
12337         to shut up some -Wall warnings.
12338         * lex.c:  Static function declarations moved here.
12339         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
12340
12341 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12342
12343         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12344
12345 1998-12-22  Per Bothner  <bothner@cygnus.com>
12346
12347         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
12348         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
12349
12350         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
12351         (localvar_alloc):  Change return type to void,
12352         (emit_unop):  Remove unused variable size.
12353
12354         * jcf-write.c (struct jcf_block):  Add new union.
12355         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
12356         (call_cleanups):  New functions.
12357         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
12358         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
12359         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12360         * lang.c (lang_init):  Call using_eh_for_cleanups.
12361         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
12362         completing operands to patch_synchronized_statement.
12363         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12364         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12365         WITH_CLEANUP_EXPR instead of TRY_EXPR.
12366
12367 1998-12-20  John F. Carr  <jfc@mit.edu>
12368
12369         * Make-lang.in: Comment out control-Ls; they upset some makes.
12370
12371 1998-12-18  Tom Tromey  <tromey@cygnus.com>
12372
12373         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12374         consistently.
12375
12376 1998-12-17  Tom Tromey  <tromey@cygnus.com>
12377
12378         * parse.y (DIR_SEPARATOR): New define.
12379         (check_class_interface_creation): Use it.
12380
12381         * parse-scan.y (report_main_declaration): Recognize
12382         `java.lang.String' in argument to main.
12383
12384 1998-12-16  Per Bothner  <bothner@cygnus.com>
12385
12386         * parse.y (create_interface):  Remove bogus test.
12387
12388 1998-12-16  Per Bothner  <bothner@cygnus.com>
12389
12390         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
12391         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
12392
12393 1998-12-16  Tom Tromey  <tromey@cygnus.com>
12394
12395         * parse-scan.y (qualified_name): Use correct sprintf format.
12396
12397 1998-12-15  Tom Tromey  <tromey@cygnus.com>
12398
12399         * gjavah.c (print_field_info): Changed how most negative number is
12400         printed.
12401
12402 1998-12-14  Per Bothner  <bothner@cygnus.com>
12403
12404         * parse.y (fold_constant_for_init):  New function.
12405         (resolve_expression_name):  Don't replace static final
12406         constant-initialized fields by its value.
12407         (java_complete_lhs):  New.  Same as java_complete_tree, except does
12408         not replace static final constant-initialized fields by their values.
12409         (register_fields):  If there is an initializer, set DECL_INITIAL and
12410         MODIFY_EXPR_FROM_INITIALIZATION_P.
12411         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
12412         Only call patch_initialized_static_field if
12413         MODIFY_EXPR_FROM_INITIALIZATION_P.
12414         (patch_initialized_static_field):  If not valid constant, clear
12415         DECL_INITIAL.
12416
12417         * parse.y (lookup_field_wrapper):  Fix thinko.
12418
12419         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
12420         set and restore global lineno.
12421
12422 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12423
12424         * gjavah.c (print_field_info): If value to print is the smallest
12425         value of its size, then print as hex to avoid later warnings from
12426         C++ compiler.
12427
12428 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12429
12430         * gjavah.c (decompile_method): Decompile `return null'.
12431         (process_file): Generate `#pragma interface'.
12432         (method_declared): New global.
12433         (print_method_info): Set it.
12434         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12435         (print_method_info): Handle abstract methods.
12436
12437 1998-12-13  Per Bothner  <bothner@cygnus.com>
12438
12439         * parse.y (patch_method_invocation):  If class_decl is null
12440         (e.g. an array type), use original type.
12441
12442         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
12443         errors about uncaught exception from clone (of array, specifically).
12444
12445 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12446
12447         * gjavah.c (decompile_method): Handle all types of `return'
12448         opcode.  Decompile `return this' and `return'.
12449         (method_access): New global.
12450         (print_method_info): Set it.
12451         (decompile_method): Don't decompile a synchronized method.
12452
12453 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12454
12455         * jcf-reader.c (jcf_parse_one_method): Recognize
12456         HANDLE_END_METHOD.
12457         * gjavah.c (HANDLE_END_METHOD): New macro.
12458         (HANDLE_CODE_ATTRIBUTE): New macro.
12459         (decompile_method): New function.
12460         (print_method_info): Don't print `;\n' at end of function decl.
12461         Include java-opcodes.h.
12462         (decompiled): New global.
12463
12464 1998-12-12  Per Bothner  <bothner@cygnus.com>
12465
12466         * class.c (build_class_ref):  Handle PRIMTYPE.class if
12467         flag_emit_class_files.
12468         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
12469         if flag_emit_class_files.
12470         * parse.y (java_complete_tree):  Pre-liminary support for
12471         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12472
12473         * parse.y (patch_synchronized_statement):   Don't call monitorexit
12474         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
12475
12476         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
12477
12478         * zipfile.h (opendir_in_zip):  New declaration.
12479         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
12480         (opendir_in_zip):  New function, using code from open_in_zip.
12481         (open_in_zip):  Call opendir_in_zip.
12482         (find_class):  Remove no-longer-used do_class_file parameter,
12483         but add source_ok parameter.  Change logic so if we find a .java file,
12484         we don't look for .class in later classpath emtries.
12485         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
12486         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
12487         * gjavah.c: Update call to find_class.
12488         * jcf-dump.c:  Likewise.
12489
12490         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
12491         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
12492         nothing if body is empty_stmt_node.
12493         Various little fixes so SP gets correctly adjusted.
12494         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12495         For CALL_EXPR, test if static first.
12496         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
12497         such as the ones we create for Object and Class.
12498         Set and restore current_function_decl.
12499         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12500         (note_possible_classname):  New function.
12501         (read_import_entry):  Removed.  Merged with read_import_dir.
12502         (read_import_dir):  Don't call find_class - that only gives us
12503         the first classpath entry having the needed package.
12504         Use the struct buffer data structure from buffer.h.
12505         (read_import_dir, find_in_imports_on_demand):  The remembered
12506         class names now use '.' (not '/') as package separator.
12507
12508         * parse.y (java_complete_expand_methods):  Call write_classfile
12509         here, and not in java_expand_classes (which only gets first class).
12510
12511 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12512
12513         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
12514         (register_fields):  If a static fields has an initializer, just
12515         chain it on ctxp->static_initialized, and handle later.
12516         (java_complete_expand_methods):  Force <clinit> first.
12517         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
12518         - it's already been completed.
12519         (patch_initialized_static_field):  New function.
12520         (java_complete_field):  Call it.
12521
12522 1998-12-12  Per Bothner  <bothner@cygnus.com>
12523
12524         * expr.c (encode_newarray_type, build_new_array):  New functions.
12525         * java-tree.h:  Declare build_new_array.
12526         * jcf-write.c (patch_newarray):  Use build_new_array.
12527
12528         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
12529         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
12530
12531         * parse.y (patch_new_array_init):  Re-organize.
12532         Now is passed the actual array (pointer) type of the value.
12533         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12534         (patch_array_constructor):  Removed - merged into patch_new_array_init.
12535         (java_complete_tree):  Update patch_new_array_init.
12536
12537         * jcf-write.c (find_constant_index):  New function.
12538         (generate_bytecode_insns):  Use find_constant_index.
12539         (generate_classfile):  Use find_constant_index for ConstantValue.
12540
12541 1998-12-11  Tom Tromey  <tromey@cygnus.com>
12542
12543         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12544         * decl.c (init_decl_processing): Renamed dtable -> vtable.
12545         * class.c (make_class_data): Renamed dtable -> vtable, and
12546         dtable_method_count -> vtable_method_count.
12547
12548 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12549
12550         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12551         global variables, initialized.
12552         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12553         Declared new global variables.
12554         * lex.c (java_lex): Return long_zero_node, float_zero_node,
12555         double_zero_node, integer_zero_node upon direct matching.
12556         * parse.y (purify_type_name): Added function prototype.
12557         (duplicate_declaration_error_p): Consider new_type as potentially
12558         being a incomplete type. Use purify_type_name on type string.
12559         (method_header): saved_type: unused variable removed. Don't figure
12560         return type if method name is invalid.
12561         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12562         processed by patch_unaryop.
12563         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12564         increment/decrement node into its original type after binary
12565         numeric promotion on its operands.
12566
12567 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12568
12569         * parse.y (array_initializer:): Array init operand is NULL_TREE
12570         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12571         now an error. Fixed indentation problems.
12572         (patch_string): Handle error_mark_node as an argument.
12573         (patch_new_array_init): Fixed indentation problems.
12574         (array_constructor_check_entry): Removed check on null wfl_value.
12575         Return an error if wfl_value's walk returns an error.
12576
12577 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12578
12579         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12580         * lex.c (java_lex): Remember column position before advancing one
12581         token. Retain location information on OCB_TK.
12582         * lex.h (typedef struct java_lc): Added new field.
12583         * parse.h (GET_SKIP_TYPE): New macro.
12584         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12585         * parse.y (build_new_array_init, patch_new_array_init,
12586         patch_array_constructor, maybe_build_array_element_wfl,
12587         array_constructor_check_entry): New function prototypes.
12588         (switch_block:): Tagged <node>.
12589         (OCB_TK): Tagged <operator>.
12590         (array_initializer:): Installed actions.
12591         (variable_initializer): Build location information on element if
12592         necessary.
12593         (switch_statement:): Fixed indentation typo.
12594         (switch_block:): Redefined default action.
12595         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12596         (patch_assignment): Removed duplicate code.
12597         (maybe_build_array_element_wfl, build_new_array_init,
12598         patch_new_array_init, patch_array_constructor,
12599         array_constructor_check_entry): New functions.
12600
12601 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12602
12603         * parse.y (array_initializer): Tagged <node>.
12604         (variable_initializer:): Use default rule.
12605         (array_initializer:): Defined actions.
12606         (variable_initializers:): Likewise.
12607         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12608         non-static field accesses.
12609         (patch_invoke): Fixed indentation typo.
12610         (java_complete_tree): Likewise.
12611         (build_labeled_block): Changed leading comment. Generate an error
12612         in case of duplicate loop labels.
12613         (patch_conditional_expr): Patch results of string concatenation
12614         operations.
12615
12616 1998-12-06  Per Bothner  <bothner@cygnus.com>
12617
12618         * constants.c (find_methodref_index):  When the class is an interface,
12619         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12620
12621         * decl.c (finit_identifier_node):  Use "$finit$", rather than
12622         "<finit>" (which Sun's verifier rejects).
12623         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
12624         (generate_field_initialization_code):  Removed.
12625         (fix_constructors)  Don't add call to $finit$ here (wrong order).
12626         (patch_method_invocation):  Add $finit$ call here.
12627
12628         * java-tree.h (CALL_USING_SUPER):  New macro.
12629         * parse.y (patch_invoke):  Remove im local variable.
12630         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
12631         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
12632         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
12633
12634         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
12635
12636         * parse.y (java_complete_tree):  Don't complain about unreachable
12637         statement if it is empty_stmt_node.
12638
12639         * jcf-write.c (find_constant_wide):  New function.
12640         (push_long_const):  Use find_constant_wide.
12641
12642         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
12643         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
12644         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12645         Emit invokeinterface when calling an interface method.
12646         Emit invokespecial also when calling super or private methods.
12647
12648         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
12649
12650 1998-12-06  Per Bothner  <bothner@cygnus.com>
12651
12652         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
12653
12654 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12655
12656         * java-tree.h (java_layout_seen_class_methods): New function
12657         prototype.
12658         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12659         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12660         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12661         * parse.y (method_declarator:): Defined action.
12662         (issue_warning_error_from_context): input_filename saved, set to
12663         the appropriate value and restored after java_error is called.
12664         (build_unresolved_array_type): Fixed comment.
12665         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12666         (method_header): Deal with return type the same way type are
12667         handled for fields and method's parameters and local variables
12668         types are handled.
12669         (check_method_redefinition): Removed extra CR.
12670         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12671         (java_layout_seen_class_methods): New function.
12672         (java_layout_classes): Call java_layout_seen_class_methods.
12673
12674 1998-12-03  Per Bothner  <bothner@cygnus.com>
12675
12676         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
12677
12678 1998-12-03  Per Bothner  <bothner@cygnus.com>
12679
12680         * jcf-dump.c (main):  Fix error message.
12681         * jcf-path.c (add_entry):  Style fix.
12682
12683 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12684
12685         * class.c (layout_class_method): Call build_java_argument_signature
12686         on constructors too.
12687         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12688         (patch_method_invocation): Define a primary when resolving an
12689         expression name. Augmented comment on code checking illegal `this'
12690         usage. Loosened it test by accepting NEW_CLASS_EXPR.
12691
12692 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12693
12694         * class.c (layout_class_method): Don't report error on non-static
12695         overriding static if the method is private.
12696         * java-tree.h (finish_class): Prototype added.
12697         * lex.c (java_get_line_col): Handle col argument -2 value.
12698         * parse.h: All static method declarations moved to parse.y.
12699         * parse.y: Now contains all static method declarations previously
12700         found in parse.h.
12701         (find_expr_with_wfl, missing_return_error,
12702         unreachable_stmt_error): New functions.
12703         (java_get_real_method_name): Identify constructors bearing class
12704         names in source code compiled classes only.
12705         (java_complete_expand_methods): Call missing_return_error.
12706         (invocation_mode): Private methods invoked as static methods.
12707         (java_complete_tree): Call unreachable_stmt_error.
12708
12709 1998-12-01  Tom Tromey  <tromey@cygnus.com>
12710
12711         * Makefile.in (+target): Removed.
12712         (+xmake_file): Likewise.
12713         (+tmake_file): Likewise.
12714         (.NOEXPORT): Removed duplicate.
12715
12716 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12717
12718         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12719
12720         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
12721
12722         * jvgenmain.c: Remove the xmalloc prototype, we get it from
12723         libiberty.h.  Provide an xmalloc definition.
12724
12725         * jvspec.c: Remove the xmalloc prototype.
12726
12727         * parse-scan.y: Include config.h and system.h.  Don't include
12728         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
12729         Provide an xstrdup definition.
12730
12731 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
12732
12733         * jcf-path.c (add_entry): Recognize ".jar" too.
12734         * lang-specs.h: Likewise.
12735
12736 1998-11-26  Per Bothner  <bothner@cygnus.com>
12737
12738         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
12739         soft_monitorenter_node, soft_monitorexit_node, throw_node.
12740
12741         * jcf-write.c (generate_bytecode_insns):
12742         Handle pre/post-increment/decrement of long.
12743
12744         * jcf-write.c (generate_bytecode_insns):
12745         Handle missing exception handler (finally for synchronized).
12746
12747 1998-11-25  Per Bothner  <bothner@cygnus.com>
12748
12749         * java-tree.h (end_params_node):  Declare global.
12750         * decl.c (end_params_node):  New global.
12751         (init_decl_processing, start_java_method):  Use end_params_node for
12752         end of list of parameter types.  Follows correct gcc conventions.
12753         * expr.c (pop_argument_types, pop_arguments):  Likewise.
12754         * lang.c (put_decl_node):  Likewise.
12755         * typeck.c (various places):  Likewise.
12756         * class.y (various places):  Likewise.
12757         * parse.y (various places):  Likewise.
12758
12759         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
12760         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
12761
12762         * class.c:  Add #include flags.h, remove no-longer needed declaration.
12763
12764         * class.c (layout_class_method):  Remove commented-out code, re-format.
12765         Don't add vtable entry (or index) for private methods.
12766         * expr.c (expand_invoke):  A private method is implicitly final.
12767         * class.c (make_class_data):  If inlining or optimizing,
12768         skip private methods.
12769
12770         * class.c (finish_class):  New function.  Calls existing methods,
12771         but alls emits deferred inline functions.
12772         * jcf-parse.c (parse_class_file):  Call finish_class.
12773         * parse.y (java_complete_expand_methods):  Likewise.
12774
12775         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
12776
12777         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
12778
12779 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
12780
12781         * jcf-write.c (generate_bytecode_conditional): Fix typo.
12782
12783 1998-11-24  Per Bothner  <bothner@cygnus.com>
12784
12785         * (generate_classfile): Always write class access flag with
12786         ACC_SUPER set.
12787
12788 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12789
12790         * class.c (maybe_layout_super_class): New function.
12791         (layout_class): Reorganized. Loop on class methods dispatched into
12792         a new function. Call maybe_layout_super_class.
12793         (layout_class_methods, layout_class_method): New functions.
12794         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12795         class.
12796         (expand_invoke): Likewise.
12797         * java-tree.h (all_class_list): New global variable declared.
12798         (layout_class_methods, layout_class_method): New function
12799         prototypes.
12800         (LAYOUT_SEEN_CLASS_METHODS): New macro.
12801         * jcf-parse.c (all_class_list): New global variable.
12802         (load_class): Extended what class_or_name can be. Use parser
12803         context mechanism to save globals before calling jcf_parse.
12804         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12805         is set on the file name.
12806         (jcf_parse): Layout class methods when Object is loaded, otherwise
12807         record class in all_class_list for delayed method layout.
12808         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12809         * lang.c (put_decl_node): Decode <init> into the decl context
12810         class name.
12811         * lex.c (java_allocate_new_line): Use xmalloc.
12812         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12813         pointers, not TREE_LIST elements.
12814         (struct parser_ctxt): Fixed comment indentations, added comments
12815         and reordered some fields.
12816         (java_check_methods): Function prototype removed.
12817         * parse.y (java_push_parser_context): Use xmalloc.
12818         (java_parser_context_restore_global): Pop extra pushed ctxp only
12819         when there's nothing next.
12820         (maybe_create_class_interface_decl): Fixed comment, add new
12821         created class decl to all_class_list.
12822         (method_header): Use GET_REAL_TYPE on argument's types.
12823         (method_declarator): Use GET_REAL_TYPE, change type to the real
12824         type in TREE_LIST dependency node. Build argument list with the
12825         real type.
12826         (create_jdep_list): Use xmalloc. Removed allocation error message.
12827         (obtain_incomplete_type): Fixed leading comment. Broadened
12828         incoming argument meaning.
12829         (register_incomplete_type): Use xmalloc. Removed allocation error
12830         message.
12831         (safe_layout_class): Fixed leading comment.
12832         (jdep_resolve_class): Reversed if statement condition and switch
12833         if and else bodies.
12834         (resolve_and_layout): Fixed leading comment. Broadened incoming
12835         argument meaning.
12836         (complete_class_report_errors): New local variable name, for
12837         clarity. purify_type_name used for all error cases.
12838         (java_get_real_method_name): Stricter check on constructors.
12839         (java_check_regular_methods): Reverse methods list only if not
12840         already laid out. Layout artificial constructor.
12841         (java_check_methods): Deleted.
12842         (source_start_java_method): Obtain incomplete type for patchable
12843         method arguments.
12844         (java_layout_classes): Fixed leading comment. Use
12845         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12846         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12847         before returning. Fixed comments.
12848         (java_expand_classes): Check for errors up front.
12849         (patch_method_invocation): Class to search is resolved and laid
12850         out.
12851
12852 1998-11-24  Per Bothner  <bothner@cygnus.com>
12853
12854         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
12855
12856         * javaop.h (int8):  Removed - not used.
12857         (jbyte):  Redefine portably with correct signedness.
12858
12859         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
12860
12861         * jcf-write.c (generate_bytecode_insns):  Fix typo
12862         OPCODE_getstatic to OPCODE_getfield.
12863
12864         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
12865         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
12866         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12867
12868 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12869
12870         * jcf-parse.c (jcf_parse_source): Function returned type is
12871         void. Added prototype.
12872         (jcf_parse): Function returned type is void.
12873         (yyparse): Remove call to fclose on the last parsed file.
12874
12875         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12876
12877 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12878
12879         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12880         (layout_class): Cope with methods featuring WFL in decl names.
12881         * decl.c (unqualified_object_id_node): New global variable,
12882         initialized.
12883         (build_decl_no_layout): Removed.
12884         * expr.c (build_primtype_type_ref): Handle Double.
12885         (java_lang_expand_expr): Fixed indentations.
12886         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12887         (flag_wall, flag_redundant, flag_not_overriding,
12888         flag_static_local_jdk1_1, unqualified_object_id_node): Global
12889         variable declarations.
12890         (build_decl_no_layout): Removed prototype.
12891         (java_get_real_method_name): Added prototype.
12892         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12893         (java_parse_abort_on_error): Macro now just returns.
12894         * jcf-parse.c (jcf_parse_source): Check fclose returned
12895         value. Call emit_register_classes if java_report_errors returns
12896         zero.
12897         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12898         flag_static_local_jdk1_1): New integer flags.
12899         (lang_decode_option): New flags set here.
12900         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12901         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12902         the flag_redundant variable.
12903         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12904         when parsing java.lang.Object class.
12905         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12906         NULL_TREE to build.
12907         (resolve_qualified_expression_name): Fixed indentation.
12908         (patch_array_ref): Changed prototype.
12909         (not_initialized_as_it_should_p): Prototype removed.
12910         (java_report_errors): Added function prototype.
12911         * parse.y (formal_parameter:): Changed error message for not yet
12912         supported final parameters.
12913         (class_type_list:): Set both PURPOSE and VALUE of created
12914         TREE_LIST to be class_type.
12915         (primary_no_new_array:): Handle class literals on primitive types.
12916         (parse_warning_context): Reinstalled correct force_error and
12917         do_warning flags setups.
12918         (java_report_errors): Changed prototype. Return java_error_count
12919         value.
12920         (variable_redefinition_error): Consider treating variable type as
12921         a fake pointer.
12922         (create_interface): Warn about redundant abstract modifier if
12923         flag_redundant is set. Changed error message.
12924         (lookup_field_wrapper): Save/restore globals before/after looking
12925         up field.
12926         (duplicate_declaration_error_p): Consider treating declaration
12927         type as a fake pointer.
12928         (register_fields): Extract real type from dependency node. Check
12929         for duplicate field declaration after type adjustment. Use
12930         DECL_INITIAL to store static final initialized values.
12931         (method_header): Extract real function type from dependency node.
12932         (check_abstract_method_header): Use GET_METHOD_NAME.
12933         (obtain_incomplete_type): Layout fake pointer type.
12934         (safe_layout_class): Don't try to check for methods before layout.
12935         (java_complete_class): Don't check for correct throws clause
12936         elements inheritance here.
12937         (resolve_and_layout): Broadened name parameter meaning.
12938         (reset_method_name): Use GET_METHOD_NAME.
12939         (java_get_real_method_name): New function.
12940         (java_check_regular_methods): Don't check methods in
12941         java.lang.Object.  Verify lineage of throws clause elements. Use
12942         flag_no_overriding in warning report.
12943         (check_throws_clauses): Don't check if class was from
12944         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12945         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12946         (declare_local_variables): Use flag_static_local_jdk1_1 to report
12947         warning on unsupported final local variables. Use build_decl
12948         instead of build_decl_no_layout. Get real local variable type from
12949         dependency node.
12950         (source_start_java_method): Get real parameter type from
12951         dependency node. Call build_decl instead of build_decl_no_layout.
12952         (java_layout_classes): Reverse tree and layout type and class as
12953         required. Mark class as loaded when done.
12954         (resolve_field_access): Fixed indentation. Restricted condition
12955         leading to static field access code generation. Set field_type
12956         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12957         (resolve_qualified_expression_name): Initialize type_found to
12958         null. Handle static field resolved during qualification. Fixed
12959         layout on non primitive field decl types.
12960         (not_accessible_p): Fixed typo in comment.
12961         (patch_method_invocation): Resolve and layout class to search from
12962         type.
12963         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12964         layout non primitive type, if necessary. Make method node only to
12965         report errors.
12966         (find_applicable_accessible_methods_list): Consider WFL'ed method
12967         decl names. Fixed indentation.
12968         (argument_types_convertible): Resolve and layout target type if
12969         necessary.
12970         (java_complete_tree): Fixed indentation problems. Rewrote
12971         CALL_EXPR thrown exceptions check. Re-installed further processing
12972         of the assignment in certain cases.
12973         (patch_assignment): Call maybe_build_primttype_type_ref to perform
12974         inlining on class literals.
12975         (valid_builtin_assignconv_identity_widening_p): Cope with constant
12976         0 literal.
12977         (valid_method_invocation_conversion_p): Likewise.
12978         (patch_string): Temporary disable forbidden use of `this' in
12979         explicit constructor invocations when doing string concatenation
12980         within their scope.
12981         (patch_unaryop): Added comment. Reinstalled code to disable
12982         further check on assignment operation with cast expression RHS.
12983         (patch_switch_statement): Fixed indentation.
12984         (build_try_statement): Call build_decl instead of
12985         build_decl_no_layout.
12986         (patch_synchronized_statement): Likewise.
12987         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12988         IS_UNCHECKED_EXPRESSION_P.
12989         (check_thrown_exceptions_do): Changed leading comment. Resolve and
12990         layout argument exception type.
12991         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12992         of IS_UNCHECKED_EXPRESSION_P.
12993
12994 1998-11-18  Anthony Green  <green@cygnus.com>
12995
12996         * jcf-parse.c (yyparse): Open class file in binary mode.
12997
12998 1998-11-15  Per Bothner  <bothner@cygnus.com>
12999
13000         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
13001
13002         * jcf-write.c (perform_relocations):  Move check out one loop.
13003
13004 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
13005
13006         * Make-lang.in: Fix reference to srcdir.
13007         * jv-scan.c: Add missing xmalloc prototype.
13008         * jvgenmain.c: Ditto.
13009
13010 1998-11-15  Per Bothner  <bothner@cygnus.com>
13011
13012         * decl.c (error_mark_node), java-tree.h:  New global.
13013         * parse.y:  Use empty_stmt_node instead of size_zero_node.
13014         (build_if_else_statement):  If missing else, use empty_stmt_node.
13015
13016         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
13017         (java_complete_expand_method):  Complain if return is missing.
13018         (java_check_regular_methods):  Comment out incorrect error check.
13019         (not_accessible_p):  Fix incorrect handling of protected methods.
13020         (patch_method_invocation):  Pass correct context to not_accessible_p.
13021         (find_applicable_accessible_methods_list):  Likewise.
13022         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
13023         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
13024         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
13025         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
13026
13027         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
13028         (push_int_const):  Remove reundant NOTE_PUSH.
13029         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
13030         (- case SWITCH_EXPR):  Fix code generation bug.
13031         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
13032         (generate_classfile):  More robust for abstract methods.
13033
13034 1998-11-15  Anthony Green  <green@cygnus.com>
13035
13036         * Makefile.in: jv-scan and jvgenmain all require libiberty.
13037         * Make-lang.in: Ditto.
13038
13039         * jv-scan.c: Remove xmalloc and xstrdup definitions.
13040         * jvgenmain: Ditto.
13041
13042 1998-11-15  Per Bothner  <bothner@cygnus.com>
13043
13044         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
13045
13046         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
13047
13048 1998-11-14  Per Bothner  <bothner@cygnus.com>
13049
13050         Allow uses of interface types to verify.  This is not really
13051         type-safe, but it matches what Sun does, and is OK as long as
13052         there are appropriate run-time checks.
13053         * verify.c (merge_types):  If merging two interface types,
13054         just set the result to java.lang.Object.
13055         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
13056
13057 1998-11-13  Tom Tromey  <tromey@cygnus.com>
13058
13059         * gjavah.c (main): Handle --output-class-directory argument.
13060         * jvspec.c (lang_specific_driver): Translate `-d' into
13061         -foutput-class-dir.
13062         * jcf.h (jcf_write_base_directory): Declare.
13063         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
13064         * lang-options.h: Mention -foutput-class-dir.
13065         * jcf-write.c (jcf_write_base_directory): New global.
13066         (make_class_file_name): Put generated .class file into `-d'
13067         directory, or into source directory if -d not given.  Function now
13068         static.
13069         (write_classfile): Free class file name.  Handle case where class
13070         file name is NULL.
13071         (DIR_SEPARATOR): New macro.
13072         Include <sys/stat.h>
13073
13074         * Makefile.in (prefix): New macro.
13075
13076 1998-11-12  Per Bothner  <bothner@cygnus.com>
13077
13078         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
13079         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
13080         here (done in patch_invoke instead).
13081         (case_identity):  Moved here from parse.y.
13082
13083         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
13084         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
13085         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
13086         so they can be efficiently scanned without recursion.
13087         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
13088         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
13089         in BLOCK iteratively, rather than recursively.
13090
13091         * parse.y (do_unary_numeric_promotion):  New function.
13092         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
13093
13094         * parse.y (patch_newarray):  Various fixes.
13095
13096         Re-do handling of switch statements (for proper block scoping).
13097         * parse.y:  Add just a single block for the enture switch block,
13098         but don't create any "case blocks".
13099         (group_of_labels):  Rmeoved unneeded non-terminal.
13100         CASE_EXPR and DEFAULT_EXPR are added to current block.
13101         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
13102         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
13103         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
13104         * parse.y (wfl_operator, print_int_node): Make non-static.
13105         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
13106         as part of recursive scan of block.
13107         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
13108         (patch_switch_statement):  Most tests move dinto java_complete_tree.
13109
13110         * parse.y:  Make various production be non-typed (void).
13111         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
13112         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
13113         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
13114
13115         * jcf-write.c (struct jcf_handler):  New type.
13116         (struct jcf_switch_state):  New type.
13117         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
13118         (alloc_handler, emit_unop, emit_reloc):  New functions.
13119         (adjust_typed_op):  Add extra parameter ("max type" offset).
13120         (emit_switch_reloc, emit_case-reloc):  New function.
13121         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
13122         (generate_bytecode_insns):  Support REAL_CST, switch statements,
13123         exception handling, method calls, object/array creation, and more.
13124
13125         * class.c:  Remove some unused variables.
13126         * constants.c (find_string_constant):  New function.
13127         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
13128         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
13129         if flag_emit_class_files.
13130
13131 1998-11-12  Tom Tromey  <tromey@cygnus.com>
13132
13133         * jcf-io.c (find_class): Added explanatory comment.
13134
13135         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
13136         trailing slash to `.zip' entries.
13137
13138         * jvspec.c (lang_specific_driver): Correctly handle case where
13139         GC_NAME not defined.
13140
13141 1998-11-11  Tom Tromey  <tromey@cygnus.com>
13142
13143         * jvspec.c (GC_NAME): New define.
13144         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
13145         if required.
13146         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
13147
13148 1998-11-11  Per Bothner  <bothner@cygnus.com>
13149
13150         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
13151
13152 1998-11-11  Tom Tromey  <tromey@cygnus.com>
13153
13154         * jcf-dump.c (main): Correctly recognize `--'-style long options.
13155
13156 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13157
13158         * class.c (is_compiled_class): Call safe_layout_class for class
13159         compiled from source.
13160         * conver.h (convert_to_integer, convert_to_real,
13161         convert_to_pointer): Added prototypes.
13162         * decl.c (init_decl_processing): Non longer push the decls of
13163         `methodtable', `constants', `Class', `Field', `dispatchTable'
13164         `jexception' and `Method'.
13165         * expr.c (build_invokeinterface): New function.
13166         (expand_invoke): static variable CLASS_IDENT now in
13167         build_invokeinterface. Use build_invokeinterface.
13168         (expand_java_field_op): Moved code to inline
13169         java.lang.PRIMTYPE.TYPE into a function.
13170         (build_primtype_type_ref): New function.
13171         * java-tree.def (INSTANCEOF_EXPR): New tree code.
13172         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
13173         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
13174         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
13175         (DECL_LOCAL_STATIC_VALUE): New macro.
13176         (build_invokeinterface, build_primtype_type_ref): New function
13177         prototypes.
13178         (java_parse_abort_on_error): Macro rewritten.
13179         * jcf-parse.c (current_method): Add comment to declaration.
13180         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
13181         Function prototypes fixed.
13182         (jcf_parse_source): push/pop parser context. save/restore global.
13183         (parse_source_file): Fixed leading comment. Now take a
13184         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
13185         classes and pop the parser context anymore.
13186         (yyparse): Push parser context, save globals, parse the source
13187         file, restore globals and pop the parser context when processing a
13188         source file.
13189         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
13190         * lex.c (java_parse_doc_section): New function.
13191         (java_lex): Call java_parse_doc_section when appropriate. Build an
13192         operator around INSTANCEOF_TK.
13193         * lex.h (java_lineterminator, java_sprint_unicode,
13194         java_unicode_2_utf8, java_lex_error, java_store_unicode):
13195         Prototypes rewritten.
13196         (java_parse_escape_sequence, java_letter_or_digit_p,
13197         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
13198         java_read_unicode, java_store_unicode, java_read_char,
13199         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
13200         Added function prototypes.
13201         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
13202         define.
13203         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
13204         New macros
13205         (struct parser_ctxt): New fields: deprecated,
13206         current_parsed_class_un, gclass_list.
13207         (fix_method_argument_names, issue_warning_error_from_context,
13208         resolve_package, lookup_package_type): New function prototypes.
13209         (resolve_expression_name): Fixed function prototype.
13210         (find_applicable_accessible_methods_list): Fixed indentation, added
13211         extra argument in prototype.
13212         (check_final_assignment, build_null_of_type, check_deprecation,
13213         check_method_redefinition, reset_method_name,
13214         java_check_regular_methods, java_check_abstract_methods,
13215         maybe_build_primttype_type_ref): New function prototype.
13216         * parse.y (conver.h): Include.
13217         (INSTANCEOF_TK): Tagged <operator>.
13218         (single_type_import_declaration): Use REGISTER_IMPORT macro.
13219         (relational_expression:): Build binop for instanceof.
13220         (java_push_parser_context): Remember ctxp->gclass_list across
13221         contexts.
13222         (java_pop_parser_context): Simply return if no context
13223         exists. Remember gclass_list across contexts.
13224         (issue_warning_error_from_context): New function.
13225         (parse_error_context): Don't setup ctxp->elc here. Call
13226         issue_warning_error_from_context instead.
13227         (parse_warning_context): Likewise.
13228         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
13229         setup. Link new class/interface to ctxp->gclass_list.
13230         (add_superinterfaces): Register interface as incomplete if not
13231         loaded.
13232         (create_class): Remember class unqualified name in
13233         ctxp->current_parsed_class_un. Check class deprecation.
13234         (register_fields): Check field deprecation. Remember static final
13235         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
13236         processing INIT.
13237         (method_header): New local variable ORIG_ARG. Use unqualified
13238         current class name for check on constructor errors. Promote return
13239         type if of record type. Argument list fix moved in
13240         fix_method_argument_names, called here. Check method deprecation.
13241         (fix_method_argument_names): New function.
13242         (method_declarator): Promote record typed arguments.
13243         (safe_layout_class): Check class methods before layout.
13244         (java_complete_class): Compute field layout when patched.
13245         (do_resolve_class): Try to load class after having it renamed
13246         after the package name.
13247         (get_printable_method_name): Use DECL_CONTEXT.
13248         (reset_method_name): New function.
13249         (check_method_redefinition): Use reset_method_name.
13250         (java_check_regular_methods): New local variable
13251         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
13252         names for error report. Check for compile-time error when method
13253         found has default (package) access.
13254         (java_check_abstract_methods): Now takes an interface DECL node as
13255         an argument. Also reinstall real name on unchecked
13256         overriding/hiding methods for error report.
13257         (java_check_methods): Fixed leading comment. Get classes to verify
13258         from ctxp->gclass_list. Use CHECK_METHODS macro and set
13259         CLASS_METHOD_CHECKED_P on class verification.
13260         (lookup_java_method2): Get real method name if necessary.
13261         (find_in_imports): Don't check package class access here.
13262         (resolve_package, lookup_package_type): New functions.
13263         (java_layout_classes): Fixed leading comment. Take classes to be
13264         laid out from ctxp->gclass_list.
13265         (java_complete_expand_methods): Don't expand native and abstract
13266         methods.
13267         (java_expand_classes): New function.
13268         (resolve_expression_name): Use additional argument ORIG.  Retrieve
13269         values of static final field of primitive types.
13270         (resolve_field_access): Handles static final field of promotive
13271         type.
13272         (resolve_qualified_expression_name): Handle STRING_CST as
13273         primaries and package name resolution. Check deprecation on found
13274         decls. Set where_found and type_found on non static field resolved
13275         during qualification. Layout non primitive field decl types.
13276         (check_deprecation): New function.
13277         (maybe_access_field): Simplified.
13278         (patch_method_invocation_stmt): Local variable CLASS_TYPE
13279         removed. Reverse method's argument when primary is a type. Don't
13280         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
13281         instead. Include abstract class in the list of class searchable
13282         for constructors. Use DECL_CONTEXT of found method for access
13283         checks. Check method deprecation.
13284         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
13285         converting arguments. Handle INVOKE_INTERFACE.
13286         (lookup_method_invoke): Search constructor using existing
13287         infrastructure (don't rely on lookup_java_constructor anymore).
13288         (find_applicable_accessible_methods_list): Extra argument flag
13289         LC. Now include constructor in the search.
13290         (qualify_ambiguous_name): Conditional expression are primaries.
13291         (not_initialized_as_it_should_p): static final are always
13292         initialized.
13293         (java_complete_tree): Pass extra NULL argument to
13294         resolve_expression_name. Stricter test to carry on patching
13295         assignments. New case for INSTANCEOF_EXPR.
13296         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
13297         (check_final_assignment, maybe_build_primttype_type_ref): New
13298         functions.
13299         (patch_assignment): Detect resolved static finals and carry normal
13300         assignment error check on them. Inline PRIMTYPE.TYPE read access.
13301         (try_builtin_assignconv): Access constant 0 on all primitive
13302         types.
13303         (valid_builtin_assignconv_identity_widening_p): Accept identical
13304         types. Accept all promoted type on int type.
13305         (valid_ref_assignconv_cast_p): Accept a null pointer to be
13306         assigned to a reference.
13307         (valid_method_invocation_conversion_p): Accept to check null
13308         pointers.
13309         (build_binop): Merge declaration and initialization of local
13310         variable BINOP.
13311         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
13312         numeric types. Improved validity test for qualify operators on
13313         references.
13314         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
13315         and PREINCREMENT_EXPR. Also detect resolved static finals of a
13316         primitive type and issue the appropriate error message.
13317         (resolve_type_during_patch): Mark class loaded when resolved.
13318         (patch_cast): Allow null to be cased to reference types.
13319         (build_null_of_type): New function.
13320         (patch_array_ref): Handle array on references correctly.
13321         (patch_return): Removed unused local variable MODIFY. Force
13322         boolean to be returned as integers. Allows null to be returned by
13323         a function returning a reference.
13324         * typeck.c (convert_to_integer, convert_to_real,
13325         convert_to_pointer): Prototypes moved to convert.h
13326         (lookup_argument_method): Use method real name, if necessary.
13327
13328 1998-10-30  Tom Tromey  <tromey@cygnus.com>
13329
13330         * class.c (build_class_ref): Changed name of primitive classes to
13331         start with `_Jv_'.
13332
13333         * class.c (make_class_data): Renamed fields: nmethods to
13334         method_count, method_count to dtable_method_count.  Always set
13335         `state' field to 0.
13336         * decl.c (init_decl_processing): Likewise.
13337
13338 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13339
13340         * class.c (layout_class): Don't mangle <finit>, produce
13341         __finit<class> instead. Don't verify artificial methods.
13342         * decl.c (finit_identifier_node): New declared global.
13343         (init_decl_processing): finit_identifier_node initialized.
13344         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13345         * java-tree.h (finit_identifier_node): Declared as extern.
13346         (struct lang_decl): New field called_constructor.
13347         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13348         (CLASS_HAS_FINIT_P): New macro.
13349         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13350         explicit constructor invocation.
13351         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13352         CALL_SUPER_CONSTRUCTOR_P): New macros.
13353         (write_classfile): Added prototype.
13354         * jcf-parse.c (jcf_parse_source): Parse and remember for
13355         generation if the file was seen on the command line.
13356         (parse_source_file): Don't write the class file here.
13357         (yyparse): Loop on files rewritten. Set current_jcf.
13358         (parse_zip_file_entries): Parse class file only if it was found.
13359         * lang.c (init_parse): Don't open command line provided filename
13360         here.
13361         (lang_parse): Don't set main_jcf anymore.
13362         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13363         (JCONSTRUCTOR_CHECK): New macro.
13364         (JBSC_TYPE_P): New macro.
13365         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13366         (COMPLETE_CHECK_OP_2): New macro.
13367         (struct parse_ctxt): New field explicit_constructor_p.
13368         (check_class_interface_creation): Fixed prototype indentation.
13369         (patch_method_invocation_stmt): Prototype reflects added argument.
13370         (patch_invoke): Likewise.
13371         (complete_method_declaration, build_super_invocation,
13372         verify_constructor_circularity,
13373         build_this_super_qualified_invocation, get_printable_method_name,
13374         patch_conditional_expr, maybe_generate_finit, fix_constructors,
13375         verify_constructor_super, create_artificial_method,
13376         start_artificial_method_body, end_artificial_method_body,
13377         generate_field_initialization_code): New function prototypes.
13378         * parse.y: Fixed leading comment
13379         (constructor_header:, constructor_body:, block_end:): Rules tagged
13380         <node>.
13381         (type_declaration:): Call maybe_generate_finit.
13382         (method_declaration:): Action for method_body: placed in new
13383         function complete_method_declaration, called here.
13384         (constructor_declaration:): Defined actions. Removed leading
13385         FIXME.
13386         (constructor_header:): New rule with action.
13387         (constructor_body:): Rule rewritten using block_begin: and
13388         block_end:. Defined actions.
13389         (constructor_declarator:, explicit_constructor_invocation:):
13390         Defined actions.
13391         (block:): Use new rules block_begin: block_end:.
13392         (block_begin:, block_end:): New rules and actions.
13393         (block_statements:): Fixed error message for explicit
13394         constructors.
13395         (method_invocation:): Call build_this_super_qualified_invocation
13396         if primary is `this' or `super' was seen.
13397         (conditional_expression:): Action defined.
13398         (extra_ctxp_pushed_p): New static global flag.
13399         (java_parser_context_save_global): Create parser context if
13400         necessary. Use extra_ctxp_pushed_p to remember it.
13401         (java_parser_context_restore_global): Pop extra parser context if
13402         one exists.
13403         (build_array_from_name): Array on primitive types are marked
13404         loaded.
13405         (register_fields): Restore new name in field initializer
13406         expression if type was altered. Non static fields initialized upon
13407         declaration marked initialized.
13408         (maybe_generate_finit): New function.
13409         (maybe_generate_clinit): Use create_artificial_method,
13410         start_artificial_method_body, end_artificial_method_body. Generate
13411         debug info for enclosed initialization statements.
13412         (method_header): Fixed leading comment. Check constructor
13413         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13414         accordingly.
13415         (complete_method_declaration, constructor_circularity_msg,
13416         verify_constructor_circularity): New functions.
13417         (get_printable_method_name): New function.
13418         (check_method_redefinition): Don't rename <finit> methods. Fix
13419         declared constructor names. Error message for
13420         constructors modified.
13421         (java_check_regular_methods): Local variable seen_constructor
13422         renamed saw_constructor. Skip verification on constructors. Create
13423         default constructor with create_artificial_method.
13424         (java_check_methods): Removed unnecessary empty line.
13425         (create_artificial_method, start_artificial_method_body,
13426         end_artificial_method_body): New functions.
13427         (java_layout_classes): Changed leading comment. Reverse fields
13428         list if necessary. Always layout java.lang.Object if being
13429         defined.
13430         (java_complete_expand_methods): Verify constructor circularity.
13431         (java_complete_expand_method): Call fix_constructor on
13432         constructors.  Local variable no_ac_found removed. Restore
13433         bindings if method body expansion failed.
13434         (fix_constructors, verify_constructor_super,
13435         generate_field_initialization_code): New function.
13436         (java_expand_classes): Fixed leading comment. Write class file
13437         here.
13438         (resolve_expression_name): Check for illegal instance variable
13439         usage within the argument scope of an explicit constructor
13440         invocation.
13441         (resolve_qualified_expression_name): Pass extra from_super flag
13442         when invoking patch_method_invocation_stmt. New case for
13443         conditional expression when used as a primary. Check for error
13444         when acquiring super.
13445         (patch_method_invocation_stmt): Added extra argument super. New
13446         local variable is_static_flag. Set class_to_search according to
13447         the nature of the constructor invocation. Don't add `this'
13448         argument when expanding NEW_CLASS_EXPR. Check for illegal method
13449         invocation within the argument scope of explicit constructor
13450         invocation. Set is_static according to is_static_flag. Provide
13451         extra `super' argument to patch_invoke invocation.
13452         (patch_invoke): New argument from_super. Loop on arguments
13453         indentation fixed. Pass from_super to invocation_mode. New switch
13454         case INVOKE_SUPER. Fixed error message in switch default case.
13455         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13456         value.
13457         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13458         (lookup_method_invoke): Fixed prototypes in candidates list. Error
13459         message takes constructors into account.
13460         (find_applicable_accessible_methods_list): Fixed indentation.
13461         (qualify_ambiguous_name): Take explicit constructor invocation
13462         into account. Deal with a conditional expression as a primary to
13463         a method call.
13464         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13465         case. Added extra argument to patch_method_invocation_stmt.
13466         Register calls made to explicit constructor `this'. Don't call
13467         save_expr in ARRAY_REF case when emitting class files. Check for
13468         illegal use of this when expanding explicit constructor invocation
13469         arguments.
13470         (complete_function_arguments): Set and reset parser context
13471         explicit_constructor_p field value when appropriate.
13472         (build_super_invocation, build_this_super_qualified_invocation):
13473         New functions.
13474         (patch_assignment): Fixed typo.
13475         (patch_unaryop): Check on final fields occurs only when a decl
13476         exits.
13477         (patch_return): Take constructors into account.
13478         (patch_conditional_expr): New function.
13479         * typeck.c (build_java_signature): Removed unnecessary empty line.
13480
13481 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13482
13483         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13484
13485 1998-10-28  Tom Tromey  <tromey@cygnus.com>
13486
13487         * decl.c (init_decl_processing): Renamed fields.
13488         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13489         interface_len, msize fields.
13490
13491         * class.c (make_class_data): Removed subclass_head and
13492         subclass_next fields.
13493         * decl.c (init_decl_processing): Removed subclass_head and
13494         subclass_next fields.
13495
13496 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13497
13498         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13499         * mangle.c (emit_unicode_mangled_name): Similarly.
13500
13501 1998-10-26  Nick Clifton  <nickc@cygnus.com>
13502
13503         * jcf-parse.c (get_constant): Place braces around code to compute
13504         'd' when REAL_ARITHMETIC is not defined.
13505
13506 1998-10-25  H.J. Lu  (hjl@gnu.org)
13507
13508         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13509         dependency.
13510
13511 1998-10-23  Tom Tromey  <tromey@cygnus.com>
13512
13513         * lang-specs.h: `.zip' files are input to jc1.
13514
13515 1998-10-22  Per Bothner  <bothner@cygnus.com>
13516
13517         * jvspecs.c:  Add (but don't enable) support for combining multiple
13518         .class and .java input filenames to a single jc1 invocation.
13519         Add support for -C flag (copile to .class files).
13520         Translate -classpath and -CLASSPATH arguments.
13521         * lang-specs.h:  Don't set %2 spec.
13522
13523 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13524
13525         * jcf-path.c (add_entry): Don't add trailing separator if entry is
13526         a .zip file.
13527         (add_path): Don't add trailing separator to non-empty path
13528         elements.
13529
13530         * lang.c (lang_decode_option): Check for -fclasspath and
13531         -fCLASSPATH before examining other `-f' options.
13532
13533         * java-tree.h (finalize_identifier_node): Don't declare.
13534         * class.c (make_class_data): Don't push "final" field.
13535         * decl.c (init_decl_processing): Don't push "final" field.
13536         (finalize_identifier_node): Removed.
13537         (init_decl_processing): Don't set finalize_identifier_node.
13538
13539         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13540
13541 1998-10-11  Anthony Green  <green@cygnus.com>
13542
13543         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13544         (JV_SCAN_SOURCES): New macro.
13545         (JCF_DUMP_SOURCES): Likewise.
13546         (jcf-dump$(exeext)): New target.
13547         (jv-scan$(exeext)): New target.
13548
13549 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13550
13551         * Makefile.in (LEX): Removed.
13552         (LEXFLAGS): Likewise.
13553         (SET_BISON): New macro.
13554         (BISON): Removed.
13555         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
13556         spurious diffs in parse.c.
13557         ($(PARSE_SCAN_C)): Likewise.
13558         (PARSE_DIR): New macro.
13559         (PARSE_C): Use it.
13560         (PARSE_SCAN_C): Likewise.
13561         (PARSE_RELDIR): New macro.
13562
13563         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13564
13565         * jcf-io.c (find_class): Use saw_java_source to determine when to
13566         look for `.java' file.
13567         * jcf-parse.c (saw_java_source): New global.
13568         (yyparse): Set it if `.java' file seen.
13569
13570         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13571         (GCJH_SOURCES): Likewise.
13572         * Makefile.in (datadir): New macro.
13573         (libjava_zip): Likewise.
13574         (JAVA_OBJS): Added jcf-path.o.
13575         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13576         (../gcjh$(exeext)): Likewise.
13577         (jcf-path.o): New target.
13578         * java-tree.h (fix_classpath): Removed decl.
13579         * jcf-parse.c (fix_classpath): Removed.
13580         (load_class): Don't call fix_classpath.
13581         * parse.y (read_import_dir): Don't call fix_classpath.
13582         * lex.h: Don't mention classpath.
13583         * lex.c (java_init_lex): Don't initialize classpath.
13584         * jcf-io.c (classpath): Removed global.
13585         (find_class): Use jcf_path iteration functions.  Correctly search
13586         class path for .java file.
13587         (open_in_zip): New argument `is_system'.
13588         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
13589         classpath-related options.
13590         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13591         and -I.
13592         (lang_init): Call jcf_path_init.
13593         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13594         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
13595         Correctly put braces around second string in each entry.
13596         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
13597         classpath-related options.
13598         (help): Updated for new options.
13599         * jcf.h: Declare functions from jcf-path.c.  Don't mention
13600         `classpath' global.
13601         * jcf-path.c: New file.
13602
13603         * jcf-depend.c: Include jcf.h.
13604
13605         * jcf-write.c (localvar_alloc): Returns `void'.
13606         (localvar_free): Removed unused variable.
13607
13608         * lang.c (OBJECT_SUFFIX): Define if not already defined.
13609         (init_parse): Use OBJECT_SUFFIX, not ".o".
13610
13611 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13612
13613         * class.c (emit_register_classes): Renamed from
13614         emit_register_class.
13615         * java-tree.h (emit_register_classes): Prototype renamed from
13616         emit_register_class.
13617         * jcf-parse.c (yyparse): Call emit_register_classes once before
13618         returning.
13619         * parse.y (java_expand_classes): No longer register classes.
13620
13621 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13622
13623         * class.c (is_compiled_class): New local variable
13624         seen_in_zip. Identify classes found in currently compiled source
13625         file(s).
13626         * decl.c (complete_start_java_method): Fixed typo.
13627         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13628         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13629         (CLASS_P): Moved around.
13630         (java_parse_abort_on_error): Macro moved from jcf-parse.c
13631         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13632         java-parse.h
13633         (jcf_parse_source): Changed leading comment. Removed unnecessary
13634         fclose and CLASS_FROM_SOURCE_P marking.
13635         (parse_source_file): New local variables remember_for_generation
13636         and filename. Mark parsed file name identifier node. Removed block
13637         executed when parse_only was null. Set remember_for_generation.
13638         Use it as an argument to java_pop_parser_context.
13639         (yyparse): New local variables several_files, list, next node and
13640         current_file_list. Split ampersand separated file names into
13641         current_file_list. Iterate through the list and parse accordingly.
13642         * parse.h (java_pop_parser_context): New function prototype.
13643         * parse.y (ctxp_for_generation): New static global variable.
13644         (java_pop_parser_context): New argument generate. Link popped ctxp
13645         to ctxp_for_generation list accordingly.
13646         (java_complete_expand_methods): Fixed indentation.
13647         (java_expand_classes): New function.
13648
13649 1998-10-17  Per Bothner  <bothner@cygnus.com>
13650
13651         * Makefile.in:  Link with libiberty.a instead of memmove.o.
13652
13653 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13654
13655         * lex.c (setjmp.h): No longer included.
13656         * lex.h (setjmp.h): Included.
13657         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13658         (duplicate_declaration_error_p): Renamed from
13659         duplicate_declaration_error.
13660         (build_array_from_name): New function prototype.
13661         * parse.y (setjmp.h): No longer included.
13662         (variable_declarator_id): Define action.
13663         (build_array_from_name): New function.
13664         (duplicate_declaration_error_p): Renamed from
13665         duplicate_declaration_error.  Fixed leading comment.
13666         (register_fields): Main `for' loop reorganized. Uses
13667         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13668         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13669         build_array_from_name.
13670         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13671         types.
13672         (read_import_dir): Don't try to skip `.' and `..'.
13673         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13674         build_array_from_name. Main `for' loop reorganized.
13675         (resolve_qualified_expression_name): When building access to a
13676         field, use the type where the field was found, not its own type.
13677         (maybe_access_field): Use field DECL_CONTEXT if the type where the
13678         field was found is null.
13679         (qualify_ambiguous_name): Sweep through all successive array
13680         dimensions.
13681
13682 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13683
13684         * java-tree.h (pop_labeled_block, lang_printable_name,
13685         maybe_add_interface, set_super_info, get_access_flags_from_decl,
13686         interface_of_p, inherits_from_p, fix_classpath,
13687         complete_start_java_method, emit_handlers, init_outgoing_cpool,
13688         make_class_data, register_class, alloc_name_constant): New
13689         function prototypes.
13690         * lang.c (lang_decode_option): Set argc argument unused. Fixed
13691         indentation. Added cast to remove warning.
13692         (lang_printable_name): Set v argument unused.
13693         (lang_print_error): Added argument to lang_printable_name call.
13694         (java_dummy_print, print_lang_decl, print_lang_type,
13695         print_lang_identifier, lang_print_xnode): All argument marked
13696         unused.
13697         * lex.c (java_unget_unicode): Removed unnecessary argument.
13698         (java_allocate_new_line): Unused local variable is gone.
13699         (java_read_char): Added parenthesis in expressions to remove
13700         warnings.  Added final return statement.
13701         (java_read_unicode): Added parenthesis in expression to remove
13702         warning.
13703         (java_parse_end_comment): Fixed java_unget_unicode invocation.
13704         (java_parse_escape_sequence): Likewise.
13705         (java_lex): Unused local variables are gone. Fixed
13706         java_unget_unicode invocation.
13707         * lex.h (set_float_handler): Prototype added when JC1_LITE not
13708         defined.
13709         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13710         lang_printable_name invocation in macro.
13711         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13712         Likewise.
13713         (duplicate_declaration_error): Suppressed unused argument in
13714         prototype.
13715         (identical_subpath_p): Function declaration is gone.
13716         (patch_invoke): Suppressed unused argument in prototype.
13717         (patch_cast, build_labeled_block, check_thrown_exceptions):
13718         Likewise.
13719         * parse.y (setjmp.h): Included
13720         (toplev.h): Likewise.
13721         (field_declaration:): Suppressed unused local
13722         (label_decl:): Fixed build_labeled_block invocation.
13723         (java_pop_parser_context): Put extra parenthesis around assignment
13724         in if.
13725         (yyerror): Suppressed unused local variables.
13726         (variable_redefinition_error): Fixed lang_printable_name
13727         invocation.
13728         (create_interface): Suppressed unused local variables.
13729         (create_class): Likewise.
13730         (duplicate_declaration_error): Suppressed unused argument. Fixed
13731         lang_printable_name invocation.
13732         (register_fields): Suppressed unused local variable. Fixed
13733         duplicate_declaration_error invocation.
13734         (method_header): Suppressed unused local variable.
13735         (method_declarator, parser_check_super): Likewise.
13736         (java_complete_class): Suppressed unused local variable. Fixed
13737         fatal error message.
13738         (complete_class_report_errors): Added default: in switch.
13739         (java_check_regular_methods): Fixed lang_printable_name
13740         invocations.
13741         (check_throws_clauses): Likewise.
13742         (java_check_abstract_methods): Suppressed unused local
13743         variable. Fixed lang_printable_name invocation.
13744         (read_import_entry): Added supplemental return statement.
13745         (read_import_dir): Suppressed unused local variables.
13746         (check_pkg_class_access, declare_local_variables): Likewise.
13747         (source_start_java_method): Suppressed unused extern variable
13748         declarations
13749         (expand_start_java_method): Suppressed unused extern and local
13750         variable declarations.
13751         (java_complete_expand_methods): Likewise.
13752         (java_complete_expand_method): Suppressed unused local variables.
13753         (make_qualified_name): Likewise.
13754         (resolve_qualified_expression_name): Added default: in
13755         switch. Fixed lang_printable_name invocation.
13756         (class_instance_creation_expression): Added parenthesis around
13757         expressions.
13758         (patch_method_invocation_stmt): Fixed lang_printable_name and
13759         patch_invoke invocations.
13760         (check_for_static_method_reference): Fixed lang_printable_name
13761         invocation.
13762         (patch_invoke): Suppressed unused arguments and local variables.
13763         (lookup_method_invoke): Suppressed unused local variables.
13764         (qualify_ambiguous_name): Added default: in switch.
13765         (identical_subpath_p): Function removed.
13766         (patch_assignment): Suppressed unused local variables. Suppressed
13767         unnecessary if statement. Fixed lang_printable_name invocations.
13768         (try_builtin_assignconv): Fixed lang_printable_name invocations.
13769         (valid_ref_assignconv_cast_p): Parenthesis around
13770         expression. Suppressed unused local variables.
13771         (build_binop): Suppressed unused local variables. fixed
13772         lang_printable_name invocations.
13773         (string_constant_concatenation): Suppressed unused local
13774         variables.
13775         (patch_unaryop): Fixed lang_printable_name invocation.
13776         (patch_cast): Suppressed unnecessary argument. Fixed
13777         lang_printable_name invocation.
13778         (patch_array_ref): Fixed lang_printable_name invocation.
13779         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13780         (build_labeled_block): Suppressed unused argument.
13781         (generate_labeled_block): Fixed build_labeled_block invocation.
13782         (build_loop_body): Suppressed unused local variables.
13783         (patch_loop_statement): Likewise.
13784         (patch_exit): Fixed lang_printable_name invocation.
13785         (patch_switch_statement): Likewise.
13786         (case_identity): First argument marked unused.
13787         (patch_try_statement): Fixed lang_printable_name invocations.
13788         (patch_synchronized_statement, patch_throw_statement): Likewise.
13789         (check_thrown_exceptions): Fixed check_thrown_exceptions and
13790         lang_printable_name invocations.
13791         (check_thrown_exceptions_do): Suppressed unused argument.
13792
13793 1998-10-14  Tom Tromey  <tromey@cygnus.com>
13794
13795         * jcf-write.c (write_classfile): Add output class file as target.
13796         * lang-options.h: Added -MD, -MMD, -M, and -MM.
13797         * jcf.h: Added declarations for dependency-tracking functions.
13798         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13799         * lang.c (lang_decode_option): Recognize -MD and -MMD.
13800         (finish_parse): Call jcf_dependency_write.
13801         (dependency_tracking): New global.
13802         (DEPEND_SET_FILE): New define.
13803         (DEPEND_ENABLE): New define.
13804         (init_parse): Enable dependency tracking if required.
13805         Include "flags.h".
13806         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13807         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13808         (../gcjh$(exeext)): Likewise.
13809         (jcf-depend.o): New target.
13810         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13811         (GCJH_SOURCES): Likewise.
13812         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
13813         dep_name argument.
13814         (find_classfile): Added dep_name argument.
13815         (find_class): Compute name of dependency.
13816         (open_in_zip): Call jcf_dependency_add_file.
13817         * gjavah.c (output_file): No longer global.
13818         (usage): Don't mention "gjavah".
13819         (help): Likewise.
13820         (java_no_argument): Likewise.
13821         (version): Likewise.
13822         (main): Recognize and handle -M family of options.
13823         (print_mangled_classname): Return is void.
13824         (process_file): Handle case where output is suppressed.
13825         (HANDLE_END_FIELD): Likewise.
13826         (HANDLE_METHOD): Likewise.
13827         * jcf-depend.c: New file.
13828
13829 1998-10-13  Jeffrey A Law  (law@cygnus.com)
13830
13831         * java-tree.def: Add missing newline at EOF.
13832
13833 1998-10-13  Tom Tromey  <tromey@cygnus.com>
13834
13835         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13836         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
13837         function.
13838         Include <config.h> and "system.h".
13839         (disassemble_method): Undefine RET to avoid clash with
13840         config/i386/i386.h.
13841
13842 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13843
13844         * decl.c (runtime_exception_type_node, error_exception_type_node):
13845         New global variables.
13846         (init_decl_processing): Initialized.
13847         * expr.c (java_lang_expand_expr): Set caught exception type to
13848         null if catch handler argument doesn't exit.
13849         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13850         tree codes.
13851         * java-tree.h (runtime_exception_type_node,
13852         error_exception_type_node): Global variables declared.
13853         (DECL_FUNCTION_THROWS): New macro.
13854         (DECL_FUNCTION_BODY): Modified comment.
13855         (DECL_SPECIFIC_COUNT): Likewise.
13856         (struct lang_decl): New field throws_list.
13857         (IS_UNCHECKED_EXPRESSION_P): New macro.
13858         * lex.c (java_lex): Generate location information for THROW_TK.
13859         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13860         EXCEPTIONS_P): New macros.
13861         (enum jdep_code): New value JDEP_EXCEPTION.
13862         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13863         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13864         PATCH_METHOD_RETURN_ERROR): New macros.
13865         (patch_method_invocation_stmt): Added new argument to prototype.
13866         (patch_synchronized_statement, patch_throw_statement,
13867         check_thrown_exceptions, check_thrown_exceptions_do,
13868         purge_unchecked_exceptions, check_throws_clauses): New function
13869         prototypes.
13870         * parse.y Fixed typo in keyword section.
13871         (throw:): Rule tagged <node>.
13872         (THROW_TK): Keyword tagged <operator>.
13873         (method_header:): Last argument to call to method_header passed
13874         from throws: rule.
13875         (throws:, class_type_list:, throw_statement:,
13876         synchronized_statement:, synchronized:): Defined actions.
13877         (method_header): New local variable current. Register exceptions
13878         from throws clause.
13879         (java_complete_tree): Complete and verify exceptions from throws
13880         clause.
13881         (complete_class_report_errors): Error message on exceptions not
13882         found
13883         (java_check_regular_methods): Fixed typo. Shortcut on private
13884         overriding methods. Changed error message on method
13885         redefinition. Check for throws clause compatibility.
13886         (check_throws_clauses): New function.
13887         (java_check_abstract_methods): Use DECL_NAME for wfl or current
13888         method. Changed error message on method redefinition.
13889         (currently_caught_type_list): New static variable.
13890         (java_complete_expand_methods): Purge unchecked exceptions from
13891         throws clause list. Call PUSH_EXCEPTIONS before walk and
13892         POP_EXCEPTIONS after.
13893         (resolve_qualified_expression_name): Pass new argument as NULL to
13894         patch_method_invocation_stmt.
13895         (patch_method_invocation_stmt): New argument ref_decl. Invoke
13896         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13897         argument list when appropriate. Use new argument if non null to
13898         store selected method decl.
13899         (patch_invoke): Convert if necessary args of builtin types before
13900         forming CALL_EXPR. Argument list no longer reversed here.
13901         (invocation_mode): Treat final methods as static methods.
13902         (java_complete_tree): New cases for THROW_EXPR: and
13903         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13904         function call.
13905         (complete_function_arguments): No more RECORD_TYPE
13906         conversion. Function parameter nodes no longer saved.
13907         (valid_ref_assignconv_cast_p): Avoid handling null type.
13908         (patch_binop): Fixed null constant reference handling.
13909         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13910         BUILD_THROW macros.
13911         (patch_try_statement): Fixed comments. Record caught types in
13912         list, push the list, expand try block and pop the list.
13913         (patch_synchronized_statement, patch_throw_statement,
13914         check_thrown_exceptions, check_thrown_exceptions_do,
13915         purge_unchecked_exceptions): New functions.
13916         * typeck.c (lookup_argument_method): Allow WFL in place of method
13917         DECL_NAME during method definition check
13918
13919 1998-10-09  Tom Tromey  <tromey@cygnus.com>
13920
13921         * gjavah.c (decode_signature_piece): New function.
13922         (print_c_decl): Use it.  Added `name_override' argument.
13923         (print_method_info): Use name_override argument to print_c_decl.
13924         (seen_fields): Removed.
13925         (print_field_info): Don't update seen_fields.
13926         (struct method_name): New structure.
13927         (method_name_list): New global.
13928         (print_method_info): Add new method to list of methods.
13929         (name_is_method_p): New function.
13930         (print_field_info): If field name has same name as method, then
13931         change field name.
13932         (process_file): Parse methods before fields.
13933         (field_pass): New global.
13934         (HANDLE_END_FIELD): Take field_pass into account.
13935
13936 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13937
13938         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13939         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13940
13941 1998-10-03  Anthony Green  <green@cygnus.com>
13942
13943         * jvspec.c: Fix bug in jvgenmain_spec patch.
13944
13945 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13946
13947         * Makefile.in (lang.o:): Install dependency on java-tree.def.
13948         * decl.c (soft_exceptioninfo_call_node): New global variable.
13949         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13950         takes extra integer argument. soft_exceptioninfo_call_node
13951         initialized.
13952         * except.c (java_set_exception_lang_code): New function
13953         (method_init_exceptions): Called here.
13954         (prepare_eh_table_type): New function.
13955         (expand_end_java_handler): Called here.
13956         * expr.c (build_java_throw_out_of_bounds_exception): Now features
13957         one argument. Modified generation of call to
13958         soft_badarrayindex_node to use new argument.
13959         (build_java_arrayaccess): Pass faulty index value to
13960         build_java_throw_out_of_bounds_exception.
13961         (generate_name): New function.
13962         (java_lang_expand_expr): New local variables node, current,
13963         has_finally_p. Expand TRY_EXPR node.
13964         (process_jvm_instruction): Replace top of the stack with thrown
13965         object reference when entering exception handler.
13966         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13967         specific tree codes.
13968         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13969         global.
13970         (DECL_SPECIFIC_COUNT): New macro.
13971         (prepare_eh_table_type, java_set_exception_lang_code,
13972         generate_name): New function declarations.
13973         (match_java_method): Declaration deleted.
13974         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13975         macros.
13976         * lex.c (TRY_TK, CATCH_TK): Generate location information.
13977         * parse.h (redefinition_error, refine_accessible_methods_list,
13978         can_cast_to_p): Function declaration removed.
13979         (classitf_redefinition_error, variable_redefinition_error,
13980         parse_jdk1_1_error, find_applicable_accessible_methods_list,
13981         find_most_specific_methods_list, argument_types_convertible,
13982         enter_a_block, valid_builtin_assignconv_identity_widening_p,
13983         valid_cast_to_p, valid_method_invocation_conversion_p,
13984         try_reference_assignconv, add_stmt_to_compound,
13985         build_jump_to_finally, build_tree_list, patch_try_statement,
13986         java_get_catch_block): New function declarations.
13987         * parse.y (string_buffer_type): Global variable deleted.
13988         (group_of_labels, catches, catch_clause, catch_clause_parameter,
13989         finally): Rules tagged <node>.
13990         (TRY_TK, CATCH_TK): Token tagged <operator>.
13991         (class_body_declaration:, class_member_declaration:,
13992         formal_parameter:, explicit_constructor_invocation:,
13993         interface_member_declaration:, constant_declaration:,
13994         primary_no_new_array:, class_instance_creation_expression:,
13995         array_creation_expression:): Issue error on unsuported JDK1.1
13996         features.
13997         (try_statement:, catches:, finally:): Define actions.
13998         (catch_clause_parameter): New rule.
13999         (catch_clause:): Use new rule catch_clause_parameter.
14000         (parse_jdk1_1_error): New function.
14001         (redefinition_error): Renamed classitf_redefinition_error.
14002         (variable_redefinition_error): New function.
14003         (check_class_interface_creation): Call
14004         classitf_redefinition_error.
14005         (java_complete_tree): Added error message on JDEP_TYPE: case.
14006         (complete_class_report_errors): Fixed indentation.
14007         (declare_local_variables): Call variable_redefinition_error.
14008         (source_end_java_method): Call java_set_exception_lang_code and
14009         emit_handlers where appropriate.
14010         (java_method_add_stmt): Call add_stmt_to_block.
14011         (add_stmt_to_block): New function.
14012         (lookup_method_invoke): Fixed outside comment. new local variable
14013         candicates.  Call find_applicable_accessible_methods_list and
14014         find_most_specific_methods_list when searching for a
14015         method. Modified error report to list possible candidates when
14016         applicable.
14017         (find_applicable_accessible_methods_list,
14018         find_most_specific_methods_list, argument_types_convertible): New
14019         function.
14020         (refine_accessible_methods_list): Function deleted.
14021         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
14022         expr (if applicable) before calling patch_array_ref.
14023         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
14024         (enter_block): Fixed comment.
14025         (enter_a_block): New function.
14026         (patch_assignment): Reorganized. Call try_reference_assignconv for
14027         references. Call valid_cast_to_p instead of can_cast_to_p.
14028         (try_reference_assignconv,
14029         valid_builtin_assignconv_identity_widening_p): New functions.
14030         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
14031         (valid_cast_to_p, valid_method_invocation_conversion_p): New
14032         functions.
14033         (build_string_concatenation): Don't resolve StringBuffer.
14034         (patch_cast): Fixed inverted arguments.
14035         (patch_array_ref): Code to save array expr deleted. Call
14036         valid_cast_to_p instead of can_cast_to_p.
14037         (generate_labeled_block): Call generate_name.
14038         (build_jump_to_finally, build_try_statement, java_get_catch_block,
14039         patch_try_statement): New functions.
14040         * typeck.c (match_java_method): Function deleted.
14041
14042 1998-10-02  Anthony Green  <green@cygnus.com>
14043
14044         * jvspec.c: jvgenmain_spec uses different temporary file names.
14045
14046 1998-10-02  Anthony Green  <green@cygnus.com>
14047
14048         * jvspec.c (lang_specific_driver): Fail if user specifies
14049         --main= when not linking.
14050
14051 1998-09-28  Tom Tromey  <tromey@cygnus.com>
14052
14053         * class.c (make_class_data): Push value for `thread' field.
14054         * decl.c (init_decl_processing): Added `thread' field to class.
14055
14056         * class.c (add_field): Always make static fields externally
14057         visible.
14058
14059 1998-09-26  Anthony Green  <green@cygnus.com>
14060
14061         * expr.c (build_java_athrow,
14062         build_java_throw_out_of_bounds_exception, expand_invoke,
14063         build_newarray, expand_java_multianewarray, build_java_monitor):
14064         Update comments to reflect _Jv_* function names.
14065
14066 1998-09-25  Per Bothner  <bothner@cygnus.com>
14067
14068         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
14069         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
14070         * parse.y (expand_start_java_method):  Likewise.
14071
14072 1998-09-24  Per Bothner  <bothner@cygnus.com>
14073
14074         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
14075
14076         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
14077         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
14078         * expr.c:  Remove no-longer-needed calls to promote_type.
14079         * decl.c (give_name_to_locals):  Liekwise.
14080         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
14081         * parse.y:  Add/remove promote_type calls as appropriate.
14082         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
14083         (parse_signature_string):  Likewise.
14084         (build_java_array_type):  Fix for now signature convenions.
14085
14086         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
14087
14088 1998-09-23  Tom Tromey  <tromey@cygnus.com>
14089
14090         * class.c (init_class_processing): libjava function renamed to
14091         _Jv_RegisterClass.
14092
14093 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14094
14095         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
14096         * java-tree.def: Fixed DEFTREECODE third argument.
14097         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
14098         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
14099         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
14100         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14101         JAVA_THIS_EXPR): Now replaced by tree code definitions.
14102         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
14103         * lang.c (java_tree_code_type, java_tree_code_length,
14104         java_tree_code_name): New arrays.
14105         (lang_init): Append Java tree node definitions to Gcc ones.
14106         * lex.c (expression_obstack): Declared as extern when JC1_LITE
14107         defined.
14108         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
14109         wfl_to_string.
14110         (java_lex): Allow declaration of empty string constants. Retain
14111         location information on CASE_TK and DEFAULT_TK.
14112         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
14113         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
14114         Modified to be more robust.
14115         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
14116         (build_new_invocation, try_builtin_assignconv,
14117         patch_switch_statement, string_constant_concatenation,
14118         build_string_concatenation, patch_string_cst, patch_string,
14119         java_expand_switch): New function declarations.
14120         * parse.y: Rules related to switch and EH tagged <node>.
14121         (label_id): Set to NULL_TREE
14122         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
14123         tree nodes.
14124         (this_or_super:): Fixed indentation.
14125         (statement:, statement_nsi:, statement_without_trailing_substatement:,
14126         statement_expression:): Removed call to RULE on all sub-rules.
14127         (switch_expression:, switch_labels:): New rules.
14128         (switch_statement:, switch_block:, switch_block_statement_groups:,
14129         switch_block_statement_group:, switch_labels:, switch_label:):
14130         Defined actions.
14131         (throw_statement:, synchronized_statement:, try_statement:):
14132         Defined temporary actions.
14133         (class_instance_creation_expression:): Call
14134         build_new_invocation. Fixed indentation.
14135         (field_access): Fixed indentation.
14136         (method_invocation): Likewise.
14137         (make_qualified_primary): Use THIS_EXPR.
14138         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
14139         resolving from SUPER, set *type_found.
14140         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
14141         (java_complete_tree): Removed unused local variable `location'. Case
14142         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
14143         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
14144         on MODIFY_EXPR: and all binary operator tree code cases. Removed
14145         STRING_CST: case. default: checks for patchable strings.
14146         (complete_function_arguments): Transform string constant or
14147         crafted StringBuffer if necessary.
14148         (build_method_invocation): Fixed comments.
14149         (build_new_invocation): New function.
14150         (patch_assignment): Call try_builtin_assignconv to figure a valid
14151         assignment conversion between builtin types.
14152         (try_builtin_assignconv): New function.
14153         (build_binop): Use URSHIFT_EXPR directly to call build.
14154         (operator_string): Use UNARY_PLUS_EXPR.
14155         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
14156         operator.
14157         (do_merge_string_cste, merge_string_cste,
14158         string_constant_concatenation, build_string_concatenation,
14159         patch_string, patch_string_cst): New function.
14160         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
14161         (patch_unaryop): Likewise. New test of valid ++/-- operands.
14162         (build_newarray_node): Use NEW_ARRAY_EXPR.
14163         (build_this): Use THIS_EXPR.
14164         (build_return): Enable debug information on return statement.
14165         (build_if_else_statement): Likewise.
14166         (complete_labeled_statement): Fixed related comment.
14167         (build_loop_body): Fixed comment.
14168         (build_bc_statement): Enable debug information on break/continue
14169         statements.
14170         (patch_bc_statement): Fixed typos. Handle SWITCH statement
14171         context.
14172         (patch_switch_statement, case_identity, java_expand_switch): New
14173         functions.
14174
14175 1998-09-21  Per Bothner  <bothner@cygnus.com>
14176
14177         * buffer.h (BUFFER_INIT):  New macro.
14178         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
14179         Pass (struct jcf_partial *state) to most functions.
14180         (jcf_block, jcf_relocation):  New types.
14181         Support labels, branches, conditionals, loops.
14182
14183 1998-09-21  Tom Tromey  <tromey@cygnus.com>
14184
14185         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
14186
14187 1998-09-21  Per Bothner  <bothner@cygnus.com>
14188
14189         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
14190         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
14191         not integer_type_node (INT_TYPE_SIZ bits).
14192
14193         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
14194
14195         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
14196         * jcf-dump.c (print_exception_table):  New function.
14197         (disassemble_method):  Better handling of wide instructions.
14198         Make more robust for bad input.
14199
14200 1998-09-30  Jeffrey A Law  (law@cygnus.com)
14201
14202         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
14203         FreeBSD.
14204
14205 1998-09-17  Jeffrey A Law  (law@cygnus.com)
14206
14207         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
14208
14209 1998-09-17  Tom Tromey  <tromey@cygnus.com>
14210
14211         * Makefile.in ($(PARSE_H)): Removed target.
14212
14213 1998-09-17  Jeffrey A Law  (law@cygnus.com)
14214
14215         * Makefile.in (JAVA_OBJS): Add memmove.o
14216         (memmove.o): New target & rules.
14217
14218 1998-09-15  Tom Tromey  <tromey@cygnus.com>
14219
14220         * expr.c (expand_invoke): Don't generate a call to the class init
14221         code.
14222
14223 1998-09-14  Jeffrey A Law  (law@cygnus.com)
14224
14225         * Makefile.in: Add many missing dependencies.
14226         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
14227         as appropriate.
14228         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
14229         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
14230
14231 1998-09-11  Per Bothner  <bothner@cygnus.com>
14232
14233         * decl.c (complete_start_java_method):  If method is static (and
14234         not private) call _Jv_InitClass.
14235         * expr.c (expand_invoke):  Don't call build_class_init.
14236
14237         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
14238
14239 1998-09-10  Jeffrey A Law  (law@cygnus.com)
14240
14241         * Make-lang.in (GCJ): Define before using.
14242
14243 1998-09-09  Jeffrey A Law  (law@cygnus.com)
14244
14245         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
14246         losing due to namespace pollution in GNU getopt.h
14247
14248 1998-09-09  Tom Tromey  <tromey@cygnus.com>
14249
14250         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
14251         (java.all.cross): Likewise.
14252         (java.rest.encap): Likewise.
14253
14254 1998-09-08  Jeffrey A Law  (law@cygnus.com)
14255
14256         * gjavah.c (print_class_decls): Fix thinko in arglist
14257         * jcv-io.c (find_classfile): Similarly.
14258
14259 1998-09-07  Jeffrey A Law  (law@cygnus.com)
14260
14261         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
14262
14263 1998-09-05  Tom Tromey  <tromey@cygnus.com>
14264
14265         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
14266         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
14267         * Makefile.in (PARSE_C): New macro.
14268         (PARSE_H): Likewise.
14269         (PARSE_SCAN_C): Likewise.
14270         ($(PARSE_C)): Target renamed from parse.c.
14271         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
14272         (clean): Remove parse-scan.c as well.
14273         (parse.o): Depend on $(PARSE_C).
14274
14275 1998-09-05  Anthony Green  <green@cygnus.com>
14276
14277         * README, license.terms: Removed.
14278
14279         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
14280         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
14281         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
14282         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
14283         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
14284         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
14285         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
14286         and Java trademark attribution.
14287
14288 1998-09-04  Tom Tromey  <tromey@cygnus.com>
14289
14290         * Makefile.in: Use gcjh, not gjavah.
14291         * config-lang.in (stagestuff): Use gcjh, not gjavah.
14292         * Make-lang.in: Changed gjavah to gcjh everywhere.
14293
14294 1998-09-03  Per Bothner  <bothner@cygnus.com>
14295
14296         * gjavah.c:  Support new -prepend -add -append flags.
14297         (print_method_info):  Method is not virtual if class is final.
14298
14299 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14300
14301         * jv-scan.c: Fixed copyright assignment.
14302         * keyword.gperf: Likewise.
14303         * keyword.h: Likewise.
14304         * lex.c: Fixed copyright assignment.
14305         (java_lex): Push unicode back when parsing '<'.
14306         * lex.h: Fixed copyright assignment.
14307         * parse-scan.y: Likewise.
14308         * parse.h: Fixed copyright assignment.
14309         (build_debugable_stmt, complete_for_loop): New function prototypes.
14310         * parse.y: Fixed copyright assignment.
14311         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
14312         size_zero_node when completing a loop with no exit condition.
14313         (for_statement_nsi:): Define action.
14314         (for_init:, for_update:): Return size_zero_node when empty.
14315         (declare_local_variables): Call build_debugable_stmt.
14316         (build_debugable_stmt): New function.
14317         (build_loop_body): Build debugable statement around loop
14318         condition part.
14319         (complete_loop_body): Take into account the debugable statement
14320         around the EXIT_EXPR.
14321         (complete_loop_body): New function.
14322         (patch_exit_expr): Fixed condition inversion.
14323
14324 1998-09-02  Tom Tromey  <tromey@cygnus.com>
14325
14326         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14327         name of thread define.
14328         * jvspec.c (THREAD_NAME): New macro.
14329         (GCLIB): Likewise.
14330         (THREADLIB): Likewise.
14331         (lang_specific_driver): Recognize attempt to link with thread
14332         library or gc library.  Recognize -ljava on command line so it
14333         isn't linked against more than once.
14334
14335 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14336
14337         * parse-scan.y (report_main_declaration): Name of the class
14338         containing `main' can be a qualified name.
14339
14340 1998-08-31  Tom Tromey  <tromey@cygnus.com>
14341
14342         * config-lang.in: Changed gjavac to gjc everywhere.
14343         * Make-lang.in: Changed gjavac to gjc everywhere.
14344
14345 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14346
14347         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14348         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14349         and install the files.
14350         * Makefile.in (JAVA_OBJS_LITE): New variable.
14351         (compiler:): Now include jv-scan as a dependency.
14352         (../jv-scan$(exeext), parse-scan.c): New targets.
14353         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14354         * config-lang.in (compilers): Removed gcj, gjavah from the list.
14355         * jcf-parse.c (parse_source_file): Call java_layout_classes and
14356         check for errors even if parse_only.
14357         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14358         defined.
14359         (yylex): New function. Uses java_lex body.
14360         (java_lex): Removed commented out statement. Remove local variable
14361         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14362         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14363         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14364         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14365         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14366         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14367         where appropriate.
14368         (java_lex_error): Empty if JC1_LITE is defined.
14369         (java_get_line_col): Return 0 if JC1_LITE is defined.
14370         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14371         SET_MODIFIER_CTX): Moved into the section containing the macros
14372         conditionally defined by JC1_LITE.
14373         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14374         argument if JC1_LITE is defined.
14375         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14376         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14377         is defined.
14378         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14379         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14380         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14381         to different values according to JC1_LITE.
14382         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14383         declared if JC1_LITE set.
14384         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14385         defined if JC1_LITE not set.
14386         (struct parser_ctx): Reorganized and skip the jc1 front end part
14387         if JC1_LITE set.
14388         (java_layout_classes): New function definition.
14389         (java_push_parser_context, java_init_lex, yyparse, yylex,
14390         yyerror): Prototype always declared. All other static function
14391         prototypes declared only if JC1_LITE is not set.
14392         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14393         declared in parse.h.
14394         (java_layout_classes): New function.
14395         (java_complete_expand_methods): No longer layout the class here.
14396         * parse-scan.y: New file.
14397         * jv-scan.c: New file.
14398
14399 1998-08-25  Tom Tromey  <tromey@cygnus.com>
14400
14401         * gjavah.c (main): Handle -friend option.
14402         (friend_specs): New global.
14403         (generate_access): Handle friend_specs.
14404         (process_file): Likewise.
14405         (MAX_FRIENDS): New macro.
14406         (friend_count): New global.
14407         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
14408         Changed all callers.
14409
14410 1998-08-24  Per Bothner  <bothner@cygnus.com>
14411
14412         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
14413         (main):  Handle processing all the entries of a named .zip archive.
14414         * jcf-io.c (jcf_trim_old_input):  New function.
14415         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
14416
14417 1998-08-24  Per Bothner  <bothner@cygnus.com>
14418
14419         * lang.c (flag_assume_compiled):  Make default be on.
14420
14421 1998-08-21  Per Bothner  <bothner@cygnus.com>
14422
14423         * jcf-dump.c:  Add bunches of flags to control output more.
14424         (process_class):  New function;  support printing more than one class.
14425         (main): Support new --print-main and --javap flags.
14426         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
14427         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
14428
14429 1998-08-20  Per Bothner  <bothner@cygnus.com>
14430
14431         Change mangling of dispatch table to match C++ vtable (w/thunks).
14432         * class.c (build_dtable_decl), java-tree.h:  New function.
14433         (make_class_data):  Call it.
14434         * decl.c (init_decl_processing):  Likewise.
14435
14436 1998-08-19  Warren Levy  <warrenl@cygnus.com>
14437
14438         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14439         soft_anewarray; adjust args passed.
14440         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14441         match _Jv_NewObjectArray.
14442
14443 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14444
14445         * decl.c (push_labeled_block, pop_labeled_block): New functions.
14446         * expr.c (loopup_label): Call create_label_decl.
14447         (create_label_decl): New function.
14448         (java_lang_expand_expr): Call expand_start_bindings with argument
14449         set to zero.
14450         * java-tree.h Added space after PROTO in function declarations
14451         when necessary.
14452         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14453         (create_label_decl, push_labeled_block): New function
14454         declarations.
14455         * lex.c (label_id): Initialize.
14456         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14457         switch.
14458         * parse.h Added space after PROTO in function declarations when
14459         necessary.
14460         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14461         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14462         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14463         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14464         macros.
14465         (struct parser_ctxt): New fields current_loop,
14466         current_labeled_block.
14467         (build_if_else_statement, patch_if_else_statement,
14468         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14469         generate_labeled_block, complete_labeled_statement,
14470         build_bc_statement, patch_bc_statement, patch_loop_statement,
14471         build_new_loop, build_loop_body, complete_loop_body): New function
14472         declarations.
14473         * parse.y (java_warning_count): New global variable.
14474         (label_id): New static variable.
14475         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14476         (block:): Return size_zero_node when block is empty.
14477         (empty_statement:): Return size_zero_node.
14478         (statement:): Implement supplemental action when for_statement: is
14479         reduced.
14480         (label_decl:): New rule.
14481         (labeled_statement:): Rewritten using label_decl. Actions
14482         implemented.
14483         (labeled_statement_nsi:): Likewise.
14484         (if_then_statement): Actions implemented.
14485         (while_expression): New rule.
14486         (while_statement:): Rewritten using while_expression. Actions
14487         implemented.
14488         (while_statement_nsi:): Likewise.
14489         (do_statement_begin:): New rule.
14490         (do_statement:): Rewritten using do_statement_begin. Actions
14491         implemented.
14492         (for_statement:): Rewritten using for_begin. Actions implemented.
14493         (for_statement_nsi:): Likewise.
14494         (for_header:, for_begin:): New rules.
14495         (for_init:): Actions implemented.
14496         (statement_expression_list:, break_statement:,
14497         continue_statement:): Likewise.
14498         (yyerror): Count number of issued warning(s).
14499         (java_report_errors): Report error(s) and/or warning(s).
14500         (java_complete_class): Use build_java_argument_signature to
14501         recompute completed method signature.
14502         (java_check_regular_methods): New locals method_wfl and aflags.
14503         Use method_wfl instead of lookup_cl during error reports. Fixed
14504         indentation and modified some error messages. Use
14505         lang_printable_name in method instead of the DECL_NAME. New code
14506         to issue warnings on methods not overriding corresponding methods
14507         private to a different package.
14508         (java_method_add_stmt): Call add_stmt_to_compound.
14509         (add_stmt_to_compound): New function.
14510         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14511         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14512         (build_if_else_statement, patch_if_else_statement,
14513         build_labeled_block, generate_labeled_block,
14514         complete_labeled_statement, build_new_loop, build_loop_body,
14515         complete_loop_body, patch_loop_statement, build_bc_statement,
14516         patch_bc_statement, patch_exit_expr): New functions.
14517         * typeck.c (build_java_signature): Build argument signature before
14518         enclosing it in between parenthesis.
14519
14520 1998-08-17  Warren Levy  <warrenl@cygnus.com>
14521
14522         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14523         (JAVA_OBJS): Added reminder comment
14524
14525 1998-08-13  Nick Clifton  <nickc@cygnus.com>
14526
14527         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14528         be interpreted as a long long.
14529
14530 1998-08-13  Warren Levy  <warrenl@cygnus.com>
14531
14532         * decl.c (init_decl_processing): Use _Jv_InitClass, not
14533         soft_initialise_class.  Use _Jv_NewMultiArray, not
14534         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
14535         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
14536         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
14537         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14538
14539 1998-08-12  Per Bothner  <bothner@cygnus.com>
14540
14541         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14542         length_identifier_node):  New global tree node constants.
14543         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
14544         Replace uses by super_identifier_node etc.
14545         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
14546
14547         * parse.y (resolve_field_access):  Don't special-case ".length" if
14548         flag_emit_class_files.
14549         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
14550         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
14551         and ARRAY.length.
14552
14553 1998-08-11  Per Bothner  <bothner@cygnus.com>
14554
14555         * decl.c (init_decl_processing): Remove unused method_type_node fields.
14556         * class.c (make_method_value):  Remove init for removed fields.
14557
14558         * class.c (layout_class):  Use build_java_argument_signature.
14559         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
14560
14561         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
14562         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
14563         (build_java_signature):  Don't use push_java_argument_signature.
14564
14565         * typeck.c (lookup_argument_method):  New function.
14566         * parse.y (java_check_regular_methods):  Use lookup_argument_method
14567         instead of lookup_java_method2 followed by lookup_java_method.
14568
14569         * parse.y (check_method_redefinition):  Minor optimization.
14570
14571         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
14572         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14573
14574 1998-08-10  Tom Tromey  <tromey@cygnus.com>
14575
14576         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14577         c-pragma.o.
14578
14579         * gjavah.c (java_float_finite): Use K&R-style definition.
14580         (java_double_finite): Likewise.
14581         (generate_access): Now returns void.  Changed all callers.
14582         (last_access_generated): Removed.
14583         (process_file): Only make a single pass over the .class file.
14584
14585 1998-07-29  Per Bothner  <bothner@cygnus.com>
14586
14587         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
14588         for compatibility for G++ (with -fvtable-thunks).
14589         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
14590
14591         * gjavah.c (process_file):  Use public inheritance for super-class.
14592
14593 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14594
14595         * lex.c (java_init_lex): Initialize ctxp->package.
14596         * parse.h (struct parser_ctxt): package and package_len replaced
14597         by tree package, an identifier node. Field method_decl_list is
14598         gone. Fixed comments.
14599         (lookup_field_wrapper, merge_qualified_name, not_accessible,
14600         class_in_current_package): New function prototypes.
14601         * parse.y (array_type:): Set class loaded flag on primitive type
14602         arrays.
14603         (package_declaration:): Assign ctxp->package to the
14604         identifier node.
14605         (method_invocation:): Handle invocation of method qualified by
14606         `super'.
14607         (single_type_import_declaration:): Removed ambiguity check.
14608         (java_pop_parser_context): New local variable `next'. Reset and
14609         set IMPORT_CLASSFILE_NAME flags on current and previous import
14610         list.
14611         (java_accstring_lookup): Use new local macro COPY_RETURN.
14612         (lookup_field_wrapper): New function.
14613         (parser_qualified_classname): Use merge_qualified_name.
14614         (parser_check_super_interface): Broaden error message.
14615         (do_resolve_class): Check for qualified class name in the current
14616         compilation unit if appropriate.
14617         (process_imports): Check for already defined classes.
14618         (check_pkg_class_access): Got rid of call to
14619         get_access_flags_from_decl.
14620         (java_complete_expand_methods): Call safe_layout_class based on
14621         the current class size.
14622         (make_qualified_primary): Build a WFL qualification on primary if
14623         none exists.
14624         (merge_qualified_name): New function.
14625         (make_qualified_name): Use merge_qualified_name.
14626         (resolve_expression_name): Use safe_lookup_field.
14627         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14628         (resolve_qualified_expression_name): Likewise. Check on resolved
14629         element accessibility.
14630         (not_accessible_p, class_in_current_package): New functions.
14631         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14632         (patch_method_invocation_stmt): Merged common pieces. Check
14633         accessibility of invoked method.
14634         (check_for_static_method_reference): Add returned type in error
14635         message.
14636         (invocation_mode): Get rid of bogus check on PRIVATE methods.
14637         (refine_accessible_methods_list): Merged two conditions in test.
14638         (java_complete_class): Sanity check on stabilize_ref gone.
14639         * zextract.c (read_zip_archive): Cast lseek second argument to long.
14640
14641 1998-07-28  Per Bothner  <bothner@cygnus.com>
14642
14643         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
14644
14645 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14646
14647         * gjavah.c (F_NAN): Removed.
14648         (F_NAN_MASK): New macro.
14649         (F_POSITIVE_INFINITY): Removed.
14650         (F_NEGATIVE_INFINITY): Likewise.
14651         (java_float_finite): Rewrote.
14652         (D_NAN_MASK): Renamed.
14653         (java_double_finite): Rewrote.
14654         (D_POSITIVE_INFINITY): Removed.
14655         (D_NEGATIVE_INFINITY): Likewise.
14656
14657         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14658         If verbose, print underlying representation of value in hex.
14659
14660 1998-07-24  Per Bothner  <bothner@cygnus.com>
14661
14662         * buffer.h, buffer.c:  New files.
14663         * Makefile.in (JAVA_OBJS):  Add buffer.o.
14664
14665         Support locals variables and writing their debug entries to .class.
14666         * jcf-write.c:  Simplify some by user new buffer type.
14667         (vode_buffer_grow):  Removed.
14668         (struct localvar_info):  New type.
14669         (localsvars, localvartable):  New buffers.
14670         (localvar_alloc, localvar_free):  New functions.
14671         (generate_bytecode_insns):  Handle local variables.
14672         (generate_classfile):  Write LocalVariableTable attribute.
14673
14674 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14675
14676         * jcf-io.c (open_in_zip): Check the zipfile magic number.
14677         * zipfile.h (ZIPMAGIC): New macro.
14678
14679 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14680
14681         * Makefile.in (gjavah.o): Updated dependencies.
14682         (jcf-dump.o): Likewise.
14683         (all.indirect): Use ../gjavah.
14684         (../gjavah$(exeext)): Likewise.
14685         (clean): Don't remove gjavah.
14686         (clean): Remove parse.c, not java/parse.c.
14687         * Make-lang.in (java): Added gjavah.
14688         (gjavah$(exeext)): New target.
14689         (GJAVAH_SOURCES): New macro.
14690         (java.all.build): Added gjavah.
14691         (java.all.cross): Likewise.
14692         (java.rest.encap): Likewise.
14693         * config-lang.in (compilers, stagestuff): Added gjavah.
14694
14695 1998-07-23  Tom Tromey  <tromey@cygnus.com>
14696
14697         * gjavah.c (java_float_finite): New function.
14698         (java_double_finite): Likewise.
14699         (F_POSITIVE_INFINITY): New macro.
14700         (F_NEGATIVE_INFINITY): Likewise.
14701         (F_NAN): Likewise.
14702         (D_POSITIVE_INFINITY): Likewise.
14703         (D_NEGATIVE_INFINITY): Likewise.
14704         (D_NAN): Likewise.
14705         (print_field_info): Use java_float_finite and java_double_finite.
14706
14707 1998-07-23  Per Bothner  <bothner@cygnus.com>
14708
14709         * parse.y (method_header):  Name "this" implicit argument.
14710
14711 1998-07-22  Per Bothner  <bothner@cygnus.com>
14712
14713         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
14714         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
14715         (put_linenumber):  New function.
14716         (generate_bytecode_insns, generate_classfile):  Write line numbers.
14717
14718 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14719
14720         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14721         (lookup_name, build_known_method_ref, build_class_init,
14722         build_invokevirtual, invoke_build_dtable, match_java_method,
14723         build_field_ref, pushdecl_force_head, build_java_binop,
14724         binary_numeric_promotion, build_decl_no_layout,
14725         build_java_arrayaccess, build_newarray, build_anewarray,
14726         build_java_array_length_access, build_java_arraynull_check): New
14727         extern function prototypes.
14728         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14729         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14730         java-tree.h.
14731         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14732         to NULL
14733         * jcf.h (jcf_out_of_synch): New extern function prototype.
14734         * parse.h: Static/global function implemented in parse.y
14735         prototyped and declarations moved at the end of the file.
14736         (DECL_P): Check that the argument isn't null.
14737         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14738         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14739         (QUAL_DECL_TYPE): New macro.
14740         (PARAMS): Macro definition removed.
14741         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14742         (return_statement:): Call build_return.
14743         (field_access:): Call make_qualified_primary in sub rule.
14744         (method_invocation:): Build method invocation and call
14745         make_qualified_primary when processing primaries.
14746         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14747         get_type_from_signature.
14748         (java_check_regular_method): Extra integer 0 argument when calling
14749         lookup_java_method2.
14750         (lookup_java_interface_method2): Extra method DECL argument when
14751         calling lookup_java_interface_method2.
14752         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14753         COMPOUND_EXPR node.
14754         (java_complete_expand_method): Layout current class iff not
14755         already done. Don't process interface's methods.
14756         (java_complete_expand_method): Use super class only if it
14757         exists. Use current class otherwise.
14758         (make_qualified_primary): New function.
14759         (resolve_expression_name): Process qualified expression or
14760         expression from primary the same way.
14761         (resolve_expression_name): Two last arguments to
14762         resolve_field_access are now NULL_TREEs.
14763         (resolve_field_access): New variable is_static. Local field must
14764         be DECLs. is_static computed on field DECLs only. Append code in
14765         where_found to the field access if necessary. Use QUAL_DECL_TYPE
14766         to initialize field_type.
14767         (resolve_qualified_expression_name): New local variable,
14768         previous_call_static and is_static. Handle primaries with function
14769         calls, casts, array references and `this'. `super' now handled as
14770         `(super_class)this'. Use is_static to clarify boolean expressions.
14771         Added code to handle case where a proper handle is required to
14772         access a field. Use QUAL_DECL_TYPE where applicable.
14773         (maybe_access_field): New function.
14774         (patch_method_invocation_stmt): New arguments primary, where,
14775         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14776         deleted. Use `where' as a type to search from if specified. Check
14777         for static method reference where forbidden. Append primary or
14778         current_this to the argument list if not calling constructor nor
14779         static methods.
14780         (check_for_static_method_reference): New function.
14781         (patch_invoke): Layout the class on which new is done if
14782         necessary.
14783         (lookup_method_invoke): Changed format to report errors on
14784         methods.
14785         (qualify_ambiguous_name): New local variable this_found. Now
14786         handle things from primaries. Method call are considered
14787         expression names.
14788         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14789         changed into NULLs.
14790         (not_initialized_as_it_should_p): Comply with the new DECL_P.
14791         (java_complete_tree): New case fo RETURN_EXPR. Process function
14792         call arguments in separate function.
14793         (complete_function_arguments): New function.
14794         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14795         anymore.
14796         (patch_assignment): Take the return function slot into account as
14797         a RHS. Distinguish assignment from a return.
14798         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14799         when checking methods in interfaces.
14800         (resolve_type_during_patch): NULL argument to unresolve_type_p
14801         instead of NULL_TREE.
14802         (patch_newarray): Fixed typo in comment.
14803         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14804         (build_return, patch_return): New functions.
14805         * typeck.c (lookup_java_constructor): Fixed typo in comment.
14806
14807 1998-07-21  Per Bothner  <bothner@cygnus.com>
14808
14809         * constants.c (find_name_and_type_constant, find_fieldref_index,
14810         find_methodref_index):  New methods.
14811         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
14812         just return given method.  Also, rename to build_known_method_ref.
14813         (expand_invoke):  Rename call to build_invoke_non_interface.
14814         * java-tree.h, parse.h:  Update prototype.
14815         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
14816         (such as expand_expr_stmt) if flag_emit_class_files.
14817         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14818         STACK_TARGET, IGNORE_TARGET):  New macros.
14819         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
14820         (generate_bytecode_insn):  New function to generate method's bytecode.
14821         (generate_classfile):  Node generate Code attribute for a method.
14822         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14823         push_long_const, field_op, adjust_typed_op, maybe_wide):
14824         New functions used by generate_bytecode_insn.
14825
14826         * typeck.c (signature_include_return):  Remove variable.
14827         (push_java_argument_signature, build_java_argument_signature):  New.
14828         (build_java_signature):  Use push_java_argument_signature.
14829         * parse.y:  Use build_java_argument_signature instead of fiddling
14830         with signature_include_return.
14831
14832 1998-07-17  Tom Tromey  <tromey@cygnus.com>
14833
14834         * gjavah.c (print_c_decl): Always generate JArray<>* for array
14835         types.
14836
14837         * Makefile.in (all.indirect): Added gjavah$(exeext).
14838         (gjavah$(exeext)): Added $(exeext).
14839         (clean): Likewise.
14840
14841 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14842
14843         * class.c (layout_class): Call to java_layout_parsed_class replace
14844         by safe_layout_class.
14845         * expr.c (build_java_array_length_access): Removed static storage
14846         class in the function definition.
14847         (build_java_arraynull_check): Likewise.
14848         Also fixed typos in two comments.
14849         * lex.c (java_init_lex): Initialize static global kw_length.
14850         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14851         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14852         java_lex_error.
14853         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14854         * parse.h (resolve_no_layout): New static function declaration.
14855         (get_identifier_in_static): Declaration removed.
14856         (java_layout_parsed_class): Function name declaration changed to
14857         safe_layout_class.
14858         (build_newarray_node, patch_newarray, resolve_type_during_patch,
14859         not_initialized_as_it_should_p, build_this): New static function
14860         declarations.
14861         (pushdecl_force_head, build_java_binop, int_fits_type_p,
14862         binary_numeric_promotion, stabilize_reference,
14863         build_decl_no_layout, build_java_arrayaccess): Extern function
14864         declarations moved into their own section.
14865         (build_newarray, build_anewarray, build_java_array_length_access,
14866         build_java_arraynull_check): New extern function declarations.
14867         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14868         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14869         fake tree codes.
14870         (CALL_CONSTRUCTOR_P): New macro.
14871         * parse.y (kw_length): New static global tree node.
14872         (return_statement): Tagged <node>.
14873         (RETURN_TK): Tagged <operator>.
14874         (variable_declarator_id:): Build variable declaration with an
14875         empty initialization value if a syntax error was found in the
14876         initialization part of the variable declaration.
14877         (statement_without_trailing_substatement:): return_statement: now
14878         uses the default rule.
14879         (return_statement:): Temporarily fixed to return NULL_TREE.
14880         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14881         (class_instance_creation_expression:): Class creation rules now
14882         call build_method_invocation upon reduction.
14883         (array_creation_expression:): Rules call build_newarray_node upon
14884         reduction.
14885         (dim_exprs:): Build a list of dimension expressions.
14886         (dim_expr:): Store location of the OSB_TK in the dimension
14887         expression node.
14888         (method_invocation:): Added a new error rule.
14889         (build_unresolved_array_type): WFL argument may also be an array
14890         on a primitive type. Name of the argument changed to reflect this.
14891         (method_declarator): Insert argument type at the beginning of the
14892         argument type list and later reverse the list.
14893         (unresolved_type_p): Argument 'returned' may be optionally
14894         NULL_TREE.
14895         (java_layout_class_from_source): Function renamed
14896         safe_layout_class.
14897         (resolve_and_layout): Now call resolve_no_layout and
14898         safe_layout_class.
14899         (resolve_no_layout): New function.
14900         (purify_type_name): New function.
14901         (complete_class_report_errors): Call purify_type_name during error
14902         report on a type not found.
14903         (process_imports): error_found local variable doesn't need to be
14904         initialized to zero.
14905         (declare_local_variables): New local type_wfl. Fixed typo in error
14906         message. type_wfl assigned to unresolved type and used to register
14907         incomplete type. Build a WFL around the variable initialization
14908         statement so that debug info can be generated on it.
14909         (source_start_java_method): Reverse argument list after they've
14910         been processed.
14911         (current_this): New static global variable.
14912         (java_complete_expand_methods): Set current_this when appropriate.
14913         (resolve_expression_name): Build correct static and non static
14914         field access bearing a simple name.
14915         (resolve_field_access): Resolve the length field of arrays. Handle
14916         f.m() cases.
14917         (patch_method_invocation_stmt): Set the type of the method
14918         invocation to error_mark_node. This value is later overridden by a
14919         valid type, if any. Don't handle qualified constructor invocation
14920         as qualified method invocation. Call lookup_method_invoke with its
14921         new flag. It's no longer necessary to access the selected method
14922         as the value of a tree list. Handle constructor invocation.
14923         (patch_invoke): Reverse argument list when invoking non interface
14924         methods. Insert call to new as the first argument of the
14925         constructor.
14926         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14927         defined within a final class. Return INVOKE_STATIC if the invoked
14928         method is a constructor.
14929         (lookup_method_invoke): New lc argument is a flag to indicate a
14930         constructor lookup. Now handle constructor lookup. Choose the most
14931         specific method in case several were matching the invocation
14932         requirements. Return a method decl instead of a tree list featuring
14933         one single method decl element.
14934         (refine_accessible_methods_list): New lc flag argument to
14935         indicate that a constructor is being looked up.
14936         (not_initialized_as_it_should_p): New function.
14937         (java_complete_tree): Now process fake tree codes
14938         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14939         save_expr on resolved function call arguments. Case on
14940         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14941         (patch_assignment): LHS can be a field access expression. When
14942         dealing with reference, lhs_type is the promoted type of the
14943         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14944         applicable.
14945         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14946         (patch_binop): Use not_initialized_as_it_should_p where
14947         applicable.
14948         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14949         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14950         where applicable.
14951         (resolve_type_during_patch): New function.
14952         (patch_cast): Call resolve_type_during_patch to resolve type and
14953         report error accordingly.
14954         (patch_array_ref): Use not_initialized_as_it_should_p where
14955         applicable. Array base expression is saved before being
14956         used. Promote the type of an array elements if it contains non
14957         builtin types.
14958         (build_newarray_node, patch_newarray, build_this): New functions.
14959
14960 1998-07-16  Tom Tromey  <tromey@cygnus.com>
14961
14962         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14963         increment it in `for' statement.
14964         (print_field_info): If number is inf or nan, don't print it.
14965         (print_method_info): If method name is `delete', just ignore it.
14966         (print_c_decl): Special-case jstringArray.
14967
14968         * gjavah.c (help): New function.
14969         (no_argument): New function.
14970         (usage): Changed text.
14971         (main): Rewrote argument handling.  Now handles -v, --help,
14972         --version.
14973         (version): New function.
14974         (found_error): New global.
14975         (main): Return found_error.
14976         (generate_access): Set found_error.
14977         (print_c_decl): Likewise.
14978
14979 1998-07-15  Tom Tromey  <tromey@cygnus.com>
14980
14981         * gjavah.c (print_c_decl): Don't print "," when examining field.
14982         Skip type name when looking at "[L" types.
14983         (process_file): Now static.
14984         (generate_access): Now returns int.
14985         (last_access_generated): New global.
14986         (process_file): Clear last_access_generated; make multiple passes
14987         over the class.
14988         (print_field_info): Just return if generate_access returns true.
14989         (print_method_info): Likewise.  Also, allow <init> functions to
14990         pass through.
14991         (print_c_decl): Added is_init argument.  Print constructors
14992         properly.
14993         (print_cxx_classname): Use UTF8_GET to extract characters from
14994         string.
14995         (print_base_classname): New function.
14996         (print_class_decls): New function.
14997         (process_file): Use it.
14998         (utf8_cmp): New function.
14999
15000 1998-07-13  Nick Clifton  <nickc@cygnus.com>
15001
15002         * lang-options.h: Format changed to match changes in gcc/toplev.c
15003         to implement a --help option.
15004
15005 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
15006
15007         * decl.c (init_decl_processing): Revert change to dtable_type.
15008
15009 1998-07-09  Per Bothner  <bothner@cygnus.com>
15010
15011         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
15012
15013 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
15014
15015         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
15016
15017         * lang.c (lang_init): Default flag_exceptions to 1, without
15018         checking to see if it's 2 first.
15019
15020 1998-07-08  Jeffrey A Law  (law@cygnus.com)
15021
15022         * constants.c: Include "system.h".
15023         * decl.c: Likewise.
15024         * lang.c (flag_new_exceptions): Get via extern now.
15025         (lang_init_options): New functions.  Turn on flag_new_exceptions.
15026
15027 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15028
15029         * lex.c (java_lex): Return 0 when we see an invalid character in
15030         the input.
15031
15032         * lex.c (java_read_char): Specify extra argument when calling
15033         java_lex_error.
15034         (java_read_unicode, java_parse_end_comment,
15035         java_parse_escape_sequence): Likewise,
15036         (java_lex): Specify extra argument when calling
15037         java_lex_error. Test that IDs are beginning with a legal character
15038         for IDs. Handle invalid characters with an error message and a
15039         call to java_lex_error.
15040         (java_lex_error): Adjust column position by new argument
15041         `forward'. Issue an error even if in the middle of reporting an
15042         other error.
15043
15044 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
15045
15046         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
15047         we don't explicitly put a null pointer when we're copying it.
15048
15049 1998-07-07  Tom Tromey  <tromey@cygnus.com>
15050
15051         * gjavah.c (print_cxx_classname): New function.
15052         (super_class_name): Likewise.
15053         (print_super_fields): Removed.
15054         (in_super): Removed.
15055         (print_field_info): Never generate #defines.
15056         (print_c_decl): Changed generated types to match JNI.  No longer
15057         print class name before method name.
15058         (print_method_info): Print "static" before static methods.
15059         Print "virtual" before non-final methods.
15060         (usage): Use exit(1), not exit(-1).
15061         (main): Likewise.
15062         (print_field_info): Use %.17g to print a double.
15063         (last_access): New globals.
15064         (process_file): Initialize last_access.
15065         (usage): Now static.
15066         (ACC_VISIBILITY): New define.
15067         (generate_access): New function.
15068         (print_field_info): Call it.
15069         (print_method_info): Likewise.  Also, generate information for all
15070         methods, not just native methods.  Return void.
15071         (print_c_decl): Return void.
15072         (print_field_info): Return void.
15073
15074 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15075
15076         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
15077         processing the jc1 grammar file. Prefix bison functions and
15078         variables with java_.
15079         (parse.c): Dependencies on parse.h and lex.h
15080         * expr.c (build_java_arrayaccess): Function now global.
15081         * java-tree.h: Comment reorganized to carry on previous
15082         classification effort.
15083         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
15084         RESOLVE_TYPE_NAME_P): New flags on WFLs.
15085         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
15086         java_parse (new prefix java_ generated by bison).
15087         (java_layout_parsed_class, java_register_parsed_class): Function
15088         call removed.
15089         (yyparse): Removed unnecessary call to init_outgoing_cpool.
15090         * lex.c (static tree wfl_op): Variable deleted.
15091         (java_init_lex): Initialize kw_super and kw_this. Initialize more
15092         ctxp fields to NULL_TREE.
15093         (java_lex): No longer create WFL for operators. Filename caching
15094         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
15095         created as STRING_CST and later expanded. Removed extra argument
15096         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
15097         and SUPER.
15098         (build_wfl_node): Removed code in comments.
15099         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
15100         store token and location data in the current bison token.
15101         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
15102         static/extern function declaration at the beginning of the file.
15103         (struct qualification): Data structure definition deleted.
15104         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
15105         (qualify_ambiguous_name): Function declaration modified. Function
15106         now returns nothing.
15107         (build_array_ref, patch_array_ref, make_qualified_name,
15108         resolve_qualified_expression_name, maybe_generate_clinit,
15109         resolve_field_access): New static function declarations.
15110         (build_java_arrayaccess): New extern function declaration.
15111         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
15112         (CALL_EXPR_PRIMARY): Macro deleted.
15113         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
15114         (struct parser_ctxt): Field initialized_final
15115         removed. non_static_initialized, static_initialized: New fields.
15116         * parse.y (static tree kw_super, static tree kw_this): New global
15117         static.
15118         (%union): tree wfl field of operator member replaced by int
15119         location. WFLs are non longer created for operators.
15120         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
15121         (qualified_name:): Now calls make_qualified_name to build the
15122         identifier.
15123         (type_declaration:): Consider generating <clinit> when class
15124         parsing completed.
15125         (variable_declarator:): Directly build an assignment node when the
15126         variable is initialized when declared.
15127         (this_or_super:): Build a WFL and set current location when THIS
15128         or SUPER are parsed.
15129         (expression_statement:): Wrap statement around a WFL.
15130         (primary_no_new_array:): Fixed typo. Changed value returned by
15131         THIS_TK because of its new type (temporary).
15132         (dim_exprs:): Temporary fix because of OSB_TK's new type.
15133         (field_access:): Build qualified name with SUPER.
15134         (method_invocation:): Fixed returned value because of SUPER's new
15135         type.
15136         (array_access:): Use OSB_TK location information.
15137         (post_increment_expression:, post_decrement_expression:,
15138         unary_expression:, pre_increment_expression:,
15139         pre_decrement_expression:, unary_expression_not_plus_minus:,
15140         cast_expression:, multiplicative_expression:,
15141         additive_expression:, shift_expression:, relational_expression:,
15142         equality_expression:, and_expression:, exclusive_or_expression:,
15143         inclusive_or_expression:, conditional_and_expression:,
15144         conditional_or_expression:, assignment:): Use new location/token
15145         information available on operators.
15146         (create_class): Set super_decl_type to NULL_TREE when processing
15147         java.lang.Object.
15148         (register_fields): Field initialization is now a MODIFY_EXPR
15149         node. Chain initialization code to the matching lists (according
15150         to the field declaration modifiers).
15151         (maybe_generate_clinit): New function.
15152         (method_header): Don't set method's DECL_NAME to a WFL when adding
15153         methods to java.lang.Object.
15154         (resolve_and_layout): Now can return NULL_TREE if the type
15155         resolution fails. Otherwise, return the class DECL instead of its
15156         TYPE.
15157         (check_method_redefinition): Don't patch method DECL_NAME if it
15158         belongs to java.lang.Object.
15159         (process_imports): Simply assign error_found to the value returned
15160         by check_pkg_class_access.
15161         (declare_local_variables): Don't use their init statements (if
15162         any) when parsing error were previously found. Reuse MODIFY_EXPR
15163         build during parsing as an init statement.
15164         (java_method_add_stmt): Now return the current method body.
15165         (java_layout_parsed_class, java_register_parsed_class): Functions
15166         removed.
15167         (java_complete_expand_methods): Initialize the constant pool on a
15168         per class basis. Layout the classes before expanding their method
15169         bodies. Don't try expand artificial constructor code if error were
15170         found. Make the classes data and register them if no error were
15171         found.
15172         (java_complete_expand_method): Retrieve an artificial constructor
15173         argument list before entering its body. Assign the top block to
15174         the artificial constructor function body and set types of declared
15175         blocks and compound statements to void. Walk method body if not an
15176         artificial constructor.
15177         (make_qualified_name, cut_identifier_in_qualified): New functions.
15178         (resolve_expression_name): Fixed comments. Save/restore the
15179         current class CLASS_LOADED_P flag value. Build non qualified
15180         static field access and handle qualified expression names.
15181         (resolve_field_access, resolve_qualified_expression_name): New
15182         functions.
15183         (patch_method_invocation_stmt): Use the new expression resolution
15184         scheme, calling resolve_field_access when the function call is
15185         resolved as an expression.
15186         (qualify_ambiguous_name): Function rewritten to work on qualified
15187         expression produced by make_qualified_name.
15188         (java_complete_tree): Promote type when function's argument are
15189         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
15190         the assignment to discover further errors if RHS is a expression
15191         name that fails to evaluate. Declare LHS initialized even though
15192         the assignment failed. Don't use the location variable and removed
15193         extra argument in patch function calls. Now handle the ARRAY_REF
15194         case and build internal string representation when STRING_CSTs are
15195         walked.
15196         (build_method_invocation): Don't wrap function call around a WFL.
15197         (build_assignment): Likewise. Use the operator location
15198         information.
15199         (patch_assignment): Handle array access LHSs. Handle error
15200         provenance, resulting in a better error report.
15201         (build_binop): Use op_location from operator as binop location
15202         information.
15203         (build_unaryop, build_incdec, build_cast): Likewise.
15204         (patch_binop): Extract location information from the node. Fixed
15205         typo in error message.
15206         (patch_unary_op): Extract location information from the node.
15207         (build_array_ref, patch_array_ref): New functions.
15208
15209 1998-07-01  Tom Tromey  <tromey@cygnus.com>
15210
15211         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
15212         match _Jv_IsInstanceOf.
15213         * decl.c (init_decl_processing): Use _Jv_NewArray, not
15214         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
15215
15216 1998-06-30  Tom Tromey  <tromey@cygnus.com>
15217
15218         * decl.c (init_decl_processing): Functions are now named
15219         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
15220
15221 1998-06-29  Per Bothner  <bothner@cygnus.com>
15222
15223         * java-tree.h (load_class):  Add prototype.
15224         * class.c (is_compiled_class):  Add missing arg to load_class.
15225         * expr.c (expand_java_NEW):  Call load_class.
15226         * parse.y (process_import):  Removed bogus use of void return value.
15227
15228 1998-06-25  Per Bothner  <bothner@cygnus.com>
15229
15230         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
15231         Function name is "_Jv_Throw" instead of "soft_athrow".
15232         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
15233         Function name is "_Jv_AllocObject" instead of "soft_new".
15234         Takes an extra parameter (object size).
15235         * expr.c:  Update calls.
15236
15237 1998-06-24  Per Bothner  <bothner@cygnus.com>
15238
15239         * lex.c (java_get_line_col):  Handle end-of-file.
15240         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
15241
15242 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
15243
15244         * lang.c (lang_init): Make -fexceptions the default.
15245         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
15246         exception handling is not turned on.
15247
15248 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
15249
15250         * lang.c (flag_new_exceptions): Make this this default.
15251         * decl.c (end_java_method): Call emit_handlers.
15252         * except.c (method_init_exceptions): Set language code and version.
15253         (expand_start_java_handler): Enable exception, and call
15254         expand_eh_region_start.
15255         (expand_end_java_handler): Enable exception, and set up catch blocks.
15256         (emit_handlers): New routine to generate the saved handlers.
15257         * java-except.h (emit_handlers): Add prototype.
15258
15259 1998-06-12  Per Bothner  <bothner@cygnus.com>
15260
15261         We used to have three different representations of the constant pool:
15262         the CPool structure, the tree_constant_pool, and the constructures
15263         used to build the Class object (which may need class and string
15264         constants) in compiled code.  None were appropriate for compiling
15265         to .class files, so I did a major overhaul.
15266
15267         First, the tree_constant_pool array was removed.  Things were
15268         modified to the CPool structure in the JCF could be used.
15269         Second, a "capacity" field was added to the CPool, and functions
15270         written to search for a matching constant, adding one if not found.
15271         The code that generated the Class object was changed to use a CPool.
15272         The actual TREE_LISTs used to build the CONSTRUCTORs used for
15273         the static Class object are now only in build_constants_constructor.
15274         Finally, I wrote code which can generate a .class file (including its
15275         constant pool) from the RECORD_TYPE of a class.  This is a big step
15276         on the way to compiling Java source into .class files.
15277
15278         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
15279         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
15280
15281         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
15282         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
15283         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
15284         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
15285         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
15286         (lang_type):  Removed constant_pool field.
15287         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
15288         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
15289         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
15290         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
15291
15292         * constants.c (current_constant_pool_tags, current_constant_pool_data,
15293         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
15294         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
15295         (set_constant_entry, find_constant1, find_constant2,
15296         find_class_constant, count_constant_pool_bytes, write_constant_pool,
15297         find_utf8_constant, find_class_or_string_constant):  New functions.
15298
15299         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
15300         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
15301         (give_name_to_class, get_class_constant):  Likewise.
15302         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
15303         (get_name_and_type_constant, get_ref_constant):  Removed.
15304         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
15305         * parse.y:  Don't save/restore tree_constant_pool.
15306         * verify.c (verify_jvm_instructions):  Update for new approach.
15307         * expr.c (expand_invoke, expand_java_field_op): Likewise.
15308
15309         * lang-options.h:  Added -femit-class-file, -femit-class-files.
15310         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
15311         (lang_f_options):  Added "emit-class-file(s)".
15312
15313         * expr.c (build_java_arrayaccess):  Generate more efficient array
15314         bounds checking, by using unsigned compare.
15315
15316         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
15317
15318 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15319
15320         * parse.h: New comment on the handling of unresolved type
15321         identifiers. JDEPs are now part of the jdep_code enum.
15322         (typedef struct jdep): Now use enum jdep_code or int, depending on
15323         availability. Both are narrowed down to an 8 bits bitfield.
15324         (CALL_EXPR_PRIMARY): Fixed comment.
15325
15326 1998-06-10  Tom Tromey  <tromey@cygnus.com>
15327
15328         * Make-lang.in (java): Added gjavac and jvgenmain.
15329         (java.start.encap): Depend on gjavac.
15330         (java.rest.encap): Depend on jvgenmain.
15331
15332         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15333         (JAVA_CROSS_NAME): Likewise.
15334         (java.all.build): Depend on jvgenmain and gjavac.
15335         (java.all.cross): Depend on jvgenmain and gjavac-cross.
15336         (jvgenmain$(exeext)): New target.
15337         (java.install-common): Wrote.
15338         * config-lang.in (compilers, stagestuff): Added gjavac and
15339         jvgenmain.
15340
15341 1998-06-10  Dave Brolley  <brolley@cygnus.com>
15342
15343         * lang.c (lang_decode_option): New argc/argv interface.
15344
15345 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15346
15347         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15348         * decl.c (build_decl_no_layout): New function.
15349         * expr.c (java_lang_expand_expr): Layout declarations found in
15350         blocks before they're pushed.
15351         * jcf-parse.c (load_class): Save current line when parsing class
15352         file.
15353         (parse_source_file): Register class before expanding their
15354         methods.
15355         * lang.c (put_decl_node): Produce `null' when `void *' is
15356         processed.
15357         * lex.c (static tree wfl_op): New static global, for error report
15358         on casts.
15359         (java_init_lex): wfl_operator and wfl_op initialized
15360         here. Filename caching added for wfl_op. Return wfl_op when `(' is
15361         parsed.
15362         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15363         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15364         build_unresolved_array_type): New static function definitions.
15365         (build_decl_no_layout): New extern function declared.
15366         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15367         faulty modifier exists.
15368         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15369         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15370         (UNARY_PLUS_EXPR): New fake operator.
15371         (struct parser_ctxt): New field osb_number.
15372         * parse.y (static tree wfl_operator): New static WFL for operator
15373         bound error messages.
15374         (DECR_TK, INCR_TK): Moved.
15375         (OP_TK): Tagged <operator>.
15376         (array_type:): Now call build_unresolved_array_type.
15377         (dim_expr:): Count the number of '[' seen.
15378         (post_increment_expression, post_decrement_expression,
15379         pre_increment_expression, pre_decrement_expression,
15380         unary_expression_not_plus_minus, unary_expression:): Actions are
15381         now building the corresponding unary expressions.
15382         (cast_expression:): Actions are now building cast expressions.
15383         (build_unresolved_array_type): New function.
15384         (create_interface): Reset the number of declared interfaces.
15385         (create_class): Likewise.
15386         (method_header): Methods declared within the scope of an interface
15387         are now implicitly set public and abstract.
15388         (java_complete_class): Variable's and parameter's type are patched
15389         with a promoted type.
15390         (declare_local_variables): Resolved non builtin types are promoted
15391         before being used to build a variable decl. Removed type patch
15392         posted on variable initialization statement.
15393         (source_start_java_method): Use build_decl_no_layout to build the
15394         decl of a parameter of incomplete type.
15395         (java_register_parsed_class): Process interfaces too. Call
15396         rest_of_decl_compilation on each processed class declarations.
15397         (java_complete_expand_methods): Don't attempt to expand things in
15398         interfaces.
15399         (java_complete_tree): Process CONVERT_EXPR, even though it always
15400         has a type. Propagate error_mark_node to node's type too. Promote
15401         method's call argument type and return error_mark_node if
15402         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15403         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15404         handle unary operator nodes.
15405         (build_assignment): Added comment.
15406         (print_int_node): New function.
15407         (patch_assignment): New second argument. New error handling. Use
15408         print_int_node. Handle references. Use can_cast_to_p to issue
15409         different error message according to the context and check upon
15410         the initialization of the RHS.
15411         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15412         (operator_string): Handle more operators.
15413         (patch_binop): No longer use a function static
15414         wfl_operator. Improved error message on shift distance.
15415         (build_unaryop, build_incdec, build_cast, patch_unaryop,
15416         patch_cast): New functions.
15417
15418 1998-06-05  Per Bothner  <bothner@cygnus.com>
15419
15420         * jvspec.c:  New file.
15421         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
15422
15423         * java-tree.h (identifier_subst):  Add declaration.
15424
15425 1998-06-04  Tom Tromey  <tromey@cygnus.com>
15426
15427         * jvgenmain.c (main): Generate call to JvRunMain.
15428
15429         * class.c (make_class_data): Push value for "sync_info" field.
15430         * decl.c (init_decl_processing): Push "sync_info" field.
15431
15432 1998-06-03  Per Bothner  <bothner@cygnus.com>
15433
15434         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
15435         Java (source) name, not signature.
15436         Set TYPE_ALIGN to (at least) that of element_type.
15437
15438 1998-06-02  Per Bothner  <bothner@cygnus.com>
15439
15440         * class.c:  Moved classname-mangling-rekated code to ...
15441         * mangle.c:  ... this new file.
15442         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
15443         * Makefile.in:  Update for above changes.
15444
15445 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15446
15447         * expr.c (truthvalue_conversion): Convert integer and floating
15448         point value to their truth value.
15449         * lex.c (java_lex): Handle the `null' literal.
15450         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15451         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15452         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15453         New macros.
15454
15455         * parse.y: Reorganization/documentation on token declaration.
15456         (binop_lookup[]): New added new tree codes.
15457         (relational_expression): Build corresponding binary operators.
15458         (equality_expression, conditional_and_expression,
15459         conditional_or_expression): Likewise.
15460         (java_complete_class): Fix crash in debug message.
15461         (java_complete_tree): Check initialization of method call
15462         arguments. Further bogus node evaluation to detect more error
15463         during assignments. Handles more binary operators.
15464         (patch_assignment): Use DECL_P.
15465         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15466         code.
15467         (operator_string): Handle more case. Compacted source.
15468         (patch_binop): Changed function comment. Checking for
15469         uninitialized first operand takes the compound assignment into
15470         account and uses DECL_P. Checking for uninitialized second operand
15471         delayed to routine's end. Use macros to issue type bound error
15472         messages and issue messages on both operands if their types are
15473         different. Force fixed type into node. Handle all binary
15474         operators.
15475
15476 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15477
15478         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15479         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15480         build operator node and return tokens.
15481         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15482         * parse.h (java_complete_tree): Changed returned type in prototype.
15483         (build_method_invocation, build_assignment, patch_assignment,
15484         patch_binop): New static function declarations.
15485         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15486         BUILD_EXPR_WFL): New macros.
15487         * parse.y (enum tree_code binop_lookup[]): New static for token to
15488         TREE_CODE lookup.
15489         (%union): Parser union has new sub-structure `operator'.
15490         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15491         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15492         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15493         ASSIGN_ANY_TK): Tokens tagged `operator'.
15494         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15495         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15496         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15497         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15498         (assignment_operator:): Rule tagged `operator'.
15499         (expression_statement:): Re-installed default rule.
15500         (method_invocation:): Sub rules call build_method_invocation.
15501         (postfix_expression:): Don't attempt to resolve name here. Just
15502         return an ID.
15503         (multiplicative_expression:): Sub-rules build corresponding binop
15504         expression node.
15505         (additive_expression:, shift_expression:, and_expression:,
15506         exclusive_or_expression:, inclusive_or_expression:): Likewise.
15507         (assignment:): Sub rule invoke build_assignment.
15508         (assignment_operator:): Default rules on sub rules.
15509         (force_error): Added documentation on this variable.
15510         (declare_local_variables): Build initialization calling
15511         build_assignment.
15512         (expand_start_java_method): Removed unused rtx declaration. Mark
15513         arguments as already initialized.
15514         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15515         (java_complete_expand_methods): Don't process next method if
15516         completion of the previous one triggered errors.
15517         (java_complete_expand_method): Call source_end_java_method if no
15518         error were found during completion.
15519         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15520         locals declaratilon. Handle names found within a class. Return
15521         error_mark_node when things aren't found.
15522         (patch_method_invocation_stmt): Return error_mark_node on failures.
15523         (patch_invoke): Removed unused local. Return the correct node.
15524         (java_complete_tree): Now returns a value. The BLOCK section binds
15525         local identifiers and the type of a BLOCK is now void. Assign the
15526         result of operand completion on COMPOUND_EXPR. Assign the
15527         encapsulated node of a WFL to the result of its completion, except
15528         when the node is an identifier. Now handle MODIFY_EXPR and several
15529         binary operators. Return error_mark_node on errors.
15530         (build_method_invocation, build_assignment, patch_assignment,
15531         build_binop, operator_string, patch_binop): New functions.
15532         * typeck.c (binary_numeric_promotion): New function.
15533
15534 1998-05-21  Per Bothner  <bothner@cygnus.com>
15535
15536         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
15537         Replace most uses of ident_subst by identifier_subst.
15538
15539         * class.c (push_class_static_dummy_field):  Removed function.
15540         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
15541         instead of looking got "class" static field.  Create that decl here.
15542         (class_identifier_node):  Removed;  no longer needed.
15543         (init_class_processing):  Don't init class_identifier_node.
15544         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
15545         Do nreverse 0 times (instead of twice) for Object and Class.
15546         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15547
15548 1998-05-20  Per Bothner  <bothner@cygnus.com>
15549
15550         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
15551         while initializing linenumber_count and linenumber_table.
15552         Do it before init_function_start (which calls emit_line_note).
15553         * expr.c (expand_byte_code):  Don't need to clear lineno here.
15554
15555 1998-05-18  Tom Tromey  <tromey@cygnus.com>
15556
15557         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15558         then mangle number as _N_.
15559
15560         * class.c (mangle_class_field): New function.
15561         (build_class_ref): Set assembler name of class reference using
15562         mangle_class_field.
15563         (push_class_static_dummy_field): Likewise.
15564
15565 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
15566
15567         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15568         of assigning to TREE_CODE.  The latter method exploits a feature
15569         of GCC that is not ANSI compliant.
15570
15571 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15572
15573         * decl.c (pushdecl_force_head): New function.
15574         (pushlevel): Removed conditional printf.
15575         (complete_start_java_method): Don't enter local variable scope if
15576         function is compiled from source code.
15577         * expr.c: parse.h now included
15578         (java_lang_expand_expr): New function.
15579         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15580         printf. Terminate buffer when doing directories.
15581         * jcf-parse.c (parse_source_file): Call lang_init_source before
15582         parsing and before code generation.
15583         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15584         use printf if the macro is defined.
15585         * lang.c (lang_init): Install lang_expand_expr hook on
15586         java_lang_expand_expr.
15587         (java_dummy_print): New function.
15588         (lang_init_source): New function.
15589         * lex.c (java_lex): Remember location of an opening brace at the
15590         second nesting level.
15591         (java_is_eol): Unget character seen after a CR if it is EOF.
15592         * parse.h: Now includes lex.h
15593         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15594         printf if the macro is defined.
15595         (expand_start_java_method, build_expr_block, enter_block,
15596         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15597         New static function declarations.
15598         (pushdecl_force_head): New extern function declaration.
15599         (INCOMPLETE_TYPE_P): New macro.
15600         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15601         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15602         BLOCK_EXPR_ORIGIN): New macros.
15603         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15604         DECL_SOURCE_LINE_LAST): New macros.
15605         (struct parser_ctxt): Removed field current_method_decl, redundant
15606         with the field current_function_decl. Added fields
15607         first_ccb_indent1 and pending_block.
15608         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15609         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15610         tagged <node>
15611         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15612         (compilation_unit:): Cosmetic on sub rule.
15613         (type_declaration:): Cosmetic on sub rules. Added an error rule.
15614         (variable_initializer:): Installed default rule on expression:.
15615         (method_declaration:): method_header: starts a new
15616         method. method_body: installs the function body, absorbs blocks
15617         emitted for temporary variable scopings, pops function's body block
15618         and merges function's last statement lineno in DECL_SOURCE_LINE.
15619         (method_body:): Installed default rules.
15620         (block:): Call enter_block when an opening brace is seen.  Absorb
15621         scoping blocks and call exit_block when a closing brace is seen.
15622         (block_statement:): Cosmetic changes.
15623         (method_invocation:): Create WFL around CALL_EXPR node.
15624         (patch_stage): Added comment around definition.
15625         (method_header): Try to use first_ccb_indent1 as the first line of
15626         the method, so BP debug info are emitted at the first opening
15627         brace of the function. If the function has no body, use the
15628         location of the function's name. Override currently defined method
15629         name with the matching WFL so we can point redefinition errors
15630         using the location where the function's name was declared.
15631         (check_abstract_method_header): Interprets DECL_NAME as an
15632         identifier or as a WFL, accordingly.
15633         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15634         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15635         location and name information out of it and reinstall DECL_NAME to
15636         its original identifier node value.
15637         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15638         function's source code).
15639         (read_import_dir): Test the value returned by find_class and issue
15640         a fatal accordingly.
15641         (declare_local_variables): Push a new block for the scope of the
15642         new variable(s) if code has been already generated at that nesting
15643         level. Pinpoint redefinition errors using the variable id
15644         WFLs. Generate initialization code if necessary. If the variable
15645         type is incomplete, register a patch on its decl.
15646         (source_start_java_method): Rewritten. Define a new block for the
15647         function's parameters. Build parameter decl out of function's
15648         arguments and register them for a patch if their types are
15649         incomplete.
15650         (expand_start_java_method): Includes the part of
15651         source_start_java_method that was pushing the parameter decls and
15652         completing the method start code.
15653         (source_end_java_method): Removed call the expand_end_bindings and
15654         poplevel (already taken care of). Reinstall function's arguments
15655         and get function's last line of code before calling
15656         expand_function_end.
15657         (java_method_add_stmt): New comment before the function's
15658         code. Complement the second operand of the current COMPOUND_EXPR
15659         if necessary.
15660         (java_complete_expand_methods): Don't generate debug info on line
15661         zero when expanding a generated constructor.
15662         (java_complete_expand_method): Set start and end line numbers for
15663         a artificially generated constructor to one and manually call
15664         enter_block and exit_block when defining it. For all methods:
15665         expand function's start calling the new expand_start_java_method
15666         and invoke java_complete_tree on the effective method's body, if
15667         any.
15668         (resolve_expression_name): Now use lookup_name_in_blocks to search
15669         local variable decls and print out an error when variables are
15670         undefined.
15671         (patch_method_invocation_stmt): Inserted comment before the
15672         function's code.
15673         (lookup_method_invoke): Chain method's arguments using chainon
15674         with the current arg list as a second argument. Inserted missing
15675         IDENTIFIER_POINTER when reporting an error on methods not found.
15676         (refine_accessible_methods_list): Don't retain constructors.
15677         (patch_arguments): Function removed.
15678         (java_complete_tree): Inserted comment before the function's
15679         code. New case for BLOCKs. Moved the WFL case a bit
15680         further. Complete function's arguments.
15681         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15682         maybe_absorb_scoping_blocks): New functions.
15683
15684 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15685
15686         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15687         previously set.
15688         * jcf-parse.c (parse_source_file, java_error_count): New forward
15689         and extern declarations.
15690         (java_parse_abort_on_error): Macro moved.
15691         (jcf_parse_source): fatal called if fopen fails. Now calls
15692         parse_source_file.
15693         (parse_source_file): New parse_only parameter. Reflects the
15694         elimination of the second pass.
15695         (yyparse): parse_source_file called with argument set to 0.
15696         * jcf.h (JCF_ZERO): Sets java_source to zero.
15697         * lex.c (java_init_lex): pass argument is gone. Function modified
15698         to be called once during the analysis of a file.
15699         (java_unget_unicode): Fixed typo in fatal message.
15700         (java_get_line_col): Likewise.
15701         (java_lval): Likewise. String literals no longer built during
15702         second pass.
15703         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15704         account.
15705         * parse.h (MODIFIER_WFL): New macro.
15706         (parse_check_super, parser_check_super_interface): Now return int.
15707         (parser_chain_incomplete_item, not_builtin_p,
15708         complete_method_decl): Declarations removed.
15709         (build_method_invocation_stmt, build_invoke): Renamed using the
15710         `patch' instead of `build'
15711         (register-incomplete_type, obtain_incomplete_type,
15712         java_complete_tree, java_complete_expand_method,
15713         unresolved_type_p, create_jdep_list): New function declarations.
15714         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15715         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15716         (jdep): New typedef on new struct _jdep.
15717         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15718         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15719         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15720         JDEP_RESOLVED_P): New macros.
15721         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15722         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15723         JDEP_VARIABLE): New enum values and jdep kinds.
15724         (jdeplist): New typedef on struct _jdeplist.
15725         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15726         macros.
15727         (CALL_EXPR_PRIMARY): New macro.
15728         (struct parser_ctxt): Fields java_pass, current_method_decl,
15729         method_decl_list deleted. New field jdeplist.
15730         (INCOMPLETE_P): Macro deleted.
15731         * parse.y (single_type_import_declaration:): Removed pass switch.
15732         (type_import_on_demand_declaration): Likewise.
15733         (field_declaration:): Removed pass switch on all sub rules.
15734         (class_declaration:): Call the complete_class_decl removed on
15735         class_body rules.
15736         (method_declaration:): Removed second pass switch. No longer chain
15737         methods decl when method_header reduced.
15738         (method_header:): Sub rules no longer depend on pass switch.
15739         (method_declarator:): Likewise.
15740         (method_body:): Likewise.
15741         (abstract_method_declaration:): Likewise.
15742         (block_statement:): Likewise.
15743         (local_variable_declaration:): Likewise.
15744         (argument_list:): Likewise.
15745         (method_invocation:): Likewise. Call to build_method_invocation_stmt
15746         removed. Partial CLASS_EXPR tree node built instead.
15747         (postfix_expression:): Removed pass switch on all sub rules.
15748         (java_pop_parser_context): Free classd_list content.
15749         (yyerror): Call obstrack_grow0 to finalize error message.
15750         (check_class_interface_creation): Comment modified to reflect new
15751         returned value meaning. Removed second pass switch. Return 1 if an
15752         error was found, 0 otherwise. Adjust pointer on filename if a
15753         leading path separator was found.
15754         (maybe_create_class_interface_decl): Removed first pass switch
15755         when linking the class decl to the class_list. Install a new
15756         jdep_list for the class.
15757         (add_superinterfaces): List of unresolved interfaces is
15758         gone. Unresolved interfaces are directly added to the current
15759         dependencies list.
15760         (create_interface): Second pass shortcut removed.
15761         ctpx->modifier_ctx access through MODIFIER_WFL.
15762         (create_class): Second pass shortcut removed. Call to
15763         register_incomplete_type replaces the call to
15764         parser_chain_incomplete_item.
15765         (complete_class_decl): Function removed.
15766         (duplicate_declaration_error): New way of retrieving redeclared
15767         item type.
15768         (register_fields): Call to lookup_modifier_cl replaced by
15769         MODIFIER_WFL. New way of handling unresolved type, using
15770         unresolved_type_p and obtain_incomplete_type.
15771         register_incomplete_type replaces call to parser_chain_incomplete_item.
15772         (patch_stage): New static global variable.
15773         (method_header): New way of handling unresolved type, using
15774         unresolved_type_p and obtain_incomplete_type. patch_stage used to
15775         indicates that the method decl needs to be patched.
15776         (check_abstract_method_header): Call to lookup_modifier_cl
15777         replaced by MODIFIER_WFL.
15778         (method_declarator): Incomplete argument type are registered
15779         calling register_incomplete_type. Patch on the declared method is
15780         issued in that case.
15781         (unresolved_type_p): New function.
15782         (parser_check_super_interface): New comment to reflect function's
15783         modified returned type (int). Function and has a new argument
15784         this_wfl. Call to parse_error_context uses this_wfl instead of
15785         relying on lookup_cl.
15786         (parser_check_super): Comment reflects function's new returned
15787         type (int). Function returns nonzero value on error.
15788         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15789         register_incomplete_type, jdep_resolve_class): New functions to
15790         handle incomplete types in declarations.
15791         (java_complete_class): Rewritten to work with the new incomplete
15792         type handling scheme.
15793         (complete_class_report_errors): Likewise.
15794         (complete_method_decl): Removed: it jobs is now handled by
15795         java_complete_class.
15796         (do_resolve_class): Class loaded in not already loaded and not
15797         found in Java source code.
15798         (java_check_regular_methods, java_check_abstract_methods): Don't
15799         call complete_method_decl anymore.
15800         (lookup_modifier_cl, not_builtin_p): Functions deleted.
15801         (read_import_dir): Got rid of the pass number dependency.
15802         (declare_local_variables): New handling of unresolved types (patch
15803         issued).
15804         (source_start_java_method): New parameter level. Function called
15805         with level set to 1 when argument types are potentially
15806         unresolved.  Called to complete the job with level set to 2 once
15807         types are complete.
15808         (source_end_java_method): Call to permanent_allocation
15809         removed. Waiting to be replaced by a more suitable obstack
15810         management.
15811         (java_complete_expand_methods, java_complete_expand_method,
15812         java_expand_finals): New functions.
15813         (build_method_invocation_stmt): Renamed
15814         patch_method_invocation_stmt. Extracts function call expression
15815         (wfl) and arguments (args) from CALL_EXPR tree operands.
15816         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15817         call. Patch the function and argument operand of the CALL_EXPR
15818         tree argument.
15819         (patch_argument, java_complete_tree): New functions.
15820
15821 1998-04-20  Per Bothner  <bothner@cygnus.com>
15822
15823         Recover from missing fields and methods (i.e. error instead of fatal).
15824         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
15825         * expr.c (expand_invoke):  Recover from missing method.
15826         (expand_java_field_op):  Recover from missing field.
15827         Inline references to java.lang.{Integer,Char,...}.TYPE.
15828         * typeck.c (get_type_from_signature), java-tree.h:  New function.
15829         * class.c (add_method):  Use get_type_from_signature.
15830         (build_class_ref):  Handle a class that was not found.
15831         * typeck.c (convert):  Handle conversion to pointers (for convenience).
15832         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
15833         instead of lookup_field to handle missing fields.
15834
15835         * jcf-parse.c (process_zip_dir):  Set java_source.
15836
15837 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
15838
15839         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15840
15841 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15842
15843         * jcf-parse.c (load_class): Don't change input_filename before
15844         calling jcf_parse_source (but still do it before calling
15845         jcf_parse).
15846         (jcf_parse_source): Assign input_filename after having saved the
15847         parser context.
15848         * lex.c (java_init_lex): Chain a WFL node to the import on demand
15849         list. ctxp->modifier_ctx zeroed according to its new
15850         definition. ctxp->filename initialized. Removed
15851         JAVA_MODIFIER_CTX_UNMARK.
15852         (java_unget_unicode): Update the character based column position.
15853         (java_allocate_new_line): ref_count not used anymore. Always free
15854         ctxp->p_line. Initialize c_line->char_col to 0.
15855         (java_get_unicode): Update the character based column position.
15856         (java_lex): Use ctxp->elc to store current position in source
15857         file, at the beginning of the parsed token. Set modifier_ctx entry
15858         corresponding to the parse modifier to a WFL node. Return a WFL
15859         node when an identifier is parsed.
15860         (java_lex_error): Now uses ctxp->elc to store current position in
15861         source.
15862         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15863         * lex.h (build_wfl_node): New function definitions.
15864         (struct java_line): ref_count and next fields are gone. New field
15865         char_col.
15866         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15867         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15868         (JAVA_COLUMN_DELTA): New macro.
15869         (java_lc): New typedef on new struct _java_lc.
15870         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15871         (parse_error_context, parse_warning_context): Changed prototypes.
15872         (java_get_line_col): Added as an available global function.
15873         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15874         (IC_DECL): Replaced by macro IC_TYPE
15875         (DEPEND_WFL): New macro.
15876         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15877         wrong modifier.
15878         (exit_java_complete_class): Removed a commented out statement.
15879         (struct parser_ctxt): Added comments on fields. modifier_ctx is
15880         now an array of tree nodes. Deleted fields line_list and
15881         e_line. New field elc, to replace e_line.
15882         * parse.y (array_type:): Build WFL node.
15883         (qualified_name:): Build a single WFL node out of two. Retain
15884         the location information of the first node in the resulting node.
15885         (package_declaration:): Use package name as a WFL node
15886         (single_type_import_declaration:): Use imported name as a WFL node.
15887         (type_import_on_demand_declaration:): Use root of the imported
15888         packages as a WFL node.
15889         (field_declaration:): Removed unused local variable cl.
15890         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15891         (yyerror): New static elc. Removed static error_line, error_pos.
15892         New local code_from_source. Save ctxp->elc into elc at the first
15893         pass. Call java_get_line_col to get a string of the line where
15894         the error occurred.
15895         (debug_line): Removed static function.
15896         (parse_error_context, parse_warning_context): Parameter cl is now
15897         a WFL node. Use its value to initialize ctxp->elc.
15898         (redefinition_error): Parameter cl is now a WFL node.
15899         (parse_add_interface): New parameter wfl. No longer call
15900         lookup_cl, use wfl instead.
15901         (check_class_interface_creation): Parameter cl is now a WFL node.
15902         (maybe_create_class_interface_decl): Likewise.
15903         (add_superinterfaces): New function.
15904         (create_interface): Removed local cl, node, super_decl,
15905         super_decl_type.  Function now uses id as a WFL node. Better
15906         warning/error report on obsolete or forbidden mix of
15907         modifiers. Now calls add_superinterfaces to register interfaces.
15908         (create_class): Removed local cl, node. Local variable id is used
15909         as a WFL node. Better error report on forbidden modifier
15910         mix. Uses add_superinterfaces to register interfaces.
15911         (find_field): Argument cl is now a WFL node. Now store the WFL
15912         node of a fields that needs to be checked for their
15913         initialization.
15914         (method_header): Local variable node non longer used. Local
15915         variable id replaces cl.
15916         (check_modifiers_consistency): Local variable cl is now a WFL
15917         node.
15918         (method_declarator): Local variable cl replaced by parameter id.
15919         (parser_qualified_name): Now uses parameter name as a WFL node.
15920         (parser_check_super_interface): New parameter wfl, for achieve
15921         greater accuracy during error reports.
15922         (parser_chain_incomplete_item): New parameter named location. Used,
15923         along the decl, to construct the incomplete item node.
15924         (java_complete_class): resolve_class now uses WFL node extracted
15925         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15926         where appropriate.
15927         (complete_method_decl): Unresolved function's argument types are WFL.
15928         (resolve_class): Parameter cl is now a WFL node.
15929         (resolve_and_layout): Likewise.
15930         (do_resolve_class): Likewise. Try first to use cl and then do the
15931         lookup on the decl when calling check_pkg_class_access.
15932         (complete_class_report_errors): Use IC_TYPE in place of
15933         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15934         instead of doing a lookup over the decl.
15935         (java_check_final): Use WFL info from field tree list.
15936         (lookup_cl): Rewritten and returns a statically defined WFL node.
15937         (lookup_modifier_cl): Now uses information from WFL nodes.
15938         (process_imports): Likewise.
15939         (read_import_dir): name and cl arguments replaced by a single WFL
15940         node. Function modified accordingly.
15941         (find_in_imports_on_demand): Now uses WFL node.
15942         (check_pkg_class_access): cl argument is now a WFL node.
15943         (declare_local_variables): Fixed to use WFL nodes.
15944         (resolve_expression_name): Likewise.
15945         (build_method_invocation_stmt): name_combo argument renamed
15946         wfl. Function modified to use WFL nodes.
15947         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15948         (lookup_method_invoke): cl is now a WFL node. Added missing
15949         IDENTIFIER_POINTER to class type decl name.
15950
15951 1998-04-14  Dave Brolley  <brolley@cygnus.com>
15952
15953         * lang.c (init_parse): Now returns char* containing the filename.
15954
15955 1998-04-10  Per Bothner  <bothner@cygnus.com>
15956
15957         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
15958
15959         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
15960         * class.c (make_class_data):  If flag_assume_compiled, initial class
15961         state is CSTATE_PREPARED; make superclass and interfaces direct
15962         references, rather than constant pool indexes.
15963
15964 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15965
15966         * parser.y: Include flags.h. Removed debug variable pl.
15967         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15968         (block:): Likewise.
15969         (labeled_statement_nsi:): Generate debug info when reducing
15970         expression_statement:.
15971         (check_pkg_class_access): get_access_flags_from_decl invocation
15972         fixed for new CLASS_* flags location.
15973         (source_end_java_method): Save/restore parser context when
15974         entering/leaving this routine. Restore lineno to its right value
15975         before calling expand_end_bindings.
15976         (build_method_invocation_stmt): build_invoke called with the
15977         current line information.
15978         (build_invoke): New argument cl. Wrap the function call around a
15979         wfl node.
15980         (refine_accessible_methods_list): Changed comment, removed
15981         unnecessary code.
15982         * parse.h: Fixed typo in comments.
15983         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15984         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15985         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15986         parser_ccb_indent.
15987         * lex.c (java_lex): Record the last closing curly bracket of a
15988         function.
15989         * jcf-parse.c (jcf_parse_source): Now calls
15990         java_check_methods. Clarified comment, fixed typo.
15991
15992 1998-04-09  Dave Brolley  <brolley@cygnus.com>
15993
15994         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15995         (finish_parse): Expose for non USE_CPPLIB builds.
15996
15997 1998-04-08  Jeffrey A Law  (law@cygnus.com)
15998
15999         * lang.c (lang_print_xnode): New function.
16000
16001 1998-04-03  Per Bothner  <bothner@cygnus.com>
16002
16003         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
16004         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
16005         used to build a class's dispatch table.
16006         (make_class_data):  Generate dispatch table if flag_assume_compiled.
16007         Set dtable of class object to address of class_dtable_decl.
16008
16009         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
16010         be volatile and have side effects - generates better code.
16011
16012         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
16013         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
16014
16015         * expr.c (expand_invoke):  If class is final, method is
16016         effectively final, so can call it directly.
16017
16018         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
16019
16020         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
16021
16022 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16023
16024         * parse.y (build_method_invocation_stmt): Removed extra argument
16025         to build_invoke.
16026
16027 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16028
16029         * expr.c (dtable_indent): Now static global.
16030         (expand_invoke): Now call invoke_build_dtable and
16031         build_invokevirtual.
16032         (invoke_build_dtable, build_invokevirtual): New functions.
16033         * jcf-io.c (find_class): Defer issuing a warning by setting
16034         jcf->outofsynch to 1.
16035         * jcf-parse.c (jcf_out_of_synch): New function.
16036         (load_class): Test this_jcf.outofsynch flag and call
16037         jcf_out_of_synch accordingly.
16038         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
16039         comment indentation.
16040         * lex.c (java_get_unicode): Fixed code indentation.
16041         (java_lex): Create string literal. Fixed typo. Removed several
16042         premature obstack_free.
16043         * parse.h: New enums for name resolution and invocation mode.
16044         (struct qualification): New data structure.
16045         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
16046         (do_resolve_class, build_method_invocation_stmt,
16047         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
16048         debug_line, identical_subpath_p, invocation_mode,
16049         refine_accessible_methods_list, build_invoke,
16050         lookup_method_invoke): New functions declared.
16051         (build_invokevirtual, invoke_build_dtable, match_java_method,
16052         build_field_ref, jcf_out_of_synch): New references to external
16053         functions.
16054         (struct parse_ctxt): Removed artificial_constructor field.
16055         * parse.y: (array_type:): Type defined for this rule.
16056         (class_type:): Installed default rule for interface_type:.
16057         (array_type:): Now build Java array type.
16058         (qualified_name:): Now use obstack_grow0.
16059         (method_declaration:): Skip the artificial constructor added to
16060         the list, if any.
16061         (abstract_method_declaration:): Execute the code only during pass 1.
16062         (block:): Installed default rule in block_statements:.
16063         (block_statement:): Add the statement to the method during pass 2.
16064         (statement_expression): Installed default rule for
16065         method_invocation:.
16066         (argument_list:): Added code to build the argument list.
16067         (method_invocation:): Added call to create the method invocation
16068         node.
16069         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
16070         (debug_line): New function for debug.
16071         (complete_class_decl): No longer do something during pass 1.
16072         (method_header): Use BUILD_PTR_FROM_NAME.
16073         (parser_qualified_classname): Use obstack_grow0. Removed bogus
16074         obstack_free.
16075         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
16076         function's main comment.
16077         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
16078         classes.
16079         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
16080         (resolve_class): Now works with arrays.
16081         (do_resolve_class, resolve_and_layout): New functions.
16082         (java_check_regular_methods): Reverse method list before and after
16083         having processed it. No longer set ctxp->artificial_constructor.
16084         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
16085         accordingly. Fixed typo in issued error message. Now use
16086         obstack_grow0.
16087         (find_in_imports_on_demand): Now use obstack_grow0.
16088         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
16089         (source_end_java_method): Call expand_expr_stmt instead of
16090         expand_expr. Calls it before calling expand_function_end.
16091         (java_method_add_stmt): Do nothing if errors were found during
16092         parsing.
16093         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
16094         (build_method_invocation_stmt, build_invoke, invocation_mode,
16095         lookup_method_invoke, refine_accessible_methods_list,
16096         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
16097         New functions.
16098         * typeck.c (build_java_signature): Properly end method signature
16099         if return type skipped.
16100         (match_java_method): New function.
16101
16102 1998-03-16  Per Bothner  <bothner@cygnus.com>
16103
16104         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
16105
16106 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16107
16108         * expr.c (build_invoke_non_interface): New function.
16109         (methods_ident, ncode_ident): Now static globals.
16110         (expand_invoke): Use build_invoke_non_interface.
16111         * java-tree.h (struct lang_decl): New field function_decl_body.
16112         (DECL_FUNCTION_BODY): New macro.
16113         * jcf-parse.c (jcf_parse_source): Deeper check before setting
16114         CLASS_FROM_SOURCE_P.
16115         (parse_source_file): Fixed typos. Call java_layout_parsed_class
16116         before starting pass 2. Call to java_generate_parsed_class replaced
16117         by java_register_parsed_class.
16118         * lex.c: Fixed typo in header. Some line width related formating.
16119         * lex.h: Some line width related formating.
16120         * parse.h (source_end_java_method, resolve_expression_name,
16121         complete_class_decl, maybe_create_class_interface_decl,
16122         check_class_interface_creation): New static function declarations.
16123         (java_layout_parsed_class, java_method_add_stmt): New function
16124         declarations.
16125         (struct parser_ctxt): Field mark_class_generate removed. New
16126         fields class_list and artificial_constructor.
16127         * parse.y: Fixed typo in header.
16128         (class_declaration:): Call complete_class_decl when class body
16129         parsed.
16130         (method_declaration:): Call source_end_java_method in pass 2 when
16131         the method body is defined.
16132         (postfix_expression:): Do expression name resolution on sub-rule
16133         name during pass 2.
16134         (create_class, create_interface): Merged common pieces.
16135         (check_class_interface_creation, maybe_create_class_interface_decl):
16136         New functions.
16137         (complete_class_decl): New function.
16138         (register_fields): Fixed line width related typo.
16139         (method_header): Correctly skip first argument when fixing
16140         argument line. Changed the loop.
16141         (java_check_circular_reference): Now use ctxp->class_list.
16142         (java_complete_class): Removed start/stop marking.
16143         (java_check_regular_methods): Now takes a class decl as an
16144         argument.  Add default constructor if none were encountered.
16145         (java_check_methods): Now use ctxp->class_list. Changed call to
16146         java_check_regular_methods.
16147         (source_start_java_method): Set DECL_ARG_TYPE for each function
16148         arguments.
16149         (source_end_java_method, java_method_add_stmt): New functions.
16150         (java_generate_parsed_class): No longer exists.
16151         (java_layout_parsed_class, java_register_parsed_class): New functions.
16152         (resolve_expression_name): New function.
16153
16154 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16155
16156         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
16157         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
16158         until pass initializations are done. Call read_import_dir with
16159         pass set to 0.
16160         * parse.h: (lookup_modifier_cl): New function declared.
16161         (INTERFACE_FIELD_MODIFIERS): New macro.
16162         (OBSOLETE_MODIFIER_WARNING): New macro.
16163         * parse.y: (register_fields): Class type and current field name in
16164         local variables. Check modifier(s) if adding field(s) to an interface.
16165         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
16166         and report errors using the faulty modifier line context.
16167         (lookup_modifier_cl): New function.
16168         (read_import_dir): Detect and report default import processing
16169         failure.
16170
16171 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
16172
16173         Add a pair of -fassume-compiled/-fno-assume-compiled options.
16174         * class.c (is_compiled_class): Return 1 after making sure it
16175         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
16176         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
16177         * java-tree.h (flag_assume_compiled): Add decl.
16178         * lang.c (lang_f_options): Add the flag.
16179         (flag_assume_compiled): Add decl, default to 0.
16180
16181 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16182
16183         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
16184         (is_compiled_class): Likewise.
16185         (layout_class): Likewise.
16186         (layout_class): Detect and lay out classes defined in source code.
16187         (interface_of_p, add_interface_do, may_add_interface): New
16188         function.
16189         (add_interface): Now use add_interface_do.
16190         (add_method_1): New function.
16191         (add_method): Now use add_method_1.
16192         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
16193         (complete_start_java_method): New function.
16194         (start_java_mehod): Now call complete_start_java_method.
16195         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
16196         (expand_invoke): Likewise and fixed typo.
16197         *gjava.c: (print_super_field): Use new argument to find_class
16198         DO_CLASS_FILE.
16199         (main): Likewise.
16200         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
16201         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
16202         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
16203         IDENTIFIER_NODE.
16204         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
16205         (add_method_1, push_class): New prototypes.
16206         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
16207         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
16208         directory where the class was found.
16209         (find_class): New argument DO_CLASS_FILE. Function find_class
16210         modified accordingly.
16211         *jcf-parse.c: (fix_class_path): New function.
16212         (load_class): Use new VERBOSE argument. load_class now finds and
16213         loads/parses .class/.java files. Save read_state of current_jcf
16214         if necessary.
16215         (java_parser_abort_on_error): New macro.
16216         (jcf_parse_source, parse_source_file): New function.
16217         (jcf_parse): Fixed typo.
16218         (yyparse): Call parse_source_file () only.
16219         (process_zip_dir): Fixed typo, fix zdir->filename_length when
16220         writing the real class name back in the zip directory entry.
16221         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
16222         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
16223         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
16224         (find_class): Prototype fixed.
16225         *lex.c: Added 1998 time stamp.
16226         Removed all static global variables, moved into the parser
16227         context data structure.. Now include unistd.h if SEEK_SET not
16228         defined.
16229         (java_init_lex): Rewritten.
16230         (java_sneak_unicode): Modified current unicode access in current line.
16231         (java_unget_unicode): Likewise.
16232         (java_allocate_new_line): New allocation management.
16233         (java_read_char): Modified access and storage of unget_utf8_value.
16234         New way of processing current unicode.
16235         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
16236         (java_get_unicode): Now use the parser context.
16237         (java_lineterminator): Likewise.
16238         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
16239         of the reentrant parser implementation. Function now use the
16240         parser context data structure and java_lval. Fixed production of
16241         the float and double constant "out of range" error message. Fixed
16242         obstack use. Return integer value when hitting a modifier. Now
16243         return type for TRUE, FALSE and other predefined types. Return
16244         identifier as a TREE_LIST list containing the current line context
16245         as the TREE_VALUE sub-node.
16246         (java_unicode_2_utf8): Fixed typo in declaration.
16247         (java_lex_error): Now use the parser context data structure.
16248         *lex.h: Added 1998 time stamp.
16249         (struct java_line): New fields ref_count and next.
16250         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16251         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
16252         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
16253         *parse.h: Added 1998 time stamp.
16254         (java_parse_source_file): Renamed from parse_source_file.
16255         (YYERROR_NOW, YYNOT_TWICE): Fixed.
16256         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
16257         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
16258         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
16259         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
16260         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
16261         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
16262         (struct parser_ctxt): New data structure to keep the parser context.
16263         *parse.y: Added 1998 time stamp, got rid of static global variables.
16264         (java_error_count, ctxp): New global variables.
16265         (%union): New value field.
16266         (numeric_type, integral_type): Rules removed.
16267         (primitive_type): Rule defined to handle integral, float, double and
16268         boolean types.
16269         (qualified_name, package_declaration,
16270         single_type_import_declaration, type_import_on_demand_declaration,
16271         modifiers, class_declaration, super, interfaces,
16272         interface_type_list, class_body, field_declaration,
16273         field_declaration, variable_declarators, variable_declarator,
16274         variable_declarator_id, method_declaration, method_header,
16275         formal_parameter_list, formal_parameter, method_body, block,
16276         static, interface_declaration, extends_interfaces,
16277         abstract_method_declaration, local_variable_declarators): Rules now
16278         define actions.
16279         (force_error, do_warning): New global statics.
16280         (push_parser_context, parser_context_save_global,
16281         parser_context_restore_global, pop_parser_context): New functions.
16282         (yyerror): Now uses the global parser context. Fixed use of obstack.
16283         (parse_error, parse_error_context, parse_warning_context,
16284         java_accstring_lookup, redefinition_error, check_modifiers,
16285         parser_add_interface, create_interface, create_class, find_field,
16286         duplicate_declaration_error, register_fields, method_header,
16287         check_modifiers_consistency, check_abstract_method_header,
16288         method_declarator, parser_qualified_classname,
16289         parser_check_super_interface, parser_check_super,
16290         parser_chain_incomplete_item, java_check_circular_reference,
16291         layout_class_from_source, java_complete_class,
16292         complete_method_decl, resolve_class, complete_class_report_errors,
16293         java_check_final, check_method_redefinition,
16294         java_check_regular_methods, java_check_abstract_methods,
16295         java_check_methods, lookup_java_interface_method2,
16296         lookup_java_method2, lookup_cl, find_name_in_single_imports,
16297         process_imports, find_in_imports, read_import_entry,
16298         read_import_dir, find_in_imports_on_demand,
16299         check_pkg_class_access, not_builtin_p, declare_local_variables,
16300         source_start_java_method, java_generate_parsed_class): New
16301         functions.
16302         *typeck.c: (signature_include_return): New global variable.
16303         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
16304         to add the function returned type in the signature.
16305
16306 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
16307
16308         * jcf-io.c (open_in_zip): Use strncmp and LEN.
16309
16310 1998-01-29  Dave Brolley  <brolley@cygnus.com>
16311
16312         * Make-lang.in (java.info): Added.
16313         (java.install-info): Added
16314
16315 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
16316
16317         * Makefile.in (clean): Also remove java/parse.c.
16318
16319 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
16320
16321         Add a pair of -fbounds-check/-fno-bounds-check options.
16322         * lang.c (lang_decode_option): Add code to grok arguments.
16323         (flag_bounds_check): Add decl.
16324         (lang_f_options): New array w/ the option in it.
16325         * java-tree.h (flag_bounds_check): Add decl.
16326         * lang-options.h: New file.
16327         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16328         of a static macro value.
16329         (JAVA_ARRAY_EXCEPTION): Delete macro.
16330
16331 1998-01-23  Per Bothner  <bothner@cygnus.com>
16332
16333         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
16334         * expr.c (build_anewarray):  Add missing promote_type.
16335
16336 1998-01-22  Per Bothner  <bothner@cygnus.com>
16337
16338         Add array types with known length to optimize bounds checking.
16339         * typeck.c (build_java_array_type):  Take length parameter.
16340         (java_array_type_length, build_prim_array_type):  New functions.
16341         * java-tree.h:  Update for new functions.
16342         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16343         * class.c:  Use build_prim_array_type.
16344         * expr.c (can_widen_reference_to):  Handle known-length array types.
16345         (verify_jvm_instructions):  Keep track of integer push instructions
16346         followed by newarray/anewarray, so we can build known-length arrays.
16347         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
16348         (java_array_data_offset):  New function.
16349         (build_java_array_length_access):  New function.  Optimize if constant.
16350         (build_java_arrayaccess):  Constant fold bounds check.
16351         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
16352         (build_newarray, build_anewarray):  New functions.
16353         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
16354         * verify.c (merge_types):  Handle known-lengh array types.
16355
16356 1998-01-19  Per Bothner  <bothner@cygnus.com>
16357
16358         * expr.c (expand_byte_code):  Fix performace bug, which caused
16359         searching linenumber_table to be linear rather than constant.
16360
16361 1997-12-12  Per Bothner  <bothner@cygnus.com>
16362
16363         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
16364
16365         * decl.c, java-tree.h (soft_fmod_node):  New global.
16366         * decl.c (init_decl_processing):  Define __builtin_fmod.
16367         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
16368         using __builtin_fmod.
16369
16370 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16371
16372         * keyword.h: New file, output of keyword.gperf as processed by
16373         gperf.
16374         * lex.c (java_lex_init): Initialize java_error_flag.
16375         * parse.c (YYERROR_NOW): Uses java_error_flag.
16376         * parse.y: New static java_error_flag. Useless definition of
16377         buffer_error gone.
16378         * parse.y (java_error): Portable error recovery using
16379         java_error_flag (not yet completely tuned).
16380
16381 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
16382
16383         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16384
16385 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16386
16387         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16388         (parse.c, lex.c, keyword.h): New rules for Java source code
16389         front-end.
16390         * parse.c: Renamed into jcf-parse.c.
16391         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16392         * keyword.gperf: New file, Java keywords.
16393         * parse.y: New file, Java language grammar.
16394         * parse.h: New file, Java language grammar definitions.
16395         * lex.c: New file, Java language lexer.
16396         * lex.h: New file, Java language lexer definitions.
16397
16398 1997-12-03  Per Bothner  <bothner@cygnus.com>
16399
16400         * decl.c (clinit_identifier_node), java-tree.h:  New global.
16401         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
16402         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
16403         * expr.c (expand_java_field_op):  Check for invalid assignment
16404         to final field.
16405
16406         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
16407
16408 1997-10-27  Per Bothner  <bothner@cygnus.com>
16409
16410         * verify.c (verify_jvm_instructions):  When processing a handler,
16411         attempt to set the current_subr to the right value.
16412         (More complicated code combines Sep 17 and Oct 22 versions.)
16413
16414 1997-10-24  Per Bothner  <bothner@cygnus.com>
16415
16416         * class.c (push_class):  Figure out (guess) name of source file.
16417         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
16418         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
16419         (parse_class_file):  Change return type from int to void.
16420         Call debug_start_source_file/debug_end_source_file.
16421
16422         * expr.c (build_java_binop):  Fix masking 2nd operand.
16423         * decl.c (init_decl_processing):  Set sizetype first.
16424
16425 1997-10-22  Per Bothner  <bothner@cygnus.com>
16426
16427         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
16428         (Revert Sep 17 change.)
16429
16430 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16431
16432         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16433         .class extension in their name and fix thing so we don't process
16434         them parse_zip_file_entries().
16435         (parse_zip_file_entries): Cleaned unused local variables.
16436
16437 1997-10-20  Per Bothner  <bothner@cygnus.com>
16438
16439         * expr.c (can_widen_reference_to):  Allows equal array element types.
16440         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
16441         * jcf-dump.c (RET):  Get (and print) index.
16442
16443         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16444         Promote element type to POINTER_TYPE.
16445
16446 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16447
16448         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16449         find_in_current_zip, jcf_figure_file_type): Moved from
16450         jcf-reader.c to parse.c.
16451         * zextract.c: (read_zip_archive): takes file_comment_length possible
16452         field into account.
16453
16454 1997-10-20  Per Bothner  <bothner@cygnus.com>
16455
16456         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
16457
16458         * verify.c (merge_types):  Handle array types even better ...
16459
16460 1997-10-17  Per Bothner  <bothner@cygnus.com>
16461
16462         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
16463
16464         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
16465         * class.c (make_class_data):  Don't build fields_decl if no fields.
16466         When building fields_decl, skip if DECL_ARTIFICIAL.
16467
16468         * expr.c (java_stack_swap):  Update stack_type_map.
16469         * verify.c (merge_types):  Handle array types better.
16470
16471 1997-10-15  Per Bothner  <bothner@cygnus.com>
16472
16473         * class.c (add_field):  Don't promote short integral fields to
16474         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16475         * expr.c (push_value):  Promote and convert short integral values.
16476
16477         * decl.c, java-tree.h (integer_two_node):  New constant node.
16478         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
16479
16480 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16481
16482         * class.c (append_gpp_mangled_type): Use function argument
16483         unpromoted type to generate mangled name.
16484
16485 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16486
16487         * constants.c (build_constant_data_ref): Now uses current_class
16488         instead of main_class.
16489         (build_constants_constructor): Now uses current_class instead of
16490         main_class.
16491         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16492         of the global variable SeepZipFiles done here.
16493         * zextract.c (read_zip_archive): extra_field optional field taken
16494         into account while computing the position of the class file in the
16495         archive.
16496         * verify.c (verify_jvm_instructions): Use current_jcf to search
16497         the constant pool.
16498         * parse.c (load_class): First search for the class to load in the
16499         current zip file. Saves current_jcf (restored before returning
16500         from that function). Don't call JCF_FINISH in the class was found
16501         in the current ZIP file.
16502         (jcf_parse): If the class was found in the current ZIP file, save
16503         its tree_constant_pool (for later reuse).
16504         (parse_class_file): New function. Process each method defined in
16505         the current class and record the class as to be later registered.
16506         (yyparse): Rewritten. Figure the type of the current file and switch
16507         accordingly.
16508         * lang.c: New global variable current_jcf.
16509         (lang_init): Removed compiling_from_source test (done later, in
16510         yyparse). Removed call the jcf_parse ().
16511         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16512         (typedef struct JCF): New fields seen_in_zip (to mark a class found
16513         in the current ZIP file) and zip_offset (offset to the class data in
16514         the current zip file).
16515         * jcf-reader.c: zipfile.h included.
16516         localToFile: New ZipFileCache static global variable
16517         (parse_zip_file_entries): New function. Browse the current ZIP
16518         file directory and process each class found.
16519         (process_zip_dir): New function. Register each class found in the
16520         ZIP file directory. The class aren't parsed but a valid JCF is
16521         link to each of them.
16522         (find_in_current_zip): New function. Search for a class in the
16523         current ZIP file directory. If found, prepare the class so that it
16524         can be loaded.
16525         (jcf_figure_file_type): New function. Examine the file structure
16526         to figure a class file, a ZIP file. If none of these categories are
16527         matched, a source file is assumed.
16528         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16529         SeenZipFile: New global variable.
16530         (open_in_zip): Use zipmember's length to accelerate the search for
16531         a member. If zipmember was NULL and zip file successfully read,
16532         return 0.
16533         * java-tree.h: New global variable current_jcf declared.  Added
16534         declaration for current_constant_pool_tags, current_constant_pool_data,
16535         current_constant_pool_length, current_constant_pool_data_ref.
16536         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16537         store the JCF of classes seen in a zip file) and tree *constant_pool
16538         (to save a loaded class constant pool). current_class declared here.
16539         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16540         retrieve method_ref_constant.
16541         (PUSHC): java_push_constant_from_pool now uses current_jcf.
16542         (OBJECT): get_class_constant now uses current_jcf.
16543         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16544         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16545         (expand_invoke): Now uses current_class instead of main_class
16546         (build_class_init): Now uses current_class instead of main_class
16547         * class.c: New static global variable registered_class.
16548         (register_class): New function.
16549         (emit_register_class): Modified to use registered_class instead of
16550         main_class
16551         (is_compiled_class): Now take into account class seen in the archive.
16552
16553 1997-10-06  Per Bothner  <bothner@cygnus.com>
16554
16555         * except.h:  Renamed to: java-except.h.
16556         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
16557         * except.c:  Add semi-working (commented out) implementation.
16558
16559         * expr.c (expand_iinc):  Add needed flush_quick_stack.
16560         * parse.c (set_source_filename):  New function.
16561         (give_name_to_class):  Set input_filename from package.classname.java.
16562
16563         * jcf-io.c (find_class):  Don't look first in ".".
16564
16565 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16566
16567         * zextract.c (read_zip_archive): Now takes into account the
16568         extra_field field.
16569         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16570
16571 1997-09-20  Per Bothner  <bothner@cygnus.com>
16572
16573         * constants.c, java-tree.h (build_internal_class_name):  New function.
16574         (alloc_class_constant):  Re-implement using build_internal_class_name.
16575         * class.c (make_class_data):  Likewise.
16576         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
16577
16578 1997-09-17  Per Bothner  <bothner@cygnus.com>
16579
16580         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
16581         to NULL before pushing an exception handler target.
16582
16583         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
16584         (java_stack_swap, java_stack_dup):  Re-write to be safe from
16585         clobbering registers.
16586         (build_class_init):  New function.
16587
16588 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16589
16590         * typeck.c (build_java_array_type): Temporary use
16591         permanent_obstack to create the array 'length' field.
16592         * expr.c (lookup_label): Temporay use permanent_obstack to create
16593         label if not found.
16594         * class.c (push_super_field): Tempory use permanent_obstack.
16595
16596 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16597
16598         * typeck.c (type_for_mode): Now handles double_type_node and
16599         float_type_node.
16600         * verify.c (verify_jvm_instructions): The instruction following
16601         the wide bytecode is checked. OPCODE_ret added to the list of
16602         wide.
16603
16604 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16605
16606         * class.c (make_class): Temporary use permanent_obstack. Set the
16607         class CLASS_P field to 1.
16608         (push_class): Temporary use permanent_obstack.
16609         (set_super_info): Temporary use permanent_obstack.
16610         (add_method): Temporary use permanent_obstack, set
16611         METHOD_TRANSIENT().
16612         (add_field): Temporary use permanent_obstack. Sets
16613         FIELD_VOLATILE() and FIELD_TRANSIENT().
16614         (build_class_ref): Temporary use permanent_obstack if the class
16615         isn't compiled.
16616         (build_static_field_ref): Temporary use permanent_obstack when
16617         creating field's rtl.
16618         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16619         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16620         and fields. Function finalized, as far as flag handling.
16621         (push_class_static_dummy_field): Temporary use permanent_obstack.
16622         (emit_register_class): Force generation of class registration at
16623         -O3 or deeper.
16624         * decl.c (end_java_method): Call permanent_allocation() before
16625         returning.
16626         * expr.c (can_widen_reference_to): Added comment to interface
16627         handling, fixed typo.
16628         (lookup_field): Now uses CLASS_P() to correct FIXME
16629         (expand_invoke): Verification on public && !static &&
16630         !abstract moved into soft_lookupinterfacemethod (kaffe).
16631         Use Object class dtable if objectref is an array when expanding
16632         invokeinterface.
16633         (java_push_constant_from_pool): Temporary use permanent_obstack
16634         for CONSTANT_string
16635         * parse.c (get_ref_constant): Temporary use permanent_obstack to
16636         create constant references.
16637         (get_constant): Temporary use permanent_obstack to create constant.
16638         (load_class): Temporary use permanent_obstack to load class.
16639         (jcf_parse): Temporary use permanent_obstack to perform class
16640         layout.
16641         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16642         (build_java_signature): Temporary use permanent_obstack.
16643         * verify.c: (verify_jvm_instruction): removed unnecessary verification
16644         on ACC_SUPER flag.
16645         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16646         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16647         (CLASS_P): Defined
16648
16649 1997-09-11  Per Bothner  <bothner@cygnus.com>
16650
16651         * class.c (append_gpp_mangled_type):  Fix typo.
16652         (emit_register_class):  Use main_class to get class object, rather
16653         than looking for no-longer-existing static decl starting with _CL.
16654         * typeck.c (parse_signature_type):  Promote array element type
16655         if it is a RECORD_TYPE.
16656
16657 1997-09-10  Per Bothner  <bothner@cygnus.com>
16658
16659         * class.c (push_class_static_dummy_field):  New function.
16660         (mangle_static_field):  New. Do G++-style mangling of static fields.
16661         (layout_class):  Mandle static fields here, not in add_field.
16662         (build_class_ref):  The class object is now a dummy static field.
16663         * decl.c (find_local_variable):  Look for best, instead of first match.
16664         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
16665         (build_java_athrow):  Don't check here if exception is Throwable.
16666         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
16667         (TYPE_USED):  Removed.  No longer used ...
16668         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
16669         * verify.c (push_pending_label):  New function.
16670         (push_pending_block):  Renamed to check_pending_block.
16671         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
16672         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
16673         re-checking possible handlers) after a store (less wasted work).
16674         Check for null handler (finally) before calling add_handler.
16675         Various changes to (finally?) correctly handle try/finally.
16676
16677 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16678
16679         * class.c: Include stdio.h.
16680
16681 1997-09-04  Per Bothner  <bothner@cygnus.com>
16682
16683         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16684         to make sure class is initialized before static/special invoke.
16685
16686         * verify.c (verify_jvm_instructions):  On a store instruction,
16687         call find_local_variable to force pre-allocation of decl and rtx.
16688         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
16689
16690 1997-09-03  Per Bothner  <bothner@cygnus.com>
16691
16692         * class.c (build_class_ref):   Strip off "promoted_" if need be.
16693         (make_field_value): Call build_java_signature when needed.
16694         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
16695         * expr.c (build_java_athrow):  Don't push_value of exception.
16696         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16697         match specification of [fd]cmp[lg] for NaNs.
16698         (expand_byte_code):  Add support for exception handler ranges.
16699         * except.c:  Add skeleton for EH code-generation.
16700         * verify.c (merge_types):  Treat all promoted integral types as equal.
16701         * constants.c (build_constants_constructor):  To force creation of
16702         current_constant_pool_data_ref, call build_constant_data_ref.
16703
16704         * javaop.def (lload):  Fix typo.
16705         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
16706
16707 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
16708
16709         * parse.c: Don't include function.h.
16710
16711 1997-08-27  Per Bothner  <bothner@cygnus.com>
16712
16713         * except.[ch]:  New files.
16714         * Makefile.in (JAVA_OBJS):  Add except.o
16715         * expr.c:  Temporary warning about unimplemented exceptions.
16716         * verify.c:  Verify exception handlers.
16717
16718         * jcf-dump.c (disassemble_method):  Print exception table.
16719
16720 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16721
16722         * expr.c (verify_jvm_instructions): Started a thorough
16723         verification of invoke* bytecodes.
16724         (expand_byte_code): flush quick stack if PC is the target of a
16725         branch.  and undef RET (conflicting with config/i386/i386.h).
16726         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16727         used.
16728         (expand_invoke): Now handles invokeinterface and do more
16729         verification according to the bytecode.
16730         (lookup_field): Don't try to load the class if processing
16731         dtable_type.
16732         (can_widen_reference_to): Now handles interfaces.
16733         * decl.c (init_decl_processing): New global variable
16734         soft_lookupinterfacemethod_node, declared in java-tree.h.
16735         Call set_super_info on string_type_node.
16736         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16737         defined.
16738         * class.c (set_super_info): Fills the CLASS_* flags according to
16739         access_flags.
16740         (get_access_flags_from_decl): Handles all class flags.
16741
16742 1997-08-26  Per Bothner  <bothner@cygnus.com>
16743
16744         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
16745         * parse.c (yyparse):  Check for abstract method, and missing code.
16746         * expr.c (expand_byte_code):  Change interface.
16747         * lang.c (put_decl_node):  Print promoted types prettier.
16748         * verify.c (verify_jvm_instruction):  Change interface.
16749         Partial support for scanning exception table.
16750         For load instructions, handle promoted integral types.
16751
16752 1997-08-21  Per Bothner  <bothner@cygnus.com>
16753
16754         * verify.c:  New file, with contents moved from expr.c.
16755         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
16756         * typeck.c (is_array_type_p):  Moved here from expr.c.
16757         * java-tree.h:  Add some now-needed function declarations.
16758         * Makefile.in (JAVA_OBJS): Added verify.o.
16759
16760 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16761
16762         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16763         METHOD_ABSTRACT flag.
16764
16765         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16766         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16767         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16768
16769         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16770         variables.
16771         (start_java_method): Hook for SYNCHRONIZED methods.
16772
16773         * expr.c (build_java_jsr, build_java_ret): New functions
16774         (JSR,PRE): New macros
16775         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16776         (verify_jvm_instructions): tableswitch, lookupswitch,
16777         monitorenter, monitorexit, goto_w: verified.
16778         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16779         (build_java_monitor): New function.
16780         (MONITOR_OPERATION): Modified to call build_java_monitor()
16781         (verify_jvm_instructions): Started a thorough verification of
16782         invoke* bytecodes.
16783
16784 1997-08-19  Per Bothner  <bothner@cygnus.com>
16785
16786         Support verification of jsr/ret subroutines (used for try/finally).
16787         * decl.c (return_address_type_node):  New type node.
16788         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16789         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16790         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
16791         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16792         TYPE_USED):  New macros for special types in type_map.
16793
16794         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
16795         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
16796         BCODE_JUMP_TARGET.
16797         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
16798
16799         * expr.c (can_widen_reference_to):  New function.
16800         (pop_type):  Use it.
16801         (merge_type_state):  Support handling start of subroutine.
16802         (push_pending_block):  Return char* error message, instead of calling
16803         fatal on an error.  Also handle subroutines.
16804         (verify_jvm_instructions):  Handle errors from push_poending_block.
16805         Support jsr and ret instructions.
16806
16807 1997-08-19  Per Bothner  <bothner@cygnus.com>
16808
16809         * jcf-io.c (find_classfile):  Fix thinko.
16810         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
16811
16812 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
16813
16814         * Makefile.in (BISON): Remove.
16815
16816 1997-08-07  Per Bothner  <bothner@cygnus.com>
16817
16818         * Makefile.in:  Convert to autoconf.
16819         * config-lang.in (outputs):  Added java/Makefile.
16820
16821         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16822         Rename cc1java to jc1.
16823
16824         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
16825         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
16826
16827         * class.c (class_depth):  Do load_class if needed.
16828
16829         Mostly better verification.
16830         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
16831         (init_decl_processing):  Change return type of soft_checkcast.
16832         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
16833         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16834         lang_print_error):  New functions.
16835         (lang_init):  Set global hook print_error_function to lang_print_error.
16836         * expr.c:  In the type_map ptr_type_node is only used for null now.
16837         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
16838         (merge_types):  Dererence pointer to record types before comparing.
16839         (decode_newarray_type, merge_types):  On error just return NULL.
16840         (build_java_binop):  Add preliminary implementation (with warning)
16841         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16842         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
16843         (expand_compare, expand_java_goto, expand_java_call):  Don't
16844         push_pending_block, since that only makes sense when verifying.
16845         (merge_type_state):  Different return codes.
16846         (push_pending_block):  A block may need to be verified more than once.
16847         (expand_byte_code):  Warn about unused code at code generation time.
16848         (verify_jvm_instruction):  Changed logic, since code may need to be
16849         re-verified if type-state has changed.  Also, better error handling.
16850         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16851         Improve newarray, anewarray, ?aload, athrow,
16852         * java-tree.h (LABEL_CHANGED):  New macro.
16853
16854 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16855
16856         * decl.c (soft_athrow_node): New global variable initialized.
16857         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16858         * typeck.c (convert): Added support for REAL_TYPE.
16859         (convert_to_char): New function.
16860         (convert): Handle CHAR_TYPE.
16861         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16862         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16863         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16864         promoted type.
16865         (verify_jvm_instructions): Added break a the end of bogus unop: label.
16866         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16867         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16868         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16869         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16870         to Use The Right Things.
16871         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16872         compatible with INT. BOOLEAN is made equivalent to BYTE.
16873         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16874         OPCODE_ifnonnull): Now supported.
16875         (build_java_athrow): New function.
16876
16877 1997-08-04  Per Bothner  <bothner@cygnus.com>
16878
16879         Rename method name <init> to match G++ (and fix mangling).
16880         * class.c (layout_class):  Replace method name of <init> by class name.
16881         (make_method_value):  Do inverse renaming of constructor from <init>.
16882         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
16883         * typeck.c (lookup_java_constructor):  New function.
16884         * expr.c (expand_invoke):  If method_name is <init>, call
16885         lookup_java_constructor to find constructor.
16886
16887         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
16888
16889 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16890
16891         * parse.c (get_class_constant): Modified to handle array "classes"
16892         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16893         wide type.
16894         (convert): Modified to handle real type.
16895         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16896         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16897         variables declared.
16898         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16899         soft_multianewarray, soft_newarray_node, soft_throw_node): New
16900         global variables initialized.
16901         (find_local_variable): Handles the case of a pointer
16902         (end_java_method): Restore the use of one more scope
16903         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16904         build_java_array_length_access, expand_java_arrayload,
16905         expand_java_arraystore, expand_java_array_length,
16906         expand_java_multianewarray, expand_java_anewarray,
16907         build_java_check_indexed_type, is_array_type_p,
16908         build_java_throw_out_of_bound_exception): New functions.
16909         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16910         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16911         OPCODE_<t>aload): Implemented code for verification.
16912         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16913         ARRAY_NEW_MULTI): Macro defined.
16914         (CONVERT): Modified to invoke convert().
16915         (case OPCODE_aload2): Fixed index typo from 2 to 1.
16916
16917 1997-07-31  Per Bothner  <bothner@cygnus.com>
16918
16919         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
16920         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
16921         (make_class_data):  Field name needs '/' as package prefix.
16922         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
16923
16924 1997-07-25  Per Bothner  <bothner@cygnus.com>
16925
16926         Implement debug information for local variables.
16927         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16928         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16929         DECL_LOCAL_SLOT_CHAIN):  New macros.
16930         (struct lang_decl_var):  New type.
16931         * parse.c (give_name_to_locals):  Move to decl.c.
16932         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
16933         (start_java_method):  Re-write parameter handling.
16934         (pending_local_decls):  New global variable.
16935         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
16936         (find_local_variable):  Accept pc so we can skips decls not in range.
16937         (struct binding_level):  Add end_pc field.
16938         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16939         (various):  Change so current pc gets passed to find_local_variable.
16940
16941         * decl.c (init_decl_processing):  Re-arrange fields in
16942         class_type_node and and method_type_node to match kaffe 0.9.1.
16943         * class.c (make_method_value, make_class_data):  Update
16944         initializations to match.
16945
16946 1997-07-16  Per Bothner  <bothner@cygnus.com>
16947
16948         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16949         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
16950         (push_super_field):  New function.
16951         (make_class_data):  Handle inheritance of class static initializer.
16952         (layout_class):  New name mangling.
16953         * constants.c (build_constant_data_ref):  Init type of data array
16954         to a one-element array.
16955         (build_constants_constructor):  Set DECL_SIZE from complete array type.
16956         * decl.c:  Rename class_type, object_type etc to class_type_node,
16957         object_type_node etc.  Make former inherit from latter.
16958         * expr.c (expand_invoke):  Add cast of function address.
16959         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
16960         * parse.c (yyparse):  Don't call layout_class here.
16961         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
16962
16963 1997-06-14  Per Bothner  <bothner@cygnus.com>
16964
16965         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
16966         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
16967         (alloc_class_constant):  New.
16968         * expr.c (expand_invoke):  Make sure method's class is initialized.
16969         * class.c (interits_from_p, emit_register_class):  New functions.
16970         * parse.c (yyparse):  Call emit_register_class.
16971
16972 1997-06-09  Per Bothner  <bothner@cygnus.com>
16973
16974         * constants.c:  New file, to handle constant pool.
16975         * Makefile.in (JAVA_OBJS):  Add constants.o.
16976         * decl.c (init_decl_processing):  Update, fix, finish various structs.
16977         (pushdecl_top_level):  New.
16978         * parse.c (layout_class):  Moved to class.c.
16979         * expr.c (java_push_constant_from_pool):  New function.
16980         * class.c (build_class_ref):  Make work fully
16981         (make_class_data):  Emit super-class, constant pool, interface vector.
16982
16983 1997-06-03  Per Bothner  <bothner@cygnus.com>
16984
16985         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
16986         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
16987         * class.c (class_depth):  New function.
16988         (lookup_named_class):  Replaced by new function lookup_class.
16989         * decl.c (object_type_node, string_type_node):  New.
16990         Remove various types that we no longer need.
16991         * expr.c (verify_jvm_instructions):  New separate verifier pass.
16992         (push_type, pop_type):  New functions for verifier.
16993         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
16994         (expand_byte_code):  Simplify, since we assume already verified.
16995         (expand_invoke):  Now mostly works.
16996         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16997         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
16998         * parse.c:  Wait to allocate class object until we know its name.
16999         (layout_class):  Calculate DECL_VINDEX for each virtual method.
17000         * typeck.c (get_array_type):  Rename to ...
17001         (build_java_array_type):  ... and provide working implementation.
17002         (build_java_signature):  New function - build Java signature of type.
17003         (set_java_signature):  New function - cache signature with type.
17004         (lookup_java_method):  New function.
17005
17006 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
17007
17008         * class.c (ident_subst):  Take extra SUFFIX parameter.
17009         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
17010         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
17011         (build_class_ref):  Actually implement.
17012         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
17013         * decl.c (builtin_function):  New.
17014         (init_decl_processing):  Update for current Kaffe.  Declare some
17015         builtin Kaffe functions.
17016         * expr.c (build_address_of):  New.
17017         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
17018         Renamed (from expand_java_new etc), and added working implementations.
17019         (build_field_ref):  Now also handle static fields.
17020         (expand_invoke):  Implement invokestatic, and start implement rest.
17021         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
17022         * javaop.def:  Rename invokevirt -> invokevirtual.
17023         * lang.c (use_handles):  Removed.
17024         * parse.c:  Add support for ConstantValue attribute.
17025         Handle nested loading of a class.  (JPOOL_UTF):  New.
17026
17027 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
17028
17029         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
17030
17031 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
17032
17033         * Make-lang.in (java.install-man):  New empty rule.
17034         * typeck.c (set_local_type):  New function.
17035         * expr.c (STORE_INTERNAL):  Call find_local_variable,
17036         not find_stack_slot.  Call set_local_type.
17037
17038 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
17039
17040         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
17041         and building RECORD_TYPE CONSTRUCTORs.
17042         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
17043
17044         * lang.c (use_handles):  Change the default to 0.
17045         * decl.c:  Define and build class_type, field_type, utf8const_type.
17046         * class.c (make_class_data, make_field_value,
17047         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
17048         hashUtf8String, strLengthUtf8, mangled_classname:
17049         Functions to build reflective data structures.
17050         * parse.c (yyparse):  Call make_class_data.
17051
17052         * jcf-io.c (open_class, find_classfile):  New functions.
17053         * jcf-dump.c:  Support reading classfile from explicitly-named
17054         class file (without CLASSPATH searching).
17055
17056 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
17057
17058         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
17059         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
17060         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
17061         (get_constant):  Now trivial for CONSTANT_Utf8.
17062
17063         * jcf.h:  Make NEW_CPOOL the default.
17064         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
17065
17066 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
17067
17068         New directory.