OSDN Git Service

2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
2
3         PR java/18305
4         * decl.c (end_java_method): Call
5         attach_init_test_initialization_flags on all the init_decls.
6         * parse.y (attach_init_test_initialization_flags): Move to ...
7         * expr.c (attach_init_test_initialization_flags): here and
8         support BIND_EXPR also.
9         * java-tree.h (attach_init_test_initialization_flags): Prototype.
10         * jcf-parse.c (parse_class_file): Don't disable class init
11         optimization.
12
13 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
14
15         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
16         in diagnostics.
17
18 2004-11-24  Richard Henderson  <rth@redhat.com>
19
20         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
21         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
22
23 2004-11-24  Tom Tromey  <tromey@redhat.com>
24
25         * verify.c (defer_merging): Don't use C++-style comment.
26         * verify.h (java_opcode): Added java_opcode_end.
27         * class.c (build_class_ref): Remove C++ comment and old FIXME.
28
29         * verify-impl.c (vfy_push_type): Removed bogus "return".
30         (initialize_stack): Use vfy_alloc and vfy_free.
31         (verify_instructions_0): Likewise.
32
33         * Merged gcj-abi-2-dev-branch to trunk.
34
35 2004-11-24  Andrew Haley  <aph@redhat.com>
36
37         * jcf-parse.c (parse_class_file): Set file_start_location.
38
39 2004-11-10  Tom Tromey  <tromey@redhat.com>
40
41         * class.c (make_field_value): Don't call build_static_field_ref.
42         (build_static_field_ref): Don't emit direct references when using
43         indirect dispatch.
44
45         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
46         -verbose:class into man page synopsis.
47
48 2004-11-09  Tom Tromey  <tromey@redhat.com>
49
50         * expr.c (build_java_arraystore_check): Still generate check if
51         element type is itself an array.
52
53 2004-11-08  Tom Tromey  <tromey@redhat.com>
54
55         * java-tree.h (soft_check_assignment_node): Removed.
56         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
57         * decl.c (java_init_decl_processing): Don't initialize
58         soft_check_assignment_node.
59
60 2004-11-05  Tom Tromey  <tromey@redhat.com>
61
62         * class.c (layout_class_methods): Don't add Miranda methods when
63         using indirect dispatch.
64
65 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
66
67         * class.c (make_class_data): Call emit_assertion_table to set the
68         'assertion_table' field.
69         (build_signature_for_libgcj): Move here from expr.c.
70         (add_assertion_table_entry): New function. Callback for assertion
71         hashtable traversal.
72         (emit_assertion_table): New. Take class argument, and generate 
73         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
74         * decl.c (init_decl_processing): Define assertion_entry_type record.
75         Push 'assertion_table' class field instead of 'verify'.
76         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
77         (type_assertion_hash): Include 'assertion_code' in hash.
78         (add_type_assertion): Rewritten. Take class and assertion_code
79         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
80         (can_widen_reference_to): Use new add_type_assertion() arguments.
81         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE, 
82         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
83         (verify_identifier_node): Removed.
84         (assertion_entry_type, assertion_table_type): New.
85         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
86         assertion code definitions.
87         (struct type_assertion): Add assertion_code. Rename 'source_type' and
88         'target_type' to 'op1' and 'op2'.
89         (add_type_assertion): Declare.
90         (lang_printable_name_wls): Remove unused definition.
91         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
92         to emit runtime assertion.
93         (vfy_note_stack_type): Clean up non-C90 declarations.
94         (vfy_note_local_type): Likewise.
95         * verify.h (vfy_is_assignable_from): Declare.
96         * verify-impl.c (is_assignable_from_slow): Remove unused function.
97         (ref_compatible): Rename arguments. Call vfy_is_assignable_from() 
98         instead of is_assignable_from_slow().
99         (types_compatible): Reinstate ref_compatible() call.
100
101 2004-11-04  Tom Tromey  <tromey@redhat.com>
102
103         * class.c (build_static_field_ref): Reverted previous patch.
104
105         * class.c (build_static_field_ref): Don't emit direct references
106         when using indirect dispatch.
107
108 2004-11-03  Tom Tromey  <tromey@redhat.com>
109
110         * expr.c (expand_java_arrayload): Set lhs_type_node.
111         (expand_java_arraystore): Set rhs_type_node.
112
113 2004-11-02  Tom Tromey  <tromey@redhat.com>
114
115         * jcf-parse.c (compute_class_name): Use filename length from zip
116         directory, not strlen.
117
118         * expr.c (expand_invoke): Mark new interface methods as abstract.
119
120 2004-11-01  Tom Tromey  <tromey@redhat.com>
121
122         * verify-impl.c (push_jump): Removed check for uninitialized
123         objects.
124         (push_exception_jump): Likewise.
125         (handle_ret_insn): Likewise.
126         (handle_jsr_insn): Likewise.
127         (state_check_no_uninitialized_objects): Removed.
128
129         * decl.c (check_local_unnamed_variable): Recognize
130         promoted-to-int parameters when using the new verifier.
131         * expr.c (expand_java_arraystore): Explicitly request array type
132         when using new verifier.
133         (expand_java_arrayload): Likewise.
134         (invoke_build_dtable): Don't pass object_type_node as
135         expression argument to build_java_indirect_ref.
136         (build_java_check_indexed_type): Do nothing.
137         (build_java_arraystore_check): Handle case where array doesn't
138         have array type.
139         (build_java_array_length_access): Likewise.
140         (expand_invoke): Handle case where interface overrides a method
141         from Object.
142         (pop_type_0): Always succeed for reference types.
143         (process_jvm_instruction): Don't pop a value in a dead
144         exception handler.
145         (pop_arguments): Convert arguments to correct types.
146
147 2004-10-29  Andrew Haley  <aph@redhat.com>
148
149         * jcf-parse.c (give_name_to_class): Remove line that was
150         incorrectly merged.
151
152 2004-10-29  Andrew Haley  <aph@redhat.com>
153
154         * jcf-parse.c (set_source_filename): Add code to build new sfname.
155
156 2004-10-20  Andrew Haley  <aph@redhat.com>
157
158         * decl.c (end_java_method): Don't expand if flag_syntax_only.
159
160 2004-10-26  Tom Tromey  <tromey@redhat.com>
161
162         * verify.h (vfy_notify_verified): Removed.
163         * verify-glue.c (vfy_notify_verified): Removed.
164
165 2004-10-26  Tom Tromey  <tromey@redhat.com>
166
167         * verify-impl.c (debug_print_state): Declare `i' before code.
168         (merge_types): Modify `t' when it is null_type.
169
170 2004-10-26  Tom Tromey  <tromey@redhat.com>
171
172         * verify-impl.c (type_print): Renamed from print.  Now static and
173         takes an argument.
174         (debug_print_state): Use type_print.
175
176 2004-10-25  Tom Tromey  <tromey@redhat.com>
177
178         * expr.c (build_invokeinterface): Compute correct offset for
179         index into interface methods.
180
181 2004-10-20  Tom Tromey  <tromey@redhat.com>
182
183         * java-tree.h (verify_jvm_instructions_new): Declare.
184
185         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
186         command line.
187
188         * verify-impl.c (verify_instructions): Correctly handle wide
189         types on the stack.
190         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
191         (vfy_get_component_type): Strip pointer types.
192         (vfy_find_class): Use get_type_from_signature.  Strip pointer
193         types.
194         Include java-except.h.
195
196 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
197
198         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t, 
199         vfy_push_type_t, set_variable, add_new_state, merge_into,
200         handle_jsr_insn, branch_prepass, check_class_constant,
201         check_wide_constant, get_one_type, compute_static_types, 
202         verify_instructions_0): Clean up C99 declarations after statements.
203
204 2004-10-20  Tom Tromey  <tromey@redhat.com>
205
206         * verify-impl.c (merge_refs): Compare reference against iterator,
207         not ref2.
208
209         * verify-glue.c (vfy_tag): Mask off resolved flag.
210
211 2004-10-19  Tom Tromey  <tromey@redhat.com>
212
213         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
214         (init_state_with_stack): Initialize `this_type' in state.
215         (verify_method): Use debug_print.
216         * verify-glue.c (vfy_is_primitive): Removed debugging print.
217         (vfy_note_stack_depth): Reverted last patch.
218         (vfy_note_stack_type): Note pointer to Object, not Object.
219         (vfy_note_local_type): Likewise.
220
221         * verify.h (vfy_note_instruction_seen): Declare.
222         * verify-glue.c (verify_jvm_instructions_new): Set
223         BCODE_EXCEPTION_TARGET on target instruction.
224         (vfy_note_instruction_seen): New function.
225         * verify-impl.c (FLAG_INSN_SEEN): New define.
226         (verify_instructions_0): Set flag on instruction.  Save state for
227         PC=0 later.
228         (verify_instructions): Call vfy_note_instruction_seen.
229
230         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
231         (verify_jvm_instructions_new): Call method_init_exceptions,
232         add_handler, and handle_nested_ranges.
233         * verify-impl.c (verify_method): Return 1 on success.
234         (verify_instructions_0): Save the state at PC=0.
235
236         * verify-impl.c (init_type_from_class): Set is_resolved and
237         ref_next on new ref_intersection.
238         (init_type_from_string): Likewise.
239
240 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
241
242         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
243         if flag_new_verifier is set.
244         * java-tree.h (flag_new_verifier): Declare.
245         * lang.opt (fnew-verifier): New option.
246         * verify-impl.c: Work around namespace pollution by undef'ing 
247         'current_class'.
248         (struct verifier_context): Make 'bytecode' const.
249         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
250         (types_compatible): For the BC-ABI, always consider reference types
251         compatible.
252         (check_class_constant): Use vfr->current_class.
253         (check_constant): Likewise.
254         (check_wide_constant): Likewise.
255         (check_field_constant): Check for 'L' at start of type name.
256         (get_one_type): Return pointer instead of type. Set type result in
257         caller via passed type pointer.
258         (compute_argument_types): Update to use new get_one_type arguments.
259         (compute_return_type): Likewise.
260         (make_verifier_context): New. Allocate and initialize 'vfr'.
261         (free_verifier_context): New. Free 'vfr' and its contents.
262         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
263         and free_verifier_context.
264
265 2004-10-15  Tom Tromey  <tromey@redhat.com>
266
267         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
268         * verify.h (vfy_fail): Fixed formatting.
269
270         * verify-impl.c (vfr): Fixed comment formatting.
271         (collapse_type): New function.
272         (verify_instructions): Notify compiler about type map.
273         * verify.h (vfy_note_stack_depth): Updated.
274         (vfy_note_stack_type): Likewise.
275         (vfy_note_local_type): Likewise.
276         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
277         Declare.
278         * verify-glue.c (vfy_note_stack_depth): Correctly size type
279         state.  Added `method' argument.
280         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
281         argument.
282         (vfy_note_local_type): New function.
283         (vfy_unsuitable_type): Likewise.
284         (vfy_return_address_type): Likewise.
285         (vfy_null_type): Likewise.
286
287         * verify.h (VFY_IN_GCC): Removed.
288         (VFY_WANT_TYPEMAP): Removed.
289         * verify-impl.c (verify_instructions_0): Removed useless "\".
290         (struct state) <next>: Uncomment.
291
292 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
293
294         * verify-impl.c: Formatting fixes. Reformat C++-style comments to 
295         C-style.
296
297 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
298
299         * Make-lang.in (verify.o): Re-enabled this target.
300         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
301         (vfy_get_interface): Likewise.
302         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
303         * verify.h (verify_jvm_instructions_new): Declare.
304         * verify-impl.c (free_state): Temporarily comment out unused
305         function.
306
307 2004-10-06  Tom Tromey  <tromey@redhat.com>
308
309         * java-tree.h (JV_STATE_READ): New enum value.
310
311 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
312
313         * verify.h: New file.
314
315 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
316
317         * verify-impl.c, verify-glue.c, verify.h: New files.
318         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
319
320 2004-09-24  Andrew Haley  <aph@redhat.com>
321
322         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
323         for a slot if it's of pointer type.
324
325 2004-09-14  Tom Tromey  <tromey@redhat.com>
326
327         * class.c (make_class_data): Correctly initialize "state" field.
328         Initialize "engine" field.
329         * decl.c (java_init_decl_processing): Add "engine" field.
330
331 2004-09-10  Andrew Haley  <aph@redhat.com>
332
333         PR java/12760
334         * expr.c (build_invokeinterface): Use fast method for interface
335         dispatch.
336         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
337         JTI_ITABLE_PTR_TYPE.
338         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
339         (emit_symbol_table): Add new arg, element_size.
340         * decl.c (java_init_decl_processing): Initialize Class.itable.
341         * class.c (GEN_TABLE): New macro.
342         (gen_indirect_dispatch_tables): Use it.  Add itable.
343         (make_class_data): Add new arg for emit_symbol_table().
344         Emit itable.
345         (add_miranda_methods): Make sure search_class has been parsed.
346         (emit_symbol_table): Add new arg, element_size.
347
348 2004-09-06  Andrew Haley  <aph@redhat.com>
349
350         * verify.c (merge_types): Return Object for all merges of
351         interfaces.
352         * expr.c (add_type_assertion): Don't generate assertions when
353         source type is array of Object.
354                 
355 2004-09-03  Andrew Haley  <aph@redhat.com>
356
357         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
358
359         * lang.c (java_post_options): Force flag_verify_invocations if
360         we're not using indirect dispatch.
361
362         * expr.c (pop_type_0): Move test for interfaces before call to
363         can_widen_reference_to().
364         (build_signature_for_libgcj): Remove generation of canonical array
365         type.
366         (add_type_assertion): Canonicalize both arrays.
367         Don't assert that type X can be assigned to Object.
368         Don't assert that type X an be assigned to type X.
369         Don't assert that Object can be assigned to type X.
370         (can_widen_reference_to): Warn whenever we generate an assertion.
371         (process_jvm_instruction): Use throwable_type_node for the type of
372         an exception class.
373
374 2004-09-01  Andrew Haley  <aph@redhat.com>
375
376         * decl.c (java_init_decl_processing): Change
377         verify_identifier_node to "__verify".
378         * expr.c (add_type_assertion): Use verify_identifier_node for name.
379         * java-tree.h (verify_identifier_node): Change to "__verify".
380
381         * expr.c (build_signature_for_libgcj): New function.
382         (add_type_assertion): Use it to construct signatures for
383         source_type and target_type.
384
385 2004-08-27  Andrew Haley  <aph@redhat.com>
386
387         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
388         (verify_identifier_node): New.
389         (TYPE_VERIFY_METHOD): New.
390         (struct type_assertion): New type.
391         * expr.c (type_assertion_eq): New function.
392         (type_assertion_hash): New function.
393         (add_type_assertion): New function.
394         (can_widen_reference_to): Call add_type_assertion().
395         * decl.c (java_init_decl_processing): Add verify_identifier_node.
396         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
397         (finish_class): Output TYPE_VERIFY_METHOD (type).
398
399         * decl.c (end_java_method): Nullify unused fields.
400
401 2004-08-17  Andrew Haley  <aph@redhat.com>
402
403         * verify.c (defer_merging): Quieten.
404         * jcf-parse.c (load_class): Only try to open a class file if it's
405         java.lang.Object or if it's part of the current compilation.
406         Check that the class we just tried to load is the class we just
407         loaded.  Quieten.
408         (java_parse_file): Set flag_verify_invocations off if we're
409         compiling from .class.
410         (parse_zip_file_entries): Abort if we try to read a dummy class.
411         * expr.c (can_widen_reference_to): Quieten.
412         (build_invokevirtual): Abort if we try to invokevirtual an
413         interface.
414         (expand_invoke): Don't build a non-interface call to an interface.
415         (build_instanceof): Don't do premature optimization if
416         flag_verify_invocations is not set.
417         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
418         from superclass.
419         (build_static_field_ref): Add correct type conversion for
420         field_address.
421         (add_miranda_methods): Disable generation of Miranda methods for
422         dummy classes.
423         (layout_class_method): Don't complain about non-static method
424         overrides static method with dummy classes.
425
426 2004-08-13  Tom Tromey  <tromey@redhat.com>
427
428         * class.c (build_static_field_ref): Re-enable atable lookups for
429         static fields.
430
431         * parse.y (strip_out_static_field_access_decl): Indentation fix.
432
433 2004-08-11  Tom Tromey  <tromey@redhat.com>
434
435         * gcj.texi (libgcj Runtime Properties): Document new properties.
436
437 2004-08-06  Andrew Haley  <aph@redhat.com>
438
439         * jcf-parse.c (load_class): Check that we really have loaded the
440         class we're looking for.
441
442 2004-07-19  Andrew Haley  <aph@redhat.com>
443
444         * verify.c (verify_jvm_instructions): Comment change only.
445
446         * typeck.c (build_java_array_type): Add size field to array name.
447
448         * java-tree.h (LOCAL_SLOT_P): New.
449         (update_aliases): Add PC argument.
450         (pushdecl_function_level): New function.
451
452         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
453         MODIFY_EXPR, and SAVE_EXPR.
454         (java_gimplify_modify_expr): New function.
455
456         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
457         (expand_iinc): Pass PC to update_aliases().
458         (STORE_INTERNAL): Likewise.
459         (process_jvm_instruction): Likewise.
460
461         * decl.c (base_decl_map): New variable.
462         (uniq): New variable.
463         (update_aliases): Rewrite with more thorough checking.
464         (debug_variable_p): New function.
465         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
466         (check_local_named_variable): Delete whole function.
467         (initialize_local_variable): New function.
468         (check_local_unnamed_variable): Add checks and comments.
469         (find_local_variable): Rewrite.
470         (java_replace_reference): New function.
471         (function_binding_level): New variable.
472         (pushdecl_function_level): New function.
473         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
474         (maybe_pushlevels): Call pushdecl() on each of the new decls.
475         (start_java_method): Reset uniq.  Create base_decl_map.  Set
476         function_binding_level.
477         (end_java_method): Null unused fields to save memory.
478
479 2004-06-29  Andrew Haley  <aph@redhat.com>
480
481         * except.c (expand_start_java_handler): Push a new binding level.
482         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
483         register_exception_range() to register where we'll do it.
484         (expand_end_java_handler): Remove old bogus code.  Replace with
485         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
486         the top of the expression we're curently building.
487         (maybe_end_try): Delete.
488         * decl.c (binding_level.exception_range): New field.
489         (clear_binding_level): Add field exception_range.  Reformat.
490         (poplevel): Call expand_end_java_handler().
491         (poplevel): Call java_add_stmt only if functionbody is false.
492         (maybe_poplevels): Don't call maybe_end_try() from here.
493         (end_java_method): Clear no longer used trees in function decl.
494         (register_exception_range): New function.
495         * java-tree.h (register_exception_range, struct eh_range): Declare.
496
497 2004-06-22  Andrew Haley  <aph@redhat.com>
498
499         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
500         the otable.
501         * check-init.c (get_variable_decl): Teach check-init about
502         FIELD_DECLs addressed via the otable.
503         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
504         CLASS_PARSED_P.
505
506 2004-05-28  Andrew Haley  <aph@redhat.com>
507
508         * jcf-parse.c (load_class): Don't try to read a class that we've
509         already read.
510
511         * expr.c (build_invokeinterface): Use the old-fashioned way of
512         doing indirect dispatch: look up interfaces by name.
513         * java-tree.h (enum java_tree_index): Add
514         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
515         * decl.c (java_init_decl_processing): Add
516         soft_lookupinterfacemethodbyname_node.
517
518         * gjavah.c (print_method_info): Final methods have vtable entries,
519         so gjavah needs to output them. 
520         * class.c (layout_class_method): Generate vtable entries for final
521         methods.
522         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
523         dispatch, even if a method is final.
524
525 2004-05-25  Andrew Haley  <aph@redhat.com>
526
527         * class.c (build_symbol_entry): Convert the names of constructors
528         to init_identifier_node when generating an entry for the indirect
529         dispatch table.
530         
531         * expr.c (build_known_method_ref): Generate indirect calls for
532         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
533
534 2004-05-24  Andrew Haley  <aph@redhat.com>
535
536         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
537         atable element is of the right type.
538
539         * class.c (build_static_field_ref): Cast pointer to correct type
540         for field.
541
542 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
543
544         * Merged with HEAD as of 20040514. Diff against
545         gcj-abi-2-merge-20040514.
546
547 2004-04-16  Andrew Haley  <aph@redhat.com>
548
549         * verify.c (check_pending_block): Disable subroutine checks.
550         (defer_merging): New function.
551         (merge_types): If types are dummy, use defer_merging to combine them.
552         (verify_jvm_instructions): If invocation is invokeinterface and
553         target is dummy, assume target really is an interface.
554
555         * parse.y (patch_invoke): Break out call to java_create_object.
556
557         * lang.c (flag_verify_invocations): New.
558
559         * jcf-parse.c (load_class): If we've already failed to load a
560         class, don't try again.
561         (load_class): If we can't find a .class file, don't fail, but emit
562         a warning.
563         (parse_class_file): Don't act on dummy methods.
564
565         * java-tree.h (flag_verify_invocations): New.
566         (TYPE_DUMMY): New.
567         (lang_type.dummy_class): New field.
568         (java_create_object): New function.
569         (METHOD_DUMMY): New.
570
571         * expr.c (build_field_ref): Widen field offset.
572         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
573         that each of its elements is compatible with the one we're
574         popping.
575         (pop_type_0): Issue a warning to say that we need to generate a
576         runtime check.
577         (java_create_object): New function.
578         (build_field_ref): Only generate hard refs if we're not using
579         indirect dispatch.
580         (expand_java_field_op): If we're using !verify_invocations and we
581         see a missing field, generate a decl for it.
582
583         (expand_invoke): If a class doesn't have the method we seek and
584         we're using !flag_verify_invocations, generate a decl for the
585         method now.
586
587         (build_known_method_ref): Always use indirect dispatch via the
588         atable for static methods.
589
590         (expand_java_NEW): Break out object creation into new function, 
591         java_create_object.
592
593         (can_widen_reference_to): Issue a warning to say that we need to
594         generate a runtime check.
595
596         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
597         (make_method_value): Also use index for interfaces.
598         (make_class_data): Skip dummy field for inherited data.
599         Don't build method array for dummy methods.
600         Set size_in_byte to -1 when using inirect dispatch
601         Don't build a hard class ref if we don't have a hard ref to our
602         superclass, or if we're using inirect dispatch.
603         Null out dispatch tables.
604
605         (layout_class_method): Don't complain about non-static method
606         overrides static method is method is artificial.
607
608         (build_static_field_ref): Disable atable references to static
609         fields for the time being.
610
611         (layout_class_methods): Check for CLASS_INTERFACE as
612         well as CLASS_ABSTRACT.
613
614 2004-11-24  Steven Bosscher  <stevenb@suse.de>
615
616         * class.c (make_class_data): Don't check flag_inline_functions.
617         * lang.c (flag_really_inline): Remove unused flag.
618         (java_handle_option): Don't set it here.  Remove special handling
619         of flag_inline_functions for Java.
620         (java_init): Don't set flag_inline_trees here.  Already done...
621         (java_post_options): ...here.  Don't clear flag_inline_functions.
622
623 2004-11-24  Steven Bosscher  <stevenb@suse.de>
624
625         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
626         (java_gimplify_exit_block_expr): New function.
627         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
628         LABELED_BLOCK_EXPR.
629         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
630         (EXIT_BLOCK_EXPR): Likewise.
631         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
632         (LABELED_BLOCK_BODY): Likewise.
633         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
634         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
635         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
636         TREE_OPERAND.
637         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
638         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
639         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
640         second operand of EXIT_BLOCK_EXPR.
641         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
642         TREE_OPERAND.
643         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
644
645 2004-11-23  Ben Elliston  <bje@au.ibm.com>
646
647         * xref.h (xref_flag_value): Remove.
648         (xref_set_data, xref_get_data): Likewise.
649         (xref_set_current_fp): Likewise.
650         (XREF_NONE): Likewise.
651         (XREF_GET_DATA): Likewise.
652         * xref.c (xref_flag_value): Remove.
653         (xref_set_data, xref_get_data): Likewise.
654         (xref_set_current_fp): Likewise.
655
656 2004-11-23  Ben Elliston  <bje@au.ibm.com>
657
658         * gjavah.c (output_directory): Make static.
659         (temp_directory): Likewise.
660         
661 2004-11-15  Tom Tromey  <tromey@redhat.com>
662
663         * decl.c (instn_ptr_type_node): Removed.
664         (lineNumbers_ptr_type_node): Removed.
665         (jint_type): Removed.
666         (jint_ptr_type): Removed.
667
668 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
669
670         PR java/15576
671         * check-init.c (check_init): Ignore DECL_EXPR.
672         * expr.c (always_initialize_class_p): Reenable.
673         (build_class_init): Use a variable to store the decl.  Also use
674         boolean_false_node instead of integer_zero_node.
675         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
676         to the block.
677
678 2004-11-08  Tom Tromey  <tromey@redhat.com>
679
680         PR java/16843:
681         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
682         generating a JNI header.
683         (print_field_info): Handle JNI headers.
684         (jni_print_float): Likewise.
685         (jni_print_double): Likewise.
686
687 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
688
689         * decl.c (end_java_method): Remove duplicated code.
690
691 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
692             Gerald Pfeifer  <gerald@pfeifer.com>
693
694         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
695         as well.
696
697 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
698
699         PR java/17265
700         * class.c: Reinstate 2004-08-18 patch. 
701         (make_local_function_alias): Don't create an alias for extern (native)
702         functions.
703
704 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
705
706         PR java/17265
707         * class.c (make_local_function_alias): Revert 2004-08-18 change.
708         (make_method_value): Likewise.
709
710 2004-10-21  Andrew Haley  <aph@redhat.com>
711
712         PR java/18091:
713         * jcf-parse.c (set_source_filename): Add code to build new sfname.
714
715 2004-10-20  Andrew Haley  <aph@redhat.com>
716
717         * decl.c (end_java_method): Don't expand if flag_syntax_only.
718         Remove duplicated code block.
719
720 2004-10-18  Steven Bosscher  <stevenb@suse.de>
721
722         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
723         New rules to work around old Bison warnings.
724
725 2004-10-17  Steven Bosscher  <stevenb@suse.de>
726
727         * class.c (ident_subst): Always alloca buffer.
728         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
729         opcode after including javaop.def.
730         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
731         conditional expression that exits, to avoid warnings.
732         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
733         a user of an extension.
734         * win32-host.c: Move check down to have non-empty file when
735         WIN32 is not defined.
736
737         * Make-lang.in (java-warn): Add STRICT_WARN.
738         (java/jcf-io.o-warn): Don't have Werror for this file.
739         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
740
741 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
742
743         * expr.c (expr_add_location): Move declaration to before all
744         statements.
745         * parse.y (java_expand_classes): Ditto.
746         * lex.c (java_peek_unicode): Ditto.
747
748 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
749
750         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
751         if possible, else convert `foo' to 'foo'.
752         * class.c: Likewise.
753         * decl.c: Likewise.
754         * expr.c: Likewise.
755         * jcf-io.c: Likewise.
756         * jcf-parse.c: Likewise.
757         * lang.c: Likewise.
758         * lex.c: Likewise.
759         * parse.h: Likewise.
760
761 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
762
763         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
764         rename parameter 'msg' to 'msgid' in function declaration.
765         (issue_warning_error_from_context): Likewise.
766         (yyerror): Rename parameter 'msg' to 'msgid'.
767         (all over): Use new quoting style for diagnostics.
768
769 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
770
771         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
772         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
773         Update copyright.
774
775 2004-10-14  Matt Austern  <austern@apple.com>
776
777         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
778         pointer_set_t* now.
779         
780 2004-10-13  Tom Tromey  <tromey@redhat.com>
781
782         PR java/15578:
783         * lang.opt (--extdirs): Document.
784         * jvspec.c (lang_specific_driver): Recognize -encoding and
785         -extdirs.
786
787 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
788
789         * parse.y (issue_warning_error_from_context): Use va_list *
790         instead of va_list parameter.
791         (parse_error_context): Update call.
792         (parse_warning_context): Likewise.
793
794 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
795
796         * parse.y, parse-scan.y: Add list of diagnostic messages to
797         insulate translation template from version of yacc/bison used
798         to compile the grammar.
799
800 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
801
802         Prepare for %q, %< and %> in diagnostic message strings.
803         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
804         Name second parameter 'msgid'.
805         * parse.y: Additionally include pretty-print.h and diagnostic.h.
806         (issue_warning_error_from_context): Use pretty-printer functions
807         instead of vsprintf for constructing formatted messages. Rename
808         parameter 'msg' to 'msgid'.
809         (parse_error_context): Rename parameter 'msg' to 'msgid'.
810         (parse_warning_context): Likewise.
811
812 2004-10-05  Andrew Haley  <aph@redhat.com>
813
814         PR java/17779
815         * jcf-parse.c (parse_zip_file_entries): If a class has a
816         superclass and a TYPE_SIZE of zero, lay it out.
817
818 2004-09-30  Andrew Haley  <aph@redhat.com>
819
820         PR java/17733
821         * jcf-parse.c (compute_class_name): Rewrite.
822
823 2004-10-01  Jan Hubicka  <jh@suse.cz>
824
825         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
826
827 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
828
829         * lex.c: Fix a comment typo.
830
831 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
832
833         * java-tree.h: Fix a comment typo.
834
835 2004-09-30  Per Bothner  <per@bothner.com>
836
837         Simplify lexer.  Implement --enable-mapped-location support.
838         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
839         (parse_source_file_1): Pass filename as extra parameter, so we can call
840         linemap_add and set input_location here, rather than in both callers.
841         (read_class): Pass copied filename to parse_source_file_1.
842         Don't initialize wfl_operator - only needed for source compilation.
843         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
844         * lex.h:  Remove a bunch of debugging macros.
845         * lex.h (struct_java_line, struct java_error):  Remove types.
846         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
847         (struct java_lc_s):  Remove prev_col field.
848         (struct java_lexer):  New fields next_unicode, next_columns, and
849         avail_unicode.  New position field, and maybe token_start field.
850         Don't need hit_eof field - use next_unicode == -1 instead.
851         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
852         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
853         * parse.h:  Various changes for USE_MAPPED_LOCATION.
854         (EXPR_WFL_EMIT_LINE_NOTE): XXX
855         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
856         (struct parser_ctxt):  New file_start_location field.
857         Remove p_line, c_line fields since we no longer save lines.
858         Remove elc, lineno, and current_jcf fields - no longer used.
859         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
860         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
861         source_location and is probably not needed anymore anyway.
862         Use new expr_add_Location function.
863         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
864         (java_pop_parser_context):  Minor cleanup.
865         (java_parser_context_save_global, java_parser_context_restore_global,
866         java_pop_parser_context):  Save/restore input_location as a unit.
867         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
868         a source_location instead of a wfl context node.
869         (check_class_interface_creation):  input_filename is not addressable.
870         (create_artificial_method):  Calling java_parser_context_save_global
871         and java_parser_context_restore_global is overkill.  Instead,
872         temporarily set input_location from class decl.
873         (java_layout_seen_class_methods): Set input_location from method decl.
874         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
875         (finish_loop_body):  Likewise.
876         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
877         (java_sprint_unicode):  Take a character, not index in line.
878         (java_sneak_uncode):  Replaced by java_peek_unicode.
879         (java_unget_unicode):  No longer used.
880         (java_allocate_new_line. java_store_unicode):  Removed, since we
881         no longer remember "lines".
882         (java_new_lexer):  Update for new data structures.
883         (java_read_char):  Move unget_value checking to java_read_unicode.
884         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
885         efficient functions that are used directly when lexing.
886         (java_read_unicode_collapsing_terminators):  No longer needed.
887         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
888         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
889         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
890         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
891         combine switch branches, and test for common token kinds earlier.
892         (java_lex_error):  Rewrite.
893         * jv-scan.c (expand_location): New function, copied from tree.c.
894         (main): Set ctxp->filename instead of setting input_filename directly.
895
896 2004-09-30  Per Bothner  <per@bothner.com>
897
898         More cleanup for --enable-mapped-location.
899         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
900         input_location here.  Instead do it in give_name_to_class.
901         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
902         * expr.c (expand_byte_code): Call linemap_line_start.
903         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
904         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
905         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
906         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
907         to USE_MAPPED_LOCATION case.
908
909         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
910         * jcf-parse.c (java_parse_file): Don't set input_filename.
911         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
912         Create a list of TRANSLATION_UNIT_DECL.
913         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
914         reason is so we can set a DECL_SOURCE_LOCATION for each file.
915         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
916         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
917         (file_start_location):  New static.
918         (set_source_filename):  Avoid extra access to input_filename macro.
919         Concatenate new name with class's package prefix.
920         (set_source_filename, give_name_to_class): Update.
921         (give_name_to_class):  Set class's "line 0" input_location here.
922         (parse_class_file):  Set input_location as a unit.
923
924         * jcf-parse.c (load_class): Sanity test if missing inner class file.
925
926 2004-09-29  Per Bothner  <per@bothner.com>
927
928         * java-tree.h:  Redefine some macros and add some declaration
929         to handle the USE_MAPPED_LOCATION case.
930         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
931         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
932         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
933         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
934
935         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
936         * decl.c (finish_method, java_add_stmt): Likewise.
937         * java-gimplify.c (java-gimplify.c):  Likewise.
938         * jcf-write.c (generate_bytecode_insns):  Likewise.
939         * lang.c (java_post_options): Likewise - call linemap_add.
940
941 2004-09-29  Andrew Haley  <aph@redhat.com>
942
943         PR java/17007
944         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
945         result of TRUNC_MOD_EXPR.
946         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
947         * decl.c (java_init_decl_processing): Mark
948         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
949
950 2004-09-28  Tom Tromey  <tromey@redhat.com>
951
952         PR java/15710:
953         * class.c (add_miranda_methods): Load superinterface if not
954         already loaded.
955
956 2004-09-28  Andrew Haley  <aph@redhat.com>
957
958         PR java/17586
959         * jcf-parse.c (load_class): Don't try to read a class that we've
960         already read.
961
962 2004-09-28  Andrew Haley  <aph@redhat.com>
963
964         * jcf-parse.c (load_class): Back out previous broken patch.
965
966 2004-09-28  Andrew Haley  <aph@redhat.com>
967
968         PR java/17586
969         * jcf-parse.c (load_class): Don't try to read a class that we've
970         already read.
971         Check that we really did read the right class.
972
973 2004-09-25  Tom Tromey  <tromey@redhat.com>
974
975         PR java/17500:
976         * parse.y (create_artificial_method): Use add_method_1.
977
978 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
979
980         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
981         comment typos.
982         * gcj.texi: Fix typos.
983
984 2004-09-24  Tom Tromey  <tromey@redhat.com>
985
986         PR java/15656:
987         * parse.y (class_instance_creation_expression): Set `$$' to NULL
988         in error parts of rule.
989         (unary_expression): Don't call error_if_numeric_overflow when $1
990         is NULL.
991
992 2004-09-24  Tom Tromey  <tromey@redhat.com>
993
994         PR java/16789:
995         * parse.y (resolve_qualified_expression_name): Set
996         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
997         * expr.c (force_evaluation_order): Check for empty argument list
998         after stripping COMPOUND_EXPR.
999
1000 2004-09-23  Andrew Haley  <aph@redhat.com>
1001
1002         PR java/16927:
1003         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1004         COND_EXPRs.
1005
1006 2004-09-23  Tom Tromey  <tromey@redhat.com>
1007
1008         PR java/17329:
1009         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1010         where operand is null.
1011
1012 2004-09-23  Tom Tromey  <tromey@redhat.com>
1013
1014         PR java/17380:
1015         * parse.y (not_accessible_p): Allow access to protected members
1016         even when class is not static.
1017
1018 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
1019
1020         * Make-lang.in: Revert the gcc-none.o change.
1021
1022 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
1023
1024         * parse.y (patch_anonymous_class): VEC_space returns true if there
1025         is space.
1026
1027 2004-09-21  Matt Austern  <austern@apple.com>
1028
1029         Fix bootstrap.
1030         * gjavah.c (free_method_name_list): Fix function definition so
1031         it's a proper C prototype.
1032
1033 2004-09-21  Tom Tromey  <tromey@redhat.com>
1034
1035         PR java/17575:
1036         * gjavah.c (free_method_name_list): New method.
1037         (main): Call it.
1038
1039 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
1040             Zack Weinberg  <zack@codesourcery.com>
1041
1042         * java-tree.def: Use tree_code_class enumeration constants
1043         instead of code letters.
1044         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1045         new tree-class enumeration constants.
1046
1047 2004-09-13  Tom Tromey  <tromey@redhat.com>
1048
1049         PR java/17216:
1050         * class.c (layout_class_method): Put synthetic methods into the
1051         vtable.
1052
1053 2004-09-11  Andrew Pinski  <apinski@apple.com>
1054
1055         * Make-lang.in (java/ggc-none.c): Change dependency
1056         for ggc.h into $(GGC_H).
1057
1058 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
1059
1060         * Make-lang.in (java/win32-host.o): Add dependency on
1061         coretypes.h.
1062         * win32-host.c: Add includes for coretypes.h, jcf.h
1063
1064 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
1065
1066         * Make-lang.in (GCJH_OBJS): Change dependency from
1067         ggc-none.o to java/ggc-none.o
1068         (JCFDUMP_OBJS): Likewise.
1069         (java/ggc-none.o): New target.
1070
1071 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
1072
1073         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
1074         * class.c (build_utf8_ref, build_static_field_ref,
1075         make_field_value, make_method_value, get_dispatch_table,
1076         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1077         * constants.c (get_tag_node, build_ref_from_constant_pool,
1078         build_constants_constructor): Likewise.
1079         * decl.c (java_init_decl_processing): Likewise.
1080         * expr.c (build_java_array_length_access, build_newarray,
1081         expand_java_multianewarray, expand_java_pushc, expand_iinc,
1082         build_java_binop, build_field_ref, expand_java_add_case,
1083         expand_java_call, build_known_method_ref, build_invokevirtual,
1084         build_invokeinterface, build_jni_stub): Likewise.
1085         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1086         * jcf-parse.c (get_constant): Likewise.
1087         * lex.c (do_java_lex): Likewise.
1088         * parse.y (patch_binop, patch_unaryop, patch_cast,
1089         build_newarray_node, patch_newarray): Likewise.
1090         * resource.c (compile_resource_data): Likewise.
1091         * typeck.c (build_prim_array_type): Likewise.
1092
1093 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1094
1095         * decl.c (java_init_decl_processing): Adjust
1096         initialize_sizetypes call.
1097
1098 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
1099
1100         * jv-scan.c (fancy_abort): Add.
1101
1102 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1103
1104         * expr.c (build_java_arrayaccess): Use convert to change
1105         len's type.
1106
1107 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
1108
1109         * class.c (make_local_function_alias): Allocate extra space for 'L'
1110         in name buffer. Reported by Thomas Neumann.
1111
1112 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
1113
1114         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1115         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
1116         * lex.c (do_java_lex): Adjust.
1117         (error_if_numeric_overflow): Likewise.
1118
1119 2004-08-18  Andrew Pinski  <apinski@apple.com>
1120
1121         * class.c (make_local_function_alias): Only make a new decl if we
1122         support alias attribute on all decls.
1123
1124 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
1125
1126         * class.c (make_local_function_alias): New function. Create local
1127         alias for public method DECL.
1128         (make_method_value): Use make_local_function_alias.
1129         * parse.y (craft_constructor): Don't special-case anonymous classes.
1130         Always set ctor_name to init_identifier_node.
1131         (lookup_method_invoke): Call layout_class_method when creating
1132         anonymous class constructor.
1133
1134 2004-08-18  Richard Henderson  <rth@redhat.com>
1135
1136         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1137         default case.  Treat '<' similarly.  Update for
1138         is_gimple_formal_tmp_var name change.
1139
1140 2004-08-17  Andrew Haley  <aph@redhat.com>
1141
1142         * lang.c (lang_printable_name): Obey verbose flag.
1143         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1144         lang_printable_name().
1145         (verify_constructor_circularity, get_printable_method_name,
1146         check_abstract_method_definitions, java_check_regular_methods,
1147         java_check_abstract_methods, check_inner_class_access,
1148         fix_constructors, patch_method_invocation, patch_return):
1149         Likewise.
1150         * expr.c (pop_type_0): Likewise.
1151
1152         * java-tree.h (lang_printable_name_wls): Delete.
1153
1154 2004-08-16  Tom Tromey  <tromey@redhat.com>
1155
1156         PR java/8473:
1157         * parse.y (primary): Changed for initialized and uninitialized
1158         array creations.
1159         (array_access): Handle array_creation_initialized.
1160         (array_creation_expression): Split into
1161         array_creation_initialized and array_creation_uninitialized.
1162
1163 2004-08-16  Andrew Haley  <aph@redhat.com>
1164
1165         * jcf-write.c (find_constant_index): Canonicalize NaNs when
1166         generating bytecode.
1167
1168 2004-08-16  Elliot Lee <sopwith@redhat.com>
1169
1170         PR java/9677
1171         * jcf-parse.c (java_parse_file): Handle filenames with embedded
1172         spaces, and quoted filelists.
1173
1174 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1175
1176         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1177         * class.c (build_utf8_ref, build_static_field_ref,
1178         make_field_value, make_method_value, get_dispatch_table,
1179         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1180         * constants.c (get_tag_node,  build_ref_from_constant_pool,
1181         build_constants_constructor): Likewise.
1182         * decl.c (java_init_decl_processing): Likewise.
1183         * expr.c (build_java_array_length_access, build_newarray,
1184         expand_java_multianewarray, expand_java_pushc, expand_iinc,
1185         build_java_binop, build_field_ref, expand_java_add_case,
1186         expand_java_call, build_known_method_ref, build_invokevirtual,
1187         build_invokeinterface, build_jni_stub): Likewise.
1188         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1189         * jcf-parse.c (get_constant): Likewise.
1190         * lex.c (do_java_lex): Likewise.
1191         * parse.y (patch_binop, patch_unaryop, patch_cast,
1192         build_null_of_type, patch_newarray): Likewise.
1193         * resource.c (compile_resource_data): Likewise.
1194         * typeck.c (build_prim_array_type): Likewise.
1195
1196 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
1197
1198         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1199         Don't create BLOCK here or call java_gimplify_block.
1200
1201 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
1202
1203         * java-tree.h (flag_deprecated): Removed.
1204         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1205         * parse.y (check_deprecation): Check warn_deprecated instead of
1206         flag_deprecated.
1207
1208 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
1209
1210         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1211         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1212         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1213         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1214         flag_force_classes_archive_check, flag_optimize_sci,
1215         flag_indirect_dispatch): Remove explicit declarations.
1216         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
1217         final comment.
1218
1219 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
1220
1221         PR bootstrap/14893
1222         * Make-lang.in (java.install-man): Install from either build
1223         tree or source tree, whichever has the file first.
1224
1225 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
1226
1227         * jcf-parse.c (get_constant): Adjust force_fit_type call.
1228         * lex.h (SET_LVAL_NODE_TYPE): Remove.
1229         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1230         (do_java_lex): Likewise. Adjust force_fit_type call.
1231
1232 2004-08-04  Roger Sayle  <roger@eyesopen.com>
1233             Andrew Haley  <aph@redhat.com>
1234
1235         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1236         checking trees as they're being built.
1237         (convert): Call convert_ieee_real_to_integer if we're
1238         converting a constant, even if we're writing a class file.
1239
1240 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
1241
1242         PR java/16701
1243         * parse.y (fold_constant_for_init): Call resolve_field_access with
1244         correct current_class context.
1245
1246 2004-08-01  Roger Sayle  <roger@eyesopen.com>
1247
1248         * decl.c (update_aliases, initialize_local_variable): Replace calls
1249         to build with calls to buildN.
1250         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1251         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1252         * parse.h (BUILD_THROW): Likewise.
1253         * parse.y (switch_expression, synchronized_statement,
1254         catch_clause_parameter, array_creation_expression,
1255         conditional_expression, make_qualified_name,
1256         resolve_qualified_expression_name, patch_method_invocation,
1257         patch_invoke, build_method_invocation, build_new_invocation,
1258         build_assignment, patch_assignment, build_binop, patch_binop,
1259         build_string_concatenation, build_incdec, patch_unaryop,
1260         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1261         patch_return, build_if_else_statement, build_labeled_block,
1262         build_new_loop, build_loop_body, build_bc_statement,
1263         build_assertion, encapsulate_with_try_catch, build_try_statement,
1264         build_try_finally_statement, patch_synchronized_statement,
1265         emit_test_initialization): Likewise, replace build with buildN.
1266
1267 2004-07-28  Eric Christopher  <echristo@redhat.com>
1268
1269         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1270         (java_unsafe_for_reeval): Ditto.
1271
1272 2004-07-26    <hp@bitrange.com>
1273
1274         * parse.y (build_super_invocation): Adjust declaration order to
1275         avoid declaration after statement.
1276
1277 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
1278
1279         * decl.c: Rename all identifiers named `class' to `cl'.
1280
1281 2004-07-25  Richard Henderson  <rth@redhat.com>
1282
1283         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1284
1285 2004-07-23  Mike Stump  <mrs@apple.com>
1286
1287         * boehm.c (set_bit): Improve type safety wrt unsignedness.
1288         * gjavah.c (throwable_p, decode_signature_piece,
1289         print_full_cxx_name, print_include, add_namelet, add_class_decl,
1290         process_file): Likewise.
1291         * jcf-dump.c (main): Likewise.
1292         * jcf-io.c (read_zip_member): Likewise.
1293         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1294         give_name_to_class, get_class_constant): Likewise.
1295         * jcf-write.c (find_constant_wide, push_long_const,
1296         generate_classfile): Likewise.
1297         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1298         * parse.y (read_import_dir): Likewise.
1299         * typeck.c (parse_signature_type): Likewise.
1300         * verify.c (verify_jvm_instructions): Likewise.
1301         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1302
1303 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
1304
1305         * Make-lang.in: Replace rmic and rmiregistry references with
1306         grmic and grmiregistry.
1307         * gcj.texi: Likewise.
1308
1309 2004-07-20  Andrew Haley  <aph@redhat.com>
1310
1311         PR java/16431.
1312         * verify.c (verify_jvm_instructions): Comment change only.
1313
1314         * typeck.c (build_java_array_type): Add size field to array name.
1315
1316         * java-tree.h (LOCAL_SLOT_P): New.
1317         (update_aliases): Add PC argument.
1318         (pushdecl_function_level): New function.
1319
1320         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1321         MODIFY_EXPR, and SAVE_EXPR.
1322         (java_gimplify_modify_expr): New function.
1323
1324         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1325         (expand_iinc): Pass PC to update_aliases().
1326         (STORE_INTERNAL): Likewise.
1327         (process_jvm_instruction): Likewise.
1328
1329         * decl.c (base_decl_map): New variable.
1330         (uniq): New variable.
1331         (update_aliases): Rewrite with more thorough checking.
1332         (debug_variable_p): New function.
1333         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
1334         (check_local_named_variable): Delete whole function.
1335         (initialize_local_variable): New function.
1336         (check_local_unnamed_variable): Add checks and comments.
1337         (find_local_variable): Rewrite.
1338         (java_replace_reference): New function.
1339         (function_binding_level): New variable.
1340         (pushdecl_function_level): New function.
1341         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1342         (maybe_pushlevels): Call pushdecl() on each of the new decls.
1343         (start_java_method): Reset uniq.  Create base_decl_map.  Set
1344         function_binding_level.
1345         (end_java_method): Null unused fields to save memory.
1346
1347 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
1348
1349         * class.c (add_interface_do): Remove.
1350         (set_super_info, interface_of_p, maybe_add_interface,
1351         add_interface, make_class_data, layout_class,
1352         add_miranda_methods): Adjust BINFO accessors and addition.
1353         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1354         accessors.
1355         * jcf-write.c (generate_classfile): Likewise.
1356         * parse.y (patch_anonymous_class, check_inner_circular_reference,
1357         check_circular_reference, java_complete_class,
1358         check_abstract_method_definitions,
1359         java_check_abstract_method_definitions,
1360         check_interface_throws_clauses, java_check_abstract_methods,
1361         lookup_java_interface_method2,
1362         find_applicable_accessible_methods_list): Adjust BINFO accessors
1363         and addition.
1364         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1365
1366 2004-07-18  Roger Sayle  <roger@eyesopen.com>
1367
1368         * builtins.c (max_builtin, min_builtin,
1369         java_build_function_call_expr): Replace calls to build with buildN.
1370         * class.c (build_class_ref, build_static_field_ref,
1371         get_dispatch_table, make_class_data, layout_class_method): Likewise.
1372         * constants.c (build_ref_from_constant_pool): Likewise.
1373         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1374         add_stmt_to_compound): Likewise.
1375         * except.c (build_exception_object_ref, expand_end_java_handler):
1376         Likewise.
1377         * java-gimplify.c (java_gimplify_case_expr,
1378         java_gimplify_default_expr, java_gimplify_block,
1379         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1380         * jcf-write.c (generate_bytecode_insns): Likewise.
1381         * typeck.c (convert_ieee_real_to_integer): Likewise.
1382
1383 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
1384
1385         * java-tree.h (builtin_function): Declare.
1386
1387 2004-07-16  Steven Bosscher  <stevenb@suse.de>
1388
1389         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1390         abuse restore_line_number_status.
1391
1392 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
1393
1394         g++/15861
1395         * jcf-parse.c (java_emit_static_constructor): Specify default
1396         priority.
1397
1398 2004-07-13  Per Bothner  <per@bothner.com>
1399
1400         * java-tree.h (all_class_filename):  Remove useless macro.
1401         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
1402         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
1403         * parse.y (java_parser_context_restore_global):  Replace
1404         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1405         * jcf-parse.c (read_class, java_parse_file):  Likewise.
1406
1407 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1408
1409         PR java/16474
1410         gjavah.c (print_field_info): Emit constant only if field is static.
1411
1412 2004-07-11  Roger Sayle  <roger@eyesopen.com>
1413
1414         * expr.c (java_truthvalue_conversion, flush_quick_stack,
1415         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1416         build_java_ret, build_java_throw_out_of_bounds_exception,
1417         build_java_array_length_access, java_check_reference,
1418         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1419         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1420         expand_java_arrayload, build_java_monitor, expand_java_return,
1421         expand_load_internal, expand_java_NEW, build_get_class,
1422         build_instanceof, expand_java_CHECKCAST, expand_iinc,
1423         build_java_soft_divmod, build_java_binop, build_field_ref,
1424         expand_compare, expand_java_goto, expand_java_switch,
1425         expand_java_add_case, build_class_init, build_known_method_ref,
1426         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1427         expand_invoke, build_jni_stub, expand_java_field_op,
1428         java_expand_expr, expand_byte_code, STORE_INTERNAL,
1429         force_evaluation_order, emit_init_test_initialization): Convert
1430         calls to "build" into calls to the prefered "buildN" functions.
1431
1432 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
1433
1434         * java-tree.h (set_block): Remove.
1435         * lang.c (java_clear_binding_stack): New.
1436         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1437         * decl.c (struct binding_level): Remove this_block.
1438         (clear_binding_level): Likewise.
1439         (poplevel): Don't handle this_block.
1440         (set_block): Remove.
1441
1442 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
1443
1444         * class.c (common_enclosing_context_p): Remove statement with no
1445         side-effects.
1446
1447 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
1448
1449         PR java/8618
1450         * parse.y (create_anonymous_class): Remove 'location' argument. Use
1451         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
1452         (craft_constructor): Inherit access flags for implicit constructor
1453         from the enclosing class.
1454         (create_class): Fix comment typo.
1455         (resolve_qualified_expression_name): Pass type of qualifier to
1456         not_accessible_p, not the type in which target field was found.
1457         (not_accessible_p): Handle inner classes. Expand protected
1458         qualifier-subtype check to enclosing instances, but don't apply this
1459         check to static members. Allow protected access to inner classes
1460         of a subtype. Allow private access within common enclosing context.
1461         (build_super_invocation): Get WFL line number info from current
1462         class decl.
1463         (build_incomplete_class_ref): Update for new create_anonymous_class
1464         signature.
1465         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
1466         common_enclosing_instance_p.
1467         * class.c (common_enclosing_context_p): New. Determine if types
1468         share a common enclosing context, even across static contexts.
1469         (common_enclosing_instance_p): Renamed from
1470         common_enclosing_context_p. Determines if types share a common
1471         non-static enclosing instance.
1472         * java-tree.h (common_enclosing_instance_p): Declare.
1473         * jcf-write.c (get_method_access_flags): New. Surpress private flag
1474         for inner class constructors.
1475         (generate_classfile): Use get_method_access_flags.
1476
1477 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
1478
1479         * class.c (interface_of_p): Check for null TYPE_BINFO.
1480
1481 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
1482
1483         * class.c (make_class): Do not create binfo here.
1484         (set_super_info): Create it here.
1485         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
1486
1487 2004-07-08  Richard Henderson  <rth@redhat.com>
1488
1489         * expr.c (case_identity, get_primitive_array_vtable,
1490         java_expand_expr, emit_init_test_initialization): Remove.
1491         * java-tree.h (java_expand_expr): Remove.
1492         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
1493
1494 2004-07-07  Per Bothner  <per@bothner.com>
1495
1496         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
1497         get internal error due to mismatched types.
1498
1499         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
1500
1501         * gcj.texi (Linking):   New node.  Document -lgij usage.
1502
1503 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1504
1505         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
1506         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
1507         * java/class.c (set_super_info, class_depth, interface_of_p,
1508         maybe_add_interface, add_interface, make_class_data,
1509         layout_class, add_miranda_methods): Adjust BINFO macros.
1510         * expr.c (can_widen_reference_to, lookup_field): Likewise.
1511         * jcf-write.c (generate_classfile): Likewise.
1512         * parse.y (patch_anonymous_class,
1513         check_inner_circular_reference, check_circular_reference,
1514         java_complete_class, check_abstract_method_definitions,
1515         java_check_abstract_method_definitions,
1516         check_interface_throws_clauses, java_check_abstract_methods,
1517         lookup_java_interface_method2,
1518         find_applicable_accessible_methods_list): Likewise.
1519         * typeck.c (find_method_in_interface): Likewise.
1520         * verify.c (merge_types): Likewise.
1521
1522 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
1523
1524         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
1525         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
1526
1527 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
1528
1529         * class.c (make_class): Use make_tree_binfo.
1530         (set_super_info, add_interface_do): Likewise.
1531         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
1532
1533 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
1534
1535         * verify.c: Correct array element access formatting thinko.
1536
1537 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
1538
1539         * verify.c: Insert a short blurb at the start referring to the JVMS.
1540         (merge_type_state): Remove redundant nested if statement.
1541         (verify_jvm_instructions): Ensure current_subr is initialised to
1542         NULL_TREE.
1543         Minor formatting fixes all over the place.
1544
1545 2004-07-02  Richard Henderson  <rth@redhat.com>
1546
1547         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
1548
1549 2004-07-01  Richard Henderson  <rth@redhat.com>
1550
1551         * class.c (registerClass_libfunc): Remove.
1552         (init_class_processing): Don't set it.
1553         (emit_register_classes): Take list_p parameter.  Fill it in
1554         with _Jv_RegisterClass calls.
1555         * decl.c (java_init_decl_processing): Don't call
1556         init_resource_processing.
1557         * jcf-parse.c (java_emit_static_constructor): New.
1558         (java_parse_file): Call it.
1559         * resource.c (registerResource_libfunc): Remove.
1560         (init_resource_processing): Remove.
1561         (write_resource_constructor): Take list_p parameter.  Fill it in
1562         with _Jv_RegisterResource calls.
1563         * java-tree.h: Update prototypes.
1564
1565 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
1566
1567         PR java/1262
1568         * class.c (layout_class_method): Do not override package-private
1569         method if its in a different package.
1570         (split_qualified_name): Move here from parse.y. Rename from
1571         breakdown_qualified. Add comment.
1572         (in_same_package): Move here from parse.y. Add comment.
1573         * java-tree.h (break_down_qualified, in_same_package): Declare.
1574         (in_same_package): Likewise.
1575         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
1576         Callers updated.
1577
1578 2004-06-29  Andrew Haley  <aph@redhat.com>
1579
1580         * except.c (expand_start_java_handler): Push a new binding level.
1581         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
1582         register_exception_range() to register where we'll do it.
1583         (expand_end_java_handler): Remove old bogus code.  Replace with
1584         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1585         the top of the expression we're curently building.
1586         (maybe_end_try): Delete.
1587         * decl.c (binding_level.exception_range): New field.
1588         (clear_binding_level): Add field exception_range.  Reformat.
1589         (poplevel): Call expand_end_java_handler().
1590         (poplevel): Call java_add_stmt only if functionbody is false.
1591         (maybe_poplevels): Don't call maybe_end_try() from here.
1592         (end_java_method): Clear no longer used trees in function decl.
1593         (register_exception_range): New function.
1594         * java-tree.h (register_exception_range, struct eh_range): Declare.
1595
1596 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
1597
1598         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
1599
1600 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
1601
1602         Formatting fixes.
1603         * expr.c (class_has_finalize_method): Fix method name indentation.
1604         (expand_java_call): Remove K&R style parameter declaration.
1605         (expand_invoke): Fix statement indentation.
1606         (expand_java_field_op): Likewise.
1607         * parse-scan.y: Fix typo.
1608         (reset_report): Fix method name indentation.
1609         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
1610         line. Fix typos.
1611         * verify.c (verify_jvm_instructions): Document parameters, insert
1612         page break.
1613         * lang.c (lang_init_source): Fix method name indentation.
1614         * class.c (common_enclosing_context_p): Likewise.
1615         (emit_symbol_table): Fix parameter list indentation.
1616         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
1617         parameter declaration.
1618         * constants.c: Fix copyright notice indentation.
1619         * typeck.c (find_method_in_superclasses): Fix parameter list
1620         indentation.
1621         (find_method_in_interfaces): Likewise.
1622         * zextract.c (makelong): Fix method name indentation.
1623
1624 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
1625
1626         PR java/15715.
1627         * parse.y (create_interface): Set correct access modifiers for
1628         interfaces.
1629         * jcf-write.c (get_classfile_modifiers): New function.
1630         (generate_classfile): Use get_classfile_modifiers, not
1631         get_access_flags.
1632
1633 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
1634
1635         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
1636         dependency to current parser context, not NULL_TREE, for top-level
1637         classes.
1638         (jdep_resolve_class): Enable member access check for all inner
1639         class dependencies.
1640
1641 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
1642
1643         * parse.y (qualify_and_find): Pass type decl, not identifier, to
1644         load_class.
1645
1646 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
1647
1648         PR java/15734
1649         * expr.c (expand_java_field_op): Ensure that target class for static
1650         field access has been loaded.
1651
1652 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
1653             Ranjit Mathew  <rmathew@hotmail.com>
1654
1655         PR java/1207, java/16178
1656         * jcf-parse.c (load_class): Return immediately if passed a type decl
1657         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
1658         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
1659         before calling load_class.
1660         (qualify_and_find): Likewise.
1661         (find_in_imports_on_demand): Likewise.
1662         (find_applicable_accessible_methods_list): Likewise.
1663
1664 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
1665
1666         * parse.y (java_layout_seen_class_methods): Don't call load_class
1667         on class defined by source parser.
1668
1669 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
1670
1671         * parse.y (set_nested_class_simple_name_value): Removed.
1672         (java_complete_expand_class): Remove calls to
1673         set_nested_class_simple_name_value.
1674
1675 2004-06-22  Andrew Haley  <aph@redhat.com>
1676             Ranjit Mathew  <rmathew@hotmail.com>
1677
1678         Fixes PR java/16113.
1679         * decl.c (force_poplevels): Remove call to expand_end_bindings.
1680
1681 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
1682
1683         * parse.y (create_class): Correct diagnostic message about
1684         java.lang.Object extending anything else.
1685
1686 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1687
1688         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
1689         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
1690         * constants.c (build_ref_from_constant_pool): Likewise.
1691         * expr.c (build_java_array_length_access): Likewise.
1692         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
1693         (invoke_build_dtable, build_invokevirtual): Likewise.
1694         (build_invokeinterface, java_expand_expr): Likewise.
1695         (emit_init_test_initialization): Likewise.
1696         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1697         * parse.y (make_qualifed_name, build_array_ref): Likewise.
1698
1699 2004-06-21  Andrew Haley  <aph@redhat.com>
1700
1701         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
1702         block.
1703
1704 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
1705
1706         * jcf.h (struct JCF): Change java_source, right_zip and finished
1707         to unsigned int.
1708         * lex.h (struct java_lexer): Change hit_eof, read_anything,
1709         byte_swap and use_fallback to unsigned int.
1710         * parse.h (struct _jdep): Change flag0 to unsigned int.
1711
1712 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
1713
1714         Fixes PR java/13948
1715         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
1716         before trying to lay out its methods.
1717         * jcf-parse.c (read_class): Track parsed files using canonical paths
1718         obtained via lrealpath from libiberty.
1719         (java_parse_file): Likewise.
1720         (parse_source_file_1): Rename formal parameter to reflect its
1721         modified purpose. Minor formatting fix.
1722
1723 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1724
1725         * class.c (emit_register_classes): Make the function uninlinable,
1726         do not set current_function_cannot_inline.
1727         * resource.c (write_resource_constructor): Do not reset
1728         flag_inline_functions around rest_of_compilation.
1729
1730 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
1731
1732         PR java/15769
1733         * expr.c (java_truthvalue_conversion): Handle
1734         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
1735         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
1736         i.e. return the expression.
1737
1738 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
1739
1740         * gjavah.c: Include version.h
1741
1742 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
1743
1744         * jcf-write.c (generate_bytecode_conditional): Correct handling
1745         of unordered conditionals. Add comment.
1746
1747 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
1748             Per Bothner  <per@bothner.com>
1749
1750         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
1751         local variable was initialised upon declaration.
1752         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
1753         variable was final and initialised upon declaration.
1754         * check-init.c (check_final_reassigned): Give error only if a blank
1755         final is not definitely unassigned or if an initialised final is
1756         reassigned.
1757         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
1758         assignment expressions. Remove case MODIFY_EXPR, label do_default.
1759         (check_init): Perform initialised-variable-removing-optimisation
1760         only on non-final local variables.
1761
1762 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
1763
1764         * jcf-write.c (generate_bytecode_conditional): Handle binops
1765         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
1766         and LTGT_EXPR.
1767         (generate_bytecode_insns): Likewise.
1768
1769 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
1770
1771         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
1772         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
1773
1774 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
1775
1776         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
1777         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
1778
1779 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1780
1781         * decl.c (struct binding_level): Add GTY marker. Compile
1782         binding_depth unconditionally.
1783         (current_binding_level, free_binding_level, global_binding_level):
1784         Likewise.
1785         (clear_binding_level): Unconditionally set binding_depth.
1786         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
1787
1788 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1789
1790         * lex.c (java_new_lexer): Set 'encoding'.
1791         (java_read_char): Improve error message for unrecognized characters.
1792         * lex.h (struct java_lexer): New field 'encoding'.
1793
1794 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1795
1796         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
1797
1798 2004-05-21  Mark Wielaard  <mark@klomp.org>
1799
1800         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
1801         extern.
1802
1803 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
1804
1805         * typeck.c: Remove non-printable character 160.
1806
1807 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
1808
1809         * check-init.c: Correct minor typos.
1810
1811 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1812
1813         * Make-lang.in, expr.c, java-gimplify.c: Rename
1814         tree-simple.[ch] to tree-gimple.[ch].
1815
1816 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
1817
1818         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
1819
1820 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1821
1822         Merge from tree-ssa-20020619-branch.  See
1823         ChangeLog.tree-ssa for details.
1824
1825         * Make-lang.in, builtins.c, check-init.c, class.c,
1826         constants.c, decl.c, except.c, expr.c, java-except.h,
1827         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
1828         lang.c, lang.opt, parse.y, resource.c: Merged.
1829         * java-gimplify.c: New file.
1830
1831 2004-05-10  Andrew Haley  <aph@redhat.com>
1832
1833         * parse.y (create_class): Set TYPE_VFIELD.
1834         * decl.c (java_init_decl_processing): Likewise.
1835
1836         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
1837         * class.c (make_method_value): Replace DECL_VINDEX with call to
1838         get_method_index().
1839         (get_dispatch_vector): Likewise.
1840         (layout_class_method): Likewise.
1841         Replace set of DECL_VINDEX with call to set_method_index().
1842         (set_method_index): New function.
1843         (get_method_index): New function.
1844         * java-tree.h (set_method_index): New function decl.
1845         (get_method_index): New function decl.
1846
1847 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
1848
1849         * parse.y (check_pkg_class_access): Add new argument
1850         and use it when cl is NULL to call lookup_cl on it.
1851         (parser_check_super_interface): Do not call lookup_cl.
1852         Pass this_decl to check_pkg_class_access and NULL
1853         instead of lookup_cl.
1854         (parser_check_super): Update for change in
1855         check_pkg_class_access.
1856         (do_resolve_class): Likewise.
1857         (process_imports): Likewise.
1858         (find_in_imports_on_demand): Likewise.
1859         (resolve_qualified_expression_name): Likewise.
1860
1861 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
1862
1863         Fixes PR java/9685, PR java/15073
1864         * parse.y (accessibility_string): New method.
1865         (not_accessible_field_error): Use accessibility_string()
1866         instead of java_accstring_lookup().
1867         (resolve_qualified_expression_name): Check with
1868         check_pkg_class_access() before allowing access using
1869         qualified names.
1870         Fix comment typo.
1871         Use check_pkg_class_access() instead of not_accessible_p()
1872         for unqualified types.
1873         (not_accessible_p): Use DECL_CONTEXT (member) instead of
1874         REFERENCE for package-private access checking.
1875         (patch_method_invocation): Use accessibility_string() instead
1876         of java_accstring_lookup().
1877
1878 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
1879
1880         Fixes PR java/15133
1881         * gjavah.c (struct method_name): Add member is_native.
1882         (overloaded_jni_method_exists_p): Match candidate method only if
1883         it is native.
1884         (print_method_info): Initialise is_native flag from the method's
1885         access flags.
1886
1887 2004-04-30  Roger Sayle  <roger@eyesopen.com>
1888
1889         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
1890         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
1891
1892 2004-04-22  Roger Sayle  <roger@eyesopen.com>
1893
1894         * resource.c (write_resource_constructor): Guard call to possibly
1895         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
1896
1897 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
1898
1899         * class.c (make_class_data): Add new field aux_info.
1900         * decl.c (java_init_decl_processing): Push type and decl for
1901         `aux_info'.
1902
1903 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
1904
1905         * expr.c (expand_java_NEW): Don't use size argument for
1906         _Jv_AllocObject calls.
1907         * parse.y (patch_invoke): Likewise.
1908
1909 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
1910
1911         * expr.c (build_invokeinterface): Remove unused variables to
1912         fix warnings.
1913
1914 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
1915
1916         * class.c (get_interface_method_index): New function. Return dispatch
1917         index for interface method.
1918         (make_method_value): For interface methods, set index field to
1919         iface dispatch index, not DECL_VINDEX.
1920         * expr.c (build_invokeinterface): Use get_interface_method_index.
1921
1922 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1923
1924         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
1925
1926 2004-03-31  Andrew Haley  <aph@redhat.com>
1927
1928         PR java/14104
1929         * jcf-io.c (opendir_in_zip): Tidy up error handling.
1930
1931 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
1932
1933         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
1934         form of GTY markers.
1935
1936 2004-03-25  Marcus Meissner  <meissner@suse.de>
1937
1938         PR java/14689:
1939         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
1940
1941 2004-03-23  Tom Tromey  <tromey@redhat.com>
1942
1943         PR java/14315:
1944         * jcf-write.c (make_class_file_name): Don't report if mkdir
1945         failed with EEXIST.
1946
1947 2004-03-23  Tom Tromey  <tromey@redhat.com>
1948
1949         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
1950
1951 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
1952
1953         * class.c, gjavah.c, lang.c: Fix comment typos.
1954         * gcj.texi: Fix typos.
1955
1956 2004-03-19  Per Bothner  <per@bothner.com>
1957
1958         * gcj.texi (Code Generation):  Document new flags and assert defaults.
1959
1960         * class.c (assume_compiled_node_struct):  Rename type to
1961         class_flag_node_struct, as it is now also used for enable_assertions.
1962         Rename assume_compiled_node typedef.  Rename excludep field to value.
1963         (find_assume_compiled_node):  Rename function to find_class_flag_node.
1964         Minor optimization - avoid needless strlen.
1965         (add_assume_compiled):  Some tweaking and optimization.
1966         Rename and generalize to add_class_flag takem an extra parameter.
1967         (add_assume_compled):  New just calls add_class_flag.
1968         (add_enable_assert, enable_assertions):  New functions.
1969         (enable_assert_tree):  New static.
1970         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
1971         * lang.opt (fenable-assertions, fenable-assertions=,
1972         fdisable-assertions, fdisable-assertions=):  New options.
1973         * lang.c (java_handle_option):  Handle new options.
1974         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
1975         class in an interface - create helper class nested in outer interface.
1976         (build_assertion):  Short-circuit if enable_assertions is false.
1977
1978 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1979
1980         * java-tree.h: Changes throughout to add checking to macros
1981         and numerous whitespace changes.
1982         (VAR_OR_FIELD_CHECK): New macro.
1983         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
1984         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
1985
1986 2004-03-16  Per Bothner  <per@bothner.com>
1987
1988         * jcf-jump.c (options):  New --print-constants option.
1989         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
1990
1991         * jcf-dump.c (flag_print_constant_pool):  Default to off.
1992         (print_constant_terse_with_index):  New helper function.
1993         (various places):  Check flag_print_constant_pool where missing.
1994         (main):  If verbose set flag_print_constant_pool.
1995         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
1996
1997 2004-03-15  Andrew Haley  <aph@redhat.com>
1998
1999         PR java/14581
2000         * parse.y (java_complete_lhs): Check that final variable has an
2001         initializer.
2002
2003 2004-03-12  Andrew Haley  <aph@redhat.com>
2004
2005         PR java/14551
2006         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2007         conversion.
2008
2009 2004-02-29  Roger Sayle  <roger@eyesopen.com>
2010
2011         * jcf-parse.c (java_parse_file): Handle the case that input_filename
2012         is NULL.
2013
2014 2004-02-27  Per Bothner  <per@bothner.com>
2015
2016         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
2017         suggestion:  Use build_incomplete_class_ref.
2018         This fixes PR java/13508, java/11714.
2019
2020 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
2021
2022         * java/parse.h: Update copyright.
2023
2024 2004-02-26  Andrew Haley  <aph@redhat.com>
2025
2026         PR java/14231:
2027         * parse.y (check_interface_throws_clauses): Check for
2028         !METHOD_INVISIBLE (iface_method).
2029         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2030         well as CLASS_ABSTRACT.
2031
2032 2004-02-25  Per Bothner  <per@bothner.com>
2033
2034         * parse.y (build_assertion):  If we're in an inner class, create the
2035         class$ helper routine in the outer class.
2036
2037 2004-02-19  Richard Henderson  <rth@redhat.com>
2038
2039         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2040
2041 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
2042
2043         * Make-lang.in (java.install-man): Add extra dependencies.
2044
2045 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
2046
2047         * Make-lang.in: Install man pages under the same names
2048         (possibly transformed) as the program they document.
2049
2050 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
2051
2052         * gjavah.c: Include "intl.h".
2053         (error): New function.
2054         (main): Call gcc_init_libintl.
2055         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2056         print_stub_or_jni, process_file, main): Use error rather than
2057         fprintf.
2058         (print_method_info, usage, help, version, main): Mark strings for
2059         translation with _.  Avoid splitting up sentences.  Send
2060         information messages to stdout.
2061         * jcf-dump.c: Include "intl.h".
2062         (main): Call gcc_init_libintl.
2063         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2064         Mark error, usage and version messages for translation with _.
2065         Avoid splitting up sentences.
2066         * jv-scan.c: Include "intl.h".
2067         (fatal_error, warning): Change parameter s to msgid.  Translate
2068         messages.
2069         (main): Call gcc_init_libintl.
2070         (usage, help, version): Mark error, usage and version messages for
2071         translation with _.  Avoid splitting up sentences.
2072         * jvgenmain.c: Include "intl.h".
2073         (main): Call gcc_init_libintl.
2074         (usage, main): Mark error messages for translation with _.
2075         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2076         JVGENMAIN_OBJS): Add intl.o.
2077         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2078         java/jvgenmain.o): Update dependencies.
2079
2080 2004-02-08  Per Bothner  <per@bothner.com>
2081
2082         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
2083         class don't use not_accessible_field_error, which can get confused.
2084
2085 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
2086
2087         Make-lang.in (po-generated):  Delete.
2088
2089 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
2090
2091         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2092         Depend on target.h.
2093         * decl.c: Include target.h.
2094         (start_java_method): Replace PROMOTE_PROTOTYPES with
2095         targetm.calls.promote_prototypes.
2096         * expr.c: Include target.h.
2097         (pop_arguments): Replace PROMOTE_PROTOTYPES with
2098         targetm.calls.promote_prototypes.
2099         * parse.y: Include target.h.
2100         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2101         with targetm.calls.promote_prototypes.
2102
2103 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
2104
2105         * typeck.c: Update copyright.
2106
2107 2004-02-02  Tom Tromey  <tromey@redhat.com>
2108
2109         * decl.c (java_init_decl_processing): Remove duplicate
2110         gnu/gcj/RawData.
2111
2112 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
2113
2114         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2115
2116 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
2117
2118         * expr.c (build_field_ref): Move variable
2119         definition up.
2120
2121 2004-01-28  Andrew Haley  <aph@redhat.com>
2122
2123         * expr.c (build_field_ref): Widen field offset.
2124
2125 2004-01-27  Andrew Haley  <aph@redhat.com>
2126
2127         java/13273
2128         * parse.y (check_interface_throws_clauses): Make sure class_decl
2129         has been loaded.
2130
2131 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
2132
2133         PR java/13733
2134         * parse.y (patch_assignment): Don't modify lhs_type for
2135         reference assignments.
2136
2137 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2138
2139         * Make-lang.in: Replace $(docdir) with doc.
2140         (java.info, java.srcinfo, java.man, java.srcman): New rules.
2141         (java.install-man): Revamp rule.
2142
2143 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2144
2145         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2146         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2147         instead of deferred backquote.
2148
2149 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
2150
2151         * typeck.c (find_method_in_interfaces): Move variable
2152         definition up.
2153
2154 2004-01-16  Andrew Haley  <aph@redhat.com>
2155
2156         PR java/13273:
2157         * typeck.c (shallow_find_method): New.
2158         (find_method_in_superclasses): New.
2159         (find_method_in_interfaces): New.
2160         (lookup_do): Rewrite.
2161         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2162
2163         * jcf-parse.c (read_class): Save and restore output_class.
2164         * decl.c (java_expand_body): Set output_class from fndecl.
2165
2166 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
2167
2168         * class.c (gen_indirect_dispatch_tables): Fix string length
2169         calculations.
2170
2171 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
2172
2173         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2174         (java.srcextra): Copy above back to source directory if requested.
2175         (po-generated): Delete reference to $(parsedir).
2176         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2177         Use implicit rule.
2178
2179 2004-01-14  Jan Hubicka  <jh@suse.cz>
2180
2181         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2182         estimation.
2183
2184 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
2185
2186         * java-tree.h (java_expand_expr): Change prototype.
2187         * expr.c (java_expand_expr): Add alt_rtl parameter.
2188
2189 2004-01-09  Andrew Haley  <aph@redhat.com>
2190
2191         PR java/12755:
2192         * parse.y (java_fix_constructors):  Set output_class.
2193         (java_reorder_fields): Likewise.
2194         (java_layout_classes): Likewise.
2195         (java_expand_classes): Generate indirect dispatch tables.
2196         (java_expand_classes): Set output_class.
2197         (java_finish_classes): Likewise.
2198         * lang.c (java_init): Turn on always_initialize_class_p if we're
2199         using indirect dis[atch.
2200         (java_decl_ok_for_sibcall): Use output_class, not current_class.
2201         (java_get_callee_fndecl): Use class local atable.
2202         * jcf-parse.c
2203         (always_initialize_class_p): Decl moved to java-tree.h.
2204         (HANDLE_CLASS_INFO): Set output_class.
2205         (read_class): Likewise.
2206         (parse_class_file): Call gen_indirect_dispatch_tables.
2207         (parse_zip_file_entries): Set output_class.
2208         (java_parse_file): Set output_class.  Don't emit symbol tables.
2209         * java-tree.h (output_class): New.
2210         Remove global declarations for otable, atable, and ctable.
2211         (always_initialize_class_p): moved here from decl.c.
2212         (DECL_OWNER): New.
2213         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2214         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2215         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2216         (struct lang_type): Add otable_methods, otable_decl,
2217         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2218         ctable_decl, catch_classes, type_to_runtime_map.
2219         * expr.c (build_field_ref): Make otable, atable, and ctable class
2220         local rather than global.
2221         (build_known_method_ref): Likewise.
2222         (build_invokeinterface): Likewise.
2223         (java_expand_expr): Pass runtime type (rather than actual type) to
2224         expand_start_catch.
2225         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2226         this class.  Look up each class in that map to delete duplicates.
2227         (expand_end_java_handler): Pass runtime type (rather than actual
2228         type) to expand_start_catch.
2229         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2230         (do_nothing): New.
2231         (java_init_decl_processing): Rearrange things.  Remove global
2232         declarations of otable, atable, and ctable.
2233         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2234         (java_expand_body): Set output_class.
2235         * constants.c (build_constant_data_ref): Use output_class, not
2236         current_class.
2237         (alloc_name_constant): Likewise.
2238         * class.c (gen_indirect_dispatch_tables): New.
2239         (build_class_ref): Generate hard reference to superclass, even if
2240         using indirect dispatch.
2241         (build_static_field_ref): Use class local atable.
2242         (make_class_data): Generate hard reference to superclass, even if
2243         using indirect dispatch.
2244         Generate symbolic references to interfaces when using indirect
2245         dispatch.
2246         (make_class_data): Emit otable, atable, and ctable.
2247         Make otable, atable, and ctable class local rather than global.
2248         (emit_catch_table): Make otable, atable, and ctable class local
2249         rather than global.
2250
2251 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
2252
2253         * parse.y (catch_clause_parameter): Fix typo.
2254
2255         PR java/13404
2256         * parse.y: (catch_clause_parameter): Return early if $3, aka
2257         formal_parameter, is null.
2258
2259 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2260
2261         * class.c: Remove uses of "register" specifier in
2262         declarations of arguments and local variables.
2263         * decl.c: Likewise.
2264         * expr.c: Likewise.
2265         * gjavah.c: Likewise.
2266         * jcf-dump.c: Likewise.
2267         * jcf-io.c: Likewise.
2268         * jcf-parse.c: Likewise.
2269         * jcf-write.c: Likewise.
2270         * keyword.h: Likewise.
2271         * parse.y: Likewise.
2272         * typeck.c: Likewise.
2273         * verify.c: Likewise.
2274
2275 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
2276
2277         * Make-lang.in (GCJ_CROSS_NAME): Delete.
2278         (java.install_common, java.install-man): Adjust for above.
2279         (java.uninstall): Likewise.
2280
2281 2003-12-03  Michael Koch  <konqueror@gmx.de>
2282
2283         * class.c (make_class_data):
2284         Push field value to 'hack_signers' instead of 'signers'.
2285         * decl.c (java_init_decl_processing):
2286         Push field 'hack_signers' instead of 'signers'.
2287
2288 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
2289
2290         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2291         including iconv.h.
2292
2293 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
2294
2295         PR java/12374:
2296         * parse.y (qualify_ambiguous_name): Remove lots of broken
2297         field access processing - there's no need to do that here,
2298         because we have resolve_field_access.  Remove
2299         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2300         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2301         used.
2302
2303 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
2304
2305         Fix PR java/13237
2306         * parse.y (java_complete_lhs): Save location prior to patching
2307         CALL_EXPR.
2308
2309 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
2310
2311         PR java/12548
2312         * resource.c (write_resource_constructor): Append
2313         "_resource" to constructor identifier name.
2314
2315 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
2316
2317         Fix PR java/13183.
2318         * constants.c (cpool_for_class): New function.
2319         (outgoing_cpool): Remove global variable.
2320         (alloc_name_constant): Use cpool_for_class.
2321         (build_constants_constructor): Likewise.
2322         * decl.c (java_expand_body): Set current_class.
2323         * java-tree.h (outgoing_cpool) Remove declaration.
2324         (init_outgoing_cpool): Likewise.
2325         * jcf-parse.c (init_outgoing_cpool): Remove function.
2326         (parse_class_file): Don't call init_outgoing_cpool.
2327         * parse.y (java_complete_expand_methods): Don't call
2328         init_outgoing_cpool.  Don't save outgoing_cpool.
2329         (java_expand_classes): Don't restore outgoing_cpool.
2330         (java_finish_classes): Likewise.
2331
2332 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
2333
2334         * Make-lang.in: (java.install-common) Add
2335         symlink for $(target_noncanonical)-gcjh for
2336         native builds.
2337
2338 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
2339
2340         * Make-lang.in (java.extraclean): Delete.
2341
2342 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
2343
2344         * Make-lang.in (check-java): Add.
2345
2346 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
2347
2348         Fix PR java/13024.
2349         * except.c (prepare_eh_table_type): Allocate variable-sized
2350         buffer `buf' with alloca.
2351
2352 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
2353
2354         Fix PR java/12857.
2355
2356         decl.c (java_init_decl_processing): Don't initialize
2357         class_not_found_type_node, no_class_def_found_type_node.
2358
2359         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2360         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2361         (class_not_found_type_node, no_class_def_found_type_node):
2362         Don't define.
2363
2364         parse.y (build_dot_class_method_invocation): Add this_class
2365         argument.  Qualify method invocations to a different class.
2366         (create_new_parser_context): Initialize saved_data_ctx to 0.
2367         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2368         (build_dot_class_method): Don't load classes.  Register
2369         incomplete types.
2370         (build_incomplete_class_ref): Special cases for interfaces
2371         and inner classes.  Move build_dot_class_method call to here...
2372         (patch_incomplete_class_ref): ...from here.  Pass current_class
2373         to build_dot_class_method_invocation.
2374         (build_assertion): Pass class_type to
2375         build_dot_class_method_invocation.
2376         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2377
2378 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
2379
2380         Fix PR java/12739.
2381         * java-tree.h (BLOCK_EMPTY_P): Define.
2382         * parse.y (java_complete_lhs): Check for empty blocks
2383         in TRY_FINALLY_EXPR case.
2384
2385 2003-11-17  Andrew Haley  <aph@redhat.com>
2386
2387         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2388         (struct lang_decl_var:freed): New variable.
2389         * decl.c (poplevel): Mark local vars that have gone out of scope.
2390         (push_jvm_slot): Don't use the RTL of a var that has gone out of
2391         scope.
2392
2393 2003-11-16  Jason Merrill  <jason@redhat.com>
2394
2395         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2396         and TAGS files that include them for each front end.
2397
2398 2003-11-15  Tom Tromey  <tromey@redhat.com>
2399
2400         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2401
2402 2003-11-12  Jason Merrill  <jason@redhat.com>
2403
2404         PR optimization/12547
2405         * lang.c (java_tree_inlining_walk_subtrees): Just walk
2406         BLOCK_EXPR_BODY directly.
2407
2408 2003-11-12  Andrew Haley  <aph@redhat.com>
2409
2410         PR java/11045
2411         * parse.y (fold_constant_for_init): Check that we really do have a
2412         constant.
2413
2414         PR java/11533
2415         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2416         init_test_decls being inlined.
2417
2418         PR java/12890:
2419         * parse.y (do_resolve_class): Check return value from
2420         breakdown_qualified().
2421
2422 2003-11-11  Tom Tromey  <tromey@redhat.com>
2423
2424         PR java/12915:
2425         * parse.y (merge_string_cste): Handle case where we have a
2426         pointer that happens to be zero, not null_pointer_node.
2427
2428 2003-11-10  Tom Tromey  <tromey@redhat.com>
2429
2430         * jcf-parse.c (classify_zip_file): Correctly compare
2431         filename_length against length of manifest file's name.
2432
2433 2003-11-08  Tom Tromey  <tromey@redhat.com>
2434
2435         PR java/12894:
2436         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2437
2438 2003-11-06  Andrew Haley  <aph@redhat.com>
2439
2440         * expr.c (java_stack_swap): Make sure destination stack slots are
2441         of the correct type.
2442
2443 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
2444
2445         * Make-lang.in (dvi): Move targets to $(docobjdir).
2446         (gcj.dvi): Simplify rule and adjust target.
2447         (gcj.info): Simplify rule.
2448         (gcj.pod): New intermediate rule.
2449         (gcjh.pod): Likewise.
2450         (jv-scan.pod): Likewise.
2451         (jcf-dump.pod): Likewise.
2452         (gij.pod): Likewise.
2453         (jv-convert.pod): Likewise.
2454         (rmic.pod): Likewise.
2455         (rmiregistry.pod): Likewise.
2456         (gcj.1): Delete.
2457         (gcjh.1): Delete.
2458         (jv-scan.1): Delete.
2459         (jcf-dump.1): Delete.
2460         (gij.1): Delete.
2461         (jv-convert.1): Delete.
2462         (rmic.1): Delete.
2463         (rmiregistry.1): Delete.
2464
2465 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
2466
2467         Fixes PR java/12866.
2468         * parse.y (resolve_qualified_expression_name): Move test
2469         for outer field access methods from here...
2470         (check_thrown_exceptions) ...to here.
2471
2472 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
2473
2474         * .cvsignore: Delete.
2475
2476 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
2477
2478         * verify.c (verify_jvm_instructions): Don't warn about legal
2479         eh binding regions generated for example by jdk 1.4.1.
2480
2481 2003-10-24  David S. Miller  <davem@redhat.com>
2482
2483         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
2484
2485 2003-10-22  Andrew Haley  <aph@redhat.com>
2486
2487         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
2488         (java_get_callee_fndecl): New.
2489
2490         * jcf-parse.c (java_parse_file): Call emit_catch_table().
2491
2492         * java-tree.h (ctable_decl): New.
2493         (catch_classes):  New.
2494         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
2495
2496         * decl.c (java_init_decl_processing): Add catch_class_type.
2497         Add ctable_decl.
2498         Add catch_classes field.
2499
2500         * class.c (build_indirect_class_ref): Break out from
2501         build_class_ref.
2502         (make_field_value): Check flag_indirect_dispatch.
2503         (make_class_data): Ditto.
2504         Tidy uses of PUSH_FIELD_VALUE.
2505         Add field catch_classes.
2506         (make_catch_class_record): New.
2507
2508         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
2509
2510 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
2511
2512         * jcf-write.c: Follow spelling conventions.
2513         * parse.y: Likewise.
2514
2515 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
2516
2517         * ChangeLog: Fix typos.
2518         * expr.c: Fix comment typos.
2519         * jcf-write.c: Likewise.
2520         * lang.c: Likewise.
2521         * lex.c: Likewise.
2522         * mangle.c: Likewise.
2523         * parse-scan.y: Likewise.
2524         * parse.y: Likewise.
2525
2526 2003-10-22  Tom Tromey  <tromey@redhat.com>
2527
2528         * expr.c (expand_byte_code): Only warn about dead bytecode when
2529         extra_warnings is set.
2530
2531 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
2532
2533         Fix for PR java/12586.
2534         * mangle.c (find_compression_record_match): Don't iterate through
2535         package namespace elements unless they all match compression_table
2536         entries.
2537
2538 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
2539
2540         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
2541         (generate-manpages): Likewise.
2542         (java.maintainer-clean): Likewise.
2543         (gcj.info): Likewise.
2544         (gcj.1): Likewise.
2545         (gcjh.1): Likewise.
2546         (jv-scan.1): Likewise.
2547         (jcf-dump.1): Likewise.
2548         (gij.1): Likewise.
2549         (jv-convert.1): Likewise.
2550         (rmic.1): Likewise.
2551         (rmiregistry.1): Likewise.
2552         (java.install-man): Likewise.
2553         (parse-scan.o): Move and define complete compile line.
2554         (parse.o): Likewise.
2555         (jcf-tree-inline.o): Move.
2556
2557 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
2558
2559         * Make-lang.in (info): Update dependencies.
2560         (java.install-info): Remove.
2561         ($(srcdir)/java/gcj.info): Replace with ...
2562         ($(docobjdir)/gcj.info): ... this.
2563
2564 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
2565
2566         * Make-lang.in: Replace uses of $(target_alias) with
2567         $(target_noncanonical).
2568
2569 2003-10-09  Tom Tromey  <tromey@redhat.com>
2570
2571         * decl.c (java_init_decl_processing): Declare signers field.
2572         * class.c (make_class_data): Set signers field.
2573
2574 2003-10-09  Jason Merrill  <jason@redhat.com>
2575
2576         * parse.y (patch_assignment): Use make_node to create a BLOCK.
2577         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
2578         POINTER_TYPE.
2579
2580 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
2581
2582         * Make-lang.in (java.info): Replace with ...
2583         (info): ... this.
2584         (java.dvi): Replace with ...
2585         (dvi): ... this.
2586         (java.generated-manpages): Replace with ...
2587
2588 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
2589
2590         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
2591
2592 2003-10-01  Andrew Haley  <aph@redhat.com>
2593
2594         * jcf-parse.c (java_parse_file): Write otable and atable.
2595         * java-tree.h (atable_methods): New.
2596         (atable_decl): New.
2597         (atable_syms_decl): New.
2598         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
2599         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
2600         (symbol_*type): Rename method_symbol* to symbol*type.
2601         (emit_offset_symbol_table): Delete.
2602         (emit_symbol_table): New.
2603         (get_symbol_table_index): New.
2604         (atable_type): New.
2605         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
2606         (build_known_method_ref): Likewise.
2607         (get_symbol_table_index): Rename from get_offset_table_index.
2608         Parameterize to allow re-use by differing types of symbol table.
2609         (build_invokevirtual): Pass table to get_offset_table_index.
2610         * decl.c (java_init_decl_processing): Push types and decls for
2611         atable and atable_syyms.
2612         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
2613         (make_class_data): Add new fields atable and atable_syms.
2614         (emit_symbol_table): Rename from emit_offset_symbol_table.
2615         Parameterize to allow re-use by different types of symbol table.
2616         (build_symbol_entry): Renamed from build_method_symbols_entry.
2617
2618 2003-09-30  Roger Sayle  <roger@eyesopen.com>
2619
2620         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
2621         semantics for SAVE_EXPR, by caching the result in a temporary.
2622
2623 2003-09-28  Richard Henderson  <rth@redhat.com>
2624
2625         * check-init.c (check_init): Save and restore input_location
2626         instead of file and line separately.
2627         * decl.c (java_expand_body): Likewise.
2628         * jcf-write.c (generate_bytecode_insns): Likewise.
2629         * parse.y (safe_layout_class): Likewise.
2630         * jcf-parse.c (read_class, parse_class_file): Likewise.
2631         (java_parse_file): Use %H for warning locator.
2632
2633 2003-09-28  Roger Sayle  <roger@eyesopen.com>
2634
2635         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
2636         with void-type branches instead of using a COMPOUND_EXPR.
2637
2638 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
2639
2640         * decl.c (java_optimize_inline, dump_function): Remove.
2641         * java-tree.h (java_optimize_inline): Remove declaration.
2642         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
2643         * parse.y (source_end_java_method, java_expand_classes):
2644         Likewise.  Remove dead code.
2645
2646 2003-09-27  Roger Sayle  <roger@eyesopen.com>
2647
2648         * lang.c (java_init_options): Set flag_evaluation_order.
2649         * expr.c (force_evaluation_order): Don't attempt to force
2650         evaluation order of binary operations using save_expr.
2651         * parse.y (java_complete_lhs): No longer need to call
2652         force_evaluation_order when constructing binary operators.
2653
2654 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
2655             Bryce McKinlay  <bryce@mckinlay.net.nz>
2656
2657         PR java/1333:
2658         * parse.y (not_accessible_field_error): New function.
2659         (resolve_expression_name): Check field access permissions.
2660         (resolve_qualified_expression_name): Use
2661         not_accessible_field_error.
2662         (resolve_qualified_expression_name): Likewise.
2663
2664 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2665
2666         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
2667
2668 2003-09-23  Roger Sayle  <roger@eyesopen.com>
2669
2670         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
2671         with equal operands without side-effects.
2672
2673 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
2674
2675         * decl.c (java_init_decl_processing): Don't emit otable decls
2676         if flag_indirect_dispatch is not set.
2677
2678 2003-09-21  Richard Henderson  <rth@redhat.com>
2679
2680         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
2681         resource.c: Revert.
2682
2683 2003-09-21  Richard Henderson  <rth@redhat.com>
2684
2685         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
2686         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
2687
2688 2003-09-20  Richard Henderson  <rth@redhat.com>
2689
2690         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
2691
2692 2003-09-18  Roger Sayle  <roger@eyesopen.com>
2693
2694         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
2695         * check-init.c (check_init): Likewise.
2696
2697 2003-09-18  Roger Sayle  <roger@eyesopen.com>
2698
2699         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
2700
2701 2003-09-16  Andrew Haley  <aph@redhat.com>
2702
2703         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
2704
2705 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
2706
2707         Fixes PR java/9577
2708         * mangle.c (find_compression_record_match): Skip
2709         over a "6JArray" (the array template mangled string)
2710         IDENTIFIER_NODE.
2711         (mangle_array_type): Correct minor typo.
2712         (atms): Move definition to the beginning.
2713
2714 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
2715
2716         * class.c (add_miranda_methods): Ensure super-interfaces are laid
2717         out. Fix for PR java/12254.
2718
2719 2003-09-11  Richard Henderson  <rth@redhat.com>
2720
2721         * parse.y (source_end_java_method): Update for new
2722         cgraph_finalize_function argument.
2723
2724 2003-09-09  Richard Henderson  <rth@redhat.com>
2725
2726         * parse.y (source_end_java_method): Update call to
2727         cgraph_finalize_function.
2728
2729 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
2730
2731         * decl.c (java_expand_body): New function.
2732         * expr.c (build_class_init): Set DECL_IGNORED_P.
2733         * java-tree.h (start_complete_expand_method,
2734         java_expand_body): Declare.
2735         * jcf-parse.c (cgraph.h): Include.
2736         (java_parse_file): Handle flag_unit_at_a_time.
2737         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
2738         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
2739         (java_estimate_num_insns): Use walk_tree_without_duplicates.
2740         (java_start_inlining): New function.
2741         * parse.h (java_finish_classes): Declare.
2742         * parse.y: Include cgraph.h.
2743         (block): Don't special-case empty block production.
2744         (craft_constructor): Set DECL_INLINE.
2745         (source_end_java_method): Handle flag_unit_at_a_time.
2746         Replace inline code with call to java_expand_body.
2747         (start_complete_expand_method): Remove static modifier.
2748         (java_expand_method_bodies): Patch function tree for
2749         class initialization and/or synchronization as needed.
2750         Don't begin RTL expansion yet.
2751         (java_expand_classes): Check flag_unit_at_a_time before
2752         calling finish_class.
2753         (java_finish_classes): New function.
2754         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
2755         (patch_assignment): Set DECL_CONTEXT on temporary variable.
2756         (emit_test_initialization): Set DECL_IGNORED_P.
2757
2758 2003-09-03  Roger Sayle  <roger@eyesopen.com>
2759
2760         * builtins.c (enum builtin_type): Delete unused enumeration.
2761         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
2762
2763 2003-08-28  Tom Tromey  <tromey@redhat.com>
2764
2765         * gcj.texi (Extensions): Document gcjlib URLs.
2766
2767 2003-08-20  Tom Tromey  <tromey@redhat.com>
2768
2769         * gcj.texi (Extensions): Added xref.
2770         (libgcj Runtime Properties): Document
2771         gnu.gcj.runtime.VMClassLoader.library_control.
2772
2773 2003-08-20  Andrew Haley  <aph@redhat.com>
2774
2775         * except.c (prepare_eh_table_type): Use new encoding for exception
2776         handlers when using -fno-assume-compiled.
2777
2778 2003-08-13  Tom Tromey  <tromey@redhat.com>
2779
2780         * gcj.texi (Invoking gij): Document -X and -?.
2781
2782 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
2783
2784         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
2785         GCJH_OBJS, JCFDUMP_OBJS
2786         * win32-host.c: Removed the unnecessary and broken dependency
2787         on jcf.h
2788
2789 2003-08-11  Tom Tromey  <tromey@redhat.com>
2790
2791         * parse.y (java_check_regular_methods): Typo fixes.  Call
2792         check_interface_throws_clauses.  Use
2793         check_concrete_throws_clauses.
2794         (check_interface_throws_clauses): New function.
2795         (check_concrete_throws_clauses): New function.
2796         (hack_is_accessible_p): New function.
2797         (find_most_specific_methods_list): Added FIXME.
2798         * typeck.c (lookup_do): Use `flags' argument to decide what to
2799         do.  Reimplemented.
2800         (lookup_argument_method_generic): New function.
2801         (lookup_argument_method2): Removed.
2802         * jcf.h (ACC_INVISIBLE): New define.
2803         * jcf-write.c (generate_classfile): Skip invisible methods.
2804         * class.c (add_miranda_methods): New function.
2805         (layout_class_methods): Use it.
2806         (get_access_flags_from_decl): Use ACC_INVISIBLE.
2807         * java-tree.h (METHOD_INVISIBLE): New define.
2808         (lang_decl_func) [invisible]: New field.
2809         (lookup_argument_method_generic): Declare.
2810         (SEARCH_INTERFACE): New define.
2811         (SEARCH_SUPER): Likewise.
2812         (SEARCH_ONLY_INTERFACE): Likewise.
2813         (SEARCH_VISIBLE): Likewise.
2814         (lookup_argument_method2): Removed declaration.
2815
2816 2003-08-05  Tom Tromey  <tromey@redhat.com>
2817
2818         Fix for PR java/11600:
2819         * parse.y (java_complete_lhs): See whether we're calling a method
2820         on an array.
2821         (check_thrown_exceptions): Added `is_array_call' argument;
2822         fixed `clone' checking; updated all callers.
2823
2824 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
2825
2826         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
2827
2828 2003-08-03  Tom Tromey  <tromey@redhat.com>
2829
2830         * java-tree.h (METHOD_TRANSIENT): Removed.
2831         * decl.c (pushdecl): Removed some dead code.
2832         * class.c (get_access_flags_from_decl): Can't have transient
2833         method.
2834         (add_method_1): Can't have a transient method.
2835
2836 2003-07-28  Andreas Jaeger  <aj@suse.de>
2837
2838         * jvspec.c: Convert to ISO C90 prototypes.
2839
2840 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2841
2842         * decl.c (force_poplevels): Fix warning call.
2843
2844 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2845
2846         * expr.c (expand_java_field_op): Don't use xxx_with_decl
2847         (expand_java_field_op): Likewise.
2848         * class.c (layout_class_method): Likewise
2849         (emit_register_classes): Likewise.
2850         * decl.c (pushdecl): Likewise.
2851         (poplevel): Likewise.
2852         (force_poplevels): Likewise.
2853         (give_name_to_locals): Likewise.
2854         * check-init.c (check_for_initialization): Likewise.
2855
2856 2003-07-24  Jason Merrill  <jason@redhat.com>
2857
2858         * java-tree.h: Move boolean_type_node et al to the back end.
2859
2860 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2861
2862         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
2863         casts.
2864
2865 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
2866
2867         * lang.opt: Don't show -MD_ and -MDD_.
2868
2869 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
2870
2871         * lang-options.h: Remove.
2872         * lang.opt: Add help text.
2873
2874 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
2875
2876         * expr.c: Remove the last argument to expand_assignment().
2877
2878 2003-07-09  Jan Hubicka  <jh@suse.cz>
2879
2880         * java-tree.h (DECL_NUM_STMTS): Rename to...
2881         (DECL_ESTIMATED_INSNS): ... this.
2882         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
2883         New static functions.
2884         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
2885         * parser.y (add_stmt_to_compound): Do not account statements.
2886
2887 2003-07-08  Mark Wielaard  <mark@klomp.org>
2888
2889         * gcj.texi: CNI now expands to Compiled Native Interface.
2890
2891 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2892
2893         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
2894
2895 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2896
2897         * expr.c (expand_byte_code): Adjist emit_line_note call.
2898
2899 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2900
2901         * lang.c (java_handle_option): Don't handle filenames.
2902
2903 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
2904
2905         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
2906         DIR_SEPARATOR.
2907         Use FILENAME_CMP.
2908         * jcf-write.c: Don't default-define DIR_SEPARATOR.
2909         * jcf.h: Delete COMPARE_FILENAMES definition.
2910
2911 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
2912
2913         * lang.c (java_init_options): Update prototype.
2914
2915 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2916
2917         * decl.c (poplevel): Adjust define_label call.
2918
2919 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2920
2921         * gjavah.c (flag_jni): Make non-static.
2922         * parse-scan.y (ctxp): Make non-static.
2923
2924         * class.c (build_method_symbols_entry)
2925         * expr.c (get_offset_table_index)
2926         * jcf-parse.c (jcf_parse):
2927         Mark the definition static, matching the forward declaration.
2928
2929 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
2930
2931         * lang.c (java_handle_option): Don't check for missing arguments.
2932
2933 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2934
2935         * class.c (push_class): Use a location_t to save place.
2936         (emit_register_classes): Set input_location. Adjust
2937         expand_function_end call.
2938         * resource.c (write_resource_constructor): Likewise.
2939         * decl.c (end_java_method): Adjust expand_function_end call.
2940         * parse.y (source_end_java_method): Likewise.
2941
2942 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2943
2944         * lang.c (java_handle_option): Likewise.
2945
2946 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
2947
2948         * lang.c (java_handle_option): Special-casing of optional
2949         joined arguments no longer needed.
2950         * lang.opt: Update switches that take optional argument.
2951
2952 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
2953
2954         * lang.opt: Declare Java.
2955         * lang.c (java_init_options): Update.
2956
2957 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
2958
2959         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
2960
2961 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2962
2963         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
2964         * lang.c (java_handle_option): -MD and -MMD have an underscore.
2965         * lang.opt: -MD and -MMD have an underscore.
2966
2967 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2968
2969         * class.c (emit_register_classes): Adjust init_function_start
2970         call.
2971         * decl.c (complete_start_java_method): Likewise.
2972         * resource.c (write_resource_constructor): Likewise.
2973
2974 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2975
2976         * Make-lang.in: Update to use options.c and options.h.
2977         * lang.c: Include options.h not j-options.h.
2978         (java_handle_option): Abort on unrecognized option.
2979         (java_init_options): Request Java switches.
2980
2981 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
2982
2983         * Make-lang.in: Handle mostlyclean.
2984
2985 2003-06-11  Tom Tromey  <tromey@redhat.com>
2986
2987         * lang.c (java_handle_option): Update dependency_tracking for
2988         OPT_MF case.
2989
2990         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
2991         empty argument.
2992
2993 2003-06-10  Andrew Haley  <aph@redhat.com>
2994
2995         * resource.c (write_resource_constructor): Use expand_expr to
2996         generate the address of the label attached to a resource.
2997         * Make-lang.in (java/resource.o): Add expr.h
2998
2999 2003-06-10  Andrew Haley  <aph@redhat.com>
3000
3001         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3002         (java_decl_ok_for_sibcall): New.
3003
3004 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
3005
3006         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3007         (java/j-options.c, java/j-options.h): New.
3008         * java-tree.h (resource_name, compile_resource_file,
3009         compile_resource_data): Constify.
3010         * jcf-write.c (jcf_write_base_directory): Similarly.
3011         * jcf.h (jcf_write_base_directory): Similarly.
3012         * lang.c: Include j-options.h.
3013         (cl_options_count, cl_options, string_option, java_decode_option,
3014         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3015         process_option_with_no): Remove.
3016         (resource_name): Constify.
3017         (LANG_HOOKS_HANDLE_OPTION): Override.
3018         (java_handle_option): New.
3019         (java_init): Don't call jcf_path_init.
3020         (java_init_options): Call jcf_path_init.
3021         * lang.opt: New.
3022         * resource.c (compile_resource_data, compile_resource_file): Constify.
3023
3024 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
3025
3026         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3027         (struct lang_decl_func): Add last_line field.
3028         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3029         DECL_SOURCE_LINE_LAST): Remove.
3030         * parse.y (missing_return_error, finish_method_declaration,
3031         lookup_cl, start_artificial_method_body, source_end_java_method,
3032         start_complete_expand_method): Adjust.
3033
3034 2003-06-08  Tom Tromey  <tromey@redhat.com>
3035
3036         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3037         fno-assume-compiled.
3038
3039 2003-06-08  Roger Sayle  <roger@eyesopen.com>
3040
3041         * builtins.c (define_builtin_type, builtin_types): Delete.
3042         (define_builtin): Rewritten to take just the built-in code,
3043         the function's name, type and fallback library function name.
3044         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3045         (initialize_builtins): Overhaul to define the GCC builtins
3046         used by gcj manually, providing the Java run-time's
3047         implementations as the fallback library function.
3048
3049 2003-06-08  Anthony Green  <green@redhat.com>
3050
3051         * parse.y (patch_cast): Fix conversions from floating-point to
3052         integral types.
3053
3054 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
3055
3056         * Make-lang.in: Update.
3057         * lang.c: Include opts.h. Define cl_options_count and cl_options.
3058
3059 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3060
3061         * lang.c (java_init_options): Update.
3062
3063 2003-06-05  Jan Hubicka  <jh@suse.cz>
3064
3065         * Make-lang.in:  Add support for stageprofile and stagefeedback
3066
3067 2003-05-31  Roger Sayle  <roger@eyesopen.com>
3068
3069         * lang.c (java_init_options): Prescribe wrap-around two's
3070         complement arithmetic overflow by setting flag_wrapv.
3071
3072 2003-05-29  Roger Sayle  <roger@eyesopen.com>
3073
3074         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3075         (builtin_record): Add an additional builtin_code field to
3076         record which GCC built-in corresponds to the Java function.
3077         (java_builtins):  Add new entries for atan, atan2, exp, log,
3078         pow and tan.
3079         (max_builtin, min_builtin, abs_builtin): Perform constant
3080         folding on the resulting tree.
3081         (java_build_function_call_expr): Likewise, perform constant
3082         folding on the resulting tree.
3083         (initialize_builtins): The NULL creators are now allowed in
3084         the java_builtins table, which is now terminated by an entry
3085         with builtin_code == END_BUILTINS.
3086         (check_for_builtin): Likewise.  If the matching creator is
3087         NULL, construct the call using java_build_function_call_expr
3088         directly with the decl for the corresponding builtin_code.
3089
3090 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
3091
3092         * win32-host.c: Normalize copyright boilerplate.
3093
3094 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3095
3096         * parse.y (print_int_node): Use string concatentation on
3097         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3098         function calls into one.
3099
3100 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
3101
3102         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3103         fatal_io_error with calls to fatal_error; add ": %m" to the end of
3104         all the affected error messages.
3105
3106 2003-05-13  Richard Henderson  <rth@redhat.com>
3107
3108         * class.c (layout_class_method): Set DECL_EXTERNAL.
3109         * decl.c (java_mark_decl_local, java_mark_class_local): New.
3110         * java-tree.h (java_mark_class_local): Declare.
3111         * jcf-parse.c (parse_class_file): Use it.
3112         * parse.y (java_expand_classes): Likewise.
3113
3114 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
3115
3116         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3117         * lex.h: #include input.h.
3118         * jv-scan.c (input_filename): Remove.
3119
3120 2003-05-02  Tom Tromey  <tromey@redhat.com>
3121
3122         PR java/10491:
3123         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3124         (handle_inner_classes): New function.
3125
3126 2003-05-01  Tom Tromey  <tromey@redhat.com>
3127
3128         PR java/10459:
3129         * parse.y (finish_for_loop): Do nothing if update expression is a
3130         EXPR_WFL_NODE wrapping nothing.
3131         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3132
3133 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
3134
3135         * lex.h (input_lineno): Remove declaration.
3136         * parse-scan.y: #include input.h.
3137         (input_filename): Remove declaration.
3138         (input_location): Add definition.
3139         (input_line): Remove definition.
3140
3141 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3142
3143         * lex.h (lineno): Rename to ...
3144         (input_line): ... here
3145         * parse-scan.y (lineno): Rename to ...
3146         (input_line): ... here.
3147         (reset_report): Rename lineno to input_line.
3148         * check-init.c (check_init): Likewise.
3149         * class.c (push_class): Likewise.
3150         * decl.c (complete_start_java_method, end_java_method): Likewise.
3151         * expr.c (expand_byte_code): Likewise.
3152         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3153         * jcf-write.c (generate_bytecode_insns): Likewise.
3154         * lex.c (java_init_lex, java_allocate_new_line,
3155         do_java_lex): Likewise.
3156         * parse.h (YYNOT_TWICE): Likewise.
3157         * parse.y (empty_statement, expression_statement,
3158         java_pop_parser_context, java_parser_context_save_global,
3159         yyerror, register_fields, method_header, safe_layout_class,
3160         find_in_imports_on_demand, create_artificial_method,
3161         source_end_java_method, start_complete_expand_method,
3162         build_thisn_assign, java_complete_lhs,
3163         maybe_absorb_scoping_block): Likewise.
3164
3165 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
3166
3167         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3168         '/' when computing java source filename
3169
3170 2003-04-13  Tom Tromey  <tromey@redhat.com>
3171
3172         * gjavah.c (print_c_decl): Indentation fix.
3173
3174 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3175
3176         * class.c (make_field_value, make_method_value, get_dispatch_table)
3177         (make_class_data, emit_offset_symbol_table)
3178         * constants.c (build_constants_constructor)
3179         * java-tree.h (START_RECORD_CONSTRUCTOR)
3180         * parse.y (maybe_build_array_element_wfl):
3181         Use build_constructor.
3182
3183 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
3184
3185         PR java/10253:
3186         * parse.y (string_convert_int_cst): Always use at least one digit
3187         in string conversion. Remove ASCII dependence.
3188         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3189
3190 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
3191
3192         * Make-lang.in: added win32-host.c
3193         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3194         resolves to open() on non-Win32 platforms and
3195         Win32-specific jcf_open_exact_case() on Win32
3196         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3197         when trying .java and .class files
3198         * win32-host.c: added to repository. Defines
3199         Win32-specific jcf_open_exact_case()
3200
3201 2003-04-10  Andrew Haley  <aph@redhat.com>
3202
3203         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3204         (maybe_free_localvar): Renamed from localvar_free.
3205         Add new arg, really.
3206         (generate_bytecode_insns): Set new variable, jsrs.
3207         Only free local vars if no jsr insns have been emittted.
3208         Call maybe_free_localvar, not localvar_free.
3209
3210 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
3211
3212         * gcj.texi: Remove @ at start of file.
3213
3214 2003-03-25  Tom Tromey  <tromey@redhat.com>
3215
3216         * parse.y (create_interface): Call CHECK_DEPRECATED.
3217
3218 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
3219
3220         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3221
3222 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3223
3224         * javaop.h (jfloat, jdouble): Make them structures mirroring
3225         the bit fields of IEEE float and double respectively.
3226         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3227         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3228         (union Word, union DWord): Delete.
3229         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3230
3231         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3232         D_NAN_MASK): Delete.
3233         (jni_print_float, jni_print_double): New.  Generate
3234         hexadecimal floating constants.
3235         (print_field_info): Use jni_print_float/double.
3236
3237         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
3238         finite floating point numbers for output; special case
3239         non-finite floats.
3240
3241 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3242
3243         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3244         Replace 0 and 1 with true and false in return statements.
3245
3246 2003-03-19  Tom Tromey  <tromey@redhat.com>
3247
3248         * lex.c (do_java_lex): Renamed from java_lex.
3249         (java_lex): New function.
3250         Include timevar.h.
3251
3252 2003-03-13  Tom Tromey  <tromey@redhat.com>
3253
3254         * parse.y (resolve_inner_class): Error if qualifier is a primitive
3255         type.
3256
3257 2003-03-04  Andrew Haley  <aph@redhat.com>
3258
3259         * gjavah.c (is_first_data_member): New global variable.
3260         (print_c_decl): If it's the first data member, align it as the
3261         superclass.
3262         (process_file): Set is_first_data_member.
3263
3264 2003-03-11  Tom Tromey  <tromey@redhat.com>
3265
3266         * parse.y (resolve_field_access): Initialize class if field is
3267         found in another static field.
3268         * expr.c (build_class_init): Don't optimize out initialization of
3269         implemented interface.
3270
3271 2003-03-11  Andrew Haley  <aph@redhat.com>
3272
3273         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3274         warning.
3275
3276 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3277
3278         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3279         and DIR_SEPARATOR_2 for a target.
3280         Correct minor typos.
3281
3282         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3283         and DIR_SEPARATOR_2 for a target into account.
3284
3285 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
3286
3287         * lang.c (java_init): Update prototype, move code to java_post_options.
3288         (java_post_options): Similarly.
3289
3290 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
3291
3292         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3293         compare file name components depending on the case-sensitivity
3294         or otherwise of the host file system.
3295
3296         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3297         "strcmp" to compare file name components.
3298         Use IS_DIR_SEPARATOR instead of comparing directly against
3299         DIR_SEPARATOR.
3300         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3301         comparing directly against DIR_SEPARATOR.
3302
3303 2003-03-04  Tom Tromey  <tromey@redhat.com>
3304
3305         * Make-lang.in (java.tags): New target.
3306
3307 2003-03-01  Roger Sayle  <roger@eyesopen.com>
3308
3309         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3310         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3311
3312 2003-03-01  Tom Tromey  <tromey@redhat.com>
3313
3314         * parse.y (jdep_resolve_class): Only check deprecation if we found
3315         a decl.
3316
3317 2003-02-28  Tom Tromey  <tromey@redhat.com>
3318
3319         PR java/9695:
3320         * class.c (maybe_layout_super_class): Always pass a WFL to
3321         do_resolve_class.
3322         * parse.y (do_resolve_class): Updated comment to explain
3323         parameters.
3324
3325 2003-02-26  Tom Tromey  <tromey@redhat.com>
3326
3327         * jcf-write.c (generate_classfile): Check whether class is
3328         deprecated before writing attribute count.
3329
3330 2003-02-25  Roger Sayle  <roger@eyesopen.com>
3331
3332         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3333         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3334
3335 2003-02-23  Tom Tromey  <tromey@redhat.com>
3336
3337         * lang-options.h: Added -Wdeprecated.
3338         * gcj.texi (Warnings): Document -Wdeprecated.
3339         * java-tree.h (flag_deprecated): Declare.
3340         * lang.c (lang_W_options): Added deprecated.
3341         (flag_deprecated): New global.
3342         * chartables.h: Rebuilt.
3343         * gen-table.pl (process_one): Look at whitespace.
3344         (print_tables): Define LETTER_SPACE, LETTER_MASK.
3345         * parse.h (CLEAR_DEPRECATED): New macro.
3346         (CHECK_DEPRECATED_NO_RESET): New macro.
3347         * jcf-parse.c (handle_deprecated): New function.
3348         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3349         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3350         * parse.y (resolve_type_during_patch): Check deprecation.
3351         (jdep_resolve_class): Likewise.
3352         (process_imports): Likewise.
3353         (resolve_expression_name): Likewise.
3354         (check_deprecation): Strip arrays from decl.  Check
3355         flag_deprecated.
3356         (patch_method_invocation): Also check the particular constructor
3357         for deprecation.
3358         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3359         * jcf-write.c (append_deprecated_attribute): New function.
3360         (generate_classfile): Generate deprecated attribute when
3361         appropriate.
3362         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
3363         (java_lex) [case '*']: Simplify logic.
3364         (java_start_char_p): Use LETTER_MASK.
3365         (java_part_char_p): Likewise.
3366         (java_space_char_p): New function.
3367
3368 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
3369
3370         Change base class access representation.
3371         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3372         (add_interface_do): Likewise.
3373
3374 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
3375
3376         * decl.c (java_init_decl_processing): Change
3377         soft_lookupjnimethod_node to reflect the change in
3378         signature of _Jv_LookupJNIMethod in libjava/jni.cc
3379         * expr.c (build_jni_stub): Calculate and pass the size
3380         on the stack of the arguments to a JNI function. Use
3381         new target macro MODIFY_JNI_METHOD_CALL to allow a
3382         target to modify the call to a JNI method.
3383
3384 2003-02-08  Roger Sayle  <roger@eyesopen.com>
3385
3386         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3387         instead of basename to avoid compiler warnings on Tru64.
3388
3389 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
3390
3391         * gcj.texi: Update to GFDL 1.2.
3392
3393 2003-01-31  Andrew Haley  <aph@redhat.com>
3394
3395         * parse.y (java_expand_classes): Scan the whole class list looking
3396         for access methods that haven't yet been expanded.
3397
3398 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3399
3400         Fix for java/4269:
3401
3402         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3403         to fix bootstrap on sparc-unknown-netbsdelf1.5.
3404         * jcf-parse.c: Likewise.
3405
3406 2003-01-31  Mark Wielaard  <mark@klomp.org>
3407
3408         * gjavah.c (throwable_p): Allocate 1 more byte for string.
3409
3410 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3411
3412         * class.c (make_class): Use BINFO_ELTS.
3413         (set_super_info): Likewse.
3414         (add_interface_do): Likewise.
3415
3416 2003-01-30  Tom Tromey  <tromey@redhat.com>
3417
3418         * jcf-parse.c (read_class): Update identifier's class value if it
3419         changed during parsing.
3420
3421 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
3422
3423         * Make-lang.in (po-generated): Find the targets in $(parsedir).
3424         Propagate change to all other rules as required.
3425         (java/parse-scan.o): Add explicit dependency on
3426         $(parsedir)/java/parse-scan.c .
3427
3428 2003-01-29  Tom Tromey  <tromey@redhat.com>
3429
3430         * parse.y (patch_assignment): Only transform the rhs of an
3431         assignment when compiling to native.
3432
3433 2003-01-28  Tom Tromey  <tromey@redhat.com>
3434
3435         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
3436
3437 2003-01-28  Tom Tromey  <tromey@redhat.com>
3438
3439         * lex.c (java_lex): Don't include UEOF as part of token.
3440         (java_read_unicode): Error if \u sequence prematurely terminated.
3441
3442 2003-01-27  Tom Tromey  <tromey@redhat.com>
3443
3444         * parse.y (java_check_regular_methods): Check for construct after
3445         checking types in throws clause.
3446
3447 2003-01-24  Tom Tromey  <tromey@redhat.com>
3448
3449         * class.c (build_static_field_ref): Only a String or numeric field
3450         can fold to a constant.
3451
3452 2003-01-23  Tom Tromey  <tromey@redhat.com>
3453
3454         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
3455         file name in resource buffer.
3456
3457 2003-01-23  Tom Tromey  <tromey@redhat.com>
3458
3459         * expr.c (build_known_method_ref): Use method's context to find
3460         method table index.
3461
3462 2003-01-23  Tom Tromey  <tromey@redhat.com>
3463
3464         * constants.c (set_constant_entry): Allocated cleared memory.
3465
3466 2003-01-22  Tom Tromey  <tromey@redhat.com>
3467
3468         * java-tree.h: Don't use PARAMS.
3469         * resource.c: Add prototypes for all functions.
3470         (write_resource_constructor): Use `const char *' to avoid
3471         warning.
3472
3473 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
3474
3475         * jcf-parse.c (process_zip_dir): Remove unused variable.
3476
3477 2003-01-22  Tom Tromey  <tromey@redhat.com>
3478
3479         * expr.c (build_invokeinterface): Abort if method's context is not
3480         an interface.
3481
3482 2003-01-22  Tom Tromey  <tromey@redhat.com>
3483
3484         * gcj.texi (Input and output files): Mention non-class entries.
3485         * decl.c (java_init_decl_processing): Call
3486         init_resource_processing.
3487         * java-tree.h (compile_resource_data, write_resource_constructor,
3488         compile_resource_file, init_resource_processing): Declare.
3489         * config-lang.in (gtfiles): Added resource.c.
3490         * Make-lang.in (gt-java-resource.h): New target.
3491         (JAVA_OBJS): Added resource.o.
3492         (java/resource.o): New target.
3493         * resource.c: New file.
3494         * class.c (compile_resource_file): Moved to resource.c.
3495         (registerResource_libfunc): Likewise.
3496         (utf8_decl_list): Mark with GTY; now static.
3497         * jcf-parse.c (classify_zip_file): New function.
3498         (parse_zip_file_entries): Use it; compile .properties files.
3499         (process_zip_dir): Use classify_zip_file and compute_class_name.
3500         Don't write class name into zip directory.
3501         (java_parse_file): Call write_resource_constructor.
3502         (compute_class_name): New function.
3503         * jcf-io.c (read_zip_member): Reindented.
3504
3505 2003-01-21  Tom Tromey  <tromey@redhat.com>
3506
3507         * class.c (supers_all_compiled): New function.
3508         (make_class_data): Use it.
3509
3510 2003-01-21  Tom Tromey  <tromey@redhat.com>
3511
3512         * parse.y (method_header): Native method can't be strictfp.
3513         No method can be transient or volatile.
3514
3515 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3516
3517         Make-lang.in (jvspec.o-warn): Add -Wno-error.
3518
3519 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
3520
3521         * check-init.c: Fix comment typos.
3522         * class.c: Likewise.
3523         * constants.c: Likewise.
3524         * decl.c: Likewise.
3525         * except.c: Likewise.
3526         * expr.c: Likewise.
3527         * java-except.h: Likewise.
3528         * java-tree.h: Likewise.
3529         * javaop.h: Likewise.
3530         * jcf-dump.c: Likewise.
3531         * jcf-io.c: Likewise.
3532         * jcf-parse.c: Likewise.
3533         * jcf-write.c: Likewise.
3534         * lang.c: Likewise.
3535         * mangle.c: Likewise.
3536         * typeck.c: Likewise.
3537         * verify.c: Likewise.
3538
3539 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3540
3541         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
3542         * jcf-write.c: Include "tm_p.h".
3543
3544 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3545
3546         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
3547
3548 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3549
3550         * builtins.c (java_build_function_call_expr): Renamed from
3551         build_function_call_expr.  All callers changed.
3552
3553         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
3554         * jcf-parse.c: Include tm_p.h.
3555
3556         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
3557         warning.
3558
3559 2003-01-14  Tom Tromey  <tromey@redhat.com>
3560
3561         * class.c (make_class_data): Check that super is compiled before
3562         building class reference to it.
3563
3564 2003-01-14  Andrew Haley  <aph@redhat.com>
3565
3566         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
3567         varargs function -- correct.
3568
3569 2003-01-14  Andrew Haley  <aph@redhat.com>
3570
3571         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
3572
3573 2003-01-14  Andrew Haley  <aph@redhat.com>
3574
3575         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
3576         varargs function -- correct.
3577
3578         * parse.y (patch_assignment): Copy the rhs of an assignment into a
3579         temporary if the RHS is a reference.
3580
3581 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3582
3583         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
3584         * keyword.h: Regenerated.
3585
3586         * All Files: Convert to ISO C style function definitions.
3587
3588 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
3589
3590         * parse.y (check_pkg_class_access): ANSIfy definition.
3591
3592 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3593
3594         * decl.c, parse-scan.y, parse.y: Don't cast return value of
3595         xmalloc et al.
3596
3597         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
3598
3599 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3600
3601         Merge from pch-branch:
3602
3603         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
3604
3605         * Make-lang.in (java/gjavah.o): Update dependencies.
3606         * gjavah.c: Include ggc.h.
3607
3608         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
3609
3610         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
3611         (JCFDUMP_OBJS): Add ggc-none.o.
3612         (java/jcf-dump.o): Depend on GGC_H.
3613         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
3614         CPool substructures.
3615         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
3616         * jcf-dump.c: Include ggc.h.
3617
3618         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
3619
3620         * jcf.h (union cpool_entry): New.
3621         (struct CPool): Use gengtype to mark.  Change field 'data' to be
3622         an array of unions.
3623         (struct JCF): Use gengtype to mark.
3624         (CPOOL_UINT): Update for new cpool_entry type.
3625         (CPOOL_USHORT1): Likewise.
3626         (CPOOL_USHORT2): Likewise.
3627         (CPOOL_FINISH): Use GC to free cpool subfields.
3628         * parse.h (struct parser_ctxt): Mark field current_jcf.
3629         * lex.c (java_init_lex): Use GC to allocate struct JCF.
3630         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
3631         (main_jcf): Use gengtype to mark.
3632         (ggc_mark_jcf): Delete.
3633         (get_constant): Update for new cpool_entry type.
3634         (give_name_to_class): Likewise.
3635         (get_class_constant): Likewise.
3636         (init_outgoing_cpool): Use GGC to allocate struct CPool.
3637         (java_parse_file): Use GGC to allocate struct JCF.
3638         (init_jcf_parse): Don't call ggc_add_root.
3639         * jcf-reader.c (jcf_parse_constant_pool): Update for new
3640         cpool_entry type.
3641         * java-tree.h (current_jcf): Use gengtype to mark.
3642         (CPOOL_UTF): Update for new cpool_entry type.
3643         (outgoing_cpool): Use gengtype to mark.
3644         (struct lang_type): GC struct JCF and struct CPool.
3645         * config-lang.in (gtfiles): Add jcf.h.
3646         * constants.c (find_tree_constant): New.
3647         (set_constant_entry): Allocate cpool subfields using GGC.  Update
3648         for new cpool_entry type.
3649         (find_constant1): Update for new cpool_entry type.
3650         (find_constant2): Likewise.
3651         (find_utf8_constant): Use find_tree_constant.
3652         (find_class_or_string_constant): Remove unnecessary cast to jword.
3653         Update for new cpool_entry type.
3654         (count_constant_pool_bytes): Update for new cpool_entry type.
3655         (write_constant_pool): Likewise.
3656         (alloc_name_constant): Use find_tree_constant.
3657         (build_constants_constructor): Update for new cpool_entry type.
3658
3659         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
3660
3661         * parse.y (mark_parser_ctxt): Delete.
3662         (goal): Don't use ggc_add_root.
3663         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
3664         (java_pop_parser_context): Let GC free parser_ctxt.
3665         (java_parser_context_resume): Likewise.
3666         * parse.h (struct parser_ctxt): Use gengtype to mark.
3667         (ctxp): Likewise.
3668         (ctxp_for_generation): Likewise.
3669         * lex.h (struct java_lc_s): Mark for gengtype.
3670         (java_lexer): Rearrange for gengtype.
3671         * config-lang.in (gtfiles): Add lex.h, parse.h.
3672
3673 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3674
3675         * All Files: Remove PARAMS macro.
3676
3677         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
3678         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
3679         `__STDC__' macros.
3680
3681         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
3682         VA_CLOSE.
3683
3684 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
3685
3686         * Make-lang.in (java.install-common, java.uninstall,
3687         java.install-info, java.install-man): Prepend $(DESTDIR)
3688         to destination paths in all (un)installation commands.
3689         (java.install-common): Rewrite $(LN) command to support
3690         DESTDIR with "ln" as well as with "ln -s".
3691
3692 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
3693
3694         * java-tree.h: Protect against multiple inclusion.
3695
3696 2003-01-07  Tom Tromey  <tromey@redhat.com>
3697
3698         * class.c (add_assume_compiled): Don't adjust parent if we're
3699         already at the root of tree.
3700
3701 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3702
3703         * lang.c (dump_compound_expr): Prototype.
3704
3705 2003-01-03  Tom Tromey  <tromey@redhat.com>
3706
3707         Fix for PR java/8712:
3708         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
3709         when simply checking against `null'.
3710
3711 2003-01-03  Tom Tromey  <tromey@redhat.com>
3712
3713         * gcj.texi (Standard Properties): Document http.proxyHost and
3714         http.proxyPort.
3715
3716         * gcj.texi (GNU Classpath Properties): Document new properties.
3717
3718 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3719
3720         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
3721         java/lang-options.h, java/mangle.c, java/mangle_name.c,
3722         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
3723
3724 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3725
3726         * Make-lang.in, boehm.c, buffer.c,
3727           buffer.h, builtins.c, class.c,
3728           config-lang.in, constants.c,
3729           convert.h, decl.c, except.c,
3730           expr.c, java-except.h,
3731           java-tree.h, javaop.def,
3732           jcf-parse.c, jcf-write.c,
3733           jv-scan.c, jvgenmain.c,
3734           jvspec.c, keyword.gperf,
3735           keyword.h, lang-options.h,
3736           lang-specs.h, lang.c, lex.c,
3737           lex.h, mangle.c, mangle_name.c,
3738           parse-scan.y, parse.h, parse.y,
3739           typeck.c, verify.c, xref.c,
3740           xref.h: Replace "GNU CC" with
3741           "GCC" in the copyright header.
3742
3743         * check-init.c, gjavah.c, javaop.h,
3744           jcf-depend.c, jcf-dump.c, jcf-io.c,
3745           jcf-path.c, jcf-reader.c, jcf.h,
3746           zextract.c, zipfile.h: These files are
3747           "part of GCC". Also say "GCC" not "GNU CC".
3748
3749 2002-12-30  DJ Delorie  <dj@redhat.com>
3750
3751         * Make-lang.in: Protect against texi2pod/pod2man failing.
3752
3753 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
3754
3755         * gcj.texi: Use @copying.
3756
3757 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
3758
3759         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
3760         print_cxx_classname.
3761         (print_cxx_classname): Add add_scope parameter.
3762         (print_class_decls): Do not emit a semicolon after the extern
3763         "Java" block.
3764         (process_file): Adjust calls to print_cxx_classname.
3765
3766 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
3767
3768         * gcj.texi: Include Cover Texts in man page.
3769
3770 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
3771
3772         * class.c (build_static_field_ref): Check FIELD_FINAL.
3773
3774         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
3775         instead of current_constant_pool_data_ref.
3776         * java-tree.h (current_constant_pool_data_ref): Undefine.
3777         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
3778         * jcf-parse.c (init_outgoing_cpool): Don't initialize
3779         current_constant_pool_data_ref.
3780
3781         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
3782         not build_internal_class_name.
3783
3784         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
3785         Use it when class ref isn't certain to be compiled.
3786
3787 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
3788
3789         * gcj.texi: Include gcc-common.texi.
3790         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
3791         $(srcdir)/doc/include/gcc-common.texi.
3792
3793 2002-12-22  Anthony Green  <green@redhat.com>
3794
3795         * gcj.texi (Limitations): Add note about org.xml.sax and
3796         org.w3c.dom.
3797
3798 2002-12-20  Tom Tromey  <tromey@redhat.com>
3799
3800         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
3801         where minimum case value is Integer.MIN_VALUE.
3802         Fixes PR java/8955.
3803
3804 2002-12-18  Andrew Haley  <aph@redhat.com>
3805
3806         * parse.y (patch_invoke): Force evaluation order when `check' is
3807         set.  For PR libgcj/8945.
3808
3809 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
3810
3811         * gcj.texi: Change version number to 3.4.
3812
3813 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
3814         Andrew Haley <aph@redhat.com>
3815
3816         * parse.y (source_end_java_method): Remove custom encoding of line
3817         numbers for a function decl before passing it to the back end.
3818
3819 2002-12-03  Andrew Haley  <aph@redhat.com>
3820
3821         * class.c (make_class_data): New field, "chain".
3822         * decl.c (java_init_decl_processing): Likewise.
3823
3824 2002-12-02  Tom Tromey  <tromey@redhat.com>
3825
3826         For PR java/8740:
3827         * parse.y (do_resolve_class): Handle qualified name via
3828         recursion.
3829
3830 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3831
3832         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
3833         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
3834         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
3835         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
3836         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
3837         Include coretypes.h and tm.h.
3838         * Make-lang.in: Update dependencies.
3839
3840 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3841
3842         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
3843
3844 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
3845
3846         * jcf-reader.c: Don't expand JCF_readu4 inside the
3847         expansion of JCF_SKIP.
3848
3849 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
3850
3851         * jcf-reader.c: Don't expand JCF_readu4 inside the
3852         expansion of JCF_SKIP.
3853
3854 2002-11-22  Tom Tromey  <tromey@redhat.com>
3855
3856         * parse.y (patch_binop): Cast right hand side of shift expression
3857         to `int'.  Fixes PR java/8676.
3858
3859 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
3860             Andrew Haley <aph@redhat.com>
3861
3862         * gcc/java/jcf-write.c (write_classfile): Remove target
3863         class file, if it exists, before renaming the temporary
3864         class file to it.
3865
3866 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3867
3868         * jvspec.c (lang_specific_spec_functions): New.
3869
3870 2002-11-18  Tom Tromey  <tromey@redhat.com>
3871
3872         Fix for PR java/7912:
3873         * expr.c (can_widen_reference_to): Allow cast of array to
3874         Cloneable or Serializable.
3875         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
3876         (java_io_serializable_identifier_node): Likewise.
3877         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
3878         (valid_ref_assignconv_cast_p): Use new identifier nodes.
3879         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
3880         java_io_serializable.
3881         * decl.c (java_init_decl_processing): Initialize
3882         java_lang_cloneable_identifier_node and
3883         java_io_serializable_identifier_node.
3884         (java_lang_cloneable_identifier_node): New global.
3885         (java_io_serializable_identifier_node): Likewise.
3886
3887 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
3888
3889         * buffer.c: Remove unnecessary casts.
3890         * check-init.c: Likewise.
3891         * class.c: Likewise.
3892         * constants.c: Likewise.
3893         * decl.c: Likewise.
3894         * except.c: Likewise.
3895         * gjavah.c: Likewise.
3896         * jcf-io.c: Likewise.
3897         * jcf-parse.c: Likewise.
3898         * jcf-path.c: Likewise.
3899         * jvspec.c: Likewise.
3900         * lang.c: Likewise.
3901         * lex.c: Likewise.
3902         * verify.c: Likewise.
3903
3904 2002-11-06  Tom Tromey  <tromey@redhat.com>
3905
3906         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
3907         a JNI header.
3908
3909 2002-11-05  Tom Tromey  <tromey@redhat.com>
3910
3911         Fix for PR java/6388.
3912         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
3913         * java-tree.h (enum java_tree_index): New values
3914         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
3915         (decimal_int_max, decimal_long_max): New defines.
3916         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
3917         (error_if_numeric_overflow): Rewrote range checking.
3918         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
3919         decimal_long_max.
3920
3921 2002-11-02  Tom Tromey  <tromey@redhat.com>
3922
3923         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
3924
3925         * class.c (make_method_value): Put class name, not signature, into
3926         `throws' field.  For PR java/8415.
3927
3928 2002-10-24  Tom Tromey  <tromey@redhat.com>
3929
3930         * gcj.texi (Invoking gij): Document --showversion.
3931         (Standard Properties): java.library.path now set.
3932
3933 2002-10-23  Tom Tromey  <tromey@redhat.com>
3934
3935         * gjavah.c (decode_signature_piece): In JNI mode, print
3936         `jobjectArray' when array depth is nonzero.
3937         Fixes PR java/8296.
3938
3939 2002-10-15  Andrew Haley  <aph@redhat.com>
3940
3941         * parse.y (patch_invoke): Call force_evaluation_order on a static
3942         arg list.
3943         (resolve_qualified_expression_name): Call force_evaluation_order
3944         on a arg list that is part of a Qualified Expression Name.
3945
3946         * lang.c (dump_compound_expr): New.
3947         (java_dump_tree): New.
3948
3949 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
3950
3951         * gcj.texi: Added item describing the GCJ runtime property
3952         "gnu.gcj.progname".
3953
3954 2002-10-15  Richard Henderson  <rth@redhat.com>
3955
3956         * jcf-parse.c (get_constant): Fix type warning.
3957
3958 2002-10-15  Andrew Haley  <aph@redhat.com>
3959
3960         * java-tree.h (java_inlining_merge_static_initializers): Declare.
3961         (java_inlining_map_static_initializers): Declare.
3962
3963 2002-10-14  Andrew Haley  <aph@redhat.com>
3964
3965         * tree-inline.c (remap_block): All local class initialization
3966         flags go in the outermost scope.
3967         (expand_call_inline): Call java_inlining_map_static_initializers.
3968         (expand_call_inline): Call java_inlining_merge_static_initializers.
3969         * java/lang.c (merge_init_test_initialization): New.
3970         (java_inlining_merge_static_initializers): New.
3971         (inline_init_test_initialization): New.
3972         (java_inlining_map_static_initializers): New.
3973
3974 2002-10-11  Mark Wielaard  <mark@klomp.org>
3975
3976         * gcj.texi (Compatibility): Add Limitations and Extensions section.
3977
3978 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3979
3980         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
3981
3982 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3983
3984         * parse.y (merge_string_cste): Add parentheses around & within |.
3985
3986 2002-10-08  Tom Tromey  <tromey@redhat.com>
3987
3988         * parse.y (variable_declarator_id): Simplify error path for
3989         array declarator error.  For PR java/8003.
3990
3991 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
3992
3993         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
3994         bug_report_url.
3995
3996 2002-10-08  Andrew Haley  <aph@redhat.com>
3997
3998         * parse.y (attach_init_test_initialization_flags): Check for
3999         error_mark_node.
4000
4001 2002-10-07  Anthony Green  <green@redhat.com>
4002
4003         * parse.y (merge_string_cste): Fix bug in string concatenation.
4004
4005 2002-10-03  Michael Koch  <konqueror@gmx.de>
4006
4007         * gcj.texi (Standard properties):
4008         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
4009
4010 2002-10-02  Roger Sayle  <roger@eyesopen.com>
4011
4012         PR optimization/6627
4013         * lang.c (java_init): If storing the vbit in function
4014         pointers, ensure that force_align_functions_log is atleast
4015         one to aid compatability with g++ vtables.
4016
4017 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
4018
4019         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
4020         foul of type-based aliasing.
4021
4022 2002-09-30  Anthony Green  <green@redhat.com>
4023
4024         * gcj.texi (Invoking jv-scan): Fix texinfo.
4025
4026 2002-09-28  Anthony Green  <green@redhat.com>
4027
4028         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
4029         (Code Generation): Add -fno-assert documentation.
4030         * jv-scan.c (flag_assert): New global.
4031         (options): Add assert option.
4032         (help): Add --no-assert documentation.
4033         * parse-scan.y (flag_assert): New global.
4034         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
4035         (flag_assert): New global.
4036         * java-tree.h (flag_assert): New global.
4037         * lex.c (java_lex): Obey flag_assert.
4038         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
4039         calling cc1.
4040
4041 2002-09-26  Andrew Haley  <aph@redhat.com>
4042
4043         * expr.c (build_java_array_length_access): Check for null pointer.
4044         * expr.c (expand_java_arrayload): Likewise.
4045
4046 2002-09-21  Richard Henderson  <rth@redhat.com>
4047
4048         * jcf-parse.c (get_constant): Decode from IEEE no matter
4049         what the target format.
4050
4051 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
4052
4053         * ChangeLog: Follow spelling conventions.
4054         * class.c: Likewise.
4055         * decl.c: Likewise.
4056         * expr.c: Likewise.
4057         * gjavah.c: Likewise.
4058         * java-tree.h: Likewise.
4059         * jcf-dump.c: Likewise.
4060         * jcf-parse.c: Likewise.
4061         * jvspec.c: Likewise.
4062         * lang.c: Likewise.
4063         * mangle.c: Likewise.
4064         * parse.y: Likewise.
4065
4066 2002-09-17  Tom Tromey  <tromey@redhat.com>
4067
4068         * lex.c (java_read_unicode_collapsing_terminators): Handle case
4069         where \r appears at EOF.  Fixes PR java/7950.
4070
4071 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4072
4073         * jvspec.c (lang_specific_driver): Remove unused variable.
4074
4075 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
4076
4077         * java-tree.h (union lang_tree_node): Add chain_next option.
4078
4079 2002-09-16  Richard Henderson  <rth@redhat.com>
4080
4081         * jcf-parse.c (get_constant): Runtime check for IEEE format;
4082         use new real.h interface.
4083         * jcf-write.c (find_constant_index): Use new real.h interface.
4084         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
4085
4086 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
4087
4088         * lang.c: Follow spelling conventions.
4089
4090 2002-09-11  Per Bothner  <per@bothner.com>
4091
4092         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
4093         constant to the type of the field.
4094         (java_complete_tree):  Remove now-redundant code.
4095
4096         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
4097
4098 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
4099
4100         For PR java/5794:
4101         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
4102         return label if a ret instruction for the jsr has been reached.
4103
4104 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
4105
4106         * parse.y (DIR_SEPARATOR): Don't define.
4107         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
4108
4109 2002-08-28  Andrew Haley  <aph@redhat.com>
4110
4111         * verify.c (verify_jvm_instructions): Allow exception handler
4112         inside code that is being protected, but generate a warning.
4113         * except.c (link_handler): Initialize `expanded' in new eh_range.
4114         (binding_depth, is_class_level, current_pc): Declare extern.
4115
4116 2002-09-01  Mark Wielaard <mark@klomp.org>
4117
4118         * gcj.texi: Add chapter about system properties.
4119         Fixed some typos.
4120
4121 2002-08-26  Tom Tromey  <tromey@redhat.com>
4122
4123         * parse.y (try_builtin_assignconv): Allow narrowing primitive
4124         conversion if RHS_TYPE is byte, short, or char.
4125
4126 2002-08-22  Tom Tromey  <tromey@redhat.com>
4127
4128         * gcj.texi (Invoking gij): Document -cp and -classpath.
4129
4130 2002-08-21  Tom Tromey  <tromey@redhat.com>
4131
4132         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
4133         $(prefix)/share.  For PR libgcj/7633.
4134
4135         For PR java/6005 and PR java/7611:
4136         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
4137         (java_can_use_bit_fields_p): New function.
4138
4139 2002-08-16  Tom Tromey  <tromey@redhat.com>
4140
4141         * gcj.texi (Class Initialization): Mention class initialization of
4142         arrays.
4143
4144 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
4145
4146         * Make-lang.in (java-tree-inline.o): New.
4147         (JAVA_OBJS): Add java-tree-inline.o.
4148         * parse.y (source_end_java_method): Call java_optimize_inline.
4149         (java_expand_method_bodies): Save method's tree in
4150         DECL_SAVED_TREE.
4151         (add_stmt_to_compound): Keep track of the number of statments.
4152         * lang.c (java_init): Enable flag_inline_trees.
4153         (java_post_options): If flag_inline_functions is on, enable
4154         flag_inline_trees instread.
4155         (decl_constant_value): New.
4156         (java_tree_inlining_walk_subtrees): New.
4157         * java-tree.h (DECL_NUM_STMTS): New macro.
4158         (java_optimize_inline): Declare.
4159         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
4160         Handle a LABEL_EXPR.
4161         * decl.c (build_result_decl): If we already have a DECL_RESULT
4162         don't make another.
4163         (dump_function): New.
4164         (java_optimize_inline): New.
4165         (dump_function): New.
4166
4167 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
4168
4169         For PR java/7483:
4170         * parse.y (build_assertion): Invert return from
4171         desiredAssertionStatus.
4172
4173 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4174
4175         * jcf-write.c (get_access_flags): Return correct access flags for
4176         private and protected inner classes.
4177
4178 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4179
4180         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
4181
4182 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4183
4184         * mangle_name.c: Don't include obstack.h twice.
4185         * xref.c: Don't include obstack.h.
4186
4187 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4188
4189         * class.c: (permanent_obstack): Delete declaration.
4190         * constants.c: (permanent_obstack): Delete declaration.
4191         * except.c: (permanent_obstack): Delete declaration.
4192         * expr.c: (permanent_obstack): Delete declaration.
4193         * jcf-parse.c: (permanent_obstack): Delete declaration.
4194         (saveable_obstack): Delete declaration.
4195         * parse.h: (permanent_obstack): Delete declaration.
4196         * typeck.c: (permanent_obstack): Delete declaration.
4197
4198 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
4199
4200         * gcj.texi (version-gcc): Increase to 3.3.
4201
4202 2002-07-22  Tom Tromey  <tromey@redhat.com>
4203
4204         * lex.c (java_lex): Check for `e' or `E' after 0.
4205
4206 2002-07-21  Richard Henderson  <rth@redhat.com>
4207
4208         * lang.c (java_unsafe_for_reeval): New.
4209         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
4210
4211 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
4212
4213         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
4214         (jcf_path_init): Use GET_ENVIRONMENT.
4215
4216 2002-07-10  Roger Sayle  <roger@eyesopen.com>
4217             Zack Weinberg <zack@codesourcery.com>
4218
4219         * builtins.c (initialize_builtins): Remove defines that
4220         handled C/C++ specific junk hereby removed from builtins.def.
4221
4222 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
4223
4224         * lang.c (java_post_options): Update prototype.
4225
4226 2002-07-05  Roger Sayle  <roger@eyesopen.com>
4227
4228         * builtins.c (initialize_builtins): Ignore the additional
4229         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
4230         the builtins.def file.
4231
4232 2002-07-01  Tom Tromey  <tromey@redhat.com>
4233
4234         For PR libgcj/7073:
4235         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
4236         specially.
4237
4238 2002-07-01  Roger Sayle  <roger@eyesopen.com>
4239
4240         * java/decl.c (builtin_function): Accept additional parameter.
4241         (java_init_decl_processing): Pass an additional NULL_TREE
4242         argument to builtin_function.
4243
4244 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
4245
4246         * gcj.texi: Fixed gcj invocation example so that it compiles.
4247
4248 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4249
4250         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
4251         * parse.y (mark_parser_ctxt): Likewise.
4252         (check_modifiers, declare_local_variables): Avoid incorrect
4253         hardcoded constant 10.
4254
4255         * lex.c (java_read_char): Avoid "comparison is always true"
4256         warning.
4257
4258 2002-06-25  Andreas Schwab  <schwab@suse.de>
4259
4260         * expr.c (JSR): Avoid undefined operation on PC.
4261
4262 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4263
4264         * decl.c (clear_binding_level): Const-ify.
4265
4266 2002-06-13  Akim Demaille  <akim@epita.fr>
4267
4268         * parse.y (class_declaration, interface_declaration): Make sure
4269         all their rules have an action, in order to avoid meaningless `$$
4270         = $1' and their type clashes.
4271
4272 2002-06-11  Tom Tromey  <tromey@redhat.com>
4273
4274         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
4275         * parse-scan.y (statement_without_trailing_substatement): Added
4276         assert_statement.
4277         (assert_statement): New rule.
4278         * java-tree.h (struct lang_type) [assertions]: New field.
4279         (TYPE_USES_ASSERTIONS): New macro.
4280         (CLASS_USES_ASSERTIONS): Likewise.
4281         (FIELD_SYNTHETIC): New define.
4282         * lex.c (java_lval;): Added ASSERT_TK.
4283         * parse.y (ASSERT_TK): Added.
4284         (statement_without_trailing_substatement): Added assert_statement.
4285         (assert_statement): New rule.
4286         (build_assertion): New function.
4287         (maybe_generate_pre_expand_clinit): Create and initialize
4288         $assertionsDisabled.
4289         (lookup_package_type): Removed decl.
4290         * keyword.h: Rebuilt.
4291         * keyword.gperf (assert): New token.
4292
4293 2002-06-10  Akim Demaille  <akim@epita.fr>
4294
4295         * parse.y (interface_type_list, class_member_declaration)
4296         (unary_expression_not_plus_minus): Remove duplicate %type.
4297         Whitespace changes.
4298
4299 2002-06-09  Tom Tromey  <tromey@redhat.com>
4300
4301         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
4302
4303         * parse.y (method_header): Give error message in all cases.
4304         Fixes PR java/6865.
4305
4306 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4307
4308         Don't use RTL inlining. Fix for PR java/6820.
4309         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
4310         (flag_really_inline): New.
4311         (java_decode_option): Set flag_really_inline if -finline-functions
4312         is seen.
4313         (java_post_options): New function. Turn off inlining unless
4314         flag_really_inline is set.
4315
4316 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4317
4318         * gjavah.c (throwable_p): Accept argument as either a classname or
4319         signature fragment. Create null-terminated classname string for super
4320         when calling itself recursively.
4321         (decode_signature_piece): Skip first character from class name
4322         signature when calling throwable_p.
4323
4324 2002-06-08  H.J. Lu  (hjl@gnu.org)
4325
4326         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
4327
4328 2002-06-04  Tom Tromey  <tromey@redhat.com>
4329
4330         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
4331
4332 2002-06-04  Michael Koch  <konqueror@gmx.de>
4333
4334         * gcj.texi (Input Options): Fixed typo.
4335
4336 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
4337
4338         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
4339         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
4340         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
4341         and all now-pointless local variables.  Rename other local
4342         variables to reflect their not being handles.
4343
4344         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
4345         #if JCF_USE_STDIO blocks.
4346
4347         * parse.y: Add missing semicolon at end of rule.
4348
4349 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4350
4351         * check-init.c (attach_initialized_static_class): Delete, unused.
4352         * parse.y: Use htab_t instead of struct hashtable, update
4353         all uses.
4354         * java-tree.h: Include hashtab.h instead of hash.h.
4355         (struct lang_decl_func): Use htab_t, set up for gengtype.
4356         (struct init_test_hash_entry): Delete.
4357         (struct treetreehash_entry): New.
4358         (java_treetreehash_find): New
4359         (java_treetreehash_new): New prototype.
4360         (java_treetreehash_create): New prototype.
4361         (java_mark_tree): Delete prototype.
4362         (java_hash_hash_tree_node): Delete prototype.
4363         (java_hash_compare_tree_node): Delete prototype.
4364         (attach_initialized_static_class): Delete prototype.
4365         * expr.c (build_class_init): Update to use java_treetreehash
4366         functions.
4367         (java_expand_expr): Update to use htab_t.
4368         (emit_init_test_initialization): Likewise.
4369         * decl.c (java_mark_tree): Delete.
4370         * class.c (init_test_hash_newfunc): Delete.
4371         (java_hash_hash_tree_node): Delete.
4372         (java_hash_compare_tree_node): Delete.
4373         (add_method_1): Update to use java_treetreehash functions.
4374         (JAVA_TREEHASHHASH_H): New macro.
4375         (java_treetreehash_hash): New function.
4376         (java_treetreehash_compare): New function.
4377         (java_treetreehash_find): New function.
4378         (java_treetreehash_new): New function.
4379         (java_treetreehash_create): New function.
4380         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
4381
4382         * Make-lang.in (java/parse.o): Depend on debug.h.
4383         * java-tree.h (struct lang_identifier): Use gengtype.
4384         (union lang_tree_node): New.
4385         (struct lang_decl_func): Use gengtype.
4386         (struct lang_decl_var): Likewise.
4387         (struct lang_decl): Likewise.
4388         * parse.y: Include debug.h.
4389         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
4390
4391         * lang.c (struct language_function): New dummy structure.
4392
4393         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
4394         descriminator for DECL_LANG_SPECIFIC.
4395         (struct lang_decl_func): Rename from struct lang_decl.
4396         (enum lang_decl_desc): New.
4397         (struct lang_decl): Make it a union.  Update all the accessor macros.
4398         (struct lang_type): Use gengtype.
4399         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
4400         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
4401         are now the same size.
4402         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
4403         use discriminator to mark DECL_LANG_SPECIFIC.
4404
4405         * Make-lang.in (gt-java-builtins.h): New rule.
4406         (java/builtins.o): Add dependency on gt-<filename>.h.
4407         * builtins.c: Use gengtype for roots.
4408         (union string_or_tree): Use gengtype.
4409         (struct builtin_record): Use gengtype.
4410         * config-lang.in (gtfiles): Add builtins.c.
4411
4412         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
4413         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
4414         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
4415         gt-java-parse.h, gtype-java.h): Add rules to generate.
4416         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
4417         (class.o): Add dependency on gt-*.h.
4418         (constants.o): Likewise.
4419         (decl.o): Likewise.
4420         (expr.o): Likewise.
4421         (jcf-parse.o): Likewise.
4422         (jcf-write.o): Likewise.
4423         (lang.o): Likewise.
4424         * config-lang.in (gtfiles): New.
4425         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4426         * constants.c: Replace uses of ggc_add_* with GTY markers.
4427         Include gt-*.h.
4428         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4429         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4430         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
4431         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
4432         Include gt-*.h.
4433         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
4434         Include gt-*.h.
4435         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4436         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
4437         gt-*.h.
4438         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
4439         Include gtype-java.h.
4440
4441 2002-06-02  Tom Tromey  <tromey@redhat.com>
4442
4443         Fix for PR java/5913:
4444         * parse.y (patch_binop): Call patch_string on op1.
4445
4446 2002-06-02  Tom Tromey  <tromey@redhat.com>
4447
4448         Fix for PR java/1343, PR java/6336:
4449         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
4450         formatting.  Changed return type.
4451         (anonymous_class_counter): Moved to top of file.
4452         (maybe_make_nested_class_name): Append number to class name for
4453         function-local classes.
4454
4455 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4456
4457         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
4458         * Make-lang.in: Update dependency lists.
4459
4460 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
4461
4462         * gjavah.c (throwable_p): Do not free the name of the class after
4463         passing it to find_class.
4464         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
4465         * jcf-io.c (dirent.h): Include it.
4466         (fnmatch.h): Likewise.
4467         (compare_path): New function.
4468         (java_or_class_file): Likewise.
4469         (memoized_dirlist_entry): New type.
4470         (memoized_dirlist_lookup_eq): New function.
4471         (memoized_dirlists): New variable.
4472         (caching_stat): New function.
4473         (memoized_class_lookup_eq): New function.
4474         (memoized_class_lookups): Likewise.
4475         (find_class): Use memoized_class_lookups and caching_stat.
4476         * jcf.h (JCF_USE_SCANDIR): Define.
4477         * parse.y (java_expand_classes): Write the class files in reverse
4478         order.
4479
4480 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4481
4482         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
4483
4484 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
4485
4486         * jcf-write.c (write_classfile): Unlink the temporary file if it
4487         cannot be renamed.  Use concat to build up the name of the
4488         temporary file.
4489
4490 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
4491
4492         * jcf-write.c (write_classfile): Write the file to a
4493         temporary file and then rename it.
4494
4495 2002-05-07  Tom Tromey  <tromey@redhat.com>
4496
4497         * gjavah.c (throwable_p): Use xstrdup, not strdup.
4498
4499         Fix for PR java/1200:
4500         * gjavah.c (throwable_p): New function.
4501         (decode_signature_piece): Use it.  A `WeakReference' isn't the
4502         same as a `jweak'.
4503         Include hashtab.h.
4504         (gcjh_streq): New function.
4505
4506 2002-05-07  Andreas Jaeger  <aj@suse.de>
4507
4508         * parse.y (finish_for_loop): Fix if statement.
4509
4510 2002-05-06  Tom Tromey  <tromey@redhat.com>
4511
4512         Fix for PR java/5941:
4513         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
4514         loop update expression.
4515         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
4516         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
4517
4518 2002-05-04  Mark Wielaard  <mark@klomp.org>
4519
4520         For PR java/6519:
4521         * parse.y (build_string_concatenation): Return just op1 only when op2
4522         is null and op1 is a STRING_CST, otherwise always construct a
4523         StringBuffer.
4524
4525 2002-04-27  Tom Tromey  <tromey@redhat.com>
4526
4527         For PR java/6382:
4528         * parse.y (string_convert_int_cst): New function.
4529         (merge_string_cste): Use it.
4530
4531 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4532
4533         * java-tree.h (java_parse_file): Update.
4534         (java_set_yydebug): Remove.
4535         * jcf-parse.c (yydebug): Remove.
4536         (java_set_yydebug): Die.
4537         (java_parse_file): Update.
4538         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4539
4540 2002-04-24  Tom Tromey  <tromey@redhat.com>
4541
4542         For PR java/6425:
4543         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
4544         EXPR_WFL_QUALIFICATION of qual_wfl.
4545
4546 2002-04-23  Per Bothner  <per@bothner.com>
4547
4548         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
4549         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
4550         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
4551
4552 2002-04-23  Tom Tromey  <tromey@redhat.com>
4553
4554         For PR java/6314:
4555         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
4556         recognize `-fcompile-resource='.
4557         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
4558         a bit.
4559
4560 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4561
4562         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
4563         paths. Fixes PR java/2791.
4564
4565 2002-04-19  Andrew Haley  <aph@redhat.com>
4566
4567         * jcf-write.c (push_long_const): lo, hi: New variables.
4568         Use rshift_double to extract the high part of a 64-bit long.
4569         Use WORD_TO_INT to extract the low part.
4570
4571         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
4572         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
4573         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
4574
4575 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4576
4577         * typeck.c (incomplete_type_error): Remove.
4578
4579 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4580
4581         * class.c (make_class_data): Set DECL_ALIGN on static class data,
4582         for hash synchronization.
4583         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
4584         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
4585         class_type_node.
4586
4587 2002-04-16  Mark Wielaard  <mark@klomp.org>
4588
4589         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
4590         negative zero.
4591
4592 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4593
4594         Fix for PR java/6294:
4595         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
4596         interfaces.
4597
4598 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4599
4600         Fix for PR java/6085:
4601         * parse.y (patch_method_invocation): Always use build_access_to_thisn
4602         to get enclosing "this" argument for inner-class constructor
4603         invocation. Pass correct arguments to build_access_to_thisn.
4604
4605 2002-04-10  Andreas Jaeger  <aj@suse.de>
4606
4607         * gcj.texi (Input Options): Fix extdirs patch.
4608
4609 2002-04-10  Anthony Green  <green@redhat.com>
4610
4611         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
4612
4613 2002-04-09  Anthony Green  <green@redhat.com>
4614
4615         * gcj.texi (Input Options): Add --extdirs documentation.
4616         * jcf-dump.c (OPT_extdirs): New macro.
4617         (options): Add extdirs option.
4618         (help): Describe --extdirs.
4619         (main): Handle OPT_extdirs.
4620         * gjavah.c (OPT_extdirs): New macro.
4621         (options): Add extdirs option.
4622         (help): Describe --extdirs.
4623         (main): Handle OPT_extdirs.
4624         * jcf-path.c (jcf_path_init): Add extdirs support.
4625         (jcf_path_extdirs_arg): New function.
4626         (extensions): New variable to hold extensions path entries.
4627         * jvspec.c: Remove -fextdirs= when compiling main().
4628         * lang.c (java_decode_option): Handle -fextdirs=.
4629         * jcf.h (jcf_path_extdirs_arg): Declare new function.
4630         * Make-lang.in: Compile jcf-path with version info for use in
4631         identifying the appropriate libgcj.jar.
4632
4633 2002-04-08  Tom Tromey  <tromey@redhat.com>
4634
4635         For PR libgcj/5303:
4636         * .cvsignore: Added rmic.1 and rmiregistry.1.
4637         * gcj.texi (Top): Link to new nodes.
4638         (Invoking rmic): New node.
4639         (Invoking rmiregistry): Likewise.
4640         * Make-lang.in (java.generated-manpages): Added rmic.1 and
4641         rmiregistry.1.
4642         (java.maintainer-clean): Likewise.
4643         ($(srcdir)/java/rmic.1): New target.
4644         ($(srcdir)/java/rmiregistry.1): Likewise.
4645         (java.install-man): Handle rmic.1 and rmiregistry.1.
4646
4647 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4648
4649         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
4650         Add note about handling uncaught exceptions. Add an exception handler
4651         to example.
4652
4653 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4654
4655         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
4656         after using it to patch CALL_EXPR.
4657
4658 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4659
4660         * gcj.texi (Invocation): Document CNI invocation API.
4661
4662 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4663
4664         * expr.c (truthvalue_conversion): Rename.  Update.
4665         (expand_compare): Update.
4666         * java-tree.h (java_truthvalue_conversion): New.
4667         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4668
4669 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4670
4671         * java-tree.h (java_mark_addressable): New.
4672         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4673         * typeck.c (mark_addressable): Rename, update.
4674
4675 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4676
4677         * expr.c (build_java_binop): Update.
4678         * java-tree.h (java_signed_type, java_unsigned_type,
4679         java_signed_or_unsigned_type): Update.
4680         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4681         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4682         * parse.y (patch_binop): Update.
4683         * typeck.c (signed_or_unsigned_type, unsigned_type,
4684         signed_type): Update.
4685
4686 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4687
4688         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4689         (java_dummy_print): Remove.
4690         (lang_print_error): Rename.  Exit early if inhibiting output.
4691         (inhibit_error_printing_function): New.
4692         (java_init): Don't set hook.
4693         (lang_init_source): Use new boolean.
4694
4695 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
4696
4697         * parse.y (do_resolve_class): Fix infinite recursion.
4698
4699 2002-03-29  Tom Tromey  <tromey@redhat.com>
4700
4701         * parse.y (check_inner_circular_reference): Ignore incomplete
4702         types.
4703
4704 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4705
4706         * Make-lang.in (builtins.o): Update.
4707         * boehm.c (get_boehm_type_descriptor): Update.
4708         * builtins.c: Include langhooks.h.
4709         * decl.c (java_init_decl_processing): Update.
4710         * java-tree.h (java_type_for_mode, java_type_for_size): New.
4711         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
4712         Redefine.
4713         * typeck.c (type_for_mode, type_for_size): Update.
4714
4715 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
4716
4717         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
4718
4719 2002-03-28  Tom Tromey  <tromey@redhat.com>
4720
4721         * except.c (expand_end_java_handler): If the handler type is NULL,
4722         use java.lang.Throwable.  Fixes PR java/5986.
4723
4724 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4725
4726         Fix for PR java/4715:
4727         * jcf-parse.c (parse_source_file_3): New function.
4728         (read_class): Call it.
4729         (java_parse_file): Likewise.
4730
4731 2002-03-28  Jan Hubicka  <jh@suse.cz>
4732
4733         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
4734
4735 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4736
4737         * parse.y (resolve_package): Initialize "decl".
4738         (lookup_package_type): Remove unused function.
4739
4740 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4741
4742         Fix for PR java/5993:
4743         * parse.y (resolve_package): Return the decl if resolution was
4744         successful. Don't special case "java.lang" and "java.lang.reflect"
4745         packages. Set type_name to the merged identifier.
4746         (resolved_qualified_expression_name): Print error using "name" if
4747         resolve_package returns NULL_TREE.
4748
4749 2002-03-27  Tom Tromey  <tromey@redhat.com>
4750
4751         * expr.c (expand_invoke): Don't generate null pointer check if
4752         we're calling <init>.
4753
4754 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4755
4756         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
4757         fix prototype.
4758         * java-tree.h (java_lang_expand_expr): Similarly.
4759         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4760         (java_init): Don't set hook.
4761
4762 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4763
4764         Fix for PR java/5850:
4765         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
4766         context if field was not found in the current scope.
4767         * expr.c (lookup_field): Don't look in enclosing contexts.
4768
4769 2002-03-26  Tom Tromey  <tromey@redhat.com>
4770
4771         Fix for PR java/5942:
4772         * parse.y (init_src_parse): Added sanity check.
4773         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
4774         elements, not 11.
4775
4776 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4777
4778         * decl.c (lang_mark_tree): Rename java_mark_tree.
4779         * java-tree.h (java_mark_tree): New.
4780         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4781
4782 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
4783
4784         * lex.c: Change java_perform_atof to take normal parameters
4785         instead of a pointer to a parameter block.  Call it directly
4786         from java_lex.
4787
4788 2002-03-22  Mark Wielaard  <mark@klomp.org>
4789
4790         Fix for PR java/5368:
4791         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
4792         when printing error message.
4793
4794 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4795
4796         * decl.c (maybe_build_cleanup): Remove.
4797
4798 2002-03-22  Tom Tromey  <tromey@redhat.com>
4799
4800         Andrew Haley  <aph@cambridge.redhat.com>
4801
4802         * expr.c (build_field_ref): Don't build a check if the field is a
4803         member of `this'.
4804
4805 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
4806
4807         Fix for PR java/6026:
4808         * lex.c (java_lex): Fix parsing of consecutive floats.
4809
4810 2002-03-21  Tom Tromey  <tromey@redhat.com>
4811
4812         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
4813         class.
4814
4815 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4816
4817         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4818         insert_block, getdecls, kept_level_p, global_bindings_p): New.
4819
4820 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
4821
4822         * gcj.texi: @code{gcj} becomes @command{gcj}.
4823         @code{gcc} becomes @command{gcc}.
4824         GcjRaw changed to gnu.gcc.RawData.
4825
4826 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4827
4828         * decl.c (start_java_method): Use new hook.
4829         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4830         (java_init): Remove old hook.
4831
4832 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4833
4834         * builtins.c (define_builtin): Do nothing if `type' is null.
4835         Fixes PR java/5876.
4836
4837 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4838
4839         * parse.y (parser_check_super_interface): Fix error message
4840         grammar/order.
4841
4842 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4843
4844         * jcf-parse.c (get_constant): Delete unused variables.
4845
4846 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4847
4848         * java-tree.h (java_parse_file): New.
4849         * jcf-parse.c (yyparse): Rename java_parse_file.
4850         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4851
4852 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4853
4854         * parse.y (craft_constructor): Return the constructor decl.
4855         (java_expand_classes): Update comments.
4856         (lookup_method_invoke): Call fix_constructors immediately for
4857         anonymous class. Fixes PR java/5935.
4858
4859 2002-03-15  Anthony Green  <green@redhat.com>
4860
4861         * jcf-parse.c (yyparse): Don't emit class registration
4862         constructor when compiling resource files.
4863
4864 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4865
4866         * lang.c (java_tree_code_type, java_tree_code_length,
4867         tree_code_name): Delete.
4868         (tree_code_type, tree_code_length, tree_code_name): Define.
4869         (java_init): Don't try to copy into the various tree_code
4870         arrays.
4871
4872 2002-03-12  Tom Tromey  <tromey@redhat.com>
4873
4874         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
4875         UTF-8, not UCS-2.  Fixes PR java/5923.
4876
4877         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
4878         a call_expr wrapped in a convert.  Fixes PR java/5848.
4879
4880 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4881
4882         * jcf-write.c (write_classfile): Improve error strings.
4883
4884 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
4885
4886         * lex.c: Adjust comments to GNU standards.
4887
4888 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
4889
4890         Fix for PR java/5902:
4891         * lex.c (java_lex): Fix parsing of literals.
4892
4893 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4894
4895         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
4896         to prevent it getting evaluated twice in the store checking case.
4897         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
4898         examining OBJECT.
4899
4900 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4901
4902         * decl.c (java_init_decl_processing): Make sure class_type_node
4903         alignment is not less than 64 bits if hash synchronization is enabled.
4904
4905 2002-03-08  Per Bothner  <per@bothner.com>
4906
4907         * parse.y (java_complete_lhs):  Check if patch_assignment
4908         returned an error-mark.
4909
4910         * parse.y (try_builtin_assignconv):  Don't special-case zero.
4911
4912 2002-03-08  Per Bothner  <per@bothner.com>
4913
4914         Fix for PR java/5812.
4915         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
4916         here instead of in JSR macro.  Likewise with load_type_state call.
4917         Do the latter on if the return_pc has been verified (the jsr returns).
4918         (JSR):  Now just call build_java_jsr.
4919
4920 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
4921
4922         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
4923         (java.install-common): Link native driver to
4924         JAVA_TARGET_INSTALL_NAME.
4925
4926 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
4927
4928         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
4929         * builtins.c(sin_builtin): Likewise
4930         * builtins.c(sqrt_builtin): Likewise
4931
4932 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
4933
4934         * java/expr.c, java/jcf-parse.c, java/lex.c:
4935         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
4936         REAL_ARITHMETIC blocks unconditional.  Delete some further
4937         #ifdef blocks predicated on REAL_ARITHMETIC.
4938
4939 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4940
4941         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
4942         explicit sizeof/sizeof.
4943         * decl.c (java_init_decl_processing): Likewise.
4944         * jcf-parse.c (init_jcf_parse): Likewise.
4945         * parse.y (init_src_parse): Likewise.
4946
4947 2002-03-02  Per Bothner  <per@bothner.com>
4948
4949         Make --CLASSPATH by a synonym for --classpath and -classpath.
4950         Implement --bootclasspath.
4951         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
4952         (classpath_l):  Remove.
4953         (jcf_path_CLASSPATH_arg):  Remove.
4954         (jcf_path_bootclasspath_arg):  New function.
4955         (jcf_path_seal):  Simplify accordingly.
4956
4957         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
4958         (jcf_path_CLASSPATH):  Remove declaration.
4959         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
4960         (lang_specific_driver):  Translate -bootclasspath.
4961         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
4962         * lang.c (decode_lang_options):  Do jcf_path_init first.
4963         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
4964         * gjavah.c:  Also handle --bootclasspath.
4965         Handle --CLASSPATH as a synonum for --classpath.
4966         * jcf-dump.c: Likewise.
4967
4968         "." is not part of system path, but is the default for --classpath.
4969         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
4970         (jcf_path_seal):  Add "." if no CLASSPATH specified.
4971
4972         * gcj.texi:  Document changes.
4973
4974 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4975
4976         * expr.c (build_java_arraystore_check): Fix formatting.
4977
4978 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4979
4980         Fix for PR java/5758, java/5632:
4981         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
4982         inner-class separator too.
4983         * parse.y (do_resolve_class): New local `decl_result.'
4984         Progressively build a name for what can have been loaded.
4985
4986 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4987
4988         * expr.c (java_array_data_offset): Removed function.
4989         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
4990         (build_java_array_length_access): Obtain "length" value using a
4991         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
4992         (build_java_arrayaccess): Correct comment. Access "data" using a
4993         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
4994         (build_java_arraystore_check): New function.
4995         (expand_java_arraystore): Use build_java_arraystore_check.
4996         * parse.y (patch_assignment): Simplify code to insert a store check
4997         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
4998         * check-init.c (check_init): Update to reflect that an array length
4999         access is now a COMPONENT_REF.
5000         * gcj.texi (Code Generation): Improve documentation of
5001         -fno-bounds-check. Add documentation for -fno-store-check.
5002         * java-tree.h (flag_store_check): Declare.
5003         (build_java_arraystore_check): Declare.
5004         * lang.c (flag_store_check): Initialize to 1.
5005         (lang_f_options): Add store-check option.
5006         * jvspec.c: Don't pass store-check option to jvgenmain.
5007         * lang-options.h: Add help string for -fno-store-check.
5008
5009 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5010
5011         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
5012         * java-tree.h (java_dup_lang_specific_decl): New.
5013         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5014
5015 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5016
5017         * builtins.c, decl.c: Delete traditional-mode-related code
5018         copied from the C front end but not used, or used only to
5019         permit the compiler to link.
5020
5021 2002-02-22  Tom Tromey  <tromey@redhat.com>
5022
5023         Fix for PR java/2369:
5024         * jvspec.c (verify_class_name): New function.
5025         (lang_specific_driver): Call it.
5026         (JAVA_START_CHAR_P): New macro.
5027         (JAVA_PART_CHAR_P): Likewise.
5028
5029 2002-02-22  Per Bothner  <per@bothner.com>
5030
5031         * class.c:  Change vtable to be more compatible with g++ v3 abi.
5032         (get_dispatch_table):  Prepend offset-to-top (always 0) and
5033         type_info pointer (currently unimplemented hence NULL) to vtable.
5034         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
5035         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
5036         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
5037         (build_dtable_decl):  Add declarations for new fields.
5038
5039 2002-02-20  Per Bothner  <per@bothner.com>
5040
5041         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
5042         to finit$ (otherwise generate_bytecode_insns drops it). However, we
5043         don't need to set it on the COMPOUND_EXPR - the caller does that.
5044
5045 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5046
5047         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
5048         `--CLASSPATH' becomes `--classpath.'
5049         * gjavah.c: Likewise.
5050         * jcf-dump.c: Likewise.
5051         * lang-options.h: Likewise.
5052         * lang.c: Likewise.
5053         * jcf-path.c: Updated comment.
5054         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
5055         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
5056         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
5057         (jcf_path_CLASSPATH_arg): Ditto.
5058         (classpath_u): Updated leading comment.
5059
5060 2002-02-20  Per Bothner  <per@bothner.com>
5061
5062         * builtins.c (check_for_builtin):  New function.
5063         (build_call_or_builtin):  Remove.
5064         * java-tree.h:  Update accordingly.
5065         * expr.c (expand_invoke):  Use build + check_for_builtin instead
5066         of build_call_or_builtin.
5067         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
5068         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
5069         flag (which had caused jcf-write to incorrectly emit invokevirtual).
5070
5071 2002-02-17  Tom Tromey  <tromey@redhat.com>
5072
5073         * java-tree.h (TYPE_STRICTFP): New macro.
5074         (struct lang_type) [strictfp]: New field.
5075         (CLASS_STRICTFP): New macro.
5076         (METHOD_STRICTFP): New macro.
5077         (struct lang_decl) [strictfp]: New field.
5078         * parse.y (method_header): Disallow strictfp constructor or
5079         abstract method.
5080         (STRICT_TK): Move before MODIFIER_TK.
5081         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
5082         (METHOD_MODIFIERS): Likewise.
5083         (INTERFACE_MODIFIERS): Likewise.
5084         * jcf-write.c (get_access_flags): Likewise.
5085         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
5086         (add_method_1): Likewise.
5087         (get_access_flags_from_decl): Likewise.
5088         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
5089         recognize strictfp flag.
5090         * jcf.h (ACC_STRICT): New define.
5091
5092 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
5093
5094         * class.c(build_utf8_ref): Move declaration of decl_size
5095
5096 2002-02-07  Tom Tromey  <tromey@redhat.com>
5097
5098         * gcj.texi (Input Options): --CLASSPATH does not suppress system
5099         path.
5100
5101 2002-02-04  Anthony Green  <green@redhat.com>
5102
5103         * class.c (build_utf8_ref): Put UTF-8 constants into merged
5104         sections if available.
5105
5106 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5107
5108         * parse.y (java_expand_classes): Fix typo in static field loop.
5109
5110 2002-02-02  Richard Henderson  <rth@redhat.com>
5111
5112         * class.c (add_field): Mark static fields external.
5113         (build_class_ref): Remove redundant set.
5114         * parse.y (java_expand_classes): Mark static fields of classes
5115         to be compiled as local.
5116         * jcf-parse.c (parse_class_file): Likewise.
5117
5118 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5119
5120         * gcj.texi (About CNI): New node.
5121
5122 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5123
5124         PR java/5080
5125         * jcf-parse.c : Check for HAVE_LOCALE_H before using
5126         setlocale() with LC_CTYPE as a parameter.
5127         * jv-scan.c: Same.
5128
5129 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
5130
5131         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5132         Follow GNU Coding Standards for --version.
5133
5134 2002-01-28  Tom Tromey  <tromey@redhat.com>
5135
5136         * expr.c (build_jni_stub): Ensure storage for `meth' is
5137         generated.
5138         * parse.y (java_complete_expand_methods): Set
5139         current_function_decl before building JNI stub.
5140
5141 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
5142
5143         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
5144         BUILT_IN_SQRTF.
5145
5146 2002-01-22  Tom Tromey  <tromey@redhat.com>
5147
5148         * decl.c (java_init_decl_processing): Use add_predefined_file.
5149         Predefine RawData.java.
5150         (predef_filenames): Removed.
5151         (java_init_decl_processing): Don't register predef_filenames.
5152         * jcf-parse.c (add_predefined_file): New function.
5153         (predefined_filename_p): Rewrote.
5154         (predefined_filename_p): No longer static.
5155         * decl.c (java_init_decl_processing): Call initialize_builtins.
5156         * Make-lang.in (JAVA_OBJS): Added builtins.o.
5157         (java/builtins.o): New target.
5158         * builtins.c: New file.
5159         * parse.y (patch_invoke): Use build_call_or_builtin.
5160         * java-tree.h (build_call_or_builtin): Declare.
5161         (initialize_builtins): Declare.
5162         (java_set_exception_lang_code): Removed unused declaration.
5163         (PREDEF_FILENAMES_SIZE): Removed.
5164         (java_tree_index): Added JTI_PREDEF_FILENAMES.
5165         (predef_filenames): New define.
5166         (add_predefined_file): Declare.
5167         (predefined_filename_p): Declare.
5168         * expr.c (expand_invoke): Use build_call_or_builtin.
5169
5170 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5171
5172         * parse.y (patch_switch_statement): Fix format specifier.
5173
5174 2002-01-16  Tom Tromey  <tromey@redhat.com>
5175
5176         More for PR java/5365:
5177         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
5178         default.
5179         (process_file): Generate include for
5180         java.lang.UnsupportedOperationExceptions.
5181
5182 2002-01-15  Andreas Jaeger  <aj@suse.de>
5183
5184         * .cvsignore: Add man pages.
5185
5186 2002-01-15  Tom Tromey  <tromey@redhat.com>
5187
5188         Fix for PR java/5365:
5189         * gjavah.c (process_file): Turn class name into a file name.
5190
5191 2002-01-14  Matthias Klose  <doko@debian.org>
5192
5193         * gcj.texi: Fix whitespace and formatting errors in the
5194         synopsis of the man pages. Update copyright.
5195
5196 2002-01-14  Tom Tromey  <tromey@redhat.com>
5197
5198         For PR libgcj/5303:
5199         * Make-lang.in (java.install-man): Handle jv-convert man page.
5200         (java.generated-manpages): Added jv-convert.1.
5201         (java.uninstall): Remove jv-convert.1.
5202         (java.maintainer-clean): Likewise.
5203         ($(srcdir)/java/jv-convert.1): New target.
5204         * gcj.texi (Top): Link to jv-convert node.
5205         (Individual utilities): Likewise.
5206         (Invoking jv-convert): New node.
5207
5208 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
5209             Martin Kahlert  <martin.kahlert@infineon.com>
5210
5211         * jcf-parse.c (get_constant): Don't swap lo/hi for big
5212         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
5213
5214 2002-01-03  Graham Stott  <grahams@redhat.com>
5215
5216         * class.c (compile_resource_file): Update copyright date.
5217         Constify filename parameter.
5218         (java-tree.h): Update copyright date.
5219         (compile_resource_file): Constify filename parameter.
5220
5221 2002-01-03  Graham Stott  <grahams@redhat.com>
5222
5223         * gcc/jcf-parse.c: Update copyright date.
5224         (yyparse): Constify resource_filename.
5225
5226 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5227
5228         * parse.y (src_parse_roots): Don't needlessly zero init.
5229
5230 2001-12-31  Tom Tromey  <tromey@redhat.com>
5231
5232         * parse.y (dump_java_tree): New function.
5233         (source_end_java_method): Call it.
5234         (end_class_declaration): Likewise.
5235         * lang.c (java_decode_option): Call dump_switch_p.
5236
5237 2001-12-28  Tom Tromey  <tromey@redhat.com>
5238
5239         * gen-table.pl: Don't process characters after \uffff.  Added
5240         comment pointing to input file.
5241
5242 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5243
5244         * gen-table.pl: Const-ify output.  Document the location of a
5245         suitable unicode input file.
5246
5247         * chartables.h: Regenerate.
5248
5249 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5250
5251         * chartables.h: Const-ify.
5252         * gjavah.c (options): Likewise.
5253         * jcf-dump.c (options): Likewise.
5254         * jv-scan.c (options): Likewise.
5255         * lex.c (java_start_char_p, java_part_char_p): Likewise.
5256         * parse.y (binop_lookup): Likewise.
5257
5258 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5259
5260         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
5261         the static arrays that are output.
5262         * jvspec.c (jvgenmain_spec): Make static.
5263         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
5264         * keyword.h: Regenerate.
5265         * lang.c (string_option, process_option_with_no, lang_f_options,
5266         lang_W_options): Const-ify.
5267         * lex.c (java_lex): Likewise.
5268
5269 2001-12-21  Richard Henderson  <rth@redhat.com>
5270
5271         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
5272         (get_boehm_type_descriptor): ... here.  Arrange for the
5273         TREE_TYPE to get set properly.
5274
5275 2001-12-21  Richard Henderson  <rth@redhat.com>
5276
5277         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
5278         only if the target requires collect2.
5279
5280         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
5281
5282 2001-12-20  Tom Tromey  <tromey@redhat.com>
5283
5284         For PR java/4509:
5285         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
5286         CAN_COMPLETE_NORMALLY for the node.
5287         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
5288         generate code for second branch if first branch can't complete
5289         normally.
5290         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
5291         the loop head if the loop body can't complete normally.
5292
5293 2001-12-20  Tom Tromey  <tromey@redhat.com>
5294
5295         For PR java/4766:
5296         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
5297         case where `finally' clause can't complete normally.
5298
5299 2001-12-20  Tom Tromey  <tromey@redhat.com>
5300
5301         Fixes PR java/5057:
5302         * parse.y (analyze_clinit_body): Added this_class parameter.
5303         Check for more cases where we must keep <clinit>.
5304         (maybe_yank_clinit): Cleaned up flow control.
5305
5306 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5307
5308         * decl.c (java_init_decl_processing): Don't initialize
5309         finit_leg_identifier_node.
5310         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
5311         (finit_leg_identifier_node): Remove.
5312         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
5313
5314 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5315
5316         * mangle.c (mangle_member_name): Don't special-case for
5317         NO_DOLLAR_IN_LABEL.
5318         * mangle_name.c (unicode_mangling_length): Likewise.
5319         (append_unicode_mangled_name): Likewise.
5320         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
5321         code.
5322
5323 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5324
5325         * expr.c (build_java_array_length_access): Don't force null pointer
5326         check unless flag_check_references is set.
5327
5328 2001-12-20  Tom Tromey  <tromey@redhat.com>
5329
5330         Fix for PR java/3417:
5331         * parse.y (patch_assignment): Added special processing for
5332         `return'.
5333         (patch_return): Don't convert booleans to integers, and don't
5334         special-case `null'.
5335
5336 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5337
5338         * config-lang.in (diff_excludes): Remove.
5339
5340 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
5341
5342         * gcj.texi: Update link to GCC manual.
5343
5344 2001-12-17  Tom Tromey  <tromey@redhat.com>
5345
5346         * parse.y (link_nested_class_to_enclosing): Removed useless
5347         statement.
5348
5349 2001-12-16  Tom Tromey  <tromey@redhat.com>
5350
5351         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
5352         Fixes PR java/5088.
5353
5354 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5355
5356         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
5357         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
5358         spelling errors.
5359
5360 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5361
5362         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
5363
5364 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5365
5366         * decl.c (java_init_decl_processing): Build otable_type correctly.
5367         otable_decl is an otable_type.
5368
5369 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5370
5371         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
5372         otable_type, otable_ptr_type, method_symbol_type,
5373         method_symbols_array_type, method_symbols_array_ptr_type): New
5374         field/global tree definitions.
5375         (flag_indirect_dispatch): New flag.
5376         * decl.c (java_init_decl_processing): Initialize new otable and
5377         otable_syms type nodes and decls. Add new field "index" to
5378         method_type_node.
5379         * class.c (build_method_symbols_entry): New function.
5380         (make_method_value): Set "index" to to method's vtable index for
5381         virtual methods when indirect-dispatch is not used.
5382         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
5383         and set vtable_method_count to -1. Set otable and otable_syms field
5384         if indirect-dispatch is used and there was something to put in them.
5385         (build_method_symbols_entry): New function.
5386         (emit_offset_symbol_table): New function.
5387         * expr.c (get_offset_table_index): New function.
5388         (build_invokevirtual): Build array reference to otable at the index
5389         returned by get_offset_table_index, and use the result as the vtable
5390         offset.
5391         (build_invokeinterface): Similar.
5392         * jcf-parse.c (yyparse): If indirect-dispatch, call
5393         emit_offset_symbol_table at the end of compilation, after all classes
5394         have been generated.
5395         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
5396         * lang.c (flag_indirect_dispatch): Define.
5397         (lang_f_options): Add indirect-dispatch flag.
5398
5399 2001-12-14  Matthias Klose  <doko@debian.org>
5400
5401         * gcj.texi: Markup for man page generation. Document missing
5402         options printed by <tool> --help.
5403         Terminate description of gij's -ms option with a dot.
5404         * Make-lang.in ($(srcdir)/java/*.1): New targets.
5405         (java.generated-manpages java.install-man, java.uninstall,
5406         java-maintainer-clean) Updated.
5407
5408 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
5409
5410         * class.c (get_dispatch_table): Fix java vtable layout
5411         for TARGET_VTABLE_USES_DESCRIPTORS.
5412         * decl.c (java_init_decl_processing): Initialize
5413         alloc_no_finalizer_node, finalize_identifier_node.
5414         * expr.c (class_has_finalize_method): New function.
5415         (expand_java_NEW): Generate calls for finalizer-free allocation.
5416         (build_invokevirtual): Fix java vtable layout for
5417         TARGET_VTABLE_USES_DESCRIPTORS.
5418         * java-tree.h (enum java_tree_index): New entries:
5419         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
5420         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
5421         (class_has_finalize_method): declare.
5422         (HAS_FINALIZER_P): New macro.
5423         * parse.y (patch_invoke): Generate calls for finalizer-free
5424         allocation.
5425
5426 2001-12-12  Matthias Klose  <doko@debian.org>
5427
5428         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
5429         whitespace at end of line.
5430
5431 2001-12-11  Tom Tromey  <tromey@redhat.com>
5432
5433         * lex.c (java_init_lex): Define wfl_to_string as
5434         gnu.gcj.runtime.StringBuffer unless generating bytecode.
5435
5436 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
5437
5438         * class.c (make_method_value): Use null_pointer_node to
5439         represent empty exception table.
5440
5441 2001-12-10  Tom Tromey  <tromey@redhat.com>
5442
5443         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
5444
5445 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
5446
5447         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
5448
5449 2001-12-09  Per Bothner  <per@bothner.com>
5450
5451         * check-init.c (current_switch_has_default):  New static field.
5452         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
5453         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
5454         DEFAULT_EXPR seen, simulate a default alternative that copies state.
5455
5456 2001-12-09  Tom Tromey  <tromey@redhat.com>
5457
5458         * check-init.c (check_init): Don't allow pre- or post- increment
5459         or decrement of final variable.
5460         (final_assign_error): Minor error message rewording.
5461
5462 2001-12-08  Tom Tromey  <tromey@redhat.com>
5463
5464         * java-tree.h: Fixed typo.
5465
5466         * gjavah.c (decompile_method): Don't decompile to `return this'
5467         for static methods.
5468
5469         * gjavah.c (cxx_keywords): Re-sorted.
5470         * lex.c (cxx_keywords): Re-sorted.
5471
5472         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
5473         else.
5474
5475         * gjavah.c (print_namelet): Clear subnamelets.
5476         (HANDLE_METHOD): Set `method_printed' earlier.
5477
5478 2001-12-07  Tom Tromey  <tromey@redhat.com>
5479
5480         * lang.c (lang_f_options): Added
5481         optimize-static-class-initialization.
5482         (java_decode_option): Removed special case.
5483
5484 2001-12-07  Per Bothner  <per@bothner.com>
5485
5486         * check-init.c (check_init):  Fix typo freeing memory twice.
5487
5488 2001-12-05  Per Bothner  <per@bothner.com>
5489
5490         Restore support for static class initialization optimization.
5491         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
5492         * check-init.c (check_int):  At end of BLOCK handle initialization
5493         blocks, which used to be done in java_complete_expand_method but did
5494         not handle the case where check_for_initialization might allocate
5495         more than a word of bits.
5496         * decl.c (lang_make_tree):  The smic field is now a tree.
5497         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
5498         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
5499
5500         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
5501
5502         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
5503         Change from a hash table to a list.
5504         (struct_lang_decl):  Change field 'smic' to match.
5505         * class.c (add_method_1):  Initialize
5506         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
5507         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
5508         (java_expand_method_bodies): -here, since 'smic' is now a list.
5509         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
5510
5511         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
5512
5513         * class.c (java_hash_compare_tree_node):  Fix casts.
5514
5515 2001-12-04  Per Bothner  <per@bothner.com>
5516
5517         * check-init.c:   Handle definite unassignment to finals in addition
5518         to definite assignment.
5519         (loop_current_locals):  New field.
5520         (num_current_locals, int start_current_locals, num_current_words):
5521         Make static.
5522         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
5523         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
5524         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
5525         (get_variable_decl, check_final_reassigned):  New functions.
5526         (check_init, check_bool_init):  Modify as needed for checking finals.
5527         (check_for_initialization):  Take extra parameter and return void.
5528         Do extra start-up logic to check final fields for assignment.
5529         * parse.y (check_static_final_variable_assignment_flag,
5530         reset_static_final_variable_assignment_flag, check_final_assignment,
5531         check_final_variable_local_assignment_flag,
5532         reset_final_variable_indirect_assignment_flag,
5533         reset_final_variable_global_assignment_flag):  Remove functions.
5534         (java_complete_expand_methods, outer_field_access_fix,
5535         patch_assignment): Remove no-longer used logic.
5536         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
5537         * parse.y (register_fields, java_complete_tree):  Update accordingly.
5538
5539         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
5540         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
5541         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
5542
5543         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
5544
5545         * java-tree.h (DECL FINAL):  New bit-field.
5546         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
5547         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
5548         (DECL_INIT_CALLS_THIS):  New macro.
5549         (struct lang_decl):  New bit-field init_calls_this.
5550         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
5551         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
5552         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
5553         use it for both local variables and final fields.
5554         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
5555         and local_final.
5556         (struct lang_type):  Remove hfv bit-field.
5557         (check_for_initialization):  Change to return void.
5558
5559         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
5560         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
5561         * check-init.c (final_assign_error):  New helper function.
5562         (check_final_reassigned, check_init):  Use it.
5563         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
5564
5565         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
5566         bit-fields to unsigned.
5567
5568 2001-12-03  Per Bothner  <per@bothner.com>
5569
5570         * parse.y (patch_binop):  Minor constant folding.
5571
5572         * parse.y (build_current_thisn):  Shorter 'buffer'.
5573
5574 2001-12-03  Per Bothner  <per@bothner.com>
5575
5576         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
5577         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
5578         * jcf-write.c (generate_bytecode_insns):  Remove support for
5579         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
5580         * check-init.c (check_init):  Likewise.
5581
5582 2001-12-03  Per Bothner  <per@bothner.com>
5583
5584         * verify.c (subroutine_nesting):  New function.
5585         (verify_jvm_instructions):  Use it to fix logic for checking that
5586         we're done with the current subroutine.
5587
5588         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
5589         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
5590
5591 2001-12-03  Per Bothner  <per@bothner.com>
5592
5593         * jcf.h:  Fix obvious typo in comment.
5594         * typeck.c (build_null_signature):  Add comment.
5595
5596 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5597
5598         * expr.c: Remove leading capital from diagnostic messages, as
5599         per GNU coding standards.
5600         * jcf-io.c: Similarly.
5601         * jcf-parse.c: Similarly.
5602         * jv-scan.c: Similarly.
5603         * jvspec.c: Similarly.
5604         * mangle.c: Similarly.
5605
5606 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
5607             Alexandre Petit-Bianco  <apbianco@redhat.com>
5608
5609         * expr.c (build_java_arrayaccess): Call save_expr on array for
5610         correct evaluation order, modified comment, fixed indentation.
5611         * parse.y: (patch_assignment): Correctly extract the array base
5612         from the tree generate by build_java_arrayaccess, added comments.
5613         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
5614         Fixes PR java/3096, PR java/3803, PR java/3965.
5615
5616 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5617
5618         * expr.c (expand_byte_code): Remove trailing periods from messages.
5619         * jcf-parse.c (load_class, jcf_parse): Similarly.
5620         * jcf-write.c (generate_classfile): Similarly.
5621         * lex.c (java_lex): Similarly.
5622
5623 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5624
5625         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
5626
5627 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5628
5629         * Make-lang.in (java.generated-manpages): New dummy target.
5630
5631 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5632
5633         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5634         ASM_FINAL_SPEC.
5635         (lang_specific_pre_link): Use set_input to set input_filename.
5636         Append `main' here.
5637         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5638         (main): Fix definition.
5639         Strip `main' from classname.
5640         Fixes PR java/227.
5641
5642 2001-11-18  Roger Sayle <roger@eyesopen.com>
5643
5644         * parse.h (java_expand_switch): Remove old prototype.
5645
5646 2001-11-18  Tom Tromey  <tromey@redhat.com>
5647
5648         Fix for PR java/1401:
5649         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
5650         arg0 is null.
5651         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
5652         correctly.
5653
5654 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5655
5656         * lang.c (finish_parse): Rename to java_finish.
5657         (LANG_HOOKS_FINISH, java_finish): New.
5658
5659 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5660
5661         * decl.c (init_decl_processing): Rename java_init_decl_processing.
5662         * java-tree.h: New prototype.
5663         * lang.c (java_init): Update prototype.  Combine with old init_parse.
5664
5665 2001-11-13  Tom Tromey  <tromey@redhat.com>
5666
5667         * gjavah.c (method_signature): New global.
5668         (HANDLE_METHOD): Set it.
5669         (decompile_return_statement): New function.
5670         (decompile_method): Use it.
5671         (print_method_info): Removed `synth' argument.
5672
5673 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5674
5675         * java-tree.h (java_set_yydebug): New.
5676         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
5677         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
5678         (print_lang_decl, print_lang_type, print_lang_identifier,
5679         print_lang_statistics, lang_print_xnode): Remove.
5680
5681 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5682
5683         * jcf-parse.c (init_lex): Remove.
5684         * lang.c (language_string, lang_identify): Remove.
5685         (struct lang_hooks): Constify.
5686         (LANG_HOOKS_NAME): Override.
5687         (init_parse): Update.
5688
5689 2001-11-08  Andreas Franck  <afranck@gmx.de>
5690
5691         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
5692         program_transform_name the way suggested by autoconf.
5693         (java.install-common): Also transform auxiliary program names with
5694         program_transform_name.
5695
5696 2001-11-08  Tom Tromey  <tromey@cygnus.com>
5697
5698         * parse.y (trap_overflow_corner_case): New rule.
5699         (unary_expression): Use it.
5700         * lex.c (java_init_lex): Don't set minus_seen.
5701         (yylex): Don't use minus_seen.  Communicate overflow to parser for
5702         it to handle.
5703         (error_if_numeric_overflow): New function.
5704         * parse.h (minus_seen): Removed field.
5705         (JAVA_RADIX10_FLAG): New define.
5706
5707 2001-11-07  Tom Tromey  <tromey@redhat.com>
5708
5709         Patch for PR java/1414:
5710         * parse.y (case_label_list): New global.
5711         (goal): Register case_label_list with GC.
5712         (java_complete_lhs): Save new case on case_label_list.
5713         (patch_switch_statement): Check for duplicate case labels.
5714
5715 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5716
5717         * parse.y (patch_assignment): Removed unused third argument.
5718         (java_complete_lhs): Removed unused third argument to patch_assignment.
5719
5720 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5721
5722         * lang.c: Include langhooks-def.h.
5723         * Make-lang.in: Update.
5724
5725 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5726
5727         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5728
5729 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5730
5731         * mangle.c (find_compression_record_match): Don't match compression
5732         records for package name elements unless they occur at the start of
5733         the name. Fix for PR java/4717.
5734
5735 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5736
5737         * expr.c (expand_java_field_op): Don't special-case references to
5738         java.lang.PRIMTYPE.TYPE.
5739         (build_primtype_type_ref): Removed.
5740         * java-tree.h (build_primtype_type_ref): Remove prototype.
5741         * parse.y (maybe_build_primttype_type_ref): Removed.
5742         (complete_function_arguments): Don't special-case references to
5743         java.lang.PRIMTYPE.TYPE.
5744         (patch_assignment): Likewise.
5745         (array_constructor_check_entry): Likewise.
5746
5747 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
5748
5749         * mangle.c (static tree compression_table): Fixed leading comment.
5750         * parse.h (struct parser_ctxt): Fixed field comment.
5751         * parse.y (check_pkg_class_access): New prototype, fixed leading
5752         comment, new parameter used to emit error only if passed as true.
5753         (parse_check_super): Pass extra argument to check_pkg_class_access.
5754         (do_resolve_class): Likewise.
5755         (process_imports): Likewise.
5756         (read_import_dir): Fixed indentation.
5757         (find_in_imports_on_demand): New local class_type_name. Local
5758         node_to_use deleted. while loop changed into for loop. Report
5759         multiple definition only for accessible classes. Improved error
5760         message.
5761         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
5762         assigned to parameter list, fixed indentation. while loop changed
5763         into for loop, restore TREE_CHAIN on local `tem' before the next
5764         iteration.
5765
5766 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5767
5768         * lang.c (lang_get_alias_set): Deleted.
5769
5770 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5771
5772         * gjavah.c (jni_print_char): Fix thinko in last change.
5773
5774         * gjavah.c (jni_print_char, decode_signature_piece): Use
5775         safe-ctype macros and/or fold extra calls into fewer ones.
5776         * lex.c (java_read_unicode, java_lex): Likewise.
5777         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
5778         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
5779         * mangle_name.c (append_unicode_mangled_name,
5780         unicode_mangling_length): Likewise.
5781
5782 2001-10-17  Richard Henderson  <rth@redhat.com>
5783
5784         * Make-lang.in (java/lang.o): Depend on langhooks.h.
5785
5786 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5787
5788         * lang.c (langhooks.h): Included.
5789         (LANG_HOOKS_INIT): Redefined.
5790         (LANG_HOOKS_INIT_OPTIONS): Likewise.
5791         (LANG_HOOKS_DECODE_OPTION): Likewise.
5792         (struct lang_hooks lang_hooks): New initialization.
5793
5794 2001-10-11  Per Bothner  <per@bothner.com>
5795
5796         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
5797         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
5798         The former is simpler, and jcf-write.c handles it better.
5799         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
5800         or WITH_CLEANUP_EXPR.
5801         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
5802         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
5803
5804         * parse.y (patch_if_else_statement):  If the condition is constant,
5805         optimize away the test.
5806
5807 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5808
5809         * parse.y (patch_cast): Call patch_string on the first operand of
5810         the incoming node, update it if necessary. Fixes PR java/4510.
5811
5812 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5813
5814         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
5815         when name qualifier matches a package name.
5816
5817 2001-10-08  Tom Tromey  <tromey@redhat.com>
5818
5819         Fix for PR java/4489:
5820         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
5821         force a new label when computing `body_block'.
5822
5823 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5824
5825         * jcf-io.c (format_uint): Const-ify.
5826         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
5827         * lex.c (java_get_line_col): Likewise.
5828         * parse.y (build_incdec): Likewise.
5829
5830 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5831
5832         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
5833         a NULL enclosing context if appropriate. Fixes PR java/4466.
5834
5835 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
5836
5837         * parse.y (patch_assignment): Use lvalue's original TYPE when
5838         building the final COMPOUND_EXPR.
5839         (try_reference_assignconv): Fixed leading comment.
5840
5841 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5842
5843         * parse.y (check_final_variable_indirect_assignment): For
5844         COMPOUND_EXPR, return only if finals were found initialized
5845         properly, if not, keep on checking.
5846         (check_final_variable_global_assignment_flag): New local
5847         error_found, set when appropriate and used to decide whether to
5848         report uninitialized finals. Fixed typo in comment.
5849
5850 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
5851
5852         * decl.c (init_decl_processing): Fixed typo in predef_filenames
5853         last three initializations. Fixes PR java/4360.
5854
5855 2001-09-21  Richard Henderson  <rth@redhat.com>
5856
5857         * class.c (get_dispatch_table): Handle function descriptors.
5858         (build_dtable_decl): Likewise.
5859         * expr.c (build_invokevirtual): Likewise.
5860
5861 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5862
5863         * parse.y (patch_method_invocation): Build class initialization
5864         when static finals are used to qualify method invocation.
5865         Fixes PR java/4366.
5866
5867 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
5868
5869         * parse.h: (WFL_STRIP_BRACKET): Re-written using
5870         build_type_name_from_array_name.
5871         (STRING_STRIP_BRACKETS): New macro.
5872         * parse.y (build_type_name_from_array_name): New function.
5873         (array_creation_expression:): Accumulate []s instead of [s.
5874         (cast_expression:): Accumulate []s instead of [s after cast type
5875         name.
5876         (build_array_from_name): Local string deleted, use
5877         build_type_name_from_array_name.
5878         (build_unresolved_array_type): Accumulate []s instead of [s after
5879         type name.
5880         (register_fields): Fixed comment.
5881         (resolve_class): Local name, base deleted, new locals tname and
5882         array_dims. Use build_type_name_from_array_name. Use array_dims to
5883         build array type.
5884         (purify_type_name): Use STRING_STRIP_BRACKETS.
5885
5886 2001-09-18  Andreas Jaeger  <aj@suse.de>
5887
5888         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
5889         * jv-scan.c: Likewise.
5890
5891 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
5892
5893         * parse.y (patch_method_invocation): Inner class creation context
5894         check not enforced within constructors. Fixes PR java/1873.
5895
5896 2001-09-16  Tom Tromey  <tromey@redhat.com>
5897
5898         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
5899         NOTE_PUSH for single-case push.  Fixes PR java/4189.
5900
5901 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5902
5903         * java-tree.h (TYPE_IMPORT_LIST): New macro.
5904         (TYPE_IMPORT_DEMAND_LIST): Likewise.
5905         (struct lang_type): New fields import_list and import_demand_list.
5906         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
5907         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
5908         (do_resolve_class): New local saved_enclosing_type, initialized,
5909         passed as parameter to find_in_imports and find_in_imports_on_demand.
5910         (find_in_imports): Added paramater enclosing_type, use its
5911         TYPE_IMPORT_LIST when applicable.
5912         (find_in_imports_on_demand): Added parameter enclosing_type, use
5913         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
5914         declaration and initialization.
5915         (fold_constant_for_init): Switch/restore current_class to the
5916         appropriate context.
5917
5918 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
5919
5920         * verify.c (verify_jvm_instructions): Fix typo.
5921
5922 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5923
5924         * expr.c (expand_invoke): Const-ification.
5925         * parse.y (patch_method_invocation): Likewise.
5926
5927 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5928
5929         * gjavah.c (cxx_keywords): Const-ification.
5930         * keyword.gperf (java_keyword): Likewise.
5931         * lang.c (java_tree_code_name): Likewise.
5932         * lex.c (cxx_keywords): Likewise.
5933         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
5934
5935 2001-09-11  Richard Henderson  <rth@redhat.com>
5936
5937         * parse.h (ctxp_for_generation): Mark extern.
5938
5939 2001-09-10  Richard Henderson  <rth@redhat.com>
5940
5941         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
5942
5943 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5944
5945         * typeck.c (java_array_type_length, build_prim_array_type):
5946         Represent empty arrays by NULL index.
5947
5948 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
5949
5950         * java-tree.h (compile_resource_file): Grouped with other prototypes.
5951         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
5952
5953 2001-09-06  Anthony Green  <green@redhat.com>
5954
5955         * class.c (O_BINARY): Define if necessary.
5956         (registerResource_libfunc): Declare.
5957         (init_class_processing): Initilize registerResource_libfunc.
5958         (compile_resource_file): New function.
5959         * java-tree.h (resource_name): Declare.
5960         (compile_resource_file): Declare.
5961         * jcf-parse.c (yyparse): Handle compiling java resource files.
5962         * lang.c (java_decode_option): Handle -fcompile-resource option.
5963         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
5964         resource files.
5965         * gcj.texi (Code Generation): Add documentation for -R flag.
5966
5967 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
5968
5969         * jcf-write.c (generate_classfile): Issue an error in case of
5970         field/initial value mismatch.
5971         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
5972         being initialized and we're generating bytecode.
5973         (java_complete_lhs): In MODIFY_EXPR section: added comments,
5974         set DECL_INITIAL properly when appropriate.
5975         Fixes PR java/4230
5976         Fixes PR java/4204
5977
5978 2001-09-01  Per Bothner  <per@bothner.com>
5979
5980         * parse.y (maybe_yank_clinit):  A field without an initializer is not
5981         relevant.  All initializers except static final and constant require
5982         <clinit>, regardless of flag_emit_class_files.
5983
5984 2001-08-31  Per Bothner  <per@bothner.com>
5985
5986         * class.c (set_constant_value):  When not emitting class files, then a
5987         String ConstantValue is a utf8const_ptr_type.
5988
5989 2001-08-30  Per Bothner  <per@bothner.com>
5990
5991         * jcf-write.c (generate_classfile):  Check that field is primitive
5992         or string before emitting ConstantValue attribute.
5993
5994 2001-08-30  Per Bothner  <per@bothner.com>
5995
5996         * parse.y (resolve_qualified_expression_name):  If creating a
5997         COMPOUND_EXPR, set it's type correctly.
5998
5999 2001-08-30  Per Bothner  <per@bothner.com>
6000
6001         * jcf-io.c (open_class):  Set filename field.
6002
6003         * jcf-parse,c (parse_class_file):  Set current_function_decl
6004         for better error message when Code attribute is missing.
6005
6006         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
6007         better diagnostics, especially for constructors.
6008
6009 2001-08-30  Per Bothner  <per@bothner.com>
6010
6011         * jcf-write.c (generate_classfile):  Don't write ConstantValue
6012         attribute if field is not final, for compatibility with jdk.
6013
6014         * jcf-write.c (generate_classfile):  Convert ConstantValue values
6015         to correct type.  Work-around for front-end bug.
6016         * class.c (set_constant_value):  Error if constant has wrong type.
6017
6018 2001-08-30  Per Bothner  <per@bothner.com>
6019
6020         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
6021         "Double" are printed at verbosity 1.
6022
6023         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
6024
6025         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
6026
6027 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
6028
6029         * parse.y (patch_assignment): Don't verify final re-assignment here.
6030         (java_complete_lhs): Verify assignments to finals calling
6031         patch_assignment. Verify re-assignments to finals before calling
6032         patch_assignment.
6033
6034 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
6035
6036         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
6037         Fixes PR java/1413
6038
6039 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6040
6041         * lex.c (java_lex): new local found_hex_digits. Set and then used
6042         in test to reject invalid hexadecimal numbers.
6043         * parse.y (java_complete_tree): Prevent unwanted cast with
6044         initialized floating point finals.
6045         (patch_binop): Emit a warning when detecting a division by zero,
6046         mark result not constant, don't simplify non integer division.
6047
6048 2001-08-28  Per Bothner  <per@bothner.com>
6049
6050         * jcf-write.c  (generate_bytecode_insns):  For increments and
6051         decrements just recurse to push constant.  Improvement on Mark's patch.
6052
6053 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
6054
6055         * jcf-write.c (generate_bytecode_insns): Generate an integer to
6056         real conversion for increments and decrements of reals.
6057
6058 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6059
6060         * parse.y (resolve_qualified_expression_name): Handle unresolved
6061         qualified expressions, prevent numerical qualifiers, fixed typo.
6062         Fixes PR java/4141
6063
6064 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
6065
6066         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
6067         don't report anything but deprecated class when marked so. Handle
6068         VAR_DECL.
6069         (patch_method_invocation): Check deprecation on methods and types.
6070         (patch_binop): code becomes an enum tree_code, added default: to
6071         switch to handle that. Detect division by zero, try to fold and
6072         return before using a subroutine.
6073
6074 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
6075
6076         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
6077         file smaller than 4 bytes.
6078         * parse.y (check_inner_circular_reference): New function.
6079         (check_circular_reference): Likewise.
6080         (array_initializer:): Accept {,}.
6081         (java_check_circular_reference): Rewritten using
6082         check_circular_reference and check_inner_circular_reference.
6083         (java_complete_expand_method): Unconditionally save and restore
6084         the unpurged exception list.
6085         (build_dot_class_method_invocation): Unmangle signature parameter.
6086
6087 2001-08-21  Tom Tromey  <tromey@redhat.com>
6088
6089         * decl.c (init_decl_processing): Add `throws' field to method
6090         descriptor.
6091         * class.c (make_method_value): Compute `throws' field for method.
6092
6093 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6094
6095         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
6096         circularity is detected.
6097         (ctors_unchecked_throws_clause_p): Fixed leading comment.
6098
6099 2001-08-17  Richard Henderson  <rth@redhat.com>
6100
6101         * class.c (emit_register_classes): Add align parameter to
6102         call to assemble_integer.
6103
6104 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
6105
6106         * jcf-parse.c (load_class): New locals saved and class_loaded. If
6107         loading a class_or_name fails, try considering an innerclass name
6108         and load the enclosing context.
6109         * parse.y (resolve_inner_class): New function.
6110         (find_as_inner_class): Added leading comment.
6111         (register_incomplete_type): Keep the current context as enclosing
6112         context for JDEP_FIELD dependencies.
6113         (do_resolve_class): Locals new_class_decl and super initialized to
6114         NULL. Call resolve_inner_class, explore the enclosing context
6115         superclass if necessary.
6116         Fixes PR java/4007
6117
6118 2001-08-16  Tom Tromey  <tromey@redhat.com>
6119
6120         * jcf-dump.c (main): Updated for change to jcf_path_seal.
6121         * gjavah.c (main): Updated for change to jcf_path_seal.
6122         * lang.c (version_flag): New global.
6123         (java_decode_option): Recognize `-version'.
6124         (java_init): Update for change to jcf_path_seal.
6125         * jcf.h (jcf_path_seal): Added `print' argument.
6126         * jcf-path.c (jcf_path_seal): Added `print' argument.
6127
6128 2001-08-13  Zack Weinberg  <zackw@panix.com>
6129
6130         * Make-lang.in (java/decl.o): Update dependencies.
6131         * decl.c: Include libfuncs.h, don't include toplev.h.
6132
6133 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6134
6135         * decl.c (init_decl_processing): exception_type_node,
6136         class_not_found_type_node, and no_class_def_found_type_node
6137         initialized. predef_filenames augmented accordingly.
6138         instinit_identifier_node initialized.
6139         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
6140         * java-tree.h (enum java_tree_index): New entries
6141         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
6142         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
6143         (exception_type_node): New macro.
6144         (class_not_found_type_node): Likewise.
6145         (no_class_def_found_type_node): Likewise.
6146         (instinit_identifier_node): Likewise.
6147         (PREDEF_FILENAMES_SIZE): Adjusted.
6148         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
6149         (struct lang_type): Fixed typo in bitfield name.
6150         (DECL_INSTINIT_P): New macro.
6151         (ID_INSTINIT_P): Likewise.
6152         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
6153         attribute.
6154         * parse.y (encapsulate_with_try_catch): New function.
6155         (generate_instinit): Likewise.
6156         (build_instinit_invocation): Likewise.
6157         (ctors_unchecked_throws_clause_p): Likewise.
6158         (add_instance_initializer): Deleted.
6159         (build_instance_initializer): Likewise.
6160         (in_instance_initializer): Likewise.
6161         (check_method_redefinition): instinit$ not to be verified.
6162         (java_complete_expand_methods): Generate instinit$, simplified code.
6163         (build_dot_class_method): Eliminated unnecessary locals. Use
6164         encapsulate_with_try_catch, removed unnecessary code.
6165         (fix_constructors): New local iii. Use build_instinit_invocation.
6166         (patch_method_invocation): Added comment.
6167         (maybe_use_access_method): Don't consider instinit$.
6168         (find_applicable_accessible_methods_list): Shorten the search for
6169         instinit$ too.
6170         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
6171         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
6172         (patch_throw_statement): Likewise. Fixed typo.
6173
6174 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
6175
6176         Revert:
6177         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6178         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6179         ASM_FINAL_SPEC.
6180         (lang_specific_pre_link): Use set_input to set input_filename.
6181         Append `main' here.
6182         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6183         (main): Fix definition.
6184         Strip `main' from classname.
6185         Fixes PR java/227.
6186
6187 2001-08-11  Zack Weinberg  <zackw@panix.com>
6188
6189         * lex.h: Don't include setjmp.h.  Don't define
6190         SET_FLOAT_HANDLER or prototype set_float_handler.
6191
6192 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6193
6194         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
6195         `poplevel' in the right order.
6196
6197 2001-08-09  Richard Henderson  <rth@redhat.com>
6198
6199         * Make-lang.in (class.o): Depend on TARGET_H.
6200         * class.c (emit_register_classes): Use target hooks instead of
6201         assemble_constructor and assemble_destructor.
6202
6203 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
6204
6205         * check-init.c (flags.h): Include
6206         (check_init): Don't report uninitialized static class
6207         initialization flags, don't free bit index when doing static class
6208         initialization optimization.
6209         (check_for_initialization): Return type changed to `unsigned int.'
6210         (attach_initialized_static_class): New function.
6211         * class.c (add_method_1): Create the initialized static class
6212         table if necessary.
6213         (finish_class): Always emit deferred inline methods.
6214         * decl.c (emit_init_test_initialization): Moved to expr.c
6215         (complete_start_java_method): Don't traverse
6216         DECL_FUNCTION_INIT_TEST_TABLE.
6217         (lang_mark_tree): Mark hash tables in function decls.
6218         * expr.c (emit_init_test_initialization): Moved from decl.c.
6219         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
6220         initialization flag, set DECL_CONTEXT and
6221         LOCAL_CLASS_INITIALIZATION_FLAG.
6222         (java_lang_expand_expr): Emit initialization code for static class
6223         initialized flags when entering block, if necessary.
6224         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
6225         * java-tree.h (flag_optimize_sci): New global variable declaration.
6226         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
6227         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
6228         (LOCAL_FINAL_P): Fixed typo in comment.
6229         (FINAL_VARIABLE_P): Likewise.
6230         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
6231         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
6232         (struct lang_decl): New fields `ict', `smic' and `cif.'
6233         (check_for_initialization): New returned value for global.
6234         (attach_initialized_static_class): New global function.
6235         (STATIC_CLASS_INIT_OPT_P): New macro.
6236         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
6237         * lang.c (java_decode_option): Handle
6238         `-fno-optimize-static-class-initialization'
6239         * parse.y (start_complete_expand_method): New function.
6240         (java_expand_method_bodies): Likewise.
6241         (attach_init_test_initialization_flags): Likewise.
6242         (adjust_init_test_initialization): Likewise.
6243         (emit_test_initialization): Likewise.
6244         (java_complete_expand_methods): Nullify abstract and native method
6245         bodies.
6246         (java_complete_expand_method): New locals `fbody', `block_body'
6247         and `exception_copy.' Reorganized: directly return on empty method
6248         bodies, call `start_complete_expand_method', remember definitely
6249         initialized static class in function, don't expand method bodies.
6250         (java_expand_classes): Call `java_expand_method_bodies' before
6251         `finish_class' when compiling to native.
6252         (resolve_expression_name): Use `orig' after building outer class
6253         field access.
6254         (patch_invoke): Remember static method invocations.
6255
6256 2001-08-06  Richard Henderson  <rth@redhat.com>
6257
6258         * class.c (emit_register_classes): Pass a symbol_ref and priority
6259         to assemble_constructor.
6260
6261 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
6262
6263         * java-tree.h (all_class_filename): New macro.
6264         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
6265         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
6266         newly created IDENTIFIER_NODE to `all_class_filename.'
6267
6268 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
6269
6270         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
6271         Use ggc_add_tree_root to register roots.
6272
6273 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6274
6275         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
6276         second operand calling check_init.
6277         * decl.c (complete_start_java_method): Swaped second and third
6278         arguments while creating WITH_CLEANUP_EXPR node.
6279         * jcf-write.c (generate_bytecode_insns): Use second operand
6280         instead of third when handling WITH_CLEANUP_EXPR.
6281         * parse.y (java_complete_lhs): Expand second operand of
6282         WITH_CLEANUP_EXPR nodes.
6283         (patch_synchronized_statement): Swaped second and third arguments
6284         while creating WITH_CLEANUP_EXPR node.
6285
6286 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
6287
6288         * parse.y (create_interface): Avoid cyclic inheritance report when
6289         syntax error encountered during class definition.
6290         Fixes PR java/2956
6291
6292 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6293
6294         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6295         ASM_FINAL_SPEC.
6296         (lang_specific_pre_link): Use set_input to set input_filename.
6297         Append `main' here.
6298         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6299         (main): Fix definition.
6300         Strip `main' from classname.
6301         Fixes PR java/227.
6302
6303 2001-07-18  Tom Tromey  <tromey@redhat.com>
6304
6305         For PR java/2812:
6306         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
6307         * lex.c (java_new_lexer): Use ICONV_CONST.
6308         (java_read_char): Likewise.
6309         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
6310         (jv-scan$(exeext)): Likewise.
6311
6312 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6313
6314         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
6315         * parse.y (check_class_interface_creation): Allow `private' if the
6316         enclosing is not an interface.
6317         (create_interface): Interface tagged public if the enclosing
6318         context is an interface.
6319         (create_class): Class tagged public if the enclosing context
6320         is an interface.
6321         Fixes PR java/2959
6322
6323 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6324
6325         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
6326         Fixes PR java/2665
6327
6328 2001-07-14  Tim Josling  <tej@melbpc.org.au>
6329
6330         * check-init.c (check_init): Remove references to EXPON_EXPR.
6331
6332 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6333
6334         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
6335         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
6336         Fixes PR java/3602
6337
6338 2001-07-13  Tom Tromey  <tromey@redhat.com>
6339
6340         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
6341         invocation.
6342
6343 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6344
6345         * parse.y (patch_method_invocation): Don't override primary if one
6346         is already provided, but let this$<n> be built. Fixed comment.
6347
6348 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
6349
6350         * parse.y (empty_statement:): Report empty statement error only
6351         when found at class declaration level.
6352         Fixes PR java/3635
6353
6354 2001-07-12  Tom Tromey  <tromey@redhat.com>
6355
6356         * expr.c (expand_load_internal): New function.
6357         (LOAD_INTERNAL): Use it.
6358
6359 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
6360
6361         * parse.y (verify_constructor_super): Compare anonymous class ctor
6362         args with `valid_method_invocation_conversion_p.'
6363         Fixes PR java/3285
6364
6365 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6366
6367         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
6368         `-fsyntax-only.' Fixes PR java/3248
6369
6370 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6371
6372         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
6373
6374 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
6375
6376         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
6377         current function is static. Fixes PR java/1970
6378
6379 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6380
6381         * parse.y (patch_method_invocation): Add enclosing context to ctor
6382         calls if necessary. Fixes PR java/2953
6383
6384 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6385
6386         * parse.y (resolve_package): Abort if qualified expression member
6387         isn't right.
6388         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
6389         Fixes PR java/1391
6390
6391 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
6392
6393         * verify.c: Don't use // comments.
6394
6395 2001-07-05  Tom Tromey  <tromey@redhat.com>
6396
6397         * lang.c (flag_assume_compiled): Removed.
6398         * java-tree.h (flag_assume_compiled): Removed.
6399         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
6400         -fhash-synchronization, -fuse-divide-subroutine,
6401         -fcheck-references, -femit-class-file, -femit-class-files,
6402         -fassume-compiled.  Updated --encoding information.  Changed
6403         -foutput-class-dir to `-d'.
6404
6405 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
6406
6407         * jcf-parse.c (parse_class_file): Add lineno parameter to
6408         debug_start_source_file call.
6409
6410 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
6411
6412         * gcj.texi: Use gpl.texi.
6413         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
6414         dependencies and use doc/include in search path.
6415
6416 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
6417
6418         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
6419         `this'.  If so, don't build instance initializers.
6420
6421 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
6422
6423         * parse.y (resolve_expression_name): Improved error message for
6424         inner class cases. Fixes PR java/1958
6425
6426 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6427
6428         * lang.c: #include diagnostic.h
6429         (lang_print_error): Add a `diagnostic_context *' parameter.
6430         (java_dummy_print): Likewise.
6431         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
6432
6433 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6434
6435         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
6436         * jcf.h (typedef struct JCF): New bitfield `finished.'
6437         (JCF_FINISH): Set `finished.'
6438         (JCF_ZERO): Reset `finished.'
6439         Fixes PR java/2633
6440
6441 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6442
6443         * parse.y (class_body_declaration:): Don't install empty instance
6444         initializers.
6445         Fixes PR java/1314
6446
6447 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6448
6449         * class.c (set_super_info): Call `set_class_decl_access_flags.'
6450         (set_class_decl_access_flags): New function.
6451         * java-tree.h (set_class_decl_access_flags): New prototype.
6452         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
6453         (parse_class_file): New local `decl_max_locals.' Take wide types
6454         into account to compute DECL_MAX_LOCALS.
6455         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
6456         imports on demand.
6457
6458 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
6459
6460         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
6461
6462 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
6463
6464         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
6465         * parse.y (do_resolve_class): Moved comments out to leading comment
6466         section. Removed local `start', New local `_ht' and
6467         `circularity_hash.'  Record `enclosing' in hash table and search
6468         it to detect circularity.  Use `enclosing' as an argument to
6469         `lookup_cl.' Free the hash table when done.
6470
6471 2001-06-19  Tom Tromey  <tromey@redhat.com>
6472
6473         * lex.c (java_read_char): Disallow invalid and overlong
6474         sequences.  Fixes PR java/2319.
6475
6476 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
6477
6478         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
6479
6480 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
6481
6482         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
6483         arguments accordingly.
6484
6485 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6486
6487         * gcj.texi: Move contents to just after title page.
6488
6489 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
6490
6491         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
6492         builtin type.
6493         (patch_incomplete_class_ref): Build the class ref, build the class
6494         init if necessary, complete the tree.
6495         Fixes PR java/2605
6496
6497 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6498
6499         * parse.y (lookup_field_wrapper): Test `name' code.
6500         (resolve_qualified_expression_name): Test `qual_wfl' code.
6501         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
6502         handle `qual_wfl' by code.
6503         (maybe_build_primttype_type_ref): Test `wfl' code.
6504
6505 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6506
6507         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
6508         fdl.texi.
6509         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
6510         the dvi file in the java directory.
6511
6512 2001-05-25  Sam TH  <sam@uchicago.edu>
6513
6514         * gen-table.pl javaop.h jcf.h lex.h,
6515         parse.h: Fix header include guards.
6516
6517 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
6518
6519         * jv-scan.c (version): Update copyright year.
6520
6521 2001-05-21  Per Bothner  <per@bothner.com>
6522
6523         * jcf-parse.c (read_class):  If class is from .class or .zip file
6524         and it's already been read, don't push/pop parser context.
6525
6526 2001-05-18  Per Bothner  <per@bothner.com>
6527
6528         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
6529         command line so the jvgenmain-generated main program comes first.
6530
6531 2001-05-15  Tom Tromey  <tromey@redhat.com>
6532
6533         * class.c (build_utf8_ref): Don't generate identifier based on
6534         utf8const contents.
6535
6536 2001-05-12  Richard Henderson  <rth@redhat.com>
6537
6538         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
6539         * expr.c (java_lang_expand_expr): Expand it.
6540         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
6541         calling build_exception_object_ref.
6542         * parse.y (catch_clause_parameter): Likewise.
6543         (build_dot_class_method): Likewise.
6544         (try_reference_assignconv): Likewise.
6545         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
6546         * jcf-write.c (generate_bytecode_insns): Likewise.
6547
6548 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
6549
6550         * parse.y (build_unresolved_array_type): Set
6551         EXPR_WFL_QUALIFICATION on the newly created wfl.
6552         Fixes PR java/2538. Fixes PR java/2535.
6553
6554 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
6555
6556         * parse.y (fix_constructors): Removed unnecessary assignment to
6557         local. Moved assignment to `this$<n>', fixed comments and
6558         indentation.
6559         (build_wfl_wrap): Fixed indentation.
6560         Fixes PR java/2598, java/2579 and java/2658.
6561
6562 2001-05-03  Mo DeJong  <mdejong@redhat.com>
6563
6564         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
6565         check for byte swap.
6566
6567 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
6568
6569         * expr.c (build_class_init): Move MODIFY_EXPR
6570         outside of COND_EXPR.  Remove variable `call'.
6571
6572 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6573
6574         * decl.c: NULL_PTR -> NULL.
6575         * jcf-write.c: Likewise.
6576
6577 2001-05-01  Tom Tromey  <tromey@redhat.com>
6578
6579         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
6580         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
6581         * gcj.texi: Updated copyright text.  Include fdl.texi.
6582         (Top): Link to new node.
6583
6584 2001-05-01  Per Bothner  <per@bothner.com>
6585
6586         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
6587
6588 2001-05-01  Per Bothner  <per@bothner.com>
6589
6590         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
6591         import_list contains the name, not the TREE_PURPOSE.
6592
6593 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6594
6595         * jcf-io.c (read_zip_member): Cast to long in comparison with
6596         signed value.
6597
6598         * jvspec.c (lang_specific_driver): Initialize variables.
6599
6600         * mangle.c (find_compression_record_match): Likewise.
6601
6602         * typeck.c (build_null_signature): Provide static prototype.  Mark
6603         parameter with ATTRIBUTE_UNUSED.
6604
6605         * verify.c (verify_jvm_instructions): Initialize variable.
6606
6607 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6608
6609         * parse.y (do_resolve_class): Check for cyclic inheritance during
6610         inner class resolution.
6611
6612 2001-04-27  Per Bothner  <per@bothner.com>
6613
6614         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
6615         while iterating, since that could cause gc to lose stuff.
6616
6617 2001-04-26  Per Bothner  <per@bothner.com>
6618
6619         Fix method search wrt scope of inner classes to match JLS2.
6620         * typeck.c (build_null_signature):  New static function.
6621         (has_method):  New function.  Uses build_null_signature and lookup_do.
6622         * java-tree.h (has_method):  New declaration.
6623         * parse.y (find_applicable_accessible_methods_list):  Do not search
6624         context of inner classes here.
6625         (patch_method_invocation):  Search scope, ie. current and outer clases,
6626         for method matching simple name, to find class.
6627
6628 2001-04-26  Per Bothner  <per@bothner.com>
6629
6630         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
6631         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
6632
6633         * constants.c (find_methodref_with_class_index):  New function.
6634         (find_methodref_index):  Use find_methodref_with_class_index.
6635         * java-tree.h (find_methodref_with_class_index):  New declaration.
6636         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
6637         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
6638         If context changed from interface to class, don't use invokeinterface.
6639
6640 2001-04-25  Per Bothner  <per@bothner.com>
6641
6642         * verify.c (verify_jvm_instructions):  For field instructions,
6643         check that field index is valid.  For invoke instructions, check that
6644         method index is valid.
6645
6646 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
6647
6648         * config-lang.in (target_libs): Copy from $libgcj_saved.
6649
6650 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6651
6652         * decl.c (init_decl_processing): Add new class "protectionDomain"
6653         field.
6654         * class.c (make_class_data): Set initial value for "protectionDomain".
6655
6656 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6657
6658         * jvspec.c (lang_specific_driver): Fix memory allocation
6659         deficit, by using concat in lieu of xmalloc/sprintf.
6660
6661 2001-04-20  Per Bothner  <per@bothner.com>
6662
6663         Fixes to compile multiple .class files at once.
6664         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
6665         * java-tree.h (CLASS_PARSED_P):  New macro.
6666         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
6667         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
6668         (read_class):  Avoid some code duplication.
6669         Don't call JCF_FINISH for a .class file - might be needed later.
6670         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
6671         rather than CLASS_LOADED_P, since latter implies class laid out.
6672         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
6673         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
6674
6675 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6676
6677         * Make-lang.in (java/boehm.o): Depend on toplev.h.
6678
6679         * boehm.c: Include toplev.h.
6680
6681 2001-04-06  Tom Tromey  <tromey@redhat.com>
6682             Alexandre Petit-Bianco  <apbianco@redhat.com>
6683
6684         Fix for PR gcj/1404 and PR gcj/2332:
6685         * parse.y (build_array_from_name): If we use the type_wfl then
6686         accumulate dimensions from the original type as well.
6687         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
6688
6689 2001-04-06  Tom Tromey  <tromey@redhat.com>
6690
6691         * parse.y (analyze_clinit_body): Return true if the second operand
6692         of a METHOD_EXPR is nonzero.
6693
6694 2001-04-06  Tom Tromey  <tromey@redhat.com>
6695
6696         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
6697         directory.
6698         ($(srcdir)/java/parse.c): Likewise.
6699
6700 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
6701
6702         * gcj.texi: Use `which-gcj' instead of `which-g77.'
6703         (version-gcc): Initialized.
6704         (which-gcj): Likewise.
6705
6706 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
6707
6708         * java-tree.h (struct lang_decl): New macro
6709         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
6710         * parse.y (build_instance_initializer): New function.
6711         (add_instance_initializer): Use it.
6712         (java_fix_constructors): Set `current_class' before fix pass.
6713         (fix_constructors): Just return if already fixed. Move `super()'
6714         invocation ahead. Use `build_instance_initializer.'
6715         Fixes PR java/1315.
6716
6717 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
6718
6719         * parse.y (resolve_qualified_expression_name): Pass field's
6720         DECL_CONTEXT to `not_accessible_p.'
6721         (not_accessible_p): Changed parameters order in `inherits_from_p'
6722         invocation.
6723
6724 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
6725
6726         * lang-options.h: Add flag_check_references.
6727
6728 2001-04-04  Per Bothner  <per@bothner.com>
6729
6730         * java-tree.h (CONSTANT_VALUE_P):  New macro.
6731         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
6732         * parse.y (maybe_build_class_init_for_field):  New static function.
6733         (resolve_expression_name, resolve_field_access):  Use
6734         maybe_build_class_init_for_field instead of build_class_init
6735         This does not do the init if the field is compile-time-constant.
6736         (resolve_field_access):  Simplify.
6737
6738         * parse.y (fold_constant_for_init):  Merge test into switch.
6739
6740 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
6741
6742         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
6743         on gansidecl.h.
6744         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
6745
6746 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
6747
6748         * expr.c (pop_type_0): Save the result of the first
6749         lang_printable_name call in a scratch buffer, so it
6750         won't be clobbered by the second call.
6751
6752 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
6753
6754         * parse-scan.y (array_type:): Rewritten.
6755         (type_declaration:): `empty_statement' replaces `SC_TK.'
6756         (class_member_declaration:): `empty statement' added.
6757         (method_body:): Simplified.
6758         (static_initializer:): Likewise.
6759         (primary_no_new_array:): Use `type_literals.'
6760         (type_literals:): New rule.
6761         (dims:): Set and update `bracket_count.'
6762         Fixes PR java/1074. Fixes PR java/2412.
6763
6764 2001-03-28  Hans Boehm  <boehm@acm.org>
6765
6766         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
6767         (get_boehm_type_descriptor): Set type on returned value to be a
6768         pointer length integer.
6769
6770 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6771
6772         * expr.c (pop_type_0): Call `concat' rather than building the
6773         string manually.
6774         (pop_type): Add format specifier in call to `error'.
6775
6776         * parse.y (patch_method_invocation): Avoid casting away
6777         const-ness.
6778
6779 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
6780
6781         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
6782
6783 2001-03-28  Richard Henderson  <rth@redhat.com>
6784
6785         IA-64 ABI Exception Handling:
6786         * Make-lang.in (except.o): Don't depend on eh-common.h.
6787         * check-init.c (check_init): Handle EXC_PTR_EXPR.
6788         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
6789         [soft_exceptioninfo_call_node]: Remove.
6790         [eh_personality_libfunc, lang_eh_runtime_type]: New.
6791         (end_java_method): No emit_handlers.
6792         * except.c (java_set_exception_lang_code): Remove.
6793         (method_init_exceptions): Don't call it.
6794         (prepare_eh_table_type): No CATCH_ALL_TYPE.
6795         (build_exception_object_ref): New.
6796         (expand_end_java_handler): Update for except.h name changes.
6797         (emit_handlers, expand_resume_after_catch): Remove.
6798         * expr.c (java_lang_expand_expr): Update for except.h name changes.
6799         (process_jvm_instruction): Use build_exception_object_ref.
6800         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
6801         (soft_exceptioninfo_call_node): Remove.
6802         (build_exception_object_ref): Declare.
6803         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
6804         soft_exceptioninfo_call_node.  Move processing ...
6805         [EXC_PTR_EXPR]: ... here.
6806         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
6807         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
6808         (source_end_java_method): No java_set_exception_lang_code or
6809         emit_handlers.
6810         (build_dot_class_method): Use build_exception_object_ref.
6811         (try_reference_assignconv): Check EXC_PTR_EXPR not
6812         soft_exceptioninfo_call_node.
6813
6814 2001-03-28  Richard Henderson  <rth@redhat.com>
6815
6816         * java-tree.h (throw_node): Define as a single member of
6817         java_global_trees instead of a separate array.
6818         (JTI_THROW_NODE): New.
6819         * decl.c (throw_node): Don't declare.
6820         (init_decl_processing): Init a scalar throw_node.
6821         Don't register it for gc.
6822         * check-init.c (check_init): Reference scalar throw_node.
6823         * expr.c (build_java_athrow): Likewise.
6824         * jcf-write.c (generate_bytecode_insns): Likewise.
6825         * parse.h (BUILD_THROW): Likewise.
6826
6827 2001-03-28  Richard Henderson  <rth@redhat.com>
6828
6829         * decl.c (end_java_method): Do not save and restore
6830         flag_non_call_exceptions.
6831         * parse.y (source_end_java_method): Likewise.
6832         * lang.c (flag_exceptions): Don't declare.
6833         (java_init_options): Set flag_non_call_exceptions.  Set
6834         flag_exceptions here ...
6835         (java_init): ... not here.
6836
6837 2001-03-27  Richard Henderson  <rth@redhat.com>
6838
6839         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
6840         exceptions_via_longjmp.
6841
6842         * lang.c (flag_new_exceptions): Don't declare it.
6843         (java_init_options): Or set it.
6844
6845 2001-03-27  Richard Henderson  <rth@redhat.com>
6846
6847         * decl.c (end_java_method): Rename asynchronous_exceptions to
6848         flag_non_call_exceptions.
6849         * parse.y (source_end_java_method): Likewise.
6850
6851 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6852
6853         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
6854
6855 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
6856
6857         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
6858
6859 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
6860
6861         * parse.y (find_as_inner_class): Follow current package
6862         indications not to mistakingly load an unrelated class.
6863
6864 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6865
6866         * constants.c (PUTN): Use memcpy, not bcopy.
6867
6868         * lex.c (java_read_char): Use memmove, not bcopy.
6869
6870         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
6871
6872 2001-03-23  Per Bothner  <per@bothner.com>
6873
6874         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
6875         macro for better error pin-pointing.
6876         * java-tree.h:  Fix typo in comment.
6877
6878         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
6879         Don't include jsr/goto in exception range.
6880         Check if start and end of exception range are the same (also TRY_EXPR).
6881         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
6882         However, do emit the following goto even if try_block is empty.
6883         Defer freeing exception_decl until after the finalizer, to make
6884         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
6885
6886         * parse.y (java_complete_lhs):  If the try-clause is empty, just
6887         return the finally-clause and vice versa.
6888
6889 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
6890
6891         * gcj.texi (Input Options): documented the check for attribute
6892         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
6893         * java-tree.h (flag_force_classes_archive_check): Declared extern.
6894         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
6895         (jcf_parse): Check for the right classes archive if necessary.
6896         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
6897         (jcf_parse_fields): Fixed indentation.
6898         * jcf-write.c (append_gcj_attribute): New function.
6899         (generate_classfile): Compute the attribute count, invoke
6900         `append_gcj_attribute'.
6901         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
6902         turned into bit-fields. New bit-field `right_zip.'
6903         (JCF_ZERO): Set `right_zip' to zero.
6904         * lang-options.h (-fforce-classes-archive-check): Added flag.
6905         * lang.c (flag_force_classes_archive_check): New flag.
6906         (lang_f_options): New entry `force-classes-archive-check.'
6907         Fixes PR java/1213.
6908
6909 2001-02-07  Andrew Haley  <aph@redhat.com>
6910
6911         * gcj.texi (Configure-time Options): Add -fcheck-references.
6912         * expr.c (build_java_indirect_ref): New function.
6913         (java_check_reference): New function.
6914         (build_java_array_length_access): Use build_java_indirect_ref to
6915         check for null references.
6916         (build_java_arrayaccess): Likewise.
6917         (build_get_class): Likewise.
6918         (build_field_ref): Likewise.
6919         (invoke_build_dtable): Likewise.
6920         (build_invokeinterface): Likewise.
6921         * lang.c (lang_f_options): Add flag_check_references.
6922         * jvspec.c (jvgenmain_spec): Add flag_check_references.
6923         * java-tree.h (flag_check_references): New variable.
6924         * lang.c (flag_check_references): Likewise.
6925         * parse.y (patch_invoke): Use java_check_reference.
6926         (patch_assignment): Allow for extra nesting in
6927         _Jv_CheckArrayStore.
6928
6929 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
6930
6931         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
6932         * lex.c (cxx_keywords): Likewise.
6933
6934 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
6935
6936         * parse.y (qualify_ambiguous_name): Broaden `length'
6937         recognition. Help MODIFY_EXPR be resolved as expression names.
6938         Fixes PR java/2066. Fixes PR java/2400.
6939
6940 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
6941
6942         * gjavah.c (process_file): Mark interface definitions with
6943         "__attribute__ ((java_interface))".
6944
6945 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
6946
6947         * class.c (layout_class): Fixed push_super_field's second
6948         argument. Fixes PR java/2333.
6949         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
6950         too early to lay innerclasses out.
6951
6952 2001-03-20  Tom Tromey  <tromey@redhat.com>
6953             Alexandre Petit-Bianco <apbianco@redhat.com>
6954
6955         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
6956         inside an array reference. Insertion of the array store check
6957         rewritten. Fixes PR java/2299.
6958
6959 2001-03-20  Tom Tromey  <tromey@redhat.com>
6960
6961         * lex.c (java_read_unicode): Only accept leading `u's.
6962
6963 2001-03-20  Tom Tromey  <tromey@redhat.com>
6964
6965         * jcf-parse.c (read_class): Initialize `class'.
6966
6967 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
6968
6969         * jcf_parse.c (jcf_parse): Eliminate unused variable.
6970
6971 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
6972
6973         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
6974         (layout_class): Likewise.
6975         (layout_class_method): Likewise.
6976         (emit_register_classes): Likewise.
6977         * decl.c (builtin_function): Likewise.
6978         (give_name_to_locals): Likewise.
6979
6980 2001-03-19  Per Bothner  <per@bothner.com>
6981
6982         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
6983         before trying to load an inner class.
6984
6985         Fixes to process to command-line .class files in two passes.
6986         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
6987         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
6988         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
6989         * class.c (is_compiled_class):  Fix for renamed flag.
6990         * parse.y (maybe_create_class_interface_decl):  Likewise.
6991         * jcf-parse.c (yyparse):  Also set if compiling .class files.
6992         * jcf-parse.c (read_class);  Read current_class.
6993         (jcf_parse):  Make static.
6994         (load_inner_classes):  New function, with code moved from jcf_parse,
6995         because we need to inner classes after the command-line files are read.
6996         (yyparse):  Set finput to NULL when it doesn't need to be closed.
6997         Reduce use of main_jcf (basically only for archive) and
6998         use finput instead of main_jcf->read_state.
6999         Inline jcf_figure_file_type into yyparse.
7000         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
7001         Defer load_inner_classes and parse_class_file to a second pass,
7002         after we've correctly mapped command-line .clas fiels to classes.
7003         (jcf_figure_file_type):  Removed.
7004         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
7005         (JCF_ZERO):  Also clear zipd field.
7006         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
7007
7008 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7009
7010         * jcf-parse.c (yyparse): Change ch from char * to char.
7011
7012 2001-03-19  Per Bothner  <per@bothner.com>
7013
7014         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
7015         Add constructed filelist-file at end, following -xjava.  Thus any .o
7016         and library files are not affected by the -xjava.  Also wrap
7017         explicit @FILE with -xjava and -xnone.
7018
7019 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
7020
7021         * class.c (build_static_field_ref): Call make_decl_rtl() after
7022         setting the DECL_EXTERNAL flag.
7023
7024 2001-03-17  Per Bothner  <per@bothner.com>
7025
7026         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
7027
7028         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
7029         when result is is needed (target is STACK_TARGET).
7030
7031         * parse.h (JDEP_SOLV):  Removed.
7032         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
7033
7034         * parse.y (incomplete_class_list): Removed.
7035         (obtain_incomplete_type): Don't use or set incomplete_class_list.
7036         It doesn't work if resolve_class changes the name of an array type
7037         that is on the list and then someone else looks for the modified name.
7038         Also, seems liable to break when compiling multiple source files at
7039         once.  So the simplest is to just remove incomplete_class_list -
7040         it is only a minor space win and it is not even clear it saves time.
7041
7042         * parse.y (resolve_class):  Remove unneeded promote_type.
7043
7044 2001-03-15  Per Bothner  <per@bothner.com>
7045
7046         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
7047         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
7048         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
7049         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
7050
7051         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
7052         * parse.y (java_expand_classes):  Likewise.
7053
7054         * parse.y (expand_start_java_method):  Was only called once and had a
7055         misleading name, so inline in caller java_complete_expand_method.
7056         (enter_a_block):  Likewise inline in enter_block and remove.
7057
7058         Remove junk from when gcc/java was created (by copying from C/C++).
7059         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
7060         (struct binding_level):  Remove fields keep, keep_if_subblocks,
7061         more_cleanups_ok, have_cleanups (which have never been used).
7062         (pushlevel, poplevel):  Remove related useless code.
7063
7064         * class.c (make_class_data):  The class_dtable_decl (i.e. the
7065         vtable for Class) should be external, except when compiling Class.
7066
7067         * jvspec.c (lang_specific_driver):  Fix -C handling.
7068         Check -save-temps to see if temp @FILE should be deleted.
7069         Follow-up to/fix for February 16 patch.
7070
7071         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
7072         (type_stack_dup):  Remove no-longer neded error check.
7073
7074 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
7075
7076         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
7077         to 'for_pointer'. If this type is for a pointer (argument) mangling,
7078         don't surround the element with 'N..E' if the type name is
7079         unqualified.
7080
7081 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7082
7083         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
7084         DECL_RTL_SET_P, etc.
7085         (make_method_value): Likewise.
7086         (get_dispatch_table): Likewise.
7087
7088         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7089
7090 2001-03-07  Tom Tromey  <tromey@redhat.com>
7091
7092         * config-lang.in (lang_requires): Define.
7093
7094 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
7095
7096         * typeck.c (convert): Check flag_unsafe_math_optimizations,
7097         not flag_fast_math.
7098
7099 2001-03-05  Per Bothner  <per@bothner.com>
7100
7101         Fix a problem where rest_of_decl_compilation applied to
7102         class_dtable_decl causes problems because it was done too early,
7103         before output file was opened.
7104         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
7105         * class.c (class_dtable_decl):  Add macro - element of class_roots.
7106         (make_class_data):  Define class_dtable_decl.
7107         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
7108
7109 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7110
7111         * java/class.c, java/decl.c, java/java-tree.h: Replace all
7112         uses of 'boolean' with 'bool'.
7113
7114 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7115
7116         * lang-specs.h: Add zero initializer for cpp_spec field to all
7117         array elements.
7118
7119 2001-02-16  Per Bothner  <per@bothner.com>
7120
7121         Handle compiling multiple input files at once, and @FILE syntax.
7122         * gcj.texi:  Updated documentation to match.
7123         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
7124         * jcf-parse.c (parse_source_file):  Split into ...
7125         (parse_source_file_1):  New function - and:
7126         (parse_source_file_2):  New function.
7127         (yyparse):  On -ffilelist-file, open and scan named file.
7128         On first pass over files, only do parse_source_file_1.
7129         A new second pass calls parse_source_file_2 for each file to compile.
7130         (init_jcf_parse):  Call init_src_parse.
7131         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
7132         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
7133         as multiple input file combined in one compilation.
7134         * lang-options.h:  Add -ffilelist-file
7135         * lang.c (flag_filelist_file):  New flag variable.
7136         (lang_f_options):  Handle -ffilelist-file.
7137         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
7138         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
7139         gclass_list - use global fields of src_parse_roots instead.
7140         * parse.y (src_parse_roots):  New array.
7141         (incomplete_class_list, gclass_list):  New macros.
7142         (push_parser_context, java_pop_parser_context,
7143         java_parser_context_resume):  Don't fiddle with deleted fields.
7144         (various):  Use incomplete_class gclass_list and global macros
7145         instead of parse_ctxt fields - the lists are global.
7146         (init_src_parse):  New function.
7147
7148 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7149
7150         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
7151
7152 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7153
7154         * parse.y (check_inner_class_access): Moved declaration of local
7155         `enclosing_decl_type' to the right location.
7156
7157 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
7158
7159         * parse.y (parser_check_super_interface): Don't call
7160         check_pkg_class_access for an inner interface.
7161         (parser_check_super): Don't call check_pkg_class_access for inner
7162         class.
7163         (do_resolve_class): Simplify enclosing type loop. Don't call
7164         check_pkg_class_access if CL and DECL are not set.
7165         (find_in_imports_on_demand): Set DECL if class_type needed to be
7166         loaded. Don't call check_pkg_class_access for an inner class.
7167         (check_inner_class_access): Rewritten to implement member access
7168         rules as per spec 6.6.1.
7169         (check_pkg_class_access): Handle the empty package correctly.
7170         (in_same_package): New function. Determine if two classes are in the
7171         same package.
7172
7173 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
7174
7175         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
7176         method into array types.
7177         * parse.y (patch_method_invocation): Bypass access check on clone call
7178         to array instance.
7179
7180 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
7181
7182         * expr.c (build_instanceof): Check for arrays when trying fold to
7183         false.
7184
7185 2001-02-15  Jim Meyering  <meyering@lucent.com>
7186
7187         * Make-lang.in (java.install-common): Depend on `installdirs'.
7188         (java.install-info): Likewise.
7189
7190 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
7191
7192         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
7193
7194 2001-02-14  Tom Tromey  <tromey@redhat.com>
7195             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7196
7197         Fix for PR java/1261.
7198         * typeck.c (build_java_array_type): Add public `clone' method to
7199         arrays.
7200         * parse.y (resolve_qualified_expression_name): Use current_class
7201         when checking for inaccessibility.
7202         (patch_method_invocation): Fixed error message when accessibility
7203         denied.  Added `from_super' argument.
7204
7205 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
7206
7207         * parse.y (resolve_class): Don't build a fake decl. Use the one
7208         already built.
7209         * typeck.c (build_java_array_type): Build and assign decl to array
7210         type.
7211
7212 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
7213
7214         * parse.y (not_accessible_p): Changed leading comment. Added extra
7215         `where' argument. Use it to enforce protected access rules.
7216         (resolve_qualified_expression_name): Added extra argument to
7217         not_accessible_p.
7218         (patch_method_invocation): Use argument `primary' to provide
7219         not_accessible_p with an extra argument.
7220         (lookup_method_invoke): Added extra argument to not_accessible_p.
7221         (search_applicable_method_list): Likewise.
7222
7223 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7224
7225         * parse.y (resolve_qualified_expression_name): Try to resolve as
7226         an inner class access only if `decl' is a TYPE_DECL.
7227
7228 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7229
7230         * decl.c (classdollar_identifier_node): Initialize.
7231         * java-tree.h (enum java_tree_index): New entry
7232         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
7233         (classdollar_identifier_node): New macro.
7234         (ID_CLASSDOLLAR_P): Likewise.
7235         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
7236         (build_dot_class_method_invocation): Likewise.
7237         (find_applicable_accessible_methods_list): `class$' can't be
7238         inherited.
7239
7240 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
7241
7242         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
7243
7244 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7245
7246         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
7247         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
7248         gone.
7249
7250 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7251
7252         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
7253         outside of the `__U' sequence too.
7254         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
7255         sequence too.
7256
7257 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7258
7259         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
7260
7261 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7262
7263         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
7264         (JVGENMAIN_OBJS): Likewise.
7265         * java-tree.h (append_gpp_mangled_name): New prototype.
7266         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
7267         Removed cast calling `gcc_add_root.'
7268         * jvgenmain.c (mangle_obstack): New global, initialized.
7269         (main): Use it.
7270         (do_mangle_class): Constify local `ptr.'
7271         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
7272         append_gpp_mangle_name and update `count' if necessary.
7273         Use `mangle_obstack.'
7274         * mangle.c (append_unicode_mangled_name): Removed.
7275         (append_gpp_mangled_name): Likewise.
7276         (unicode_mangling_length): Likewise.
7277         (mangle_member_name): Return type set to `void.'
7278         (mangle_field_decl): Don't append `U' in escaped names.
7279         (mangle_method_decl): Likewise.
7280         (mangle_member_name): Just use `append_gpp_mangled_name.'
7281         * mangle_name.c: New file.
7282
7283 2001-02-07  Per Bothner  <per@bothner.com>
7284
7285         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
7286
7287         * check-init.c (check_init):  Don't call done_alternative after
7288         processing loop code, as a LOOP_EXPR never terminates normally.
7289
7290 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7291
7292         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
7293
7294 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7295
7296         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
7297         DECLs.
7298
7299 2001-02-06  Tom Tromey  <tromey@redhat.com>
7300
7301         * lex.c (java_new_lexer): Longer error message.
7302
7303 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
7304             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7305
7306         * typeck.c (build_prim_array_type): Added leading comment.
7307         (build_java_array_type): Moved locals out of
7308         block. Always create the `data' field, fixed alignment to match
7309         C++.
7310
7311 2001-02-04  Tom Tromey  <tromey@redhat.com>
7312
7313         * expr.c (java_lang_expand_expr): Don't bother recomputing
7314         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
7315         Fixes PR java/1866.
7316
7317 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7318
7319         * parse.y (process_imports): Save the original name of the import
7320         for better error report.
7321
7322 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
7323
7324         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
7325         of macros used when compiling jvspec.c.
7326         * jvspec.c (lang_specific_driver): Link with the shared
7327         libgcc by default.
7328
7329 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7330
7331         * check-init.c (check_init): Call internal_error instead of fatal.
7332         * expr.c (java_lang_expand_expr): Likewise.
7333         * jcf-parse.c (get_constant): Likewise.
7334         * mangle.c (java_mangle_decl): Likewise.
7335         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
7336         (operator_string): Likewise.
7337         * check-init.c (check_init): Call abort instead of fatal.
7338         * class.c (build_class_ref): Likewise.
7339         * constants.c (write_constant_pool): Likewise.
7340         * decl.c (start_java_method): Likewise.
7341         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
7342         (java_stack_dup, encode_newarray_type): Likewise.
7343         (build_java_array_length_access): Likewise.
7344         (build_java_check_indexed_type, expand_java_pushc): Likewise.
7345         (build_java_soft_divmod, build_invokeinterface): Likewise.
7346         * java-tree.h (INNER_CLASS_P): Likewise.
7347         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
7348         (give_name_to_class, get_class_constant): Likewise.
7349         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
7350         (find_constant_index, generate_bytecode_conditional): Likewise.
7351         (generate_bytecode_insns, perform_relocations): Likewise.
7352         * lex.c (java_unget_unicode, java_lex): Likewise.
7353         * mangle.c (mangle_type, mangle_record_type): Likewise.
7354         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
7355         (finish_mangling): Likewise.
7356         * parse.h (MARK_FINAL_PARMS): Likewise.
7357         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
7358         (obtain_incomplete_type, java_complete_class): Likewise.
7359         (java_check_regular_methods, java_complete_expand_method): Likewise.
7360         (cut_identifier_in_qualified, check_deprecation): Likewise.
7361         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
7362         (java_complete_lhs, lookup_name_in_blocks): Likewise.
7363         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
7364         * typeck.c (set_local_type, parse_signature_type): Likewise.
7365         (parse_signature_string, build_java_signature): Likewise;
7366         (set_java_signature): Likewise.
7367         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
7368         * class.c (add_method): Call fatal_error instead of fatal.
7369         (build_static_field_ref): Likewise.
7370         * expr.c (build_known_method_ref, expand_invoke): Likewise.
7371         * jcf-parse.c (get_constant, jcf_parse): Likewise.
7372         * lex.c (java_new_new_lexer): Likewise.
7373         * jv-scan.c (main): Likewise.
7374         (fatal_error): Renamed from fatal.
7375         * jcf-parse.c (yyparse): Call fatal_io_error instead of
7376         pfatal_with_name.
7377         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
7378         (yyparse): Likewise.
7379         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
7380         * lex.c (java_get_line_col): Likewise.
7381         * jcf-parse.c (load_class): Make errors non-fatal.
7382         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
7383
7384 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
7385
7386         * jvgenmain.c (class_mangling_suffix): Remove unused string.
7387         (error): Remove unused function.
7388         (main): Don't use "__attribute__ alias" on generated class symbol.
7389
7390 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7391
7392         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
7393         argument.
7394         * parse.y (finish_method_declaration): Code accounting for WFLed
7395         method DECL_NAMEs deleted.
7396         (check_abstract_method_definitions): Likewise.
7397         (resolve_type_during_patch): Layout resolved type.
7398         * typeck.c (lookup_do): Removed unused local.
7399
7400 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
7401
7402         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
7403         * decl.c (init_decl_processing): Use integer_minus_one_node, not
7404         integer_negative_one_node.
7405         * expr.c (build_java_binop): Likewise.
7406
7407 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
7408
7409         * zextract.c (read_zip_archive): Read file_offset before writing
7410         zipd and consequently clobbering the header contents.
7411
7412 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7413
7414         * Make-lang.in: Remove all dependencies on defaults.h.
7415         * decl.c: Don't include defaults.h.
7416         * expr.c: Likewise.
7417         * parse.y: Likewise.
7418
7419 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7420
7421         * ChangeLog (2001-01-21): Fixed typo.
7422         * class.c (layout_class_method): Code accounting for WFLed
7423         method DECL_NAMEs deleted.
7424         * constant.c (find_methodref_index): Likewise.
7425         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
7426         * java-tree.h (DECL_FUNCTION_WFL): New macro.
7427         (struct lang_decl): New field `wfl'.
7428         (java_get_real_method_name): Prototype deleted.
7429         * mangle.c (mangle_method_decl): Code accounting for WFLed
7430         method DECL_NAMEs deleted.
7431         * parse.h (GET_METHOD_NAME): Macro deleted.
7432         * parse.y (reset_method_name): Deleted.
7433         (method_header): Set DECL_FUNCTION_WFL.
7434         (check_abstract_method_header): Code accounting for WFLed method
7435         DECL_NAMEs deleted.
7436         (java_get_real_method_name): Deleted.
7437         (check_method_redefinition): Code accounting for WFLed method
7438         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
7439         (java_check_regular_methods): Likewise.
7440         (java_check_abstract_methods): Likewise.
7441         (java_expand_classes): Don't call `reset_method_name.'
7442         (search_applicable_method_list): Use DECL_NAMEs instead of
7443         GET_METHOD_NAME.
7444         * typeck.c (lookup_do): Code accounting for WFLed method
7445         DECL_NAMEs deleted.
7446
7447 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
7448
7449         * lex.c (java_read_char): Check for EOF from getc first.
7450
7451 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7452
7453         * class.c (layout_class): Don't lay the superclass out if it's
7454         already being laid out.
7455         * jcf-parse.c (handle_innerclass_attribute): New function.
7456         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
7457         handle_innerclasses_attribute.
7458         (jcf_parse): Don't load an innerclasses if it's already being
7459         laid out.
7460         * jcf-write.c (append_innerclass_attribute_entry): Static
7461         `anonymous_name' and its initialization deleted. `ocii' and `ini'
7462         to be zero for anonymous classes.
7463
7464 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7465
7466         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
7467         necessary.
7468         * jcf-parse.c (set_source_filename): Use
7469         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
7470
7471 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7472
7473         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
7474         gets a unique asm name.
7475
7476 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7477
7478         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
7479         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7480         if necessary.
7481         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
7482         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
7483         * parse.y (lookup_package_type_and_set_next): Deleted.
7484         (resolve_package): Removed unnecessary code.
7485         (find_applicable_accessible_methods_list): `finit$' can't be
7486         inherited.
7487         * verify.c (pop_argument_types): Added missing prototype.
7488
7489 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
7490
7491         * config-lang.in: Disable java by default.
7492
7493 2001-01-23  Tom Tromey  <tromey@redhat.com>
7494
7495         * gcj.texi (Copying): New node.
7496         Added copyright information.
7497
7498 2001-01-21  Per Bothner  <per@bothner.com>
7499
7500         Various fixes to allow compiling a compressed .jar/.zip archive.
7501         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
7502         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
7503         (struct ZipDirectory):  New field zipf points to owning ZipFile.
7504         * jcf.h (struct ZipDirectory):  Add forward declaration.
7505         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
7506         Remove seen_in_zip and zip_offset fields.
7507         (JCF_SEEN_IN_ZIP):  New macro.
7508         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
7509         * jcf-io.c:  Change all ZipFileCache to ZipFile.
7510         (read_zip_member):  New function.
7511         (open_in_zip):  Call read_zip_member.
7512         * jcf-parse.c (find_in_current_zip):  Remove function.
7513         (read_class):  Merge in find_in_current_zip functionality.
7514         Call read_zip_member if needed.
7515         (parse_zip_file_entries):  Use read_zip_member.
7516         (process_zip_dir):  Update for removed and added JCF fields.
7517         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
7518
7519 2001-01-21  Per Bothner  <per@bothner.com>
7520
7521         Minor optimization of static ggc roots.
7522         * jcf-parse.c (parse_roots):  New static field.
7523         (current_field, current_method, current_file_list):  Replace by macros
7524         naming fields of parse_roots.
7525         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
7526         * class.c (class_roots):  New static field.
7527         (registered_class, fields_ident, info_ident, class_list):
7528         New macros naming fields of parse_roots.
7529         (build_static_field_ref):  Don't register roots here.
7530         (layout_class):  Static field list replaced by macro class_list.
7531         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
7532         Initialize fields_ident and info_ident here.
7533
7534 2001-01-21  Per Bothner  <per@bothner.com>
7535
7536         * jcf-parse.c (ggc_mark_jcf):  New function.
7537         (init_jcf_parse):  Register current_jcf as ggc root.
7538
7539 2001-01-21  Per Bothner  <per@bothner.com>
7540
7541         * lang.c (put_decl_node):  Print method's name.
7542
7543 2001-01-21  Per Bothner  <per@bothner.com>
7544
7545         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
7546         (verify_jvm_instructions):  Use it, for better error messages on loads.
7547
7548 2001-01-21  Per Bothner  <per@bothner.com>
7549
7550         * verify.c (merge_type_state):  Still may have to merge even if
7551         LABEL_VERIFIED (label).
7552
7553 2001-01-21  Per Bothner  <per@bothner.com>
7554
7555         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
7556         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
7557
7558 2001-01-19  Per Bothner  <per@bothner.com>
7559
7560         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
7561         if expeting an interface type.  Refines Tom's change of 2000-09-12.
7562
7563 2001-01-18  Per Bothner  <per@bothner.com>
7564
7565         * gcj.texi (Input Options): Mention .java files.
7566
7567 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7568
7569         * lang-options.h (-Wunsupported-jdk11): Removed.
7570         * lang.c (flag_not_overriding): Deleted.
7571         (flag_static_local_jdk1_1): Likewise.
7572         (lang_W_options): Removed "unsupported-jdk11" entry.
7573         * parse.y (java_check_methods): Removed dead code.
7574
7575 2001-01-17  Tom Tromey  <tromey@redhat.com>
7576
7577         Changes suggested by Per Bothner:
7578         * gcj.texi (Input Options): Don't mention input files.
7579         (Code Generation): Updated --main information.
7580         (Invoking jcf-dump): Mention that --javap is incomplete.
7581         From Alexandre Petit-Bianco:
7582         (Warnings): Don't mention -Wunsupported-jdk11.
7583         My stuff:
7584         (Compatibility): Mention JDK 1.2-ness of libraries.
7585         (Resources): Mention resources used when writing gcj.
7586
7587 2001-01-17  Tom Tromey  <tromey@redhat.com>
7588
7589         * gcj.texi: New file.
7590         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
7591         (java.info): Depend on gcj.info.
7592         (java/gcj.dvi): New target.
7593         (java.dvi): Depend on gcj.dvi.
7594         (java.install-info): Wrote.
7595
7596 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
7597
7598         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
7599         having called make_decl_rtl.
7600
7601 2001-01-14  Per Bothner  <per@bothner.com>
7602
7603         Various patches to emit better messages on verification errors.
7604         * expr.c (push_type_0):  Return error indication on stack overflow,
7605         instead of callinfg fatal.
7606         (push_type):  Now just call push_type_0 (nd fatal on overflow).
7607         (pop_type_0):  Return detailed error message (in a char** argument).
7608         (pop_type):  If pop_type_0 fails, print error message.
7609         (pop_argument_types):  Moved to verify.c.
7610         * verify.c (pop_argument_types):  Moved from expr.c.
7611         Return a (possible) error message, rather than void.
7612         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
7613         (verify_jvm_instruction):  Use new macros, improving error messages.
7614         For case OPCODE_astore use object_ptr_type_node.
7615         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
7616         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
7617
7618         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
7619         constant, return body without wrapper.  (Improves constant folding.)
7620         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
7621
7622 2001-01-13  Per Bothner  <per@bothner.com>
7623
7624         * expr.c (expand_java_field_op):  Assigning to a final field outside
7625         an initializer does not violate JVM spec, so should be warning, not
7626         error.  (Sun's verifier does not complain - though MicroSoft's does.)
7627
7628 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
7629
7630         * gjavah.c (version), jcf-dump.c (version): Update copyright year
7631         to 2001.
7632
7633 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
7634
7635         * parse.y (resolve_expression_name): Permit instance variables from
7636         enclosing context in super constructor call.
7637         (resolve_qualified_expression_name): Permit enclosing class's qualified
7638         "this" in super constructor call.
7639
7640 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
7641
7642         * class.c (build_utf8_ref): Remove last argument in call to
7643         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
7644         (build_class_ref): Likewise.
7645         (build_static_field_ref): Likewise.
7646         (get_dispatch_table): Likewise.
7647         (layout_class_method): Likewise.
7648         (emit_register_classes): Likewise.
7649         * constants.c (build_constant_data_ref): Likewise.
7650         * decl.c (builtin_function): Likewise.
7651         (create_primitive_vtable): Likewise.
7652         * expr.c (build_known_method_def): Likewise.
7653         (build_jni_stub): Likewise.
7654         (java_lang_expand_expr): Likewise.
7655
7656 2001-01-10  Tom Tromey  <tromey@redhat.com>
7657
7658         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
7659
7660 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7661
7662         * java-tree.h (lang_printable_name_wls): New prototype.
7663         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
7664         rather than `current_class' to print type name. Don't prepend type
7665         names when printing constructor names.
7666         (lang_printable_name_wls): New function.
7667         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
7668         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
7669         * parse.y (patch_method_invocation): Message tuned for constructors.
7670         (not_accessible_p): Grant `private' access from within
7671         enclosing contexts.
7672
7673 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7674
7675         All files with updated copyright when applicable.
7676         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
7677         * class.c (mangle_class_field): Function removed.
7678         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
7679         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
7680         (build_class_ref): Call `java_mangle_class_field' instead of
7681         `mangle_class_field.'
7682         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
7683         (layout_class): Call `java_mangle_decl' instead of
7684         `mangle_static_field.'
7685         (cxx_keywords): Initialized static array moved to `lex.c.'
7686         (layout_class_method): Changed leading comment. Simplified to
7687         call `java_mangle_decl.' Local `ptr' moved in for loop body.
7688         * decl.c (lang_mark_tree): Mark field `package_list.'
7689         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
7690         (struct lang_type): New field `package_list.'
7691         (unicode_mangling_length): Prototype removed.
7692         (append_gpp_mangled_name, append_gpp_mangled_classtype,
7693         emit_unicode_mangled_name): Likewise.
7694         (cxx_keyword_p): New prototype.
7695         (java_mangle_decl, java_mangle_class_field,
7696         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
7697         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
7698         `build_expr_wfl.'
7699         * jvgenmain.c (main_method_prefix): Global variable removed.
7700         (main_method_suffix): Likewise.
7701         (do_mangle_classname): New function.
7702         (main): Call it. Format changed to accommodate new mangling scheme.
7703         * lex.c: (utf8_cmp): Conditionally prototyped.
7704         (cxx_keywords): Moved from class.c, conditionally defined.
7705         (utf8_cmp, cxx_keyword_p): Likewise.
7706         * mangle.c (obstack.h, ggc.h): Included.
7707         (mangle_field_decl): New function.
7708         (mangle_method_decl, mangle_type, mangle_pointer_type,
7709         mangle_array_type, mangle_record_type,
7710         find_compression_pointer_match, find_compression_array_match,
7711         find_compression_record_match,
7712         find_compression_array_template_match, set_type_package_list,
7713         entry_match_pointer_p, emit_compression_string, init_mangling,
7714         finish_mangling, compression_table_add, mangle_member_name): Likewise.
7715         (mangle_obstack): New global.
7716         (MANGLE_RAW_STRING): New macro.
7717         (unicode_mangling_length): Turned static.
7718         (append_unicode_mangled_name): Renamed from
7719         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
7720         replaces `obstack', removed from the parameter list.
7721         (append_gpp_mangled_name): Turned static. `mangle_obstack'
7722         replaces parameter `obstack', removed from the parameter list. Call
7723         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
7724         (append_gpp_mangled_classtype): Removed.
7725         (compression_table, compression_next): New static variables.
7726         * parse.y (temporary_obstack): Extern declaration removed.
7727
7728 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7729
7730         * parse.y (patch_binop): Compute missing type in error situations.
7731
7732 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
7733
7734         * class.c (make_class_data): Push initial value for "arrayclass".
7735         * decl.c (init_decl_processing): Add new class field "arrayclass".
7736
7737 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
7738
7739         From patha@softlab.ericsson.se:
7740         * parse.y (switch_label): Use build, not build1, to construct
7741         DEFAULT_EXPR.
7742
7743 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7744
7745         * lang.c (lang_decode_option): Change -MA to -MP.
7746         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
7747         Update to new prototype; do quote targets.
7748         (jcf_dependency_write): Update.
7749
7750 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
7751
7752         Shorten primitive array allocation path:
7753         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
7754         to create new primitive arrays.
7755         * expr.c (build_newarray): If generating native code, call
7756         soft_newarray_node with a reference to the primitive TYPE identifier
7757         instead of type_value.
7758
7759 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
7760
7761         Fix for PRs gcj/312 and gcj/253:
7762         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
7763         dest if they arn't already.
7764         * class.c (layout_class): Call maybe_layout_super_class on
7765         superinterfaces also, but only if compiling from bytecode.
7766
7767         Fix for PR gcj/373:
7768         * parse.y (create_class): Set ACC_STATIC if class is declared in an
7769         interface.
7770
7771 2000-12-15  Tom Tromey  <tromey@redhat.com>
7772
7773         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
7774         set.
7775
7776 2000-12-14  Andrew Haley  <aph@redhat.com>
7777
7778         * boehm.c (mark_reference_fields): Change test to correctly detect
7779         bitmap overflow.
7780
7781 2000-12-15  Andreas Jaeger  <aj@suse.de>
7782
7783         * config-lang.in (lang_dirs): Added.
7784
7785 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7786
7787         * parse.y (end_artificial_method_body): Fixed undefined behavior.
7788         Credits go to rth for finding it.
7789
7790 2000-12-13  Mike Stump  <mrs@wrs.com>
7791
7792         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
7793
7794 2000-11-07  Tom Tromey  <tromey@cygnus.com>
7795
7796         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
7797         * lex.c (java_ignorable_control_p): Removed.
7798         (java_letter_or_digit_p): Removed.
7799         (java_start_char_p): New function.
7800         (java_read_char): Return `int', not `unicode_t'.  Changed
7801         callers.
7802         (java_read_unicode): Likewise.
7803         (java_read_unicode_collapsing_terminators): Likewise.
7804         (java_get_unicode): Likewise.
7805         (java_new_lexer): Initialize hit_eof.
7806         (java_parse_end_comment): Take `int' argument.
7807         (java_parse_doc_section): Likewise.
7808         (java_parse_escape_sequence): Don't allow backlash-newline.
7809         Return `int'.
7810         * lex.h (JAVA_DIGIT_P): Removed.
7811         (_JAVA_LETTER_OR_DIGIT_P): Removed.
7812         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
7813         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
7814         (JAVA_PART_CHAR_P): New macro.
7815         (UEOF): Now -1.
7816         (JAVA_CHAR_ERROR): Now -2.
7817         (java_lexer): New field `hit_eof'.
7818         * chartables.h: New file.
7819         * gen-table.pl: new file.
7820
7821 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7822             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7823
7824         * parse.y (java_complete_lhs): Only allow compound assignment of
7825         reference type if type is String.
7826
7827 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7828
7829         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
7830         jcf-path.c: Likewise.
7831
7832 2000-12-09  Anthony Green  <green@redhat.com>
7833
7834         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
7835         filestart and filename_length as int values.
7836
7837 2000-12-07  Mo DeJong  <mdejong@redhat.com>
7838
7839         * jcf-io.c (find_class): Correct the logic that tests to see if a
7840         .java file is newer than its .class file. The compiler was
7841         incorrectly printing a warning when file mod times were equal.
7842
7843 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
7844
7845         * jvgenmain.c: Use ISPRINT not isascii.
7846
7847 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7848
7849         * parse.y (end_artificial_method_body): Fixed typo.
7850
7851 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7852
7853         * parse.y (patch_method_invocation): Pick the correct enclosing
7854         context when creating inner class instances.
7855         Fixes gcj/332.
7856
7857 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
7858
7859         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7860         Update copyright year to 2000.
7861
7862 2000-11-23  Anthony Green  <green@redhat.com>
7863
7864         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
7865         Move current_file_list out of yyparse and make it static.
7866
7867         * expr.c: Declare quick_stack and tree_list_free_list as static
7868         (init_expr_processing): Register quick_stack and
7869         tree_list_free_list roots.
7870
7871 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7872
7873         * parse.y (build_outer_field_access): New local `decl_ctx', use
7874         it. Check for field's context and current class immediate outer
7875         context inheritance.
7876         (outer_field_access_p): Consider fields inherited from the last
7877         enclosing context.
7878         (build_access_to_thisn): Stop at the last enclosing context if
7879         necessary.
7880         Fixes gcj/367.
7881
7882 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
7883
7884         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
7885
7886 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
7887
7888         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
7889         scratch buffer.
7890
7891 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7892
7893         * jv-scan.c (help): Document --complexity.
7894         (options): Added --complexity.
7895         (flag_complexity): New global.
7896         (main): Call `report'.
7897         * parse-scan.y (complexity): New global.
7898         (if_then_statement, if_then_else_statement,
7899         if_then_else_statement_nsi, switch_block_statement_group,
7900         while_expression, do_statement, for_begin, continue_statement,
7901         throw_statement, catch_clause, finally, method_invocation,
7902         conditional_and_expression, conditional_or_expression,
7903         conditional_expression): Update complexity.
7904         (reset_report): Reset complexity.
7905         (report): New function.
7906
7907 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7908
7909         * lex.c (yylex): Added STRICT_TK case.
7910         * parse.y (STRICT_TK): Added.
7911         * parse-scan.y (STRICT_TK): Added.
7912         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
7913         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
7914         file.
7915         * keyword.h: Rebuilt.
7916         * keyword.gperf (strictfp): Added.
7917
7918 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7919
7920         * lex.c (yylex): Recognize floating point constants with leading
7921         0.
7922
7923 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7924
7925         * java-tree.h (cyclic_inheritance_report): Constify.
7926         * parse.y (cyclic_inheritance_report): Likewise.
7927
7928 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
7929
7930         * parse.y (goal): Remove call to ggc_add_string_root.
7931
7932 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
7933
7934         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
7935         Create string in scratch buffer, then pass to build_string.
7936
7937 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7938
7939         * parse.y (issue_warning_error_from_context): Add
7940         ATTRIBUTE_PRINTF.
7941
7942 2000-11-11  Anthony Green  <green@redhat.com>
7943
7944         * jcf-parse.c (process_zip_dir): Add finput parameter.
7945         (jcf_figure_file_type): Call process_zip_dir with appropriate
7946         argument.
7947
7948 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7949
7950         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
7951         * jcf-parse.c (jcf_figure_file_type): Likewise.
7952
7953 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
7954
7955         * parse.y (create_new_parser_context): Use memset () instead of
7956         bzero ().
7957
7958 2000-11-08  Tom Tromey  <tromey@cygnus.com>
7959
7960         * gjavah.c (process_file): Only include gcj/cni.h when generating
7961         CNI stubs.
7962
7963 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
7964
7965         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
7966         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
7967         instead of bzero ().
7968
7969 2000-11-05  Tom Tromey  <tromey@cygnus.com>
7970
7971         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
7972         * lex.c (IS_ZERO): New define.
7973         (java_perform_atof): Error on floating point underflow.
7974
7975 2000-11-04  Tom Tromey  <tromey@cygnus.com>
7976
7977         * lex.c (java_parse_escape_sequence): Only read two octal
7978         characters if the first one is greater than 3.  Don't allow
7979         "octal" numbers to include the digits 8 or 9.
7980
7981 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
7982
7983         * Make-lang.in (java.distdir): Remove.
7984
7985 2000-11-03  Tom Tromey  <tromey@cygnus.com>
7986
7987         * Make-lang.in (java.dvi): New target.
7988         Partial fix for PR other/567.
7989
7990         * lang-options.h: Mention -Wout-of-date.
7991         * jcf-dump.c (flag_newer): New global.
7992         * gjavah.c (flag_newer): New global.
7993         * jcf-io.c (find_class): Only warn when flag_newer set.
7994         * lang.c (flag_newer): New global.
7995         (struct string_option): New declaration.
7996         (lang_W_options): New global.
7997         (process_option_with_no): New function.
7998         (lang_decode_option): Use it.
7999
8000         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
8001         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
8002         `$'.
8003
8004         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
8005         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
8006         * lex.c (java_read_unicode): Removed `term_context' argument.
8007         Recognize any number of `u' in `\u'.
8008         (java_read_unicode_collapsing_terminators): New function.
8009         (java_get_unicode): Use it.
8010         (java_lineterminator): Removed.
8011         (yylex): Produce error if character literal is newline or single
8012         quote.  Return if eof found in middle of `//' comment.  EOF in
8013         `//' comment is only an error if pedantic.
8014         (java_ignorable_control_p): New function.
8015         (java_parse_end_comment): Return if eof found in middle of
8016         comment.
8017         Include flags.h.
8018         * jv-scan.c (pedantic): New global.
8019
8020 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8021
8022         * parse.y (outer_field_access_p): Inherited fields aren't
8023         consider outer fields.
8024         (maybe_build_thisn_access_method): Use
8025         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
8026         (resolve_expression_name): Trigger an error if a static field
8027         is being accessed as an outer field.
8028
8029 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8030
8031         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
8032         Fixes gcj/365.
8033
8034 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
8035
8036         * Make-lang.in: Move all build rules here from Makefile.in,
8037         adapt to new context.  Wrap all rules that change the current
8038         directory in parentheses.  Expunge all references to $(P).
8039         When one command depends on another and they're run all at
8040         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
8041         all object-file generation rules.  Delete obsolete variables.
8042
8043         * Makefile.in: Delete.
8044         * config-lang.in: Delete outputs= line.
8045
8046 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8047
8048         * parse.y (patch_method_invocation): NULLify this_arg when already
8049         inserted.
8050         (maybe_use_access_method): Handle call to methods unrelated to the
8051         current class. Fixed comment.
8052         Fixes gcj/361.
8053
8054 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8055
8056        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
8057        scope.
8058
8059 2000-10-24  Tom Tromey  <tromey@cygnus.com>
8060
8061         * lex.c (java_new_lexer): Initialize new fields.  Work around
8062         broken iconv() implementations.
8063         (java_read_char): Swap bytes if required.  Use fallback decoder if
8064         required.
8065         (byteswap_init, need_byteswap): New globals.
8066         (java_destroy_lexer): Only close iconv handle if it is in use.
8067         * lex.h (java_lexer): New fields read_anything, byte_swap,
8068         use_fallback.
8069         Made out_buffer unsigned.
8070
8071 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8072
8073         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
8074         where an enclosing context can be set on the jdep.
8075         (do_resolve_class): Fixed identation.
8076
8077 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8078
8079         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
8080
8081         * jcf-reader.c (peek_attribute, skip_attribute): Only define
8082         when requested.
8083
8084         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
8085
8086         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
8087
8088 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8089
8090         * jcf-write.c (OP1): Update `last_bc'.
8091         (struct jcf_block): Fixed indentation and typo in comments.  New
8092         field `last_bc'.
8093         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
8094         follows `monitorenter'.
8095         * parse.y (patch_synchronized_statement): New local `tmp'. Call
8096         `patch_string'.
8097         Fixes gcj/232.
8098
8099 2000-10-16  Tom Tromey  <tromey@cygnus.com>
8100
8101         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
8102         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
8103         * lang-options.h: Added -MA, -MT, -MF..
8104         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
8105         (DEPEND_TARGET_SET): New macro.
8106         (DEPEND_FILE_ALREADY_SET): Likewise.
8107         (init_parse): Handle new flags.
8108         * jcf.h (jcf_dependency_print_dummies): Declare.
8109         * Make-lang.in (s-java): Added mkdeps.o.
8110         * Makefile.in (BACKEND): Added mkdeps.o.
8111         (../gcjh$(exeext)): Added mkdeps.o.
8112         (../jcf-dump$(exeext)): Added mkdeps.o.
8113         * jcf-depend.c: Include mkdeps.h.
8114         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
8115         add_entry): Removed.
8116         (jcf_dependency_reset): Rewrote.
8117         (dependencies): New global.
8118         (jcf_dependency_set_target): Rewrote.
8119         (jcf_dependency_add_target): Likewise.
8120         (jcf_dependency_add_file): Likewise.
8121         (munge): Removed.
8122         (print_ents): Removed.
8123         (jcf_dependency_write): Rewrote.
8124         (print_dummies): New global.
8125         (jcf_dependency_print_dummies): New function
8126         (jcf_dependency_write): Call deps_dummy_targets if required.
8127
8128 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8129
8130         * gjavah.c (add_class_decl): Removed unused variables `tname',
8131         `tlen' and `name_index'.
8132         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
8133         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
8134         in `wfl_operator' with value.
8135         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
8136         (jcf_figure_file_type): Fixed identation.
8137         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
8138         * parse.y (analyze_clinit_body): New function.
8139         (static_initializer:): Reset `current_static_block'.
8140         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
8141         `wfl_operator' with new value.
8142         (lookup_cl): Use EXPR_WFL_FILENAME.
8143         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
8144         analyze_clinit_body.
8145         (build_outer_field_access): Access to this$<n> built from
8146         current_class, not its outer context.
8147         (build_access_to_thisn): Fixed leading comment. Tidied things up.
8148         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
8149         (patch_method_invocation): Use `is_static_flag' when already
8150         initialized.
8151         (patch_newarray): Removed assignment in ternary operator.
8152
8153 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8154
8155         * except.c (free_eh_ranges): Don't free `whole_range'.
8156
8157 2000-10-15  Anthony Green  <green@redhat.com>
8158
8159         * decl.c (init_decl_processing): Call init_class_processing before
8160         anything else.
8161
8162 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8163
8164         * check-init.c (check_init): Fixed leading comment. Use
8165         LOCAL_FINAL_P.
8166         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8167         (give_name_to_locals): Likewise.
8168         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
8169         fields in lang_decl_var.
8170         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
8171         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
8172         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
8173         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
8174         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
8175         (LOCAL_FINAL): Rewritten.
8176         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
8177         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
8178         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
8179         `init_final' fields.
8180         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
8181         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
8182         (TYPE_HAS_FINAL_VARIABLE): New macro.
8183         (struct lang_type): Added `afv' field.
8184         * parse.y (check_static_final_variable_assignment_flag): New function.
8185         (reset_static_final_variable_assignment_flag): Likewise.
8186         (check_final_variable_local_assignment_flag): Likewise.
8187         (reset_final_variable_local_assignment_flag): Likewise.
8188         (check_final_variable_indirect_assignment): Likewise.
8189         (check_final_variable_global_assignment_flag): Likewise.
8190         (add_inner_class_fields): Use LOCAL_FINAL_P.
8191         (register_fields): Handle local finals and final variables.
8192         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
8193         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8194         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8195         on local finals.
8196         (java_complete_expand_methods): Loop to set
8197         TYPE_HAS_FINAL_VARIABLE. Call
8198         `reset_final_variable_local_assignment_flag' and
8199         `check_final_variable_local_assignment_flag' accordingly before
8200         and after constructor expansion. Call
8201         `reset_static_final_variable_assignment_flag'
8202         before expanding <clinit> and after call
8203         `check_static_final_variable_assignment_flag' if the
8204         current_class isn't an interface. After all methods have been
8205         expanded, call `check_final_variable_global_assignment_flag' and
8206         `check_static_final_variable_assignment_flag' if the current class
8207         is an interface.
8208         (maybe_yank_clinit): Fixed typo in comment.
8209         (build_outer_field_access_methods): Removed old sanity check. Use
8210         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8211         Don't create access methods for finals.
8212         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
8213         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
8214         existing DECL_INIT has been processed.
8215         (java_complete_lhs): Likewise.
8216         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
8217         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
8218         logic.
8219         (patch_assignment): Use LOCAL_FINAL_P.
8220         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
8221         DECL_INITIAL is nullified.
8222         Fixes gcj/163.
8223
8224 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8225
8226         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
8227
8228         * Makefile.in (parse.c, parse-scan.c): Likewise.
8229
8230 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
8231
8232         * class.c (temporary_obstack): Remove.
8233         (make_class): Don't mess with obstascks.
8234         (push_class): Likewise.
8235         (set_super_info): Likewise.
8236         (add_method_1): Likewise.
8237         (add_method): Likewise.
8238         (add_field): Likewise.
8239         (build_utf8_ref): Likewise.
8240         (build_class_ref): Likewise.
8241         (build_static_field_ref): Likewise.
8242         (finish_class): Likewise.
8243         (push_super_field): Likewise.
8244         (layout_class): Likewise.
8245         (layout_class_methods): Likewise.
8246         (init_class_processing): Likewise.
8247         * constants.c (get_tag_node): Likewise.
8248         (build_constant_data_ref): Likewise.
8249         * decl.c (ggc_p): Remove.
8250         (copy_lang_decl): Use ggc_alloc.
8251         (complete_start_java_method): Don't mess with obstacks.
8252         (start_java_method): Likewise.
8253         (end_java_method): Likewise.
8254         * except.c (link_handler): Use xmalloc.
8255         (free_eh_ranges): New function.
8256         (method_init_exceptions): Use it.
8257         (add_handler): Use xmalloc.
8258         (expand_start_java_handler): Don't mess with obstacks.
8259         (prepare_eh_table_type): Likewise.
8260         (expand_end_java_handler): Likewise.
8261         * expr.c (push_value): Likewise.
8262         (create_label_decl): Likewise.
8263         (build_jni_stub): Likewise.
8264         (java_lang_expand_expr): Likewise.
8265         (note_instructions): Use xrealloc.
8266         (java_push_constant_from_pool): Don't mess with obstacks.
8267         (process_jvm_instruction): Likewise.
8268         * java-tree.h (cyclic_inheritance_report): Remove duplicate
8269         declaration.
8270         * jcf-parse.c (get_constant): Don't mess with obstacks.
8271         (read_class): Likewise.
8272         (jcf_parse): Likewise.
8273         * lex.c (expression_obstack): Remove.
8274         (java_lex): Don't use obstack_free.
8275         * parse.h (exit_java_complete_class): Don't mess with obstacks.
8276         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
8277         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
8278         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
8279         * parse.y (gaol): Add more GC roots.
8280         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
8281         (lookup_field_wrapper): Likewise.
8282         (obtain_incomplete_type): Don't mess with obstacks.
8283         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
8284         macros.
8285         (craft_constructor): Don't mess with obstacks.
8286         (safe_layout_class): Likewise.
8287         (java_complete_class): Likewise.
8288         (source_end_java_method): Likewise.
8289         (build_outer_field_access_methods): Likewise.
8290         (build_outer_method_access_method): Likewise.
8291         (maybe_build_thisn_access_method): Likewise.
8292         (build_dot_class_method_invocation): Likewise.
8293         (java_complete_tree): Likewise.
8294         (java_complete_lhs): Likewise.
8295         (do_merge_string_cste): Likewise.
8296         (patch_string_cst): Likewise.
8297         (array_constructor_check_entry): Likewise.
8298         * typeck.c (build_java_array_type): Likewise.
8299         (parse_signature_string): Likewise.
8300         (build_java_signature): Likewise.
8301
8302 2000-10-12  Tom Tromey  <tromey@cygnus.com>
8303
8304         Fix for PR gcj/356:
8305         * gjavah.c (add_class_decl): Don't special-case inner classes.
8306         (add_namelet): Likewise.
8307
8308 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
8309
8310         * java-tree.h: Constify current_encoding.
8311         * lang.c: Constify current_encoding.
8312
8313 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
8314
8315         * jvgenmain.c (class_mangling_suffix): Omit `.'.
8316         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
8317
8318 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8319
8320         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
8321         patch. Fixes gcj/340.
8322
8323 2000-10-10  Tom Tromey  <tromey@cygnus.com>
8324
8325         * lex.c (java_new_lexer): Initialize out_first and out_last
8326         fields.
8327         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
8328
8329 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8330
8331         * parse.y (pop_current_osb): New function.
8332         (array_type:): Use `dims:', changed actions
8333         accordingly. Suggested by Anthony Green.
8334         (array_creation_expression:): Used pop_current_osb.
8335         (cast_expression:): Likewise.
8336         (search_applicable_method_list): Fixed indentation.
8337
8338 2000-10-08  Anthony Green  <green@redhat.com>
8339
8340         * parse.y (array_type_literal): Remove production.
8341         (type_literals): Refer to array_type, not array_type_literal.
8342
8343 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8344
8345         Patch contributed by Corey Minyard.
8346         * decl.c (check_local_named_variable): New function.
8347         (tree check_local_unnamed_variable): Likewise.
8348         (find_local_variable): Splitted. Call check_local_{un}named_variable.
8349
8350 2000-10-07  Anthony Green  <green@redhat.com>
8351
8352         * class.c (layout_class): Handle case where superclass can't be
8353         layed out yet.
8354
8355 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8356
8357         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
8358         gperf.
8359
8360 2000-10-05  Tom Tromey  <tromey@cygnus.com>
8361
8362         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
8363         * jvgenmain.c (class_mangling_prefix): Removed.
8364         (class_mangling_suffix): New global.
8365         (main): Use it.
8366         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
8367         `$'.
8368         (print_method_info): Handle overrides for static and final
8369         methods.
8370         (process_file): Generate declaration for class object field.
8371         * class.c (cxx_keywords): New array.
8372         (utf8_cmp): New function.
8373         (cxx_keyword_p): New function.
8374         (layout_class_method): Mangle C++ keywords by appending `$'.
8375         (mangle_field): New function.
8376         (mangle_class_field): Use mangle_field.  Mangle class name as
8377         `class$'.
8378         (mangle_static_field): Use mangle_field.
8379
8380 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8381
8382         * decl.c (find_local_variable): Removed uncessary type check and
8383         fixed range check typo. From Corey Minyard.
8384
8385 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8386
8387         * decl.c (give_name_to_locals): New local `code_offset'. Call
8388         `maybe_adjust_start_pc'.
8389         * expr.c (note_instructions): New function.
8390         (expand_byte_code): Don't collect insn starts here.
8391         (peek_opcode_at_pc): New function.
8392         (maybe_adjust_start_pc): Likewise.
8393         * java-tree.h (maybe_adjust_start_pc): Declare.
8394         (note_instructions): Likewise.
8395         * jcf-parse.c (parse_class_file): Call `note_instructions'.
8396
8397 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8398
8399         * parse.y (field_access:): Fixed indentation.
8400         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
8401
8402 2000-09-07  Tom Tromey  <tromey@cygnus.com>
8403
8404         Fix for PR gcj/307:
8405         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
8406         JPRIMITIVE_TYPE_P, for arithmetic operators.
8407         (patch_method_invocation): Indentation fix.
8408         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
8409         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
8410         (do_unary_numeric_promotion): Cleaned up code.
8411         (valid_cast_to_p): Handle boolean correctly.
8412
8413 2000-09-27  Tom Tromey  <tromey@cygnus.com>
8414
8415         * lex.c (java_read_unicode): Reset bs_count when finished with
8416         `\u' sequence.
8417
8418 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
8419
8420         Convert to GC.
8421         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
8422         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
8423         (typeck.o): Depend on ggc.h.
8424         * class.c (add_method_1): Use GC functions for allocation.
8425         (init_class_processing): Register roots.
8426         * decl.c (ggc_p): Set to 1.
8427         (pending_local_decls): Make it static.
8428         (push_jvm_slot): Use GC functions for allocation.
8429         (init_decl_processing): Register roots.
8430         (give_name_to_locals): Use GC functions for allocation.
8431         (lang_mark_tree): New function.
8432         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
8433         functions for allocation.
8434         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
8435         * lex.c (java_lex): Use build_string, rather than replicating it
8436         inline.
8437         * parse.y (goal): Add more roots.
8438         (mark_parser_ctxt): New function.
8439         * typeck.c: Include ggc.h.
8440
8441 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8442
8443         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
8444         contains something else than MODIFY_EXPR.
8445
8446 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
8447
8448         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
8449         * Makefile.in (parse.o): Depend on ggc.h.
8450         (class.o): Likewise.
8451         (constants.o): Likewise.
8452         (decl.o): Likewise.
8453         (expr.o): Likewise.
8454         (jcf-parse.o): Likewise.
8455         (jcf-write.o): Likewise.
8456         (mangle.o): Likewise.
8457         * class.c: Include ggc.h.
8458         (build_static_field_ref): Register GC roots.
8459         (layout_class): Likewise.
8460         (init_class_processing): Likewise.
8461         * constants.c: Include ggc.h.
8462         (current_constant_pool_data_ref): Remove.
8463         (tag_nodes): Move it to ...
8464         (get_tag_node): ... here.  Register GC roots.
8465         * decl.c: Include ggc.h.  Remove many global tree definitions.
8466         (throw_node): Define.
8467         (java_global_trees): Likewise.
8468         (predef_filenames): Make the size a constant.
8469         (init_decl_processing): Adjust accordingly.
8470         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
8471         * expr.c: Include ggc.h.
8472         (init_expr_processing): Register GC roots.
8473         (build_invokeinterface): Likewise.
8474         * java-tree.h: Replace extern tree declarations with macros.
8475         (java_global_trees): New variable.
8476         (java_tree_index): New enumeration.
8477         (init_jcf_parse): Declare.
8478         * jcf-parse.c: Include ggc.h.
8479         (current_class): Remove declaration.
8480         (main_class): Likewise.
8481         (all_class_list): Likewise.
8482         (predefined_filename_p): Adjust for constant size of
8483         predef_filenames.
8484         (init_jcf_parse): New function.
8485         * jcf-write.c: Include ggc.h.
8486         (generate_classfile): Register GC roots.
8487         (append_synthetic_attribute): Likewise.
8488         (append_innerclass_attribute_entry): Likewise.
8489         * lang.c: Include ggc.h.
8490         (lang_print_error): Register GC roots.
8491         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
8492         with macros.
8493         * parse.y: Include ggc.h.
8494         (wfl_operator): Remove.
8495         (goal): Register GC roots.
8496         (java_pop_parser_context): Adjust for new field names.
8497         (java_parser_context_save_global): Likewse.
8498         (java_parser_context_restore_global): Likewise.
8499         (java_parser_context_suspend): Likewise.
8500         (java_parser_context_resume): Likewise.
8501         (verify_constructor_circularity): Register GC roots.
8502         (lookup_cl): Likewise.
8503         (java_reorder_fields): Likewise.
8504         (build_current_this): Likewise.
8505         (class_in_current_package): Likewise.
8506         (argument_types_convertible): Likewise.
8507         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
8508
8509 2000-09-14  Tom Tromey  <tromey@cygnus.com>
8510
8511         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
8512
8513 2000-09-13  Tom Tromey  <tromey@cygnus.com>
8514
8515         * jcf-parse.c: Include <locale.h>.
8516         * jv-scan.c: Include <locale.h>.
8517
8518 2000-09-12  Tom Tromey  <tromey@cygnus.com>
8519
8520         * expr.c (pop_type_0): Return `Object' if trying to merge two
8521         interface types.
8522         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
8523         interface types; `Object' is always a valid supertype.
8524
8525 2000-09-12  Tom Tromey  <tromey@cygnus.com>
8526
8527         Fix for PR gcj/33:
8528         * jv-scan.c (help): Document --encoding.
8529         (options): Added `encoding' entry.
8530         (OPT_ENCODING): New define.
8531         (main): Handle --encoding.
8532         Include <langinfo.h> if nl_langinfo exists.
8533         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
8534         --encoding.
8535         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
8536         (parse_source_file): Correctly call java_init_lex.  Added `finput'
8537         argument.  Use nl_langinfo to determine default encoding.
8538         * java-tree.h (current_encoding): Declare.
8539         * parse.y (java_parser_context_restore_global): Don't restore
8540         `finput'.
8541         (java_parser_context_save_global): Don't set `finput' field.
8542         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
8543         if required.
8544         * lang.c (current_encoding): New global.
8545         (lang_decode_option): Recognize `-fencoding='.
8546         (finish_parse): Don't close finput.
8547         * parse.h (struct parser_ctxt): Removed `finput' and
8548         `unget_utf8_value' fields.  Added `lexer' field.
8549         (java_init_lex): Fixed declaration.
8550         * lex.c (java_new_lexer): New function.
8551         (java_destroy_lexer): Likewise.
8552         (java_read_char): Added `lex' argument.  Handle iconv case.
8553         (java_read_unicode): Added `lex' argument.  Count backslashes in
8554         lexer structure.
8555         (java_init_lex): Added `finput' and `encoding' arguments.  Set
8556         `lexer' field in ctxp.
8557         (BAD_UTF8_VALUE): Removed.
8558         (java_lex): Handle seeing UEOF in the middle of a string literal.
8559         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
8560         (java_lexer): New structure.
8561         (UNGETC): Removed.
8562         (GETC): Removed.
8563         (DEFAULT_ENCODING): New define.
8564         (java_destroy_lexer): Declare.
8565
8566 2000-09-12  Tom Tromey  <tromey@cygnus.com>
8567
8568         Fix for PR gcj/343:
8569         * lex.c (java_init_lex): Initialize java_io_serializable.
8570         * parse.y (java_io_serializable): New global.
8571         (valid_ref_assignconv_cast_p): An array can be cast to
8572         serializable.
8573
8574 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
8575
8576         * decl.c, expr.c: Include defaults.h if not already included.
8577         Don't define the *_TYPE_SIZE macros.
8578
8579 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
8580
8581         * typeck.c (build_java_array_type): Correct first parameter
8582         in ADJUST_FIELD_ALIGN invocation.
8583
8584 2000-09-06  Tom Tromey  <tromey@cygnus.com>
8585
8586         * lang-specs.h: Also recognize `-femit-class-files'.
8587
8588 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8589
8590         * verify.c (merge_types): Load the types to merge if necessary.
8591
8592 2000-09-02  Anthony Green  <green@redhat.com>
8593
8594         * jcf-io.c: Include zlib.h.
8595         (open_in_zip): Read compressed class file archives.
8596         * zipfile.h (ZipDirectory): Add uncompressed_size and
8597         compression_method fields.
8598         * zextract.c (read_zip_archive): Collect file compression info.
8599
8600 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
8601
8602         * parse.y (do_resolve_class): Also explore superclasses of
8603         intermediate enclosing contexts when searching for inner classes.
8604
8605 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8606
8607         * parse.y (variable_declarator_id:): Better error message.
8608         (expression_statement:): Use YYNOT_TWICE.
8609         (cast_expression:): Likewise.
8610         (assignment:): Likewise.
8611
8612 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8613
8614         * parse.y (do_merge_string_cste): New locals. Create new
8615         STRING_CSTs each time, use memcpy. Fixes gcj/311.
8616
8617 2000-08-07  Hans Boehm  <boehm@acm.org>
8618
8619         * boehm.c (mark_reference_fields): Set marking bits for all words in
8620         a multiple-word record.
8621         (get_boehm_type_descriptor): Use the procedure marking descriptor for
8622         java.lang.Class.
8623
8624 2000-08-31  Mike Stump  <mrs@wrs.com>
8625
8626         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
8627         jcf-dump$(exeext)): Make parallel safe.
8628
8629 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
8630
8631         * jcf-parse.c (set_source_filename): Constify a char *.
8632         * jcf-write.c (append_innerclasses_attribute,
8633         make_class_file_name): Constify a char *.  Don't recycle a
8634         variable for an unrelated purpose.
8635         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
8636         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
8637
8638 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8639
8640         * expr.c (can_widen_reference_to): Fixed indentation.
8641         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
8642         * parse.y: `finit$' replaces `$finit$' in comments.
8643         (try_builtin_assignconv): Fixed leading comment.
8644
8645 2000-08-25  Greg McGary  <greg@mcgary.org>
8646
8647         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
8648
8649 2000-08-24  Greg McGary  <greg@mcgary.org>
8650
8651         * lang.c (lang_decode_option): Use ARRAY_SIZE.
8652         * parse.y (BINOP_LOOKUP): Likewise.
8653
8654 2000-08-22  Andrew Haley  <aph@cygnus.com>
8655
8656         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
8657         sign extending. Fixes gcj/321.
8658         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
8659         combining to make a jlong. Fixes gcj/321.
8660
8661 2000-08-21  Nix  <nix@esperi.demon.co.uk>
8662
8663         * lang-specs.h: Do not process -o or run the assembler if
8664         -fsyntax-only.
8665
8666 2000-08-16  Andrew Haley  <aph@cygnus.com>
8667
8668         * typeck.c (build_java_array_type): Rewrite code to do array
8669         alignment.  Take into account back-end macros when aligning array
8670         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
8671         user to set alignment. Fixes gcj/252 and 160.
8672
8673 2000-08-09  Tom Tromey  <tromey@cygnus.com>
8674
8675         * parse.y (check_abstract_method_definitions): Now return `int'.
8676         Check implemented interfaces.  Fixes PR gcj/305.
8677
8678         * parse.y (patch_switch_statement): Disallow `long' in switch
8679         expressions.  Fixes PR gcj/310.
8680
8681 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8682
8683         * decl.c (finit_leg_identifier_node): New global.
8684         (init_decl_processing): Use `finit$' to initialize
8685         finit_identifier_node. Use `$finit$' to initialize
8686         finit_leg_identifier_node.
8687         * expr.c (expand_java_field_op): Use ID_FINIT_P.
8688         * java-tree.h (finit_identifier_node): Changed attached comment.
8689         (finit_leg_identifier_node): New declaration.
8690         (ID_FINIT_P): Take finit_identifier_node and
8691         finit_leg_identifier_node into account. This is a backward
8692         compatibility hack.
8693
8694 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8695
8696         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
8697         Jan 6 2000 patch.
8698         (generate_bytecode_insns): Check `nargs' before emitting it.
8699         * verify.c (merge_type_state): Fixed typo.
8700         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
8701         generate_bytecode_{conditional,insns}.
8702
8703 2000-08-13  Anthony Green  <green@redhat.com>
8704
8705         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
8706         for -pg builds).
8707
8708 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8709
8710         * class.c (maybe_layout_super_class): Fixed indentation.
8711         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
8712         (java_check_methods): New function declaration.
8713         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
8714         instead of `str_ptr'.
8715         * jcf-write.c (generate_bytecode_insns): Emit number the of args
8716         of a `invokeinterface' at the right time.
8717         * parse.h (WFL_STRIP_BRACKET): New macro.
8718         (SET_TYPE_FOR_RESOLUTION): Use it.
8719         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
8720         (check_class_interface_creation): Don't check for cross package
8721         innerclass name clashes.
8722         (method_header): Behave properly if MDECL is `error_mark_node'.
8723         (method_declarator): Return `error_mark_node' if bogus current
8724         class.
8725         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
8726         (resolve_and_layout): New local `decl_type', set and used. Call
8727         java_check_methods.
8728         (java_check_methods): New method.
8729         (java_layout_classes): Use it.
8730         (resolve_qualified_expression_name): No EH check necessary in
8731         access$<n>.
8732         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
8733         `case' statement.
8734         (patch_assignment): Set DECL_INITIAL on integral final local.
8735
8736 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8737
8738         * java-tree.h (flag_extraneous_semicolon): New extern.
8739         * lang-options.h: (-Wextraneous-semicolon): New option.
8740         * lang.c (flag_redundant): Fixed typo in leading comment.
8741         (flag_extraneous_semicolon): New global.
8742         (lang_decode_option): Set `flag_extraneous_semicolon' when
8743         -Wall. Decode `-Wextraneous-semicolon'.
8744         * parse.y (type_declaration:): Removed `SC_TK' hack, added
8745         `empty_statement' rule.
8746         (class_body_declaration): Likewise.
8747         (method_body:): Accept `;' as a method body.
8748         (static_initializer:): Removed `SC_TK' hack.
8749         (constructor_block_end:): Likewise.
8750         (empty_statement:): Report deprecated empty declaration. Fixes
8751         gcj/295
8752
8753 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8754
8755         * parse.y (build_dot_class_method_invocation): Changed parameter
8756         name to `type'. Build signature from `type' and convert it to a
8757         STRING_CST if it's an array.
8758         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
8759         to use `ref_type' directly.
8760
8761 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
8762
8763         * lang-options.h: Added a comma after the last element to avoid
8764         syntax errors when other languages define additional options.
8765
8766 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
8767
8768         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
8769         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
8770         (jc1): Link with $(BACKEND).
8771         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
8772
8773 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
8774
8775         * jvspec.c: Adjust type of second argument to
8776         lang_specific_driver, and update code as necessary.
8777
8778         * class.c (build_dtable_decl): Initialize dummy.
8779
8780 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8781
8782         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
8783         method bodies not to rule out discarding `<clinit>'; don't use
8784         <clinit> to initialize static fields with constant initializers.
8785
8786 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8787
8788         * gjavah.c (print_method_info): Added `synth' parameter. Skip
8789         synthetic methods.
8790         (method_synthetic): New global.
8791         (HANDLE_METHOD): Recognize synthetic method and tell
8792         `print_method_info' about it.
8793         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
8794         processing a synthetic method.
8795         * jcf-reader.c (skip_attribute): New function.
8796         ( skip_attribute): Likewise.
8797
8798 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8799
8800         * parse.y (build_outer_field_access): Fixed comments.
8801         (fix_constructors): Emit the initialization of this$<n> before
8802         calling $finit$.
8803         (resolve_qualified_expression_name): Build an access to `decl' if
8804         necessary.
8805
8806 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8807
8808         * parse-scan.y (curent_class): Non longer const.
8809         (inner_qualifier, inner_qualifier_length): Deleted.
8810         (current_class_length): New global.
8811         (bracket_count): Fixed typo in leading comment.
8812         (anonymous_count): New global.
8813         (class_instance_creation_expression:): Handle anonymous classes.
8814         (anonymous_class_creation:): New rule.
8815         (push_class_context): Rewritten.
8816         (pop_class_context): Likewise.
8817         (INNER_QUALIFIER): Macro deleted.
8818         (report_class_declaration): call `push_class_context' when
8819         entering the function. `fprintf' format modified not to use
8820         INNER_QUALIFIER.
8821         (report_class_declaration): Assign `package_name' and
8822         `current_class' to NULL separately.
8823
8824 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8825
8826         * expr.c (build_invokeinterface): Call layout_class_methods on
8827         target interface.
8828
8829 2000-07-27  Tom Tromey  <tromey@cygnus.com>
8830             Anthony Green  <green@cygnus.com>
8831             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8832
8833         * class.c (make_class_data): Create vtable for abstract classes.
8834         (get_dispatch_table): Changed to cope with abstract classes.
8835
8836 2000-07-27  Tom Tromey  <tromey@cygnus.com>
8837
8838         * parse.y (patch_method_invocation): Don't reverse the argument
8839         list when dealing with anonymous class constructors. Fixed typo in
8840         comment.
8841
8842 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8843
8844         * parse.y (build_alias_initializer_parameter_list): Reverse
8845         crafted list when building aliases for anonymous class
8846         constructors.
8847
8848 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8849
8850         * parse.y (jdep_resolve_class): Don't bother checking potential
8851         innerclass access if `decl' is NULL.
8852         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
8853         WFL.
8854
8855 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8856
8857         * parse.c: Remove (again.)
8858
8859 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8860
8861         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
8862         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
8863         outside the `if' statement, alias to innerclass removed, `decl'
8864         used to mark the class complete.
8865
8866 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8867
8868         * parse.y (simple_name:): Fixed typo in error message.
8869
8870 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8871
8872         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
8873         or its first operand can be error marks.
8874
8875 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8876
8877         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
8878         * parse.y (method_header): Likewise.
8879
8880 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8881
8882         * parse.y (process_imports): Consider that one might be trying to
8883         import an innerclass. Fixes gcj/254
8884
8885 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8886
8887         * parse.y (find_as_inner_class): Handle the case where the
8888         enclosing context of an innerclass has been loaded as bytecode.
8889
8890 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8891
8892         * parse.y (simple_name:): Reject `$' in type names.
8893         (resolve_type_during_patch): Use `type' as a second
8894         argument to resolve_no_layout. Fixes gcj/257.
8895
8896 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
8897
8898         * parse.y (find_most_specific_methods_list): Select the only
8899         non-abstract method even if max has been set.
8900         Fixes gcj/285, gcj/298.
8901
8902 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
8903
8904         * lang-specs.h: Added %(jc1) to java compiler options.
8905
8906 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
8907
8908         * .cvsignore: New file.
8909
8910 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8911
8912         * parse.y (not_accessible_p): Access granted to innerclasses
8913         (indirectly) extending the reference type. Fixes gcj/249.
8914
8915 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8916
8917         * parse.y (patch_method_invocation): Fixed comment.
8918         (maybe_use_access_method): Build this$<n>s to the context of the
8919         target method, or a type that extends it. Fixes gcj/242.
8920
8921 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
8922
8923         * parse.c: Remove.
8924
8925 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8926
8927         * parse.y (fold_constant_for_init): Avoid bullish conversion.
8928
8929 2000-07-13  Tom Tromey  <tromey@cygnus.com>
8930
8931         * lang-specs.h: Added %{I*}.
8932
8933 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
8934
8935         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
8936
8937 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
8938
8939         * parse-scan.c: Remove.
8940
8941 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8942
8943         * class.c (set_super_info): Handled protected inner classes.
8944         (common_enclosing_context_p): Bail early if arguments aren't both
8945         inner classes.
8946         (get_access_flags_from_decl): Handle private and protected inner
8947         classes.
8948         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
8949         (CLASS_PROTECTED): Likewise.
8950         (struct lang_type): New bitfield `poic'.
8951         * parse.y (jdep_resolve_class): Call check_inner_class_access on
8952         inner classes only.
8953         (check_inner_class_access): Renamed arguments, added
8954         comments. Handles protected inner classes (fixes gcj/225)
8955         (not_accessible_p): Fixed comments. Avoid handling inner classes.
8956
8957 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8958
8959         * parse.y (resolve_qualified_expression_name): Verify qualified
8960         access to `this'. Fixes gcj/239.
8961
8962 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8963
8964         * jcf-write.c (generate_classfile): Don't install ConstantValue
8965         for null pointers.
8966
8967 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8968
8969         * parse.y (resolve_qualified_expression_name): Handle inner class
8970         access. Fixes gcj/256.
8971
8972 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8973
8974         * jcf-write.c (generate_classfile): Properly install the
8975         ConstantValue attribute and the initial value constant pool index
8976         on string constants.
8977         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
8978         class files.
8979
8980 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8981
8982         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
8983         construct.
8984         * parse.y (find_as_inner_class): Fixed typo.
8985         (do_resolve_class): Explore enclosing contexts when searching for
8986         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
8987         (check_inner_class_access): Check `decl' which can be null in case
8988         of previous errors.
8989
8990 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8991
8992         * java-tree.h (java_debug_context): Declared `extern'.
8993         (safe_layout_class): Likewise.
8994         * parse.y (resolve_field_access): Field must be `static' in order
8995         to be replaced by its initial value. Added comments.
8996         (find_applicable_accessible_methods_list): Fixed typo.
8997         (find_most_specific_methods_list): Methods found in innerclasses
8998         take over methods founds in the enclosing contexts.
8999         (java_complete_tree): Loosen restrictions on the type of DECLs
9000         that can be replaced by their initialization values.
9001         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
9002
9003 2000-07-05  Tom Tromey  <tromey@cygnus.com>
9004
9005         * Make-lang.in (PARSE_DIR): New macro.
9006         (PARSE_RELDIR): Likewise.
9007         (PARSE_C): Likewise.
9008         (PARSE_SCAN_C): Likewise.
9009         ($(PARSE_C)): New target.
9010         ($(PARSE_SCAN_C)): Likewise.
9011         (SET_BISON): New macro.
9012         (BISONFLAGS): Likewise.
9013         (JAVABISONFLAGS): Likewise.
9014
9015 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
9016
9017         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
9018         argument on the first pass for CNI as well as JNI.
9019         (print_method_info): Set up method name on the first pass only.
9020
9021 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9022
9023         * parse.y (parser_qualified_classname): Removed parameter
9024         `is_static'.
9025         (create_interface): Removed first passed parameter to
9026         parser_qualified_classname.
9027         (create_class): Likewise. Don't install alias on static
9028         innerclasses. Fixes gcj/275.
9029
9030 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9031
9032         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
9033         debugable statement with empty_stmt_node. Fixes gcj/272
9034
9035 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9036
9037         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
9038         gcj/271.
9039
9040 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9041
9042         * jcf-write.c (push_long_const): Appropriately cast short negative
9043         constant to jword.
9044
9045 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9046
9047         * parse.y (verify_constructor_super): Use loop variable
9048         `m_arg_type' initialized with `mdecl_arg_type'.
9049
9050 2000-06-29  Tom Tromey  <tromey@cygnus.com>
9051
9052         * parse.y (resolve_field_access): Handle case where `type_found'
9053         is NULL.
9054
9055 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9056
9057         * expr.c (lookup_field): The same field can be found through two
9058         different interface. Don't declare it ambiguous in that case.
9059
9060 2000-06-27  Tom Tromey  <tromey@cygnus.com>
9061
9062         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
9063         follows \r, then unget it at a lower level.
9064
9065 2000-06-26  Tom Tromey  <tromey@cygnus.com>
9066
9067         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
9068         java_complete_tree.
9069
9070 2000-06-25  Tom Tromey  <tromey@cygnus.com>
9071
9072         * parse.y (for_statement): Wrap expression in a WFL if it is a
9073         constant.  For PR gcj/268.
9074
9075 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9076
9077         * parse.y (do_resolve_class): Minor optimiztion in the package
9078         list search. Removed unnecessary test and return statement.
9079         (valid_ref_assignconv_cast_p): Order of arguments to
9080         enclosing_context_p fixed.
9081
9082 2000-06-24  Tom Tromey  <tromey@cygnus.com>
9083
9084         * expr.c (lookup_field): Print error and return error_mark_node if
9085         field reference is ambiguous.
9086
9087         * parse.y (check_abstract_method_definitions): Also check if
9088         `other_method' is abstract.
9089
9090 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9091
9092         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
9093         classes.
9094         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
9095         (struct lang_type): New field `pic'.
9096         (CLASS_PRIVATE): New macro.
9097         * parse.y (check_inner_class_access): New function.
9098         (jdep_resolve_class): Call it.
9099
9100 2000-06-23  Tom Tromey  <tromey@cygnus.com>
9101
9102         * parse.y (patch_incomplete_class_ref): Initialize the returned
9103         class.  For PR gcj/260.
9104
9105 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9106
9107         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
9108
9109 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9110
9111         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9112         Java specific checks.
9113         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
9114         screened by DECL_P.
9115         * java-tree.def (CASE_EXPR): Marked 'e'.
9116         (DEFAULT_EXPR): Likewise.
9117         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
9118         screened by DECL_P.
9119         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9120         Java specific checks.
9121         (generate_bytecode_insns): Test try_block for BLOCK before using
9122         BLOCK_EXPR_BODY.
9123         * parse.y (build_wfl_wrap): Added `location' argument. Set
9124         EXPR_WFL_LINECOL accordingly.
9125         (dim_expr:): Wrap constants with WFLs.
9126         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
9127         (resolve_package): Check for `stmt' not being a BLOCK before
9128         building a debuggable statement with it.
9129         (make_qualified_primary): Added extra parameter to build_wfl_wrap
9130         invocation.
9131         (resolve_field_access): Make sure `decl' is a DECL before treating
9132         it as such.
9133         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
9134         IDENTIFIER_NODE before treating it as such.
9135         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
9136         treating it as such.
9137         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
9138         to be applied only on non array types.
9139
9140 2000-06-16  Per Bothner  <per@bothner.com>
9141
9142         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
9143         define in terms of DECL_RESULT, as that fails when --enable-checking.
9144
9145 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9146
9147         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
9148         types the same in comparison.
9149         (CHECK_OP): Add static prototype.
9150
9151 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
9152
9153         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
9154         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
9155         * parse.c: Rebuilt.
9156
9157 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9158
9159         * decl.c (create_primitive_vtable): Prototype.
9160
9161         * jcf-write.c (generate_bytecode_insns): Initialize variable
9162         `saved_context'.
9163
9164         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
9165
9166 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
9167
9168         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
9169         to track searched classes, and do not search the same class more than
9170         once. Call find_applicable_accessible_methods_list on immediate
9171         superclass, instead of search_applicable_method_list on all ancestors.
9172         Fix for PR gcj/238.
9173
9174 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
9175
9176         * parse.y (register_fields): Permit static fields in inner classes
9177         if they are final. Fix for PR gcj/255.
9178
9179 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9180
9181         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
9182         * parse.y (find_in_imports): Returned type changed to void,
9183         leading comment fixed.
9184         (register_package): New function.
9185         (qualify_and_find): Likewise.
9186         (package_declaration:): Use `register_package'.
9187         (single_type_import_declaration:): Removed local variable
9188         `node'. Added missing `;' for consistency.
9189         (type_import_on_demand_declaration:): Use `chainon' to link new
9190         entries.
9191         (lookup_field_wrapper): Lookup local variables defined in outer
9192         contexts first.
9193         (java_complete_class): Don't reverse the list of imported on demand.
9194         (do_resolve_class): Reorganized. Removed local variable
9195         `original_name'. Call `qualify_and_find' with the current package
9196         name, invoke `find_in_imports_on_demand' right after. Call
9197         `qualify_and_find' with the packages we've seen so far. Fixed
9198         operations numbering in comments.
9199         (java_expand_class): Don't reverse `package_list'.
9200         (find_most_specific_methods_list): New local variables `abstract'
9201         and `candidates'. Use them to pick the right method.
9202
9203 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
9204
9205         * parse.y (check_modifiers_consistency): Don't subtract out
9206         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
9207
9208 2000-06-04  Philipp Thomas  <pthomas@suse.de>
9209
9210         * Makefile.in (INTLLIBS): New.
9211         (LIBS): Add above.
9212         (DEPLIBS): Ditto.
9213
9214 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9215
9216         * class.c (get_dispatch_table): Build the vtable dummy entry list
9217         element with a null purpose. Fixed leading comment.
9218         (build_dtable_decl): Build an accurate dtable type when appropriate
9219         and use it.
9220
9221 2000-06-02  Richard Henderson  <rth@cygnus.com>
9222
9223         * lang.c (lang_get_alias_set): New.
9224
9225 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9226
9227         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
9228         before using it as the accessed field.
9229
9230 2000-05-31  Tom Tromey  <tromey@cygnus.com>
9231
9232         * java-tree.h (boolean_array_vtable, byte_array_vtable,
9233         char_array_vtable, short_array_vtable, int_array_vtable,
9234         long_array_vtable, float_array_vtable, double_array_vtable):
9235         Declare.
9236         * expr.c (get_primitive_array_vtable): New function.
9237         (create_primitive_vtable): New function.
9238         (java_lang_expand_expr): Enable code to statically generate
9239         arrays.
9240         * decl.c (init_decl_processing): Create primitive vtables.
9241         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
9242         short_array_vtable, int_array_vtable, long_array_vtable,
9243         float_array_vtable, double_array_vtable): Define.
9244
9245 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
9246
9247         * java/parse.y (find_applicable_accessible_methods_list):
9248         Don't add an uninitialized value to the list.
9249
9250 2000-05-25  Tom Tromey  <tromey@cygnus.com>
9251
9252         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
9253         when trying to see if field's class should be initialized.  Always
9254         initialize field's declaring class, not qualified class.
9255         For PR gcj/162.
9256
9257         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
9258         `wfl_operator', to maybe_build_primttype_type_ref.
9259         Fixes PR gcj/235.
9260
9261 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
9262
9263        * parse.y (patch_method_invocation): Don't try to lookup methods
9264        in primitive types.
9265
9266 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9267
9268         * parse.y (resolve_field_access): Call the appropriate <clinit>
9269         before accessing the length of a static array. Craft a decl for
9270         the field while its time. Fixes PR gcj/129.
9271
9272 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9273
9274         * parse.y (resolve_package): Correctly set `*next' (was off by
9275         one.)
9276         (resolve_qualified_expression_name): Fixed comment.
9277
9278 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9279
9280         * jcf-parse.c (jcf_parse_source): Reset current_class and
9281         current_function_decl to NULL before parsing a new file.
9282
9283 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9284
9285         * parse.y (block_end:): If the collected block doesn't feature a
9286         statement, insert an empty statement.
9287
9288 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9289
9290         * parse.y (maybe_yank_clinit): New function.
9291         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
9292         end of the list of methods belonging to a class.
9293         (java_complete_expand_method): Check whether <clinit> is really
9294         necessary and expand it accordingly.
9295
9296 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9297
9298         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
9299         processed by the method's switch statement.
9300
9301 2000-05-19  Tom Tromey  <tromey@cygnus.com>
9302
9303         * java-tree.h: Added init state enum.
9304         * decl.c (emit_init_test_initialization): Initialize class
9305         initialization check variable by looking at class' state.
9306
9307 2000-05-19  Tom Tromey  <tromey@cygnus.com>
9308
9309         * java-tree.h (build_instanceof): Declare.
9310         (build_get_class): Declare.
9311         * parse.y (patch_binop): Use build_instanceof.
9312         * expr.c (build_instanceof): New function.  If class is final,
9313         don't make a function call.
9314         (expand_java_INSTANCEOF): Use it.
9315         (build_get_class): New function.
9316
9317 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
9318
9319         * jcf-write.c (generate_classfile): Scan the source_file for
9320         slashes with the right pointer variable.
9321
9322 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
9323
9324         * lang.c (lang_decode_option): Update -Wunused flags by calling
9325         set_Wunused.
9326         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
9327
9328 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9329
9330         * check_init.c (check_init): Constify local char *.
9331         * class.c (push_class): Constify local char *.
9332         * java_tree.h: Update prototypes.
9333         * jcf-io.c (open_class): Constify filename parameter and
9334         return value.
9335         (find_class): Remove redundant string copy.  Cast return from
9336         open_class.
9337         * jcf-parse.c (read_class, parse_class_file, yyparse):
9338         Constify local char *.
9339         * jcf-write.c (generate_bytecode_insns, generate_classfile):
9340         Constify local char *.
9341         * jcf.h (JCF): Constify filename and classname.
9342         (JCF_FINISH): Cast args to FREE to char * when appropriate.
9343         * lang.c (init_parse): Constify parameter and return value.
9344         * lex.c (java_get_line_col): Constify filename parameter.
9345         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
9346         * parse.y (java_parser_context_suspend,
9347         issue_warning_error_from_context, safe_layout_class): Constify
9348         local char *.
9349         * parse.c: Regenerate.
9350
9351 2000-05-08  Tom Tromey  <tromey@cygnus.com>
9352
9353         * expr.c (build_jni_stub): Cache the result of
9354         _Jv_LookupJNIMethod.
9355
9356 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9357
9358         * decl.c (predef_filenames_size): Now 7.
9359         (predef_filenames): New seventh entry.
9360
9361 2000-05-04  Tom Tromey  <tromey@cygnus.com>
9362
9363         * boehm.c (mark_reference_fields): Don't mark RawData fields.
9364         Keep track of when we've seen a reference field after a
9365         non-reference field.
9366         (get_boehm_type_descriptor): Handle case where we see
9367         non-reference fields but no trailing reference field.
9368         * decl.c (rawdata_ptr_type_node): Define.
9369         (init_decl_processing): Initialize rawdata_ptr_type_node.
9370         * java-tree.h (rawdata_ptr_type_node): Declare.
9371
9372 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9373
9374         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
9375         specifiers in calls to fprintf.
9376
9377 2000-05-03  Andrew Haley  <aph@cygnus.com>
9378
9379         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
9380
9381         * javaop.h (WORD_TO_INT): New function.
9382         (IMMEDIATE_s4): Use WORD_TO_INT.
9383         * jcf.h (JPOOL_INT): Ditto.
9384
9385         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
9386         separator.
9387
9388 2000-04-19  Tom Tromey  <tromey@cygnus.com>
9389
9390         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
9391         on native function.
9392         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
9393         JNI methods.
9394         * expr.c (build_jni_stub): New function.
9395         * lang-specs.h: -fjni and -femit-class-file are incompatible.
9396         * parse.c: Rebuilt.
9397         * parse.y (java_complete_expand_methods): Expand a native method
9398         and call build_jni_stub if -fjni given.
9399         * lang-options.h: Document -fjni.
9400         * lang.c (flag_jni): New global.
9401         (lang_f_options): Added `jni' entry.
9402         * java-tree.h (soft_lookupjnimethod_node,
9403         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
9404         Declare.
9405         (flag_jni): Declare.
9406         (build_jni_stub): Declare.
9407         (struct lang_decl): Added `native' flag.
9408         (METHOD_NATIVE): Redefined to use `native' field of lang specific
9409         structure.
9410         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
9411         soft_jnipopsystemframe_node): New globals.
9412         (init_decl_processing): Set them.  _Jv_InitClass only takes one
9413         argument.
9414
9415         * java-tree.def: Put into `C' mode.
9416
9417 2000-04-27  Tom Tromey  <tromey@cygnus.com>
9418
9419         Fix for PR gcj/2:
9420         * expr.c (expand_invoke): Generate check to see if object pointer
9421         is null in nonvirtual invocation case.
9422         * java-tree.h (soft_nullpointer_node): Declare.
9423         * decl.c (soft_nullpointer_node): New global.
9424         (init_decl_processing): Initialize soft_nullpointer_node.
9425         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9426         or `private' methods.
9427         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9428
9429 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9430
9431         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9432         from <clinit>
9433
9434 2000-04-26  Tom Tromey  <tromey@cygnus.com>
9435
9436         * zextract.c (find_zip_file_start): New function.
9437         (read_zip_archive): Use it.
9438
9439 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9440
9441         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
9442
9443 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9444
9445         * class.c (common_enclosing_context_p): New function.
9446         * java-tree.h (common_enclosing_context_p): Added prototype.
9447         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
9448         classes sharing an outer context with the current instance.
9449         * parse.y (build_access_to_thisn): Fixed leading comment.
9450         (verify_constructor_super): New local `supper_inner'. Skip
9451         enclosing context argument in the case of inner class constructors.
9452         (patch_method_invocation): Insert proper context as second
9453         parameter to pure inner class constructor super invocations.
9454
9455 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9456
9457         * parse.y (end_class_declaration): Reset the interface number
9458         counter.
9459
9460 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9461
9462         * parse.y (source_start_java_method): Deleted unnecessary code.
9463         (patch_method_invocation): Fixed comment.
9464
9465 2000-04-24  Robert Lipe <robertlipe@usa.net>
9466
9467         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
9468
9469 2000-04-23  Tom Tromey  <tromey@cygnus.com>
9470
9471         * boehm.c (mark_reference_fields): Use int_byte_position.
9472
9473 2000-04-22  Tom Tromey  <tromey@cygnus.com>
9474
9475         * boehm.c (mark_reference_fields): Only call byte_position on
9476         non-static fields.
9477
9478 2000-04-22  Tom Tromey  <tromey@cygnus.com>
9479
9480         * boehm.c (mark_reference_fields): Added `last_view_index'
9481         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
9482
9483 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
9484
9485         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
9486         * parse.y (check_class_interface_creation): Fixed comments. Select
9487         permitted modifiers for (inner) interfaces. Changed error message
9488         to report rejected modifiers used with local classes.
9489
9490 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9491
9492         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
9493         of directly inherited type considered in scope.
9494         * parse.y (do_resolve_class): Search inherited classes for inner
9495         classes.
9496
9497 2000-04-20  Tom Tromey  <tromey@cygnus.com>
9498
9499         * parse.y (not_accessible_p): Use member's class, not current
9500         class, when doing inheritance check for protected reference.
9501         Fixes PR gcj/124.
9502
9503 2000-04-20  Jason Schroeder  <shrode@subnature.com>
9504
9505         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
9506
9507 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9508
9509         * parse.y (lookup_field_wrapper): Search for final local aliases.
9510         (resolve_expression_name): Let lookup_field_wrapper search for
9511         final local aliases. Force the value of `name' if one is found.
9512         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
9513         an expression name. Fixed comments.
9514
9515 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9516
9517         * parse.y (yyerror): `msg' can be null, don't use it in that case.
9518
9519 2000-04-19  Tom Tromey  <tromey@cygnus.com>
9520
9521         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
9522
9523 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9524
9525         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
9526
9527 2000-04-18  Tom Tromey  <tromey@cygnus.com>
9528
9529         PR gcj/211:
9530         * gjavah.c (utf8_cmp): Changed return value.
9531         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
9532         result.
9533         (cxx_keywords): New global.
9534         (get_field_name): Handle new result of cxx_keyword_subst.
9535         (print_method_info): Likewise.
9536
9537 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
9538
9539         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
9540         with a newline, for CNI.
9541         (print_stub_or_jni): Print a space or newline before method name for
9542         CNI as well as JNI.
9543         (print_cxx_classname): Don't write leading "::" in CNI stub method.
9544         (process_file): Include gcj/cni.h if generating CNI stubs.
9545
9546 2000-04-16  Tom Tromey  <tromey@cygnus.com>
9547
9548         * gjavah.c (decompile_method): Use print_field_name.
9549         Fixes PR gcj/205.
9550
9551 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9552
9553         * parse.y (java_expand_classes): Reverse the package list once.
9554         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
9555         reduction.
9556         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
9557         the `==' and `!=' operators.
9558
9559 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9560
9561         * jcf-write.c (generate_bytecode_insns): At invocation time,
9562         always relate an interface method to the type of its selector.
9563
9564 2000-04-05  Tom Tromey  <tromey@cygnus.com>
9565
9566         Fix for PR gcj/2:
9567         * expr.c (expand_invoke): Generate check to see if object pointer
9568         is null in nonvirtual invocation case.
9569         * java-tree.h (soft_nullpointer_node): Declare.
9570         * decl.c (soft_nullpointer_node): New global.
9571         (init_decl_processing): Initialize soft_nullpointer_node.
9572         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9573         or `private' methods.
9574         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9575
9576 2000-04-05  Tom Tromey  <tromey@cygnus.com>
9577
9578         Fix for PR gcj/140:
9579         * parse.y (check_final_assignment): Recognize assignments to the
9580         `length' field of an array when generating class files.
9581
9582 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9583
9584         * class.c (decl_hash): Prototype removed.
9585         (decl_compare): Likewise.
9586
9587 2000-04-05  Tom Tromey  <tromey@cygnus.com>
9588
9589         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
9590         * parse.y (check_modifiers_consistency): Check for final/volatile
9591         clash.  Fixes PR gcj/164.
9592
9593 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9594
9595         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
9596         made global.
9597         (java_hash_compare_tree_node): Renamed from `decl_compare, made
9598         global.
9599         (add_method_1): Use `java_hash_hash_tree_node' and
9600         `java_hash_compare_tree_node'.
9601         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
9602         (java_hash_compare_tree_node): Likewise.
9603         * parse.y (find_applicable_accessible_methods_list): Create,
9604         delete and use a hash table to remember already searched interfaces.
9605
9606 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
9607
9608         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
9609         with latest entry.
9610
9611 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9612
9613         * boehm.c (mark_reference_fields, set_bit): Prototype.
9614         (set_bit): Un-ANSI-fy definition.
9615
9616         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
9617         Prototype.
9618
9619         * decl.c (emit_init_test_initialization): Likewise.
9620
9621         * gjavah.c (jni_print_char): Likewise.
9622
9623         * parse.y (create_new_parser_context): Likewise.
9624
9625 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9626
9627         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
9628         patch missing hunk. Fixed indentation.
9629
9630 2000-03-30  Tom Tromey  <tromey@cygnus.com>
9631
9632         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
9633         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
9634
9635 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9636
9637         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
9638         when negative *before* using it as an array index.
9639         * ChangeLog: Fixed typo.
9640
9641 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9642
9643         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
9644         to 0 when it reaches -1.
9645
9646 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9647
9648         * jcf-parse.c (get_constant): Properly cast `num' during the
9649         invocation of `add_double'.
9650         * jcf-write.c (push_long_const): Properly cast `lo' before
9651         comparing it to short bounds.
9652         * parse-scan.y (interface_declaration:): Rule re-arrange so that
9653         `interface_body:' is reduced after the current interface is
9654         pushed.
9655
9656 2000-03-26  Tom Tromey  <tromey@cygnus.com>
9657
9658         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
9659         Java-specific `-f' option.
9660
9661 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9662
9663         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
9664         Adjust order of making types.
9665         Make bitsize_*_node values.
9666
9667 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9668
9669         * class.c (make_field_value): Use byte_position.
9670         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
9671         (java_array_data_offset): Likewise.
9672         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
9673         bzero call.
9674
9675 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9676
9677         * parse.y (check_abstract_method_definitions): New local
9678         `end_type_reached'. Make sure we also consider `end_type'.
9679         (java_check_abstract_method_definitions): Make sure we eventually
9680         consider `java.lang.Object'.
9681         (maybe_use_access_method): Don't use access method if not in the
9682         context of a pure inner class or if the method's context is right.
9683         (find_applicable_accessible_methods_list): New static flag
9684         `object_done'. Don't search abstract classes as interfaces. Fixed
9685         indentation. Fixed the `java.lang.Object' only search. Search
9686         class interface(s) first, then fully search enclosing contexts.
9687         (find_most_specific_methods_list): Pick the closest candidate when
9688         they're all abstract.
9689
9690 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9691
9692         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
9693         properly initialize `finished_label'. Don't emit gotos for empty
9694         try statements.
9695
9696 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9697
9698         * except.c (emit_handlers): Clear catch_clauses_last.
9699
9700 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9701
9702         * parse.y (check_method_types_complete): New function.
9703         (create_class): Reset anonymous class counter only when seeing an
9704         non inner classe.
9705         (java_complete_class): JDEP_METHOD: Don't recompute signature
9706         if incomplete.
9707
9708 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9709
9710         * class.c (build_static_ref): Fixed indentation in comment.
9711         * java-tree.def (TRY_EXPR): Fixed typo in name.
9712         (CLASS_LITERAL): Likewise.
9713         * java-tree.h: (TYPE_DOT_CLASS): New macro.
9714         (struct lang_type): New field `dot_class'.
9715         * jcf-write.c (generate_bytecode_insns): Fixed error message.
9716         (generate_classfile): Method `class$' is synthetic.
9717         * parse.y (build_do_class_method): New function.
9718         (build_dot_class_method_invocation): Likewise.
9719         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
9720         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
9721         (qualify_ambiguous_name): Likewise.
9722         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
9723         (build_try_statement): Fixed leading comment.
9724
9725 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9726
9727         * class.c (make_field_value): Properly handle sizes.
9728         (get_dispatch_vector): Use tree_low_cst and host_integerp.
9729         (layout_class_method): Count using trees.
9730         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
9731         * expr.c (java_array_data_offset): Use int_bit_position.
9732         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
9733         (build_invokevirtual): Use tree_low_cst and do computations with trees.
9734
9735 2000-03-16  Tom Tromey  <tromey@cygnus.com>
9736
9737         * lang.c (flag_hash_synchronization): New global.
9738         (lang_f_options): Added `hash-synchronization'.
9739         * lang-options.h: Mention -fhash-synchronization.
9740         * java-tree.h (flag_hash_synchronization): Declare.
9741         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
9742         hash table synchronization is disabled.
9743         * decl.c (init_decl_processing): Only push `sync_info' value when
9744         hash table synchronization is disabled.
9745         * class.c (make_class_data): Only push `sync_info' field when hash
9746         table synchronization is disabled.  Removed dead code.
9747
9748 2000-03-16  Tom Tromey  <tromey@cygnus.com>
9749
9750         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
9751
9752 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9753
9754         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
9755         classes.
9756         * parse.y (patch_method_invocation): Handle anonymous classes
9757         creation in static context.
9758
9759 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9760
9761         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
9762         * parse.y (resolve_qualified_expression_name): Use it.
9763         (patch_method_invocation): Likewise.
9764
9765 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9766
9767         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
9768         depending on the type of dependency which dictates what the
9769         current class is.
9770         (unresolved_type_p): Resolved types limited to the current class.
9771
9772 2000-03-15  Tom Tromey  <tromey@cygnus.com>
9773
9774         * decl.c (init_decl_processing): Set type of `sync_info' to be
9775         pointer to Object.
9776
9777         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
9778         Correctly compute bit number for current slot.  Zero `high' and
9779         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
9780         mark_reference_fields.
9781         (mark_reference_fields): New function.
9782
9783 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9784
9785         * parse.y (register_incomplete_type): Fixed initialization of
9786         JDEP_ENCLOSING.
9787
9788 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9789
9790         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
9791         static globals.
9792         (push_class_context, pop_class_context): New function.
9793         (class_body:): Call pop_class_context.
9794         (interface_body:): Likewise.
9795         (INNER_QUALIFIER): New macro.
9796         (report_class_declaration): Changed output format and use
9797         INNER_QUALIFIER. Call push_class_context.
9798
9799 2000-02-14  Andrew Haley  <aph@cygnus.com>
9800
9801         * check-init.c (check_init): Add new cases for unary and binary
9802         tree nodes.
9803
9804 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9805
9806         * parse.y (resolve_package): Set `next' once a type name has been
9807         progressively discovered.
9808         (resolve_qualified_expression_name): Propagate resolution only if
9809         there are remaining qualifiers. Take into account `q' might have
9810         been cleared after re-qualification.
9811         * parse.y (patch_method_invocation): New local `resolved'.
9812         Section dealing with qualified expression rewritten to use
9813         resolve_field_access.
9814
9815 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9816
9817         * parse.h (PUSH_CPC): Fixed indentation.
9818         (DEBUG_CPC): New macro.
9819         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
9820         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
9821         * parse.y (class_body_declaration:): Use
9822         SET_CPC_INSTANCE_INITIALIZER_STMT.
9823         (method_declaration:): Check for null current_function_decl.
9824         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
9825         (java_parser_context_pop_initialized_field): Better handling of
9826         empty lists.
9827         (maybe_make_nested_class_name): Mark nested class name as
9828         qualified when necessary.
9829         (end_class_declaration): Don't call java_parse_context_resume when
9830         one or more error occurred.
9831         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
9832         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
9833         SET_CPC_INITIALIZER_STMT.
9834         (method_header): Check for inner classes declaring static methods.
9835         (resolve_qualified_expression_name): Handle situation where `this'
9836         is implied.
9837
9838 2000-03-13  Hans Boehm <boehm@acm.org>
9839
9840         * typeck.c (build_prim_array_type): Correctly set the high word too.
9841
9842 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9843
9844         * parse.y (java_complete_expand_methods): Leave <clinit> out of
9845         ordinary methods.
9846         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
9847         list of methods for interfaces.
9848
9849 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9850
9851         * parse.y (qualify_ambiguous_name): Properly handle expressions
9852         using `null'.
9853
9854 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9855
9856         * parse.y (check_final_assignment): Extended to process
9857         COMPOUND_EXPR.
9858         (patch_assignment): Have check_final_assignment called only once.
9859
9860 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9861
9862         * java-tree.h (IS_INIT_CHECKED): New flag.
9863         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
9864         * parse.y (patch_string): Call force_evaluation_order on the
9865         completed string concatenation tree.
9866         * expr.c (force_evaluation_order): Call force_evaluation_order on
9867         function's arguments too.
9868
9869 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9870
9871         * decl.c (emit_init_test_initialization): Mark KEY as unused.
9872         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
9873         (build_anewarray): Likewise.
9874         * parse.y (patch_newarray): Likewise.
9875         * parse.c: Regenerated.
9876
9877 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
9878
9879         * decl.c (init_decl_processing): Added new class fields `depth',
9880         `ancestors', and `idt' to class_type_node. Use
9881         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
9882         * class.c (make_class_data): Push initial values for new fields.
9883         * java-tree.h: Updated prototype for `build_invokeinterface'.
9884         * expr.c (build_invokeinterface): Changed parameters to accept
9885         `method' tree. Calculate index of `method' in its declaring
9886         interface. Build call to _Jv_LookupInterfaceMethodIdx.
9887         (expand_invoke): Call `build_invokeinterface' with new parameters.
9888         * parse.y (patch_invoke): Call `build_invokeinterface' with new
9889         parameters.
9890
9891 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
9892
9893         * typeck.c (lookup_do): Search superinterfaces first
9894         when looking up an interface method. From Godmar Back
9895         <gback@cs.utah.edu>
9896
9897 2000-03-06  Tom Tromey  <tromey@cygnus.com>
9898
9899         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
9900
9901 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9902
9903         * java-tree.h (lookup_argument_method2): Declared.
9904         (safe_layout_class): Prototype moved from parse.h.
9905         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
9906         * parse.y (java_check_regular_methods): Local `super_class' gone.
9907         Call lookup_argument_method2 instead of lookup_argument_method.
9908         Perform modifier match for methods found declared in implemented
9909         interfaces. Fixed indentation problem. Overriding/hiding error
9910         report to take place only for methods found in classes.
9911         * typeck.c (lookup_argument_method): Changed leading
9912         comment. Re-written by calling lookup_do.
9913         (lookup_argument_method2): New function.
9914         (lookup_java_method): Re-written by calling lookup_do.
9915         (lookup_do): New function.
9916
9917 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9918
9919         * check-init.c (check_init): Removed dead code. Handle (blank)
9920         final variables.
9921         * parse.y (declare_local_variables): New local `final_p', set it
9922         and use it to initialize LOCAL_FINAL.
9923         (check_final_assignment): Only check FIELD_DECLs.
9924
9925 2000-02-17  Tom Tromey  <tromey@cygnus.com>
9926
9927         * Makefile.in (JAVA_OBJS): Added boehm.o.
9928         (boehm.o): New target.
9929         * Make-lang.in (JAVA_SRCS): Added boehm.c.
9930         * java-tree.h (flag_use_boehm_gc): Declare.
9931         (get_boehm_type_descriptor): Declare.
9932         * lang.c (lang_f_options): Added `use-boehm-gc'.
9933         (flag_use_boehm_gc): New global.
9934         * lang-options.h: Added -fuse-boehm-gc.
9935         * boehm.c: New file.
9936         * class.c (get_dispatch_table): If class uses a Boehm type
9937         descriptor, put it in the vtable.
9938         (make_class_data): Removed dead code.
9939
9940 2000-03-03  Per Bothner  <per@bothner.com>
9941
9942         * decl.c (init_decl_processing):  Initialize sizetype properly.
9943
9944 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9945
9946         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
9947         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
9948         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9949         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
9950         (jcf_parse): New local `current'. Load innerclasses seen in outer
9951         context being processed.
9952         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9953         * jcf-write.c (append_innerclasses_attribute): New function.
9954         (append_innerclasses_attribute_entry): Likewise.
9955         (get_access_flags): Handle static classes. Set anonymous and local
9956         classes to be private.
9957         (generate_classfile): Attribute count adjusted. Call
9958         append_innerclasses_attribute.
9959         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
9960         PURE_INNER_CLASS_TYPE_P.
9961         * parse.y (parser_qualified_classname): New parameter `is_static',
9962         produce non qualified name accordingly.
9963         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
9964         (create_interface): Added argument to parser_qualified_classname.
9965         (create_class): Added argument to parser_qualified_classname. Setup
9966         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
9967         (add_inner_class_fields): Fixed indentation.
9968         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
9969         (method_declarator): Fixed typo in comment.
9970         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
9971         (build_current_thisn): Likewise.
9972         (patch_method_invocation): Likewise.
9973
9974 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9975
9976         * decl.c (current_function_decl): Move to toplev.c.
9977
9978 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9979
9980         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
9981         (DECL_BIT_INDEX): Use underlying representation.
9982         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
9983
9984 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9985
9986         * expr.c (build_java_ret): Pass proper type to size_binop.
9987
9988 2000-02-25  Anthony Green  <green@cygnus.com>
9989
9990         * expr.c (build_class_init): Mark the decl to be ignored by
9991         check_init.
9992         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
9993         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
9994         * class.c (init_test_hash_newfunc): New function.
9995         (decl_hash): New function.
9996         (decl_compare): New function.
9997         * decl.c (emit_init_test_initialization): New function.
9998         (complete_start_java_method): Traverse the init test hashtable,
9999         calling emit_init_test_initialization.
10000         (always_initialize_class_p): Define.
10001         * expr.c (build_class_init): Use initialization tests when
10002         emitting class initialization code.
10003         (always_initialize_class_p): Declare.
10004         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
10005         1.
10006         * java-tree.h: Include hash.h.
10007         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
10008         (struct lang_decl): Add init_test_table field.
10009         (init_test_hash_entry): Define.
10010
10011 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10012
10013         * gjavah.c (main): Avoid using `argi' to report unimplemented
10014         options.
10015
10016 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10017
10018         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10019         initialize locals to avoid warnings. Local `exception_type' moved
10020         into if statement.
10021
10022 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10023
10024         * parse.y (resolve_expression_name): Use `orig' as a second
10025         argument to resolve_field_access.
10026         (resolve_field_access): Removed unnecessary code when dealing with
10027         static fields.
10028
10029 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10030
10031         * class.c (push_super_field): Don't push the field twice.
10032         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
10033         * parse.h (java_reorder_fields): Prototyped.
10034         * parse.y (java_reorder_fields): New function.
10035         (java_layout_class): Simplified not to worry about re-ordering.
10036
10037 2000-02-23  Tom Tromey  <tromey@cygnus.com>
10038
10039         * gjavah.c (print_name): In JNI case, correctly quote string.
10040         (print_method_info): Don't handle overrides in JNI mode.
10041
10042 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10043
10044         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
10045         value type set to `boolean_type_node'.
10046
10047 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
10048
10049         * jcf-dump.c (main): Test for correct condition after
10050         output file creation.
10051
10052 2000-02-19  Anthony Green  <green@cygnus.com>
10053
10054         * jcf-depend.c (add_entry): Fix test for first list entry.
10055
10056 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10057
10058         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
10059         * constants.c (build_constants_constructor): Likewise.
10060
10061 2000-02-19  Anthony Green  <green@cygnus.com>
10062
10063         * jcf-depend.c (add_entry): Add entries to the end of the list.
10064
10065 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
10066
10067         * decl.c (INT_TYPE_SIZE): Define if necessary.
10068         (expand_java_return): Handle the case of a native integer smaller
10069         than a JVM integer.
10070
10071 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10072
10073         * gjavah.c (help): Use GCCBUGURL.
10074         * jv-scan.c (help): Likewise.
10075         * jcf-dump.c (help): Likewise.
10076
10077 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10078
10079         * jcf-write.c (generate_bytecode_insns): Don't generate empty
10080         `finally' clauses.
10081
10082 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10083
10084         * jcf-parse.c (load_class): Call `fatal' if no file containing
10085         the target class are found.
10086
10087 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
10088
10089         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
10090         lex.c, lex.h, and PARSE_H to...
10091         (parse.o, parse-scan.o): ...here, respectively.
10092
10093         * lex.c: Split out code that may trigger SIGFPE from yylex()
10094         to its own function.
10095         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
10096
10097 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10098
10099         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
10100
10101 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10102
10103         * parse.y (outer_field_access_p): Stop in time when outer contexts
10104         are exhausted.
10105         (resolve_qualified_expression_name): Properly qualify *everything*
10106         after a package.type to be resoled as expression names.
10107         (find_applicable_accessible_methods_list): Save/restore `class' to
10108         isolate it from a possible outer context search.
10109
10110 2000-02-15  Tom Tromey  <tromey@cygnus.com>
10111
10112         * gjavah.c (jni_print_char): New function.
10113         (print_full_cxx_name): Use it.
10114         (decode_signature_piece): Likewise.
10115         (print_cxx_classname): Likewise.
10116
10117 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10118
10119         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
10120         version.o.
10121         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
10122
10123         * gjavah.c: Include version.h.
10124
10125         * jcf-dump.c: Likewise.
10126
10127         * jv-scan.c: Likewise.
10128
10129 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10130
10131         * parse.y (outer_field_access_fix): First parameter now a tree
10132         node. Check for assignment to final. First argument to
10133         build_outer_field_access_fix modified to accommodate prototype.
10134         (build_outer_field_access): Don't check for assignment to final
10135         here.
10136         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
10137         possibly returned by outer_field_access_fix. Changed
10138         outer_field_access_fix's first argument.
10139         (check_final_assignment): $finit$'s context is OK.
10140         (patch_unaryop): Use node instead of its line/column value when
10141         calling outer_field_access_fix.
10142
10143 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10144
10145         * parse.y (interface_declaration:): No longer tagged
10146         <node>. Re-installed default action.
10147         (class_member_declaration:): Handle inner interfaces.
10148         (interface_member_declaration): Handle inner interfaces and
10149         classes.
10150         (create_interface): Push error if one seen. Suspend parsing
10151         context when processing an inner interface.
10152         (register_fields): Inner class static field limitations not to
10153         apply to inner interfaces.
10154
10155 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10156
10157         * jcf-parse.c (load_class): Update `java_error_count' when a
10158         class' file can't be found.
10159         (parse.y): Avoid (byte)code generation when errors seen.
10160
10161 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10162
10163         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
10164         decodes a valid node.
10165         (patch_binop): Handle TRUNC_DIV_EXPR.
10166
10167 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10168
10169         * parse.y (resolve_package): New local `acc'. Try to progressively
10170         build and guess a package and type name.
10171
10172 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10173
10174         * parse.y (find_applicable_accessible_methods_list): Load and
10175         layout the search class if necessary.
10176         (java_complete_tree): Keep to original type of the folded initial
10177         value.
10178
10179 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10180
10181         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
10182         Generate error message if circularity is detected. New static
10183         local `list'.
10184         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
10185         * jcf-write.c (generate_bytecode_insns): Very simply handle
10186         SAVE_EXPR.
10187         * parse.y (java_check_circular_reference): Use
10188         `cyclic_inheritance_report' during report, if necessary.
10189         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
10190         walking NEW_ARRAY_INIT twice.
10191
10192 2000-02-09  Tom Tromey  <tromey@cygnus.com>
10193
10194         * parse.y (check_class_interface_creation): Allow inner classes to
10195         be `private' or `protected', check modifiers' consistency. Prevent
10196         block local classes from bearing any modifiers.
10197
10198 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10199
10200         * except.c (check_start_handlers): Re-add prototype lost in last
10201         patch.
10202         (maybe_start_try): Remove excess argument to `check_start_handlers'.
10203
10204 2000-02-09  Andrew Haley  <aph@cygnus.com>
10205
10206         * decl.c (clear_binding_level): Remove excess initializer.
10207         (maybe_poplevels): Remove unused variable.
10208         (force_poplevels): Ditto.
10209         (struct binding_level): Add comment.
10210
10211 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10212
10213         * jcf-write.c (generate_classfile): Don't consider
10214         pre-initialization with reference value (use <clinit> instead.)
10215         * parse.y (java_fix_constructors): No generated constructor for
10216         interfaces.
10217         (build_outer_field_access): Removed debug message.
10218         (outer_field_expanded_access_p): Adapted to bytecode generation.
10219         (build_outer_field_access_method): Use fix_method_argument_names.
10220         (build_outer_method_access_method): Fixed indentation. Added
10221         comment. Handle access method generation for static and also void
10222         methods.
10223         (build_access_to_thisn): Inserted debug message.
10224         (maybe_build_thisn_access_method): Use fix_method_argument_names.
10225         (resolve_qualified_expression_name): Fixed comment.
10226         (not_accessible_p): Adapted to bytecode generation. Added comment.
10227         (patch_method_invocation): Added comment.
10228         (maybe_use_access_method): Fixed leading comment. Handle static
10229         methods.
10230         (java_complete_lhs): Don't shortcut handling of initialized upon
10231         declaration String type static fields when generating bytecode.
10232         (patch_unaryop): Handle outer field access when generating
10233         bytecode.
10234
10235 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10236
10237         * java-tree.h (FIELD_THISN): New macro.
10238         * jcf-write.c (append_synthetic_attribute): New function.
10239         (generate_classfile): Set "Synthetic" attribute on this$<n>,
10240         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
10241         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
10242         this$<n> fields.
10243         (build_outer_field_access): Turned on access functions usage and
10244         generation when compiling to bytecode.
10245         (maybe_use_access_method): Likewise.
10246
10247 2000-01-25  Andrew Haley  <aph@cygnus.com>
10248
10249         * java-except.h (struct eh_range): Add `expanded' field.
10250         (maybe_start_try): Add end_pc arg.
10251         (maybe_end_try): Ditto.
10252         * java-tree.h (force_poplevels): new function.
10253         * expr.c (expand_byte_code): Don't call maybe_start_try or
10254         maybe_end_try.
10255         * except.c (add_handler): Reset expanded.
10256         (expand_start_java_handler): Set expanded.
10257         (check_start_handlers): Don't expand a start handler that's
10258         already been expanded.
10259         (maybe_start_try): Add end_pc arg.  Only expand a handler which
10260         ends after end_pc.
10261         (expand_end_java_handler): call force_poplevels.
10262         (force_poplevels): new function.
10263         * decl.c (binding_level): Add start_pc of binding level.
10264         (maybe_pushlevels): Call maybe_start_try when pushing binding
10265         levels.
10266         (maybe_poplevels): Call maybe_end_try when popping binding levels.
10267         (LARGEST_PC): Define.
10268         (clear_binding_level): Use LARGEST_PC.
10269
10270         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
10271         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
10272         (binding_depth, is_class_level, current_pc): new variables.
10273         (struct binding_level): ditto.
10274         (indent): new function.
10275         (push_jvm_slot): add debugging info.
10276         (maybe_pushlevels): ditto.
10277         (maybe_poplevels): ditto.
10278         (pushlevel): ditto.
10279         (poplevel): ditto.
10280         (start_java_method): ditto.
10281         (give_name_to_locals): comment only.
10282         * except.c (binding_depth, is_class_level, current_pc):
10283         new variables.
10284         (expand_start_java_handler): add debugging info.
10285         (expand_end_java_handler): ditto.
10286
10287 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10288
10289         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
10290         (print_name_for_stub_or_jni, process_file): Constify a char*.
10291
10292 2000-02-03  Tom Tromey  <tromey@cygnus.com>
10293
10294         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
10295
10296 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
10297
10298         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
10299         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
10300         defined to be 1.
10301
10302 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10303
10304         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
10305         * java-tree.h (TYPE_II_STMT_LIST): New macro.
10306         (struct lang_type): New field `ii_block'.
10307         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
10308         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
10309         * parse.h (struct parser_ctxt): New field `instance_initializers'.
10310         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
10311         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
10312         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
10313         macros.
10314         * parse.y (add_instance_initializer): New function.
10315         (in_instance_initializer): New static global.
10316         (class_body_declaration:): Link instance initializer block.
10317         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
10318         (array_creation_expression:): Remove unused local.
10319         (java_parser_context_push_initialized_field): Fixed leading
10320         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
10321         CPC_INSTANCE_INITIALIZER_LIST.
10322         (java_parser_context_pop_initialized_field): Likewise.
10323         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
10324         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
10325         CPC_INITIALIZER_STMT.
10326         (fix_constructors): New local `class_type'. Use it. Call
10327         add_instance_initializer.
10328         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
10329         (patch_return): Forbid return in instance initializers.
10330         (patch_throw_statement): Enforce exception handling in the context
10331         of instance initializers.
10332
10333 2000-02-03  Tom Tromey  <tromey@cygnus.com>
10334
10335         * Make-lang.in (java.mostlyclean): Remove executables in
10336         `mostlyclean'.
10337
10338 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
10339
10340         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
10341         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
10342         (java_float_finite): Convert to use union Word from javaop.h.
10343         (java_double_finite): Convert to use union DWord from javaop.h.
10344
10345 2000-02-02  Tom Tromey  <tromey@cygnus.com>
10346
10347         * gjavah.c (options): Added `jni' entry.
10348         (help): Document -jni.
10349         (flag_jni): New global.
10350         (process_file): Handle JNI output.  Don't print text from
10351         -prepend, -add, etc, when generating stubs.  Only remove `.class'
10352         suffix if it actually exists.
10353         (main): Create a `.c' file when run with `--jni --stubs'.  Create
10354         correct output file name with `--jni'.
10355         (print_include): Mangle header name differently in JNI case.
10356         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
10357         method list.
10358         (print_method_info): Handle JNI case.  Put signature info into
10359         method name.  Handle case when STREAM is NULL.
10360         (print_name_for_stub_or_jni): New function.
10361         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
10362         (print_cxx_classname): Handle JNI.
10363         (print_full_cxx_name): Likewise.
10364         (decode_signature_piece): Likewise.
10365         (overloaded_jni_method_exists_p): New function.
10366         (struct method_name): Added `signature' and `sig_length' fields.
10367         (HANDLE_END_FIELD): Do nothing in JNI mode.
10368
10369 2000-02-02  Tom Tromey  <tromey@cygnus.com>
10370
10371         * jv-scan.c: Include version.c, <getopt.h>.
10372         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
10373         (options): New array.
10374         (usage): New function.
10375         (version): New function.
10376         (main): Use getopt_long to parse command line.
10377         * jcf-dump.c: Include version.c, <getopt.h>.
10378         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
10379         OPT_JAVAP): New macros.
10380         (options): New array.
10381         (usage): Return `void'.  Changed message.
10382         (help): New function.
10383         (version): New function.
10384         (main): Use getopt_long_only to parse command line.
10385         * gjavah.c: Include <getopt.h>.
10386         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
10387         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
10388         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
10389         (options): New array.
10390         (java_no_argument): Removed.
10391         (help): Updated with missing options.
10392         (main): Use getopt_long_only to parse command line.
10393         (usage): Changed message.
10394
10395 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10396
10397         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
10398         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
10399         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
10400         * parse.y (array_creation_expression:): Handle anonymous arrays.
10401         (build_array_from_name): Don't set `ret_name' if null.
10402         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
10403         (qualify_ambiguous_name): Likewise.
10404         (java_complete_expand_class): Likewise.
10405
10406 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10407
10408         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
10409         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
10410         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
10411         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
10412         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
10413         AIPL_FUNCTION_COMPLETED_INVOCATION.
10414         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
10415         AIPL_FUNCTION_INVOCATION_READY.
10416         (AIPL_FUNCTION_DECLARATION): New enum entry.
10417         * parse.y (reorder_static_initialized): New function.
10418         (java_parser_context_pop_initialized_field): Use it.
10419         (add_inner_class_fields): Use
10420         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
10421         augmented. Install marker after last alias initializer, if any.
10422         (generate_finit): Fixed typo. Don't try to retain only the used
10423         fields.
10424         (method_header): Compute and set DECL_FUNCTION_NAP.
10425         (method_declarator): Fixed comment. Insert alias initializer in
10426         parameter list.
10427         (build_alias_initializer_parameter_list): Fixed leading
10428         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
10429         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
10430         (java_complete_expand_class): Code to retain only used aliases
10431         removed.
10432         (java_complete_expand_methods): New local `first_decl'. Generate
10433         $finit$ first, then expand the constructors, regular methods and
10434         <clinit>.
10435         (java_complete_expand_method): Don't report error on missing
10436         return statement if previously detected bogus.
10437         (fix_constructors): Don't patch constructor parameters list.
10438         (patch_method_invocation): Use new AIPL enum values. Reverse
10439         alias initializer list for anonymous classes.
10440
10441 2000-01-30  Anthony Green  <green@redhat.com>
10442
10443         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
10444         determine how many stack slots to pop.
10445
10446 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10447
10448         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
10449         error handling/recovery.
10450         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
10451
10452 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10453
10454         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
10455         FIELD_LOCAL_ALIAS_USED): New macros.
10456         (DECL_FUNCTION_NAP): New macro.
10457         (struct lang_decl): New field `nap'.
10458         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
10459         (struct lang_type): New fields `finit_stmt_list' and
10460         `clinit_stmt_list'.
10461         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
10462         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
10463         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
10464         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
10465         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
10466         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
10467         (BUILD_THROW): Macro line separator re-indented.
10468         * parse.y (end_class_declaration): New function.
10469         (maybe_generate_pre_expand_clinit): New name for
10470         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
10471         pre-expand static fields.
10472         (maybe_generate_clinit): Function deleted.
10473         (check_for_static_method_reference): Prototype's parameter list
10474         indented.
10475         (generate_finit): New name for maybe_generate_finit. Changed
10476         leading comment. Function rewritten to use
10477         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
10478         (build_alias_initializer_parameter_list): New function.
10479         (java_parser_context_pop_initialized_field): Likewise.
10480         (add_inner_class_fields): Likewise.
10481         (type_declaration:): Call end_class_declaration.
10482         (class_member_declaration:): Likewise.
10483         (formal_parameter_list:): Fixed typos.
10484         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
10485         element. Improved error handling.
10486         (block_statement:): Call end_class_declaration.
10487         (anonymous_class_creation:): Likewise.
10488         (create_anonymous_class): Fixed comments.
10489         (create_class): Call add_inner_class_fields.
10490         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
10491         (method_header): Use MARK_FINAL_PARMS.
10492         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
10493         (method_declarator): Propagate final argument flag.
10494         (craft_constructor): New local `artificial'. Call
10495         build_alias_initializer_parameter_list. Use
10496         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
10497         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
10498         necessary.
10499         (complete_expand_class): Get rid of unused outer context local
10500         alias fields.
10501         (java_complete_expand_methods): Fixed leading
10502         comment. Generate/pre-expand <clinit> first. Changed method
10503         expansion order to regular, $finit$, constructors, <clinit>.
10504         (java_complete_expand_method): Set current_function_decl.
10505         (fix_constructors): Fix constructor parameter list to account for
10506         outer context local alias initializers.
10507         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
10508         (resolve_expression_name): Lookup outer context local aliases. New
10509         local `access', use it.
10510         (patch_method_invocation): Patch inner class ctor invocation with
10511         outer context local aliases initialization values. $finit$
10512         invocation patching now includes things generated with
10513         build_alias_initializer_parameter_list.
10514         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
10515         (build_super_invocation): Likewise.
10516         (patch_assignment): Changed comment.
10517
10518 2000-01-27  Andrew Haley  <aph@cygnus.com>
10519
10520         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
10521         (emit_if): Ditto.
10522         (emit_jsr): Ditto.
10523
10524 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10525
10526         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
10527         concatenation.
10528         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
10529
10530         * parse.y (register_fields): Don't pass a format specifier to
10531         OBSOLETE_MODIFIER_WARNING.
10532         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
10533         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
10534         specifier.
10535         (check_modifiers): Change function into a macro.
10536         (check_class_interface_creation): Pass a literal format string.
10537
10538 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10539
10540         * buffer.h: PROTO -> PARAMS.
10541         * check-init.c: Likewise.
10542         * class.c: Likewise.
10543         * constants.c: Likewise.
10544         * convert.h: Likewise.
10545         * decl.c: Likewise.
10546         * except.c: Likewise.
10547         * expr.c: Likewise.
10548         * gjavah.c: Likewise.
10549         * java-except.h: Likewise.
10550         * java-tree.h: Likewise.
10551         * jcf-depend.c: Likewise.
10552         * jcf-dump.c: Likewise.
10553         * jcf-parse.c: Likewise.
10554         * jcf-path.c: Likewise.
10555         * jcf-reader.c: Likewise.
10556         * jcf-write.c: Likewise.
10557         * jcf.h: Likewise.
10558         * jv-scan.c: Likewise.
10559         * jvgenmain.c: Likewise.
10560         * jvspec.c: Likewise.
10561         * lang.c: Likewise.
10562         * lex.c: Likewise.
10563         * lex.h: Likewise.
10564         * parse-scan.y: Likewise.
10565         * parse.h: Likewise.
10566         * parse.y: Likewise.
10567         * typeck.c: Likewise.
10568         * verify.c: Likewise.
10569         * xref.c: Likewise.
10570         * xref.h: Likewise.
10571         * zextract.c: Likewise.
10572         * zipfile.h: Likewise.
10573
10574 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10575
10576         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
10577         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
10578         * constants.c (build_constant_data_ref): Check for cached
10579         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
10580         in TYPE_CPOOL_DATE_REF.
10581         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
10582         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
10583         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
10584         (LOCAL_FINAL): New macro.
10585         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
10586         constant pool -- don't try to reuse.
10587         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
10588         TYPE_LANG_SPECIFIC.
10589         (find_in_current_zip): Use TYPE_JCF.
10590         * parse.h (java_check_final): Prototype removed.
10591         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
10592         (maybe_create_class_interface_decl,
10593         check_class_interface_creation): Likewise.
10594         (java_expand_finals): Function removed.
10595         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
10596         (block_statement:): Fixed comment.
10597         (anonymous_class_creation:): Likewise.
10598         (check_class_interface_creation): Reversed Jan 12, 2000 extra
10599         argument patch.
10600         (check_class_interface_creation): Loosened error report on (inner)
10601         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
10602         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
10603         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
10604         argument patch.
10605         (create_interface): Likewise.
10606         (anonymous_class_counter): New static global.
10607         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
10608         patch. Fixed comments.
10609         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
10610         anonymous_class_counter when declaring a toplevel class.
10611         (craft_constructor): Fixed constructor name when handling
10612         anonymous classes. Anonymous class constructors to feature hidden
10613         this$<n> parameter.
10614         (java_fix_constructors): Added comment.
10615         (java_check_final): Function removed.
10616         (java_complete_expand_methods): Fixed comment. Don't generate
10617         class data, save its outgoing constant pool instead.
10618         (verify_constructor_super): Skip anonymous class constructor
10619         hidden this$<n> parameter.
10620         (java_expand_classes): New local `saved_ctxp'. Removed call to
10621         java_expand_finals and java_check_final. Expand anonymous class
10622         constructors. Generate class data.
10623         (build_super_invocation): Skip anonymous class hidden this$<n>
10624         parameter.
10625         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
10626         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
10627         (set_java_signature): Likewise.
10628
10629 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
10630
10631         * gjavah.c: Delete ACC_VISIBILITY define.
10632         * jcf.h: Add ACC_VISIBILITY define.
10633         * parse.y: final: rule tagged <value>.
10634         (java_check_regular_methods): Use ACC_VISIBILITY define for
10635         default package access check.
10636         (local_variable_declaration_statement): Use final: rule.
10637
10638 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
10639
10640         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
10641         (final:): New rule.
10642
10643 2000-01-17  Tom Tromey  <tromey@cygnus.com>
10644
10645         * gjavah.c (print_field_info): Allow non-static final fields.
10646
10647 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10648
10649         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
10650         * parse.y (patch_anonymous_class): New function.
10651         (create_anonymous_class): Register incomplete type when the
10652         class/interface to extends/implement isn't known yet.
10653         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
10654         (verify_constructor_super): Tuned error message.
10655
10656 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10657
10658         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
10659         (ANONYMOUS_CLASS_P): New macro.
10660         (TYPE_SIGNATURE, TYPE_JCF): New macros.
10661         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
10662         * parse.y (create_class): Added leading argument.
10663         (maybe_create_class_interface_decl,
10664         check_class_interface_creation): Likewise.
10665         (craft_constructor): New function.
10666         (verify_constructor_super): Added argument in prototype.
10667         (class_declaration:): Inserted leading argument.
10668         (for_begin:): Use FOR_LOOP_P.
10669         (anonymous_class_creation): Create WFL of the anonymous class to
10670         instantiate. Call build_new_invocation. Added comments.
10671         (check_class_interface_creation): Handle parameter `anonymous' in
10672         verbose mode class creation announce.
10673         (link_nested_class_to_enclosing): Exclude anonymous classes.
10674         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
10675         anonymous class, even though they appear to have an enclosing
10676         context.
10677         (create_interface): Pass extra argument to
10678         check_class_interface_creation.
10679         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
10680         (create_class): Call check_class_interface_creation and
10681         maybe_create_class_interface_decl with extra new argument. Don't
10682         add private this$<n> to anonymous classes.
10683         (method_declarator): Insert hidden this$<n> to anonymous class
10684         constructors.
10685         (java_fix_constructors): Deleted code creating default
10686         constructor. Call craft_constructor instead.
10687         (java_check_regular_methods): Set `saw_constructor' to 1 for
10688         anonymous classes.
10689         (fix_constructors): Pass extra argument to verify_constructor_super.
10690         (verify_constructor_super): New local `sdecl', use it. Search for
10691         matching constructor (possibly featuring arguments) in super
10692         class.
10693         (lookup_method_invoke): Craft constructor according to arguments
10694         list when dealing with anonymous class constructors.
10695         (build_super_invocation): Pass arguments to anonymous class super
10696         constructors.
10697         (search_loop): Use FOR_LOOP_P.
10698         (labeled_block_contains_loop_p): Likewise.
10699
10700 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10701
10702         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
10703         (enclosing_context_p): New function.
10704         (get_access_flags_from_decl): Handle CLASS_STATIC.
10705         (maybe_layout_super_class): Extra first argument passed to
10706         do_resolve_class.
10707         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
10708         ID_INIT_P.
10709         * decl.c (access0_identifier_node): New global.
10710         (init_decl_processing): access0_identifier_node initialized.
10711         (pushdecl): Set DECL_CONTEXT only on non type decls.
10712         * expr.c (lookup_field): Lookup inner class fields in enclosing
10713         contexts.
10714         (expand_invoke): Use ID_INIT_P.
10715         (expand_java_field_op): Use DECL_CLINIT_P.
10716         * java-tree.def (CLASS_LITERAL): New tree code.
10717         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
10718         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
10719         (struct lang_decl): New field `inner_access'.
10720         (enclosing_context_p): Prototyped.
10721         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
10722         ID_CLINIT_P): New macros.
10723         (CLASS_STATIC): New macro.
10724         (CLASS_ACCESS0_GENERATED_P): New macro.
10725         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
10726         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
10727         INNER_CLASS_P): New macros.
10728         (DECL_INNER_CLASS_LIST): New macro.
10729         * jcf-parse.c (yyparse): Avoid the use of ANSI string
10730         concatenation.
10731         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
10732         the shift value to int. Fixed typo in comment.
10733         * lex.c (inst_id, wpv_id): Initialize.
10734         * mangle.c (unicode_mangling_length): Take `$' into account.
10735         * parse.h (DRECOVER, RECOVER): Terminate properly.
10736         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
10737         (typedef struct _jdep): New field `enclosing'.
10738         (JDEP_ENCLOSING): New macro.
10739         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
10740         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
10741         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
10742         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
10743         GET_ENCLOSING_CPC_CONTEXT): New macros.
10744         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
10745         (do_resolve_class): Added extra argument in prototype.
10746         * parse.y (resolve_class): Added extra argument in prototype.
10747         (maybe_create_class_interface_decl): Likewise.
10748         (maybe_use_access_method, build_wfl_wrap): New functions.
10749         (java_complete_expand_classes, java_complete_expand_class):
10750         Likewise.
10751         (java_parser_context_push_initialized_field,
10752         java_parser_context_suspend, java_parser_context_resume):
10753         Likewise.
10754         (maybe_make_nested_class_name, make_nested_class_name,
10755         set_nested_class_simple_name_value,
10756         link_nested_class_to_enclosing, find_as_inner_class,
10757         find_as_inner_class_do, check_inner_class_redefinition,
10758         build_thisn_assign, build_current_thisn, build_access_to_thisn,
10759         maybe_build_thisn_access_method, build_outer_field_access,
10760         build_outer_field_access_methods, build_outer_field_access_expr,
10761         build_outer_method_access_method, build_new_access_id,
10762         build_outer_field_access_method, outer_field_access_p,
10763         outer_field_expanded_access_p, outer_field_access_fix,
10764         build_incomplete_class_ref, patch_incomplete_class_ref,
10765         create_anonymous_class): Likewise.
10766         (inst_id, wpv_id): New static global variables.
10767         (synchronized:): New rule, tagged <node>.
10768         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
10769         rules.
10770         (anonymous_class_creation:): New rule, tagged <node>.
10771         (NEW_TK): Tagged <node>.
10772         (type_literals, array_type_literal): New rules, tagged <node>.
10773         (class_declaration:): Removed action when reducing by class_body:
10774         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
10775         using GET_CPC in sub-rules.
10776         (class_member_declaration): Handle inner classes.
10777         (method_declaration): When reducing method_header:, reset
10778         current_function_decl when appropriate.
10779         (method_declarator:): Set the number of formal parameter to 0 for
10780         method declared without arguments.
10781         (constructor_declarator:): Likewise.
10782         (static_initializer:): List of elements kept in a list.
10783         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
10784         use of the keyword `static' for type declarations.
10785         (block_statement:): Handle inner class declarations.
10786         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
10787         type qualified `this'.
10788         (class_instance_creation_expression): Use anonymous_class_creation:
10789         to handle inner class instances creation. Handle qualified `new'.
10790         (something_dot_new): Added appropriate actions.
10791         (create_new_parser_context): New function.
10792         (java_push_parser_context, java_parser_context_save_global,
10793         java_parser_context_suspend): Use create_new_parser_context.
10794         (check_modifiers): Changed leading comment.
10795         (check_class_interface_creation): Handle interclasses.
10796         (add_superinterfaces): Fixed comment.
10797         (create_interface): Build qualified name from the raw_name instead
10798         of its matching WFL. Push the initialized fields list. raw_name added
10799         as an extra argument to maybe_create_class_interface_decl.
10800         (create_class): Build qualified name from the raw_name instead of
10801         its matching WFL. Removed assignment to current_parsed_class_un.
10802         Call PUSH_ERROR before returning an error. Suspend the current
10803         parser context when processing an inner class. Push the
10804         initialized fields list. raw_name added as an extra argument to
10805         maybe_create_class_interface_decl. Add the private this$<n>
10806         field.
10807         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
10808         (register_fields): Get the class type from GET_CPC and handle
10809         previous errors.  Added code to handle the creation of static
10810         fields in inner classes. Initialized fields initialization
10811         statements kept in a list of lists.
10812         (maybe_generate_finit): Initialized fields initialization
10813         statements kept in a list of lists. Use GET_CPC.
10814         (maybe_generate_clinit): Likewise.
10815         (method_header): Use GET_CPC and GET_CPC_UN.
10816         (parser_qualified_classname): Handle inner classes.
10817         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
10818         (java_fix_constructors): Hide pointer to enclosing context
10819         instance in constructor list when dealing with inner classes.
10820         (jdep_resolve_class): Call resolve_class with extra first argument
10821         JDEP_ENCLOSING.
10822         (resolve_class): Add enclosing context as a first extra argument
10823         to do_resolve_class.
10824         (do_resolve_class): Call find_as_inner_class. Handle WFLs
10825         properly.
10826         (resolve_no_layout): Extra argument added to resolve_class
10827         invocation.
10828         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
10829         (java_get_real_method_name): Use GET_CPC_UN.
10830         (check_abstract_method_definitions): Use DECL_CLINIT_P.
10831         (java_check_abstract_methods): Handle static method declared in
10832         inner classes by an error.
10833         (java_check_regular_methods): Use DECL_CLINIT_P.
10834         (source_start_java_method): Also set DECL_MAX_LOCALS.
10835         (create_artificial_method): Call java_parser_context_save_global
10836         and java_parser_context_restore_global instead of saving/restoring
10837         the context by hand.
10838         (expand_start_java_method): Improved verbose mode message.
10839         (java_complete_expand_methods): Fixed leading comment. Use
10840         DECL_CLINIT_P.
10841         (fix_constructors): Added assignment to this$<n> if necessary.
10842         (java_expand_classes): Call java_complete_expand_classes instead
10843         of java_complete_expand_methods.
10844         (make_qualified_primary): Simplified.
10845         (merge_qualified_name): Optimized for missing left or right parts.
10846         (resolve_expression_name): Handle access to outer class fields from
10847         interclasses.
10848         (resolve_qualified_expression_name): New macro
10849         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
10850         classes. Report error on non appropriate qualification of
10851         `new'. Handle qualified `this'.
10852         (not_accessible_p): Allow access to outer class private fields from
10853         inner classes.
10854         (patch_method_invocation): Handle method invocations through
10855         access methods and inner class constructor invocations.
10856         (find_applicable_accessible_methods_list): Search enclosing
10857         contexts of an inner class.
10858         (search_applicable_methods_list): Fixed typo.
10859         (argument_types_convertible): Handle inner class constructors'
10860         hidden outer context reference argument.
10861         (qualify_ambiguous_name): Handle qualified `this'.
10862         (java_complete_lhs): Handle use of field accessed through
10863         artificial access methods in various cases of assignments. Handle
10864         CLASS_LITERAL node.
10865         (check_final_assignment): Use DECL_CLINIT_P.
10866         (valid_ref_assignconv_cast_p): Handle the destination being an
10867         enclosing context of the source.
10868         (patch_unaryop): Handle use of field accessed through artificial
10869         access methods.
10870         (patch_return): Use DECL_CLINIT_P.
10871         (patch_throw_statement): Use DECL_CLINIT_P.
10872         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
10873         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
10874         ID_INIT_P.
10875
10876 2000-01-16  Anthony Green  <green@cygnus.com>
10877
10878         * parse.y (build_string_concatenation): Only use
10879         StringBuffer(String) shortcut if String arg is constant.
10880
10881 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10882
10883         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
10884         the shift value to int. Fixed typo in comment.
10885
10886 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
10887
10888         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
10889         * jcf-write.c: Likewise.
10890         * parse.y: Likewise.
10891         * parse.c: Regenerate.
10892
10893 2000-01-09  Anthony Green  <green@cygnus.com>
10894
10895         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
10896         bytecodes in the correct order.
10897
10898 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10899
10900         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
10901
10902 2000-01-06  Anthony Green  <green@cygnus.com>
10903
10904         * expr.c (java_lang_expand_expr): Switch to permanent obstack
10905         before building constant array decl.
10906
10907 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10908
10909         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
10910         method invocation and typo in conditional expression.
10911         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
10912         the appropriate NOTE_POP.
10913         * parse.y (patch_binop): Shift value mask to feature the right
10914         type.
10915
10916 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10917
10918         * class.c (assume_compiled, assume_compiled_node): Add static
10919         prototype.
10920         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
10921
10922         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
10923
10924         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
10925
10926         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
10927         to `__modifier' to avoid stringifying it.
10928
10929         * parse.y (verify_constructor_circularity): Don't call a variadic
10930         function with a non-literal format string.
10931         (java_check_abstract_methods): Move unreachable code inside
10932         `continue' statement.
10933         (lookup_method_invoke): Call xstrdup, not strdup.
10934
10935         * expr.c (expand_java_field_op): Avoid the use of ANSI string
10936         concatenation.
10937
10938         * jcf-parse.c (yyparse): Likewise.
10939
10940         * jv-scan.c (main): Likewise.
10941
10942 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10943
10944         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
10945         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
10946         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
10947         concatenation.
10948
10949         * parse.y (synchronized, variable_redefinition_error,
10950         check_class_interface_creation, create_interface, create_class,
10951         method_header, finish_method_declaration,
10952         check_modifiers_consistency, method_declarator,
10953         complete_class_report_errors, check_abstract_method_definitions,
10954         java_check_regular_methods, check_throws_clauses,
10955         java_check_abstract_methods, read_import_dir,
10956         check_pkg_class_access, declare_local_variables, fix_constructors,
10957         cut_identifier_in_qualified, resolve_expression_name,
10958         resolve_qualified_expression_name, patch_method_invocation,
10959         java_complete_lhs, patch_assignment, try_builtin_assignconv,
10960         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
10961         patch_exit_expr, patch_exit_expr, patch_switch_statement,
10962         patch_try_statement, patch_synchronized_statement,
10963         patch_throw_statement, check_thrown_exceptions,
10964         patch_conditional_expr): Likewise.
10965
10966 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10967
10968         * Makefile.in (LIBDEPS): Added gcc's errors.o
10969         (../jcf-dump$(exeext):): Link with gcc's errors.o
10970         (../gcjh$(exeext):): Likewise.
10971         * expr.c (expand_java_NEW): Layout the entire target type instead of
10972         laying out its methods only.
10973         (lookup_field): Layout the class after having loaded it.
10974         * java-tree.h (java_debug_context): Declared.
10975         * jcf-io.c (toplev.h): Included.
10976         (find_class): Removed assignment to jcf's outofsynch
10977         field. Force source file to be read if newer than its matching
10978         class file. Tweaked debug messages.
10979         * jcf-parse.c (jcf_out_of_synch): Deleted.
10980         (read_class): Call to jcf_out_of_synch removed.
10981         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
10982         (jcf_out_of_synch): Prototype deleted.
10983         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
10984         `deprecated' and `class_err': integer turned into bit-fields.
10985         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
10986         * parse.y (package_list): New global.
10987         (package_declaration:): Record newly parsed package name.
10988         (extra_ctxp_pushed_p): Static global deleted.
10989         (java_parser_context_save_global): Create buffer context for the
10990         purpose of saving globals, if necessary.
10991         (java_parser_context_restore_global): Pop context pushed for the
10992         purpose of saving globals, if necessary.
10993         (java_debug_context_do): New prototype and function.
10994         (java_debug_context): Likewise.
10995         (do_resolve_class): Use already parsed package names to qualify
10996         and lookup class candidate.
10997         (java_pre_expand_clinit): Removed unnecessary local variable.
10998
10999 1999-12-17  Tom Tromey  <tromey@cygnus.com>
11000
11001         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
11002         fixes PR gcj/119.
11003         (process_file): Use `\n\' at end of each line in string.
11004
11005 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11006
11007         * expr.c (expand_invoke): Layout the loaded class before
11008         attempting to use it.
11009         (expand_java_field_op): Allow final field assignments to take
11010         place in $finit$.
11011         * typeck.c (convert): Return error_mark_node if expr is null.
11012
11013 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11014
11015         * class.c (class_depth): Return -1 if the class doesn't load
11016         properly.
11017         * expr.c (can_widen_reference_to): Check for errors during depth
11018         computation and return 0 accordingly.
11019         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
11020         create default constructors and add an other error check.
11021         * parse.h (java_fix_constructors): Prototyped.
11022         * parse.y (java_pre_expand_clinit): Likewise.
11023         (build_super_invocation): Re-prototyped to feature one argument.
11024         (java_check_circular_reference): Directly use `current'.
11025         (java_fix_constructors): New function.
11026         (java_check_regular_methods): Don't create default constructors
11027         here, but abort if none were found.
11028         (java_complete_expand_methods): Pre-process <clinit> calling
11029         java_pre_expand_clinit.
11030         (java_pre_expand_clinit): New function.
11031         (fix_constructors): build_super_invocation invoked with the
11032         current method declaration as an argument.
11033         (build_super_invocation): Use the context of the processed method
11034         decl argument instead of current_class.
11035         * typeck.c (lookup_java_method): Take WFLs in method names into
11036         account.
11037
11038 1999-12-14  Per Bothner  <per@bothner.com>
11039
11040         * class.c (make_class_data): flag_keep_inline_functions to keep
11041         private methods in the method array.
11042
11043 1999-12-15  Anthony Green  <green@cygnus.com>
11044
11045         * check-init.c (check_init): Take into account both types of
11046         `throw's when checking for uninitialized variables.
11047
11048 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11049
11050         * parse.y (java_complete_lhs): Force conversion of array
11051         dimensions to int_type_node, that's what runtime's ABI expects.
11052
11053 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11054
11055         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
11056         operand of a WFL, until the Java front-end gets fixed with regard
11057         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
11058
11059 1999-12-10  Andrew Haley  <aph@cygnus.com>
11060
11061         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
11062         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
11063         expr.c (build_java_athrow): Add support for sjlj-exceptions.
11064         java-tree.h: Ditto.
11065         jcf-write.c: Ditto.
11066
11067 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11068
11069         * expr.c (java_lang_expand_expr): Switch to permanent obstack
11070         before calling expand_eh_region_start and expand_start_all_catch.
11071         * except.c (expand_start_java_handler): Switch to permanent
11072         obstack before calling expand_eh_region_start.
11073         (expand_end_java_handler): Switch to permanent obstack before
11074         calling expand_start_all_catch.
11075
11076 1999-12-5  Anthony Green  <green@cygnus.com>
11077
11078         * decl.c (init_decl_processing): Mark throw_node as a noreturn
11079         function with side effects.
11080         (init_decl_processing): Mark all memory allocating DECLs with
11081         DECL_IS_MALLOC.
11082
11083 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11084
11085         * except.c (expand_end_java_handler): Call
11086         expand_resume_after_catch and end_catch_handler.
11087
11088 1999-11-30  Anthony Green  <green@cygnus.com>
11089
11090         * verify.c (verify_jvm_instructions): Create new return label
11091         chain if non existent (don't rely on the verified state of the jsr
11092         target.)
11093
11094 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11095
11096         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
11097         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
11098
11099         * parse.y (patch_assignment): Removed bogus final class test on
11100         lhs when checking on whether to emit an ArrayStoreException runtime
11101         check.
11102         * expr.c (expand_java_arraystore): Likewise.
11103
11104 1999-11-28 Anthony Green <green@cygnus.com>
11105
11106         * decl.c (find_local_variable): Reuse single slot decls when
11107           appropriate.
11108
11109 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11110
11111         * jcf-parse.c (saw_java_source): Global variable removed.
11112         (read_class): Don't use `saw_java_source'. Added extra braces.
11113         (yyparse): Code setting `saw_java_source' removed.
11114
11115 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
11116
11117         * except.c (emit_handlers): Zero catch_clauses after emitting them.
11118
11119 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11120
11121         * verify.c (merge_type_state): Non verified subroutines being
11122         considered more than once to trigger passive type merge.
11123
11124 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11125
11126         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
11127         in case of error. Error message tuned.
11128
11129 1999-11-21  Anthony Green  <green@cygnus.com>
11130
11131         * constants.c (find_methodref_index): Unwrap method names before
11132         inserting them in the constant pool.
11133
11134         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
11135
11136         * class.c (assume_compiled_node): New typedef.
11137         (assume_compiled_tree): New static data.
11138         (find_assume_compiled_node): New function.
11139         (add_assume_compiled): New function.
11140         (assume_compiled): New function.
11141         * class.c (make_class_data): Use assume_compiled.
11142         (is_compiled_class): Use assume_compiled.
11143
11144         * java-tree.h (add_assume_compiled): Declare.
11145
11146         * lang.c (lang_decode_option): Parse new options.
11147
11148 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11149
11150         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
11151         int_type_node: that's what `_Jv_AllocObject' expects.
11152
11153 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11154
11155         * parse.y (lookup_method_invoke): Use lang_printable_name to
11156         reliably build the type name during error report. Fixes PR gcj/97.
11157
11158 1999-11-09  Tom Tromey  <tromey@cygnus.com>
11159
11160         * jcf-path.c: Include <sys/stat.h>.
11161         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
11162         (DIR_UP): New macro.
11163
11164 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11165
11166         * parse.y (source_end_java_method): Resume permanent allocation,
11167         reversing Apr 27 1998 patch.
11168         (patch_string_cst): Pop obstacks after having pushed the permanent
11169         ones.
11170
11171 1999-11-05  Tom Tromey  <tromey@cygnus.com>
11172
11173         * class.c (finish_class): Emit inlined methods if any native
11174         methods exist in the class.  Fixes PR gcj/85.
11175
11176 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11177
11178         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
11179         (qualify_ambiguous_name): Likewise.
11180
11181 1999-11-03  Godmar Back <gback@cs.utah.edu>
11182
11183         * typeck.c: (lookup_java_method):  search all inherited
11184         interfaces when looking up interface method.
11185
11186 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11187
11188         * parse.y (method_header:): Issue error message for rule `type
11189         error'.
11190         (synchronized:): Error report when not using synchronized.
11191
11192 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11193
11194         * parse.y (resolve_qualified_expression_name): Prevent `this' from
11195         being used before the superclass constructor has been called.
11196         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
11197         instead of `CALL_THIS_CONSTRUCTOR_P'.
11198
11199 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
11200
11201         * check-init.c: Fix typo in comment.
11202
11203 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11204
11205         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
11206         and final method.
11207
11208 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11209
11210         * parse.y (expression_statement:): Call function to report
11211         improper invocation of a constructor.
11212         (parse_ctor_invocation_error): New function.
11213
11214 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
11215
11216         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
11217         remember_end_note.
11218
11219 1999-10-21  Tom Tromey  <tromey@cygnus.com>
11220
11221         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
11222         in generated `main'.
11223
11224 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11225
11226         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
11227         (qualify_ambiguous_name): Likewise.
11228
11229 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11230
11231         * parse.y (java_complete_tree): fold_constant_for_init to work on
11232         permanent_obstack.
11233         (java_complete_lhs): Likewise.
11234         (array_constructor_check_entry): Complete an initializer element
11235         on permanent_obstack.
11236
11237 1999-10-19  Tom Tromey  <tromey@cygnus.com>
11238
11239         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
11240         From Mike Moreton <mike@pillim.demon.co.uk>.
11241
11242 1999-10-15  Greg McGary  <gkm@gnu.org>
11243
11244         * java-tree.h (flag_bounds_check): Remove extern decl.
11245         * lang.c (flag_bounds_check): Remove global variable.
11246         (lang_f_options): Remove "bounds-check" entry.
11247         (lang_init_options): Default flag_bounds_check to "on".
11248
11249 1999-10-14  Tom Tromey  <tromey@cygnus.com>
11250
11251         * jvgenmain.c (usage): New function.
11252         (main): Use it.  Also, handle `-D' options.
11253         * jvspec.c (lang_specific_driver): Recognize -D.
11254         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
11255
11256         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
11257
11258 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11259
11260         * jcf-dump.c (print_constant, disassemble_method): Don't call a
11261         variadic function with a non-literal format string.
11262
11263         * parse-scan.y (report_main_declaration): Likewise.
11264
11265         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
11266
11267         * parse.y (read_import_dir, patch_assignment, patch_binop,
11268         patch_array_ref): Likewise.
11269
11270         * typeck.c (build_java_array_type): Likewise.
11271
11272         * verify.c (verify_jvm_instructions): Likewise.
11273
11274 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11275
11276         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
11277
11278 1999-10-07  Anthony Green  <green@cygnus.com>
11279
11280         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
11281         where CHECK_PUT may fail for valid reasons.
11282
11283         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
11284         UNSAFE_PUTN): New macros.
11285
11286 1999-10-04  Tom Tromey  <tromey@cygnus.com>
11287
11288         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
11289         well.  Fixes Java PR gcj/59.
11290         * parse-scan.y (yyerror): Report errors.
11291
11292 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
11293
11294         * decl.c (insert_block): Remove unconditional `abort'.
11295
11296 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
11297
11298         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
11299         FUNCTION_CODE now of type int.  All callers changed.
11300         Set the builtin's DECL_BUILT_IN_CLASS.
11301
11302 1999-09-23  Tom Tromey  <tromey@cygnus.com>
11303
11304         * jvspec.c (lang_specific_driver): Don't read spec file if
11305         -fsyntax-only given.
11306
11307 1999-09-22  Tom Tromey  <tromey@cygnus.com>
11308
11309         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
11310
11311         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
11312         (WORDS_TO_LONG): Likewise.
11313         (WORDS_TO_DOUBLE): Likewise.
11314
11315 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11316
11317         * jcf-write.c (RELOCATION_VALUE_0): New macro.
11318         (RELOCATION_VALUE_1): Likewise.
11319         (emit_iinc, emit_reloc, push_constant1, push_constant2,
11320         push_in_const, push_long_const): Prototyped.
11321         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
11322         (push_constant2): Likewise.
11323         (push_int_const): Cast find_constant1's integer arguments to `jword'.
11324         (find_constant_wide): Cast find_constant2's integer arguments to
11325         `jword'.
11326         (find_constant_index): Cast find_constant2's and find_constant2's
11327         integer arguments to `jword'.
11328         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
11329         (emit_switch_reloc): Use RELOCATION_VALUE_0.
11330         (emit_if): Use RELOCATION_VALUE_1.
11331         (emit_goto): Likewise.
11332         (emit_jsr): Likewise.
11333         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
11334         argument to push_long_const to HOST_WIDE_INT.
11335
11336 1999-09-15  Andreas Schwab  <schwab@suse.de>
11337
11338         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
11339
11340 1999-09-20  Nick Clifton  <nickc@cygnus.com>
11341
11342         * lang.c (lang_decode_option): Extend comment.
11343
11344 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11345
11346         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
11347         instead of fndecl.
11348
11349 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11350
11351         * gjavah.c (get_field_name, print_method_info, print_include,
11352         add_namelet): Use xmalloc, not malloc.
11353
11354         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
11355         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
11356         NULL pointer.
11357
11358         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
11359
11360         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
11361
11362         * jcf-path.c (add_entry): Likewise.
11363
11364         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
11365
11366         * jv-scan.c (xmalloc): Remove definition.
11367
11368         * jvgenmain.c (xmalloc): Likewise.
11369
11370         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
11371
11372         * lex.c (java_store_unicode): Use xrealloc, not realloc.
11373
11374         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
11375         concat, not xmalloc/sprintf.
11376         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
11377         (xstrdup): Remove definition.
11378
11379         * parse.y (duplicate_declaration_error_p,
11380         constructor_circularity_msg, verify_constructor_circularity,
11381         check_abstract_method_definitions, java_check_regular_methods,
11382         java_check_abstract_methods, patch_method_invocation,
11383         check_for_static_method_reference, patch_assignment, patch_binop,
11384         patch_cast, array_constructor_check_entry, patch_return,
11385         patch_conditional_expr): Use xstrdup, not strdup.
11386
11387         * zextract.c (ALLOC): Use xmalloc, not malloc.
11388
11389 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11390
11391         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
11392
11393         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
11394         (do_spec, lang_specific_pre_link, lang_specific_driver,
11395         input_filename, input_filename_length): Don't declare.
11396         (main_class_name, jvgenmain_spec, lang_specific_driver):
11397         Constify a char*.
11398         (lang_specific_driver): All calls to the function pointer
11399         parameter now explicitly call `fatal'.
11400
11401 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11402
11403         * parse.y (find_applicable_accessible_methods_list): Search
11404         abstract classes as interfaces.
11405
11406 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11407
11408         * class.c (finish_class): We're now outside a valid method
11409         declaration. Tell the rest of gcc so.
11410
11411 1999-09-08  Bruce Korb  autogen@linuxbox.com
11412
11413         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
11414
11415 1999-09-07  Tom Tromey  <tromey@cygnus.com>
11416
11417         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
11418         java-array.h.
11419         (decode_signature_piece): Don't emit "::" in JArray<>.
11420         (print_namelet): Only print trailing `;' when printing a class.
11421
11422 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
11423
11424         * java-tree.h: Delete declarations for all tree nodes now moved to
11425         global_trees.
11426         * decl.c: Delete their definitions.
11427
11428 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
11429
11430         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
11431         * Makefile.in (OBJS): Add ggc-callbacks.o.
11432         (OBJDEPS): Likewise.
11433
11434 1999-09-03  Tom Tromey  <tromey@cygnus.com>
11435
11436         * parse.y (strip_out_static_field_access_decl): Return operand if
11437         it satisfies JDECL_P.
11438
11439 1999-09-02  Tom Tromey  <tromey@cygnus.com>
11440
11441         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
11442         Handle nested arrays, like `[[I'.
11443
11444 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11445
11446         * class.c (finish_class): Remove unused parameter, all callers
11447         changed.
11448
11449         * expr.c (build_java_athrow): Change return type to void.
11450         (java_lang_expand_expr): Make sure each case in switch returns a
11451         value.
11452
11453         * java-tree.h (finish_class): Fix prototype to take void args.
11454
11455         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
11456         (main): Issue return from main, not exit.
11457
11458         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
11459
11460         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
11461
11462         * jv-scan.c (main): Issue return from main, not exit.
11463
11464         * parse.y (check_abstract_method_definitions,
11465         java_check_abstract_method_definitions): Add static prototypes.
11466         (java_complete_expand_methods): Fix call to `finish_class'.
11467
11468         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
11469         and `prevpc'.
11470
11471 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11472
11473         * lang.c (language_string): Constify.
11474
11475 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11476
11477         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
11478         Remove hacks for stuff which comes from libiberty.
11479
11480         * Make-lang.in: Likewise.
11481
11482 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
11483
11484         * Makefile.in (xref.o): Depend on xref.c explicitly.
11485
11486 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11487
11488         * java-tree.h (lang_printable_name): Constify a char*.
11489
11490         * lang.c (lang_printable_name): Likewise.
11491
11492 1999-08-27  Jeffrey A Law  (law@cygnus.com)
11493
11494         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
11495         comments in C code.
11496
11497 1999-08-26  Tom Tromey  <tromey@cygnus.com>
11498
11499         * gjavah.c (print_cxx_classname): Print "::" before qualified
11500         name.
11501
11502 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11503
11504         * parse.y (lookup_cl): Changed leading comment. Now does its best
11505         to set the column number.
11506         (qualify_ambiguous_name): Take WFL wrappers into account.
11507
11508 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
11509
11510         * verify.c (verify_jvm_instructions): Don't check instruction
11511         validity beyond end of method.
11512
11513 1999-08-25  Tom Tromey  <tromey@cygnus.com>
11514
11515         * jvspec.c (lang_specific_driver): Correctly handle --help again.
11516
11517 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11518
11519         * gjavah.c (print_name, print_base_classname, utf8_cmp,
11520         cxx_keyword_subst, generate_access, name_is_method_p,
11521         get_field_name, print_field_name, super_class_name, print_include,
11522         decode_signature_piece, print_class_decls, usage, help,
11523         java_no_argument, version, add_namelet, print_namelet): Add static
11524         prototype.
11525         (print_base_classname, utf8_cmp, cxx_keyword_subst,
11526         name_is_method_p): Constify a char*.
11527         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
11528         Provide a final else clause in an if-else-if.
11529         (print_field_info): Add missing final arg in function call to
11530         `print_field_name'.
11531         (print_method_info, decompile_method, decode_signature_piece,
11532         print_c_decl, print_full_cxx_name, print_stub,
11533         print_mangled_classname, super_class_name, print_include,
11534         add_namelet, add_class_decl, print_class_decls, process_file,
11535         help): Constify a char*.
11536
11537         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
11538         push_int_const, find_constant_wide, find_constant_index,
11539         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
11540         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
11541         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
11542         emit_if, emit_goto, emit_jsr, call_cleanups,
11543         make_class_file_name): Add static prototypes.
11544         (generate_bytecode_return, generate_bytecode_insns): Pass a
11545         NULL_PTR, not a NULL_TREE.
11546
11547         * jv-scan.c: Include "jcf.h".
11548         (main): Declare using DEFUN macro.
11549
11550         * jvspec.c (find_spec_file, lang_specific_pre_link,
11551         lang_specific_driver): Add prototypes.
11552         (find_spec_file): Constify a char*.
11553
11554         * keyword.gperf (hash, java_keyword): Add prototypes.
11555
11556         * lang.c (lang_print_error): Add static prototype.
11557         (lang_init): Prefer memcpy over bcopy to avoid casts.
11558
11559         * lex.c (yylex): Add static prototype.
11560
11561         * parse-scan.y: Include "lex.c" earlier.
11562
11563         * parse.h: Remove redundant declaration for `yylex'.
11564
11565         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
11566         labeled_block_contains_loop_p): Add static prototypes.
11567         (not_accessible_p): Make static to match prototype.
11568
11569         * verify.c (start_pc_cmp): Don't needlessly cast away const.
11570
11571 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11572
11573         * parse.y (check_method_redefinition): Changed leading comment.
11574         (check_abstract_method_definitions): New function.
11575         (java_check_abstract_method_definitions): New function.
11576         (java_check_regular_methods): Call it.
11577         (verify_constructor_super): Fixed indentation.
11578         (lookup_method_invoke): Likewise.
11579
11580 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11581
11582         * parse.y (method_header): Return a null pointer if the current
11583         class node is null.
11584         (finish_method_declaration): Return if the current function decl
11585         is null.
11586         (source_start_java_method): Likewise.
11587         (java_method_add_stmt): Likewise.
11588
11589 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11590
11591         * class.c (emit_register_class): Removed unnecessary call to
11592         start_sequence.
11593         * parse.y (labeled_block_contains_loop_p): Removed unused local
11594         variable.
11595
11596 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11597
11598         * parse.y (java_refold): Added prototype.
11599
11600 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11601
11602         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
11603         (java_stabilize_reference): Removed unnecessary `else'.
11604         (java_complete_lhs): Set flag to remember boolean. Call
11605         java_refold. Added comments.
11606         (java_decl_equiv): New function.
11607         (binop_compound_p): Likewise.
11608         (java_refold): Likewise.
11609         (patch_unaryop): Striped static field access assigned to decl and
11610         op. Changed promotion scheme for ++/-- operators.
11611         (search_loop): New function.
11612         (labeled_block_contains_loop_p): Likewise.
11613         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
11614         comment.
11615         (patch_bc_statement): Call search_loop. Fixed comment.
11616
11617 1999-08-14  Anthony Green  <green@cygnus.com>
11618
11619         * expr.c (java_lang_expand_expr): Mark static array data as
11620         referenced.
11621
11622 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
11623
11624         * jvgenmain.c (main): NUL-terminate name_obstack.
11625
11626 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11627
11628         * check-init.c (check_bool2_init, done_alternative): Add static
11629         prototypes.
11630
11631         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
11632         (add_method, build_utf8_ref, build_class_ref,
11633         append_gpp_mangled_type, layout_class_method): Constify a char*.
11634
11635         * decl.c (push_promoted_type, make_binding_level): Add static
11636         prototypes.
11637         (push_promoted_type, pushdecl): Constify a char*.
11638
11639         * except.c (find_handler_in_range, link_handler,
11640         check_start_handlers): Add static prototypes.
11641
11642         * expr.c (process_jvm_instruction): Constify a char*.
11643
11644         * gjavah.c (main): Constify a char*.
11645
11646         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
11647         Constify a char*.
11648
11649         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
11650         static prototypes.
11651         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
11652         munge, print_ents): Constify a char*.
11653
11654         * jcf-dump.c (disassemble_method): Constify a char*.
11655         (print_constant_pool, print_exception_table): Add static prototypes.
11656         (print_constant, print_exception_table, main, disassemble_method):
11657         Constify a char*.
11658
11659         * jcf-io.c (find_classfile, find_class): Likewise.
11660
11661         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
11662         (set_source_filename, predefined_filename_p): Add static prototypes.
11663         (set_source_filename, get_constant, get_class_constant,
11664         find_in_current_zip): Constify a char*.
11665
11666         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
11667         static prototypes.
11668         (add_entry, add_path, jcf_path_classpath_arg,
11669         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
11670
11671         * jcf-reader.c (get_attribute, jcf_parse_preamble,
11672         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
11673         jcf_parse_one_method, jcf_parse_methods,
11674         jcf_parse_final_attributes): Add static prototypes.
11675         (get_attribute): Constify a char*.
11676
11677         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
11678         jcf_dependency_add_target, jcf_path_classpath_arg,
11679         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
11680
11681         * jv-scan.c (main): Constify a char*.
11682         (gcc_obstack_init): Add prototype arguments.
11683
11684         * jvgenmain.c (gcc_obstack_init): Likewise.
11685         (main): Constify a char*.
11686
11687         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
11688         static prototypes.
11689         (put_decl_string, lang_print_error): Constify a char*.
11690         (lang_init): Remove redundant extern prototype.
11691
11692         * mangle.c (emit_unicode_mangled_name): Constify a char*.
11693
11694         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
11695         Add static prototypes.
11696         (get_type_from_signature): Constify a char*.
11697
11698         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
11699         Add static prototypes.
11700         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
11701         (verify_jvm_instructions): Constify a char*.
11702
11703         * xref.c (xref_flag_value): Likewise.
11704
11705         * xref.h (xref_flag_value): Likewise.
11706
11707         * zextract.c (makeword, makelong): Add static prototypes.
11708         (makeword, makelong): Constify a uch*.
11709
11710 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11711
11712         * lang.c (java_dummy_print): Constify a char*.
11713         (lang_print_error): Likewise.
11714         (lang_init): Remove redundant prototype for `print_error_function'.
11715         (lang_init_source): Likewise.
11716         (lang_identify): Constify a char*.
11717
11718 1999-08-09  Tom Tromey  <tromey@cygnus.com>
11719
11720         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
11721         (WORDS_TO_LONG): Likewise.
11722         (WORDS_TO_DOUBLE): Likewise.
11723
11724 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11725
11726         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
11727
11728         * expr.c (java_stack_pop, java_array_data_offset,
11729         build_java_throw_out_of_bounds_exception, case_identity,
11730         build_java_check_indexed_type): Add static prototypes.
11731         (linenumber_table, expand_invoke, expand_java_field_op,
11732         build_primtype_type_ref, expand_byte_code): Constify a char*.
11733
11734         * java-tree.h (build_primtype_type_ref, linenumber_table):
11735         Constify a char*.
11736         (java_lang_expand_expr): Add prototype.
11737
11738         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
11739         `java_lang_expand_expr'.
11740
11741         * lex.c (java_lex_error): Constify a char*.
11742         (java_get_unicode, java_read_char, java_allocate_new_line,
11743         java_unget_unicode, java_sneak_unicode): Prototype.
11744
11745         * parse-scan.y (current_class, package_name, method_declarator,
11746         report_class_declaration, yyerror): Constify a char*.
11747
11748         * parse.h (java_report_errors): Prototype.
11749         (yyerror): Constify a char*.
11750
11751         * parse.y (classitf_redefinition_error, check_modifiers,
11752         parse_jdk1_1_error, lookup_package_type,
11753         lookup_package_type_and_set_next, get_printable_method_name,
11754         purify_type_name): Constify a char*.
11755         (build_super_invocation, maybe_generate_finit,
11756         verify_constructor_super, parser_add_interface,
11757         add_superinterfaces, jdep_resolve_class, note_possible_classname,
11758         java_complete_expand_methods, java_expand_finals,
11759         cut_identifier_in_qualified, java_stabilize_reference,
11760         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
11761         merge_string_cste): Prototype.
11762         (single_type_import_declaration, yyerror,
11763         variable_redefinition_error, build_array_from_name,
11764         build_unresolved_array_type, check_class_interface_creation,
11765         resolve_class, complete_class_report_errors,
11766         note_possible_classname, read_import_dir,
11767         find_in_imports_on_demand, resolve_package, fix_constructors,
11768         check_deprecation, lookup_method_invoke,
11769         maybe_build_primttype_type_ref, array_constructor_check_entry):
11770         Constify a char*.
11771         (java_complete_expand_methods, java_expand_finals): Make static.
11772         (convert_narrow): Remove static prototype.
11773
11774 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
11775
11776         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
11777
11778 1999-08-02  Richard Henderson  <rth@cygnus.com>
11779
11780         * decl.c: Include defaults.h instead of expr.h.
11781         * parse.y: Likewise.
11782
11783 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
11784
11785         * java/decl.c (start_java_method): Change all uses of
11786         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
11787         Ensure expr.h is included.
11788         * java/expr.c (pop_arguments): Ditto.
11789         * java/parse.y (expand_start_java_method): Ditto.
11790
11791 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11792
11793         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
11794
11795 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
11796
11797         * decl.c: Include "function.h".
11798         * except.c: Likewise.
11799         * parse.y: Likewise.
11800         * Makefile.in: Update dependencies.
11801
11802 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11803
11804         * expr.c (build_java_soft_divmod): Provide a default case in switch.
11805         (java_lang_expand_expr): Mark parameters `target', `tmode' and
11806         `modifier' with ATTRIBUTE_UNUSED.
11807
11808         * gjavah.c (process_file): Add braces around ambiguous `else'.
11809
11810         * jcf-dump.c (print_access_flags, localvar_free): Change return
11811         type to void.
11812
11813         * parse.y (java_complete_expand_method): Initialize variable
11814         `exception_copy'.
11815         (resolve_qualified_expression_name): Likewise for `field_decl'.
11816         (patch_method_invocation): Likewise for `class_to_search'.
11817         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
11818         (patch_assignment): Likewise for `lhs_type'.
11819
11820         * verify.c (verify_jvm_instructions): Remove unused variable
11821         `caller'.
11822
11823 1999-07-25  Richard Henderson  <rth@cygnus.com>
11824
11825         * decl.c (va_list_type_node): New.
11826
11827 1999-07-25  Anthony Green  <green@cygnus.com>
11828
11829         * gjavah.c (print_stub): New function.
11830         (METHOD_IS_NATIVE): New macro.
11831         (print_mangled_classname): Make static.
11832         (HANDLE_END_FIELD): Don't emit fields during stub generation.
11833         (process_file): Perform stub generation.
11834         (HANDLE_METHOD): Don't emit class decls during stub
11835         generation.
11836         (HANDLE_END_METHOD): Take into account stub generation.
11837         (print_method_info): Handle stub generation.
11838         (print_stub): New function.
11839         (print_cxx_classname): Make signature consistant with others.
11840         (help): Describe -stubs option.
11841         (main): Create stub file.
11842         (version): Use version.c.
11843         (print_full_cxx_name): New function.
11844         (print_c_decl): Use print_full_cxx_name.
11845
11846 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11847
11848         * check-init.c (check_init): Handle MAX_EXPR.
11849
11850 1999-07-15  Andrew Haley  <aph@cygnus.com>
11851
11852         * lang.c (flag_use_divide_subroutine): New variable.
11853         * typeck.c: (convert_ieee_real_to_integer): Bounds check
11854         fp-to-integer conversion.
11855         (convert): Call convert_ieee_real_to_integer when flag_fast_math
11856         is not set.
11857
11858         * expr.c (build_java_soft_divmod): New function.
11859         (build_java_binop): Call build_java_soft_divmod if
11860         flag_use_divide_subroutine is set.
11861         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
11862         soft_lrem_node: new builtin functions.
11863         (init_decl_processing) Initialize the new builtins.
11864         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
11865         soft_lrem_node: new builtin functions.
11866         (build_java_soft_divmod): New function.
11867         * parse.y: Call build_java_soft_divmod if
11868         flag_use_divide_subroutine is set.
11869         * parse.c: Rebuilt.
11870
11871         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
11872         a --specs= arg) even if not linking.
11873         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
11874         -fuse-divide-subroutine
11875
11876 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11877
11878         * parse.y (resolve_and_layout): Check methods only once.
11879         (resolve_qualified_expression_name): Verify thrown exceptions
11880         compatibility.
11881         (check_thrown_exceptions): Reject exceptions thrown in
11882         initializer. Error message tuned.
11883
11884 1999-07-14  Andrew Haley  <aph@cygnus.com>
11885
11886         * expr.c (expand_expr): Do not return the last statement in a
11887         block as the block's value.
11888
11889 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11890
11891         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
11892         CALL_EXPR, to avoid order of evaluation changes.
11893
11894 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11895
11896         * parse.y (qualify_ambiguous_name): Do not use
11897         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
11898
11899 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11900
11901         * check-init.c (check_init): Handle MAX_EXPR.
11902         * expr.c (force_evaluation_order): Force method call arguments to
11903         be evaluated in left-to-right order.
11904         * parse.y (qualify_ambiguous_name): Loop again to qualify
11905         NEW_ARRAY_EXPR properly.
11906
11907 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11908
11909         * parse.y (patch_invoke): Resolve unresolved invoked method
11910         returned type.
11911         (qualify_ambiguous_name): STRING_CST to qualify expression for
11912         type name resolution.
11913
11914 1999-06-24  Andrew Haley  <aph@cygnus.com>
11915
11916         * class.c (finish_class): Whenever a deferred method is
11917         output, rescan the list of methods to see if a new candidate for
11918         output can be found.
11919
11920 1999-06-28  Tom Tromey  <tromey@cygnus.com>
11921
11922         * jvspec.c (lang_specific_driver): Recognize --help.
11923
11924 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11925
11926         * parse.y (resolve_package): Fixed bogus return statement.
11927         (patch_method_invocation): Resolve method invocation beginning with
11928         a package name qualifier.
11929
11930 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11931
11932         * Make-lang.in (java.stage1): Depend on stage1-start.
11933         (java.stage2): Likewise for stage2-start.
11934         (java.stage3): Likewise for stage3-start.
11935         (java.stage4): Likewise for stage4-start.
11936
11937 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11938
11939         * parse.y (java_complete_lhs): When doing cross referencing, don't
11940         try to keep file location on a WFL expanded as a CALL_EXPR.
11941
11942 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11943
11944         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
11945         compiling to class file a void method with an empty method body.
11946         As a side effect, the bytecode backend will generate the
11947         appropriate `return' instruction.
11948
11949 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11950
11951         * parse.y (lookup_package_type_and_set_next): New function prototype.
11952         (resolve_package): Search current and imported packages.
11953         (lookup_package_type_and_set_next): New function.
11954
11955 1999-06-22  Andrew Haley  <aph@cygnus.com>
11956
11957         * verify.c (verify_jvm_instructions): Check for pending blocks
11958         before invalid PC test and opcode switch, not after.
11959
11960 1999-06-21  Andrew Haley  <aph@cygnus.com>
11961
11962         * except.c (find_handler_in_range): The upper limit for exception
11963         ranges is exclusive, not inclusive: (start <= pc < end).
11964         (link_handler): find child pointer which points to outer by
11965         searching sibling list: previous code incorrectly assumed that
11966         outer->outer->first_child must point to outer.
11967         * verify.c (verify_jvm_instructions): FIXME added to code for
11968         `athrow'.
11969         (verify_jvm_instructions): Do not assume that the last block
11970         processed in a subroutine is a block which ends with a `ret'
11971         instruction.  With some control flows it is possible that the last
11972         block ends with an `athrow'.
11973
11974 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11975
11976         * parse.y (qualify_ambiguous_name): Reorganized the post
11977         evaluation of non WFL leading expression nodes.
11978
11979 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11980
11981         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
11982         CONVERT_EXPR.
11983
11984 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11985
11986         * parse.y (qualify_ambiguous_name): Handle qualified expression
11987         beginning with a STRING_CST.
11988
11989 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11990
11991         * parse.y (register_fields): Set DECL_INITIAL on both
11992         pre-initialized static and public fields.
11993         (resolve_field_access): Static field access expressions to always
11994         use pointer types.
11995         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
11996         qualification. CONVERT_EXPR to be resolved as an expression name.
11997         (java_complete_lhs): Identify and access qualified final
11998         initialized field in switch statement case expression.
11999         (fold_constant_for_init): Pre-initialized field decl constant to
12000         be folded.
12001
12002 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12003
12004         * parse.y (note_possible_classname): Mark returned node with
12005         QUALIFIED_P only if the original class name contained a '/'.
12006
12007 1999-06-05  Anthony Green  <green@cygnus.com>
12008
12009         * Make-lang.in (gcjh): More parallel build fixes.
12010
12011 1999-06-03  Mike Stump  <mrs@wrs.com>
12012
12013         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
12014
12015 1999-06-02  Anthony Green  <green@cygnus.com>
12016
12017         * except.c (link_handler): Chain exception handlers in order.
12018
12019 1999-06-02  Anthony Green  <green@cygnus.com>
12020
12021         * expr.c (expand_byte_code): Fill unreachable bytecode regions
12022         with nops and process as usual in order to always set correct EH
12023         ranges.  Emit detailed warnings about unreachable bytecodes.
12024
12025 1999-06-02  Anthony Green  <green@cygnus.com>
12026
12027         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
12028         constant.
12029
12030 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12031
12032         * parse.y (lookup_field_wrapper): Unified returned value to NULL
12033           or the searched field decl.
12034
12035 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12036
12037         * parse.y (fold_constant_for_init): Convert numerical constant
12038         values to the type of the assigned field.
12039
12040 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12041
12042         * expr.c (lookup_field): Relaxed the test on class loading error
12043         detection.
12044         * parse.y (fold_constant_for_init): Enabeled old code.
12045
12046 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12047
12048         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
12049         decide the validity of the cast of a java.lang.Cloneable reference
12050         to an array.
12051         (patch_conditional_expr): Fixed first argument passed to
12052         binary_numeric_promotion.
12053
12054 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12055
12056         * parse.y (qualify_ambiguous_name): Take into account that a
12057         CONVERT_EXPR might specify a type as a WFL.
12058
12059 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12060
12061         * parse.y (patch_assignment): Save the rhs before using it as an
12062         argument to _Jv_CheckArrayStore.
12063
12064 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12065
12066         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
12067
12068 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12069
12070         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
12071         floating point literal only when the exponent indicator has been
12072         parsed.
12073
12074 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12075
12076         * parse.y (formal_parameter:): Construct argument tree list
12077         element even if a yet unsupported final parameter was encountered.
12078
12079 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12080
12081         * parse.y (finish_method_declaration): Issue errors for native or
12082         abstract methods declared with a method body, as well as for non
12083         native or non abstract methods with no method body.
12084
12085 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12086
12087         * class.c (build_utf8_ref): Initialize variable `field'.
12088
12089         * decl.c (init_decl_processing): Initialize variable `field'.
12090
12091         * expr.c (build_known_method_ref): Mark parameters `method_type',
12092         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
12093         (process_jvm_instruction): Likewise for parameter `length'.
12094
12095         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
12096         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
12097         ATTRIBUTE_UNUSED.
12098
12099         * parse.y (maybe_generate_clinit): Remove unused variable
12100         `has_non_primitive_fields'.
12101         (find_in_imports_on_demand): Initialize variables `node_to_use'
12102         and `cl'.
12103         (patch_binop): Likewise for variable `prom_type'.
12104         (patch_unaryop): Likewise for variable `prom_type'.
12105
12106         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
12107
12108         * xref.c (xref_table): Add missing initializer.
12109
12110 1999-05-14  Tom Tromey  <tromey@cygnus.com>
12111
12112         * java-except.h (struct eh_range): Removed unused `next' member.
12113         * verify.c (verify_jvm_instructions): Call check_nested_ranges
12114         after adding all exception handlers.  Sort exception ranges in
12115         order of start PC.
12116         (struct pc_index): New structure.
12117         (start_pc_cmp): New function.
12118         * except.c (add_handler): Return `void'.  Don't call link_handler;
12119         instead construct an ordinary linked list and do range
12120         coalescing.
12121         (check_nested_ranges): New function.
12122         (link_handler): Changed interface to allow merging of eh_ranges.
12123         Split overlapping ranges.  Return `void'.
12124
12125 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12126
12127         * parse.y (constructor_block_end:): New rule, tagged <node>.
12128         (constructor_body:): Use `constructor_block_end' instead of
12129         `block_end'.
12130
12131 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12132
12133         * parse.y (statement_nsi:): Pop `for' statement block.
12134         (java_complete_lhs): Labeled blocks containing no statement are
12135         marked as completing normally.
12136
12137 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12138
12139         * xref.c (xref_set_current_fp): New function, defined.
12140         * xref.h (xref_set_current_fp): New function, prototyped.
12141
12142 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12143
12144         * check-init.c (check_init): Take into account that
12145         LABELED_BLOCK_STMT can be empty.
12146
12147 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12148
12149         * parse.y (java_check_regular_methods): Warning check on not
12150         overriding methods with default access in other packages does not
12151         apply to `<clinit>'.
12152         (java_complete_lhs): If block body is an empty_stmt_node, replace
12153         it by NULL_TREE. This prevents gcc from generating an irrelevant
12154         warning.
12155
12156 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12157
12158         * check-init.c (check_init): Removed code accepting to see things
12159         falling through default:, when doing xrefs.
12160         * java-tree.h (do_not_fold): New global variable, declared.
12161         * parse.y (do_not_fold): New global variable, defined.
12162         (java_complete_expand_method): Set `do_not_fold' to the value of
12163         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
12164         and reinstall them after them have been purged; do not check for
12165         initializations; do not issue missing return errors.
12166         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
12167         when doing xrefs.
12168         (patch_binop): Skip the fold part when doing xrefs.
12169         (build_string_concatenation): Skip the concatenation part when
12170         doing xrefs.
12171         (patch_synchronized_statement): Do not generate a try-finally when
12172         doing xrefs.
12173         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
12174         and keep the location where the throw was seen.
12175         * typeck.c (convert): When `do_not_fold' is set, do not attempt
12176         any treatment on the converted node an simply return a NOP_EXPR of
12177         the targeted type.
12178         * xref.c (xref_get_data): New function, defined.
12179         * xref.h (xref_get_data): New function, declared.
12180         (XREF_GET_DATA): Use xref_get_data.
12181
12182 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12183
12184         * gjavah.c (print_include): Cast the result of `strlen' to int
12185         when comparing against a signed value.
12186         (add_namelet): Likewise.
12187
12188 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12189
12190         * expr.c (expand_invoke): Mark parameter `nargs' with
12191         ATTRIBUTE_UNUSED.
12192         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
12193
12194         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
12195         ATTRIBUTE_UNUSED.
12196
12197         * jcf-reader.c (get_attribute): Cast a value to long
12198         when comparing against a signed expression.  Likewise.
12199
12200         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
12201         HOST_BITS_PER_CHAR.
12202
12203 1999-05-11  Andrew Haley  <aph@cygnus.com>
12204
12205         * parse.y (source_end_java_method): If the current method contains
12206         any exception handlers, force asynchronous_exceptions: this is
12207         necessary because signal handlers in libjava may throw exceptions.
12208         * decl.c (end_java_method): Ditto.
12209
12210 1999-05-11  Tom Tromey  <tromey@cygnus.com>
12211
12212         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
12213         flags.
12214         * jvspec.c (THREAD_NAME): Removed.
12215         (GC_NAME): Likewise.
12216         (MATHLIB): Likewise.
12217         (WITHLIBC): Likewise.
12218         (GCLIB): Likewise.
12219         (THREADLIB): Likewise.
12220         (MATH_LIBRARY): Likewise.
12221         (lang_specific_driver): Don't add `-l' options to command line.
12222         Instead, add a single --specs option.  Recognize `-L' options and
12223         use them to search for spec file.
12224         (find_spec_file): New function.
12225         (SPEC_FILE): New define.
12226
12227 1999-05-11  Dave Brolley  <brolley@cygnus.com>
12228
12229         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
12230         cpplib-enabled build.
12231
12232 1999-05-05  Per Bothner  <bothner@cygnus.com>
12233
12234         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
12235         temporarily zero it while calling rest_of_decl_compilation.
12236
12237         * java-tree.h (string_ptr_type_node):  Add declaration.
12238         * decl.c:  Define and initialize string_ptr_type_node.
12239         * parse.y (patch_string_cst):  Use string_ptr_type_node.
12240
12241         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
12242         * parse.y (for_statement):  Now unconditionally exit_block.
12243         (finish_labeled_statement):  No longer exit_block if for-loop.
12244         (patch_loop_statement):  Check harder if the loop is already labeled.
12245
12246         * parse.y (patch_initialized_static_field):  Removed function.
12247         (maybe_generate_clinit):  Removed special handling for interfaces.
12248         (java_complete_expand_methods):  Do a preliminary java_complete_tree
12249         on <clinit> to determine if it can be removed.
12250         (java_complete_expand_method):  Remove special handling for <clinit>.
12251         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
12252         optimize if we get back empty_stmt_node.
12253         For MODIFY_EXPR, re-do checking of static initializers.
12254         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
12255         For VAR_DECL, pass correct context.
12256
12257         * verify.c (verify_jvm_instructions):  Better error messages.
12258
12259 1999-05-03  Tom Tromey  <tromey@cygnus.com>
12260
12261         * parse-scan.y (interface_declaration): Call
12262         report_class_declaration for interfaces.
12263
12264 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
12265
12266         * Makefile.in: Remove -v from bison command lines.
12267
12268 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12269
12270         * check-init.c (check_init): Exclude a case of error when doing
12271         xrefs.
12272         * class.c (layout_class_method): Don't generate the error message
12273         twice when compiling from source.
12274         * lang-options.h: Added `-Wredundant-modifers' and
12275         `-Wunusupported-jdk11' flags and help text.
12276         * lang.c (lang_decode_option): Added support for
12277         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
12278         flag_static_local_jdk11 and flag_redundant set accordingly.
12279         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
12280         * parse.h (EXPR_WFL_ADD_COL): New macro.
12281         (DECL_END_SOURCE_LINE): Likewise.
12282         (DECL_INHERITED_SOURCE_LINE): Likewise.
12283         * parse.y (static_ref_err): New function, prototyped.
12284         (CCB_TK): Now tagged <operator>.
12285         (class_body:): Remember the location of the closing '}' of a class
12286         definition when doing xrefs.
12287         (block:): Likewise.
12288         (block_end:): Likewise.
12289         (create_class): Remember the location of the inherited class
12290         identifier when doing xrefs.
12291         (register_fields): Added test on first operand of `init' before
12292         testing it TREE_CODE.
12293         (method_header): Store the location of the class identifier in the
12294         class decl when doing xrefs.
12295         (finish_method_declaration): Don't combine first/last method line
12296         when doing xref.
12297         (java_check_regular_methods): Warning check on not overriding
12298         methods with default access on other packages move before check on
12299         static methods. Initialization of `aflags' also moved up.
12300         (resolve_expression_name): Call static_ref_err to report the error.
12301         (static_ref_err): New function, implemented.
12302         (resolve_field_access): Returned simplified static field access
12303         when doing xrefs.
12304         (resolve_qualified_expression_name): Check for illegal use of
12305         static fields in a non static context. Call static_ref_err to
12306         report error in various places.
12307         (java_complete_tree): Do not fold initialized static fields when
12308         doing xrefs.
12309         (java_complete_lhs): Likewise.
12310
12311 1999-04-29  Anthony Green  <green@cygnus.com>
12312
12313         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
12314         create internal labels.
12315         (lookup_label): Ditto.
12316
12317 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12318
12319         * class.c (layout_class_method): Generate <clinit>'s rtl for
12320         interfaces.
12321         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12322         for interfaces' <clinit>.
12323         * expr.c (lookup_field): Search for fields in interfaces.
12324         (expand_invoke): Fixed indentation.
12325         (expand_java_field_op): Likewise. Use IS_CLINIT.
12326         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
12327         (IS_CLINIT): New macro.
12328         * parse.y (type_declaration:): Call maybe_generate_clinit after an
12329         interface was parsed.
12330         (maybe_generate_clinit): Don't generate if the current class is an
12331         interface with only fields of primitive types.
12332         (reset_method_name): Use IS_CLINIT.
12333         (java_complete_expand_method): Expand <clinit> when it exists for
12334         interfaces. Use IS_CLINIT.
12335         (resolve_expression_name): Use DECL_CONTEXT instead of
12336         current_class to build static field references.
12337         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
12338         ARRAY_REF when doing xreferencing.
12339         (check_final_assignment): Fixed typo in leading comment. Use
12340         IS_CLINIT.
12341         (patch_array_ref): Don't fully expand array references when
12342         xreferencing.
12343         (patch_return): Use IS_CLINIT.
12344         (patch_throw_statement): Likewise.
12345
12346 1999-04-22  Tom Tromey  <tromey@cygnus.com>
12347
12348         * Make-lang.in (JAVA_SRCS): Added check-init.c.
12349
12350 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12351
12352         * decl.c (predef_filenames, predef_filenames_size): New globals
12353         (init_decl_processing): predef_filenames and predef_filenames_size
12354         initialized.
12355         * java-tree.h (predef_filenames, predef_filenames_size): Declared
12356         extern.
12357         * jcf-parse.c (predefined_filename_p): New function.
12358         (yyparse): Check that files on the command line are specified only
12359         once and issue a warning otherwise.
12360         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
12361         * parse.y (source_end_java_method): Nullify NOP method bodies, to
12362         avoid a gcc warning with -W -Wall turned on.
12363         (java_expand_classes): Abort if errors were encountered.
12364         (java_complete_lhs): If the cross reference flag is set, wrap
12365         field DECL node around a WFL when resolving expression name.
12366
12367 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12368
12369         * lang.c (lang_decode_option): Fixed returned value when parsing
12370         `-fxref=...' and `-Wall'.
12371         * parse.y (source_end_java_method): Do not generate code when
12372         flag_emit_xref is set.
12373         (resolve_expression_name): Do not build static field access when
12374         flag_emit_xref is set.
12375         (resolve_field_access): No special treatment on `length' when
12376         flag_emit_xref is set. Do not build qualified static field access
12377         when flag_emit_xref is set.
12378         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
12379         when flag_emit_xref is set.
12380         (patch_assignment): Do not generate array store runtime check when
12381         flag_emit_xref is set.
12382         * xref.c (xref_flag_value): Fixed function declaration
12383         indentation.
12384         (xset_set_data): New function.
12385         * xref.h (xref_set_data): Added prototype for new function.
12386         (typedef struct xref_flag_table): New field data.
12387         (XREF_GET_DATA): New macro.
12388
12389 1999-04-19  Tom Tromey  <tromey@cygnus.com>
12390
12391         * xref.h (enum): Removed trailing comma.
12392
12393         * parse.y (resolve_qualified_expression_name): Added missing
12394         `break'.
12395
12396 1999-04-15  Anthony Green  <green@cygnus.com>
12397
12398         * gjavah.c: New prototypes for java_float_finite and
12399         java_double_finite.
12400
12401 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12402
12403         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
12404         references.
12405
12406 1999-04-06  Jeffrey A Law  (law@cygnus.com)
12407
12408         * Makefile.in (TREE_H): Add tree-check.h.
12409         (RTL_H): Add genrtl.h.
12410
12411 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12412
12413         * parse.y (patch_assignment): Added ArrayStoreException runtime
12414         check.
12415
12416 1999-04-06  Per Bothner  <bothner@cygnus.com>
12417
12418         * expr.c (pop_type_0):  New function.
12419         (pop_type):  Use pop_type_0.
12420         * java-tree.h (pop_type_0):  New declaration.
12421         * verify.c (verify_jvm_instructions):  Check return instructions.
12422
12423         * parse.y (patch_binop):  Don't fold if non-constant and emiting
12424         class files.
12425
12426 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12427
12428         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
12429
12430         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
12431         (main_jcf): Don't define.
12432         (process_file): Don't set `main_jcf'.
12433
12434         * java-tree.h (main_jcf): Don't declare.
12435
12436         * jcf-parse.c (main_jcf): Add static definition.
12437
12438         * lang.c (main_jcf): Don't define.
12439
12440 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12441
12442         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
12443
12444         * decl.c (copy_lang_decl): Likewise for `bcopy'.
12445
12446         * jcf-depend.c: Include "config.h", not <config.h>.
12447
12448         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
12449         `bcopy' to PTR.
12450
12451         * jcf-path.c: Include "config.h", not <config.h>.
12452
12453         * lex.c: Don't include various system header files.
12454         (java_init_lex): Cast the argument of `bzero' to PTR
12455
12456         * parse-scan.y (java_push_parser_context): Likewise.
12457
12458         * parse.y (java_push_parser_context): Likewise.
12459         (patch_bc_statement): Match format specifier to variable argument.
12460
12461         * xref.c: Don't include <stdio.h>.
12462
12463 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12464
12465         * parse.y (struct parser_ctxt *ctxp): Now global.
12466         (declare_local_variables): Use WFL compound value for the
12467         declaration source line value, when doing cross-referencing.
12468
12469 1999-03-31  Tom Tromey  <tromey@cygnus.com>
12470
12471         * gjavah.c (print_field_info): Allow constants of other types.
12472         (print_include): Generate include when new name is proper prefix
12473         of already printed name.
12474         (add_namelet): Likewise.
12475         (cxx_keyword_subst): New function.
12476         (print_method_info): Use it.
12477         (print_field_name): New function.
12478         (get_field_name): New function.
12479         (print_field_info): Use get_field_name and print_field_name.
12480
12481 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12482
12483         * Makefile.in (keyword.h): Generate using gperf language 'C', not
12484         'KR-C', so gperf uses the `const' keyword on strings.
12485
12486         * keyword.gperf (java_keyword): Const-ify a char*.
12487
12488 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12489
12490         * parse.y (patch_bc_statement): Fixed identation and a bogus
12491         `printf' format.
12492
12493 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12494
12495         * parse.y (patch_assignment): Allow static variables in other
12496         classes to be assigned.
12497
12498 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12499
12500         * class.c (maybe_add_interface): Remove unused variable
12501         `interface_binfo'.
12502         (make_class_data): Use = for assignment, not ==.  Likewise.
12503         (emit_register_classes): Remove unused variable `decl'.
12504
12505         * lex.c: Fix comment so as not to contain an embedded `/*'.
12506
12507         * verify.c (verify_jvm_instructions): Remove unused variable
12508         `self_type'.
12509
12510 1999-03-27  Per Bothner  <bothner@cygnus.com>
12511
12512         * parse.y (complete_loop_body):  Rename to finish_loop_body.
12513         (complete_labeled_statement):  Rename to finish_labeled_statement.
12514         (complete_for_loop):  Rename to finish_for_loop.
12515         (complete_method_declaration):  Rename to finish_method_declaration.
12516
12517         * java-tree.h (continue_identifier_node):  New global node.
12518         * decl.c:  Define and initialize continue_identifier_node.
12519         * parse.y (generate_labeled_block):  Remove - no longer needed.
12520         (build_loop_body):  Use continue_identifier_node for continue block.
12521         (finish_labeled_statement):  Also do pop_labeled_block actions.
12522         (java_complete_lhs):  POP_LOOP even if error.
12523         (build_labeled_block):  Special handling for continue_identifier_node.
12524         (patch_loop_statement):  Re-organize.
12525         (patch_bc_statement):  Re-write.
12526
12527 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12528
12529         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
12530         using a WFL compound value.
12531         * parse.y (xref.h): Include.
12532         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
12533         WFL compound value.
12534         (register_fields): Set WFL compound value to lineno if doing
12535         xrefs.
12536         (java_complete_expand_method): Call expand_xref if flag_emit_xref
12537         is set.
12538         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
12539         * xref.h (expand_xref): Prototype renamed from xref_generate.
12540
12541 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12542
12543         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
12544         (GET_CURRENT_BLOCK): New macro.
12545         * parse.y (current_static_block): New global variable.
12546         (method_body:): Define action.
12547         (complete_method_declaration): Set current_function_decl to NULL
12548         when work on the current method is done.
12549         (declare_local_variables): Use GET_CURRENT_BLOCK.
12550         (java_method_add_stmt): Likewise.
12551         (java_complete_expand_method): Disable the use of `this' when
12552         expanding <clinit>.
12553         (enter_a_block): If no current method exist, use
12554         current_static_block to link static initializer blocks.
12555         (exit_block): Rewritten to use current_static_block when no current
12556         method decl exists.
12557         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
12558         (patch_return): Forbid the use of `return' in static initializers.
12559         (patch_throw_statement): Fixed indentation. Issue specific error
12560         for uncaught thrown checked exception in static initializer
12561         blocks. Removed FIXME.
12562
12563 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
12564
12565         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
12566         Link gcj from gcc.o.
12567
12568 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12569
12570         * parse.y (find_applicable_accessible_methods_list): When dealing
12571         with interface: ensure that a given interface or java.lang.Object
12572         are searched only once.
12573
12574 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12575
12576         * gjavah.c (print_c_decl): Remove unused argument `flags'.
12577
12578         * jcf-dump.c (print_access_flags): Add braces around if-else.
12579
12580         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
12581         COMBINE_INPUTS.
12582
12583         * lex.c (build_wfl_node): Add static prototype.
12584
12585         * lex.h (build_wfl_node): Remove static prototype.
12586
12587         * parse.y: Include lex.c early enough to declare everything needed.
12588         Ensure calls to `build_wfl_node' pass the proper arguments.
12589         (create_class): Remove unused variable `super_decl'.
12590         (get_printable_method_name): Initialize variable `name'.
12591
12592 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12593
12594         * Changelog: Fixed 1999-03-22 typos.
12595         * lang.c (lang_decode_option): Fixed typo in error string in the
12596         XARG section.
12597
12598 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12599
12600         * Makefile.in (JAVA_OBJS): Added entry xref.o.
12601         (xref.o): New rule.
12602         * java-tree.h (flag_emit_xref): Declared extern.
12603         * lang.c (xref.h): Included.
12604         (flag_emit_xref): New global variable.
12605         (lang_decode_option): Added support for -fxref.
12606         * xref.c: Created.
12607         * xref.h: Likewise.
12608
12609 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
12610
12611         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
12612         linked with.
12613
12614 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12615
12616         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
12617         $(srcdir)/../system.h and $(JAVA_TREE_H).
12618         (jcf-io.o): Depend on $(JAVA_TREE_H).
12619         (mangle.o): Likewise.
12620
12621         * check-init.c (check_cond_init): Add static prototype.
12622
12623         * class.c (build_java_method_type, hashUtf8String,
12624         make_field_value, get_dispatch_vector, get_dispatch_table,
12625         append_gpp_mangled_type, mangle_static_field): Likewise.
12626         (strLengthUtf8): Hide unused definition.
12627         (hashUtf8String): Const-ify.
12628         (make_field_value): Un-ANSI-fy.
12629
12630         * constants.c: Move inclusion of jcf.h above java-tree.h.
12631         (set_constant_entry, find_class_or_string_constant,
12632         find_name_and_type_constant, get_tag_node,
12633         build_constant_data_ref): Add static prototype.
12634
12635         * decl.c (push_jvm_slot, builtin_function,
12636         lookup_name_current_level): Likewise.
12637         (builtin_function): Const-ify.
12638
12639         * except.c (expand_start_java_handler, expand_end_java_handler):
12640         Add static prototype.
12641
12642         * expr.c (flush_quick_stack, push_value, pop_value,
12643         java_stack_swap, java_stack_dup, build_java_athrow,
12644         build_java_jsr, build_java_ret, expand_java_multianewarray,
12645         expand_java_arraystore, expand_java_arrayload,
12646         expand_java_array_length, build_java_monitor, expand_java_pushc,
12647         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
12648         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
12649         expand_compare, expand_test, expand_cond, expand_java_goto,
12650         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
12651         expand_java_field_op, java_push_constant_from_pool): Likewise.
12652
12653         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
12654         (build_java_arraynull_check): Mark parameters `node' and `type'
12655         with ATTRIBUTE_UNUSED.
12656         (note_label): Likewise for parameter `current_pc'.
12657         (expand_java_call, expand_java_ret): Hide unused definition.
12658
12659         * java-tree.h (make_class, build_constants_constructor,
12660         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
12661         init_outgoing_cpool, register_class, emit_register_classes,
12662         java_layout_seen_class_methods): Prototype.
12663         (unicode_mangling_length): Const-ify.
12664         (append_gpp_mangled_name, append_gpp_mangled_classtype,
12665         emit_unicode_mangled_name, format_int, format_uint,
12666         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
12667         jcf_print_utf8_replace, open_class): Prototype.
12668
12669         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
12670         <stdio.h>.  Include tree.h/java-tree.h.
12671         (utf8_equal_string usage, process_class): Add static prototype.
12672         (open_class): Don't prototype this here.
12673         (utf8_equal_string): Match arguments to format specifiers.
12674         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
12675         TABLE_SWITCH, disassemble_method): Likewise.
12676
12677         * jcf-io.c: Include tree.h/java-tree.h.
12678         (open_class, find_classfile, jcf_print_utf8,
12679         jcf_print_utf8_replace): Const-ify.
12680
12681         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
12682         parse_class_file): Add static prototype.
12683         (find_in_current_zip): Match definition to existing static
12684         prototype.
12685
12686         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
12687         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
12688         finish_jcf_block, define_jcf_label, get_jcf_label_here,
12689         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
12690         write_chunks, adjust_typed_op, generate_bytecode_conditional,
12691         generate_bytecode_return, perform_relocations, init_jcf_state,
12692         init_jcf_method, release_jcf_state, generate_classfile):
12693         Add static prototype.
12694         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
12695         (make_class_file_name): Const-ify.
12696
12697         * jcf.h (find_classfile): Const-ify.
12698
12699         * jv-scan.c (reset_report): Remove prototype.
12700
12701         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
12702         (error): Rewrite to allow varargs.
12703
12704         * lang.c (lang_f_options): Const-ify.
12705
12706         * lex.c (java_parse_escape_sequence): Add static prototype.
12707         (java_allocate_new_line): Match definition to existing static
12708         prototype.
12709
12710         * mangle.c Include tree.h/java-tree.h.
12711         (unicode_mangling_length, emit_unicode_mangled_name,
12712         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
12713
12714         * parse.h (jdep_code): Remove trailing comma in enumeration.
12715         (java_get_line_col): Move prototype outside of !JC1_LITE test.
12716         (reset_report): Add prototype.
12717
12718         * verify.c (push_pending_label, merge_types): Add static
12719         prototypes.
12720
12721         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
12722
12723 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12724
12725         * parse.y (find_applicable_accessible_methods_list): Extend the
12726         search to superinterfaces when relevant.
12727         (search_applicable_methods_list): New function.
12728
12729 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12730
12731         * class.c (unmangle_classname): Implemented stricter testing
12732         before setting the QUALIFIED_P flag on an identifier.
12733
12734 1999-03-16  Per Bothner  <bothner@cygnus.com>
12735
12736         * parse.y (java_complete_lhs):  Call force_evaluation_order
12737         after patch_newarray.
12738         (patch_binop):  Don't call fold if there are side effects.
12739
12740 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12741
12742         * parse.y (java_stabilize_reference): Use save_expr instead of
12743         building a SAVE_EXPR node.
12744         (java_complete_lhs): Patch the resulting string of the `+='
12745         operator (if necessary) and complete the RHS after having built
12746         the cast.
12747
12748 1999-03-15  Per Bothner  <bothner@cygnus.com>
12749
12750         * class.c (make_class):  Don't set CLASS_P here (because
12751         this function is also called by build_java_array_type).
12752         (push_class):  Set CLASS_P here instead.
12753         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
12754
12755         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
12756         context.  If the context is class, perfer "super" over "synchronized".
12757         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
12758
12759         * parse.y (create_class):  Don't call parser_check_super here;
12760         it is not robust.  Always wait until later.
12761
12762         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
12763         match what JDK 1.2 does), but don't set ACC_PUBLIC.
12764
12765 1999-03-13  Per Bothner  <bothner@cygnus.com>
12766
12767         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
12768         * lex.h (UNGETC):  Change misleading macro.
12769
12770 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12771
12772         * parse.y (java_stabilize_reference): Return NODE when patching a
12773         COMPOUND_EXPR.
12774         (java_complete_lhs): Put parenthesis around truth values.
12775
12776 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12777
12778         * class.c (layout_class_method): Don't make rtl for interface
12779         methods.
12780         * parse.h (GET_TYPE_NAME): New macro.
12781         * parse.y (if_then_statement:): Fixed indentation.
12782         (if_then_else_statement:): Likewise.
12783         (for_statement:): Fixed spacing.
12784         (try_statement:): Fixed indentation.
12785         (create_interface): Don't force interfaces to be abstract.
12786         (method_header): Abstract methods are OK in interfaces.
12787         (declare_local_variables): Fixed typo in comment.
12788         (java_complete_expand_method): Fixed indentation.
12789         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
12790         non accessible fields.
12791         (java_stabilize_reference): New function.
12792         (java_complete_lhs): Fixed indentation. Use
12793         java_stabilize_reference in compound assignment. Insert the
12794         cast. If not processing `+' fix string constants before processing
12795         binop.
12796
12797 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12798
12799         * constants.c (find_class_or_string_constant): Cast variable `j'
12800         to a `jword' when comparing against one.
12801
12802         * expr.c (java_lang_expand_expr): Remove unused variables
12803         `has_finally_p' and `op0'.
12804
12805         * gjavah.c (print_field_info): Cast a value to jint when comparing
12806         against one.  Likewise for a jlong.
12807         (add_namelet): Likewise cast a `sizeof' to an int when comparing
12808         against a signed quantity.
12809
12810         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
12811         (print_signature): Don't needlessly dereference variable `str'
12812
12813         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
12814         `max_locals' with ATTRIBUTE_UNUSED.
12815         (jcf_parse_class): Likewise for variable `index'.
12816
12817         * parse.h (reverse_jdep_list): Remove static prototype.
12818
12819         * parse.y (build_jump_to_finally): Remove prototype and definition.
12820         (reverse_jdep_list): Add static prototype.
12821
12822         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
12823         `assignment' and `expr_decl'.
12824
12825         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
12826
12827 1999-03-12  Andrew Haley  <aph@cygnus.com>
12828
12829         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
12830         we'll need a directory separator and a null character.
12831
12832 1999-03-10  Per Bothner  <bothner@cygnus.com>
12833
12834         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
12835
12836   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12837
12838         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
12839         interfaces.
12840
12841 1999-03-05  Per Bothner  <bothner@cygnus.com>
12842
12843         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
12844
12845         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
12846
12847         * class.c (layout_class_method):  A static method in a base class
12848         is never overridden, so treat it like it doesn't exist.
12849         However, do complain about private non-static method overriding
12850         public static method.
12851
12852         * parse.y:  Don't set unused INITIALIZED_P flag.
12853         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
12854
12855         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
12856         (build_array_from_name):  Re-order &index[string] to &string[index].
12857
12858         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
12859         error_mark (it might catch more errors, but it is more likely to lose).
12860
12861 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12862
12863         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
12864         (parse-scan.o): Depend on toplev.h.
12865
12866         * class.c (make_method_value): Add prototype.  Make it static.
12867         Remove unused second argument, caller changed.
12868
12869         * expr.c (java_lang_expand_expr): Remove unused variable
12870         `return_label'.
12871
12872         * java-tree.h: Don't prototype find_in_current_zip.
12873         Add prototypes for verify_constant_pool, start_java_method,
12874         end_java_method, give_name_to_locals, expand_byte_code,
12875         open_in_zip, set_constant_value, find_constant1, find_constant2,
12876         find_utf8_constant, find_string_constant, find_class_constant,
12877         find_fieldref_index, find_methodref_index, write_constant_pool,
12878         count_constant_pool_bytes and encode_newarray_type.
12879
12880         * jcf-dump.c: Remove unused variable `LONG_temp'.
12881
12882         * jcf-parse.c: Include parse.h.
12883         (jcf_parse_source): Remove unused parameter, all callers changed.
12884         (jcf_figure_file_type): Add static prototype.
12885         (find_in_current_zip): Likewise.  Also remove unused parameter,
12886         all callers changed.
12887         (read_class): Initialize variable `saved_pos'.
12888
12889         * jcf-reader.c (jcf_parse_preamble): Mark variables
12890         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
12891
12892         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
12893         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
12894         (java_parse_doc_section): Initialize variable `seen_star'.
12895         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
12896         (java_lex_error): Mark parameters `msg' and `forward' with
12897         ATTRIBUTE_UNUSED.
12898         (java_get_line_col): Mark parameters `filename' and `line' with
12899         ATTRIBUTE_UNUSED.
12900
12901         * parse-scan.y: Include toplev.h.
12902         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
12903
12904         * parse.h: use `struct JCF', not plain `JCF'.
12905         (java_parser_context_save_global, java_expand_classes
12906         java_parser_context_restore_global, java_parse): Add prototypes.
12907
12908         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
12909         `node'.
12910
12911 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
12912
12913         *  check-init.c (check_init):  COPYN takes word count, not bit count.
12914
12915 1999-02-26  Per Bothner  <bothner@cygnus.com>
12916
12917         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
12918         explicit build_decl.  (Avoids crash in reload when optimizing.)
12919
12920 1999-02-25  Per Bothner  <bothner@cygnus.com>
12921
12922         * decl.c (complete_start_java_method):  Handle synchronized method
12923         even when compiling from bytecode.
12924
12925 1999-02-26  Tom Tromey  <tromey@cygnus.com>
12926
12927         * gjavah.c (add_class_decl): Only generate `#include' if outer
12928         class is not the name of the class we are processing.  Correctly
12929         append `.h' in #include.
12930         (process_file): Clean up newlines around generated `#include's.
12931         (decode_signature_piece): Correctly handle inner classes.
12932         (struct include): New structure.
12933         (all_includes): New global.
12934         (print_include): New function.
12935         (add_class_decl): Use it.
12936         (process_file): Likewise.
12937         (add_class_decl): Generate include for java-array.h if array
12938         seen.
12939         (process_file): Don't generate java-array.h include.
12940
12941         * gjavah.c (add_namelet): Check for standard package names here.
12942         (add_class_decl): Don't check for standard package names here.
12943
12944 1999-02-25  Tom Tromey  <tromey@cygnus.com>
12945
12946         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
12947         When reading a zip file, only use strncmp if both strings are
12948         bigger than the buffer length.  Initialize `k' when looping
12949         through zip file.
12950
12951 1999-02-24  Tom Tromey  <tromey@cygnus.com>
12952
12953         * gjavah.c (struct namelet): New structure.
12954         (add_namelet): New function.
12955         (print_namelet): New function.
12956         (print_class_decls): Use add_namelet and print_namelet to generate
12957         namespaces and not classes.
12958         (method_printed): New global.
12959         (HANDLE_END_METHOD): Examine method_printed.
12960         (print_method_info): Set method_printed when required.  Print
12961         error if function to be ignored is marked virtual.  Handle $finit$
12962         method.
12963         (METHOD_IS_FINAL): New macro.
12964         (print_field_info): Use it.
12965         (HANDLE_METHOD): Clear method_printed.
12966         (method_pass): New global.
12967         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
12968         (process_file): Do two passes over both fields and methods.
12969         (HANDLE_METHOD): Examine method_pass.
12970         (root): New global.
12971         (add_class_decl): New function.
12972         (print_class_decls): Don't scan over entire constant pool.
12973
12974 1999-02-23  Tom Tromey  <tromey@cygnus.com>
12975
12976         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
12977         disable linking in that case.
12978
12979 1999-02-20  Tom Tromey  <tromey@cygnus.com>
12980
12981         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
12982         not 0x1f.
12983
12984 1999-02-21  Per Bothner  <bothner@cygnus.com>
12985
12986         * decl.c (build_result_decl), java-tree.h:  New method.
12987         (complete_start_java_method):  Handle synchronized methods.
12988         Don't build DECL_RESULT here.  (Ordering dependency problem.)
12989         (start_java_method):  Call build_result_decl here instead  ...
12990         * parse.y (java_complete_expand_method):  ... and here.
12991         (expand_start_java_method): Don't call complete_start_java_method here.
12992         (java_complete_expand_method):  Call it here instead.
12993         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
12994         * java-tree.h:  ... here.
12995
12996         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
12997         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
12998         for ARRAY_REF - it doesn't work when array bounds are checked.
12999         (patch_array_ref):  Handle it here instead.
13000
13001         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
13002
13003 1999-02-19  Per Bothner  <bothner@cygnus.com>
13004
13005         Force left-to-right evaluation of binary operations etc.
13006         * expr.c (force_evaluation_order), java-tree.h:  New function.
13007         * parse.y (java_complete_lhs):  Pass binary operations, procedure
13008         calls, and ARRAY_REFs to force_evaluation_order.
13009         (various):  Set TREE_SIDE_EFFECTS more carefully.
13010
13011         Tolerate random (non-UTF8) encoding in comments without complaining.
13012         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
13013         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
13014
13015         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
13016         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
13017
13018         * parse.y (java_complete_lhs):  Ignore an empty statement in a
13019         COMPOUND_EXPR.  Don't complain about empty statement after return.
13020
13021 1999-02-19  Per Bothner  <bothner@cygnus.com>
13022
13023         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
13024         in TREE_LIST - just chain the POINTER_TYPEs together.
13025         (resolve_class):  If type already resolved, return decl.
13026         After resolving, update TREE_TYPE(class_type), and name (if array).
13027         * parse.h (do_resolve_class), parse.y:  Make non-static.
13028         * class.c (maybe_layout_super_class):  Take this_class argument.
13029         Do do_resolve_class if necessary.
13030         (layout_class, layout_class_methods): Adjust calls appropriately.
13031         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13032         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
13033         * typeck.c (build_java_array_type):  Don't call layout_class.
13034
13035 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13036
13037         * parse.y (check_pkg_class_access): Allow private class access
13038         within the same package.
13039         (strip_out_static_field_access_decl): New function.
13040         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
13041         operator argument before testing its nature.
13042
13043 1999-02-03  Per Bothner  <bothner@cygnus.com>
13044
13045         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
13046         (TRY_EXPR):  Simplify - it no longer has a finally clause.
13047         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
13048         Simpler handling of TRY_EXPR, which no longer has a finally clause.
13049         * expr.c (java_lang_expand_expr):  Likewise.
13050         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
13051         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
13052         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
13053         (build_try_statement):  Remove finally parameter and handling.
13054         (build_try_finally_statement):  New function.
13055         (patch_try_statement):   No longer need to support finally clause.
13056         (try_statement):  Update grammar action rules.
13057         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
13058         Simpler handling of TRY_EXPR, which no longer has a finally clause.
13059
13060 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
13061
13062         * jcf-parse.c (get_constant): Add braces around computation of 'd'
13063         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
13064
13065 1999-02-17  Andrew Haley  <aph@cygnus.com>
13066
13067         * class.c (build_utf8_ref): Back out broken patch which was
13068         intended to to output signatures using '.' as a separator.
13069
13070         * class.c (make_class_data): Output signatures using '.' as a
13071         separator, rather than '/'.
13072         (mangled_classname): Likewise.
13073         (make_field_value): Likewise.
13074         (make_method_value): Likewise.
13075         * constants.c (alloc_class_constant): Likewise.
13076         * expr.c (build_invokeinterface): Likewise.
13077
13078 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13079
13080         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
13081         of an ancient workaround.
13082
13083 1999-02-10  Jeffrey A Law  (law@cygnus.com)
13084
13085         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
13086         here anymore.
13087
13088 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13089
13090         * lex.c (yylex): Encode \0 as UTF8.
13091
13092 1999-02-10  Tom Tromey  <tromey@cygnus.com>
13093
13094         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
13095         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
13096         (libgcj_zip): Renamed.
13097         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
13098         LIBJAVA_ZIP_FILE.
13099         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
13100
13101         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
13102         (GC_NAME): Renamed -lgc to -lgcjgc.
13103
13104 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13105
13106         * lex.c (java_lang_cloneable): Initialize.
13107         * parse.y (java_lang_cloneable): New static variable.
13108         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
13109         doing one more qualification round.
13110         (valid_ref_assignconv_cast_p): Reject null source or
13111         destination. Allow an array to be cast into java.lang.Cloneable.
13112         (patch_cast): Swapped two first arguments to first call to
13113         valid_ref_assignconv_cast_p.
13114
13115 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13116
13117         * parse.h: DECL_P renamed JDECL_P.
13118         * parse.y: DECL_P replaced by JDECL_P.
13119         (build_array_from_name): Always use pointer's type.
13120         (patch_bc_statement): Extra code to search continue target in a
13121         for loop. Fixed comments. Continue target is current loop when
13122         unlabeled.
13123
13124 1999-02-05  Andrew Haley  <aph@cygnus.com>
13125
13126         * class.c (make_class_data): The superclass of an interface should
13127         be null, not class Object.
13128
13129         * lex.c (java_lex): Sign extend hex literals.
13130
13131 1999-02-04  Andrew Haley  <aph@cygnus.com>
13132
13133         * class.c (build_utf8_ref): Output signatures using '.' as a
13134         separator, rather than '/'.
13135         (make_class_data): Likewise.
13136
13137 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
13138
13139         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
13140         mkstemp.o.  Get them from libiberty now.
13141
13142 1999-02-02  Jeffrey A Law  (law@cygnus.com)
13143
13144         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
13145
13146 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13147
13148         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
13149         from libiberty.h
13150
13151 1999-02-02  Per Bothner  <bothner@cygnus.com>
13152
13153         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
13154         * jcf-write.c (generate_bytecode_return):  New function.
13155         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
13156
13157         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
13158         generate special [fd]const_[01] instructions.
13159
13160         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
13161
13162         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
13163         handling OPCODE_lookupswitch or OPCODE_tableswitch.
13164
13165 1999-02-01  Per Bothner  <bothner@cygnus.com>
13166
13167         * parse.y (patch_method_invocation):  Handle calling static methods,
13168         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
13169
13170         * parse.y (java_complete_lhs):  Don't complain about unreachable
13171         exit condition in a do-while statement.
13172
13173 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13174
13175         * lex.c (java_read_char): Fixed utf8 decoding.
13176         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
13177         range.
13178         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
13179         comments. Local variable `all_primitive' is gone. Broadened
13180         acceptance of `0' to floating point targets. `long' can now be
13181         widened to `double' or `float'.
13182         (valid_method_invocation_conversion_p): Added leading
13183         comment. Fixed tabulation.
13184         (build_string_concatenation): Optimize out left or right empty
13185         string constants.
13186
13187 1999-01-28  Per Bothner  <bothner@cygnus.com>
13188
13189         * jcf-write.c (localvar_alloc):  Only emit entry for
13190         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
13191         (generate_bytecode_insns):  Only call put_linenumber if
13192         debug_info_level > DINFO_LEVEL_NONE.
13193         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
13194         is specified, add -g1 (for compatibility wih javac).
13195
13196 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
13197
13198         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
13199         gjavah.o, check-init.o, jv-scan.o
13200
13201 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13202
13203         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
13204
13205         * gjavah.c: Include config.h and system.h.
13206
13207         * javaop.h (inline): Don't define, its handled by system.h.
13208         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
13209         from `inline' to `static inline'.
13210
13211         * jcf.h (inline): Don't define, its handled by system.h.
13212
13213         * lex.c (inline): Likewise.
13214
13215 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
13216
13217         * lang-specs.h: Map -Qn to -fno-ident.
13218
13219 1999-01-29  Richard Henderson  <rth@cygnus.com>
13220
13221         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
13222
13223 1999-01-29  Tom Tromey  <tromey@cygnus.com>
13224
13225         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
13226         then cast it to Object before calling `append' method.
13227
13228 1999-01-28  Per Bothner  <bothner@cygnus.com>
13229
13230         * check-init.c (check_bool2_init, check_bool_init, check_init):
13231         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
13232         * jcf-write.c (generate_bytecode_insns):  Likewise.
13233
13234 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13235
13236         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
13237         * parse.y (patch_cast): Allow a boolean to be cast into a
13238         boolean.
13239
13240 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13241
13242         * parse.y: (class_declaration:): Fixed indentation.
13243         (class_member_declaration:): Extra `;' after field declaration now
13244         accepted.
13245         (interface_declaration:): Removed debug messages in error reports.
13246         (patch_binop): Nodes created and returned inherit the orignal
13247         node's COMPOUND_ASSIGN_P flag value.
13248         (patch_cast): Fix cast from char to floating point.
13249
13250 1999-01-25  Andrew Haley  <aph@cygnus.com>
13251
13252         * except.c, java-except.h (expand_resume_after_catch): new
13253         function.
13254         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
13255         to branch back to main flow of control after a catch block.
13256
13257 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13258
13259         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
13260         $(srcdir)/../system.h.
13261         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
13262         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
13263         (jcf-write.o): Likewise.
13264         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13265         (mangle.o): Depend on $(srcdir)/../toplev.h.
13266         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13267         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13268
13269         * class.c: Include output.h and parse.h.
13270         (mangled_classname): Add the `const' keyword to a char*.
13271         (find_named_method): Hide unused function definition.
13272         (build_utf8_ref): Change type of variable `c' to unsigned char.
13273         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
13274         (build_class_ref): Add the `const' keyword to a char*.
13275         (layout_class_method): Remove unused variable `buf'.
13276
13277         * decl.c (find_local_variable): Remove unused variable `rtl'.
13278         (pushdecl): Likewise for variables `different_binding_level' and
13279         `oldglobal'.
13280         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
13281         (maybe_build_cleanup): Likewise for parameter `decl'.
13282
13283         * except.c (expand_start_java_handler): Mark parameter `range'
13284         with ATTRIBUTE_UNUSED.
13285
13286         * expr.c: Include except.h.
13287         (pop_type): Remove unused variable `i'.
13288         (pop_value): Likewise for variables `n_words' and `i'.
13289         (expand_java_arrayload): Likewise for variable `convert'.
13290         (java_lang_expand_expr): Likewise for variables `op0', `type',
13291         `mode', `unsignedp', `node' and `elements'.
13292         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
13293         `eh_ranges'.
13294         (process_jvm_instruction): Add a `const' qualifier to a char*.
13295
13296         * gjavah.c (output_directory): Add the `const' keyword to a char*.
13297         (temp_directory): Likewise.
13298         (print_c_decl): Likewise.
13299         (print_method_info): Likewise.
13300         (decode_signature_piece): Likewise.
13301         (print_mangled_classname): Likewise.
13302
13303         * java-except.h: Provide prototypes for maybe_start_try,
13304         maybe_end_try and add_handler.
13305
13306         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
13307         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
13308         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
13309         init_expr_processing, push_super_field, init_class_processing,
13310         can_widen_reference_to, class_depth, verify_jvm_instructions,
13311         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
13312         set_local_type, merge_type_state, push_type, load_type_state,
13313         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
13314         emit_unicode_mangled_name): Add prototypes.
13315
13316         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
13317         (print_signature_type): Use ISDIGIT, not isdigit.
13318         (print_signature): Remove unused variable `j'.
13319
13320         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
13321         int when comparing against one.
13322
13323         * jcf-parse.c: Include toplev.h.
13324
13325         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
13326         (localvar_free): Remove unused variable `i'.
13327         (generate_bytecode_conditional): Likewise for variable `kind'.
13328
13329         * jv-scan.c: Include config.h and system.h.  Remove redundant
13330         OS header and gansidecl.h includes.
13331         (warning): Add the `const' keyword to a char*.  Also add
13332         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
13333         __STDC__, when determining whether to use ANSI-isms.
13334         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
13335         (xmalloc): Don't redundantly prototype here.
13336         (main): Remove unused parameter `envp'.  Also fix the arguments
13337         passed to function `fatal' to match the format specifier.
13338
13339         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
13340
13341         * mangle.c: Include toplev.h.
13342         (emit_unicode_mangled_name): Declare parameter `len'.
13343
13344         * parse.y (parse_warning_context): Add the `const' keyword to a
13345         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
13346         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
13347         (issue_warning_error_from_context): Add the `const' keyword to
13348         a char*.
13349         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
13350         not `__STDC__' for whether to use ANSI-isms.
13351
13352         * typeck.c (incomplete_type_error): Mark parameters `value' and
13353         `type' with ATTRIBUTE_UNUSED.
13354         (parse_signature_type): Use ISDIGIT, not isdigit.
13355
13356         * verify.c (check_pending_block): Add the `const' keyword to a char*.
13357         (verify_jvm_instructions): Likewise.  Remove unused variables
13358         `field_name' and `default_val'.
13359
13360         * zextract.c: Include config.h and system.h.  Remove redundant
13361         OS header includes.
13362
13363         * zipfile.h: Prototype `read_zip_archive'.
13364
13365 1999-01-21  Andrew Haley  <aph@cygnus.com>
13366
13367         * typeck.c (convert): Allow conversions to void type: some
13368         optimizations in gcc do this.
13369
13370 1999-01-21  Andrew Haley  <aph@cygnus.com>
13371
13372         * typeck.c (convert_ieee_real_to_integer): New function.
13373         (convert): When not using fast-math and using hardware fp, convert
13374         an IEEE NaN to zero.
13375
13376 1999-01-18  Andrew Haley  <aph@cygnus.com>
13377
13378         * parse.y (patch_binop): Do a type conversion from signed to
13379         unsigned and then back to signed when a ">>>" is found.
13380
13381 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13382
13383         * java-tree.h: (check_for_initialization): Added prototype.
13384         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
13385         * parse.y (do_resolve_class): Removed unused locals.
13386         (read_import_dir): Likewise.
13387         (resolve_qualified_expression_name): Array creation
13388         expressions are valid primary expressions.
13389         (qualify_ambiguous_name): Likewise.
13390         (patch_synchronized_statement): Removed unused local.
13391
13392 1999-01-17  Jeffrey A Law  (law@cygnus.com)
13393
13394         * Makefile.in (zextract.o): Add dependencies.
13395
13396         * Makefile.in: Do not put ^Ls at the start of a line.
13397
13398 1999-01-15  Per Bothner  <bothner@cygnus.com>
13399
13400         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
13401         sub-type the result of the call that gets the exception value.
13402
13403         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
13404         don't call finish_class.
13405
13406         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
13407         clear found before continuing.
13408
13409         * verify.c (verify_jvm_instructions):  On an array load, allow
13410         and handle top of stack to be TYPE_NULL.
13411
13412         * gjavah.c (generate_access):  Translate Java package private or
13413         protected access to C++ public, but with a comment.
13414
13415 1999-01-13  Andrew Haley  <aph@cygnus.com>
13416
13417         * expr.c (generate_name): Name prefix changed to avoid clashes
13418         with assembler temp labels.
13419
13420         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
13421         MODIFY_EXPR.  Without this, code for the assignment may not be
13422         generated at all and the synchronized statement will read an
13423         uninitialized variable.
13424
13425 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13426
13427         * class.c (maybe_layout_super_class): Fixed returned value.
13428         * lex.c: Added 1999 to the copyright.
13429         (java_init_lex): Initialize java_lang_imported.
13430         * lex.h: Added 1999 to the copyright.
13431         * parse.h: Added 1999 to the copyright.
13432         (REGISTER_IMPORT): Fixed typo in trailing macro.
13433         (CURRENT_OSB): New macro.
13434         (struct parser_ctxt): New fields osb_depth, osb_limit.
13435         * parse.y (java_lang_id): New global variable.
13436         (type_import_on_demand_declaration): Don't import java.lang.* twice.
13437         (array_creation_expression:): Use CURRENT_OSB.
13438         (dims:): Uses a stack to keep track of array dimensions.
13439         (cast_expression:): Use CURRENT_OSB.
13440         (find_expr_with_wfl): Return NULL if node found doesn't meet the
13441         conditions.
13442         (register_fields): Fixed typos in comment.
13443         (check_method_redefinition): Fixed comment indentation.
13444         (java_check_regular_methods): Set saved found wfl to NULL after
13445         having reinstalled it in the previously found DECL_NAME.
13446
13447 1999-01-10  Richard Henderson  <rth@cygnus.com>
13448
13449         * gjavah.c (java_float_finite): Use a union to do type punning.
13450         (java_double_finite): Likewise.
13451
13452 1999-01-09  Per Bothner  <bothner@cygnus.com>
13453
13454         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
13455         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
13456         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
13457         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
13458         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
13459         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
13460
13461 1999-01-08  Per Bothner  <bothner@cygnus.com>
13462
13463         * check-init.c (check_init):  If compiling to native, we don't
13464         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
13465
13466 1999-01-08  Tom Tromey  <tromey@cygnus.com>
13467
13468         * parse-scan.y (variable_declarator_id): Set or increment
13469         bracket_count.
13470         (bracket_count): New global.
13471         (formal_parameter): Handle case where bracket pairs trail variable
13472         declarator id.
13473
13474 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
13475
13476         * jcf-parse.c (yyparse): variable len changed from a char to an
13477         int to prevent overflow.
13478
13479 1999-01-06  Per Bothner  <bothner@cygnus.com>
13480
13481         * java-tree.h:  Declare read_class.
13482         * jcf-parse.c (read_class):  New function.
13483         (load_class):  Now just call read_class.
13484
13485         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
13486         * jcf-parse.c (parse_source_file):  Declare save_error_count,
13487         which is needed by java_parse_abort_on_error macro,
13488         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
13489
13490         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
13491         constructor, if initializing a static field.
13492         (patch_new_array_init):  Set TREE_CONSTANT if it is.
13493         * expr.c (java_lang_expand_expr):  For a static array constructor
13494         of primitive elements, allocate the array itself statically.
13495         Disabled until we can set the vtable field statically.
13496
13497         * check-init.c:  New file.  Checks for definite assignment.
13498         * Makefile.in (JAVA_OBJS):  Add check-init.o.
13499         * parse.y (java_complete_expand_method): Call check_for_initialization.
13500         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
13501
13502 1999-01-06  Graham <grahams@rcp.co.uk>
13503
13504         * parse.y : include system.h instead of including
13505         standard headers directly with the exception of <dirent.h>.
13506
13507 1999-01-06  Per Bothner  <bothner@cygnus.com>
13508
13509         * lex.h:  Moved static function declarations to lex.c,
13510         to shut up some -Wall warnings.
13511         * lex.c:  Static function declarations moved here.
13512         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
13513
13514 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13515
13516         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
13517
13518 1998-12-22  Per Bothner  <bothner@cygnus.com>
13519
13520         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
13521         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
13522
13523         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
13524         (localvar_alloc):  Change return type to void,
13525         (emit_unop):  Remove unused variable size.
13526
13527         * jcf-write.c (struct jcf_block):  Add new union.
13528         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
13529         (call_cleanups):  New functions.
13530         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
13531         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
13532         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
13533         * lang.c (lang_init):  Call using_eh_for_cleanups.
13534         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
13535         completing operands to patch_synchronized_statement.
13536         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
13537         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
13538         WITH_CLEANUP_EXPR instead of TRY_EXPR.
13539
13540 1998-12-20  John F. Carr  <jfc@mit.edu>
13541
13542         * Make-lang.in: Comment out control-Ls; they upset some makes.
13543
13544 1998-12-18  Tom Tromey  <tromey@cygnus.com>
13545
13546         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
13547         consistently.
13548
13549 1998-12-17  Tom Tromey  <tromey@cygnus.com>
13550
13551         * parse.y (DIR_SEPARATOR): New define.
13552         (check_class_interface_creation): Use it.
13553
13554         * parse-scan.y (report_main_declaration): Recognize
13555         `java.lang.String' in argument to main.
13556
13557 1998-12-16  Per Bothner  <bothner@cygnus.com>
13558
13559         * parse.y (create_interface):  Remove bogus test.
13560
13561 1998-12-16  Per Bothner  <bothner@cygnus.com>
13562
13563         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
13564         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
13565
13566 1998-12-16  Tom Tromey  <tromey@cygnus.com>
13567
13568         * parse-scan.y (qualified_name): Use correct sprintf format.
13569
13570 1998-12-15  Tom Tromey  <tromey@cygnus.com>
13571
13572         * gjavah.c (print_field_info): Changed how most negative number is
13573         printed.
13574
13575 1998-12-14  Per Bothner  <bothner@cygnus.com>
13576
13577         * parse.y (fold_constant_for_init):  New function.
13578         (resolve_expression_name):  Don't replace static final
13579         constant-initialized fields by its value.
13580         (java_complete_lhs):  New.  Same as java_complete_tree, except does
13581         not replace static final constant-initialized fields by their values.
13582         (register_fields):  If there is an initializer, set DECL_INITIAL and
13583         MODIFY_EXPR_FROM_INITIALIZATION_P.
13584         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
13585         Only call patch_initialized_static_field if
13586         MODIFY_EXPR_FROM_INITIALIZATION_P.
13587         (patch_initialized_static_field):  If not valid constant, clear
13588         DECL_INITIAL.
13589
13590         * parse.y (lookup_field_wrapper):  Fix thinko.
13591
13592         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
13593         set and restore global lineno.
13594
13595 1998-12-14  Tom Tromey  <tromey@cygnus.com>
13596
13597         * gjavah.c (print_field_info): If value to print is the smallest
13598         value of its size, then print as hex to avoid later warnings from
13599         C++ compiler.
13600
13601 1998-12-14  Tom Tromey  <tromey@cygnus.com>
13602
13603         * gjavah.c (decompile_method): Decompile `return null'.
13604         (process_file): Generate `#pragma interface'.
13605         (method_declared): New global.
13606         (print_method_info): Set it.
13607         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
13608         (print_method_info): Handle abstract methods.
13609
13610 1998-12-13  Per Bothner  <bothner@cygnus.com>
13611
13612         * parse.y (patch_method_invocation):  If class_decl is null
13613         (e.g. an array type), use original type.
13614
13615         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
13616         errors about uncaught exception from clone (of array, specifically).
13617
13618 1998-12-13  Tom Tromey  <tromey@cygnus.com>
13619
13620         * gjavah.c (decompile_method): Handle all types of `return'
13621         opcode.  Decompile `return this' and `return'.
13622         (method_access): New global.
13623         (print_method_info): Set it.
13624         (decompile_method): Don't decompile a synchronized method.
13625
13626 1998-12-13  Tom Tromey  <tromey@cygnus.com>
13627
13628         * jcf-reader.c (jcf_parse_one_method): Recognize
13629         HANDLE_END_METHOD.
13630         * gjavah.c (HANDLE_END_METHOD): New macro.
13631         (HANDLE_CODE_ATTRIBUTE): New macro.
13632         (decompile_method): New function.
13633         (print_method_info): Don't print `;\n' at end of function decl.
13634         Include java-opcodes.h.
13635         (decompiled): New global.
13636
13637 1998-12-12  Per Bothner  <bothner@cygnus.com>
13638
13639         * class.c (build_class_ref):  Handle PRIMTYPE.class if
13640         flag_emit_class_files.
13641         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
13642         if flag_emit_class_files.
13643         * parse.y (java_complete_tree):  Pre-liminary support for
13644         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
13645
13646         * parse.y (patch_synchronized_statement):   Don't call monitorexit
13647         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
13648
13649         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
13650
13651         * zipfile.h (opendir_in_zip):  New declaration.
13652         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
13653         (opendir_in_zip):  New function, using code from open_in_zip.
13654         (open_in_zip):  Call opendir_in_zip.
13655         (find_class):  Remove no-longer-used do_class_file parameter,
13656         but add source_ok parameter.  Change logic so if we find a .java file,
13657         we don't look for .class in later classpath emtries.
13658         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
13659         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
13660         * gjavah.c: Update call to find_class.
13661         * jcf-dump.c:  Likewise.
13662
13663         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
13664         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
13665         nothing if body is empty_stmt_node.
13666         Various little fixes so SP gets correctly adjusted.
13667         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
13668         For CALL_EXPR, test if static first.
13669         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
13670         such as the ones we create for Object and Class.
13671         Set and restore current_function_decl.
13672         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
13673         (note_possible_classname):  New function.
13674         (read_import_entry):  Removed.  Merged with read_import_dir.
13675         (read_import_dir):  Don't call find_class - that only gives us
13676         the first classpath entry having the needed package.
13677         Use the struct buffer data structure from buffer.h.
13678         (read_import_dir, find_in_imports_on_demand):  The remembered
13679         class names now use '.' (not '/') as package separator.
13680
13681         * parse.y (java_complete_expand_methods):  Call write_classfile
13682         here, and not in java_expand_classes (which only gets first class).
13683
13684 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13685
13686         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
13687         (register_fields):  If a static fields has an initializer, just
13688         chain it on ctxp->static_initialized, and handle later.
13689         (java_complete_expand_methods):  Force <clinit> first.
13690         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
13691         - it's already been completed.
13692         (patch_initialized_static_field):  New function.
13693         (java_complete_field):  Call it.
13694
13695 1998-12-12  Per Bothner  <bothner@cygnus.com>
13696
13697         * expr.c (encode_newarray_type, build_new_array):  New functions.
13698         * java-tree.h:  Declare build_new_array.
13699         * jcf-write.c (patch_newarray):  Use build_new_array.
13700
13701         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
13702         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
13703
13704         * parse.y (patch_new_array_init):  Re-organize.
13705         Now is passed the actual array (pointer) type of the value.
13706         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
13707         (patch_array_constructor):  Removed - merged into patch_new_array_init.
13708         (java_complete_tree):  Update patch_new_array_init.
13709
13710         * jcf-write.c (find_constant_index):  New function.
13711         (generate_bytecode_insns):  Use find_constant_index.
13712         (generate_classfile):  Use find_constant_index for ConstantValue.
13713
13714 1998-12-11  Tom Tromey  <tromey@cygnus.com>
13715
13716         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
13717         * decl.c (init_decl_processing): Renamed dtable -> vtable.
13718         * class.c (make_class_data): Renamed dtable -> vtable, and
13719         dtable_method_count -> vtable_method_count.
13720
13721 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13722
13723         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
13724         global variables, initialized.
13725         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
13726         Declared new global variables.
13727         * lex.c (java_lex): Return long_zero_node, float_zero_node,
13728         double_zero_node, integer_zero_node upon direct matching.
13729         * parse.y (purify_type_name): Added function prototype.
13730         (duplicate_declaration_error_p): Consider new_type as potentially
13731         being a incomplete type. Use purify_type_name on type string.
13732         (method_header): saved_type: unused variable removed. Don't figure
13733         return type if method name is invalid.
13734         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
13735         processed by patch_unaryop.
13736         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
13737         increment/decrement node into its original type after binary
13738         numeric promotion on its operands.
13739
13740 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13741
13742         * parse.y (array_initializer:): Array init operand is NULL_TREE
13743         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
13744         now an error. Fixed indentation problems.
13745         (patch_string): Handle error_mark_node as an argument.
13746         (patch_new_array_init): Fixed indentation problems.
13747         (array_constructor_check_entry): Removed check on null wfl_value.
13748         Return an error if wfl_value's walk returns an error.
13749
13750 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13751
13752         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
13753         * lex.c (java_lex): Remember column position before advancing one
13754         token. Retain location information on OCB_TK.
13755         * lex.h (typedef struct java_lc): Added new field.
13756         * parse.h (GET_SKIP_TYPE): New macro.
13757         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
13758         * parse.y (build_new_array_init, patch_new_array_init,
13759         patch_array_constructor, maybe_build_array_element_wfl,
13760         array_constructor_check_entry): New function prototypes.
13761         (switch_block:): Tagged <node>.
13762         (OCB_TK): Tagged <operator>.
13763         (array_initializer:): Installed actions.
13764         (variable_initializer): Build location information on element if
13765         necessary.
13766         (switch_statement:): Fixed indentation typo.
13767         (switch_block:): Redefined default action.
13768         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
13769         (patch_assignment): Removed duplicate code.
13770         (maybe_build_array_element_wfl, build_new_array_init,
13771         patch_new_array_init, patch_array_constructor,
13772         array_constructor_check_entry): New functions.
13773
13774 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13775
13776         * parse.y (array_initializer): Tagged <node>.
13777         (variable_initializer:): Use default rule.
13778         (array_initializer:): Defined actions.
13779         (variable_initializers:): Likewise.
13780         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
13781         non-static field accesses.
13782         (patch_invoke): Fixed indentation typo.
13783         (java_complete_tree): Likewise.
13784         (build_labeled_block): Changed leading comment. Generate an error
13785         in case of duplicate loop labels.
13786         (patch_conditional_expr): Patch results of string concatenation
13787         operations.
13788
13789 1998-12-06  Per Bothner  <bothner@cygnus.com>
13790
13791         * constants.c (find_methodref_index):  When the class is an interface,
13792         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
13793
13794         * decl.c (finit_identifier_node):  Use "$finit$", rather than
13795         "<finit>" (which Sun's verifier rejects).
13796         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
13797         (generate_field_initialization_code):  Removed.
13798         (fix_constructors)  Don't add call to $finit$ here (wrong order).
13799         (patch_method_invocation):  Add $finit$ call here.
13800
13801         * java-tree.h (CALL_USING_SUPER):  New macro.
13802         * parse.y (patch_invoke):  Remove im local variable.
13803         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
13804         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
13805         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
13806
13807         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
13808
13809         * parse.y (java_complete_tree):  Don't complain about unreachable
13810         statement if it is empty_stmt_node.
13811
13812         * jcf-write.c (find_constant_wide):  New function.
13813         (push_long_const):  Use find_constant_wide.
13814
13815         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
13816         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
13817         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
13818         Emit invokeinterface when calling an interface method.
13819         Emit invokespecial also when calling super or private methods.
13820
13821         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
13822
13823 1998-12-06  Per Bothner  <bothner@cygnus.com>
13824
13825         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
13826
13827 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13828
13829         * java-tree.h (java_layout_seen_class_methods): New function
13830         prototype.
13831         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
13832         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
13833         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
13834         * parse.y (method_declarator:): Defined action.
13835         (issue_warning_error_from_context): input_filename saved, set to
13836         the appropriate value and restored after java_error is called.
13837         (build_unresolved_array_type): Fixed comment.
13838         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
13839         (method_header): Deal with return type the same way type are
13840         handled for fields and method's parameters and local variables
13841         types are handled.
13842         (check_method_redefinition): Removed extra CR.
13843         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
13844         (java_layout_seen_class_methods): New function.
13845         (java_layout_classes): Call java_layout_seen_class_methods.
13846
13847 1998-12-03  Per Bothner  <bothner@cygnus.com>
13848
13849         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
13850
13851 1998-12-03  Per Bothner  <bothner@cygnus.com>
13852
13853         * jcf-dump.c (main):  Fix error message.
13854         * jcf-path.c (add_entry):  Style fix.
13855
13856 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13857
13858         * class.c (layout_class_method): Call build_java_argument_signature
13859         on constructors too.
13860         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
13861         (patch_method_invocation): Define a primary when resolving an
13862         expression name. Augmented comment on code checking illegal `this'
13863         usage. Loosened it test by accepting NEW_CLASS_EXPR.
13864
13865 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13866
13867         * class.c (layout_class_method): Don't report error on non-static
13868         overriding static if the method is private.
13869         * java-tree.h (finish_class): Prototype added.
13870         * lex.c (java_get_line_col): Handle col argument -2 value.
13871         * parse.h: All static method declarations moved to parse.y.
13872         * parse.y: Now contains all static method declarations previously
13873         found in parse.h.
13874         (find_expr_with_wfl, missing_return_error,
13875         unreachable_stmt_error): New functions.
13876         (java_get_real_method_name): Identify constructors bearing class
13877         names in source code compiled classes only.
13878         (java_complete_expand_methods): Call missing_return_error.
13879         (invocation_mode): Private methods invoked as static methods.
13880         (java_complete_tree): Call unreachable_stmt_error.
13881
13882 1998-12-01  Tom Tromey  <tromey@cygnus.com>
13883
13884         * Makefile.in (+target): Removed.
13885         (+xmake_file): Likewise.
13886         (+tmake_file): Likewise.
13887         (.NOEXPORT): Removed duplicate.
13888
13889 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13890
13891         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
13892
13893         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
13894
13895         * jvgenmain.c: Remove the xmalloc prototype, we get it from
13896         libiberty.h.  Provide an xmalloc definition.
13897
13898         * jvspec.c: Remove the xmalloc prototype.
13899
13900         * parse-scan.y: Include config.h and system.h.  Don't include
13901         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
13902         Provide an xstrdup definition.
13903
13904 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
13905
13906         * jcf-path.c (add_entry): Recognize ".jar" too.
13907         * lang-specs.h: Likewise.
13908
13909 1998-11-26  Per Bothner  <bothner@cygnus.com>
13910
13911         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
13912         soft_monitorenter_node, soft_monitorexit_node, throw_node.
13913
13914         * jcf-write.c (generate_bytecode_insns):
13915         Handle pre/post-increment/decrement of long.
13916
13917         * jcf-write.c (generate_bytecode_insns):
13918         Handle missing exception handler (finally for synchronized).
13919
13920 1998-11-25  Per Bothner  <bothner@cygnus.com>
13921
13922         * java-tree.h (end_params_node):  Declare global.
13923         * decl.c (end_params_node):  New global.
13924         (init_decl_processing, start_java_method):  Use end_params_node for
13925         end of list of parameter types.  Follows correct gcc conventions.
13926         * expr.c (pop_argument_types, pop_arguments):  Likewise.
13927         * lang.c (put_decl_node):  Likewise.
13928         * typeck.c (various places):  Likewise.
13929         * class.y (various places):  Likewise.
13930         * parse.y (various places):  Likewise.
13931
13932         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
13933         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
13934
13935         * class.c:  Add #include flags.h, remove no-longer needed declaration.
13936
13937         * class.c (layout_class_method):  Remove commented-out code, re-format.
13938         Don't add vtable entry (or index) for private methods.
13939         * expr.c (expand_invoke):  A private method is implicitly final.
13940         * class.c (make_class_data):  If inlining or optimizing,
13941         skip private methods.
13942
13943         * class.c (finish_class):  New function.  Calls existing methods,
13944         but alls emits deferred inline functions.
13945         * jcf-parse.c (parse_class_file):  Call finish_class.
13946         * parse.y (java_complete_expand_methods):  Likewise.
13947
13948         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
13949
13950         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
13951
13952 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
13953
13954         * jcf-write.c (generate_bytecode_conditional): Fix typo.
13955
13956 1998-11-24  Per Bothner  <bothner@cygnus.com>
13957
13958         * (generate_classfile): Always write class access flag with
13959         ACC_SUPER set.
13960
13961 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13962
13963         * class.c (maybe_layout_super_class): New function.
13964         (layout_class): Reorganized. Loop on class methods dispatched into
13965         a new function. Call maybe_layout_super_class.
13966         (layout_class_methods, layout_class_method): New functions.
13967         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
13968         class.
13969         (expand_invoke): Likewise.
13970         * java-tree.h (all_class_list): New global variable declared.
13971         (layout_class_methods, layout_class_method): New function
13972         prototypes.
13973         (LAYOUT_SEEN_CLASS_METHODS): New macro.
13974         * jcf-parse.c (all_class_list): New global variable.
13975         (load_class): Extended what class_or_name can be. Use parser
13976         context mechanism to save globals before calling jcf_parse.
13977         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
13978         is set on the file name.
13979         (jcf_parse): Layout class methods when Object is loaded, otherwise
13980         record class in all_class_list for delayed method layout.
13981         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
13982         * lang.c (put_decl_node): Decode <init> into the decl context
13983         class name.
13984         * lex.c (java_allocate_new_line): Use xmalloc.
13985         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
13986         pointers, not TREE_LIST elements.
13987         (struct parser_ctxt): Fixed comment indentations, added comments
13988         and reordered some fields.
13989         (java_check_methods): Function prototype removed.
13990         * parse.y (java_push_parser_context): Use xmalloc.
13991         (java_parser_context_restore_global): Pop extra pushed ctxp only
13992         when there's nothing next.
13993         (maybe_create_class_interface_decl): Fixed comment, add new
13994         created class decl to all_class_list.
13995         (method_header): Use GET_REAL_TYPE on argument's types.
13996         (method_declarator): Use GET_REAL_TYPE, change type to the real
13997         type in TREE_LIST dependency node. Build argument list with the
13998         real type.
13999         (create_jdep_list): Use xmalloc. Removed allocation error message.
14000         (obtain_incomplete_type): Fixed leading comment. Broadened
14001         incoming argument meaning.
14002         (register_incomplete_type): Use xmalloc. Removed allocation error
14003         message.
14004         (safe_layout_class): Fixed leading comment.
14005         (jdep_resolve_class): Reversed if statement condition and switch
14006         if and else bodies.
14007         (resolve_and_layout): Fixed leading comment. Broadened incoming
14008         argument meaning.
14009         (complete_class_report_errors): New local variable name, for
14010         clarity. purify_type_name used for all error cases.
14011         (java_get_real_method_name): Stricter check on constructors.
14012         (java_check_regular_methods): Reverse methods list only if not
14013         already laid out. Layout artificial constructor.
14014         (java_check_methods): Deleted.
14015         (source_start_java_method): Obtain incomplete type for patchable
14016         method arguments.
14017         (java_layout_classes): Fixed leading comment. Use
14018         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
14019         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
14020         before returning. Fixed comments.
14021         (java_expand_classes): Check for errors up front.
14022         (patch_method_invocation): Class to search is resolved and laid
14023         out.
14024
14025 1998-11-24  Per Bothner  <bothner@cygnus.com>
14026
14027         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
14028
14029         * javaop.h (int8):  Removed - not used.
14030         (jbyte):  Redefine portably with correct signedness.
14031
14032         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
14033
14034         * jcf-write.c (generate_bytecode_insns):  Fix typo
14035         OPCODE_getstatic to OPCODE_getfield.
14036
14037         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
14038         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
14039         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
14040
14041 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14042
14043         * jcf-parse.c (jcf_parse_source): Function returned type is
14044         void. Added prototype.
14045         (jcf_parse): Function returned type is void.
14046         (yyparse): Remove call to fclose on the last parsed file.
14047
14048         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
14049
14050 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14051
14052         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
14053         (layout_class): Cope with methods featuring WFL in decl names.
14054         * decl.c (unqualified_object_id_node): New global variable,
14055         initialized.
14056         (build_decl_no_layout): Removed.
14057         * expr.c (build_primtype_type_ref): Handle Double.
14058         (java_lang_expand_expr): Fixed indentations.
14059         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
14060         (flag_wall, flag_redundant, flag_not_overriding,
14061         flag_static_local_jdk1_1, unqualified_object_id_node): Global
14062         variable declarations.
14063         (build_decl_no_layout): Removed prototype.
14064         (java_get_real_method_name): Added prototype.
14065         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
14066         (java_parse_abort_on_error): Macro now just returns.
14067         * jcf-parse.c (jcf_parse_source): Check fclose returned
14068         value. Call emit_register_classes if java_report_errors returns
14069         zero.
14070         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
14071         flag_static_local_jdk1_1): New integer flags.
14072         (lang_decode_option): New flags set here.
14073         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
14074         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
14075         the flag_redundant variable.
14076         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
14077         when parsing java.lang.Object class.
14078         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
14079         NULL_TREE to build.
14080         (resolve_qualified_expression_name): Fixed indentation.
14081         (patch_array_ref): Changed prototype.
14082         (not_initialized_as_it_should_p): Prototype removed.
14083         (java_report_errors): Added function prototype.
14084         * parse.y (formal_parameter:): Changed error message for not yet
14085         supported final parameters.
14086         (class_type_list:): Set both PURPOSE and VALUE of created
14087         TREE_LIST to be class_type.
14088         (primary_no_new_array:): Handle class literals on primitive types.
14089         (parse_warning_context): Reinstalled correct force_error and
14090         do_warning flags setups.
14091         (java_report_errors): Changed prototype. Return java_error_count
14092         value.
14093         (variable_redefinition_error): Consider treating variable type as
14094         a fake pointer.
14095         (create_interface): Warn about redundant abstract modifier if
14096         flag_redundant is set. Changed error message.
14097         (lookup_field_wrapper): Save/restore globals before/after looking
14098         up field.
14099         (duplicate_declaration_error_p): Consider treating declaration
14100         type as a fake pointer.
14101         (register_fields): Extract real type from dependency node. Check
14102         for duplicate field declaration after type adjustment. Use
14103         DECL_INITIAL to store static final initialized values.
14104         (method_header): Extract real function type from dependency node.
14105         (check_abstract_method_header): Use GET_METHOD_NAME.
14106         (obtain_incomplete_type): Layout fake pointer type.
14107         (safe_layout_class): Don't try to check for methods before layout.
14108         (java_complete_class): Don't check for correct throws clause
14109         elements inheritance here.
14110         (resolve_and_layout): Broadened name parameter meaning.
14111         (reset_method_name): Use GET_METHOD_NAME.
14112         (java_get_real_method_name): New function.
14113         (java_check_regular_methods): Don't check methods in
14114         java.lang.Object.  Verify lineage of throws clause elements. Use
14115         flag_no_overriding in warning report.
14116         (check_throws_clauses): Don't check if class was from
14117         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
14118         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
14119         (declare_local_variables): Use flag_static_local_jdk1_1 to report
14120         warning on unsupported final local variables. Use build_decl
14121         instead of build_decl_no_layout. Get real local variable type from
14122         dependency node.
14123         (source_start_java_method): Get real parameter type from
14124         dependency node. Call build_decl instead of build_decl_no_layout.
14125         (java_layout_classes): Reverse tree and layout type and class as
14126         required. Mark class as loaded when done.
14127         (resolve_field_access): Fixed indentation. Restricted condition
14128         leading to static field access code generation. Set field_type
14129         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
14130         (resolve_qualified_expression_name): Initialize type_found to
14131         null. Handle static field resolved during qualification. Fixed
14132         layout on non primitive field decl types.
14133         (not_accessible_p): Fixed typo in comment.
14134         (patch_method_invocation): Resolve and layout class to search from
14135         type.
14136         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
14137         layout non primitive type, if necessary. Make method node only to
14138         report errors.
14139         (find_applicable_accessible_methods_list): Consider WFL'ed method
14140         decl names. Fixed indentation.
14141         (argument_types_convertible): Resolve and layout target type if
14142         necessary.
14143         (java_complete_tree): Fixed indentation problems. Rewrote
14144         CALL_EXPR thrown exceptions check. Re-installed further processing
14145         of the assignment in certain cases.
14146         (patch_assignment): Call maybe_build_primttype_type_ref to perform
14147         inlining on class literals.
14148         (valid_builtin_assignconv_identity_widening_p): Cope with constant
14149         0 literal.
14150         (valid_method_invocation_conversion_p): Likewise.
14151         (patch_string): Temporary disable forbidden use of `this' in
14152         explicit constructor invocations when doing string concatenation
14153         within their scope.
14154         (patch_unaryop): Added comment. Reinstalled code to disable
14155         further check on assignment operation with cast expression RHS.
14156         (patch_switch_statement): Fixed indentation.
14157         (build_try_statement): Call build_decl instead of
14158         build_decl_no_layout.
14159         (patch_synchronized_statement): Likewise.
14160         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
14161         IS_UNCHECKED_EXPRESSION_P.
14162         (check_thrown_exceptions_do): Changed leading comment. Resolve and
14163         layout argument exception type.
14164         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
14165         of IS_UNCHECKED_EXPRESSION_P.
14166
14167 1998-11-18  Anthony Green  <green@cygnus.com>
14168
14169         * jcf-parse.c (yyparse): Open class file in binary mode.
14170
14171 1998-11-15  Per Bothner  <bothner@cygnus.com>
14172
14173         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
14174
14175         * jcf-write.c (perform_relocations):  Move check out one loop.
14176
14177 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
14178
14179         * Make-lang.in: Fix reference to srcdir.
14180         * jv-scan.c: Add missing xmalloc prototype.
14181         * jvgenmain.c: Ditto.
14182
14183 1998-11-15  Per Bothner  <bothner@cygnus.com>
14184
14185         * decl.c (error_mark_node), java-tree.h:  New global.
14186         * parse.y:  Use empty_stmt_node instead of size_zero_node.
14187         (build_if_else_statement):  If missing else, use empty_stmt_node.
14188
14189         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
14190         (java_complete_expand_method):  Complain if return is missing.
14191         (java_check_regular_methods):  Comment out incorrect error check.
14192         (not_accessible_p):  Fix incorrect handling of protected methods.
14193         (patch_method_invocation):  Pass correct context to not_accessible_p.
14194         (find_applicable_accessible_methods_list):  Likewise.
14195         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
14196         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
14197         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
14198         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
14199
14200         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
14201         (push_int_const):  Remove reundant NOTE_PUSH.
14202         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
14203         (- case SWITCH_EXPR):  Fix code generation bug.
14204         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
14205         (generate_classfile):  More robust for abstract methods.
14206
14207 1998-11-15  Anthony Green  <green@cygnus.com>
14208
14209         * Makefile.in: jv-scan and jvgenmain all require libiberty.
14210         * Make-lang.in: Ditto.
14211
14212         * jv-scan.c: Remove xmalloc and xstrdup definitions.
14213         * jvgenmain: Ditto.
14214
14215 1998-11-15  Per Bothner  <bothner@cygnus.com>
14216
14217         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
14218
14219         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
14220
14221 1998-11-14  Per Bothner  <bothner@cygnus.com>
14222
14223         Allow uses of interface types to verify.  This is not really
14224         type-safe, but it matches what Sun does, and is OK as long as
14225         there are appropriate run-time checks.
14226         * verify.c (merge_types):  If merging two interface types,
14227         just set the result to java.lang.Object.
14228         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
14229
14230 1998-11-13  Tom Tromey  <tromey@cygnus.com>
14231
14232         * gjavah.c (main): Handle --output-class-directory argument.
14233         * jvspec.c (lang_specific_driver): Translate `-d' into
14234         -foutput-class-dir.
14235         * jcf.h (jcf_write_base_directory): Declare.
14236         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
14237         * lang-options.h: Mention -foutput-class-dir.
14238         * jcf-write.c (jcf_write_base_directory): New global.
14239         (make_class_file_name): Put generated .class file into `-d'
14240         directory, or into source directory if -d not given.  Function now
14241         static.
14242         (write_classfile): Free class file name.  Handle case where class
14243         file name is NULL.
14244         (DIR_SEPARATOR): New macro.
14245         Include <sys/stat.h>
14246
14247         * Makefile.in (prefix): New macro.
14248
14249 1998-11-12  Per Bothner  <bothner@cygnus.com>
14250
14251         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
14252         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
14253         here (done in patch_invoke instead).
14254         (case_identity):  Moved here from parse.y.
14255
14256         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
14257         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
14258         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
14259         so they can be efficiently scanned without recursion.
14260         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
14261         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
14262         in BLOCK iteratively, rather than recursively.
14263
14264         * parse.y (do_unary_numeric_promotion):  New function.
14265         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
14266
14267         * parse.y (patch_newarray):  Various fixes.
14268
14269         Re-do handling of switch statements (for proper block scoping).
14270         * parse.y:  Add just a single block for the enture switch block,
14271         but don't create any "case blocks".
14272         (group_of_labels):  Rmeoved unneeded non-terminal.
14273         CASE_EXPR and DEFAULT_EXPR are added to current block.
14274         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
14275         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
14276         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
14277         * parse.y (wfl_operator, print_int_node): Make non-static.
14278         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
14279         as part of recursive scan of block.
14280         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
14281         (patch_switch_statement):  Most tests move dinto java_complete_tree.
14282
14283         * parse.y:  Make various production be non-typed (void).
14284         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
14285         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
14286         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
14287
14288         * jcf-write.c (struct jcf_handler):  New type.
14289         (struct jcf_switch_state):  New type.
14290         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
14291         (alloc_handler, emit_unop, emit_reloc):  New functions.
14292         (adjust_typed_op):  Add extra parameter ("max type" offset).
14293         (emit_switch_reloc, emit_case-reloc):  New function.
14294         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
14295         (generate_bytecode_insns):  Support REAL_CST, switch statements,
14296         exception handling, method calls, object/array creation, and more.
14297
14298         * class.c:  Remove some unused variables.
14299         * constants.c (find_string_constant):  New function.
14300         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
14301         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
14302         if flag_emit_class_files.
14303
14304 1998-11-12  Tom Tromey  <tromey@cygnus.com>
14305
14306         * jcf-io.c (find_class): Added explanatory comment.
14307
14308         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
14309         trailing slash to `.zip' entries.
14310
14311         * jvspec.c (lang_specific_driver): Correctly handle case where
14312         GC_NAME not defined.
14313
14314 1998-11-11  Tom Tromey  <tromey@cygnus.com>
14315
14316         * jvspec.c (GC_NAME): New define.
14317         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
14318         if required.
14319         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
14320
14321 1998-11-11  Per Bothner  <bothner@cygnus.com>
14322
14323         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
14324
14325 1998-11-11  Tom Tromey  <tromey@cygnus.com>
14326
14327         * jcf-dump.c (main): Correctly recognize `--'-style long options.
14328
14329 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14330
14331         * class.c (is_compiled_class): Call safe_layout_class for class
14332         compiled from source.
14333         * conver.h (convert_to_integer, convert_to_real,
14334         convert_to_pointer): Added prototypes.
14335         * decl.c (init_decl_processing): Non longer push the decls of
14336         `methodtable', `constants', `Class', `Field', `dispatchTable'
14337         `jexception' and `Method'.
14338         * expr.c (build_invokeinterface): New function.
14339         (expand_invoke): static variable CLASS_IDENT now in
14340         build_invokeinterface. Use build_invokeinterface.
14341         (expand_java_field_op): Moved code to inline
14342         java.lang.PRIMTYPE.TYPE into a function.
14343         (build_primtype_type_ref): New function.
14344         * java-tree.def (INSTANCEOF_EXPR): New tree code.
14345         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
14346         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
14347         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
14348         (DECL_LOCAL_STATIC_VALUE): New macro.
14349         (build_invokeinterface, build_primtype_type_ref): New function
14350         prototypes.
14351         (java_parse_abort_on_error): Macro rewritten.
14352         * jcf-parse.c (current_method): Add comment to declaration.
14353         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
14354         Function prototypes fixed.
14355         (jcf_parse_source): push/pop parser context. save/restore global.
14356         (parse_source_file): Fixed leading comment. Now take a
14357         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
14358         classes and pop the parser context anymore.
14359         (yyparse): Push parser context, save globals, parse the source
14360         file, restore globals and pop the parser context when processing a
14361         source file.
14362         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
14363         * lex.c (java_parse_doc_section): New function.
14364         (java_lex): Call java_parse_doc_section when appropriate. Build an
14365         operator around INSTANCEOF_TK.
14366         * lex.h (java_lineterminator, java_sprint_unicode,
14367         java_unicode_2_utf8, java_lex_error, java_store_unicode):
14368         Prototypes rewritten.
14369         (java_parse_escape_sequence, java_letter_or_digit_p,
14370         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
14371         java_read_unicode, java_store_unicode, java_read_char,
14372         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
14373         Added function prototypes.
14374         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
14375         define.
14376         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
14377         New macros
14378         (struct parser_ctxt): New fields: deprecated,
14379         current_parsed_class_un, gclass_list.
14380         (fix_method_argument_names, issue_warning_error_from_context,
14381         resolve_package, lookup_package_type): New function prototypes.
14382         (resolve_expression_name): Fixed function prototype.
14383         (find_applicable_accessible_methods_list): Fixed indentation, added
14384         extra argument in prototype.
14385         (check_final_assignment, build_null_of_type, check_deprecation,
14386         check_method_redefinition, reset_method_name,
14387         java_check_regular_methods, java_check_abstract_methods,
14388         maybe_build_primttype_type_ref): New function prototype.
14389         * parse.y (conver.h): Include.
14390         (INSTANCEOF_TK): Tagged <operator>.
14391         (single_type_import_declaration): Use REGISTER_IMPORT macro.
14392         (relational_expression:): Build binop for instanceof.
14393         (java_push_parser_context): Remember ctxp->gclass_list across
14394         contexts.
14395         (java_pop_parser_context): Simply return if no context
14396         exists. Remember gclass_list across contexts.
14397         (issue_warning_error_from_context): New function.
14398         (parse_error_context): Don't setup ctxp->elc here. Call
14399         issue_warning_error_from_context instead.
14400         (parse_warning_context): Likewise.
14401         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
14402         setup. Link new class/interface to ctxp->gclass_list.
14403         (add_superinterfaces): Register interface as incomplete if not
14404         loaded.
14405         (create_class): Remember class unqualified name in
14406         ctxp->current_parsed_class_un. Check class deprecation.
14407         (register_fields): Check field deprecation. Remember static final
14408         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
14409         processing INIT.
14410         (method_header): New local variable ORIG_ARG. Use unqualified
14411         current class name for check on constructor errors. Promote return
14412         type if of record type. Argument list fix moved in
14413         fix_method_argument_names, called here. Check method deprecation.
14414         (fix_method_argument_names): New function.
14415         (method_declarator): Promote record typed arguments.
14416         (safe_layout_class): Check class methods before layout.
14417         (java_complete_class): Compute field layout when patched.
14418         (do_resolve_class): Try to load class after having it renamed
14419         after the package name.
14420         (get_printable_method_name): Use DECL_CONTEXT.
14421         (reset_method_name): New function.
14422         (check_method_redefinition): Use reset_method_name.
14423         (java_check_regular_methods): New local variable
14424         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
14425         names for error report. Check for compile-time error when method
14426         found has default (package) access.
14427         (java_check_abstract_methods): Now takes an interface DECL node as
14428         an argument. Also reinstall real name on unchecked
14429         overriding/hiding methods for error report.
14430         (java_check_methods): Fixed leading comment. Get classes to verify
14431         from ctxp->gclass_list. Use CHECK_METHODS macro and set
14432         CLASS_METHOD_CHECKED_P on class verification.
14433         (lookup_java_method2): Get real method name if necessary.
14434         (find_in_imports): Don't check package class access here.
14435         (resolve_package, lookup_package_type): New functions.
14436         (java_layout_classes): Fixed leading comment. Take classes to be
14437         laid out from ctxp->gclass_list.
14438         (java_complete_expand_methods): Don't expand native and abstract
14439         methods.
14440         (java_expand_classes): New function.
14441         (resolve_expression_name): Use additional argument ORIG.  Retrieve
14442         values of static final field of primitive types.
14443         (resolve_field_access): Handles static final field of promotive
14444         type.
14445         (resolve_qualified_expression_name): Handle STRING_CST as
14446         primaries and package name resolution. Check deprecation on found
14447         decls. Set where_found and type_found on non static field resolved
14448         during qualification. Layout non primitive field decl types.
14449         (check_deprecation): New function.
14450         (maybe_access_field): Simplified.
14451         (patch_method_invocation_stmt): Local variable CLASS_TYPE
14452         removed. Reverse method's argument when primary is a type. Don't
14453         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
14454         instead. Include abstract class in the list of class searchable
14455         for constructors. Use DECL_CONTEXT of found method for access
14456         checks. Check method deprecation.
14457         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
14458         converting arguments. Handle INVOKE_INTERFACE.
14459         (lookup_method_invoke): Search constructor using existing
14460         infrastructure (don't rely on lookup_java_constructor anymore).
14461         (find_applicable_accessible_methods_list): Extra argument flag
14462         LC. Now include constructor in the search.
14463         (qualify_ambiguous_name): Conditional expression are primaries.
14464         (not_initialized_as_it_should_p): static final are always
14465         initialized.
14466         (java_complete_tree): Pass extra NULL argument to
14467         resolve_expression_name. Stricter test to carry on patching
14468         assignments. New case for INSTANCEOF_EXPR.
14469         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
14470         (check_final_assignment, maybe_build_primttype_type_ref): New
14471         functions.
14472         (patch_assignment): Detect resolved static finals and carry normal
14473         assignment error check on them. Inline PRIMTYPE.TYPE read access.
14474         (try_builtin_assignconv): Access constant 0 on all primitive
14475         types.
14476         (valid_builtin_assignconv_identity_widening_p): Accept identical
14477         types. Accept all promoted type on int type.
14478         (valid_ref_assignconv_cast_p): Accept a null pointer to be
14479         assigned to a reference.
14480         (valid_method_invocation_conversion_p): Accept to check null
14481         pointers.
14482         (build_binop): Merge declaration and initialization of local
14483         variable BINOP.
14484         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
14485         numeric types. Improved validity test for qualify operators on
14486         references.
14487         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
14488         and PREINCREMENT_EXPR. Also detect resolved static finals of a
14489         primitive type and issue the appropriate error message.
14490         (resolve_type_during_patch): Mark class loaded when resolved.
14491         (patch_cast): Allow null to be cased to reference types.
14492         (build_null_of_type): New function.
14493         (patch_array_ref): Handle array on references correctly.
14494         (patch_return): Removed unused local variable MODIFY. Force
14495         boolean to be returned as integers. Allows null to be returned by
14496         a function returning a reference.
14497         * typeck.c (convert_to_integer, convert_to_real,
14498         convert_to_pointer): Prototypes moved to convert.h
14499         (lookup_argument_method): Use method real name, if necessary.
14500
14501 1998-10-30  Tom Tromey  <tromey@cygnus.com>
14502
14503         * class.c (build_class_ref): Changed name of primitive classes to
14504         start with `_Jv_'.
14505
14506         * class.c (make_class_data): Renamed fields: nmethods to
14507         method_count, method_count to dtable_method_count.  Always set
14508         `state' field to 0.
14509         * decl.c (init_decl_processing): Likewise.
14510
14511 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14512
14513         * class.c (layout_class): Don't mangle <finit>, produce
14514         __finit<class> instead. Don't verify artificial methods.
14515         * decl.c (finit_identifier_node): New declared global.
14516         (init_decl_processing): finit_identifier_node initialized.
14517         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
14518         * java-tree.h (finit_identifier_node): Declared as extern.
14519         (struct lang_decl): New field called_constructor.
14520         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
14521         (CLASS_HAS_FINIT_P): New macro.
14522         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
14523         explicit constructor invocation.
14524         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
14525         CALL_SUPER_CONSTRUCTOR_P): New macros.
14526         (write_classfile): Added prototype.
14527         * jcf-parse.c (jcf_parse_source): Parse and remember for
14528         generation if the file was seen on the command line.
14529         (parse_source_file): Don't write the class file here.
14530         (yyparse): Loop on files rewritten. Set current_jcf.
14531         (parse_zip_file_entries): Parse class file only if it was found.
14532         * lang.c (init_parse): Don't open command line provided filename
14533         here.
14534         (lang_parse): Don't set main_jcf anymore.
14535         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
14536         (JCONSTRUCTOR_CHECK): New macro.
14537         (JBSC_TYPE_P): New macro.
14538         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
14539         (COMPLETE_CHECK_OP_2): New macro.
14540         (struct parse_ctxt): New field explicit_constructor_p.
14541         (check_class_interface_creation): Fixed prototype indentation.
14542         (patch_method_invocation_stmt): Prototype reflects added argument.
14543         (patch_invoke): Likewise.
14544         (complete_method_declaration, build_super_invocation,
14545         verify_constructor_circularity,
14546         build_this_super_qualified_invocation, get_printable_method_name,
14547         patch_conditional_expr, maybe_generate_finit, fix_constructors,
14548         verify_constructor_super, create_artificial_method,
14549         start_artificial_method_body, end_artificial_method_body,
14550         generate_field_initialization_code): New function prototypes.
14551         * parse.y: Fixed leading comment
14552         (constructor_header:, constructor_body:, block_end:): Rules tagged
14553         <node>.
14554         (type_declaration:): Call maybe_generate_finit.
14555         (method_declaration:): Action for method_body: placed in new
14556         function complete_method_declaration, called here.
14557         (constructor_declaration:): Defined actions. Removed leading
14558         FIXME.
14559         (constructor_header:): New rule with action.
14560         (constructor_body:): Rule rewritten using block_begin: and
14561         block_end:. Defined actions.
14562         (constructor_declarator:, explicit_constructor_invocation:):
14563         Defined actions.
14564         (block:): Use new rules block_begin: block_end:.
14565         (block_begin:, block_end:): New rules and actions.
14566         (block_statements:): Fixed error message for explicit
14567         constructors.
14568         (method_invocation:): Call build_this_super_qualified_invocation
14569         if primary is `this' or `super' was seen.
14570         (conditional_expression:): Action defined.
14571         (extra_ctxp_pushed_p): New static global flag.
14572         (java_parser_context_save_global): Create parser context if
14573         necessary. Use extra_ctxp_pushed_p to remember it.
14574         (java_parser_context_restore_global): Pop extra parser context if
14575         one exists.
14576         (build_array_from_name): Array on primitive types are marked
14577         loaded.
14578         (register_fields): Restore new name in field initializer
14579         expression if type was altered. Non static fields initialized upon
14580         declaration marked initialized.
14581         (maybe_generate_finit): New function.
14582         (maybe_generate_clinit): Use create_artificial_method,
14583         start_artificial_method_body, end_artificial_method_body. Generate
14584         debug info for enclosed initialization statements.
14585         (method_header): Fixed leading comment. Check constructor
14586         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
14587         accordingly.
14588         (complete_method_declaration, constructor_circularity_msg,
14589         verify_constructor_circularity): New functions.
14590         (get_printable_method_name): New function.
14591         (check_method_redefinition): Don't rename <finit> methods. Fix
14592         declared constructor names. Error message for
14593         constructors modified.
14594         (java_check_regular_methods): Local variable seen_constructor
14595         renamed saw_constructor. Skip verification on constructors. Create
14596         default constructor with create_artificial_method.
14597         (java_check_methods): Removed unnecessary empty line.
14598         (create_artificial_method, start_artificial_method_body,
14599         end_artificial_method_body): New functions.
14600         (java_layout_classes): Changed leading comment. Reverse fields
14601         list if necessary. Always layout java.lang.Object if being
14602         defined.
14603         (java_complete_expand_methods): Verify constructor circularity.
14604         (java_complete_expand_method): Call fix_constructor on
14605         constructors.  Local variable no_ac_found removed. Restore
14606         bindings if method body expansion failed.
14607         (fix_constructors, verify_constructor_super,
14608         generate_field_initialization_code): New function.
14609         (java_expand_classes): Fixed leading comment. Write class file
14610         here.
14611         (resolve_expression_name): Check for illegal instance variable
14612         usage within the argument scope of an explicit constructor
14613         invocation.
14614         (resolve_qualified_expression_name): Pass extra from_super flag
14615         when invoking patch_method_invocation_stmt. New case for
14616         conditional expression when used as a primary. Check for error
14617         when acquiring super.
14618         (patch_method_invocation_stmt): Added extra argument super. New
14619         local variable is_static_flag. Set class_to_search according to
14620         the nature of the constructor invocation. Don't add `this'
14621         argument when expanding NEW_CLASS_EXPR. Check for illegal method
14622         invocation within the argument scope of explicit constructor
14623         invocation. Set is_static according to is_static_flag. Provide
14624         extra `super' argument to patch_invoke invocation.
14625         (patch_invoke): New argument from_super. Loop on arguments
14626         indentation fixed. Pass from_super to invocation_mode. New switch
14627         case INVOKE_SUPER. Fixed error message in switch default case.
14628         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
14629         value.
14630         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
14631         (lookup_method_invoke): Fixed prototypes in candidates list. Error
14632         message takes constructors into account.
14633         (find_applicable_accessible_methods_list): Fixed indentation.
14634         (qualify_ambiguous_name): Take explicit constructor invocation
14635         into account. Deal with a conditional expression as a primary to
14636         a method call.
14637         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
14638         case. Added extra argument to patch_method_invocation_stmt.
14639         Register calls made to explicit constructor `this'. Don't call
14640         save_expr in ARRAY_REF case when emitting class files. Check for
14641         illegal use of this when expanding explicit constructor invocation
14642         arguments.
14643         (complete_function_arguments): Set and reset parser context
14644         explicit_constructor_p field value when appropriate.
14645         (build_super_invocation, build_this_super_qualified_invocation):
14646         New functions.
14647         (patch_assignment): Fixed typo.
14648         (patch_unaryop): Check on final fields occurs only when a decl
14649         exits.
14650         (patch_return): Take constructors into account.
14651         (patch_conditional_expr): New function.
14652         * typeck.c (build_java_signature): Removed unnecessary empty line.
14653
14654 1998-10-28  Jeffrey A Law  (law@cygnus.com)
14655
14656         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
14657
14658 1998-10-28  Tom Tromey  <tromey@cygnus.com>
14659
14660         * decl.c (init_decl_processing): Renamed fields.
14661         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
14662         interface_len, msize fields.
14663
14664         * class.c (make_class_data): Removed subclass_head and
14665         subclass_next fields.
14666         * decl.c (init_decl_processing): Removed subclass_head and
14667         subclass_next fields.
14668
14669 1998-10-28  Jeffrey A Law  (law@cygnus.com)
14670
14671         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
14672         * mangle.c (emit_unicode_mangled_name): Similarly.
14673
14674 1998-10-26  Nick Clifton  <nickc@cygnus.com>
14675
14676         * jcf-parse.c (get_constant): Place braces around code to compute
14677         'd' when REAL_ARITHMETIC is not defined.
14678
14679 1998-10-25  H.J. Lu  (hjl@gnu.org)
14680
14681         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
14682         dependency.
14683
14684 1998-10-23  Tom Tromey  <tromey@cygnus.com>
14685
14686         * lang-specs.h: `.zip' files are input to jc1.
14687
14688 1998-10-22  Per Bothner  <bothner@cygnus.com>
14689
14690         * jvspecs.c:  Add (but don't enable) support for combining multiple
14691         .class and .java input filenames to a single jc1 invocation.
14692         Add support for -C flag (copile to .class files).
14693         Translate -classpath and -CLASSPATH arguments.
14694         * lang-specs.h:  Don't set %2 spec.
14695
14696 1998-10-22  Tom Tromey  <tromey@cygnus.com>
14697
14698         * jcf-path.c (add_entry): Don't add trailing separator if entry is
14699         a .zip file.
14700         (add_path): Don't add trailing separator to non-empty path
14701         elements.
14702
14703         * lang.c (lang_decode_option): Check for -fclasspath and
14704         -fCLASSPATH before examining other `-f' options.
14705
14706         * java-tree.h (finalize_identifier_node): Don't declare.
14707         * class.c (make_class_data): Don't push "final" field.
14708         * decl.c (init_decl_processing): Don't push "final" field.
14709         (finalize_identifier_node): Removed.
14710         (init_decl_processing): Don't set finalize_identifier_node.
14711
14712         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
14713
14714 1998-10-11  Anthony Green  <green@cygnus.com>
14715
14716         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
14717         (JV_SCAN_SOURCES): New macro.
14718         (JCF_DUMP_SOURCES): Likewise.
14719         (jcf-dump$(exeext)): New target.
14720         (jv-scan$(exeext)): New target.
14721
14722 1998-10-22  Tom Tromey  <tromey@cygnus.com>
14723
14724         * Makefile.in (LEX): Removed.
14725         (LEXFLAGS): Likewise.
14726         (SET_BISON): New macro.
14727         (BISON): Removed.
14728         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
14729         spurious diffs in parse.c.
14730         ($(PARSE_SCAN_C)): Likewise.
14731         (PARSE_DIR): New macro.
14732         (PARSE_C): Use it.
14733         (PARSE_SCAN_C): Likewise.
14734         (PARSE_RELDIR): New macro.
14735
14736         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
14737
14738         * jcf-io.c (find_class): Use saw_java_source to determine when to
14739         look for `.java' file.
14740         * jcf-parse.c (saw_java_source): New global.
14741         (yyparse): Set it if `.java' file seen.
14742
14743         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
14744         (GCJH_SOURCES): Likewise.
14745         * Makefile.in (datadir): New macro.
14746         (libjava_zip): Likewise.
14747         (JAVA_OBJS): Added jcf-path.o.
14748         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14749         (../gcjh$(exeext)): Likewise.
14750         (jcf-path.o): New target.
14751         * java-tree.h (fix_classpath): Removed decl.
14752         * jcf-parse.c (fix_classpath): Removed.
14753         (load_class): Don't call fix_classpath.
14754         * parse.y (read_import_dir): Don't call fix_classpath.
14755         * lex.h: Don't mention classpath.
14756         * lex.c (java_init_lex): Don't initialize classpath.
14757         * jcf-io.c (classpath): Removed global.
14758         (find_class): Use jcf_path iteration functions.  Correctly search
14759         class path for .java file.
14760         (open_in_zip): New argument `is_system'.
14761         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
14762         classpath-related options.
14763         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
14764         and -I.
14765         (lang_init): Call jcf_path_init.
14766         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
14767         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
14768         Correctly put braces around second string in each entry.
14769         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
14770         classpath-related options.
14771         (help): Updated for new options.
14772         * jcf.h: Declare functions from jcf-path.c.  Don't mention
14773         `classpath' global.
14774         * jcf-path.c: New file.
14775
14776         * jcf-depend.c: Include jcf.h.
14777
14778         * jcf-write.c (localvar_alloc): Returns `void'.
14779         (localvar_free): Removed unused variable.
14780
14781         * lang.c (OBJECT_SUFFIX): Define if not already defined.
14782         (init_parse): Use OBJECT_SUFFIX, not ".o".
14783
14784 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14785
14786         * class.c (emit_register_classes): Renamed from
14787         emit_register_class.
14788         * java-tree.h (emit_register_classes): Prototype renamed from
14789         emit_register_class.
14790         * jcf-parse.c (yyparse): Call emit_register_classes once before
14791         returning.
14792         * parse.y (java_expand_classes): No longer register classes.
14793
14794 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14795
14796         * class.c (is_compiled_class): New local variable
14797         seen_in_zip. Identify classes found in currently compiled source
14798         file(s).
14799         * decl.c (complete_start_java_method): Fixed typo.
14800         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
14801         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
14802         (CLASS_P): Moved around.
14803         (java_parse_abort_on_error): Macro moved from jcf-parse.c
14804         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
14805         java-parse.h
14806         (jcf_parse_source): Changed leading comment. Removed unnecessary
14807         fclose and CLASS_FROM_SOURCE_P marking.
14808         (parse_source_file): New local variables remember_for_generation
14809         and filename. Mark parsed file name identifier node. Removed block
14810         executed when parse_only was null. Set remember_for_generation.
14811         Use it as an argument to java_pop_parser_context.
14812         (yyparse): New local variables several_files, list, next node and
14813         current_file_list. Split ampersand separated file names into
14814         current_file_list. Iterate through the list and parse accordingly.
14815         * parse.h (java_pop_parser_context): New function prototype.
14816         * parse.y (ctxp_for_generation): New static global variable.
14817         (java_pop_parser_context): New argument generate. Link popped ctxp
14818         to ctxp_for_generation list accordingly.
14819         (java_complete_expand_methods): Fixed indentation.
14820         (java_expand_classes): New function.
14821
14822 1998-10-17  Per Bothner  <bothner@cygnus.com>
14823
14824         * Makefile.in:  Link with libiberty.a instead of memmove.o.
14825
14826 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14827
14828         * lex.c (setjmp.h): No longer included.
14829         * lex.h (setjmp.h): Included.
14830         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
14831         (duplicate_declaration_error_p): Renamed from
14832         duplicate_declaration_error.
14833         (build_array_from_name): New function prototype.
14834         * parse.y (setjmp.h): No longer included.
14835         (variable_declarator_id): Define action.
14836         (build_array_from_name): New function.
14837         (duplicate_declaration_error_p): Renamed from
14838         duplicate_declaration_error.  Fixed leading comment.
14839         (register_fields): Main `for' loop reorganized. Uses
14840         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
14841         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
14842         build_array_from_name.
14843         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
14844         types.
14845         (read_import_dir): Don't try to skip `.' and `..'.
14846         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
14847         build_array_from_name. Main `for' loop reorganized.
14848         (resolve_qualified_expression_name): When building access to a
14849         field, use the type where the field was found, not its own type.
14850         (maybe_access_field): Use field DECL_CONTEXT if the type where the
14851         field was found is null.
14852         (qualify_ambiguous_name): Sweep through all successive array
14853         dimensions.
14854
14855 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14856
14857         * java-tree.h (pop_labeled_block, lang_printable_name,
14858         maybe_add_interface, set_super_info, get_access_flags_from_decl,
14859         interface_of_p, inherits_from_p, fix_classpath,
14860         complete_start_java_method, emit_handlers, init_outgoing_cpool,
14861         make_class_data, register_class, alloc_name_constant): New
14862         function prototypes.
14863         * lang.c (lang_decode_option): Set argc argument unused. Fixed
14864         indentation. Added cast to remove warning.
14865         (lang_printable_name): Set v argument unused.
14866         (lang_print_error): Added argument to lang_printable_name call.
14867         (java_dummy_print, print_lang_decl, print_lang_type,
14868         print_lang_identifier, lang_print_xnode): All argument marked
14869         unused.
14870         * lex.c (java_unget_unicode): Removed unnecessary argument.
14871         (java_allocate_new_line): Unused local variable is gone.
14872         (java_read_char): Added parenthesis in expressions to remove
14873         warnings.  Added final return statement.
14874         (java_read_unicode): Added parenthesis in expression to remove
14875         warning.
14876         (java_parse_end_comment): Fixed java_unget_unicode invocation.
14877         (java_parse_escape_sequence): Likewise.
14878         (java_lex): Unused local variables are gone. Fixed
14879         java_unget_unicode invocation.
14880         * lex.h (set_float_handler): Prototype added when JC1_LITE not
14881         defined.
14882         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
14883         lang_printable_name invocation in macro.
14884         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
14885         Likewise.
14886         (duplicate_declaration_error): Suppressed unused argument in
14887         prototype.
14888         (identical_subpath_p): Function declaration is gone.
14889         (patch_invoke): Suppressed unused argument in prototype.
14890         (patch_cast, build_labeled_block, check_thrown_exceptions):
14891         Likewise.
14892         * parse.y (setjmp.h): Included
14893         (toplev.h): Likewise.
14894         (field_declaration:): Suppressed unused local
14895         (label_decl:): Fixed build_labeled_block invocation.
14896         (java_pop_parser_context): Put extra parenthesis around assignment
14897         in if.
14898         (yyerror): Suppressed unused local variables.
14899         (variable_redefinition_error): Fixed lang_printable_name
14900         invocation.
14901         (create_interface): Suppressed unused local variables.
14902         (create_class): Likewise.
14903         (duplicate_declaration_error): Suppressed unused argument. Fixed
14904         lang_printable_name invocation.
14905         (register_fields): Suppressed unused local variable. Fixed
14906         duplicate_declaration_error invocation.
14907         (method_header): Suppressed unused local variable.
14908         (method_declarator, parser_check_super): Likewise.
14909         (java_complete_class): Suppressed unused local variable. Fixed
14910         fatal error message.
14911         (complete_class_report_errors): Added default: in switch.
14912         (java_check_regular_methods): Fixed lang_printable_name
14913         invocations.
14914         (check_throws_clauses): Likewise.
14915         (java_check_abstract_methods): Suppressed unused local
14916         variable. Fixed lang_printable_name invocation.
14917         (read_import_entry): Added supplemental return statement.
14918         (read_import_dir): Suppressed unused local variables.
14919         (check_pkg_class_access, declare_local_variables): Likewise.
14920         (source_start_java_method): Suppressed unused extern variable
14921         declarations
14922         (expand_start_java_method): Suppressed unused extern and local
14923         variable declarations.
14924         (java_complete_expand_methods): Likewise.
14925         (java_complete_expand_method): Suppressed unused local variables.
14926         (make_qualified_name): Likewise.
14927         (resolve_qualified_expression_name): Added default: in
14928         switch. Fixed lang_printable_name invocation.
14929         (class_instance_creation_expression): Added parenthesis around
14930         expressions.
14931         (patch_method_invocation_stmt): Fixed lang_printable_name and
14932         patch_invoke invocations.
14933         (check_for_static_method_reference): Fixed lang_printable_name
14934         invocation.
14935         (patch_invoke): Suppressed unused arguments and local variables.
14936         (lookup_method_invoke): Suppressed unused local variables.
14937         (qualify_ambiguous_name): Added default: in switch.
14938         (identical_subpath_p): Function removed.
14939         (patch_assignment): Suppressed unused local variables. Suppressed
14940         unnecessary if statement. Fixed lang_printable_name invocations.
14941         (try_builtin_assignconv): Fixed lang_printable_name invocations.
14942         (valid_ref_assignconv_cast_p): Parenthesis around
14943         expression. Suppressed unused local variables.
14944         (build_binop): Suppressed unused local variables. fixed
14945         lang_printable_name invocations.
14946         (string_constant_concatenation): Suppressed unused local
14947         variables.
14948         (patch_unaryop): Fixed lang_printable_name invocation.
14949         (patch_cast): Suppressed unnecessary argument. Fixed
14950         lang_printable_name invocation.
14951         (patch_array_ref): Fixed lang_printable_name invocation.
14952         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
14953         (build_labeled_block): Suppressed unused argument.
14954         (generate_labeled_block): Fixed build_labeled_block invocation.
14955         (build_loop_body): Suppressed unused local variables.
14956         (patch_loop_statement): Likewise.
14957         (patch_exit): Fixed lang_printable_name invocation.
14958         (patch_switch_statement): Likewise.
14959         (case_identity): First argument marked unused.
14960         (patch_try_statement): Fixed lang_printable_name invocations.
14961         (patch_synchronized_statement, patch_throw_statement): Likewise.
14962         (check_thrown_exceptions): Fixed check_thrown_exceptions and
14963         lang_printable_name invocations.
14964         (check_thrown_exceptions_do): Suppressed unused argument.
14965
14966 1998-10-14  Tom Tromey  <tromey@cygnus.com>
14967
14968         * jcf-write.c (write_classfile): Add output class file as target.
14969         * lang-options.h: Added -MD, -MMD, -M, and -MM.
14970         * jcf.h: Added declarations for dependency-tracking functions.
14971         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
14972         * lang.c (lang_decode_option): Recognize -MD and -MMD.
14973         (finish_parse): Call jcf_dependency_write.
14974         (dependency_tracking): New global.
14975         (DEPEND_SET_FILE): New define.
14976         (DEPEND_ENABLE): New define.
14977         (init_parse): Enable dependency tracking if required.
14978         Include "flags.h".
14979         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
14980         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14981         (../gcjh$(exeext)): Likewise.
14982         (jcf-depend.o): New target.
14983         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
14984         (GCJH_SOURCES): Likewise.
14985         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
14986         dep_name argument.
14987         (find_classfile): Added dep_name argument.
14988         (find_class): Compute name of dependency.
14989         (open_in_zip): Call jcf_dependency_add_file.
14990         * gjavah.c (output_file): No longer global.
14991         (usage): Don't mention "gjavah".
14992         (help): Likewise.
14993         (java_no_argument): Likewise.
14994         (version): Likewise.
14995         (main): Recognize and handle -M family of options.
14996         (print_mangled_classname): Return is void.
14997         (process_file): Handle case where output is suppressed.
14998         (HANDLE_END_FIELD): Likewise.
14999         (HANDLE_METHOD): Likewise.
15000         * jcf-depend.c: New file.
15001
15002 1998-10-13  Jeffrey A Law  (law@cygnus.com)
15003
15004         * java-tree.def: Add missing newline at EOF.
15005
15006 1998-10-13  Tom Tromey  <tromey@cygnus.com>
15007
15008         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
15009         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
15010         function.
15011         Include <config.h> and "system.h".
15012         (disassemble_method): Undefine RET to avoid clash with
15013         config/i386/i386.h.
15014
15015 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15016
15017         * decl.c (runtime_exception_type_node, error_exception_type_node):
15018         New global variables.
15019         (init_decl_processing): Initialized.
15020         * expr.c (java_lang_expand_expr): Set caught exception type to
15021         null if catch handler argument doesn't exit.
15022         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
15023         tree codes.
15024         * java-tree.h (runtime_exception_type_node,
15025         error_exception_type_node): Global variables declared.
15026         (DECL_FUNCTION_THROWS): New macro.
15027         (DECL_FUNCTION_BODY): Modified comment.
15028         (DECL_SPECIFIC_COUNT): Likewise.
15029         (struct lang_decl): New field throws_list.
15030         (IS_UNCHECKED_EXPRESSION_P): New macro.
15031         * lex.c (java_lex): Generate location information for THROW_TK.
15032         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
15033         EXCEPTIONS_P): New macros.
15034         (enum jdep_code): New value JDEP_EXCEPTION.
15035         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
15036         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
15037         PATCH_METHOD_RETURN_ERROR): New macros.
15038         (patch_method_invocation_stmt): Added new argument to prototype.
15039         (patch_synchronized_statement, patch_throw_statement,
15040         check_thrown_exceptions, check_thrown_exceptions_do,
15041         purge_unchecked_exceptions, check_throws_clauses): New function
15042         prototypes.
15043         * parse.y Fixed typo in keyword section.
15044         (throw:): Rule tagged <node>.
15045         (THROW_TK): Keyword tagged <operator>.
15046         (method_header:): Last argument to call to method_header passed
15047         from throws: rule.
15048         (throws:, class_type_list:, throw_statement:,
15049         synchronized_statement:, synchronized:): Defined actions.
15050         (method_header): New local variable current. Register exceptions
15051         from throws clause.
15052         (java_complete_tree): Complete and verify exceptions from throws
15053         clause.
15054         (complete_class_report_errors): Error message on exceptions not
15055         found
15056         (java_check_regular_methods): Fixed typo. Shortcut on private
15057         overriding methods. Changed error message on method
15058         redefinition. Check for throws clause compatibility.
15059         (check_throws_clauses): New function.
15060         (java_check_abstract_methods): Use DECL_NAME for wfl or current
15061         method. Changed error message on method redefinition.
15062         (currently_caught_type_list): New static variable.
15063         (java_complete_expand_methods): Purge unchecked exceptions from
15064         throws clause list. Call PUSH_EXCEPTIONS before walk and
15065         POP_EXCEPTIONS after.
15066         (resolve_qualified_expression_name): Pass new argument as NULL to
15067         patch_method_invocation_stmt.
15068         (patch_method_invocation_stmt): New argument ref_decl. Invoke
15069         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
15070         argument list when appropriate. Use new argument if non null to
15071         store selected method decl.
15072         (patch_invoke): Convert if necessary args of builtin types before
15073         forming CALL_EXPR. Argument list no longer reversed here.
15074         (invocation_mode): Treat final methods as static methods.
15075         (java_complete_tree): New cases for THROW_EXPR: and
15076         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
15077         function call.
15078         (complete_function_arguments): No more RECORD_TYPE
15079         conversion. Function parameter nodes no longer saved.
15080         (valid_ref_assignconv_cast_p): Avoid handling null type.
15081         (patch_binop): Fixed null constant reference handling.
15082         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
15083         BUILD_THROW macros.
15084         (patch_try_statement): Fixed comments. Record caught types in
15085         list, push the list, expand try block and pop the list.
15086         (patch_synchronized_statement, patch_throw_statement,
15087         check_thrown_exceptions, check_thrown_exceptions_do,
15088         purge_unchecked_exceptions): New functions.
15089         * typeck.c (lookup_argument_method): Allow WFL in place of method
15090         DECL_NAME during method definition check
15091
15092 1998-10-09  Tom Tromey  <tromey@cygnus.com>
15093
15094         * gjavah.c (decode_signature_piece): New function.
15095         (print_c_decl): Use it.  Added `name_override' argument.
15096         (print_method_info): Use name_override argument to print_c_decl.
15097         (seen_fields): Removed.
15098         (print_field_info): Don't update seen_fields.
15099         (struct method_name): New structure.
15100         (method_name_list): New global.
15101         (print_method_info): Add new method to list of methods.
15102         (name_is_method_p): New function.
15103         (print_field_info): If field name has same name as method, then
15104         change field name.
15105         (process_file): Parse methods before fields.
15106         (field_pass): New global.
15107         (HANDLE_END_FIELD): Take field_pass into account.
15108
15109 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15110
15111         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
15112         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
15113
15114 1998-10-03  Anthony Green  <green@cygnus.com>
15115
15116         * jvspec.c: Fix bug in jvgenmain_spec patch.
15117
15118 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15119
15120         * Makefile.in (lang.o:): Install dependency on java-tree.def.
15121         * decl.c (soft_exceptioninfo_call_node): New global variable.
15122         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
15123         takes extra integer argument. soft_exceptioninfo_call_node
15124         initialized.
15125         * except.c (java_set_exception_lang_code): New function
15126         (method_init_exceptions): Called here.
15127         (prepare_eh_table_type): New function.
15128         (expand_end_java_handler): Called here.
15129         * expr.c (build_java_throw_out_of_bounds_exception): Now features
15130         one argument. Modified generation of call to
15131         soft_badarrayindex_node to use new argument.
15132         (build_java_arrayaccess): Pass faulty index value to
15133         build_java_throw_out_of_bounds_exception.
15134         (generate_name): New function.
15135         (java_lang_expand_expr): New local variables node, current,
15136         has_finally_p. Expand TRY_EXPR node.
15137         (process_jvm_instruction): Replace top of the stack with thrown
15138         object reference when entering exception handler.
15139         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
15140         specific tree codes.
15141         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
15142         global.
15143         (DECL_SPECIFIC_COUNT): New macro.
15144         (prepare_eh_table_type, java_set_exception_lang_code,
15145         generate_name): New function declarations.
15146         (match_java_method): Declaration deleted.
15147         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
15148         macros.
15149         * lex.c (TRY_TK, CATCH_TK): Generate location information.
15150         * parse.h (redefinition_error, refine_accessible_methods_list,
15151         can_cast_to_p): Function declaration removed.
15152         (classitf_redefinition_error, variable_redefinition_error,
15153         parse_jdk1_1_error, find_applicable_accessible_methods_list,
15154         find_most_specific_methods_list, argument_types_convertible,
15155         enter_a_block, valid_builtin_assignconv_identity_widening_p,
15156         valid_cast_to_p, valid_method_invocation_conversion_p,
15157         try_reference_assignconv, add_stmt_to_compound,
15158         build_jump_to_finally, build_tree_list, patch_try_statement,
15159         java_get_catch_block): New function declarations.
15160         * parse.y (string_buffer_type): Global variable deleted.
15161         (group_of_labels, catches, catch_clause, catch_clause_parameter,
15162         finally): Rules tagged <node>.
15163         (TRY_TK, CATCH_TK): Token tagged <operator>.
15164         (class_body_declaration:, class_member_declaration:,
15165         formal_parameter:, explicit_constructor_invocation:,
15166         interface_member_declaration:, constant_declaration:,
15167         primary_no_new_array:, class_instance_creation_expression:,
15168         array_creation_expression:): Issue error on unsuported JDK1.1
15169         features.
15170         (try_statement:, catches:, finally:): Define actions.
15171         (catch_clause_parameter): New rule.
15172         (catch_clause:): Use new rule catch_clause_parameter.
15173         (parse_jdk1_1_error): New function.
15174         (redefinition_error): Renamed classitf_redefinition_error.
15175         (variable_redefinition_error): New function.
15176         (check_class_interface_creation): Call
15177         classitf_redefinition_error.
15178         (java_complete_tree): Added error message on JDEP_TYPE: case.
15179         (complete_class_report_errors): Fixed indentation.
15180         (declare_local_variables): Call variable_redefinition_error.
15181         (source_end_java_method): Call java_set_exception_lang_code and
15182         emit_handlers where appropriate.
15183         (java_method_add_stmt): Call add_stmt_to_block.
15184         (add_stmt_to_block): New function.
15185         (lookup_method_invoke): Fixed outside comment. new local variable
15186         candicates.  Call find_applicable_accessible_methods_list and
15187         find_most_specific_methods_list when searching for a
15188         method. Modified error report to list possible candidates when
15189         applicable.
15190         (find_applicable_accessible_methods_list,
15191         find_most_specific_methods_list, argument_types_convertible): New
15192         function.
15193         (refine_accessible_methods_list): Function deleted.
15194         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
15195         expr (if applicable) before calling patch_array_ref.
15196         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
15197         (enter_block): Fixed comment.
15198         (enter_a_block): New function.
15199         (patch_assignment): Reorganized. Call try_reference_assignconv for
15200         references. Call valid_cast_to_p instead of can_cast_to_p.
15201         (try_reference_assignconv,
15202         valid_builtin_assignconv_identity_widening_p): New functions.
15203         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
15204         (valid_cast_to_p, valid_method_invocation_conversion_p): New
15205         functions.
15206         (build_string_concatenation): Don't resolve StringBuffer.
15207         (patch_cast): Fixed inverted arguments.
15208         (patch_array_ref): Code to save array expr deleted. Call
15209         valid_cast_to_p instead of can_cast_to_p.
15210         (generate_labeled_block): Call generate_name.
15211         (build_jump_to_finally, build_try_statement, java_get_catch_block,
15212         patch_try_statement): New functions.
15213         * typeck.c (match_java_method): Function deleted.
15214
15215 1998-10-02  Anthony Green  <green@cygnus.com>
15216
15217         * jvspec.c: jvgenmain_spec uses different temporary file names.
15218
15219 1998-10-02  Anthony Green  <green@cygnus.com>
15220
15221         * jvspec.c (lang_specific_driver): Fail if user specifies
15222         --main= when not linking.
15223
15224 1998-09-28  Tom Tromey  <tromey@cygnus.com>
15225
15226         * class.c (make_class_data): Push value for `thread' field.
15227         * decl.c (init_decl_processing): Added `thread' field to class.
15228
15229         * class.c (add_field): Always make static fields externally
15230         visible.
15231
15232 1998-09-26  Anthony Green  <green@cygnus.com>
15233
15234         * expr.c (build_java_athrow,
15235         build_java_throw_out_of_bounds_exception, expand_invoke,
15236         build_newarray, expand_java_multianewarray, build_java_monitor):
15237         Update comments to reflect _Jv_* function names.
15238
15239 1998-09-25  Per Bothner  <bothner@cygnus.com>
15240
15241         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
15242         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
15243         * parse.y (expand_start_java_method):  Likewise.
15244
15245 1998-09-24  Per Bothner  <bothner@cygnus.com>
15246
15247         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
15248
15249         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
15250         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
15251         * expr.c:  Remove no-longer-needed calls to promote_type.
15252         * decl.c (give_name_to_locals):  Liekwise.
15253         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
15254         * parse.y:  Add/remove promote_type calls as appropriate.
15255         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
15256         (parse_signature_string):  Likewise.
15257         (build_java_array_type):  Fix for now signature convenions.
15258
15259         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
15260
15261 1998-09-23  Tom Tromey  <tromey@cygnus.com>
15262
15263         * class.c (init_class_processing): libjava function renamed to
15264         _Jv_RegisterClass.
15265
15266 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15267
15268         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
15269         * java-tree.def: Fixed DEFTREECODE third argument.
15270         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
15271         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
15272         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
15273         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15274         JAVA_THIS_EXPR): Now replaced by tree code definitions.
15275         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
15276         * lang.c (java_tree_code_type, java_tree_code_length,
15277         java_tree_code_name): New arrays.
15278         (lang_init): Append Java tree node definitions to Gcc ones.
15279         * lex.c (expression_obstack): Declared as extern when JC1_LITE
15280         defined.
15281         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
15282         wfl_to_string.
15283         (java_lex): Allow declaration of empty string constants. Retain
15284         location information on CASE_TK and DEFAULT_TK.
15285         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
15286         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
15287         Modified to be more robust.
15288         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
15289         (build_new_invocation, try_builtin_assignconv,
15290         patch_switch_statement, string_constant_concatenation,
15291         build_string_concatenation, patch_string_cst, patch_string,
15292         java_expand_switch): New function declarations.
15293         * parse.y: Rules related to switch and EH tagged <node>.
15294         (label_id): Set to NULL_TREE
15295         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
15296         tree nodes.
15297         (this_or_super:): Fixed indentation.
15298         (statement:, statement_nsi:, statement_without_trailing_substatement:,
15299         statement_expression:): Removed call to RULE on all sub-rules.
15300         (switch_expression:, switch_labels:): New rules.
15301         (switch_statement:, switch_block:, switch_block_statement_groups:,
15302         switch_block_statement_group:, switch_labels:, switch_label:):
15303         Defined actions.
15304         (throw_statement:, synchronized_statement:, try_statement:):
15305         Defined temporary actions.
15306         (class_instance_creation_expression:): Call
15307         build_new_invocation. Fixed indentation.
15308         (field_access): Fixed indentation.
15309         (method_invocation): Likewise.
15310         (make_qualified_primary): Use THIS_EXPR.
15311         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
15312         resolving from SUPER, set *type_found.
15313         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
15314         (java_complete_tree): Removed unused local variable `location'. Case
15315         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
15316         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
15317         on MODIFY_EXPR: and all binary operator tree code cases. Removed
15318         STRING_CST: case. default: checks for patchable strings.
15319         (complete_function_arguments): Transform string constant or
15320         crafted StringBuffer if necessary.
15321         (build_method_invocation): Fixed comments.
15322         (build_new_invocation): New function.
15323         (patch_assignment): Call try_builtin_assignconv to figure a valid
15324         assignment conversion between builtin types.
15325         (try_builtin_assignconv): New function.
15326         (build_binop): Use URSHIFT_EXPR directly to call build.
15327         (operator_string): Use UNARY_PLUS_EXPR.
15328         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
15329         operator.
15330         (do_merge_string_cste, merge_string_cste,
15331         string_constant_concatenation, build_string_concatenation,
15332         patch_string, patch_string_cst): New function.
15333         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
15334         (patch_unaryop): Likewise. New test of valid ++/-- operands.
15335         (build_newarray_node): Use NEW_ARRAY_EXPR.
15336         (build_this): Use THIS_EXPR.
15337         (build_return): Enable debug information on return statement.
15338         (build_if_else_statement): Likewise.
15339         (complete_labeled_statement): Fixed related comment.
15340         (build_loop_body): Fixed comment.
15341         (build_bc_statement): Enable debug information on break/continue
15342         statements.
15343         (patch_bc_statement): Fixed typos. Handle SWITCH statement
15344         context.
15345         (patch_switch_statement, case_identity, java_expand_switch): New
15346         functions.
15347
15348 1998-09-21  Per Bothner  <bothner@cygnus.com>
15349
15350         * buffer.h (BUFFER_INIT):  New macro.
15351         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
15352         Pass (struct jcf_partial *state) to most functions.
15353         (jcf_block, jcf_relocation):  New types.
15354         Support labels, branches, conditionals, loops.
15355
15356 1998-09-21  Tom Tromey  <tromey@cygnus.com>
15357
15358         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
15359
15360 1998-09-21  Per Bothner  <bothner@cygnus.com>
15361
15362         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
15363         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
15364         not integer_type_node (INT_TYPE_SIZ bits).
15365
15366         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
15367
15368         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
15369         * jcf-dump.c (print_exception_table):  New function.
15370         (disassemble_method):  Better handling of wide instructions.
15371         Make more robust for bad input.
15372
15373 1998-09-30  Jeffrey A Law  (law@cygnus.com)
15374
15375         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
15376         FreeBSD.
15377
15378 1998-09-17  Jeffrey A Law  (law@cygnus.com)
15379
15380         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
15381
15382 1998-09-17  Tom Tromey  <tromey@cygnus.com>
15383
15384         * Makefile.in ($(PARSE_H)): Removed target.
15385
15386 1998-09-17  Jeffrey A Law  (law@cygnus.com)
15387
15388         * Makefile.in (JAVA_OBJS): Add memmove.o
15389         (memmove.o): New target & rules.
15390
15391 1998-09-15  Tom Tromey  <tromey@cygnus.com>
15392
15393         * expr.c (expand_invoke): Don't generate a call to the class init
15394         code.
15395
15396 1998-09-14  Jeffrey A Law  (law@cygnus.com)
15397
15398         * Makefile.in: Add many missing dependencies.
15399         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
15400         as appropriate.
15401         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
15402         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
15403
15404 1998-09-11  Per Bothner  <bothner@cygnus.com>
15405
15406         * decl.c (complete_start_java_method):  If method is static (and
15407         not private) call _Jv_InitClass.
15408         * expr.c (expand_invoke):  Don't call build_class_init.
15409
15410         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
15411
15412 1998-09-10  Jeffrey A Law  (law@cygnus.com)
15413
15414         * Make-lang.in (GCJ): Define before using.
15415
15416 1998-09-09  Jeffrey A Law  (law@cygnus.com)
15417
15418         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
15419         losing due to namespace pollution in GNU getopt.h
15420
15421 1998-09-09  Tom Tromey  <tromey@cygnus.com>
15422
15423         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
15424         (java.all.cross): Likewise.
15425         (java.rest.encap): Likewise.
15426
15427 1998-09-08  Jeffrey A Law  (law@cygnus.com)
15428
15429         * gjavah.c (print_class_decls): Fix thinko in arglist
15430         * jcv-io.c (find_classfile): Similarly.
15431
15432 1998-09-07  Jeffrey A Law  (law@cygnus.com)
15433
15434         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
15435
15436 1998-09-05  Tom Tromey  <tromey@cygnus.com>
15437
15438         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
15439         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
15440         * Makefile.in (PARSE_C): New macro.
15441         (PARSE_H): Likewise.
15442         (PARSE_SCAN_C): Likewise.
15443         ($(PARSE_C)): Target renamed from parse.c.
15444         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
15445         (clean): Remove parse-scan.c as well.
15446         (parse.o): Depend on $(PARSE_C).
15447
15448 1998-09-05  Anthony Green  <green@cygnus.com>
15449
15450         * README, license.terms: Removed.
15451
15452         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
15453         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
15454         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
15455         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
15456         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
15457         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
15458         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
15459         and Java trademark attribution.
15460
15461 1998-09-04  Tom Tromey  <tromey@cygnus.com>
15462
15463         * Makefile.in: Use gcjh, not gjavah.
15464         * config-lang.in (stagestuff): Use gcjh, not gjavah.
15465         * Make-lang.in: Changed gjavah to gcjh everywhere.
15466
15467 1998-09-03  Per Bothner  <bothner@cygnus.com>
15468
15469         * gjavah.c:  Support new -prepend -add -append flags.
15470         (print_method_info):  Method is not virtual if class is final.
15471
15472 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15473
15474         * jv-scan.c: Fixed copyright assignment.
15475         * keyword.gperf: Likewise.
15476         * keyword.h: Likewise.
15477         * lex.c: Fixed copyright assignment.
15478         (java_lex): Push unicode back when parsing '<'.
15479         * lex.h: Fixed copyright assignment.
15480         * parse-scan.y: Likewise.
15481         * parse.h: Fixed copyright assignment.
15482         (build_debugable_stmt, complete_for_loop): New function prototypes.
15483         * parse.y: Fixed copyright assignment.
15484         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
15485         size_zero_node when completing a loop with no exit condition.
15486         (for_statement_nsi:): Define action.
15487         (for_init:, for_update:): Return size_zero_node when empty.
15488         (declare_local_variables): Call build_debugable_stmt.
15489         (build_debugable_stmt): New function.
15490         (build_loop_body): Build debugable statement around loop
15491         condition part.
15492         (complete_loop_body): Take into account the debugable statement
15493         around the EXIT_EXPR.
15494         (complete_loop_body): New function.
15495         (patch_exit_expr): Fixed condition inversion.
15496
15497 1998-09-02  Tom Tromey  <tromey@cygnus.com>
15498
15499         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
15500         name of thread define.
15501         * jvspec.c (THREAD_NAME): New macro.
15502         (GCLIB): Likewise.
15503         (THREADLIB): Likewise.
15504         (lang_specific_driver): Recognize attempt to link with thread
15505         library or gc library.  Recognize -ljava on command line so it
15506         isn't linked against more than once.
15507
15508 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15509
15510         * parse-scan.y (report_main_declaration): Name of the class
15511         containing `main' can be a qualified name.
15512
15513 1998-08-31  Tom Tromey  <tromey@cygnus.com>
15514
15515         * config-lang.in: Changed gjavac to gjc everywhere.
15516         * Make-lang.in: Changed gjavac to gjc everywhere.
15517
15518 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15519
15520         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
15521         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
15522         and install the files.
15523         * Makefile.in (JAVA_OBJS_LITE): New variable.
15524         (compiler:): Now include jv-scan as a dependency.
15525         (../jv-scan$(exeext), parse-scan.c): New targets.
15526         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
15527         * config-lang.in (compilers): Removed gcj, gjavah from the list.
15528         * jcf-parse.c (parse_source_file): Call java_layout_classes and
15529         check for errors even if parse_only.
15530         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
15531         defined.
15532         (yylex): New function. Uses java_lex body.
15533         (java_lex): Removed commented out statement. Remove local variable
15534         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
15535         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
15536         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
15537         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
15538         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
15539         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
15540         where appropriate.
15541         (java_lex_error): Empty if JC1_LITE is defined.
15542         (java_get_line_col): Return 0 if JC1_LITE is defined.
15543         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
15544         SET_MODIFIER_CTX): Moved into the section containing the macros
15545         conditionally defined by JC1_LITE.
15546         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
15547         argument if JC1_LITE is defined.
15548         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
15549         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
15550         is defined.
15551         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
15552         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
15553         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
15554         to different values according to JC1_LITE.
15555         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
15556         declared if JC1_LITE set.
15557         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
15558         defined if JC1_LITE not set.
15559         (struct parser_ctx): Reorganized and skip the jc1 front end part
15560         if JC1_LITE set.
15561         (java_layout_classes): New function definition.
15562         (java_push_parser_context, java_init_lex, yyparse, yylex,
15563         yyerror): Prototype always declared. All other static function
15564         prototypes declared only if JC1_LITE is not set.
15565         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
15566         declared in parse.h.
15567         (java_layout_classes): New function.
15568         (java_complete_expand_methods): No longer layout the class here.
15569         * parse-scan.y: New file.
15570         * jv-scan.c: New file.
15571
15572 1998-08-25  Tom Tromey  <tromey@cygnus.com>
15573
15574         * gjavah.c (main): Handle -friend option.
15575         (friend_specs): New global.
15576         (generate_access): Handle friend_specs.
15577         (process_file): Likewise.
15578         (MAX_FRIENDS): New macro.
15579         (friend_count): New global.
15580         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
15581         Changed all callers.
15582
15583 1998-08-24  Per Bothner  <bothner@cygnus.com>
15584
15585         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
15586         (main):  Handle processing all the entries of a named .zip archive.
15587         * jcf-io.c (jcf_trim_old_input):  New function.
15588         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
15589
15590 1998-08-24  Per Bothner  <bothner@cygnus.com>
15591
15592         * lang.c (flag_assume_compiled):  Make default be on.
15593
15594 1998-08-21  Per Bothner  <bothner@cygnus.com>
15595
15596         * jcf-dump.c:  Add bunches of flags to control output more.
15597         (process_class):  New function;  support printing more than one class.
15598         (main): Support new --print-main and --javap flags.
15599         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
15600         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
15601
15602 1998-08-20  Per Bothner  <bothner@cygnus.com>
15603
15604         Change mangling of dispatch table to match C++ vtable (w/thunks).
15605         * class.c (build_dtable_decl), java-tree.h:  New function.
15606         (make_class_data):  Call it.
15607         * decl.c (init_decl_processing):  Likewise.
15608
15609 1998-08-19  Warren Levy  <warrenl@cygnus.com>
15610
15611         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
15612         soft_anewarray; adjust args passed.
15613         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
15614         match _Jv_NewObjectArray.
15615
15616 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15617
15618         * decl.c (push_labeled_block, pop_labeled_block): New functions.
15619         * expr.c (loopup_label): Call create_label_decl.
15620         (create_label_decl): New function.
15621         (java_lang_expand_expr): Call expand_start_bindings with argument
15622         set to zero.
15623         * java-tree.h Added space after PROTO in function declarations
15624         when necessary.
15625         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
15626         (create_label_decl, push_labeled_block): New function
15627         declarations.
15628         * lex.c (label_id): Initialize.
15629         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
15630         switch.
15631         * parse.h Added space after PROTO in function declarations when
15632         necessary.
15633         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
15634         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
15635         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
15636         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
15637         macros.
15638         (struct parser_ctxt): New fields current_loop,
15639         current_labeled_block.
15640         (build_if_else_statement, patch_if_else_statement,
15641         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
15642         generate_labeled_block, complete_labeled_statement,
15643         build_bc_statement, patch_bc_statement, patch_loop_statement,
15644         build_new_loop, build_loop_body, complete_loop_body): New function
15645         declarations.
15646         * parse.y (java_warning_count): New global variable.
15647         (label_id): New static variable.
15648         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
15649         (block:): Return size_zero_node when block is empty.
15650         (empty_statement:): Return size_zero_node.
15651         (statement:): Implement supplemental action when for_statement: is
15652         reduced.
15653         (label_decl:): New rule.
15654         (labeled_statement:): Rewritten using label_decl. Actions
15655         implemented.
15656         (labeled_statement_nsi:): Likewise.
15657         (if_then_statement): Actions implemented.
15658         (while_expression): New rule.
15659         (while_statement:): Rewritten using while_expression. Actions
15660         implemented.
15661         (while_statement_nsi:): Likewise.
15662         (do_statement_begin:): New rule.
15663         (do_statement:): Rewritten using do_statement_begin. Actions
15664         implemented.
15665         (for_statement:): Rewritten using for_begin. Actions implemented.
15666         (for_statement_nsi:): Likewise.
15667         (for_header:, for_begin:): New rules.
15668         (for_init:): Actions implemented.
15669         (statement_expression_list:, break_statement:,
15670         continue_statement:): Likewise.
15671         (yyerror): Count number of issued warning(s).
15672         (java_report_errors): Report error(s) and/or warning(s).
15673         (java_complete_class): Use build_java_argument_signature to
15674         recompute completed method signature.
15675         (java_check_regular_methods): New locals method_wfl and aflags.
15676         Use method_wfl instead of lookup_cl during error reports. Fixed
15677         indentation and modified some error messages. Use
15678         lang_printable_name in method instead of the DECL_NAME. New code
15679         to issue warnings on methods not overriding corresponding methods
15680         private to a different package.
15681         (java_method_add_stmt): Call add_stmt_to_compound.
15682         (add_stmt_to_compound): New function.
15683         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
15684         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
15685         (build_if_else_statement, patch_if_else_statement,
15686         build_labeled_block, generate_labeled_block,
15687         complete_labeled_statement, build_new_loop, build_loop_body,
15688         complete_loop_body, patch_loop_statement, build_bc_statement,
15689         patch_bc_statement, patch_exit_expr): New functions.
15690         * typeck.c (build_java_signature): Build argument signature before
15691         enclosing it in between parenthesis.
15692
15693 1998-08-17  Warren Levy  <warrenl@cygnus.com>
15694
15695         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
15696         (JAVA_OBJS): Added reminder comment
15697
15698 1998-08-13  Nick Clifton  <nickc@cygnus.com>
15699
15700         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
15701         be interpreted as a long long.
15702
15703 1998-08-13  Warren Levy  <warrenl@cygnus.com>
15704
15705         * decl.c (init_decl_processing): Use _Jv_InitClass, not
15706         soft_initialise_class.  Use _Jv_NewMultiArray, not
15707         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
15708         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
15709         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
15710         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
15711
15712 1998-08-12  Per Bothner  <bothner@cygnus.com>
15713
15714         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
15715         length_identifier_node):  New global tree node constants.
15716         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
15717         Replace uses by super_identifier_node etc.
15718         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
15719
15720         * parse.y (resolve_field_access):  Don't special-case ".length" if
15721         flag_emit_class_files.
15722         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
15723         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
15724         and ARRAY.length.
15725
15726 1998-08-11  Per Bothner  <bothner@cygnus.com>
15727
15728         * decl.c (init_decl_processing): Remove unused method_type_node fields.
15729         * class.c (make_method_value):  Remove init for removed fields.
15730
15731         * class.c (layout_class):  Use build_java_argument_signature.
15732         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
15733
15734         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
15735         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
15736         (build_java_signature):  Don't use push_java_argument_signature.
15737
15738         * typeck.c (lookup_argument_method):  New function.
15739         * parse.y (java_check_regular_methods):  Use lookup_argument_method
15740         instead of lookup_java_method2 followed by lookup_java_method.
15741
15742         * parse.y (check_method_redefinition):  Minor optimization.
15743
15744         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
15745         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
15746
15747 1998-08-10  Tom Tromey  <tromey@cygnus.com>
15748
15749         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
15750         c-pragma.o.
15751
15752         * gjavah.c (java_float_finite): Use K&R-style definition.
15753         (java_double_finite): Likewise.
15754         (generate_access): Now returns void.  Changed all callers.
15755         (last_access_generated): Removed.
15756         (process_file): Only make a single pass over the .class file.
15757
15758 1998-07-29  Per Bothner  <bothner@cygnus.com>
15759
15760         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
15761         for compatibility for G++ (with -fvtable-thunks).
15762         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
15763
15764         * gjavah.c (process_file):  Use public inheritance for super-class.
15765
15766 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15767
15768         * lex.c (java_init_lex): Initialize ctxp->package.
15769         * parse.h (struct parser_ctxt): package and package_len replaced
15770         by tree package, an identifier node. Field method_decl_list is
15771         gone. Fixed comments.
15772         (lookup_field_wrapper, merge_qualified_name, not_accessible,
15773         class_in_current_package): New function prototypes.
15774         * parse.y (array_type:): Set class loaded flag on primitive type
15775         arrays.
15776         (package_declaration:): Assign ctxp->package to the
15777         identifier node.
15778         (method_invocation:): Handle invocation of method qualified by
15779         `super'.
15780         (single_type_import_declaration:): Removed ambiguity check.
15781         (java_pop_parser_context): New local variable `next'. Reset and
15782         set IMPORT_CLASSFILE_NAME flags on current and previous import
15783         list.
15784         (java_accstring_lookup): Use new local macro COPY_RETURN.
15785         (lookup_field_wrapper): New function.
15786         (parser_qualified_classname): Use merge_qualified_name.
15787         (parser_check_super_interface): Broaden error message.
15788         (do_resolve_class): Check for qualified class name in the current
15789         compilation unit if appropriate.
15790         (process_imports): Check for already defined classes.
15791         (check_pkg_class_access): Got rid of call to
15792         get_access_flags_from_decl.
15793         (java_complete_expand_methods): Call safe_layout_class based on
15794         the current class size.
15795         (make_qualified_primary): Build a WFL qualification on primary if
15796         none exists.
15797         (merge_qualified_name): New function.
15798         (make_qualified_name): Use merge_qualified_name.
15799         (resolve_expression_name): Use safe_lookup_field.
15800         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
15801         (resolve_qualified_expression_name): Likewise. Check on resolved
15802         element accessibility.
15803         (not_accessible_p, class_in_current_package): New functions.
15804         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
15805         (patch_method_invocation_stmt): Merged common pieces. Check
15806         accessibility of invoked method.
15807         (check_for_static_method_reference): Add returned type in error
15808         message.
15809         (invocation_mode): Get rid of bogus check on PRIVATE methods.
15810         (refine_accessible_methods_list): Merged two conditions in test.
15811         (java_complete_class): Sanity check on stabilize_ref gone.
15812         * zextract.c (read_zip_archive): Cast lseek second argument to long.
15813
15814 1998-07-28  Per Bothner  <bothner@cygnus.com>
15815
15816         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
15817
15818 1998-07-24  Tom Tromey  <tromey@cygnus.com>
15819
15820         * gjavah.c (F_NAN): Removed.
15821         (F_NAN_MASK): New macro.
15822         (F_POSITIVE_INFINITY): Removed.
15823         (F_NEGATIVE_INFINITY): Likewise.
15824         (java_float_finite): Rewrote.
15825         (D_NAN_MASK): Renamed.
15826         (java_double_finite): Rewrote.
15827         (D_POSITIVE_INFINITY): Removed.
15828         (D_NEGATIVE_INFINITY): Likewise.
15829
15830         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
15831         If verbose, print underlying representation of value in hex.
15832
15833 1998-07-24  Per Bothner  <bothner@cygnus.com>
15834
15835         * buffer.h, buffer.c:  New files.
15836         * Makefile.in (JAVA_OBJS):  Add buffer.o.
15837
15838         Support locals variables and writing their debug entries to .class.
15839         * jcf-write.c:  Simplify some by user new buffer type.
15840         (vode_buffer_grow):  Removed.
15841         (struct localvar_info):  New type.
15842         (localsvars, localvartable):  New buffers.
15843         (localvar_alloc, localvar_free):  New functions.
15844         (generate_bytecode_insns):  Handle local variables.
15845         (generate_classfile):  Write LocalVariableTable attribute.
15846
15847 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15848
15849         * jcf-io.c (open_in_zip): Check the zipfile magic number.
15850         * zipfile.h (ZIPMAGIC): New macro.
15851
15852 1998-07-24  Tom Tromey  <tromey@cygnus.com>
15853
15854         * Makefile.in (gjavah.o): Updated dependencies.
15855         (jcf-dump.o): Likewise.
15856         (all.indirect): Use ../gjavah.
15857         (../gjavah$(exeext)): Likewise.
15858         (clean): Don't remove gjavah.
15859         (clean): Remove parse.c, not java/parse.c.
15860         * Make-lang.in (java): Added gjavah.
15861         (gjavah$(exeext)): New target.
15862         (GJAVAH_SOURCES): New macro.
15863         (java.all.build): Added gjavah.
15864         (java.all.cross): Likewise.
15865         (java.rest.encap): Likewise.
15866         * config-lang.in (compilers, stagestuff): Added gjavah.
15867
15868 1998-07-23  Tom Tromey  <tromey@cygnus.com>
15869
15870         * gjavah.c (java_float_finite): New function.
15871         (java_double_finite): Likewise.
15872         (F_POSITIVE_INFINITY): New macro.
15873         (F_NEGATIVE_INFINITY): Likewise.
15874         (F_NAN): Likewise.
15875         (D_POSITIVE_INFINITY): Likewise.
15876         (D_NEGATIVE_INFINITY): Likewise.
15877         (D_NAN): Likewise.
15878         (print_field_info): Use java_float_finite and java_double_finite.
15879
15880 1998-07-23  Per Bothner  <bothner@cygnus.com>
15881
15882         * parse.y (method_header):  Name "this" implicit argument.
15883
15884 1998-07-22  Per Bothner  <bothner@cygnus.com>
15885
15886         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
15887         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
15888         (put_linenumber):  New function.
15889         (generate_bytecode_insns, generate_classfile):  Write line numbers.
15890
15891 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15892
15893         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
15894         (lookup_name, build_known_method_ref, build_class_init,
15895         build_invokevirtual, invoke_build_dtable, match_java_method,
15896         build_field_ref, pushdecl_force_head, build_java_binop,
15897         binary_numeric_promotion, build_decl_no_layout,
15898         build_java_arrayaccess, build_newarray, build_anewarray,
15899         build_java_array_length_access, build_java_arraynull_check): New
15900         extern function prototypes.
15901         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15902         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
15903         java-tree.h.
15904         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
15905         to NULL
15906         * jcf.h (jcf_out_of_synch): New extern function prototype.
15907         * parse.h: Static/global function implemented in parse.y
15908         prototyped and declarations moved at the end of the file.
15909         (DECL_P): Check that the argument isn't null.
15910         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15911         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
15912         (QUAL_DECL_TYPE): New macro.
15913         (PARAMS): Macro definition removed.
15914         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
15915         (return_statement:): Call build_return.
15916         (field_access:): Call make_qualified_primary in sub rule.
15917         (method_invocation:): Build method invocation and call
15918         make_qualified_primary when processing primaries.
15919         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
15920         get_type_from_signature.
15921         (java_check_regular_method): Extra integer 0 argument when calling
15922         lookup_java_method2.
15923         (lookup_java_interface_method2): Extra method DECL argument when
15924         calling lookup_java_interface_method2.
15925         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
15926         COMPOUND_EXPR node.
15927         (java_complete_expand_method): Layout current class iff not
15928         already done. Don't process interface's methods.
15929         (java_complete_expand_method): Use super class only if it
15930         exists. Use current class otherwise.
15931         (make_qualified_primary): New function.
15932         (resolve_expression_name): Process qualified expression or
15933         expression from primary the same way.
15934         (resolve_expression_name): Two last arguments to
15935         resolve_field_access are now NULL_TREEs.
15936         (resolve_field_access): New variable is_static. Local field must
15937         be DECLs. is_static computed on field DECLs only. Append code in
15938         where_found to the field access if necessary. Use QUAL_DECL_TYPE
15939         to initialize field_type.
15940         (resolve_qualified_expression_name): New local variable,
15941         previous_call_static and is_static. Handle primaries with function
15942         calls, casts, array references and `this'. `super' now handled as
15943         `(super_class)this'. Use is_static to clarify boolean expressions.
15944         Added code to handle case where a proper handle is required to
15945         access a field. Use QUAL_DECL_TYPE where applicable.
15946         (maybe_access_field): New function.
15947         (patch_method_invocation_stmt): New arguments primary, where,
15948         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
15949         deleted. Use `where' as a type to search from if specified. Check
15950         for static method reference where forbidden. Append primary or
15951         current_this to the argument list if not calling constructor nor
15952         static methods.
15953         (check_for_static_method_reference): New function.
15954         (patch_invoke): Layout the class on which new is done if
15955         necessary.
15956         (lookup_method_invoke): Changed format to report errors on
15957         methods.
15958         (qualify_ambiguous_name): New local variable this_found. Now
15959         handle things from primaries. Method call are considered
15960         expression names.
15961         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
15962         changed into NULLs.
15963         (not_initialized_as_it_should_p): Comply with the new DECL_P.
15964         (java_complete_tree): New case fo RETURN_EXPR. Process function
15965         call arguments in separate function.
15966         (complete_function_arguments): New function.
15967         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
15968         anymore.
15969         (patch_assignment): Take the return function slot into account as
15970         a RHS. Distinguish assignment from a return.
15971         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
15972         when checking methods in interfaces.
15973         (resolve_type_during_patch): NULL argument to unresolve_type_p
15974         instead of NULL_TREE.
15975         (patch_newarray): Fixed typo in comment.
15976         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
15977         (build_return, patch_return): New functions.
15978         * typeck.c (lookup_java_constructor): Fixed typo in comment.
15979
15980 1998-07-21  Per Bothner  <bothner@cygnus.com>
15981
15982         * constants.c (find_name_and_type_constant, find_fieldref_index,
15983         find_methodref_index):  New methods.
15984         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
15985         just return given method.  Also, rename to build_known_method_ref.
15986         (expand_invoke):  Rename call to build_invoke_non_interface.
15987         * java-tree.h, parse.h:  Update prototype.
15988         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
15989         (such as expand_expr_stmt) if flag_emit_class_files.
15990         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
15991         STACK_TARGET, IGNORE_TARGET):  New macros.
15992         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
15993         (generate_bytecode_insn):  New function to generate method's bytecode.
15994         (generate_classfile):  Node generate Code attribute for a method.
15995         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
15996         push_long_const, field_op, adjust_typed_op, maybe_wide):
15997         New functions used by generate_bytecode_insn.
15998
15999         * typeck.c (signature_include_return):  Remove variable.
16000         (push_java_argument_signature, build_java_argument_signature):  New.
16001         (build_java_signature):  Use push_java_argument_signature.
16002         * parse.y:  Use build_java_argument_signature instead of fiddling
16003         with signature_include_return.
16004
16005 1998-07-17  Tom Tromey  <tromey@cygnus.com>
16006
16007         * gjavah.c (print_c_decl): Always generate JArray<>* for array
16008         types.
16009
16010         * Makefile.in (all.indirect): Added gjavah$(exeext).
16011         (gjavah$(exeext)): Added $(exeext).
16012         (clean): Likewise.
16013
16014 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16015
16016         * class.c (layout_class): Call to java_layout_parsed_class replace
16017         by safe_layout_class.
16018         * expr.c (build_java_array_length_access): Removed static storage
16019         class in the function definition.
16020         (build_java_arraynull_check): Likewise.
16021         Also fixed typos in two comments.
16022         * lex.c (java_init_lex): Initialize static global kw_length.
16023         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
16024         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
16025         java_lex_error.
16026         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
16027         * parse.h (resolve_no_layout): New static function declaration.
16028         (get_identifier_in_static): Declaration removed.
16029         (java_layout_parsed_class): Function name declaration changed to
16030         safe_layout_class.
16031         (build_newarray_node, patch_newarray, resolve_type_during_patch,
16032         not_initialized_as_it_should_p, build_this): New static function
16033         declarations.
16034         (pushdecl_force_head, build_java_binop, int_fits_type_p,
16035         binary_numeric_promotion, stabilize_reference,
16036         build_decl_no_layout, build_java_arrayaccess): Extern function
16037         declarations moved into their own section.
16038         (build_newarray, build_anewarray, build_java_array_length_access,
16039         build_java_arraynull_check): New extern function declarations.
16040         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
16041         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
16042         fake tree codes.
16043         (CALL_CONSTRUCTOR_P): New macro.
16044         * parse.y (kw_length): New static global tree node.
16045         (return_statement): Tagged <node>.
16046         (RETURN_TK): Tagged <operator>.
16047         (variable_declarator_id:): Build variable declaration with an
16048         empty initialization value if a syntax error was found in the
16049         initialization part of the variable declaration.
16050         (statement_without_trailing_substatement:): return_statement: now
16051         uses the default rule.
16052         (return_statement:): Temporarily fixed to return NULL_TREE.
16053         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
16054         (class_instance_creation_expression:): Class creation rules now
16055         call build_method_invocation upon reduction.
16056         (array_creation_expression:): Rules call build_newarray_node upon
16057         reduction.
16058         (dim_exprs:): Build a list of dimension expressions.
16059         (dim_expr:): Store location of the OSB_TK in the dimension
16060         expression node.
16061         (method_invocation:): Added a new error rule.
16062         (build_unresolved_array_type): WFL argument may also be an array
16063         on a primitive type. Name of the argument changed to reflect this.
16064         (method_declarator): Insert argument type at the beginning of the
16065         argument type list and later reverse the list.
16066         (unresolved_type_p): Argument 'returned' may be optionally
16067         NULL_TREE.
16068         (java_layout_class_from_source): Function renamed
16069         safe_layout_class.
16070         (resolve_and_layout): Now call resolve_no_layout and
16071         safe_layout_class.
16072         (resolve_no_layout): New function.
16073         (purify_type_name): New function.
16074         (complete_class_report_errors): Call purify_type_name during error
16075         report on a type not found.
16076         (process_imports): error_found local variable doesn't need to be
16077         initialized to zero.
16078         (declare_local_variables): New local type_wfl. Fixed typo in error
16079         message. type_wfl assigned to unresolved type and used to register
16080         incomplete type. Build a WFL around the variable initialization
16081         statement so that debug info can be generated on it.
16082         (source_start_java_method): Reverse argument list after they've
16083         been processed.
16084         (current_this): New static global variable.
16085         (java_complete_expand_methods): Set current_this when appropriate.
16086         (resolve_expression_name): Build correct static and non static
16087         field access bearing a simple name.
16088         (resolve_field_access): Resolve the length field of arrays. Handle
16089         f.m() cases.
16090         (patch_method_invocation_stmt): Set the type of the method
16091         invocation to error_mark_node. This value is later overridden by a
16092         valid type, if any. Don't handle qualified constructor invocation
16093         as qualified method invocation. Call lookup_method_invoke with its
16094         new flag. It's no longer necessary to access the selected method
16095         as the value of a tree list. Handle constructor invocation.
16096         (patch_invoke): Reverse argument list when invoking non interface
16097         methods. Insert call to new as the first argument of the
16098         constructor.
16099         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
16100         defined within a final class. Return INVOKE_STATIC if the invoked
16101         method is a constructor.
16102         (lookup_method_invoke): New lc argument is a flag to indicate a
16103         constructor lookup. Now handle constructor lookup. Choose the most
16104         specific method in case several were matching the invocation
16105         requirements. Return a method decl instead of a tree list featuring
16106         one single method decl element.
16107         (refine_accessible_methods_list): New lc flag argument to
16108         indicate that a constructor is being looked up.
16109         (not_initialized_as_it_should_p): New function.
16110         (java_complete_tree): Now process fake tree codes
16111         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
16112         save_expr on resolved function call arguments. Case on
16113         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
16114         (patch_assignment): LHS can be a field access expression. When
16115         dealing with reference, lhs_type is the promoted type of the
16116         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
16117         applicable.
16118         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16119         (patch_binop): Use not_initialized_as_it_should_p where
16120         applicable.
16121         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16122         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
16123         where applicable.
16124         (resolve_type_during_patch): New function.
16125         (patch_cast): Call resolve_type_during_patch to resolve type and
16126         report error accordingly.
16127         (patch_array_ref): Use not_initialized_as_it_should_p where
16128         applicable. Array base expression is saved before being
16129         used. Promote the type of an array elements if it contains non
16130         builtin types.
16131         (build_newarray_node, patch_newarray, build_this): New functions.
16132
16133 1998-07-16  Tom Tromey  <tromey@cygnus.com>
16134
16135         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
16136         increment it in `for' statement.
16137         (print_field_info): If number is inf or nan, don't print it.
16138         (print_method_info): If method name is `delete', just ignore it.
16139         (print_c_decl): Special-case jstringArray.
16140
16141         * gjavah.c (help): New function.
16142         (no_argument): New function.
16143         (usage): Changed text.
16144         (main): Rewrote argument handling.  Now handles -v, --help,
16145         --version.
16146         (version): New function.
16147         (found_error): New global.
16148         (main): Return found_error.
16149         (generate_access): Set found_error.
16150         (print_c_decl): Likewise.
16151
16152 1998-07-15  Tom Tromey  <tromey@cygnus.com>
16153
16154         * gjavah.c (print_c_decl): Don't print "," when examining field.
16155         Skip type name when looking at "[L" types.
16156         (process_file): Now static.
16157         (generate_access): Now returns int.
16158         (last_access_generated): New global.
16159         (process_file): Clear last_access_generated; make multiple passes
16160         over the class.
16161         (print_field_info): Just return if generate_access returns true.
16162         (print_method_info): Likewise.  Also, allow <init> functions to
16163         pass through.
16164         (print_c_decl): Added is_init argument.  Print constructors
16165         properly.
16166         (print_cxx_classname): Use UTF8_GET to extract characters from
16167         string.
16168         (print_base_classname): New function.
16169         (print_class_decls): New function.
16170         (process_file): Use it.
16171         (utf8_cmp): New function.
16172
16173 1998-07-13  Nick Clifton  <nickc@cygnus.com>
16174
16175         * lang-options.h: Format changed to match changes in gcc/toplev.c
16176         to implement a --help option.
16177
16178 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
16179
16180         * decl.c (init_decl_processing): Revert change to dtable_type.
16181
16182 1998-07-09  Per Bothner  <bothner@cygnus.com>
16183
16184         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
16185
16186 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
16187
16188         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
16189
16190         * lang.c (lang_init): Default flag_exceptions to 1, without
16191         checking to see if it's 2 first.
16192
16193 1998-07-08  Jeffrey A Law  (law@cygnus.com)
16194
16195         * constants.c: Include "system.h".
16196         * decl.c: Likewise.
16197         * lang.c (flag_new_exceptions): Get via extern now.
16198         (lang_init_options): New functions.  Turn on flag_new_exceptions.
16199
16200 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16201
16202         * lex.c (java_lex): Return 0 when we see an invalid character in
16203         the input.
16204
16205         * lex.c (java_read_char): Specify extra argument when calling
16206         java_lex_error.
16207         (java_read_unicode, java_parse_end_comment,
16208         java_parse_escape_sequence): Likewise,
16209         (java_lex): Specify extra argument when calling
16210         java_lex_error. Test that IDs are beginning with a legal character
16211         for IDs. Handle invalid characters with an error message and a
16212         call to java_lex_error.
16213         (java_lex_error): Adjust column position by new argument
16214         `forward'. Issue an error even if in the middle of reporting an
16215         other error.
16216
16217 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
16218
16219         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
16220         we don't explicitly put a null pointer when we're copying it.
16221
16222 1998-07-07  Tom Tromey  <tromey@cygnus.com>
16223
16224         * gjavah.c (print_cxx_classname): New function.
16225         (super_class_name): Likewise.
16226         (print_super_fields): Removed.
16227         (in_super): Removed.
16228         (print_field_info): Never generate #defines.
16229         (print_c_decl): Changed generated types to match JNI.  No longer
16230         print class name before method name.
16231         (print_method_info): Print "static" before static methods.
16232         Print "virtual" before non-final methods.
16233         (usage): Use exit(1), not exit(-1).
16234         (main): Likewise.
16235         (print_field_info): Use %.17g to print a double.
16236         (last_access): New globals.
16237         (process_file): Initialize last_access.
16238         (usage): Now static.
16239         (ACC_VISIBILITY): New define.
16240         (generate_access): New function.
16241         (print_field_info): Call it.
16242         (print_method_info): Likewise.  Also, generate information for all
16243         methods, not just native methods.  Return void.
16244         (print_c_decl): Return void.
16245         (print_field_info): Return void.
16246
16247 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16248
16249         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
16250         processing the jc1 grammar file. Prefix bison functions and
16251         variables with java_.
16252         (parse.c): Dependencies on parse.h and lex.h
16253         * expr.c (build_java_arrayaccess): Function now global.
16254         * java-tree.h: Comment reorganized to carry on previous
16255         classification effort.
16256         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
16257         RESOLVE_TYPE_NAME_P): New flags on WFLs.
16258         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
16259         java_parse (new prefix java_ generated by bison).
16260         (java_layout_parsed_class, java_register_parsed_class): Function
16261         call removed.
16262         (yyparse): Removed unnecessary call to init_outgoing_cpool.
16263         * lex.c (static tree wfl_op): Variable deleted.
16264         (java_init_lex): Initialize kw_super and kw_this. Initialize more
16265         ctxp fields to NULL_TREE.
16266         (java_lex): No longer create WFL for operators. Filename caching
16267         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
16268         created as STRING_CST and later expanded. Removed extra argument
16269         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
16270         and SUPER.
16271         (build_wfl_node): Removed code in comments.
16272         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
16273         store token and location data in the current bison token.
16274         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
16275         static/extern function declaration at the beginning of the file.
16276         (struct qualification): Data structure definition deleted.
16277         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
16278         (qualify_ambiguous_name): Function declaration modified. Function
16279         now returns nothing.
16280         (build_array_ref, patch_array_ref, make_qualified_name,
16281         resolve_qualified_expression_name, maybe_generate_clinit,
16282         resolve_field_access): New static function declarations.
16283         (build_java_arrayaccess): New extern function declaration.
16284         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
16285         (CALL_EXPR_PRIMARY): Macro deleted.
16286         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
16287         (struct parser_ctxt): Field initialized_final
16288         removed. non_static_initialized, static_initialized: New fields.
16289         * parse.y (static tree kw_super, static tree kw_this): New global
16290         static.
16291         (%union): tree wfl field of operator member replaced by int
16292         location. WFLs are non longer created for operators.
16293         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
16294         (qualified_name:): Now calls make_qualified_name to build the
16295         identifier.
16296         (type_declaration:): Consider generating <clinit> when class
16297         parsing completed.
16298         (variable_declarator:): Directly build an assignment node when the
16299         variable is initialized when declared.
16300         (this_or_super:): Build a WFL and set current location when THIS
16301         or SUPER are parsed.
16302         (expression_statement:): Wrap statement around a WFL.
16303         (primary_no_new_array:): Fixed typo. Changed value returned by
16304         THIS_TK because of its new type (temporary).
16305         (dim_exprs:): Temporary fix because of OSB_TK's new type.
16306         (field_access:): Build qualified name with SUPER.
16307         (method_invocation:): Fixed returned value because of SUPER's new
16308         type.
16309         (array_access:): Use OSB_TK location information.
16310         (post_increment_expression:, post_decrement_expression:,
16311         unary_expression:, pre_increment_expression:,
16312         pre_decrement_expression:, unary_expression_not_plus_minus:,
16313         cast_expression:, multiplicative_expression:,
16314         additive_expression:, shift_expression:, relational_expression:,
16315         equality_expression:, and_expression:, exclusive_or_expression:,
16316         inclusive_or_expression:, conditional_and_expression:,
16317         conditional_or_expression:, assignment:): Use new location/token
16318         information available on operators.
16319         (create_class): Set super_decl_type to NULL_TREE when processing
16320         java.lang.Object.
16321         (register_fields): Field initialization is now a MODIFY_EXPR
16322         node. Chain initialization code to the matching lists (according
16323         to the field declaration modifiers).
16324         (maybe_generate_clinit): New function.
16325         (method_header): Don't set method's DECL_NAME to a WFL when adding
16326         methods to java.lang.Object.
16327         (resolve_and_layout): Now can return NULL_TREE if the type
16328         resolution fails. Otherwise, return the class DECL instead of its
16329         TYPE.
16330         (check_method_redefinition): Don't patch method DECL_NAME if it
16331         belongs to java.lang.Object.
16332         (process_imports): Simply assign error_found to the value returned
16333         by check_pkg_class_access.
16334         (declare_local_variables): Don't use their init statements (if
16335         any) when parsing error were previously found. Reuse MODIFY_EXPR
16336         build during parsing as an init statement.
16337         (java_method_add_stmt): Now return the current method body.
16338         (java_layout_parsed_class, java_register_parsed_class): Functions
16339         removed.
16340         (java_complete_expand_methods): Initialize the constant pool on a
16341         per class basis. Layout the classes before expanding their method
16342         bodies. Don't try expand artificial constructor code if error were
16343         found. Make the classes data and register them if no error were
16344         found.
16345         (java_complete_expand_method): Retrieve an artificial constructor
16346         argument list before entering its body. Assign the top block to
16347         the artificial constructor function body and set types of declared
16348         blocks and compound statements to void. Walk method body if not an
16349         artificial constructor.
16350         (make_qualified_name, cut_identifier_in_qualified): New functions.
16351         (resolve_expression_name): Fixed comments. Save/restore the
16352         current class CLASS_LOADED_P flag value. Build non qualified
16353         static field access and handle qualified expression names.
16354         (resolve_field_access, resolve_qualified_expression_name): New
16355         functions.
16356         (patch_method_invocation_stmt): Use the new expression resolution
16357         scheme, calling resolve_field_access when the function call is
16358         resolved as an expression.
16359         (qualify_ambiguous_name): Function rewritten to work on qualified
16360         expression produced by make_qualified_name.
16361         (java_complete_tree): Promote type when function's argument are
16362         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
16363         the assignment to discover further errors if RHS is a expression
16364         name that fails to evaluate. Declare LHS initialized even though
16365         the assignment failed. Don't use the location variable and removed
16366         extra argument in patch function calls. Now handle the ARRAY_REF
16367         case and build internal string representation when STRING_CSTs are
16368         walked.
16369         (build_method_invocation): Don't wrap function call around a WFL.
16370         (build_assignment): Likewise. Use the operator location
16371         information.
16372         (patch_assignment): Handle array access LHSs. Handle error
16373         provenance, resulting in a better error report.
16374         (build_binop): Use op_location from operator as binop location
16375         information.
16376         (build_unaryop, build_incdec, build_cast): Likewise.
16377         (patch_binop): Extract location information from the node. Fixed
16378         typo in error message.
16379         (patch_unary_op): Extract location information from the node.
16380         (build_array_ref, patch_array_ref): New functions.
16381
16382 1998-07-01  Tom Tromey  <tromey@cygnus.com>
16383
16384         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
16385         match _Jv_IsInstanceOf.
16386         * decl.c (init_decl_processing): Use _Jv_NewArray, not
16387         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
16388
16389 1998-06-30  Tom Tromey  <tromey@cygnus.com>
16390
16391         * decl.c (init_decl_processing): Functions are now named
16392         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
16393
16394 1998-06-29  Per Bothner  <bothner@cygnus.com>
16395
16396         * java-tree.h (load_class):  Add prototype.
16397         * class.c (is_compiled_class):  Add missing arg to load_class.
16398         * expr.c (expand_java_NEW):  Call load_class.
16399         * parse.y (process_import):  Removed bogus use of void return value.
16400
16401 1998-06-25  Per Bothner  <bothner@cygnus.com>
16402
16403         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
16404         Function name is "_Jv_Throw" instead of "soft_athrow".
16405         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
16406         Function name is "_Jv_AllocObject" instead of "soft_new".
16407         Takes an extra parameter (object size).
16408         * expr.c:  Update calls.
16409
16410 1998-06-24  Per Bothner  <bothner@cygnus.com>
16411
16412         * lex.c (java_get_line_col):  Handle end-of-file.
16413         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
16414
16415 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
16416
16417         * lang.c (lang_init): Make -fexceptions the default.
16418         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
16419         exception handling is not turned on.
16420
16421 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
16422
16423         * lang.c (flag_new_exceptions): Make this this default.
16424         * decl.c (end_java_method): Call emit_handlers.
16425         * except.c (method_init_exceptions): Set language code and version.
16426         (expand_start_java_handler): Enable exception, and call
16427         expand_eh_region_start.
16428         (expand_end_java_handler): Enable exception, and set up catch blocks.
16429         (emit_handlers): New routine to generate the saved handlers.
16430         * java-except.h (emit_handlers): Add prototype.
16431
16432 1998-06-12  Per Bothner  <bothner@cygnus.com>
16433
16434         We used to have three different representations of the constant pool:
16435         the CPool structure, the tree_constant_pool, and the constructures
16436         used to build the Class object (which may need class and string
16437         constants) in compiled code.  None were appropriate for compiling
16438         to .class files, so I did a major overhaul.
16439
16440         First, the tree_constant_pool array was removed.  Things were
16441         modified to the CPool structure in the JCF could be used.
16442         Second, a "capacity" field was added to the CPool, and functions
16443         written to search for a matching constant, adding one if not found.
16444         The code that generated the Class object was changed to use a CPool.
16445         The actual TREE_LISTs used to build the CONSTRUCTORs used for
16446         the static Class object are now only in build_constants_constructor.
16447         Finally, I wrote code which can generate a .class file (including its
16448         constant pool) from the RECORD_TYPE of a class.  This is a big step
16449         on the way to compiling Java source into .class files.
16450
16451         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
16452         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
16453
16454         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
16455         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
16456         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
16457         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
16458         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
16459         (lang_type):  Removed constant_pool field.
16460         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
16461         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
16462         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
16463         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
16464
16465         * constants.c (current_constant_pool_tags, current_constant_pool_data,
16466         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
16467         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
16468         (set_constant_entry, find_constant1, find_constant2,
16469         find_class_constant, count_constant_pool_bytes, write_constant_pool,
16470         find_utf8_constant, find_class_or_string_constant):  New functions.
16471
16472         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
16473         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
16474         (give_name_to_class, get_class_constant):  Likewise.
16475         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
16476         (get_name_and_type_constant, get_ref_constant):  Removed.
16477         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
16478         * parse.y:  Don't save/restore tree_constant_pool.
16479         * verify.c (verify_jvm_instructions):  Update for new approach.
16480         * expr.c (expand_invoke, expand_java_field_op): Likewise.
16481
16482         * lang-options.h:  Added -femit-class-file, -femit-class-files.
16483         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
16484         (lang_f_options):  Added "emit-class-file(s)".
16485
16486         * expr.c (build_java_arrayaccess):  Generate more efficient array
16487         bounds checking, by using unsigned compare.
16488
16489         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
16490
16491 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16492
16493         * parse.h: New comment on the handling of unresolved type
16494         identifiers. JDEPs are now part of the jdep_code enum.
16495         (typedef struct jdep): Now use enum jdep_code or int, depending on
16496         availability. Both are narrowed down to an 8 bits bitfield.
16497         (CALL_EXPR_PRIMARY): Fixed comment.
16498
16499 1998-06-10  Tom Tromey  <tromey@cygnus.com>
16500
16501         * Make-lang.in (java): Added gjavac and jvgenmain.
16502         (java.start.encap): Depend on gjavac.
16503         (java.rest.encap): Depend on jvgenmain.
16504
16505         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
16506         (JAVA_CROSS_NAME): Likewise.
16507         (java.all.build): Depend on jvgenmain and gjavac.
16508         (java.all.cross): Depend on jvgenmain and gjavac-cross.
16509         (jvgenmain$(exeext)): New target.
16510         (java.install-common): Wrote.
16511         * config-lang.in (compilers, stagestuff): Added gjavac and
16512         jvgenmain.
16513
16514 1998-06-10  Dave Brolley  <brolley@cygnus.com>
16515
16516         * lang.c (lang_decode_option): New argc/argv interface.
16517
16518 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16519
16520         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
16521         * decl.c (build_decl_no_layout): New function.
16522         * expr.c (java_lang_expand_expr): Layout declarations found in
16523         blocks before they're pushed.
16524         * jcf-parse.c (load_class): Save current line when parsing class
16525         file.
16526         (parse_source_file): Register class before expanding their
16527         methods.
16528         * lang.c (put_decl_node): Produce `null' when `void *' is
16529         processed.
16530         * lex.c (static tree wfl_op): New static global, for error report
16531         on casts.
16532         (java_init_lex): wfl_operator and wfl_op initialized
16533         here. Filename caching added for wfl_op. Return wfl_op when `(' is
16534         parsed.
16535         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
16536         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
16537         build_unresolved_array_type): New static function definitions.
16538         (build_decl_no_layout): New extern function declared.
16539         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
16540         faulty modifier exists.
16541         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
16542         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
16543         (UNARY_PLUS_EXPR): New fake operator.
16544         (struct parser_ctxt): New field osb_number.
16545         * parse.y (static tree wfl_operator): New static WFL for operator
16546         bound error messages.
16547         (DECR_TK, INCR_TK): Moved.
16548         (OP_TK): Tagged <operator>.
16549         (array_type:): Now call build_unresolved_array_type.
16550         (dim_expr:): Count the number of '[' seen.
16551         (post_increment_expression, post_decrement_expression,
16552         pre_increment_expression, pre_decrement_expression,
16553         unary_expression_not_plus_minus, unary_expression:): Actions are
16554         now building the corresponding unary expressions.
16555         (cast_expression:): Actions are now building cast expressions.
16556         (build_unresolved_array_type): New function.
16557         (create_interface): Reset the number of declared interfaces.
16558         (create_class): Likewise.
16559         (method_header): Methods declared within the scope of an interface
16560         are now implicitly set public and abstract.
16561         (java_complete_class): Variable's and parameter's type are patched
16562         with a promoted type.
16563         (declare_local_variables): Resolved non builtin types are promoted
16564         before being used to build a variable decl. Removed type patch
16565         posted on variable initialization statement.
16566         (source_start_java_method): Use build_decl_no_layout to build the
16567         decl of a parameter of incomplete type.
16568         (java_register_parsed_class): Process interfaces too. Call
16569         rest_of_decl_compilation on each processed class declarations.
16570         (java_complete_expand_methods): Don't attempt to expand things in
16571         interfaces.
16572         (java_complete_tree): Process CONVERT_EXPR, even though it always
16573         has a type. Propagate error_mark_node to node's type too. Promote
16574         method's call argument type and return error_mark_node if
16575         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
16576         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
16577         handle unary operator nodes.
16578         (build_assignment): Added comment.
16579         (print_int_node): New function.
16580         (patch_assignment): New second argument. New error handling. Use
16581         print_int_node. Handle references. Use can_cast_to_p to issue
16582         different error message according to the context and check upon
16583         the initialization of the RHS.
16584         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
16585         (operator_string): Handle more operators.
16586         (patch_binop): No longer use a function static
16587         wfl_operator. Improved error message on shift distance.
16588         (build_unaryop, build_incdec, build_cast, patch_unaryop,
16589         patch_cast): New functions.
16590
16591 1998-06-05  Per Bothner  <bothner@cygnus.com>
16592
16593         * jvspec.c:  New file.
16594         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
16595
16596         * java-tree.h (identifier_subst):  Add declaration.
16597
16598 1998-06-04  Tom Tromey  <tromey@cygnus.com>
16599
16600         * jvgenmain.c (main): Generate call to JvRunMain.
16601
16602         * class.c (make_class_data): Push value for "sync_info" field.
16603         * decl.c (init_decl_processing): Push "sync_info" field.
16604
16605 1998-06-03  Per Bothner  <bothner@cygnus.com>
16606
16607         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
16608         Java (source) name, not signature.
16609         Set TYPE_ALIGN to (at least) that of element_type.
16610
16611 1998-06-02  Per Bothner  <bothner@cygnus.com>
16612
16613         * class.c:  Moved classname-mangling-rekated code to ...
16614         * mangle.c:  ... this new file.
16615         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
16616         * Makefile.in:  Update for above changes.
16617
16618 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16619
16620         * expr.c (truthvalue_conversion): Convert integer and floating
16621         point value to their truth value.
16622         * lex.c (java_lex): Handle the `null' literal.
16623         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
16624         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
16625         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
16626         New macros.
16627
16628         * parse.y: Reorganization/documentation on token declaration.
16629         (binop_lookup[]): New added new tree codes.
16630         (relational_expression): Build corresponding binary operators.
16631         (equality_expression, conditional_and_expression,
16632         conditional_or_expression): Likewise.
16633         (java_complete_class): Fix crash in debug message.
16634         (java_complete_tree): Check initialization of method call
16635         arguments. Further bogus node evaluation to detect more error
16636         during assignments. Handles more binary operators.
16637         (patch_assignment): Use DECL_P.
16638         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
16639         code.
16640         (operator_string): Handle more case. Compacted source.
16641         (patch_binop): Changed function comment. Checking for
16642         uninitialized first operand takes the compound assignment into
16643         account and uses DECL_P. Checking for uninitialized second operand
16644         delayed to routine's end. Use macros to issue type bound error
16645         messages and issue messages on both operands if their types are
16646         different. Force fixed type into node. Handle all binary
16647         operators.
16648
16649 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16650
16651         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
16652         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
16653         build operator node and return tokens.
16654         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
16655         * parse.h (java_complete_tree): Changed returned type in prototype.
16656         (build_method_invocation, build_assignment, patch_assignment,
16657         patch_binop): New static function declarations.
16658         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
16659         BUILD_EXPR_WFL): New macros.
16660         * parse.y (enum tree_code binop_lookup[]): New static for token to
16661         TREE_CODE lookup.
16662         (%union): Parser union has new sub-structure `operator'.
16663         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
16664         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
16665         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
16666         ASSIGN_ANY_TK): Tokens tagged `operator'.
16667         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
16668         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
16669         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
16670         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
16671         (assignment_operator:): Rule tagged `operator'.
16672         (expression_statement:): Re-installed default rule.
16673         (method_invocation:): Sub rules call build_method_invocation.
16674         (postfix_expression:): Don't attempt to resolve name here. Just
16675         return an ID.
16676         (multiplicative_expression:): Sub-rules build corresponding binop
16677         expression node.
16678         (additive_expression:, shift_expression:, and_expression:,
16679         exclusive_or_expression:, inclusive_or_expression:): Likewise.
16680         (assignment:): Sub rule invoke build_assignment.
16681         (assignment_operator:): Default rules on sub rules.
16682         (force_error): Added documentation on this variable.
16683         (declare_local_variables): Build initialization calling
16684         build_assignment.
16685         (expand_start_java_method): Removed unused rtx declaration. Mark
16686         arguments as already initialized.
16687         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
16688         (java_complete_expand_methods): Don't process next method if
16689         completion of the previous one triggered errors.
16690         (java_complete_expand_method): Call source_end_java_method if no
16691         error were found during completion.
16692         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
16693         locals declaratilon. Handle names found within a class. Return
16694         error_mark_node when things aren't found.
16695         (patch_method_invocation_stmt): Return error_mark_node on failures.
16696         (patch_invoke): Removed unused local. Return the correct node.
16697         (java_complete_tree): Now returns a value. The BLOCK section binds
16698         local identifiers and the type of a BLOCK is now void. Assign the
16699         result of operand completion on COMPOUND_EXPR. Assign the
16700         encapsulated node of a WFL to the result of its completion, except
16701         when the node is an identifier. Now handle MODIFY_EXPR and several
16702         binary operators. Return error_mark_node on errors.
16703         (build_method_invocation, build_assignment, patch_assignment,
16704         build_binop, operator_string, patch_binop): New functions.
16705         * typeck.c (binary_numeric_promotion): New function.
16706
16707 1998-05-21  Per Bothner  <bothner@cygnus.com>
16708
16709         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
16710         Replace most uses of ident_subst by identifier_subst.
16711
16712         * class.c (push_class_static_dummy_field):  Removed function.
16713         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
16714         instead of looking got "class" static field.  Create that decl here.
16715         (class_identifier_node):  Removed;  no longer needed.
16716         (init_class_processing):  Don't init class_identifier_node.
16717         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
16718         Do nreverse 0 times (instead of twice) for Object and Class.
16719         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
16720
16721 1998-05-20  Per Bothner  <bothner@cygnus.com>
16722
16723         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
16724         while initializing linenumber_count and linenumber_table.
16725         Do it before init_function_start (which calls emit_line_note).
16726         * expr.c (expand_byte_code):  Don't need to clear lineno here.
16727
16728 1998-05-18  Tom Tromey  <tromey@cygnus.com>
16729
16730         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
16731         then mangle number as _N_.
16732
16733         * class.c (mangle_class_field): New function.
16734         (build_class_ref): Set assembler name of class reference using
16735         mangle_class_field.
16736         (push_class_static_dummy_field): Likewise.
16737
16738 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
16739
16740         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
16741         of assigning to TREE_CODE.  The latter method exploits a feature
16742         of GCC that is not ANSI compliant.
16743
16744 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16745
16746         * decl.c (pushdecl_force_head): New function.
16747         (pushlevel): Removed conditional printf.
16748         (complete_start_java_method): Don't enter local variable scope if
16749         function is compiled from source code.
16750         * expr.c: parse.h now included
16751         (java_lang_expand_expr): New function.
16752         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
16753         printf. Terminate buffer when doing directories.
16754         * jcf-parse.c (parse_source_file): Call lang_init_source before
16755         parsing and before code generation.
16756         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
16757         use printf if the macro is defined.
16758         * lang.c (lang_init): Install lang_expand_expr hook on
16759         java_lang_expand_expr.
16760         (java_dummy_print): New function.
16761         (lang_init_source): New function.
16762         * lex.c (java_lex): Remember location of an opening brace at the
16763         second nesting level.
16764         (java_is_eol): Unget character seen after a CR if it is EOF.
16765         * parse.h: Now includes lex.h
16766         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
16767         printf if the macro is defined.
16768         (expand_start_java_method, build_expr_block, enter_block,
16769         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
16770         New static function declarations.
16771         (pushdecl_force_head): New extern function declaration.
16772         (INCOMPLETE_TYPE_P): New macro.
16773         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
16774         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
16775         BLOCK_EXPR_ORIGIN): New macros.
16776         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
16777         DECL_SOURCE_LINE_LAST): New macros.
16778         (struct parser_ctxt): Removed field current_method_decl, redundant
16779         with the field current_function_decl. Added fields
16780         first_ccb_indent1 and pending_block.
16781         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
16782         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
16783         tagged <node>
16784         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
16785         (compilation_unit:): Cosmetic on sub rule.
16786         (type_declaration:): Cosmetic on sub rules. Added an error rule.
16787         (variable_initializer:): Installed default rule on expression:.
16788         (method_declaration:): method_header: starts a new
16789         method. method_body: installs the function body, absorbs blocks
16790         emitted for temporary variable scopings, pops function's body block
16791         and merges function's last statement lineno in DECL_SOURCE_LINE.
16792         (method_body:): Installed default rules.
16793         (block:): Call enter_block when an opening brace is seen.  Absorb
16794         scoping blocks and call exit_block when a closing brace is seen.
16795         (block_statement:): Cosmetic changes.
16796         (method_invocation:): Create WFL around CALL_EXPR node.
16797         (patch_stage): Added comment around definition.
16798         (method_header): Try to use first_ccb_indent1 as the first line of
16799         the method, so BP debug info are emitted at the first opening
16800         brace of the function. If the function has no body, use the
16801         location of the function's name. Override currently defined method
16802         name with the matching WFL so we can point redefinition errors
16803         using the location where the function's name was declared.
16804         (check_abstract_method_header): Interprets DECL_NAME as an
16805         identifier or as a WFL, accordingly.
16806         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
16807         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
16808         location and name information out of it and reinstall DECL_NAME to
16809         its original identifier node value.
16810         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
16811         function's source code).
16812         (read_import_dir): Test the value returned by find_class and issue
16813         a fatal accordingly.
16814         (declare_local_variables): Push a new block for the scope of the
16815         new variable(s) if code has been already generated at that nesting
16816         level. Pinpoint redefinition errors using the variable id
16817         WFLs. Generate initialization code if necessary. If the variable
16818         type is incomplete, register a patch on its decl.
16819         (source_start_java_method): Rewritten. Define a new block for the
16820         function's parameters. Build parameter decl out of function's
16821         arguments and register them for a patch if their types are
16822         incomplete.
16823         (expand_start_java_method): Includes the part of
16824         source_start_java_method that was pushing the parameter decls and
16825         completing the method start code.
16826         (source_end_java_method): Removed call the expand_end_bindings and
16827         poplevel (already taken care of). Reinstall function's arguments
16828         and get function's last line of code before calling
16829         expand_function_end.
16830         (java_method_add_stmt): New comment before the function's
16831         code. Complement the second operand of the current COMPOUND_EXPR
16832         if necessary.
16833         (java_complete_expand_methods): Don't generate debug info on line
16834         zero when expanding a generated constructor.
16835         (java_complete_expand_method): Set start and end line numbers for
16836         a artificially generated constructor to one and manually call
16837         enter_block and exit_block when defining it. For all methods:
16838         expand function's start calling the new expand_start_java_method
16839         and invoke java_complete_tree on the effective method's body, if
16840         any.
16841         (resolve_expression_name): Now use lookup_name_in_blocks to search
16842         local variable decls and print out an error when variables are
16843         undefined.
16844         (patch_method_invocation_stmt): Inserted comment before the
16845         function's code.
16846         (lookup_method_invoke): Chain method's arguments using chainon
16847         with the current arg list as a second argument. Inserted missing
16848         IDENTIFIER_POINTER when reporting an error on methods not found.
16849         (refine_accessible_methods_list): Don't retain constructors.
16850         (patch_arguments): Function removed.
16851         (java_complete_tree): Inserted comment before the function's
16852         code. New case for BLOCKs. Moved the WFL case a bit
16853         further. Complete function's arguments.
16854         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
16855         maybe_absorb_scoping_blocks): New functions.
16856
16857 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16858
16859         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
16860         previously set.
16861         * jcf-parse.c (parse_source_file, java_error_count): New forward
16862         and extern declarations.
16863         (java_parse_abort_on_error): Macro moved.
16864         (jcf_parse_source): fatal called if fopen fails. Now calls
16865         parse_source_file.
16866         (parse_source_file): New parse_only parameter. Reflects the
16867         elimination of the second pass.
16868         (yyparse): parse_source_file called with argument set to 0.
16869         * jcf.h (JCF_ZERO): Sets java_source to zero.
16870         * lex.c (java_init_lex): pass argument is gone. Function modified
16871         to be called once during the analysis of a file.
16872         (java_unget_unicode): Fixed typo in fatal message.
16873         (java_get_line_col): Likewise.
16874         (java_lval): Likewise. String literals no longer built during
16875         second pass.
16876         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
16877         account.
16878         * parse.h (MODIFIER_WFL): New macro.
16879         (parse_check_super, parser_check_super_interface): Now return int.
16880         (parser_chain_incomplete_item, not_builtin_p,
16881         complete_method_decl): Declarations removed.
16882         (build_method_invocation_stmt, build_invoke): Renamed using the
16883         `patch' instead of `build'
16884         (register-incomplete_type, obtain_incomplete_type,
16885         java_complete_tree, java_complete_expand_method,
16886         unresolved_type_p, create_jdep_list): New function declarations.
16887         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
16888         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
16889         (jdep): New typedef on new struct _jdep.
16890         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
16891         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
16892         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16893         JDEP_RESOLVED_P): New macros.
16894         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
16895         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
16896         JDEP_VARIABLE): New enum values and jdep kinds.
16897         (jdeplist): New typedef on struct _jdeplist.
16898         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
16899         macros.
16900         (CALL_EXPR_PRIMARY): New macro.
16901         (struct parser_ctxt): Fields java_pass, current_method_decl,
16902         method_decl_list deleted. New field jdeplist.
16903         (INCOMPLETE_P): Macro deleted.
16904         * parse.y (single_type_import_declaration:): Removed pass switch.
16905         (type_import_on_demand_declaration): Likewise.
16906         (field_declaration:): Removed pass switch on all sub rules.
16907         (class_declaration:): Call the complete_class_decl removed on
16908         class_body rules.
16909         (method_declaration:): Removed second pass switch. No longer chain
16910         methods decl when method_header reduced.
16911         (method_header:): Sub rules no longer depend on pass switch.
16912         (method_declarator:): Likewise.
16913         (method_body:): Likewise.
16914         (abstract_method_declaration:): Likewise.
16915         (block_statement:): Likewise.
16916         (local_variable_declaration:): Likewise.
16917         (argument_list:): Likewise.
16918         (method_invocation:): Likewise. Call to build_method_invocation_stmt
16919         removed. Partial CLASS_EXPR tree node built instead.
16920         (postfix_expression:): Removed pass switch on all sub rules.
16921         (java_pop_parser_context): Free classd_list content.
16922         (yyerror): Call obstrack_grow0 to finalize error message.
16923         (check_class_interface_creation): Comment modified to reflect new
16924         returned value meaning. Removed second pass switch. Return 1 if an
16925         error was found, 0 otherwise. Adjust pointer on filename if a
16926         leading path separator was found.
16927         (maybe_create_class_interface_decl): Removed first pass switch
16928         when linking the class decl to the class_list. Install a new
16929         jdep_list for the class.
16930         (add_superinterfaces): List of unresolved interfaces is
16931         gone. Unresolved interfaces are directly added to the current
16932         dependencies list.
16933         (create_interface): Second pass shortcut removed.
16934         ctpx->modifier_ctx access through MODIFIER_WFL.
16935         (create_class): Second pass shortcut removed. Call to
16936         register_incomplete_type replaces the call to
16937         parser_chain_incomplete_item.
16938         (complete_class_decl): Function removed.
16939         (duplicate_declaration_error): New way of retrieving redeclared
16940         item type.
16941         (register_fields): Call to lookup_modifier_cl replaced by
16942         MODIFIER_WFL. New way of handling unresolved type, using
16943         unresolved_type_p and obtain_incomplete_type.
16944         register_incomplete_type replaces call to parser_chain_incomplete_item.
16945         (patch_stage): New static global variable.
16946         (method_header): New way of handling unresolved type, using
16947         unresolved_type_p and obtain_incomplete_type. patch_stage used to
16948         indicates that the method decl needs to be patched.
16949         (check_abstract_method_header): Call to lookup_modifier_cl
16950         replaced by MODIFIER_WFL.
16951         (method_declarator): Incomplete argument type are registered
16952         calling register_incomplete_type. Patch on the declared method is
16953         issued in that case.
16954         (unresolved_type_p): New function.
16955         (parser_check_super_interface): New comment to reflect function's
16956         modified returned type (int). Function and has a new argument
16957         this_wfl. Call to parse_error_context uses this_wfl instead of
16958         relying on lookup_cl.
16959         (parser_check_super): Comment reflects function's new returned
16960         type (int). Function returns nonzero value on error.
16961         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
16962         register_incomplete_type, jdep_resolve_class): New functions to
16963         handle incomplete types in declarations.
16964         (java_complete_class): Rewritten to work with the new incomplete
16965         type handling scheme.
16966         (complete_class_report_errors): Likewise.
16967         (complete_method_decl): Removed: it jobs is now handled by
16968         java_complete_class.
16969         (do_resolve_class): Class loaded in not already loaded and not
16970         found in Java source code.
16971         (java_check_regular_methods, java_check_abstract_methods): Don't
16972         call complete_method_decl anymore.
16973         (lookup_modifier_cl, not_builtin_p): Functions deleted.
16974         (read_import_dir): Got rid of the pass number dependency.
16975         (declare_local_variables): New handling of unresolved types (patch
16976         issued).
16977         (source_start_java_method): New parameter level. Function called
16978         with level set to 1 when argument types are potentially
16979         unresolved.  Called to complete the job with level set to 2 once
16980         types are complete.
16981         (source_end_java_method): Call to permanent_allocation
16982         removed. Waiting to be replaced by a more suitable obstack
16983         management.
16984         (java_complete_expand_methods, java_complete_expand_method,
16985         java_expand_finals): New functions.
16986         (build_method_invocation_stmt): Renamed
16987         patch_method_invocation_stmt. Extracts function call expression
16988         (wfl) and arguments (args) from CALL_EXPR tree operands.
16989         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
16990         call. Patch the function and argument operand of the CALL_EXPR
16991         tree argument.
16992         (patch_argument, java_complete_tree): New functions.
16993
16994 1998-04-20  Per Bothner  <bothner@cygnus.com>
16995
16996         Recover from missing fields and methods (i.e. error instead of fatal).
16997         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
16998         * expr.c (expand_invoke):  Recover from missing method.
16999         (expand_java_field_op):  Recover from missing field.
17000         Inline references to java.lang.{Integer,Char,...}.TYPE.
17001         * typeck.c (get_type_from_signature), java-tree.h:  New function.
17002         * class.c (add_method):  Use get_type_from_signature.
17003         (build_class_ref):  Handle a class that was not found.
17004         * typeck.c (convert):  Handle conversion to pointers (for convenience).
17005         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
17006         instead of lookup_field to handle missing fields.
17007
17008         * jcf-parse.c (process_zip_dir):  Set java_source.
17009
17010 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
17011
17012         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
17013
17014 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17015
17016         * jcf-parse.c (load_class): Don't change input_filename before
17017         calling jcf_parse_source (but still do it before calling
17018         jcf_parse).
17019         (jcf_parse_source): Assign input_filename after having saved the
17020         parser context.
17021         * lex.c (java_init_lex): Chain a WFL node to the import on demand
17022         list. ctxp->modifier_ctx zeroed according to its new
17023         definition. ctxp->filename initialized. Removed
17024         JAVA_MODIFIER_CTX_UNMARK.
17025         (java_unget_unicode): Update the character based column position.
17026         (java_allocate_new_line): ref_count not used anymore. Always free
17027         ctxp->p_line. Initialize c_line->char_col to 0.
17028         (java_get_unicode): Update the character based column position.
17029         (java_lex): Use ctxp->elc to store current position in source
17030         file, at the beginning of the parsed token. Set modifier_ctx entry
17031         corresponding to the parse modifier to a WFL node. Return a WFL
17032         node when an identifier is parsed.
17033         (java_lex_error): Now uses ctxp->elc to store current position in
17034         source.
17035         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
17036         * lex.h (build_wfl_node): New function definitions.
17037         (struct java_line): ref_count and next fields are gone. New field
17038         char_col.
17039         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17040         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
17041         (JAVA_COLUMN_DELTA): New macro.
17042         (java_lc): New typedef on new struct _java_lc.
17043         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
17044         (parse_error_context, parse_warning_context): Changed prototypes.
17045         (java_get_line_col): Added as an available global function.
17046         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
17047         (IC_DECL): Replaced by macro IC_TYPE
17048         (DEPEND_WFL): New macro.
17049         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
17050         wrong modifier.
17051         (exit_java_complete_class): Removed a commented out statement.
17052         (struct parser_ctxt): Added comments on fields. modifier_ctx is
17053         now an array of tree nodes. Deleted fields line_list and
17054         e_line. New field elc, to replace e_line.
17055         * parse.y (array_type:): Build WFL node.
17056         (qualified_name:): Build a single WFL node out of two. Retain
17057         the location information of the first node in the resulting node.
17058         (package_declaration:): Use package name as a WFL node
17059         (single_type_import_declaration:): Use imported name as a WFL node.
17060         (type_import_on_demand_declaration:): Use root of the imported
17061         packages as a WFL node.
17062         (field_declaration:): Removed unused local variable cl.
17063         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
17064         (yyerror): New static elc. Removed static error_line, error_pos.
17065         New local code_from_source. Save ctxp->elc into elc at the first
17066         pass. Call java_get_line_col to get a string of the line where
17067         the error occurred.
17068         (debug_line): Removed static function.
17069         (parse_error_context, parse_warning_context): Parameter cl is now
17070         a WFL node. Use its value to initialize ctxp->elc.
17071         (redefinition_error): Parameter cl is now a WFL node.
17072         (parse_add_interface): New parameter wfl. No longer call
17073         lookup_cl, use wfl instead.
17074         (check_class_interface_creation): Parameter cl is now a WFL node.
17075         (maybe_create_class_interface_decl): Likewise.
17076         (add_superinterfaces): New function.
17077         (create_interface): Removed local cl, node, super_decl,
17078         super_decl_type.  Function now uses id as a WFL node. Better
17079         warning/error report on obsolete or forbidden mix of
17080         modifiers. Now calls add_superinterfaces to register interfaces.
17081         (create_class): Removed local cl, node. Local variable id is used
17082         as a WFL node. Better error report on forbidden modifier
17083         mix. Uses add_superinterfaces to register interfaces.
17084         (find_field): Argument cl is now a WFL node. Now store the WFL
17085         node of a fields that needs to be checked for their
17086         initialization.
17087         (method_header): Local variable node non longer used. Local
17088         variable id replaces cl.
17089         (check_modifiers_consistency): Local variable cl is now a WFL
17090         node.
17091         (method_declarator): Local variable cl replaced by parameter id.
17092         (parser_qualified_name): Now uses parameter name as a WFL node.
17093         (parser_check_super_interface): New parameter wfl, for achieve
17094         greater accuracy during error reports.
17095         (parser_chain_incomplete_item): New parameter named location. Used,
17096         along the decl, to construct the incomplete item node.
17097         (java_complete_class): resolve_class now uses WFL node extracted
17098         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
17099         where appropriate.
17100         (complete_method_decl): Unresolved function's argument types are WFL.
17101         (resolve_class): Parameter cl is now a WFL node.
17102         (resolve_and_layout): Likewise.
17103         (do_resolve_class): Likewise. Try first to use cl and then do the
17104         lookup on the decl when calling check_pkg_class_access.
17105         (complete_class_report_errors): Use IC_TYPE in place of
17106         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
17107         instead of doing a lookup over the decl.
17108         (java_check_final): Use WFL info from field tree list.
17109         (lookup_cl): Rewritten and returns a statically defined WFL node.
17110         (lookup_modifier_cl): Now uses information from WFL nodes.
17111         (process_imports): Likewise.
17112         (read_import_dir): name and cl arguments replaced by a single WFL
17113         node. Function modified accordingly.
17114         (find_in_imports_on_demand): Now uses WFL node.
17115         (check_pkg_class_access): cl argument is now a WFL node.
17116         (declare_local_variables): Fixed to use WFL nodes.
17117         (resolve_expression_name): Likewise.
17118         (build_method_invocation_stmt): name_combo argument renamed
17119         wfl. Function modified to use WFL nodes.
17120         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
17121         (lookup_method_invoke): cl is now a WFL node. Added missing
17122         IDENTIFIER_POINTER to class type decl name.
17123
17124 1998-04-14  Dave Brolley  <brolley@cygnus.com>
17125
17126         * lang.c (init_parse): Now returns char* containing the filename.
17127
17128 1998-04-10  Per Bothner  <bothner@cygnus.com>
17129
17130         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
17131
17132         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
17133         * class.c (make_class_data):  If flag_assume_compiled, initial class
17134         state is CSTATE_PREPARED; make superclass and interfaces direct
17135         references, rather than constant pool indexes.
17136
17137 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17138
17139         * parser.y: Include flags.h. Removed debug variable pl.
17140         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
17141         (block:): Likewise.
17142         (labeled_statement_nsi:): Generate debug info when reducing
17143         expression_statement:.
17144         (check_pkg_class_access): get_access_flags_from_decl invocation
17145         fixed for new CLASS_* flags location.
17146         (source_end_java_method): Save/restore parser context when
17147         entering/leaving this routine. Restore lineno to its right value
17148         before calling expand_end_bindings.
17149         (build_method_invocation_stmt): build_invoke called with the
17150         current line information.
17151         (build_invoke): New argument cl. Wrap the function call around a
17152         wfl node.
17153         (refine_accessible_methods_list): Changed comment, removed
17154         unnecessary code.
17155         * parse.h: Fixed typo in comments.
17156         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
17157         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
17158         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
17159         parser_ccb_indent.
17160         * lex.c (java_lex): Record the last closing curly bracket of a
17161         function.
17162         * jcf-parse.c (jcf_parse_source): Now calls
17163         java_check_methods. Clarified comment, fixed typo.
17164
17165 1998-04-09  Dave Brolley  <brolley@cygnus.com>
17166
17167         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
17168         (finish_parse): Expose for non USE_CPPLIB builds.
17169
17170 1998-04-08  Jeffrey A Law  (law@cygnus.com)
17171
17172         * lang.c (lang_print_xnode): New function.
17173
17174 1998-04-03  Per Bothner  <bothner@cygnus.com>
17175
17176         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
17177         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
17178         used to build a class's dispatch table.
17179         (make_class_data):  Generate dispatch table if flag_assume_compiled.
17180         Set dtable of class object to address of class_dtable_decl.
17181
17182         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
17183         be volatile and have side effects - generates better code.
17184
17185         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
17186         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
17187
17188         * expr.c (expand_invoke):  If class is final, method is
17189         effectively final, so can call it directly.
17190
17191         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
17192
17193         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
17194
17195 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17196
17197         * parse.y (build_method_invocation_stmt): Removed extra argument
17198         to build_invoke.
17199
17200 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17201
17202         * expr.c (dtable_indent): Now static global.
17203         (expand_invoke): Now call invoke_build_dtable and
17204         build_invokevirtual.
17205         (invoke_build_dtable, build_invokevirtual): New functions.
17206         * jcf-io.c (find_class): Defer issuing a warning by setting
17207         jcf->outofsynch to 1.
17208         * jcf-parse.c (jcf_out_of_synch): New function.
17209         (load_class): Test this_jcf.outofsynch flag and call
17210         jcf_out_of_synch accordingly.
17211         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
17212         comment indentation.
17213         * lex.c (java_get_unicode): Fixed code indentation.
17214         (java_lex): Create string literal. Fixed typo. Removed several
17215         premature obstack_free.
17216         * parse.h: New enums for name resolution and invocation mode.
17217         (struct qualification): New data structure.
17218         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
17219         (do_resolve_class, build_method_invocation_stmt,
17220         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
17221         debug_line, identical_subpath_p, invocation_mode,
17222         refine_accessible_methods_list, build_invoke,
17223         lookup_method_invoke): New functions declared.
17224         (build_invokevirtual, invoke_build_dtable, match_java_method,
17225         build_field_ref, jcf_out_of_synch): New references to external
17226         functions.
17227         (struct parse_ctxt): Removed artificial_constructor field.
17228         * parse.y: (array_type:): Type defined for this rule.
17229         (class_type:): Installed default rule for interface_type:.
17230         (array_type:): Now build Java array type.
17231         (qualified_name:): Now use obstack_grow0.
17232         (method_declaration:): Skip the artificial constructor added to
17233         the list, if any.
17234         (abstract_method_declaration:): Execute the code only during pass 1.
17235         (block:): Installed default rule in block_statements:.
17236         (block_statement:): Add the statement to the method during pass 2.
17237         (statement_expression): Installed default rule for
17238         method_invocation:.
17239         (argument_list:): Added code to build the argument list.
17240         (method_invocation:): Added call to create the method invocation
17241         node.
17242         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
17243         (debug_line): New function for debug.
17244         (complete_class_decl): No longer do something during pass 1.
17245         (method_header): Use BUILD_PTR_FROM_NAME.
17246         (parser_qualified_classname): Use obstack_grow0. Removed bogus
17247         obstack_free.
17248         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
17249         function's main comment.
17250         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
17251         classes.
17252         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
17253         (resolve_class): Now works with arrays.
17254         (do_resolve_class, resolve_and_layout): New functions.
17255         (java_check_regular_methods): Reverse method list before and after
17256         having processed it. No longer set ctxp->artificial_constructor.
17257         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
17258         accordingly. Fixed typo in issued error message. Now use
17259         obstack_grow0.
17260         (find_in_imports_on_demand): Now use obstack_grow0.
17261         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
17262         (source_end_java_method): Call expand_expr_stmt instead of
17263         expand_expr. Calls it before calling expand_function_end.
17264         (java_method_add_stmt): Do nothing if errors were found during
17265         parsing.
17266         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
17267         (build_method_invocation_stmt, build_invoke, invocation_mode,
17268         lookup_method_invoke, refine_accessible_methods_list,
17269         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
17270         New functions.
17271         * typeck.c (build_java_signature): Properly end method signature
17272         if return type skipped.
17273         (match_java_method): New function.
17274
17275 1998-03-16  Per Bothner  <bothner@cygnus.com>
17276
17277         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
17278
17279 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17280
17281         * expr.c (build_invoke_non_interface): New function.
17282         (methods_ident, ncode_ident): Now static globals.
17283         (expand_invoke): Use build_invoke_non_interface.
17284         * java-tree.h (struct lang_decl): New field function_decl_body.
17285         (DECL_FUNCTION_BODY): New macro.
17286         * jcf-parse.c (jcf_parse_source): Deeper check before setting
17287         CLASS_FROM_SOURCE_P.
17288         (parse_source_file): Fixed typos. Call java_layout_parsed_class
17289         before starting pass 2. Call to java_generate_parsed_class replaced
17290         by java_register_parsed_class.
17291         * lex.c: Fixed typo in header. Some line width related formating.
17292         * lex.h: Some line width related formating.
17293         * parse.h (source_end_java_method, resolve_expression_name,
17294         complete_class_decl, maybe_create_class_interface_decl,
17295         check_class_interface_creation): New static function declarations.
17296         (java_layout_parsed_class, java_method_add_stmt): New function
17297         declarations.
17298         (struct parser_ctxt): Field mark_class_generate removed. New
17299         fields class_list and artificial_constructor.
17300         * parse.y: Fixed typo in header.
17301         (class_declaration:): Call complete_class_decl when class body
17302         parsed.
17303         (method_declaration:): Call source_end_java_method in pass 2 when
17304         the method body is defined.
17305         (postfix_expression:): Do expression name resolution on sub-rule
17306         name during pass 2.
17307         (create_class, create_interface): Merged common pieces.
17308         (check_class_interface_creation, maybe_create_class_interface_decl):
17309         New functions.
17310         (complete_class_decl): New function.
17311         (register_fields): Fixed line width related typo.
17312         (method_header): Correctly skip first argument when fixing
17313         argument line. Changed the loop.
17314         (java_check_circular_reference): Now use ctxp->class_list.
17315         (java_complete_class): Removed start/stop marking.
17316         (java_check_regular_methods): Now takes a class decl as an
17317         argument.  Add default constructor if none were encountered.
17318         (java_check_methods): Now use ctxp->class_list. Changed call to
17319         java_check_regular_methods.
17320         (source_start_java_method): Set DECL_ARG_TYPE for each function
17321         arguments.
17322         (source_end_java_method, java_method_add_stmt): New functions.
17323         (java_generate_parsed_class): No longer exists.
17324         (java_layout_parsed_class, java_register_parsed_class): New functions.
17325         (resolve_expression_name): New function.
17326
17327 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17328
17329         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
17330         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
17331         until pass initializations are done. Call read_import_dir with
17332         pass set to 0.
17333         * parse.h: (lookup_modifier_cl): New function declared.
17334         (INTERFACE_FIELD_MODIFIERS): New macro.
17335         (OBSOLETE_MODIFIER_WARNING): New macro.
17336         * parse.y: (register_fields): Class type and current field name in
17337         local variables. Check modifier(s) if adding field(s) to an interface.
17338         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
17339         and report errors using the faulty modifier line context.
17340         (lookup_modifier_cl): New function.
17341         (read_import_dir): Detect and report default import processing
17342         failure.
17343
17344 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
17345
17346         Add a pair of -fassume-compiled/-fno-assume-compiled options.
17347         * class.c (is_compiled_class): Return 1 after making sure it
17348         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
17349         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
17350         * java-tree.h (flag_assume_compiled): Add decl.
17351         * lang.c (lang_f_options): Add the flag.
17352         (flag_assume_compiled): Add decl, default to 0.
17353
17354 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17355
17356         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
17357         (is_compiled_class): Likewise.
17358         (layout_class): Likewise.
17359         (layout_class): Detect and lay out classes defined in source code.
17360         (interface_of_p, add_interface_do, may_add_interface): New
17361         function.
17362         (add_interface): Now use add_interface_do.
17363         (add_method_1): New function.
17364         (add_method): Now use add_method_1.
17365         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
17366         (complete_start_java_method): New function.
17367         (start_java_mehod): Now call complete_start_java_method.
17368         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
17369         (expand_invoke): Likewise and fixed typo.
17370         *gjava.c: (print_super_field): Use new argument to find_class
17371         DO_CLASS_FILE.
17372         (main): Likewise.
17373         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
17374         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
17375         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
17376         IDENTIFIER_NODE.
17377         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
17378         (add_method_1, push_class): New prototypes.
17379         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
17380         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
17381         directory where the class was found.
17382         (find_class): New argument DO_CLASS_FILE. Function find_class
17383         modified accordingly.
17384         *jcf-parse.c: (fix_class_path): New function.
17385         (load_class): Use new VERBOSE argument. load_class now finds and
17386         loads/parses .class/.java files. Save read_state of current_jcf
17387         if necessary.
17388         (java_parser_abort_on_error): New macro.
17389         (jcf_parse_source, parse_source_file): New function.
17390         (jcf_parse): Fixed typo.
17391         (yyparse): Call parse_source_file () only.
17392         (process_zip_dir): Fixed typo, fix zdir->filename_length when
17393         writing the real class name back in the zip directory entry.
17394         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
17395         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
17396         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
17397         (find_class): Prototype fixed.
17398         *lex.c: Added 1998 time stamp.
17399         Removed all static global variables, moved into the parser
17400         context data structure.. Now include unistd.h if SEEK_SET not
17401         defined.
17402         (java_init_lex): Rewritten.
17403         (java_sneak_unicode): Modified current unicode access in current line.
17404         (java_unget_unicode): Likewise.
17405         (java_allocate_new_line): New allocation management.
17406         (java_read_char): Modified access and storage of unget_utf8_value.
17407         New way of processing current unicode.
17408         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
17409         (java_get_unicode): Now use the parser context.
17410         (java_lineterminator): Likewise.
17411         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
17412         of the reentrant parser implementation. Function now use the
17413         parser context data structure and java_lval. Fixed production of
17414         the float and double constant "out of range" error message. Fixed
17415         obstack use. Return integer value when hitting a modifier. Now
17416         return type for TRUE, FALSE and other predefined types. Return
17417         identifier as a TREE_LIST list containing the current line context
17418         as the TREE_VALUE sub-node.
17419         (java_unicode_2_utf8): Fixed typo in declaration.
17420         (java_lex_error): Now use the parser context data structure.
17421         *lex.h: Added 1998 time stamp.
17422         (struct java_line): New fields ref_count and next.
17423         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17424         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
17425         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
17426         *parse.h: Added 1998 time stamp.
17427         (java_parse_source_file): Renamed from parse_source_file.
17428         (YYERROR_NOW, YYNOT_TWICE): Fixed.
17429         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
17430         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
17431         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
17432         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
17433         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
17434         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
17435         (struct parser_ctxt): New data structure to keep the parser context.
17436         *parse.y: Added 1998 time stamp, got rid of static global variables.
17437         (java_error_count, ctxp): New global variables.
17438         (%union): New value field.
17439         (numeric_type, integral_type): Rules removed.
17440         (primitive_type): Rule defined to handle integral, float, double and
17441         boolean types.
17442         (qualified_name, package_declaration,
17443         single_type_import_declaration, type_import_on_demand_declaration,
17444         modifiers, class_declaration, super, interfaces,
17445         interface_type_list, class_body, field_declaration,
17446         field_declaration, variable_declarators, variable_declarator,
17447         variable_declarator_id, method_declaration, method_header,
17448         formal_parameter_list, formal_parameter, method_body, block,
17449         static, interface_declaration, extends_interfaces,
17450         abstract_method_declaration, local_variable_declarators): Rules now
17451         define actions.
17452         (force_error, do_warning): New global statics.
17453         (push_parser_context, parser_context_save_global,
17454         parser_context_restore_global, pop_parser_context): New functions.
17455         (yyerror): Now uses the global parser context. Fixed use of obstack.
17456         (parse_error, parse_error_context, parse_warning_context,
17457         java_accstring_lookup, redefinition_error, check_modifiers,
17458         parser_add_interface, create_interface, create_class, find_field,
17459         duplicate_declaration_error, register_fields, method_header,
17460         check_modifiers_consistency, check_abstract_method_header,
17461         method_declarator, parser_qualified_classname,
17462         parser_check_super_interface, parser_check_super,
17463         parser_chain_incomplete_item, java_check_circular_reference,
17464         layout_class_from_source, java_complete_class,
17465         complete_method_decl, resolve_class, complete_class_report_errors,
17466         java_check_final, check_method_redefinition,
17467         java_check_regular_methods, java_check_abstract_methods,
17468         java_check_methods, lookup_java_interface_method2,
17469         lookup_java_method2, lookup_cl, find_name_in_single_imports,
17470         process_imports, find_in_imports, read_import_entry,
17471         read_import_dir, find_in_imports_on_demand,
17472         check_pkg_class_access, not_builtin_p, declare_local_variables,
17473         source_start_java_method, java_generate_parsed_class): New
17474         functions.
17475         *typeck.c: (signature_include_return): New global variable.
17476         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
17477         to add the function returned type in the signature.
17478
17479 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
17480
17481         * jcf-io.c (open_in_zip): Use strncmp and LEN.
17482
17483 1998-01-29  Dave Brolley  <brolley@cygnus.com>
17484
17485         * Make-lang.in (java.info): Added.
17486         (java.install-info): Added
17487
17488 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
17489
17490         * Makefile.in (clean): Also remove java/parse.c.
17491
17492 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
17493
17494         Add a pair of -fbounds-check/-fno-bounds-check options.
17495         * lang.c (lang_decode_option): Add code to grok arguments.
17496         (flag_bounds_check): Add decl.
17497         (lang_f_options): New array w/ the option in it.
17498         * java-tree.h (flag_bounds_check): Add decl.
17499         * lang-options.h: New file.
17500         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
17501         of a static macro value.
17502         (JAVA_ARRAY_EXCEPTION): Delete macro.
17503
17504 1998-01-23  Per Bothner  <bothner@cygnus.com>
17505
17506         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
17507         * expr.c (build_anewarray):  Add missing promote_type.
17508
17509 1998-01-22  Per Bothner  <bothner@cygnus.com>
17510
17511         Add array types with known length to optimize bounds checking.
17512         * typeck.c (build_java_array_type):  Take length parameter.
17513         (java_array_type_length, build_prim_array_type):  New functions.
17514         * java-tree.h:  Update for new functions.
17515         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
17516         * class.c:  Use build_prim_array_type.
17517         * expr.c (can_widen_reference_to):  Handle known-length array types.
17518         (verify_jvm_instructions):  Keep track of integer push instructions
17519         followed by newarray/anewarray, so we can build known-length arrays.
17520         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
17521         (java_array_data_offset):  New function.
17522         (build_java_array_length_access):  New function.  Optimize if constant.
17523         (build_java_arrayaccess):  Constant fold bounds check.
17524         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
17525         (build_newarray, build_anewarray):  New functions.
17526         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
17527         * verify.c (merge_types):  Handle known-lengh array types.
17528
17529 1998-01-19  Per Bothner  <bothner@cygnus.com>
17530
17531         * expr.c (expand_byte_code):  Fix performace bug, which caused
17532         searching linenumber_table to be linear rather than constant.
17533
17534 1997-12-12  Per Bothner  <bothner@cygnus.com>
17535
17536         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
17537
17538         * decl.c, java-tree.h (soft_fmod_node):  New global.
17539         * decl.c (init_decl_processing):  Define __builtin_fmod.
17540         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
17541         using __builtin_fmod.
17542
17543 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17544
17545         * keyword.h: New file, output of keyword.gperf as processed by
17546         gperf.
17547         * lex.c (java_lex_init): Initialize java_error_flag.
17548         * parse.c (YYERROR_NOW): Uses java_error_flag.
17549         * parse.y: New static java_error_flag. Useless definition of
17550         buffer_error gone.
17551         * parse.y (java_error): Portable error recovery using
17552         java_error_flag (not yet completely tuned).
17553
17554 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
17555
17556         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
17557
17558 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17559
17560         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
17561         (parse.c, lex.c, keyword.h): New rules for Java source code
17562         front-end.
17563         * parse.c: Renamed into jcf-parse.c.
17564         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
17565         * keyword.gperf: New file, Java keywords.
17566         * parse.y: New file, Java language grammar.
17567         * parse.h: New file, Java language grammar definitions.
17568         * lex.c: New file, Java language lexer.
17569         * lex.h: New file, Java language lexer definitions.
17570
17571 1997-12-03  Per Bothner  <bothner@cygnus.com>
17572
17573         * decl.c (clinit_identifier_node), java-tree.h:  New global.
17574         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
17575         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
17576         * expr.c (expand_java_field_op):  Check for invalid assignment
17577         to final field.
17578
17579         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
17580
17581 1997-10-27  Per Bothner  <bothner@cygnus.com>
17582
17583         * verify.c (verify_jvm_instructions):  When processing a handler,
17584         attempt to set the current_subr to the right value.
17585         (More complicated code combines Sep 17 and Oct 22 versions.)
17586
17587 1997-10-24  Per Bothner  <bothner@cygnus.com>
17588
17589         * class.c (push_class):  Figure out (guess) name of source file.
17590         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
17591         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
17592         (parse_class_file):  Change return type from int to void.
17593         Call debug_start_source_file/debug_end_source_file.
17594
17595         * expr.c (build_java_binop):  Fix masking 2nd operand.
17596         * decl.c (init_decl_processing):  Set sizetype first.
17597
17598 1997-10-22  Per Bothner  <bothner@cygnus.com>
17599
17600         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
17601         (Revert Sep 17 change.)
17602
17603 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17604
17605         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
17606         .class extension in their name and fix thing so we don't process
17607         them parse_zip_file_entries().
17608         (parse_zip_file_entries): Cleaned unused local variables.
17609
17610 1997-10-20  Per Bothner  <bothner@cygnus.com>
17611
17612         * expr.c (can_widen_reference_to):  Allows equal array element types.
17613         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
17614         * jcf-dump.c (RET):  Get (and print) index.
17615
17616         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
17617         Promote element type to POINTER_TYPE.
17618
17619 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17620
17621         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
17622         find_in_current_zip, jcf_figure_file_type): Moved from
17623         jcf-reader.c to parse.c.
17624         * zextract.c: (read_zip_archive): takes file_comment_length possible
17625         field into account.
17626
17627 1997-10-20  Per Bothner  <bothner@cygnus.com>
17628
17629         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
17630
17631         * verify.c (merge_types):  Handle array types even better ...
17632
17633 1997-10-17  Per Bothner  <bothner@cygnus.com>
17634
17635         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
17636
17637         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
17638         * class.c (make_class_data):  Don't build fields_decl if no fields.
17639         When building fields_decl, skip if DECL_ARTIFICIAL.
17640
17641         * expr.c (java_stack_swap):  Update stack_type_map.
17642         * verify.c (merge_types):  Handle array types better.
17643
17644 1997-10-15  Per Bothner  <bothner@cygnus.com>
17645
17646         * class.c (add_field):  Don't promote short integral fields to
17647         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
17648         * expr.c (push_value):  Promote and convert short integral values.
17649
17650         * decl.c, java-tree.h (integer_two_node):  New constant node.
17651         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
17652
17653 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17654
17655         * class.c (append_gpp_mangled_type): Use function argument
17656         unpromoted type to generate mangled name.
17657
17658 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17659
17660         * constants.c (build_constant_data_ref): Now uses current_class
17661         instead of main_class.
17662         (build_constants_constructor): Now uses current_class instead of
17663         main_class.
17664         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
17665         of the global variable SeepZipFiles done here.
17666         * zextract.c (read_zip_archive): extra_field optional field taken
17667         into account while computing the position of the class file in the
17668         archive.
17669         * verify.c (verify_jvm_instructions): Use current_jcf to search
17670         the constant pool.
17671         * parse.c (load_class): First search for the class to load in the
17672         current zip file. Saves current_jcf (restored before returning
17673         from that function). Don't call JCF_FINISH in the class was found
17674         in the current ZIP file.
17675         (jcf_parse): If the class was found in the current ZIP file, save
17676         its tree_constant_pool (for later reuse).
17677         (parse_class_file): New function. Process each method defined in
17678         the current class and record the class as to be later registered.
17679         (yyparse): Rewritten. Figure the type of the current file and switch
17680         accordingly.
17681         * lang.c: New global variable current_jcf.
17682         (lang_init): Removed compiling_from_source test (done later, in
17683         yyparse). Removed call the jcf_parse ().
17684         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
17685         (typedef struct JCF): New fields seen_in_zip (to mark a class found
17686         in the current ZIP file) and zip_offset (offset to the class data in
17687         the current zip file).
17688         * jcf-reader.c: zipfile.h included.
17689         localToFile: New ZipFileCache static global variable
17690         (parse_zip_file_entries): New function. Browse the current ZIP
17691         file directory and process each class found.
17692         (process_zip_dir): New function. Register each class found in the
17693         ZIP file directory. The class aren't parsed but a valid JCF is
17694         link to each of them.
17695         (find_in_current_zip): New function. Search for a class in the
17696         current ZIP file directory. If found, prepare the class so that it
17697         can be loaded.
17698         (jcf_figure_file_type): New function. Examine the file structure
17699         to figure a class file, a ZIP file. If none of these categories are
17700         matched, a source file is assumed.
17701         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
17702         SeenZipFile: New global variable.
17703         (open_in_zip): Use zipmember's length to accelerate the search for
17704         a member. If zipmember was NULL and zip file successfully read,
17705         return 0.
17706         * java-tree.h: New global variable current_jcf declared.  Added
17707         declaration for current_constant_pool_tags, current_constant_pool_data,
17708         current_constant_pool_length, current_constant_pool_data_ref.
17709         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
17710         store the JCF of classes seen in a zip file) and tree *constant_pool
17711         (to save a loaded class constant pool). current_class declared here.
17712         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
17713         retrieve method_ref_constant.
17714         (PUSHC): java_push_constant_from_pool now uses current_jcf.
17715         (OBJECT): get_class_constant now uses current_jcf.
17716         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
17717         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
17718         (expand_invoke): Now uses current_class instead of main_class
17719         (build_class_init): Now uses current_class instead of main_class
17720         * class.c: New static global variable registered_class.
17721         (register_class): New function.
17722         (emit_register_class): Modified to use registered_class instead of
17723         main_class
17724         (is_compiled_class): Now take into account class seen in the archive.
17725
17726 1997-10-06  Per Bothner  <bothner@cygnus.com>
17727
17728         * except.h:  Renamed to: java-except.h.
17729         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
17730         * except.c:  Add semi-working (commented out) implementation.
17731
17732         * expr.c (expand_iinc):  Add needed flush_quick_stack.
17733         * parse.c (set_source_filename):  New function.
17734         (give_name_to_class):  Set input_filename from package.classname.java.
17735
17736         * jcf-io.c (find_class):  Don't look first in ".".
17737
17738 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17739
17740         * zextract.c (read_zip_archive): Now takes into account the
17741         extra_field field.
17742         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
17743
17744 1997-09-20  Per Bothner  <bothner@cygnus.com>
17745
17746         * constants.c, java-tree.h (build_internal_class_name):  New function.
17747         (alloc_class_constant):  Re-implement using build_internal_class_name.
17748         * class.c (make_class_data):  Likewise.
17749         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
17750
17751 1997-09-17  Per Bothner  <bothner@cygnus.com>
17752
17753         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
17754         to NULL before pushing an exception handler target.
17755
17756         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
17757         (java_stack_swap, java_stack_dup):  Re-write to be safe from
17758         clobbering registers.
17759         (build_class_init):  New function.
17760
17761 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17762
17763         * typeck.c (build_java_array_type): Temporary use
17764         permanent_obstack to create the array 'length' field.
17765         * expr.c (lookup_label): Temporay use permanent_obstack to create
17766         label if not found.
17767         * class.c (push_super_field): Tempory use permanent_obstack.
17768
17769 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17770
17771         * typeck.c (type_for_mode): Now handles double_type_node and
17772         float_type_node.
17773         * verify.c (verify_jvm_instructions): The instruction following
17774         the wide bytecode is checked. OPCODE_ret added to the list of
17775         wide.
17776
17777 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17778
17779         * class.c (make_class): Temporary use permanent_obstack. Set the
17780         class CLASS_P field to 1.
17781         (push_class): Temporary use permanent_obstack.
17782         (set_super_info): Temporary use permanent_obstack.
17783         (add_method): Temporary use permanent_obstack, set
17784         METHOD_TRANSIENT().
17785         (add_field): Temporary use permanent_obstack. Sets
17786         FIELD_VOLATILE() and FIELD_TRANSIENT().
17787         (build_class_ref): Temporary use permanent_obstack if the class
17788         isn't compiled.
17789         (build_static_field_ref): Temporary use permanent_obstack when
17790         creating field's rtl.
17791         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
17792         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
17793         and fields. Function finalized, as far as flag handling.
17794         (push_class_static_dummy_field): Temporary use permanent_obstack.
17795         (emit_register_class): Force generation of class registration at
17796         -O3 or deeper.
17797         * decl.c (end_java_method): Call permanent_allocation() before
17798         returning.
17799         * expr.c (can_widen_reference_to): Added comment to interface
17800         handling, fixed typo.
17801         (lookup_field): Now uses CLASS_P() to correct FIXME
17802         (expand_invoke): Verification on public && !static &&
17803         !abstract moved into soft_lookupinterfacemethod (kaffe).
17804         Use Object class dtable if objectref is an array when expanding
17805         invokeinterface.
17806         (java_push_constant_from_pool): Temporary use permanent_obstack
17807         for CONSTANT_string
17808         * parse.c (get_ref_constant): Temporary use permanent_obstack to
17809         create constant references.
17810         (get_constant): Temporary use permanent_obstack to create constant.
17811         (load_class): Temporary use permanent_obstack to load class.
17812         (jcf_parse): Temporary use permanent_obstack to perform class
17813         layout.
17814         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
17815         (build_java_signature): Temporary use permanent_obstack.
17816         * verify.c: (verify_jvm_instruction): removed unnecessary verification
17817         on ACC_SUPER flag.
17818         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
17819         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
17820         (CLASS_P): Defined
17821
17822 1997-09-11  Per Bothner  <bothner@cygnus.com>
17823
17824         * class.c (append_gpp_mangled_type):  Fix typo.
17825         (emit_register_class):  Use main_class to get class object, rather
17826         than looking for no-longer-existing static decl starting with _CL.
17827         * typeck.c (parse_signature_type):  Promote array element type
17828         if it is a RECORD_TYPE.
17829
17830 1997-09-10  Per Bothner  <bothner@cygnus.com>
17831
17832         * class.c (push_class_static_dummy_field):  New function.
17833         (mangle_static_field):  New. Do G++-style mangling of static fields.
17834         (layout_class):  Mandle static fields here, not in add_field.
17835         (build_class_ref):  The class object is now a dummy static field.
17836         * decl.c (find_local_variable):  Look for best, instead of first match.
17837         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
17838         (build_java_athrow):  Don't check here if exception is Throwable.
17839         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
17840         (TYPE_USED):  Removed.  No longer used ...
17841         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
17842         * verify.c (push_pending_label):  New function.
17843         (push_pending_block):  Renamed to check_pending_block.
17844         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
17845         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
17846         re-checking possible handlers) after a store (less wasted work).
17847         Check for null handler (finally) before calling add_handler.
17848         Various changes to (finally?) correctly handle try/finally.
17849
17850 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
17851
17852         * class.c: Include stdio.h.
17853
17854 1997-09-04  Per Bothner  <bothner@cygnus.com>
17855
17856         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
17857         to make sure class is initialized before static/special invoke.
17858
17859         * verify.c (verify_jvm_instructions):  On a store instruction,
17860         call find_local_variable to force pre-allocation of decl and rtx.
17861         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
17862
17863 1997-09-03  Per Bothner  <bothner@cygnus.com>
17864
17865         * class.c (build_class_ref):   Strip off "promoted_" if need be.
17866         (make_field_value): Call build_java_signature when needed.
17867         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
17868         * expr.c (build_java_athrow):  Don't push_value of exception.
17869         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
17870         match specification of [fd]cmp[lg] for NaNs.
17871         (expand_byte_code):  Add support for exception handler ranges.
17872         * except.c:  Add skeleton for EH code-generation.
17873         * verify.c (merge_types):  Treat all promoted integral types as equal.
17874         * constants.c (build_constants_constructor):  To force creation of
17875         current_constant_pool_data_ref, call build_constant_data_ref.
17876
17877         * javaop.def (lload):  Fix typo.
17878         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
17879
17880 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
17881
17882         * parse.c: Don't include function.h.
17883
17884 1997-08-27  Per Bothner  <bothner@cygnus.com>
17885
17886         * except.[ch]:  New files.
17887         * Makefile.in (JAVA_OBJS):  Add except.o
17888         * expr.c:  Temporary warning about unimplemented exceptions.
17889         * verify.c:  Verify exception handlers.
17890
17891         * jcf-dump.c (disassemble_method):  Print exception table.
17892
17893 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17894
17895         * expr.c (verify_jvm_instructions): Started a thorough
17896         verification of invoke* bytecodes.
17897         (expand_byte_code): flush quick stack if PC is the target of a
17898         branch.  and undef RET (conflicting with config/i386/i386.h).
17899         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
17900         used.
17901         (expand_invoke): Now handles invokeinterface and do more
17902         verification according to the bytecode.
17903         (lookup_field): Don't try to load the class if processing
17904         dtable_type.
17905         (can_widen_reference_to): Now handles interfaces.
17906         * decl.c (init_decl_processing): New global variable
17907         soft_lookupinterfacemethod_node, declared in java-tree.h.
17908         Call set_super_info on string_type_node.
17909         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
17910         defined.
17911         * class.c (set_super_info): Fills the CLASS_* flags according to
17912         access_flags.
17913         (get_access_flags_from_decl): Handles all class flags.
17914
17915 1997-08-26  Per Bothner  <bothner@cygnus.com>
17916
17917         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
17918         * parse.c (yyparse):  Check for abstract method, and missing code.
17919         * expr.c (expand_byte_code):  Change interface.
17920         * lang.c (put_decl_node):  Print promoted types prettier.
17921         * verify.c (verify_jvm_instruction):  Change interface.
17922         Partial support for scanning exception table.
17923         For load instructions, handle promoted integral types.
17924
17925 1997-08-21  Per Bothner  <bothner@cygnus.com>
17926
17927         * verify.c:  New file, with contents moved from expr.c.
17928         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
17929         * typeck.c (is_array_type_p):  Moved here from expr.c.
17930         * java-tree.h:  Add some now-needed function declarations.
17931         * Makefile.in (JAVA_OBJS): Added verify.o.
17932
17933 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17934
17935         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
17936         METHOD_ABSTRACT flag.
17937
17938         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
17939         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
17940         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
17941
17942         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
17943         variables.
17944         (start_java_method): Hook for SYNCHRONIZED methods.
17945
17946         * expr.c (build_java_jsr, build_java_ret): New functions
17947         (JSR,PRE): New macros
17948         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
17949         (verify_jvm_instructions): tableswitch, lookupswitch,
17950         monitorenter, monitorexit, goto_w: verified.
17951         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
17952         (build_java_monitor): New function.
17953         (MONITOR_OPERATION): Modified to call build_java_monitor()
17954         (verify_jvm_instructions): Started a thorough verification of
17955         invoke* bytecodes.
17956
17957 1997-08-19  Per Bothner  <bothner@cygnus.com>
17958
17959         Support verification of jsr/ret subroutines (used for try/finally).
17960         * decl.c (return_address_type_node):  New type node.
17961         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
17962         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
17963         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
17964         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
17965         TYPE_USED):  New macros for special types in type_map.
17966
17967         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
17968         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
17969         BCODE_JUMP_TARGET.
17970         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
17971
17972         * expr.c (can_widen_reference_to):  New function.
17973         (pop_type):  Use it.
17974         (merge_type_state):  Support handling start of subroutine.
17975         (push_pending_block):  Return char* error message, instead of calling
17976         fatal on an error.  Also handle subroutines.
17977         (verify_jvm_instructions):  Handle errors from push_poending_block.
17978         Support jsr and ret instructions.
17979
17980 1997-08-19  Per Bothner  <bothner@cygnus.com>
17981
17982         * jcf-io.c (find_classfile):  Fix thinko.
17983         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
17984
17985 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
17986
17987         * Makefile.in (BISON): Remove.
17988
17989 1997-08-07  Per Bothner  <bothner@cygnus.com>
17990
17991         * Makefile.in:  Convert to autoconf.
17992         * config-lang.in (outputs):  Added java/Makefile.
17993
17994         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
17995         Rename cc1java to jc1.
17996
17997         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
17998         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
17999
18000         * class.c (class_depth):  Do load_class if needed.
18001
18002         Mostly better verification.
18003         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
18004         (init_decl_processing):  Change return type of soft_checkcast.
18005         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
18006         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
18007         lang_print_error):  New functions.
18008         (lang_init):  Set global hook print_error_function to lang_print_error.
18009         * expr.c:  In the type_map ptr_type_node is only used for null now.
18010         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
18011         (merge_types):  Dererence pointer to record types before comparing.
18012         (decode_newarray_type, merge_types):  On error just return NULL.
18013         (build_java_binop):  Add preliminary implementation (with warning)
18014         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
18015         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
18016         (expand_compare, expand_java_goto, expand_java_call):  Don't
18017         push_pending_block, since that only makes sense when verifying.
18018         (merge_type_state):  Different return codes.
18019         (push_pending_block):  A block may need to be verified more than once.
18020         (expand_byte_code):  Warn about unused code at code generation time.
18021         (verify_jvm_instruction):  Changed logic, since code may need to be
18022         re-verified if type-state has changed.  Also, better error handling.
18023         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
18024         Improve newarray, anewarray, ?aload, athrow,
18025         * java-tree.h (LABEL_CHANGED):  New macro.
18026
18027 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18028
18029         * decl.c (soft_athrow_node): New global variable initialized.
18030         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
18031         * typeck.c (convert): Added support for REAL_TYPE.
18032         (convert_to_char): New function.
18033         (convert): Handle CHAR_TYPE.
18034         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
18035         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
18036         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
18037         promoted type.
18038         (verify_jvm_instructions): Added break a the end of bogus unop: label.
18039         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
18040         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
18041         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
18042         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
18043         to Use The Right Things.
18044         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
18045         compatible with INT. BOOLEAN is made equivalent to BYTE.
18046         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
18047         OPCODE_ifnonnull): Now supported.
18048         (build_java_athrow): New function.
18049
18050 1997-08-04  Per Bothner  <bothner@cygnus.com>
18051
18052         Rename method name <init> to match G++ (and fix mangling).
18053         * class.c (layout_class):  Replace method name of <init> by class name.
18054         (make_method_value):  Do inverse renaming of constructor from <init>.
18055         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
18056         * typeck.c (lookup_java_constructor):  New function.
18057         * expr.c (expand_invoke):  If method_name is <init>, call
18058         lookup_java_constructor to find constructor.
18059
18060         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
18061
18062 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18063
18064         * parse.c (get_class_constant): Modified to handle array "classes"
18065         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
18066         wide type.
18067         (convert): Modified to handle real type.
18068         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
18069         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
18070         variables declared.
18071         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
18072         soft_multianewarray, soft_newarray_node, soft_throw_node): New
18073         global variables initialized.
18074         (find_local_variable): Handles the case of a pointer
18075         (end_java_method): Restore the use of one more scope
18076         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
18077         build_java_array_length_access, expand_java_arrayload,
18078         expand_java_arraystore, expand_java_array_length,
18079         expand_java_multianewarray, expand_java_anewarray,
18080         build_java_check_indexed_type, is_array_type_p,
18081         build_java_throw_out_of_bound_exception): New functions.
18082         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
18083         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
18084         OPCODE_<t>aload): Implemented code for verification.
18085         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
18086         ARRAY_NEW_MULTI): Macro defined.
18087         (CONVERT): Modified to invoke convert().
18088         (case OPCODE_aload2): Fixed index typo from 2 to 1.
18089
18090 1997-07-31  Per Bothner  <bothner@cygnus.com>
18091
18092         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
18093         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
18094         (make_class_data):  Field name needs '/' as package prefix.
18095         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
18096
18097 1997-07-25  Per Bothner  <bothner@cygnus.com>
18098
18099         Implement debug information for local variables.
18100         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
18101         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
18102         DECL_LOCAL_SLOT_CHAIN):  New macros.
18103         (struct lang_decl_var):  New type.
18104         * parse.c (give_name_to_locals):  Move to decl.c.
18105         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
18106         (start_java_method):  Re-write parameter handling.
18107         (pending_local_decls):  New global variable.
18108         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
18109         (find_local_variable):  Accept pc so we can skips decls not in range.
18110         (struct binding_level):  Add end_pc field.
18111         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
18112         (various):  Change so current pc gets passed to find_local_variable.
18113
18114         * decl.c (init_decl_processing):  Re-arrange fields in
18115         class_type_node and and method_type_node to match kaffe 0.9.1.
18116         * class.c (make_method_value, make_class_data):  Update
18117         initializations to match.
18118
18119 1997-07-16  Per Bothner  <bothner@cygnus.com>
18120
18121         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
18122         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
18123         (push_super_field):  New function.
18124         (make_class_data):  Handle inheritance of class static initializer.
18125         (layout_class):  New name mangling.
18126         * constants.c (build_constant_data_ref):  Init type of data array
18127         to a one-element array.
18128         (build_constants_constructor):  Set DECL_SIZE from complete array type.
18129         * decl.c:  Rename class_type, object_type etc to class_type_node,
18130         object_type_node etc.  Make former inherit from latter.
18131         * expr.c (expand_invoke):  Add cast of function address.
18132         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
18133         * parse.c (yyparse):  Don't call layout_class here.
18134         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
18135
18136 1997-06-14  Per Bothner  <bothner@cygnus.com>
18137
18138         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
18139         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
18140         (alloc_class_constant):  New.
18141         * expr.c (expand_invoke):  Make sure method's class is initialized.
18142         * class.c (interits_from_p, emit_register_class):  New functions.
18143         * parse.c (yyparse):  Call emit_register_class.
18144
18145 1997-06-09  Per Bothner  <bothner@cygnus.com>
18146
18147         * constants.c:  New file, to handle constant pool.
18148         * Makefile.in (JAVA_OBJS):  Add constants.o.
18149         * decl.c (init_decl_processing):  Update, fix, finish various structs.
18150         (pushdecl_top_level):  New.
18151         * parse.c (layout_class):  Moved to class.c.
18152         * expr.c (java_push_constant_from_pool):  New function.
18153         * class.c (build_class_ref):  Make work fully
18154         (make_class_data):  Emit super-class, constant pool, interface vector.
18155
18156 1997-06-03  Per Bothner  <bothner@cygnus.com>
18157
18158         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
18159         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
18160         * class.c (class_depth):  New function.
18161         (lookup_named_class):  Replaced by new function lookup_class.
18162         * decl.c (object_type_node, string_type_node):  New.
18163         Remove various types that we no longer need.
18164         * expr.c (verify_jvm_instructions):  New separate verifier pass.
18165         (push_type, pop_type):  New functions for verifier.
18166         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
18167         (expand_byte_code):  Simplify, since we assume already verified.
18168         (expand_invoke):  Now mostly works.
18169         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
18170         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
18171         * parse.c:  Wait to allocate class object until we know its name.
18172         (layout_class):  Calculate DECL_VINDEX for each virtual method.
18173         * typeck.c (get_array_type):  Rename to ...
18174         (build_java_array_type):  ... and provide working implementation.
18175         (build_java_signature):  New function - build Java signature of type.
18176         (set_java_signature):  New function - cache signature with type.
18177         (lookup_java_method):  New function.
18178
18179 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
18180
18181         * class.c (ident_subst):  Take extra SUFFIX parameter.
18182         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
18183         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
18184         (build_class_ref):  Actually implement.
18185         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
18186         * decl.c (builtin_function):  New.
18187         (init_decl_processing):  Update for current Kaffe.  Declare some
18188         builtin Kaffe functions.
18189         * expr.c (build_address_of):  New.
18190         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
18191         Renamed (from expand_java_new etc), and added working implementations.
18192         (build_field_ref):  Now also handle static fields.
18193         (expand_invoke):  Implement invokestatic, and start implement rest.
18194         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
18195         * javaop.def:  Rename invokevirt -> invokevirtual.
18196         * lang.c (use_handles):  Removed.
18197         * parse.c:  Add support for ConstantValue attribute.
18198         Handle nested loading of a class.  (JPOOL_UTF):  New.
18199
18200 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
18201
18202         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
18203
18204 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
18205
18206         * Make-lang.in (java.install-man):  New empty rule.
18207         * typeck.c (set_local_type):  New function.
18208         * expr.c (STORE_INTERNAL):  Call find_local_variable,
18209         not find_stack_slot.  Call set_local_type.
18210
18211 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
18212
18213         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
18214         and building RECORD_TYPE CONSTRUCTORs.
18215         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
18216
18217         * lang.c (use_handles):  Change the default to 0.
18218         * decl.c:  Define and build class_type, field_type, utf8const_type.
18219         * class.c (make_class_data, make_field_value,
18220         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
18221         hashUtf8String, strLengthUtf8, mangled_classname:
18222         Functions to build reflective data structures.
18223         * parse.c (yyparse):  Call make_class_data.
18224
18225         * jcf-io.c (open_class, find_classfile):  New functions.
18226         * jcf-dump.c:  Support reading classfile from explicitly-named
18227         class file (without CLASSPATH searching).
18228
18229 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
18230
18231         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
18232         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
18233         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
18234         (get_constant):  Now trivial for CONSTANT_Utf8.
18235
18236         * jcf.h:  Make NEW_CPOOL the default.
18237         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
18238
18239 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
18240
18241         New directory.