OSDN Git Service

2005-07-15 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2005-07-15  Andrew Haley  <aph@redhat.com>
2
3         * expr.c (expand_load_internal): Convert to destination type.
4
5 2005-07-22  Manfred Hollstein  <mh@suse.com>
6
7         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
8         (check_constant): Likewise.
9         (check_wide_constant): Likewise.
10
11 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
12
13         Make CONSTRUCTOR use VEC to store initializers.
14         * check-init.c (check_init): Update to cope with VEC in
15         CONSTRUCTOR_ELTS.
16         * class.c (make_field_value, make_method_value, get_dispatch_table,
17         make_class_data, emit_symbol_table, emit_catch_table,
18         emit_assertion_table): Use build_constructor_from_list instead of
19         build_constructor.
20         * constants.c (build_constants_constructor): Likewise.
21         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
22         VEC in CONSTRUCTOR_ELTS.
23         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
24         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
25         of a TREE_LIST.
26         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
27         CONSTRUCTOR_ELTS.
28         * parse.y (build_new_array_init): Use build_constructor_from_list
29         instead of build_constructor.
30         (patch_new_array_init): Update to cope with VEC in
31         CONSTRUCTOR_ELTS.
32         (array_constructor_check_entry): Likewise.
33
34 2005-07-12  Tom Tromey  <tromey@redhat.com>
35
36         * jvspec.c (lang_specific_driver): Put filelist_filename first on
37         command line.
38
39 2005-07-12  Tom Tromey  <tromey@redhat.com>
40
41         PR java/19674:
42         * parse-scan.y (interface_member_declaration): Added
43         empty_statement.
44
45 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
46         
47         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
48         (LABEL_PENDING_CHAIN): Ditto.
49         (LABEL_PC): Ditto.
50         (DECL_BIT_INDEX): Ditto.        
51
52 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
53
54         PR java/18119
55         * parse.y (inner_class_accessible): New function. Logic moved from
56         check_inner_class_access.
57         (check_inner_class_access): Use inner_class_accessible.
58         (resolve_inner_class): Simplify arguments. Create circularity hash
59         here. Keep looking for classes if we found one that was inaccessible. 
60         Return the inaccessible class only if there is no other match.
61         (do_resolve_class): Update for new resolve_inner_class arguments.
62         Don't create circularity_hash here.
63
64 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
65
66         PR java/21045
67         * parse.y (add_exception_to_throws): New function.
68         (purge_unchecked_exceptions): Removed.
69         (get_constructor_super): Renamed from verify_constructor_super. Now
70         returns the super constructor after verification.
71         (java_complete_expand_method): Don't use purge_unchecked_exceptions
72         or save/restore the exception list.
73         (check_thrown_exceptions): Add uncaught exceptions in anonymous
74         class initializers and constructors to the throws clause of the method. 
75
76 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
77
78         PR java/19674
79         * parse.y (interface_member_declaration): Allow empty statements in
80         interface declarations.
81
82 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
83
84         * Makefile.in (parse.o): Adjust dependencies.
85         * parse.y: Include tree-dump.h.
86
87 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
88
89         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
90         flag for quoting.
91
92 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
93
94         * parse.y (issue_warning_error_from_context): Call
95         pp_output_formatted_text to be able to get the buffer.
96
97 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
98
99         * parse.y (issue_warning_error_from_context): Update for the
100         renaming of pp_format_text to pp_format.
101
102 2005-06-28  Paul Brook  <paul@codesourcery.com>
103
104         * decl.c (java_init_decl_processing): Call
105         default_init_unwind_resume_libfunc.
106
107 2005-06-27  Tom Tromey  <tromey@redhat.com>
108
109         PR java/21540, PR java/13788:
110         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
111         fold_constant_for_init.
112         (patch_binop): Added 'folding' argument.  Updated all callers.
113         (patch_unaryop) <NOP_EXPR>: New case.
114         (fold_constant_for_init) <NOP_EXPR>: Likewise.
115         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
116
117 2005-06-25  Jan Hubicka  <jh@suse.cz>
118
119         * builtins.c (define_builtin): Accept new flags parameter.
120         (initialize_builtins): Mark the builtins const and nothrow accordingly.
121
122 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
123
124         * all files: Update FSF address in copyright headers.
125
126 2005-06-24  Tom Tromey  <tromey@redhat.com>
127
128         * verify-impl.c (verify_instructions_0): Correctly handle
129         situation where PC falls off end.
130
131 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
132
133         PR java/20697
134         * parse.y (find_most_specific_methods_list): Remove special case for
135         inner classes.
136
137 2005-06-15  Tom Tromey  <tromey@redhat.com>
138
139         PR libgcj/21906:
140         * class.c (make_method_value): Use soft_abstractmethod_node for
141         abstract method.
142         * java-tree.h (soft_abstractmethod_node): New define.
143         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
144         * decl.c (java_init_decl_processing): Initialize
145         soft_abstractmethod_node.
146
147 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
148
149         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
150
151 2005-06-13  Per Bothner  <per@bothner.com>
152
153         * expr.c (int highest_label_pc_this_method,
154         start_label_pc_this_method): New globals.
155         (lookup_label): Add start_label_pc_this_method to pc for label, and
156         update highest_label_pc_this_method.  This prevents conflicts between
157         labels from different methods.
158         * java-tree.h: Declare new globals.
159         * jcf-parse.c (parse_class_file): If needed bump
160         start_label_pc_this_method and reset highest_label_pc_this_method.
161
162 2005-06-13  Tom Tromey  <tromey@redhat.com>
163
164         PR java/21844:
165         * parse.y (nested_field_access_p): Handle case where outer field
166         is inherited by enclosing class.
167
168 2005-06-12  Per Bothner  <per@bothner.com>
169
170         * class.c (inherits_from_p): Do load_class if needed.
171
172 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
173
174         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
175         * java-tree.h (parse_error_context): Move...
176         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
177         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
178         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
179
180 2005-06-08  Roger Sayle  <roger@eyesopen.com>
181
182         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
183
184 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
185
186         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
187         msgid for argument name.
188         * gjavah.c (error): Likewise.
189         * java-tree.h (parse_error_context): Likewise.
190         * parse.y (parse_error_context, parse_warning_context,
191         issue_warning_error_from_context): Likewise.
192
193 2005-06-01  Tom Tromey  <tromey@redhat.com>
194
195         PR java/21722:
196         * class.c (build_static_field_ref): Don't fold constant fields if
197         current class is from a .class file and we're using indirect
198         dispatch.
199
200 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
201
202         * java/verify-glue.c: Don't include errors.h and include toplev.h.
203         * java/Make-lang.in: Updates dependencies.
204
205 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
206
207         PR java/19870.
208         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
209         NESTED_FIELD_ACCESS_IDENTIFIER_P.
210         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
211         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
212         * jcf-write.c (generate_classfile): Use
213         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
214         OUTER_FIELD_ACCESS_IDENTIFIER_P.
215         * parse.y (build_outer_field_access): Rename to
216         build_nested_field_access. Support static fields and outer-to-inner
217         class accesses.
218         (outer_field_access_p): Rename to nested_field_access_p. Support
219         static fields and generalise to outer-to-inner class and sibling
220         inner class accesses.
221         (outer_field_expanded_access_p): Rename to
222         nested_field_expanded_access_p and support static fields.
223         (outer_field_access_fix): Rename to nested_field_access_fix and
224         support static fields.
225         (build_outer_field_access_expr): Rename to
226         build_nested_field_access_expr and support static fields.
227         (build_outer_field_access_methods): Rename to
228         build_nested_field_access_methods and support static fields. For
229         static fields, generate accessors without class instance parameters.
230         (build_outer_field_access_method): Rename to
231         build_nested_field_access_method and support static fields.
232         (build_outer_method_access_method): Use
233         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
234         OUTER_FIELD_ACCESS_IDENTIFIER_P.
235         (resolve_expression_name): Consider static field accesses across
236         nested classes.
237         (resolve_qualified_expression_name): Likewise.
238         (java_complete_lhs): Use nested_field_access_fix instead of
239         outer_field_access_fix.
240         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
241         Use nested_field_expanded_access_p instead of
242         outer_field_expanded_access_p. Use nested_field_access_fix instead
243         of outer_field_access_fix.
244         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
245         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
246
247 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
248
249         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
250         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
251         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
252         MINOR_BINARYCOMPAT_ABI_VERSION): New.
253         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
254         (parse_version): Calculate version ID using new method. Use bit-flags
255         for flag_indirect_dispatch and flag_bootstrap_classes.
256
257 2005-05-25  Richard Henderson  <rth@redhat.com>
258
259         PR libgcj/21692
260         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
261         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
262         DECL_CONTEXT; avoid pushdecl_top_level.
263         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
264         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
265         (layout_class_method): Likewise.
266         * decl.c (java_mark_cni_decl_local): New.
267         (java_mark_class_local): Use it.
268         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
269         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
270         (struct lang_decl_func): Add local_cni;
271         (struct lang_decl_var): Add class_field, vtable.
272         (java_mangle_decl): Declare.
273         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
274         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
275         (mangle_obstack_1): New.
276         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
277         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
278         lhd_set_decl_assembler_name for things that don't need mangling.
279         (mangle_class_field): Rename from java_mangle_class_field, make
280         static, don't call init_mangling or finish_mangling.
281         (mangle_vtable): Similarly.
282         (mangle_local_cni_method_decl): New.
283         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
284         gcc_assert, and MANGLE_RAW_STRING.
285         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
286
287 2005-05-25  DJ Delorie  <dj@redhat.com>
288
289         * class.c (set_constant_value): Move warning control from if() to
290         warning(OPT_*).
291
292 2005-05-24  Richard Henderson  <rth@redhat.com>
293
294         * builtins.c (define_builtin): Don't call make_decl_rtl.
295         * constants.c (build_constant_data_ref): Likewise.
296         * class.c (build_utf8_ref): Likewise.
297         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
298         (get_dispatch_table, layout_class_method): Likewise.
299         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
300         by hand.
301         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
302         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
303         to determine if we need a non-zero address.
304         * decl.c (builtin_function): Don't call make_decl_rtl.
305         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
306         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
307         * resource.c (compile_resource_data): Likewise.
308         * parse.y (resolve_field_access): Re-word comment to avoid
309         building DECL_RTL.
310
311 2005-05-24  Richard Henderson  <rth@redhat.com>
312
313         * class.c (registered_class): Take it out of class_roots; turn into
314         a vec of trees.
315         (register_class): Make static.  Don't duplicate decl node.  Use
316         VEC_safe_push.
317         (emit_register_classes): Use VEC_iterate.  Use output_constant
318         instead of assemble_integer.  Don't call mark_decl_referenced
319         directly.
320         * java-tree.h (register_class): Remove decl.
321
322 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
323
324         PR java/17845
325
326         * parse.y (register_package, package_list): Remove.
327         (package_declaration): Do not call register_package.
328         (do_resolve_class): Do not use package_list.
329
330 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
331
332         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
333         unused variable.
334
335 2005-05-15  Tom Tromey  <tromey@redhat.com>
336
337         PR java/21519:
338         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
339         NOTE_PUSH.
340
341 2005-05-12  Aaron Luchko <aluchko@redhat.com>
342
343         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
344
345 2005-05-11  Tom Tromey  <tromey@redhat.com>
346
347         * gcj.texi (Code Generation): Document -fbootstrap-classes.
348         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
349         (parse_version): Use it.
350         * lang.opt (-fbootstrap-classes): New option.
351
352 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
353
354         PR java/21436
355         * class.c (maybe_layout_super_class): Look for imports in this_class.
356         * parse.h (ctxp_for_generation_last): New.
357         (do_resolve_class): Add a parameter.
358         * parse.y (ctxp_for_generation_last): New.
359         (java_pop_parser_context): Add at end of list.
360         (find_in_imports, find_in_imports_on_demand): Look in ctxp
361         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
362         the given type are NULL.
363         (do_resolve_class): Look into the imports of the new second parameter.
364         Adjust recursive calls.
365         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
366         calls to do_resolve_class.
367         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
368         (java_complete_class): Do not do that here.
369
370 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
371
372         PR java/20309
373         * Make-lang.in (java): Add gjnih.
374         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
375         (GJNIH_OBJS): New variable.
376         (gjnih$(exeext)): New target.
377         (JAVA_MANFILES): Add gjnih.1.
378         (java.uninstall): Add gjnih.1.
379         (java.mostlyclean): Add gjnih.
380         (java.maintainer-clean): Add gjnih.1.
381         (java/gjavah-jni.o): New target.
382         (.INTERMEDIATE): Add gjnih.pod.
383         (gjnih.pod): New target.
384         * config-lang.in (stagestuff): Add gjnih.
385         * gcj.texi (Top): Add gjnih node.
386         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
387         -bootclasspath options.
388         (Invoking gjnih): New node.
389         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
390         (TOOLNAME): New macro.
391         (error): Replace hard-coded gcjh with TOOLNAME.
392         (process_file): Likewise.
393         (usage): Likewise.
394         (version): Likewise.
395         (help): Likewise.  Add help output for -force, -old, -trace and -J
396         options.
397         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
398         (options): Add force, old, trace and J fields.
399         (main): Handle -force, -old, -trace and -J options.
400
401 2005-05-03  Tom Tromey  <tromey@redhat.com>
402
403         PR java/21245:
404         * gjavah.c (main): Unlink output file on error.
405
406 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
407
408         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
409         copyright.
410
411 2005-04-29  Tom Tromey  <tromey@redhat.com>
412
413         * expr.c (build_jni_stub): Updated for change to build_block.
414
415 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
416
417         * expr.c (force_evaluation_order): Declare 'saved' earlier.
418
419 2005-04-28  Andrew Haley  <aph@redhat.com>
420
421         PR java/19285
422         * java-tree.h (soft_resolvepoolentry_node): New.
423         (alloc_constant_fieldref): Declare.
424         * expr.c (expand_java_field_op): Don't call class_init for
425         accesses to static fields with indirect dispatch.
426         * builtins.c (initialize_builtins): Add "__builtin_expect".
427         * decl.c (soft_resolvepoolentry_node): New variable.
428         (java_init_decl_processing): Create a decl for
429         "_Jv_ResolvePoolEntry".
430         * class.c (build_fieldref_cache_entry): New function.
431         (build_static_field_ref): Rewrite for indirect dispatch.
432         * constants.c (find_name_and_type_constant_tree): New function.
433         (alloc_constant_fieldref): Likewise.
434         (build_constants_constructor): Handle CONSTANT_Fieldref and
435         CONSTANT_NameAndType.
436
437         PR java/21115
438         * expr.c (force_evaluation_order): Convert outgoing args smaller
439         than integer.
440
441 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
442
443         * gcj.texi (libgcj Runtime Properties): Remove obsolete
444         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
445         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
446
447 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
448
449         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
450         to `unlock_stream' with `unlock_std_streams'.
451
452 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
453
454         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
455         instead of just expr.h.
456
457 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
458
459         * gjavah.c (main): Unlock the stdio streams.
460         * jcf-dump.c (main): Likewise.
461         * jv-scan.c (main): Likewise.
462         * jvgenmain.c (main): Likewise.
463
464 2005-04-23  DJ Delorie  <dj@redhat.com>
465
466         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
467         parse.y: Adjust warning() callers.
468
469 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
470
471         * gcj.texi (Object fields): Change "Integer" to "Int" in example
472         contructor.
473
474 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
475
476         * gcj.texi: Fix typos and bogus example.
477
478 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
479
480         * except.c: Fix a comment typo.
481
482 2005-04-19  Julian Brown  <julian@codesourcery.com>
483
484         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
485         indirect dispatch with PIC.
486
487 2005-04-18  Andrew Haley  <aph@redhat.com>
488
489         * java-except.h (struct eh_range.handler): Remove unused field.
490         (handle_nested_ranges): Remove function declaration.
491         (sanity_check_exception_range): Add function declaration.       
492         * verify.c (verify_jvm_instructions): Remove call to
493         handle_nested_ranges.
494         * verify-glue.c (verify_jvm_instructions_new): Call
495         sanity_check_exception_range.
496         * except.c (link_handler, eh_range_freelist, link_handler,
497         handle_nested_ranges): Remove.
498         (add_handler): Rewrite.
499         (sanity_check_exception_range): New function.
500         (print_ranges): New function.
501
502 2005-04-13  Julian Brown  <julian@codesourcery.com>
503
504         * decl.c (finish_method): Give methods once-only linkage.
505
506 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
507
508         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
509
510 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
511
512         * java-tree.h: Don't use PARAMS().
513
514 2005-04-07  Per Bothner  <per@bothner.com>
515
516         * class.c (push_class): By default, suppress debug output.
517         (finish_class): Enable debug output for classes we're emitting.
518
519 2005-04-07  Andrew Haley  <aph@redhat.com>
520
521         * gcj.texi: Correct gcj-dbtool instructions.
522
523 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
524
525         * gcj.texi: Fix a typo.
526         * lang.c: Fix a comment typo.
527
528 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
529
530         * gcj.texi (Invoking gij): Add descriptions of new -X options.
531         Mention recognized-and-ignored compatibility options.
532         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
533         JvFree.
534         (About CNI): Add Memory allocation section.
535
536 2005-04-01  Tom Tromey  <tromey@redhat.com>
537
538         * decl.c (java_init_decl_processing): Fix types of
539         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
540         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
541         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
542
543 2005-03-31  Jan Hubicka  <jh@suse.cz>
544
545         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
546         * class.c: Include cgraph.h
547         (make_local_functoin_alias): Mark aslias as needed.
548         * resource.c: Include cgraph.h
549         (compile_resource_data): Go via cgraph interface.
550
551 2005-03-30  Ian Lance Taylor  <ian@airs.com>
552
553         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
554
555 2005-03-30  Tom Tromey  <tromey@redhat.com>
556
557         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
558         inner_class_info_index==0 or outer_class_info_index==0.
559
560 2005-03-29  Tom Tromey  <tromey@redhat.com>
561
562         * gcj.texi (libgcj Runtime Properties): Document
563         gnu.gcj.runtime.endorsed.dirs.
564
565 2005-03-24  Anthony Green  <green@redhat.com>
566
567         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
568         'gcj-dbtool -p'.
569
570 2005-03-23  Tom Tromey  <tromey@redhat.com>
571
572         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
573         (parse_version): Use it.
574
575 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
576
577         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
578
579 2005-03-18  Andrew Haley  <aph@redhat.com>
580
581         PR java/20522
582         * decl.c (update_aliases): Don't update variables that are about
583         to die.
584         (maybe_poplevels): Add comment.
585
586 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
587
588         PR java/20502
589         * jcf-parse.c (duplicate_class_warning): New function.
590         (java_parse_file): Call duplicate_class_warning if 
591         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
592         (parse_zip_file_entries): Likewise. Also set
593         CLASS_FROM_CURRENTLY_COMPILED_P.
594
595 2005-03-16  Andrew Haley  <aph@redhat.com>
596
597         * expr.c (expand_java_arrayload): Don't generate a
598         NullPointerException based on the type of the node.
599         (build_java_array_length_access): Likewise.
600
601 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
602
603         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
604
605 2005-03-11  Tom Tromey  <tromey@redhat.com>
606
607         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
608         (libgcj Runtime Properties): Document the default .db.
609
610 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
611
612         PR java/20312
613         * parse.y (checks_throws_clauses): Check exceptions list even when
614         the base class does not come from a source file being compiled.
615         (java_complete_lhs): Remove unused variable 'wfl'.
616
617 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
618
619         PR java/20338
620         * decl.c (finish_method): Emit _Jv_InitClass for private static
621         methods inside inner classes as well.
622
623 2005-03-08  Julian Brown  <julian@codesourcery.com>
624         * Revert patch from 2005-03-08 for causing bootstrap failure on
625         ppc-darwin.
626
627 2005-03-08  Julian Brown  <julian@codesourcery.com>
628
629         * decl.c (finish_method): Give methods once-only linkage.
630
631 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
632
633         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
634
635 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
636
637         * verify-glue.c (vfy_is_assignable_from): Perform static check using
638         can_widen_reference_to if the C++ ABI is in use.
639         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
640         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
641         type_isresolved, init_state, set_pc, state_get_pc,
642         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
643         (verify_fail): Report the current PC from the verifier context.
644         (free_state): Remove #if 0 block to enable this function.
645         (free_verifier_context): Call free_state on state_list iterator
646         values before freeing them.
647         * expr.c (pop_type_0): Pop correct type for error message when stack
648         contains a multi-word type.
649
650 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
651
652         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
653         for known NULL array length access.
654
655 2005-03-07  Tom Tromey  <tromey@redhat.com>
656
657         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
658
659 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
660
661         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
662         typeck.c: Update copyright.
663
664 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
665
666         Remove xref code.
667         * xref.c, xref.h: Remove file.
668         * Make-lang.in (java/xref.o): Remove.
669         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
670         * lang.c (flag_emit_xref): Remove definition.
671         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
672         * typeck.c (convert): Remove use of do_not_fold.
673         * parse.y (do_not_fold): Remove definition.
674         (parser grammar): Remove xref code.
675         (maybe_create_class_interface_decl, create_class): Likewise.
676         (register_fields, method_header, finish_method_declaration): Likewise.
677         (declare_local_variables, source_end_java_method): Likewise.
678         (java_complete_expand_classes): Do not set do_not_fold.
679         (java_complete_expand_method): Remove xref code.
680         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
681         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
682         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
683         (patch_synchronized_statement, patch_throw_statement): Likewise.
684         (maybe_build_class_init_for_field): Likewise.
685
686 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
687
688         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
689         instead of IS_NON_TYPE_CODE_CLASS.
690
691 2005-03-04  Andrew Haley  <aph@redhat.com>
692
693         PR java/18362
694         * class.c (set_method_index): Don't set method_index if it is
695         NULL_TREE.
696         (layout_class_method): Don't complain about "non-static method foo
697         overrides static method" in the case of indirect dispatch.
698
699 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
700
701         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
702         warning.
703         * Make-lang.in: Don't elide warnings in jcf-io.c.
704
705 2005-03-01  Per Bothner  <per@bothner.com>
706
707         PR java/8608
708         * check-init.c (wfl): Remove static.
709         (final_assign_error, check_init): Replace calls to parse_error_context
710         by plain error.
711         (check_init): Save, set, and restore input_location for each exp.
712
713 2005-03-01  Per Bothner  <per@bothner.com>
714
715         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
716         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
717         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
718
719 2005-03-01  Per Bothner  <per@bothner.com>
720
721         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
722
723 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
724
725         PR libgcj/16923
726         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
727         JvVMOption.
728
729 2005-02-22  Tom Tromey  <tromey@redhat.com>
730
731         PR java/20056:
732         * verify-impl.c (EITHER): New define.
733         (types_compatible): Handle it.
734         (check_field_constant): Use it.
735
736 2005-02-18  Tom Tromey  <tromey@redhat.com>
737
738         PR java/20056:
739         * verify-impl.c (types_equal): Fixed test.
740
741         PR java/20056:
742         * verify-glue.c (vfy_class_has_field): New function.
743         * verify.h (vfy_class_has_field): Declare.
744         * verify-impl.c (check_field_constant): Added 'putfield'
745         argument.
746         (verify_instructions_0): Updated.
747         (types_equal): New function.
748
749 2005-02-14  Tom Tromey  <tromey@redhat.com>
750
751         PR java/19921:
752         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
753         stack effect of multianewarray.
754
755 2005-02-14  Andrew Haley  <aph@redhat.com>
756
757         PR java/19907
758         * expr.c (expand_byte_code): Call promote_arguments().
759         (promote_arguments): New function.
760         * decl.c (check_local_unnamed_variable): Remove special case for
761         new verifier.
762         (find_local_variable): Promote all boolean types to int
763         when searching for local variable decls.
764
765 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
766
767         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
768         parse-scan.y: Update copyright.
769
770 2005-02-11  Per Bothner  <per@bothner.com>
771
772         PR java/15543
773         * parse-scan.y (input_location): Remove variable.
774         (main_input_filename): New - replaces input_filename, which isn't
775         settable if USE_MAPPED_LOCATION.
776         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
777         so we don't reference input_location or wfl_operator in that case.
778         * jv-scan.c (expand_location): Remove - no longer used.
779         (main): Set main_input_filename rather than input_filename.
780
781 2005-02-09  Richard Henderson  <rth@redhat.com>
782
783         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
784         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
785
786 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
787
788         * expr.c (add_type_assertion): Use the proper enumeration type,
789         since this is what htab_find_slot() is expecting.
790
791 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
792
793         * gcj.texi: Update copyright dates.
794
795 2005-02-02  Tom Tromey  <tromey@redhat.com>
796
797         * gcj.texi (libgcj Runtime Properties): Default library_control
798         to 'cache'.
799
800 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
801
802         PR java/15543
803         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
804         (modifiers) when square brackets are present in a declaration for
805         a final paramter.
806         * jv-scan.c (main): Set input_filename and input_line.
807
808 2005-02-01  Tom Tromey  <tromey@redhat.com>
809
810         PR java/19742:
811         * gjavah.c (get_field_name): Don't override name for JNI header.
812
813 2005-02-01  Roger Sayle  <roger@eyesopen.com>
814
815         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
816         of unsigned types using iushr and lushr JVM bytecodes.
817
818 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
819
820         PR java/19738
821         * gjavah.c (jni_print_float): Do not emit floating-point
822         initialiser for a static final field.
823         (jni_print_double): Likewise.
824
825 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
826
827         Revert:
828         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
829         * gjavah.c (print_field_info): Mark static data members of
830         floating-point type with "__extension__".
831
832 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
833
834         * gjavah.c (print_field_info): Mark static data members of
835         floating-point type with "__extension__".
836
837 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
838
839         PR java/9157
840         * parse.y (build_string_concatenation): Remove redundant if.
841         (patch_conditional_expr): Attempt to patch_string() the condition
842         of a ?: as well, in addition to its other operands.
843
844 2005-01-25  Tom Tromey  <tromey@redhat.com>
845
846         * Make-lang.in (java/java-tree-inline.o): Removed.
847
848 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
849
850         PR java/19070
851         * parse.y (patch_binop): Allow comparisons against NULL only
852         if the other operand is of a reference type.
853
854 2005-01-24  Tom Tromey  <tromey@redhat.com>
855
856         * java-tree.h (gcj_abi_version): Declare.
857         * class.c (make_class_data): Push gcj_abi_version into "next"
858         field.  Renamed field.
859         * decl.c (gcj_abi_version): New global.
860         (parse_version): New function.
861         (java_init_decl_processing): Call it.  Renamed 'next' field.
862         Include version.h.
863         (GCJ_BINARYCOMPAT_ADDITION): New define.
864
865 2005-01-24  Roger Sayle  <roger@eyesopen.com>
866
867         PR java/19295
868         * jcf-write.c (generate_bytecode_insns): Conversions between
869         integer types of the same precision shouldn't generate widening
870         or narrowing conversion bytecodes.
871
872 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
873
874         * java-except.h, java-tree.h: Remove unused prototypes.
875
876 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
877
878         PR java/18091:
879         * jcf-write.c (perform_relocations): Don't call memcpy if source
880         and destination are the same.
881
882 2005-01-17  Tom Tromey  <tromey@redhat.com>
883
884         * verify-impl.c (get_short): Sign extend.
885         (get_int): Likewise.
886
887 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
888
889         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
890         with TYPE_SIZE.
891
892 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
893
894         * verify.c: Revert to the version before the BC-ABI merge.
895
896 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
897
898         PR java/19277
899         * check-init.c (check_init): Take care of references that do not
900         have an explicit final variable declaration (e.g. array length
901         access) for pre/post in/de-crement operators.
902
903 2005-01-08  Mark Wielaard  <mark@klomp.org>
904
905         * parse.y (process_imports): Allocate (and free) original_name only
906         when not already defined.
907         * jcf-parse.c (read_class): Free results of find_class() and
908         lrealpath().
909         (java_parse_file): Keep pointer to head of file_list and free when
910         done. Free result of lrealpath().
911
912 2005-01-05  Tom Tromey  <tromey@redhat.com>
913
914         * gcj.texi (Standard Properties): java.ext.dirs is now used.
915
916 2004-12-20  Andrew Haley  <aph@redhat.com>
917
918         * typeck.c: Use fold_convert for ints and booleans.
919
920 2004-12-17  Andrew Haley  <aph@redhat.com>
921
922         PR java/18931
923         * typeck.c (convert): Use a CONVERT_EXPR when converting to
924         BOOLEAN_TYPE or CHAR_TYPE.
925         (convert_to_boolean, convert_to_char) : Remove.
926         * convert.h (convert_to_boolean, convert_to_char) : Remove.
927         * expr.c (expand_load_internal): Do type conversion if type is not
928         as required.
929
930 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
931
932         PR target/18459
933         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
934         Update comment.
935
936 2004-12-07  Andrew Haley  <aph@redhat.com>
937
938         PR java/18811:
939         * jcf-parse.c (load_class): Remove sanity test for missing inner
940         class file.
941
942 2004-12-06  Tom Tromey  <tromey@redhat.com>
943
944         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
945         (java.uninstall): Likewise.
946         (java.maintainer-clean): Likewise.
947         (.INTERMEDIATE): Likewise.
948         (java.install-man): Likewise.
949         (gcj-dbtool.pod): New target.
950         * gcj.texi (Code Generation): Document -findirect-dispatch.
951         (libgcj Runtime Properties): Document
952         gnu.gcj.precompiled.db.path.
953         (Top): Link to "Invoking gcj-dbtool".
954
955 2004-12-06  Tom Tromey  <tromey@redhat.com>
956
957         PR java/14853:
958         * java-tree.h (extract_field_decl): Declare.
959         * parse.y (extract_field_decl): Renamed from
960         strip_out_static_field_access_decl.  No longer static.
961         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
962
963 2004-12-03  Tom Tromey  <tromey@redhat.com>
964
965         * lang.c (flag_new_verifier): Define.
966         (java_post_options): Set flag_new_verifier if indirect dispatch
967         is being used.
968         * lang.opt (fnew-verifier): Removed.
969
970 2004-12-03  Tom Tromey  <tromey@redhat.com>
971
972         PR bootstrap/14614:
973         * Make-lang.in (java.install-common): Only install transformed
974         gcjh if gcj-cross exists.
975
976 2004-12-03  Andrew Haley  <aph@redhat.com>
977
978         PR java/18812
979         * except.c (link_handler): Patch 'outer' field of siblings of the
980         range we're demoting.
981
982 2004-12-03  Andrew Haley  <aph@redhat.com>
983
984         PR java/18697
985         * class.c (layout_class_method): Don't fail to override a method
986         simply because it has DECL_ARTIFICIAL set.
987
988 2004-12-02  Tom Tromey  <tromey@redhat.com>
989
990         PR java/16675:
991         * parse.y (craft_constructor): Special case null_pointer_node.
992
993 2004-12-02  Tom Tromey  <tromey@redhat.com>
994
995         PR java/18741:
996         * java-gimplify.c (java_gimplify_expr): Don't call
997         SET_EXPR_LOCATION unless wrapped tree is an expression.
998
999 2004-11-27  Per Bothner  <per@bothner.com>
1000
1001         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
1002         Fix fencepost error in 'i', which got executed one too many times.
1003         Also, fold memcpy into explicit loop, as originally intended.
1004         Also, free temporary 'buf' which otherwise leaks.
1005
1006 2004-11-27  Per Bothner  <per@bothner.com>
1007
1008         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
1009         local static variables if not USE_MAPPED_LOCATION.
1010
1011 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
1012
1013         * class.c, decl.c, expr.c: Fix comment typos.
1014
1015 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
1016
1017         PR java/18305
1018         * decl.c (end_java_method): Call
1019         attach_init_test_initialization_flags on all the init_decls.
1020         * parse.y (attach_init_test_initialization_flags): Move to ...
1021         * expr.c (attach_init_test_initialization_flags): here and
1022         support BIND_EXPR also.
1023         * java-tree.h (attach_init_test_initialization_flags): Prototype.
1024         * jcf-parse.c (parse_class_file): Don't disable class init
1025         optimization.
1026
1027 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1028
1029         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
1030         in diagnostics.
1031
1032 2004-11-24  Richard Henderson  <rth@redhat.com>
1033
1034         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
1035         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
1036
1037 2004-11-24  Tom Tromey  <tromey@redhat.com>
1038
1039         * verify.c (defer_merging): Don't use C++-style comment.
1040         * verify.h (java_opcode): Added java_opcode_end.
1041         * class.c (build_class_ref): Remove C++ comment and old FIXME.
1042
1043         * verify-impl.c (vfy_push_type): Removed bogus "return".
1044         (initialize_stack): Use vfy_alloc and vfy_free.
1045         (verify_instructions_0): Likewise.
1046
1047         * Merged gcj-abi-2-dev-branch to trunk.
1048
1049 2004-11-24  Andrew Haley  <aph@redhat.com>
1050
1051         * jcf-parse.c (parse_class_file): Set file_start_location.
1052
1053 2004-11-10  Tom Tromey  <tromey@redhat.com>
1054
1055         * class.c (make_field_value): Don't call build_static_field_ref.
1056         (build_static_field_ref): Don't emit direct references when using
1057         indirect dispatch.
1058
1059         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
1060         -verbose:class into man page synopsis.
1061
1062 2004-11-09  Tom Tromey  <tromey@redhat.com>
1063
1064         * expr.c (build_java_arraystore_check): Still generate check if
1065         element type is itself an array.
1066
1067 2004-11-08  Tom Tromey  <tromey@redhat.com>
1068
1069         * java-tree.h (soft_check_assignment_node): Removed.
1070         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
1071         * decl.c (java_init_decl_processing): Don't initialize
1072         soft_check_assignment_node.
1073
1074 2004-11-05  Tom Tromey  <tromey@redhat.com>
1075
1076         * class.c (layout_class_methods): Don't add Miranda methods when
1077         using indirect dispatch.
1078
1079 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
1080
1081         * class.c (make_class_data): Call emit_assertion_table to set the
1082         'assertion_table' field.
1083         (build_signature_for_libgcj): Move here from expr.c.
1084         (add_assertion_table_entry): New function. Callback for assertion
1085         hashtable traversal.
1086         (emit_assertion_table): New. Take class argument, and generate
1087         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
1088         * decl.c (init_decl_processing): Define assertion_entry_type record.
1089         Push 'assertion_table' class field instead of 'verify'.
1090         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
1091         (type_assertion_hash): Include 'assertion_code' in hash.
1092         (add_type_assertion): Rewritten. Take class and assertion_code
1093         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
1094         (can_widen_reference_to): Use new add_type_assertion() arguments.
1095         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
1096         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
1097         (verify_identifier_node): Removed.
1098         (assertion_entry_type, assertion_table_type): New.
1099         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
1100         assertion code definitions.
1101         (struct type_assertion): Add assertion_code. Rename 'source_type' and
1102         'target_type' to 'op1' and 'op2'.
1103         (add_type_assertion): Declare.
1104         (lang_printable_name_wls): Remove unused definition.
1105         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
1106         to emit runtime assertion.
1107         (vfy_note_stack_type): Clean up non-C90 declarations.
1108         (vfy_note_local_type): Likewise.
1109         * verify.h (vfy_is_assignable_from): Declare.
1110         * verify-impl.c (is_assignable_from_slow): Remove unused function.
1111         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
1112         instead of is_assignable_from_slow().
1113         (types_compatible): Reinstate ref_compatible() call.
1114
1115 2004-11-04  Tom Tromey  <tromey@redhat.com>
1116
1117         * class.c (build_static_field_ref): Reverted previous patch.
1118
1119         * class.c (build_static_field_ref): Don't emit direct references
1120         when using indirect dispatch.
1121
1122 2004-11-03  Tom Tromey  <tromey@redhat.com>
1123
1124         * expr.c (expand_java_arrayload): Set lhs_type_node.
1125         (expand_java_arraystore): Set rhs_type_node.
1126
1127 2004-11-02  Tom Tromey  <tromey@redhat.com>
1128
1129         * jcf-parse.c (compute_class_name): Use filename length from zip
1130         directory, not strlen.
1131
1132         * expr.c (expand_invoke): Mark new interface methods as abstract.
1133
1134 2004-11-01  Tom Tromey  <tromey@redhat.com>
1135
1136         * verify-impl.c (push_jump): Removed check for uninitialized
1137         objects.
1138         (push_exception_jump): Likewise.
1139         (handle_ret_insn): Likewise.
1140         (handle_jsr_insn): Likewise.
1141         (state_check_no_uninitialized_objects): Removed.
1142
1143         * decl.c (check_local_unnamed_variable): Recognize
1144         promoted-to-int parameters when using the new verifier.
1145         * expr.c (expand_java_arraystore): Explicitly request array type
1146         when using new verifier.
1147         (expand_java_arrayload): Likewise.
1148         (invoke_build_dtable): Don't pass object_type_node as
1149         expression argument to build_java_indirect_ref.
1150         (build_java_check_indexed_type): Do nothing.
1151         (build_java_arraystore_check): Handle case where array doesn't
1152         have array type.
1153         (build_java_array_length_access): Likewise.
1154         (expand_invoke): Handle case where interface overrides a method
1155         from Object.
1156         (pop_type_0): Always succeed for reference types.
1157         (process_jvm_instruction): Don't pop a value in a dead
1158         exception handler.
1159         (pop_arguments): Convert arguments to correct types.
1160
1161 2004-10-29  Andrew Haley  <aph@redhat.com>
1162
1163         * jcf-parse.c (give_name_to_class): Remove line that was
1164         incorrectly merged.
1165
1166 2004-10-29  Andrew Haley  <aph@redhat.com>
1167
1168         * jcf-parse.c (set_source_filename): Add code to build new sfname.
1169
1170 2004-10-20  Andrew Haley  <aph@redhat.com>
1171
1172         * decl.c (end_java_method): Don't expand if flag_syntax_only.
1173
1174 2004-10-26  Tom Tromey  <tromey@redhat.com>
1175
1176         * verify.h (vfy_notify_verified): Removed.
1177         * verify-glue.c (vfy_notify_verified): Removed.
1178
1179 2004-10-26  Tom Tromey  <tromey@redhat.com>
1180
1181         * verify-impl.c (debug_print_state): Declare `i' before code.
1182         (merge_types): Modify `t' when it is null_type.
1183
1184 2004-10-26  Tom Tromey  <tromey@redhat.com>
1185
1186         * verify-impl.c (type_print): Renamed from print.  Now static and
1187         takes an argument.
1188         (debug_print_state): Use type_print.
1189
1190 2004-10-25  Tom Tromey  <tromey@redhat.com>
1191
1192         * expr.c (build_invokeinterface): Compute correct offset for
1193         index into interface methods.
1194
1195 2004-10-20  Tom Tromey  <tromey@redhat.com>
1196
1197         * java-tree.h (verify_jvm_instructions_new): Declare.
1198
1199         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
1200         command line.
1201
1202         * verify-impl.c (verify_instructions): Correctly handle wide
1203         types on the stack.
1204         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
1205         (vfy_get_component_type): Strip pointer types.
1206         (vfy_find_class): Use get_type_from_signature.  Strip pointer
1207         types.
1208         Include java-except.h.
1209
1210 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
1211
1212         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
1213         vfy_push_type_t, set_variable, add_new_state, merge_into,
1214         handle_jsr_insn, branch_prepass, check_class_constant,
1215         check_wide_constant, get_one_type, compute_static_types,
1216         verify_instructions_0): Clean up C99 declarations after statements.
1217
1218 2004-10-20  Tom Tromey  <tromey@redhat.com>
1219
1220         * verify-impl.c (merge_refs): Compare reference against iterator,
1221         not ref2.
1222
1223         * verify-glue.c (vfy_tag): Mask off resolved flag.
1224
1225 2004-10-19  Tom Tromey  <tromey@redhat.com>
1226
1227         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
1228         (init_state_with_stack): Initialize `this_type' in state.
1229         (verify_method): Use debug_print.
1230         * verify-glue.c (vfy_is_primitive): Removed debugging print.
1231         (vfy_note_stack_depth): Reverted last patch.
1232         (vfy_note_stack_type): Note pointer to Object, not Object.
1233         (vfy_note_local_type): Likewise.
1234
1235         * verify.h (vfy_note_instruction_seen): Declare.
1236         * verify-glue.c (verify_jvm_instructions_new): Set
1237         BCODE_EXCEPTION_TARGET on target instruction.
1238         (vfy_note_instruction_seen): New function.
1239         * verify-impl.c (FLAG_INSN_SEEN): New define.
1240         (verify_instructions_0): Set flag on instruction.  Save state for
1241         PC=0 later.
1242         (verify_instructions): Call vfy_note_instruction_seen.
1243
1244         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
1245         (verify_jvm_instructions_new): Call method_init_exceptions,
1246         add_handler, and handle_nested_ranges.
1247         * verify-impl.c (verify_method): Return 1 on success.
1248         (verify_instructions_0): Save the state at PC=0.
1249
1250         * verify-impl.c (init_type_from_class): Set is_resolved and
1251         ref_next on new ref_intersection.
1252         (init_type_from_string): Likewise.
1253
1254 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
1255
1256         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
1257         if flag_new_verifier is set.
1258         * java-tree.h (flag_new_verifier): Declare.
1259         * lang.opt (fnew-verifier): New option.
1260         * verify-impl.c: Work around namespace pollution by undef'ing
1261         'current_class'.
1262         (struct verifier_context): Make 'bytecode' const.
1263         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
1264         (types_compatible): For the BC-ABI, always consider reference types
1265         compatible.
1266         (check_class_constant): Use vfr->current_class.
1267         (check_constant): Likewise.
1268         (check_wide_constant): Likewise.
1269         (check_field_constant): Check for 'L' at start of type name.
1270         (get_one_type): Return pointer instead of type. Set type result in
1271         caller via passed type pointer.
1272         (compute_argument_types): Update to use new get_one_type arguments.
1273         (compute_return_type): Likewise.
1274         (make_verifier_context): New. Allocate and initialize 'vfr'.
1275         (free_verifier_context): New. Free 'vfr' and its contents.
1276         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
1277         and free_verifier_context.
1278
1279 2004-10-15  Tom Tromey  <tromey@redhat.com>
1280
1281         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
1282         * verify.h (vfy_fail): Fixed formatting.
1283
1284         * verify-impl.c (vfr): Fixed comment formatting.
1285         (collapse_type): New function.
1286         (verify_instructions): Notify compiler about type map.
1287         * verify.h (vfy_note_stack_depth): Updated.
1288         (vfy_note_stack_type): Likewise.
1289         (vfy_note_local_type): Likewise.
1290         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
1291         Declare.
1292         * verify-glue.c (vfy_note_stack_depth): Correctly size type
1293         state.  Added `method' argument.
1294         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
1295         argument.
1296         (vfy_note_local_type): New function.
1297         (vfy_unsuitable_type): Likewise.
1298         (vfy_return_address_type): Likewise.
1299         (vfy_null_type): Likewise.
1300
1301         * verify.h (VFY_IN_GCC): Removed.
1302         (VFY_WANT_TYPEMAP): Removed.
1303         * verify-impl.c (verify_instructions_0): Removed useless "\".
1304         (struct state) <next>: Uncomment.
1305
1306 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
1307
1308         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
1309         C-style.
1310
1311 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
1312
1313         * Make-lang.in (verify.o): Re-enabled this target.
1314         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
1315         (vfy_get_interface): Likewise.
1316         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
1317         * verify.h (verify_jvm_instructions_new): Declare.
1318         * verify-impl.c (free_state): Temporarily comment out unused
1319         function.
1320
1321 2004-10-06  Tom Tromey  <tromey@redhat.com>
1322
1323         * java-tree.h (JV_STATE_READ): New enum value.
1324
1325 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
1326
1327         * verify.h: New file.
1328
1329 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
1330
1331         * verify-impl.c, verify-glue.c, verify.h: New files.
1332         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
1333
1334 2004-09-24  Andrew Haley  <aph@redhat.com>
1335
1336         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
1337         for a slot if it's of pointer type.
1338
1339 2004-09-14  Tom Tromey  <tromey@redhat.com>
1340
1341         * class.c (make_class_data): Correctly initialize "state" field.
1342         Initialize "engine" field.
1343         * decl.c (java_init_decl_processing): Add "engine" field.
1344
1345 2004-09-10  Andrew Haley  <aph@redhat.com>
1346
1347         PR java/12760
1348         * expr.c (build_invokeinterface): Use fast method for interface
1349         dispatch.
1350         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
1351         JTI_ITABLE_PTR_TYPE.
1352         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
1353         (emit_symbol_table): Add new arg, element_size.
1354         * decl.c (java_init_decl_processing): Initialize Class.itable.
1355         * class.c (GEN_TABLE): New macro.
1356         (gen_indirect_dispatch_tables): Use it.  Add itable.
1357         (make_class_data): Add new arg for emit_symbol_table().
1358         Emit itable.
1359         (add_miranda_methods): Make sure search_class has been parsed.
1360         (emit_symbol_table): Add new arg, element_size.
1361
1362 2004-09-06  Andrew Haley  <aph@redhat.com>
1363
1364         * verify.c (merge_types): Return Object for all merges of
1365         interfaces.
1366         * expr.c (add_type_assertion): Don't generate assertions when
1367         source type is array of Object.
1368
1369 2004-09-03  Andrew Haley  <aph@redhat.com>
1370
1371         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
1372
1373         * lang.c (java_post_options): Force flag_verify_invocations if
1374         we're not using indirect dispatch.
1375
1376         * expr.c (pop_type_0): Move test for interfaces before call to
1377         can_widen_reference_to().
1378         (build_signature_for_libgcj): Remove generation of canonical array
1379         type.
1380         (add_type_assertion): Canonicalize both arrays.
1381         Don't assert that type X can be assigned to Object.
1382         Don't assert that type X an be assigned to type X.
1383         Don't assert that Object can be assigned to type X.
1384         (can_widen_reference_to): Warn whenever we generate an assertion.
1385         (process_jvm_instruction): Use throwable_type_node for the type of
1386         an exception class.
1387
1388 2004-09-01  Andrew Haley  <aph@redhat.com>
1389
1390         * decl.c (java_init_decl_processing): Change
1391         verify_identifier_node to "__verify".
1392         * expr.c (add_type_assertion): Use verify_identifier_node for name.
1393         * java-tree.h (verify_identifier_node): Change to "__verify".
1394
1395         * expr.c (build_signature_for_libgcj): New function.
1396         (add_type_assertion): Use it to construct signatures for
1397         source_type and target_type.
1398
1399 2004-08-27  Andrew Haley  <aph@redhat.com>
1400
1401         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
1402         (verify_identifier_node): New.
1403         (TYPE_VERIFY_METHOD): New.
1404         (struct type_assertion): New type.
1405         * expr.c (type_assertion_eq): New function.
1406         (type_assertion_hash): New function.
1407         (add_type_assertion): New function.
1408         (can_widen_reference_to): Call add_type_assertion().
1409         * decl.c (java_init_decl_processing): Add verify_identifier_node.
1410         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
1411         (finish_class): Output TYPE_VERIFY_METHOD (type).
1412
1413         * decl.c (end_java_method): Nullify unused fields.
1414
1415 2004-08-17  Andrew Haley  <aph@redhat.com>
1416
1417         * verify.c (defer_merging): Quieten.
1418         * jcf-parse.c (load_class): Only try to open a class file if it's
1419         java.lang.Object or if it's part of the current compilation.
1420         Check that the class we just tried to load is the class we just
1421         loaded.  Quieten.
1422         (java_parse_file): Set flag_verify_invocations off if we're
1423         compiling from .class.
1424         (parse_zip_file_entries): Abort if we try to read a dummy class.
1425         * expr.c (can_widen_reference_to): Quieten.
1426         (build_invokevirtual): Abort if we try to invokevirtual an
1427         interface.
1428         (expand_invoke): Don't build a non-interface call to an interface.
1429         (build_instanceof): Don't do premature optimization if
1430         flag_verify_invocations is not set.
1431         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
1432         from superclass.
1433         (build_static_field_ref): Add correct type conversion for
1434         field_address.
1435         (add_miranda_methods): Disable generation of Miranda methods for
1436         dummy classes.
1437         (layout_class_method): Don't complain about non-static method
1438         overrides static method with dummy classes.
1439
1440 2004-08-13  Tom Tromey  <tromey@redhat.com>
1441
1442         * class.c (build_static_field_ref): Re-enable atable lookups for
1443         static fields.
1444
1445         * parse.y (strip_out_static_field_access_decl): Indentation fix.
1446
1447 2004-08-11  Tom Tromey  <tromey@redhat.com>
1448
1449         * gcj.texi (libgcj Runtime Properties): Document new properties.
1450
1451 2004-08-06  Andrew Haley  <aph@redhat.com>
1452
1453         * jcf-parse.c (load_class): Check that we really have loaded the
1454         class we're looking for.
1455
1456 2004-07-19  Andrew Haley  <aph@redhat.com>
1457
1458         * verify.c (verify_jvm_instructions): Comment change only.
1459
1460         * typeck.c (build_java_array_type): Add size field to array name.
1461
1462         * java-tree.h (LOCAL_SLOT_P): New.
1463         (update_aliases): Add PC argument.
1464         (pushdecl_function_level): New function.
1465
1466         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1467         MODIFY_EXPR, and SAVE_EXPR.
1468         (java_gimplify_modify_expr): New function.
1469
1470         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1471         (expand_iinc): Pass PC to update_aliases().
1472         (STORE_INTERNAL): Likewise.
1473         (process_jvm_instruction): Likewise.
1474
1475         * decl.c (base_decl_map): New variable.
1476         (uniq): New variable.
1477         (update_aliases): Rewrite with more thorough checking.
1478         (debug_variable_p): New function.
1479         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
1480         (check_local_named_variable): Delete whole function.
1481         (initialize_local_variable): New function.
1482         (check_local_unnamed_variable): Add checks and comments.
1483         (find_local_variable): Rewrite.
1484         (java_replace_reference): New function.
1485         (function_binding_level): New variable.
1486         (pushdecl_function_level): New function.
1487         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1488         (maybe_pushlevels): Call pushdecl() on each of the new decls.
1489         (start_java_method): Reset uniq.  Create base_decl_map.  Set
1490         function_binding_level.
1491         (end_java_method): Null unused fields to save memory.
1492
1493 2004-06-29  Andrew Haley  <aph@redhat.com>
1494
1495         * except.c (expand_start_java_handler): Push a new binding level.
1496         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
1497         register_exception_range() to register where we'll do it.
1498         (expand_end_java_handler): Remove old bogus code.  Replace with
1499         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1500         the top of the expression we're curently building.
1501         (maybe_end_try): Delete.
1502         * decl.c (binding_level.exception_range): New field.
1503         (clear_binding_level): Add field exception_range.  Reformat.
1504         (poplevel): Call expand_end_java_handler().
1505         (poplevel): Call java_add_stmt only if functionbody is false.
1506         (maybe_poplevels): Don't call maybe_end_try() from here.
1507         (end_java_method): Clear no longer used trees in function decl.
1508         (register_exception_range): New function.
1509         * java-tree.h (register_exception_range, struct eh_range): Declare.
1510
1511 2004-06-22  Andrew Haley  <aph@redhat.com>
1512
1513         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1514         the otable.
1515         * check-init.c (get_variable_decl): Teach check-init about
1516         FIELD_DECLs addressed via the otable.
1517         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1518         CLASS_PARSED_P.
1519
1520 2004-05-28  Andrew Haley  <aph@redhat.com>
1521
1522         * jcf-parse.c (load_class): Don't try to read a class that we've
1523         already read.
1524
1525         * expr.c (build_invokeinterface): Use the old-fashioned way of
1526         doing indirect dispatch: look up interfaces by name.
1527         * java-tree.h (enum java_tree_index): Add
1528         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1529         * decl.c (java_init_decl_processing): Add
1530         soft_lookupinterfacemethodbyname_node.
1531
1532         * gjavah.c (print_method_info): Final methods have vtable entries,
1533         so gjavah needs to output them.
1534         * class.c (layout_class_method): Generate vtable entries for final
1535         methods.
1536         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1537         dispatch, even if a method is final.
1538
1539 2004-05-25  Andrew Haley  <aph@redhat.com>
1540
1541         * class.c (build_symbol_entry): Convert the names of constructors
1542         to init_identifier_node when generating an entry for the indirect
1543         dispatch table.
1544
1545         * expr.c (build_known_method_ref): Generate indirect calls for
1546         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1547
1548 2004-05-24  Andrew Haley  <aph@redhat.com>
1549
1550         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1551         atable element is of the right type.
1552
1553         * class.c (build_static_field_ref): Cast pointer to correct type
1554         for field.
1555
1556 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1557
1558         * Merged with HEAD as of 20040514. Diff against
1559         gcj-abi-2-merge-20040514.
1560
1561 2004-04-16  Andrew Haley  <aph@redhat.com>
1562
1563         * verify.c (check_pending_block): Disable subroutine checks.
1564         (defer_merging): New function.
1565         (merge_types): If types are dummy, use defer_merging to combine them.
1566         (verify_jvm_instructions): If invocation is invokeinterface and
1567         target is dummy, assume target really is an interface.
1568
1569         * parse.y (patch_invoke): Break out call to java_create_object.
1570
1571         * lang.c (flag_verify_invocations): New.
1572
1573         * jcf-parse.c (load_class): If we've already failed to load a
1574         class, don't try again.
1575         (load_class): If we can't find a .class file, don't fail, but emit
1576         a warning.
1577         (parse_class_file): Don't act on dummy methods.
1578
1579         * java-tree.h (flag_verify_invocations): New.
1580         (TYPE_DUMMY): New.
1581         (lang_type.dummy_class): New field.
1582         (java_create_object): New function.
1583         (METHOD_DUMMY): New.
1584
1585         * expr.c (build_field_ref): Widen field offset.
1586         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1587         that each of its elements is compatible with the one we're
1588         popping.
1589         (pop_type_0): Issue a warning to say that we need to generate a
1590         runtime check.
1591         (java_create_object): New function.
1592         (build_field_ref): Only generate hard refs if we're not using
1593         indirect dispatch.
1594         (expand_java_field_op): If we're using !verify_invocations and we
1595         see a missing field, generate a decl for it.
1596
1597         (expand_invoke): If a class doesn't have the method we seek and
1598         we're using !flag_verify_invocations, generate a decl for the
1599         method now.
1600
1601         (build_known_method_ref): Always use indirect dispatch via the
1602         atable for static methods.
1603
1604         (expand_java_NEW): Break out object creation into new function,
1605         java_create_object.
1606
1607         (can_widen_reference_to): Issue a warning to say that we need to
1608         generate a runtime check.
1609
1610         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1611         (make_method_value): Also use index for interfaces.
1612         (make_class_data): Skip dummy field for inherited data.
1613         Don't build method array for dummy methods.
1614         Set size_in_byte to -1 when using inirect dispatch
1615         Don't build a hard class ref if we don't have a hard ref to our
1616         superclass, or if we're using inirect dispatch.
1617         Null out dispatch tables.
1618
1619         (layout_class_method): Don't complain about non-static method
1620         overrides static method is method is artificial.
1621
1622         (build_static_field_ref): Disable atable references to static
1623         fields for the time being.
1624
1625         (layout_class_methods): Check for CLASS_INTERFACE as
1626         well as CLASS_ABSTRACT.
1627
1628 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1629
1630         * class.c (make_class_data): Don't check flag_inline_functions.
1631         * lang.c (flag_really_inline): Remove unused flag.
1632         (java_handle_option): Don't set it here.  Remove special handling
1633         of flag_inline_functions for Java.
1634         (java_init): Don't set flag_inline_trees here.  Already done...
1635         (java_post_options): ...here.  Don't clear flag_inline_functions.
1636
1637 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1638
1639         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1640         (java_gimplify_exit_block_expr): New function.
1641         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1642         LABELED_BLOCK_EXPR.
1643         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1644         (EXIT_BLOCK_EXPR): Likewise.
1645         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1646         (LABELED_BLOCK_BODY): Likewise.
1647         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1648         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1649         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
1650         TREE_OPERAND.
1651         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1652         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1653         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
1654         second operand of EXIT_BLOCK_EXPR.
1655         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1656         TREE_OPERAND.
1657         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1658
1659 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1660
1661         * xref.h (xref_flag_value): Remove.
1662         (xref_set_data, xref_get_data): Likewise.
1663         (xref_set_current_fp): Likewise.
1664         (XREF_NONE): Likewise.
1665         (XREF_GET_DATA): Likewise.
1666         * xref.c (xref_flag_value): Remove.
1667         (xref_set_data, xref_get_data): Likewise.
1668         (xref_set_current_fp): Likewise.
1669
1670 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1671
1672         * gjavah.c (output_directory): Make static.
1673         (temp_directory): Likewise.
1674
1675 2004-11-15  Tom Tromey  <tromey@redhat.com>
1676
1677         * decl.c (instn_ptr_type_node): Removed.
1678         (lineNumbers_ptr_type_node): Removed.
1679         (jint_type): Removed.
1680         (jint_ptr_type): Removed.
1681
1682 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
1683
1684         PR java/15576
1685         * check-init.c (check_init): Ignore DECL_EXPR.
1686         * expr.c (always_initialize_class_p): Reenable.
1687         (build_class_init): Use a variable to store the decl.  Also use
1688         boolean_false_node instead of integer_zero_node.
1689         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1690         to the block.
1691
1692 2004-11-08  Tom Tromey  <tromey@redhat.com>
1693
1694         PR java/16843:
1695         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1696         generating a JNI header.
1697         (print_field_info): Handle JNI headers.
1698         (jni_print_float): Likewise.
1699         (jni_print_double): Likewise.
1700
1701 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
1702
1703         * decl.c (end_java_method): Remove duplicated code.
1704
1705 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
1706             Gerald Pfeifer  <gerald@pfeifer.com>
1707
1708         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1709         as well.
1710
1711 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
1712
1713         PR java/17265
1714         * class.c: Reinstate 2004-08-18 patch.
1715         (make_local_function_alias): Don't create an alias for extern (native)
1716         functions.
1717
1718 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
1719
1720         PR java/17265
1721         * class.c (make_local_function_alias): Revert 2004-08-18 change.
1722         (make_method_value): Likewise.
1723
1724 2004-10-21  Andrew Haley  <aph@redhat.com>
1725
1726         PR java/18091:
1727         * jcf-parse.c (set_source_filename): Add code to build new sfname.
1728
1729 2004-10-20  Andrew Haley  <aph@redhat.com>
1730
1731         * decl.c (end_java_method): Don't expand if flag_syntax_only.
1732         Remove duplicated code block.
1733
1734 2004-10-18  Steven Bosscher  <stevenb@suse.de>
1735
1736         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1737         New rules to work around old Bison warnings.
1738
1739 2004-10-17  Steven Bosscher  <stevenb@suse.de>
1740
1741         * class.c (ident_subst): Always alloca buffer.
1742         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1743         opcode after including javaop.def.
1744         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1745         conditional expression that exits, to avoid warnings.
1746         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1747         a user of an extension.
1748         * win32-host.c: Move check down to have non-empty file when
1749         WIN32 is not defined.
1750
1751         * Make-lang.in (java-warn): Add STRICT_WARN.
1752         (java/jcf-io.o-warn): Don't have Werror for this file.
1753         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1754
1755 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
1756
1757         * expr.c (expr_add_location): Move declaration to before all
1758         statements.
1759         * parse.y (java_expand_classes): Ditto.
1760         * lex.c (java_peek_unicode): Ditto.
1761
1762 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
1763
1764         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1765         if possible, else convert `foo' to 'foo'.
1766         * class.c: Likewise.
1767         * decl.c: Likewise.
1768         * expr.c: Likewise.
1769         * jcf-io.c: Likewise.
1770         * jcf-parse.c: Likewise.
1771         * lang.c: Likewise.
1772         * lex.c: Likewise.
1773         * parse.h: Likewise.
1774
1775 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
1776
1777         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1778         rename parameter 'msg' to 'msgid' in function declaration.
1779         (issue_warning_error_from_context): Likewise.
1780         (yyerror): Rename parameter 'msg' to 'msgid'.
1781         (all over): Use new quoting style for diagnostics.
1782
1783 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1784
1785         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1786         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1787         Update copyright.
1788
1789 2004-10-14  Matt Austern  <austern@apple.com>
1790
1791         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1792         pointer_set_t* now.
1793
1794 2004-10-13  Tom Tromey  <tromey@redhat.com>
1795
1796         PR java/15578:
1797         * lang.opt (--extdirs): Document.
1798         * jvspec.c (lang_specific_driver): Recognize -encoding and
1799         -extdirs.
1800
1801 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
1802
1803         * parse.y (issue_warning_error_from_context): Use va_list *
1804         instead of va_list parameter.
1805         (parse_error_context): Update call.
1806         (parse_warning_context): Likewise.
1807
1808 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
1809
1810         * parse.y, parse-scan.y: Add list of diagnostic messages to
1811         insulate translation template from version of yacc/bison used
1812         to compile the grammar.
1813
1814 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
1815
1816         Prepare for %q, %< and %> in diagnostic message strings.
1817         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1818         Name second parameter 'msgid'.
1819         * parse.y: Additionally include pretty-print.h and diagnostic.h.
1820         (issue_warning_error_from_context): Use pretty-printer functions
1821         instead of vsprintf for constructing formatted messages. Rename
1822         parameter 'msg' to 'msgid'.
1823         (parse_error_context): Rename parameter 'msg' to 'msgid'.
1824         (parse_warning_context): Likewise.
1825
1826 2004-10-05  Andrew Haley  <aph@redhat.com>
1827
1828         PR java/17779
1829         * jcf-parse.c (parse_zip_file_entries): If a class has a
1830         superclass and a TYPE_SIZE of zero, lay it out.
1831
1832 2004-09-30  Andrew Haley  <aph@redhat.com>
1833
1834         PR java/17733
1835         * jcf-parse.c (compute_class_name): Rewrite.
1836
1837 2004-10-01  Jan Hubicka  <jh@suse.cz>
1838
1839         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1840
1841 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
1842
1843         * lex.c: Fix a comment typo.
1844
1845 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
1846
1847         * java-tree.h: Fix a comment typo.
1848
1849 2004-09-30  Per Bothner  <per@bothner.com>
1850
1851         Simplify lexer.  Implement --enable-mapped-location support.
1852         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
1853         (parse_source_file_1): Pass filename as extra parameter, so we can call
1854         linemap_add and set input_location here, rather than in both callers.
1855         (read_class): Pass copied filename to parse_source_file_1.
1856         Don't initialize wfl_operator - only needed for source compilation.
1857         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
1858         * lex.h:  Remove a bunch of debugging macros.
1859         * lex.h (struct_java_line, struct java_error):  Remove types.
1860         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
1861         (struct java_lc_s):  Remove prev_col field.
1862         (struct java_lexer):  New fields next_unicode, next_columns, and
1863         avail_unicode.  New position field, and maybe token_start field.
1864         Don't need hit_eof field - use next_unicode == -1 instead.
1865         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
1866         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
1867         * parse.h:  Various changes for USE_MAPPED_LOCATION.
1868         (EXPR_WFL_EMIT_LINE_NOTE): XXX
1869         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1870         (struct parser_ctxt):  New file_start_location field.
1871         Remove p_line, c_line fields since we no longer save lines.
1872         Remove elc, lineno, and current_jcf fields - no longer used.
1873         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
1874         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1875         source_location and is probably not needed anymore anyway.
1876         Use new expr_add_Location function.
1877         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
1878         (java_pop_parser_context):  Minor cleanup.
1879         (java_parser_context_save_global, java_parser_context_restore_global,
1880         java_pop_parser_context):  Save/restore input_location as a unit.
1881         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
1882         a source_location instead of a wfl context node.
1883         (check_class_interface_creation):  input_filename is not addressable.
1884         (create_artificial_method):  Calling java_parser_context_save_global
1885         and java_parser_context_restore_global is overkill.  Instead,
1886         temporarily set input_location from class decl.
1887         (java_layout_seen_class_methods): Set input_location from method decl.
1888         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1889         (finish_loop_body):  Likewise.
1890         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
1891         (java_sprint_unicode):  Take a character, not index in line.
1892         (java_sneak_uncode):  Replaced by java_peek_unicode.
1893         (java_unget_unicode):  No longer used.
1894         (java_allocate_new_line. java_store_unicode):  Removed, since we
1895         no longer remember "lines".
1896         (java_new_lexer):  Update for new data structures.
1897         (java_read_char):  Move unget_value checking to java_read_unicode.
1898         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1899         efficient functions that are used directly when lexing.
1900         (java_read_unicode_collapsing_terminators):  No longer needed.
1901         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1902         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1903         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
1904         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
1905         combine switch branches, and test for common token kinds earlier.
1906         (java_lex_error):  Rewrite.
1907         * jv-scan.c (expand_location): New function, copied from tree.c.
1908         (main): Set ctxp->filename instead of setting input_filename directly.
1909
1910 2004-09-30  Per Bothner  <per@bothner.com>
1911
1912         More cleanup for --enable-mapped-location.
1913         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
1914         input_location here.  Instead do it in give_name_to_class.
1915         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1916         * expr.c (expand_byte_code): Call linemap_line_start.
1917         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
1918         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
1919         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
1920         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
1921         to USE_MAPPED_LOCATION case.
1922
1923         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
1924         * jcf-parse.c (java_parse_file): Don't set input_filename.
1925         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1926         Create a list of TRANSLATION_UNIT_DECL.
1927         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
1928         reason is so we can set a DECL_SOURCE_LOCATION for each file.
1929         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1930         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1931         (file_start_location):  New static.
1932         (set_source_filename):  Avoid extra access to input_filename macro.
1933         Concatenate new name with class's package prefix.
1934         (set_source_filename, give_name_to_class): Update.
1935         (give_name_to_class):  Set class's "line 0" input_location here.
1936         (parse_class_file):  Set input_location as a unit.
1937
1938         * jcf-parse.c (load_class): Sanity test if missing inner class file.
1939
1940 2004-09-29  Per Bothner  <per@bothner.com>
1941
1942         * java-tree.h:  Redefine some macros and add some declaration
1943         to handle the USE_MAPPED_LOCATION case.
1944         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
1945         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
1946         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1947         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1948
1949         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1950         * decl.c (finish_method, java_add_stmt): Likewise.
1951         * java-gimplify.c (java-gimplify.c):  Likewise.
1952         * jcf-write.c (generate_bytecode_insns):  Likewise.
1953         * lang.c (java_post_options): Likewise - call linemap_add.
1954
1955 2004-09-29  Andrew Haley  <aph@redhat.com>
1956
1957         PR java/17007
1958         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1959         result of TRUNC_MOD_EXPR.
1960         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1961         * decl.c (java_init_decl_processing): Mark
1962         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1963
1964 2004-09-28  Tom Tromey  <tromey@redhat.com>
1965
1966         PR java/15710:
1967         * class.c (add_miranda_methods): Load superinterface if not
1968         already loaded.
1969
1970 2004-09-28  Andrew Haley  <aph@redhat.com>
1971
1972         PR java/17586
1973         * jcf-parse.c (load_class): Don't try to read a class that we've
1974         already read.
1975
1976 2004-09-28  Andrew Haley  <aph@redhat.com>
1977
1978         * jcf-parse.c (load_class): Back out previous broken patch.
1979
1980 2004-09-28  Andrew Haley  <aph@redhat.com>
1981
1982         PR java/17586
1983         * jcf-parse.c (load_class): Don't try to read a class that we've
1984         already read.
1985         Check that we really did read the right class.
1986
1987 2004-09-25  Tom Tromey  <tromey@redhat.com>
1988
1989         PR java/17500:
1990         * parse.y (create_artificial_method): Use add_method_1.
1991
1992 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
1993
1994         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1995         comment typos.
1996         * gcj.texi: Fix typos.
1997
1998 2004-09-24  Tom Tromey  <tromey@redhat.com>
1999
2000         PR java/15656:
2001         * parse.y (class_instance_creation_expression): Set `$$' to NULL
2002         in error parts of rule.
2003         (unary_expression): Don't call error_if_numeric_overflow when $1
2004         is NULL.
2005
2006 2004-09-24  Tom Tromey  <tromey@redhat.com>
2007
2008         PR java/16789:
2009         * parse.y (resolve_qualified_expression_name): Set
2010         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
2011         * expr.c (force_evaluation_order): Check for empty argument list
2012         after stripping COMPOUND_EXPR.
2013
2014 2004-09-23  Andrew Haley  <aph@redhat.com>
2015
2016         PR java/16927:
2017         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
2018         COND_EXPRs.
2019
2020 2004-09-23  Tom Tromey  <tromey@redhat.com>
2021
2022         PR java/17329:
2023         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
2024         where operand is null.
2025
2026 2004-09-23  Tom Tromey  <tromey@redhat.com>
2027
2028         PR java/17380:
2029         * parse.y (not_accessible_p): Allow access to protected members
2030         even when class is not static.
2031
2032 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
2033
2034         * Make-lang.in: Revert the gcc-none.o change.
2035
2036 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
2037
2038         * parse.y (patch_anonymous_class): VEC_space returns true if there
2039         is space.
2040
2041 2004-09-21  Matt Austern  <austern@apple.com>
2042
2043         Fix bootstrap.
2044         * gjavah.c (free_method_name_list): Fix function definition so
2045         it's a proper C prototype.
2046
2047 2004-09-21  Tom Tromey  <tromey@redhat.com>
2048
2049         PR java/17575:
2050         * gjavah.c (free_method_name_list): New method.
2051         (main): Call it.
2052
2053 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2054             Zack Weinberg  <zack@codesourcery.com>
2055
2056         * java-tree.def: Use tree_code_class enumeration constants
2057         instead of code letters.
2058         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
2059         new tree-class enumeration constants.
2060
2061 2004-09-13  Tom Tromey  <tromey@redhat.com>
2062
2063         PR java/17216:
2064         * class.c (layout_class_method): Put synthetic methods into the
2065         vtable.
2066
2067 2004-09-11  Andrew Pinski  <apinski@apple.com>
2068
2069         * Make-lang.in (java/ggc-none.c): Change dependency
2070         for ggc.h into $(GGC_H).
2071
2072 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
2073
2074         * Make-lang.in (java/win32-host.o): Add dependency on
2075         coretypes.h.
2076         * win32-host.c: Add includes for coretypes.h, jcf.h
2077
2078 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
2079
2080         * Make-lang.in (GCJH_OBJS): Change dependency from
2081         ggc-none.o to java/ggc-none.o
2082         (JCFDUMP_OBJS): Likewise.
2083         (java/ggc-none.o): New target.
2084
2085 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2086
2087         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
2088         * class.c (build_utf8_ref, build_static_field_ref,
2089         make_field_value, make_method_value, get_dispatch_table,
2090         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2091         * constants.c (get_tag_node, build_ref_from_constant_pool,
2092         build_constants_constructor): Likewise.
2093         * decl.c (java_init_decl_processing): Likewise.
2094         * expr.c (build_java_array_length_access, build_newarray,
2095         expand_java_multianewarray, expand_java_pushc, expand_iinc,
2096         build_java_binop, build_field_ref, expand_java_add_case,
2097         expand_java_call, build_known_method_ref, build_invokevirtual,
2098         build_invokeinterface, build_jni_stub): Likewise.
2099         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2100         * jcf-parse.c (get_constant): Likewise.
2101         * lex.c (do_java_lex): Likewise.
2102         * parse.y (patch_binop, patch_unaryop, patch_cast,
2103         build_newarray_node, patch_newarray): Likewise.
2104         * resource.c (compile_resource_data): Likewise.
2105         * typeck.c (build_prim_array_type): Likewise.
2106
2107 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2108
2109         * decl.c (java_init_decl_processing): Adjust
2110         initialize_sizetypes call.
2111
2112 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
2113
2114         * jv-scan.c (fancy_abort): Add.
2115
2116 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
2117
2118         * expr.c (build_java_arrayaccess): Use convert to change
2119         len's type.
2120
2121 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
2122
2123         * class.c (make_local_function_alias): Allocate extra space for 'L'
2124         in name buffer. Reported by Thomas Neumann.
2125
2126 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2127
2128         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
2129         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
2130         * lex.c (do_java_lex): Adjust.
2131         (error_if_numeric_overflow): Likewise.
2132
2133 2004-08-18  Andrew Pinski  <apinski@apple.com>
2134
2135         * class.c (make_local_function_alias): Only make a new decl if we
2136         support alias attribute on all decls.
2137
2138 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
2139
2140         * class.c (make_local_function_alias): New function. Create local
2141         alias for public method DECL.
2142         (make_method_value): Use make_local_function_alias.
2143         * parse.y (craft_constructor): Don't special-case anonymous classes.
2144         Always set ctor_name to init_identifier_node.
2145         (lookup_method_invoke): Call layout_class_method when creating
2146         anonymous class constructor.
2147
2148 2004-08-18  Richard Henderson  <rth@redhat.com>
2149
2150         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
2151         default case.  Treat '<' similarly.  Update for
2152         is_gimple_formal_tmp_var name change.
2153
2154 2004-08-17  Andrew Haley  <aph@redhat.com>
2155
2156         * lang.c (lang_printable_name): Obey verbose flag.
2157         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
2158         lang_printable_name().
2159         (verify_constructor_circularity, get_printable_method_name,
2160         check_abstract_method_definitions, java_check_regular_methods,
2161         java_check_abstract_methods, check_inner_class_access,
2162         fix_constructors, patch_method_invocation, patch_return):
2163         Likewise.
2164         * expr.c (pop_type_0): Likewise.
2165
2166         * java-tree.h (lang_printable_name_wls): Delete.
2167
2168 2004-08-16  Tom Tromey  <tromey@redhat.com>
2169
2170         PR java/8473:
2171         * parse.y (primary): Changed for initialized and uninitialized
2172         array creations.
2173         (array_access): Handle array_creation_initialized.
2174         (array_creation_expression): Split into
2175         array_creation_initialized and array_creation_uninitialized.
2176
2177 2004-08-16  Andrew Haley  <aph@redhat.com>
2178
2179         * jcf-write.c (find_constant_index): Canonicalize NaNs when
2180         generating bytecode.
2181
2182 2004-08-16  Elliot Lee <sopwith@redhat.com>
2183
2184         PR java/9677
2185         * jcf-parse.c (java_parse_file): Handle filenames with embedded
2186         spaces, and quoted filelists.
2187
2188 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2189
2190         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
2191         * class.c (build_utf8_ref, build_static_field_ref,
2192         make_field_value, make_method_value, get_dispatch_table,
2193         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2194         * constants.c (get_tag_node,  build_ref_from_constant_pool,
2195         build_constants_constructor): Likewise.
2196         * decl.c (java_init_decl_processing): Likewise.
2197         * expr.c (build_java_array_length_access, build_newarray,
2198         expand_java_multianewarray, expand_java_pushc, expand_iinc,
2199         build_java_binop, build_field_ref, expand_java_add_case,
2200         expand_java_call, build_known_method_ref, build_invokevirtual,
2201         build_invokeinterface, build_jni_stub): Likewise.
2202         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2203         * jcf-parse.c (get_constant): Likewise.
2204         * lex.c (do_java_lex): Likewise.
2205         * parse.y (patch_binop, patch_unaryop, patch_cast,
2206         build_null_of_type, patch_newarray): Likewise.
2207         * resource.c (compile_resource_data): Likewise.
2208         * typeck.c (build_prim_array_type): Likewise.
2209
2210 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
2211
2212         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
2213         Don't create BLOCK here or call java_gimplify_block.
2214
2215 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
2216
2217         * java-tree.h (flag_deprecated): Removed.
2218         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
2219         * parse.y (check_deprecation): Check warn_deprecated instead of
2220         flag_deprecated.
2221
2222 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
2223
2224         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
2225         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
2226         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
2227         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
2228         flag_force_classes_archive_check, flag_optimize_sci,
2229         flag_indirect_dispatch): Remove explicit declarations.
2230         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
2231         final comment.
2232
2233 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
2234
2235         PR bootstrap/14893
2236         * Make-lang.in (java.install-man): Install from either build
2237         tree or source tree, whichever has the file first.
2238
2239 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
2240
2241         * jcf-parse.c (get_constant): Adjust force_fit_type call.
2242         * lex.h (SET_LVAL_NODE_TYPE): Remove.
2243         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
2244         (do_java_lex): Likewise. Adjust force_fit_type call.
2245
2246 2004-08-04  Roger Sayle  <roger@eyesopen.com>
2247             Andrew Haley  <aph@redhat.com>
2248
2249         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
2250         checking trees as they're being built.
2251         (convert): Call convert_ieee_real_to_integer if we're
2252         converting a constant, even if we're writing a class file.
2253
2254 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
2255
2256         PR java/16701
2257         * parse.y (fold_constant_for_init): Call resolve_field_access with
2258         correct current_class context.
2259
2260 2004-08-01  Roger Sayle  <roger@eyesopen.com>
2261
2262         * decl.c (update_aliases, initialize_local_variable): Replace calls
2263         to build with calls to buildN.
2264         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
2265         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
2266         * parse.h (BUILD_THROW): Likewise.
2267         * parse.y (switch_expression, synchronized_statement,
2268         catch_clause_parameter, array_creation_expression,
2269         conditional_expression, make_qualified_name,
2270         resolve_qualified_expression_name, patch_method_invocation,
2271         patch_invoke, build_method_invocation, build_new_invocation,
2272         build_assignment, patch_assignment, build_binop, patch_binop,
2273         build_string_concatenation, build_incdec, patch_unaryop,
2274         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
2275         patch_return, build_if_else_statement, build_labeled_block,
2276         build_new_loop, build_loop_body, build_bc_statement,
2277         build_assertion, encapsulate_with_try_catch, build_try_statement,
2278         build_try_finally_statement, patch_synchronized_statement,
2279         emit_test_initialization): Likewise, replace build with buildN.
2280
2281 2004-07-28  Eric Christopher  <echristo@redhat.com>
2282
2283         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2284         (java_unsafe_for_reeval): Ditto.
2285
2286 2004-07-26    <hp@bitrange.com>
2287
2288         * parse.y (build_super_invocation): Adjust declaration order to
2289         avoid declaration after statement.
2290
2291 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
2292
2293         * decl.c: Rename all identifiers named `class' to `cl'.
2294
2295 2004-07-25  Richard Henderson  <rth@redhat.com>
2296
2297         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
2298
2299 2004-07-23  Mike Stump  <mrs@apple.com>
2300
2301         * boehm.c (set_bit): Improve type safety wrt unsignedness.
2302         * gjavah.c (throwable_p, decode_signature_piece,
2303         print_full_cxx_name, print_include, add_namelet, add_class_decl,
2304         process_file): Likewise.
2305         * jcf-dump.c (main): Likewise.
2306         * jcf-io.c (read_zip_member): Likewise.
2307         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
2308         give_name_to_class, get_class_constant): Likewise.
2309         * jcf-write.c (find_constant_wide, push_long_const,
2310         generate_classfile): Likewise.
2311         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
2312         * parse.y (read_import_dir): Likewise.
2313         * typeck.c (parse_signature_type): Likewise.
2314         * verify.c (verify_jvm_instructions): Likewise.
2315         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
2316
2317 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2318
2319         * Make-lang.in: Replace rmic and rmiregistry references with
2320         grmic and grmiregistry.
2321         * gcj.texi: Likewise.
2322
2323 2004-07-20  Andrew Haley  <aph@redhat.com>
2324
2325         PR java/16431.
2326         * verify.c (verify_jvm_instructions): Comment change only.
2327
2328         * typeck.c (build_java_array_type): Add size field to array name.
2329
2330         * java-tree.h (LOCAL_SLOT_P): New.
2331         (update_aliases): Add PC argument.
2332         (pushdecl_function_level): New function.
2333
2334         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2335         MODIFY_EXPR, and SAVE_EXPR.
2336         (java_gimplify_modify_expr): New function.
2337
2338         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2339         (expand_iinc): Pass PC to update_aliases().
2340         (STORE_INTERNAL): Likewise.
2341         (process_jvm_instruction): Likewise.
2342
2343         * decl.c (base_decl_map): New variable.
2344         (uniq): New variable.
2345         (update_aliases): Rewrite with more thorough checking.
2346         (debug_variable_p): New function.
2347         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
2348         (check_local_named_variable): Delete whole function.
2349         (initialize_local_variable): New function.
2350         (check_local_unnamed_variable): Add checks and comments.
2351         (find_local_variable): Rewrite.
2352         (java_replace_reference): New function.
2353         (function_binding_level): New variable.
2354         (pushdecl_function_level): New function.
2355         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2356         (maybe_pushlevels): Call pushdecl() on each of the new decls.
2357         (start_java_method): Reset uniq.  Create base_decl_map.  Set
2358         function_binding_level.
2359         (end_java_method): Null unused fields to save memory.
2360
2361 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2362
2363         * class.c (add_interface_do): Remove.
2364         (set_super_info, interface_of_p, maybe_add_interface,
2365         add_interface, make_class_data, layout_class,
2366         add_miranda_methods): Adjust BINFO accessors and addition.
2367         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
2368         accessors.
2369         * jcf-write.c (generate_classfile): Likewise.
2370         * parse.y (patch_anonymous_class, check_inner_circular_reference,
2371         check_circular_reference, java_complete_class,
2372         check_abstract_method_definitions,
2373         java_check_abstract_method_definitions,
2374         check_interface_throws_clauses, java_check_abstract_methods,
2375         lookup_java_interface_method2,
2376         find_applicable_accessible_methods_list): Adjust BINFO accessors
2377         and addition.
2378         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2379
2380 2004-07-18  Roger Sayle  <roger@eyesopen.com>
2381
2382         * builtins.c (max_builtin, min_builtin,
2383         java_build_function_call_expr): Replace calls to build with buildN.
2384         * class.c (build_class_ref, build_static_field_ref,
2385         get_dispatch_table, make_class_data, layout_class_method): Likewise.
2386         * constants.c (build_ref_from_constant_pool): Likewise.
2387         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
2388         add_stmt_to_compound): Likewise.
2389         * except.c (build_exception_object_ref, expand_end_java_handler):
2390         Likewise.
2391         * java-gimplify.c (java_gimplify_case_expr,
2392         java_gimplify_default_expr, java_gimplify_block,
2393         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
2394         * jcf-write.c (generate_bytecode_insns): Likewise.
2395         * typeck.c (convert_ieee_real_to_integer): Likewise.
2396
2397 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
2398
2399         * java-tree.h (builtin_function): Declare.
2400
2401 2004-07-16  Steven Bosscher  <stevenb@suse.de>
2402
2403         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
2404         abuse restore_line_number_status.
2405
2406 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
2407
2408         g++/15861
2409         * jcf-parse.c (java_emit_static_constructor): Specify default
2410         priority.
2411
2412 2004-07-13  Per Bothner  <per@bothner.com>
2413
2414         * java-tree.h (all_class_filename):  Remove useless macro.
2415         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
2416         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
2417         * parse.y (java_parser_context_restore_global):  Replace
2418         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
2419         * jcf-parse.c (read_class, java_parse_file):  Likewise.
2420
2421 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2422
2423         PR java/16474
2424         gjavah.c (print_field_info): Emit constant only if field is static.
2425
2426 2004-07-11  Roger Sayle  <roger@eyesopen.com>
2427
2428         * expr.c (java_truthvalue_conversion, flush_quick_stack,
2429         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
2430         build_java_ret, build_java_throw_out_of_bounds_exception,
2431         build_java_array_length_access, java_check_reference,
2432         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
2433         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
2434         expand_java_arrayload, build_java_monitor, expand_java_return,
2435         expand_load_internal, expand_java_NEW, build_get_class,
2436         build_instanceof, expand_java_CHECKCAST, expand_iinc,
2437         build_java_soft_divmod, build_java_binop, build_field_ref,
2438         expand_compare, expand_java_goto, expand_java_switch,
2439         expand_java_add_case, build_class_init, build_known_method_ref,
2440         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
2441         expand_invoke, build_jni_stub, expand_java_field_op,
2442         java_expand_expr, expand_byte_code, STORE_INTERNAL,
2443         force_evaluation_order, emit_init_test_initialization): Convert
2444         calls to "build" into calls to the prefered "buildN" functions.
2445
2446 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
2447
2448         * java-tree.h (set_block): Remove.
2449         * lang.c (java_clear_binding_stack): New.
2450         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2451         * decl.c (struct binding_level): Remove this_block.
2452         (clear_binding_level): Likewise.
2453         (poplevel): Don't handle this_block.
2454         (set_block): Remove.
2455
2456 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
2457
2458         * class.c (common_enclosing_context_p): Remove statement with no
2459         side-effects.
2460
2461 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
2462
2463         PR java/8618
2464         * parse.y (create_anonymous_class): Remove 'location' argument. Use
2465         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
2466         (craft_constructor): Inherit access flags for implicit constructor
2467         from the enclosing class.
2468         (create_class): Fix comment typo.
2469         (resolve_qualified_expression_name): Pass type of qualifier to
2470         not_accessible_p, not the type in which target field was found.
2471         (not_accessible_p): Handle inner classes. Expand protected
2472         qualifier-subtype check to enclosing instances, but don't apply this
2473         check to static members. Allow protected access to inner classes
2474         of a subtype. Allow private access within common enclosing context.
2475         (build_super_invocation): Get WFL line number info from current
2476         class decl.
2477         (build_incomplete_class_ref): Update for new create_anonymous_class
2478         signature.
2479         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
2480         common_enclosing_instance_p.
2481         * class.c (common_enclosing_context_p): New. Determine if types
2482         share a common enclosing context, even across static contexts.
2483         (common_enclosing_instance_p): Renamed from
2484         common_enclosing_context_p. Determines if types share a common
2485         non-static enclosing instance.
2486         * java-tree.h (common_enclosing_instance_p): Declare.
2487         * jcf-write.c (get_method_access_flags): New. Surpress private flag
2488         for inner class constructors.
2489         (generate_classfile): Use get_method_access_flags.
2490
2491 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
2492
2493         * class.c (interface_of_p): Check for null TYPE_BINFO.
2494
2495 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2496
2497         * class.c (make_class): Do not create binfo here.
2498         (set_super_info): Create it here.
2499         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2500
2501 2004-07-08  Richard Henderson  <rth@redhat.com>
2502
2503         * expr.c (case_identity, get_primitive_array_vtable,
2504         java_expand_expr, emit_init_test_initialization): Remove.
2505         * java-tree.h (java_expand_expr): Remove.
2506         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2507
2508 2004-07-07  Per Bothner  <per@bothner.com>
2509
2510         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
2511         get internal error due to mismatched types.
2512
2513         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
2514
2515         * gcj.texi (Linking):   New node.  Document -lgij usage.
2516
2517 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2518
2519         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2520         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2521         * java/class.c (set_super_info, class_depth, interface_of_p,
2522         maybe_add_interface, add_interface, make_class_data,
2523         layout_class, add_miranda_methods): Adjust BINFO macros.
2524         * expr.c (can_widen_reference_to, lookup_field): Likewise.
2525         * jcf-write.c (generate_classfile): Likewise.
2526         * parse.y (patch_anonymous_class,
2527         check_inner_circular_reference, check_circular_reference,
2528         java_complete_class, check_abstract_method_definitions,
2529         java_check_abstract_method_definitions,
2530         check_interface_throws_clauses, java_check_abstract_methods,
2531         lookup_java_interface_method2,
2532         find_applicable_accessible_methods_list): Likewise.
2533         * typeck.c (find_method_in_interface): Likewise.
2534         * verify.c (merge_types): Likewise.
2535
2536 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2537
2538         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2539         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2540
2541 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2542
2543         * class.c (make_class): Use make_tree_binfo.
2544         (set_super_info, add_interface_do): Likewise.
2545         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2546
2547 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
2548
2549         * verify.c: Correct array element access formatting thinko.
2550
2551 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
2552
2553         * verify.c: Insert a short blurb at the start referring to the JVMS.
2554         (merge_type_state): Remove redundant nested if statement.
2555         (verify_jvm_instructions): Ensure current_subr is initialised to
2556         NULL_TREE.
2557         Minor formatting fixes all over the place.
2558
2559 2004-07-02  Richard Henderson  <rth@redhat.com>
2560
2561         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2562
2563 2004-07-01  Richard Henderson  <rth@redhat.com>
2564
2565         * class.c (registerClass_libfunc): Remove.
2566         (init_class_processing): Don't set it.
2567         (emit_register_classes): Take list_p parameter.  Fill it in
2568         with _Jv_RegisterClass calls.
2569         * decl.c (java_init_decl_processing): Don't call
2570         init_resource_processing.
2571         * jcf-parse.c (java_emit_static_constructor): New.
2572         (java_parse_file): Call it.
2573         * resource.c (registerResource_libfunc): Remove.
2574         (init_resource_processing): Remove.
2575         (write_resource_constructor): Take list_p parameter.  Fill it in
2576         with _Jv_RegisterResource calls.
2577         * java-tree.h: Update prototypes.
2578
2579 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
2580
2581         PR java/1262
2582         * class.c (layout_class_method): Do not override package-private
2583         method if its in a different package.
2584         (split_qualified_name): Move here from parse.y. Rename from
2585         breakdown_qualified. Add comment.
2586         (in_same_package): Move here from parse.y. Add comment.
2587         * java-tree.h (break_down_qualified, in_same_package): Declare.
2588         (in_same_package): Likewise.
2589         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2590         Callers updated.
2591
2592 2004-06-29  Andrew Haley  <aph@redhat.com>
2593
2594         * except.c (expand_start_java_handler): Push a new binding level.
2595         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
2596         register_exception_range() to register where we'll do it.
2597         (expand_end_java_handler): Remove old bogus code.  Replace with
2598         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2599         the top of the expression we're curently building.
2600         (maybe_end_try): Delete.
2601         * decl.c (binding_level.exception_range): New field.
2602         (clear_binding_level): Add field exception_range.  Reformat.
2603         (poplevel): Call expand_end_java_handler().
2604         (poplevel): Call java_add_stmt only if functionbody is false.
2605         (maybe_poplevels): Don't call maybe_end_try() from here.
2606         (end_java_method): Clear no longer used trees in function decl.
2607         (register_exception_range): New function.
2608         * java-tree.h (register_exception_range, struct eh_range): Declare.
2609
2610 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
2611
2612         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2613
2614 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
2615
2616         Formatting fixes.
2617         * expr.c (class_has_finalize_method): Fix method name indentation.
2618         (expand_java_call): Remove K&R style parameter declaration.
2619         (expand_invoke): Fix statement indentation.
2620         (expand_java_field_op): Likewise.
2621         * parse-scan.y: Fix typo.
2622         (reset_report): Fix method name indentation.
2623         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2624         line. Fix typos.
2625         * verify.c (verify_jvm_instructions): Document parameters, insert
2626         page break.
2627         * lang.c (lang_init_source): Fix method name indentation.
2628         * class.c (common_enclosing_context_p): Likewise.
2629         (emit_symbol_table): Fix parameter list indentation.
2630         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2631         parameter declaration.
2632         * constants.c: Fix copyright notice indentation.
2633         * typeck.c (find_method_in_superclasses): Fix parameter list
2634         indentation.
2635         (find_method_in_interfaces): Likewise.
2636         * zextract.c (makelong): Fix method name indentation.
2637
2638 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2639
2640         PR java/15715.
2641         * parse.y (create_interface): Set correct access modifiers for
2642         interfaces.
2643         * jcf-write.c (get_classfile_modifiers): New function.
2644         (generate_classfile): Use get_classfile_modifiers, not
2645         get_access_flags.
2646
2647 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2648
2649         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2650         dependency to current parser context, not NULL_TREE, for top-level
2651         classes.
2652         (jdep_resolve_class): Enable member access check for all inner
2653         class dependencies.
2654
2655 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2656
2657         * parse.y (qualify_and_find): Pass type decl, not identifier, to
2658         load_class.
2659
2660 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2661
2662         PR java/15734
2663         * expr.c (expand_java_field_op): Ensure that target class for static
2664         field access has been loaded.
2665
2666 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
2667             Ranjit Mathew  <rmathew@hotmail.com>
2668
2669         PR java/1207, java/16178
2670         * jcf-parse.c (load_class): Return immediately if passed a type decl
2671         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2672         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2673         before calling load_class.
2674         (qualify_and_find): Likewise.
2675         (find_in_imports_on_demand): Likewise.
2676         (find_applicable_accessible_methods_list): Likewise.
2677
2678 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
2679
2680         * parse.y (java_layout_seen_class_methods): Don't call load_class
2681         on class defined by source parser.
2682
2683 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2684
2685         * parse.y (set_nested_class_simple_name_value): Removed.
2686         (java_complete_expand_class): Remove calls to
2687         set_nested_class_simple_name_value.
2688
2689 2004-06-22  Andrew Haley  <aph@redhat.com>
2690             Ranjit Mathew  <rmathew@hotmail.com>
2691
2692         Fixes PR java/16113.
2693         * decl.c (force_poplevels): Remove call to expand_end_bindings.
2694
2695 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
2696
2697         * parse.y (create_class): Correct diagnostic message about
2698         java.lang.Object extending anything else.
2699
2700 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2701
2702         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2703         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2704         * constants.c (build_ref_from_constant_pool): Likewise.
2705         * expr.c (build_java_array_length_access): Likewise.
2706         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2707         (invoke_build_dtable, build_invokevirtual): Likewise.
2708         (build_invokeinterface, java_expand_expr): Likewise.
2709         (emit_init_test_initialization): Likewise.
2710         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2711         * parse.y (make_qualifed_name, build_array_ref): Likewise.
2712
2713 2004-06-21  Andrew Haley  <aph@redhat.com>
2714
2715         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2716         block.
2717
2718 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2719
2720         * jcf.h (struct JCF): Change java_source, right_zip and finished
2721         to unsigned int.
2722         * lex.h (struct java_lexer): Change hit_eof, read_anything,
2723         byte_swap and use_fallback to unsigned int.
2724         * parse.h (struct _jdep): Change flag0 to unsigned int.
2725
2726 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
2727
2728         Fixes PR java/13948
2729         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2730         before trying to lay out its methods.
2731         * jcf-parse.c (read_class): Track parsed files using canonical paths
2732         obtained via lrealpath from libiberty.
2733         (java_parse_file): Likewise.
2734         (parse_source_file_1): Rename formal parameter to reflect its
2735         modified purpose. Minor formatting fix.
2736
2737 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
2738
2739         * class.c (emit_register_classes): Make the function uninlinable,
2740         do not set current_function_cannot_inline.
2741         * resource.c (write_resource_constructor): Do not reset
2742         flag_inline_functions around rest_of_compilation.
2743
2744 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
2745
2746         PR java/15769
2747         * expr.c (java_truthvalue_conversion): Handle
2748         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2749         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2750         i.e. return the expression.
2751
2752 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
2753
2754         * gjavah.c: Include version.h
2755
2756 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
2757
2758         * jcf-write.c (generate_bytecode_conditional): Correct handling
2759         of unordered conditionals. Add comment.
2760
2761 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
2762             Per Bothner  <per@bothner.com>
2763
2764         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2765         local variable was initialised upon declaration.
2766         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2767         variable was final and initialised upon declaration.
2768         * check-init.c (check_final_reassigned): Give error only if a blank
2769         final is not definitely unassigned or if an initialised final is
2770         reassigned.
2771         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2772         assignment expressions. Remove case MODIFY_EXPR, label do_default.
2773         (check_init): Perform initialised-variable-removing-optimisation
2774         only on non-final local variables.
2775
2776 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2777
2778         * jcf-write.c (generate_bytecode_conditional): Handle binops
2779         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2780         and LTGT_EXPR.
2781         (generate_bytecode_insns): Likewise.
2782
2783 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2784
2785         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2786         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2787
2788 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
2789
2790         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2791         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2792
2793 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2794
2795         * decl.c (struct binding_level): Add GTY marker. Compile
2796         binding_depth unconditionally.
2797         (current_binding_level, free_binding_level, global_binding_level):
2798         Likewise.
2799         (clear_binding_level): Unconditionally set binding_depth.
2800         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2801
2802 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2803
2804         * lex.c (java_new_lexer): Set 'encoding'.
2805         (java_read_char): Improve error message for unrecognized characters.
2806         * lex.h (struct java_lexer): New field 'encoding'.
2807
2808 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
2809
2810         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2811
2812 2004-05-21  Mark Wielaard  <mark@klomp.org>
2813
2814         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2815         extern.
2816
2817 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
2818
2819         * typeck.c: Remove non-printable character 160.
2820
2821 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
2822
2823         * check-init.c: Correct minor typos.
2824
2825 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2826
2827         * Make-lang.in, expr.c, java-gimplify.c: Rename
2828         tree-simple.[ch] to tree-gimple.[ch].
2829
2830 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
2831
2832         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2833
2834 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2835
2836         Merge from tree-ssa-20020619-branch.  See
2837         ChangeLog.tree-ssa for details.
2838
2839         * Make-lang.in, builtins.c, check-init.c, class.c,
2840         constants.c, decl.c, except.c, expr.c, java-except.h,
2841         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2842         lang.c, lang.opt, parse.y, resource.c: Merged.
2843         * java-gimplify.c: New file.
2844
2845 2004-05-10  Andrew Haley  <aph@redhat.com>
2846
2847         * parse.y (create_class): Set TYPE_VFIELD.
2848         * decl.c (java_init_decl_processing): Likewise.
2849
2850         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2851         * class.c (make_method_value): Replace DECL_VINDEX with call to
2852         get_method_index().
2853         (get_dispatch_vector): Likewise.
2854         (layout_class_method): Likewise.
2855         Replace set of DECL_VINDEX with call to set_method_index().
2856         (set_method_index): New function.
2857         (get_method_index): New function.
2858         * java-tree.h (set_method_index): New function decl.
2859         (get_method_index): New function decl.
2860
2861 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
2862
2863         * parse.y (check_pkg_class_access): Add new argument
2864         and use it when cl is NULL to call lookup_cl on it.
2865         (parser_check_super_interface): Do not call lookup_cl.
2866         Pass this_decl to check_pkg_class_access and NULL
2867         instead of lookup_cl.
2868         (parser_check_super): Update for change in
2869         check_pkg_class_access.
2870         (do_resolve_class): Likewise.
2871         (process_imports): Likewise.
2872         (find_in_imports_on_demand): Likewise.
2873         (resolve_qualified_expression_name): Likewise.
2874
2875 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
2876
2877         Fixes PR java/9685, PR java/15073
2878         * parse.y (accessibility_string): New method.
2879         (not_accessible_field_error): Use accessibility_string()
2880         instead of java_accstring_lookup().
2881         (resolve_qualified_expression_name): Check with
2882         check_pkg_class_access() before allowing access using
2883         qualified names.
2884         Fix comment typo.
2885         Use check_pkg_class_access() instead of not_accessible_p()
2886         for unqualified types.
2887         (not_accessible_p): Use DECL_CONTEXT (member) instead of
2888         REFERENCE for package-private access checking.
2889         (patch_method_invocation): Use accessibility_string() instead
2890         of java_accstring_lookup().
2891
2892 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
2893
2894         Fixes PR java/15133
2895         * gjavah.c (struct method_name): Add member is_native.
2896         (overloaded_jni_method_exists_p): Match candidate method only if
2897         it is native.
2898         (print_method_info): Initialise is_native flag from the method's
2899         access flags.
2900
2901 2004-04-30  Roger Sayle  <roger@eyesopen.com>
2902
2903         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2904         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2905
2906 2004-04-22  Roger Sayle  <roger@eyesopen.com>
2907
2908         * resource.c (write_resource_constructor): Guard call to possibly
2909         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2910
2911 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
2912
2913         * class.c (make_class_data): Add new field aux_info.
2914         * decl.c (java_init_decl_processing): Push type and decl for
2915         `aux_info'.
2916
2917 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
2918
2919         * expr.c (expand_java_NEW): Don't use size argument for
2920         _Jv_AllocObject calls.
2921         * parse.y (patch_invoke): Likewise.
2922
2923 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
2924
2925         * expr.c (build_invokeinterface): Remove unused variables to
2926         fix warnings.
2927
2928 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
2929
2930         * class.c (get_interface_method_index): New function. Return dispatch
2931         index for interface method.
2932         (make_method_value): For interface methods, set index field to
2933         iface dispatch index, not DECL_VINDEX.
2934         * expr.c (build_invokeinterface): Use get_interface_method_index.
2935
2936 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2937
2938         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2939
2940 2004-03-31  Andrew Haley  <aph@redhat.com>
2941
2942         PR java/14104
2943         * jcf-io.c (opendir_in_zip): Tidy up error handling.
2944
2945 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
2946
2947         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2948         form of GTY markers.
2949
2950 2004-03-25  Marcus Meissner  <meissner@suse.de>
2951
2952         PR java/14689:
2953         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2954
2955 2004-03-23  Tom Tromey  <tromey@redhat.com>
2956
2957         PR java/14315:
2958         * jcf-write.c (make_class_file_name): Don't report if mkdir
2959         failed with EEXIST.
2960
2961 2004-03-23  Tom Tromey  <tromey@redhat.com>
2962
2963         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2964
2965 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
2966
2967         * class.c, gjavah.c, lang.c: Fix comment typos.
2968         * gcj.texi: Fix typos.
2969
2970 2004-03-19  Per Bothner  <per@bothner.com>
2971
2972         * gcj.texi (Code Generation):  Document new flags and assert defaults.
2973
2974         * class.c (assume_compiled_node_struct):  Rename type to
2975         class_flag_node_struct, as it is now also used for enable_assertions.
2976         Rename assume_compiled_node typedef.  Rename excludep field to value.
2977         (find_assume_compiled_node):  Rename function to find_class_flag_node.
2978         Minor optimization - avoid needless strlen.
2979         (add_assume_compiled):  Some tweaking and optimization.
2980         Rename and generalize to add_class_flag takem an extra parameter.
2981         (add_assume_compled):  New just calls add_class_flag.
2982         (add_enable_assert, enable_assertions):  New functions.
2983         (enable_assert_tree):  New static.
2984         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2985         * lang.opt (fenable-assertions, fenable-assertions=,
2986         fdisable-assertions, fdisable-assertions=):  New options.
2987         * lang.c (java_handle_option):  Handle new options.
2988         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
2989         class in an interface - create helper class nested in outer interface.
2990         (build_assertion):  Short-circuit if enable_assertions is false.
2991
2992 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2993
2994         * java-tree.h: Changes throughout to add checking to macros
2995         and numerous whitespace changes.
2996         (VAR_OR_FIELD_CHECK): New macro.
2997         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2998         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2999
3000 2004-03-16  Per Bothner  <per@bothner.com>
3001
3002         * jcf-jump.c (options):  New --print-constants option.
3003         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
3004
3005         * jcf-dump.c (flag_print_constant_pool):  Default to off.
3006         (print_constant_terse_with_index):  New helper function.
3007         (various places):  Check flag_print_constant_pool where missing.
3008         (main):  If verbose set flag_print_constant_pool.
3009         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
3010
3011 2004-03-15  Andrew Haley  <aph@redhat.com>
3012
3013         PR java/14581
3014         * parse.y (java_complete_lhs): Check that final variable has an
3015         initializer.
3016
3017 2004-03-12  Andrew Haley  <aph@redhat.com>
3018
3019         PR java/14551
3020         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
3021         conversion.
3022
3023 2004-02-29  Roger Sayle  <roger@eyesopen.com>
3024
3025         * jcf-parse.c (java_parse_file): Handle the case that input_filename
3026         is NULL.
3027
3028 2004-02-27  Per Bothner  <per@bothner.com>
3029
3030         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
3031         suggestion:  Use build_incomplete_class_ref.
3032         This fixes PR java/13508, java/11714.
3033
3034 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
3035
3036         * java/parse.h: Update copyright.
3037
3038 2004-02-26  Andrew Haley  <aph@redhat.com>
3039
3040         PR java/14231:
3041         * parse.y (check_interface_throws_clauses): Check for
3042         !METHOD_INVISIBLE (iface_method).
3043         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
3044         well as CLASS_ABSTRACT.
3045
3046 2004-02-25  Per Bothner  <per@bothner.com>
3047
3048         * parse.y (build_assertion):  If we're in an inner class, create the
3049         class$ helper routine in the outer class.
3050
3051 2004-02-19  Richard Henderson  <rth@redhat.com>
3052
3053         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
3054
3055 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
3056
3057         * Make-lang.in (java.install-man): Add extra dependencies.
3058
3059 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
3060
3061         * Make-lang.in: Install man pages under the same names
3062         (possibly transformed) as the program they document.
3063
3064 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
3065
3066         * gjavah.c: Include "intl.h".
3067         (error): New function.
3068         (main): Call gcc_init_libintl.
3069         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
3070         print_stub_or_jni, process_file, main): Use error rather than
3071         fprintf.
3072         (print_method_info, usage, help, version, main): Mark strings for
3073         translation with _.  Avoid splitting up sentences.  Send
3074         information messages to stdout.
3075         * jcf-dump.c: Include "intl.h".
3076         (main): Call gcc_init_libintl.
3077         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
3078         Mark error, usage and version messages for translation with _.
3079         Avoid splitting up sentences.
3080         * jv-scan.c: Include "intl.h".
3081         (fatal_error, warning): Change parameter s to msgid.  Translate
3082         messages.
3083         (main): Call gcc_init_libintl.
3084         (usage, help, version): Mark error, usage and version messages for
3085         translation with _.  Avoid splitting up sentences.
3086         * jvgenmain.c: Include "intl.h".
3087         (main): Call gcc_init_libintl.
3088         (usage, main): Mark error messages for translation with _.
3089         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
3090         JVGENMAIN_OBJS): Add intl.o.
3091         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
3092         java/jvgenmain.o): Update dependencies.
3093
3094 2004-02-08  Per Bothner  <per@bothner.com>
3095
3096         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
3097         class don't use not_accessible_field_error, which can get confused.
3098
3099 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
3100
3101         Make-lang.in (po-generated):  Delete.
3102
3103 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
3104
3105         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
3106         Depend on target.h.
3107         * decl.c: Include target.h.
3108         (start_java_method): Replace PROMOTE_PROTOTYPES with
3109         targetm.calls.promote_prototypes.
3110         * expr.c: Include target.h.
3111         (pop_arguments): Replace PROMOTE_PROTOTYPES with
3112         targetm.calls.promote_prototypes.
3113         * parse.y: Include target.h.
3114         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
3115         with targetm.calls.promote_prototypes.
3116
3117 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
3118
3119         * typeck.c: Update copyright.
3120
3121 2004-02-02  Tom Tromey  <tromey@redhat.com>
3122
3123         * decl.c (java_init_decl_processing): Remove duplicate
3124         gnu/gcj/RawData.
3125
3126 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
3127
3128         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
3129
3130 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
3131
3132         * expr.c (build_field_ref): Move variable
3133         definition up.
3134
3135 2004-01-28  Andrew Haley  <aph@redhat.com>
3136
3137         * expr.c (build_field_ref): Widen field offset.
3138
3139 2004-01-27  Andrew Haley  <aph@redhat.com>
3140
3141         java/13273
3142         * parse.y (check_interface_throws_clauses): Make sure class_decl
3143         has been loaded.
3144
3145 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
3146
3147         PR java/13733
3148         * parse.y (patch_assignment): Don't modify lhs_type for
3149         reference assignments.
3150
3151 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
3152
3153         * Make-lang.in: Replace $(docdir) with doc.
3154         (java.info, java.srcinfo, java.man, java.srcman): New rules.
3155         (java.install-man): Revamp rule.
3156
3157 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
3158
3159         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
3160         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
3161         instead of deferred backquote.
3162
3163 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
3164
3165         * typeck.c (find_method_in_interfaces): Move variable
3166         definition up.
3167
3168 2004-01-16  Andrew Haley  <aph@redhat.com>
3169
3170         PR java/13273:
3171         * typeck.c (shallow_find_method): New.
3172         (find_method_in_superclasses): New.
3173         (find_method_in_interfaces): New.
3174         (lookup_do): Rewrite.
3175         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
3176
3177         * jcf-parse.c (read_class): Save and restore output_class.
3178         * decl.c (java_expand_body): Set output_class from fndecl.
3179
3180 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
3181
3182         * class.c (gen_indirect_dispatch_tables): Fix string length
3183         calculations.
3184
3185 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
3186
3187         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
3188         (java.srcextra): Copy above back to source directory if requested.
3189         (po-generated): Delete reference to $(parsedir).
3190         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
3191         Use implicit rule.
3192
3193 2004-01-14  Jan Hubicka  <jh@suse.cz>
3194
3195         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
3196         estimation.
3197
3198 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
3199
3200         * java-tree.h (java_expand_expr): Change prototype.
3201         * expr.c (java_expand_expr): Add alt_rtl parameter.
3202
3203 2004-01-09  Andrew Haley  <aph@redhat.com>
3204
3205         PR java/12755:
3206         * parse.y (java_fix_constructors):  Set output_class.
3207         (java_reorder_fields): Likewise.
3208         (java_layout_classes): Likewise.
3209         (java_expand_classes): Generate indirect dispatch tables.
3210         (java_expand_classes): Set output_class.
3211         (java_finish_classes): Likewise.
3212         * lang.c (java_init): Turn on always_initialize_class_p if we're
3213         using indirect dis[atch.
3214         (java_decl_ok_for_sibcall): Use output_class, not current_class.
3215         (java_get_callee_fndecl): Use class local atable.
3216         * jcf-parse.c
3217         (always_initialize_class_p): Decl moved to java-tree.h.
3218         (HANDLE_CLASS_INFO): Set output_class.
3219         (read_class): Likewise.
3220         (parse_class_file): Call gen_indirect_dispatch_tables.
3221         (parse_zip_file_entries): Set output_class.
3222         (java_parse_file): Set output_class.  Don't emit symbol tables.
3223         * java-tree.h (output_class): New.
3224         Remove global declarations for otable, atable, and ctable.
3225         (always_initialize_class_p): moved here from decl.c.
3226         (DECL_OWNER): New.
3227         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
3228         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
3229         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
3230         (struct lang_type): Add otable_methods, otable_decl,
3231         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
3232         ctable_decl, catch_classes, type_to_runtime_map.
3233         * expr.c (build_field_ref): Make otable, atable, and ctable class
3234         local rather than global.
3235         (build_known_method_ref): Likewise.
3236         (build_invokeinterface): Likewise.
3237         (java_expand_expr): Pass runtime type (rather than actual type) to
3238         expand_start_catch.
3239         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
3240         this class.  Look up each class in that map to delete duplicates.
3241         (expand_end_java_handler): Pass runtime type (rather than actual
3242         type) to expand_start_catch.
3243         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
3244         (do_nothing): New.
3245         (java_init_decl_processing): Rearrange things.  Remove global
3246         declarations of otable, atable, and ctable.
3247         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
3248         (java_expand_body): Set output_class.
3249         * constants.c (build_constant_data_ref): Use output_class, not
3250         current_class.
3251         (alloc_name_constant): Likewise.
3252         * class.c (gen_indirect_dispatch_tables): New.
3253         (build_class_ref): Generate hard reference to superclass, even if
3254         using indirect dispatch.
3255         (build_static_field_ref): Use class local atable.
3256         (make_class_data): Generate hard reference to superclass, even if
3257         using indirect dispatch.
3258         Generate symbolic references to interfaces when using indirect
3259         dispatch.
3260         (make_class_data): Emit otable, atable, and ctable.
3261         Make otable, atable, and ctable class local rather than global.
3262         (emit_catch_table): Make otable, atable, and ctable class local
3263         rather than global.
3264
3265 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
3266
3267         * parse.y (catch_clause_parameter): Fix typo.
3268
3269         PR java/13404
3270         * parse.y: (catch_clause_parameter): Return early if $3, aka
3271         formal_parameter, is null.
3272
3273 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3274
3275         * class.c: Remove uses of "register" specifier in
3276         declarations of arguments and local variables.
3277         * decl.c: Likewise.
3278         * expr.c: Likewise.
3279         * gjavah.c: Likewise.
3280         * jcf-dump.c: Likewise.
3281         * jcf-io.c: Likewise.
3282         * jcf-parse.c: Likewise.
3283         * jcf-write.c: Likewise.
3284         * keyword.h: Likewise.
3285         * parse.y: Likewise.
3286         * typeck.c: Likewise.
3287         * verify.c: Likewise.
3288
3289 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
3290
3291         * Make-lang.in (GCJ_CROSS_NAME): Delete.
3292         (java.install_common, java.install-man): Adjust for above.
3293         (java.uninstall): Likewise.
3294
3295 2003-12-03  Michael Koch  <konqueror@gmx.de>
3296
3297         * class.c (make_class_data):
3298         Push field value to 'hack_signers' instead of 'signers'.
3299         * decl.c (java_init_decl_processing):
3300         Push field 'hack_signers' instead of 'signers'.
3301
3302 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
3303
3304         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
3305         including iconv.h.
3306
3307 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
3308
3309         PR java/12374:
3310         * parse.y (qualify_ambiguous_name): Remove lots of broken
3311         field access processing - there's no need to do that here,
3312         because we have resolve_field_access.  Remove
3313         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
3314         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
3315         used.
3316
3317 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
3318
3319         Fix PR java/13237
3320         * parse.y (java_complete_lhs): Save location prior to patching
3321         CALL_EXPR.
3322
3323 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
3324
3325         PR java/12548
3326         * resource.c (write_resource_constructor): Append
3327         "_resource" to constructor identifier name.
3328
3329 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
3330
3331         Fix PR java/13183.
3332         * constants.c (cpool_for_class): New function.
3333         (outgoing_cpool): Remove global variable.
3334         (alloc_name_constant): Use cpool_for_class.
3335         (build_constants_constructor): Likewise.
3336         * decl.c (java_expand_body): Set current_class.
3337         * java-tree.h (outgoing_cpool) Remove declaration.
3338         (init_outgoing_cpool): Likewise.
3339         * jcf-parse.c (init_outgoing_cpool): Remove function.
3340         (parse_class_file): Don't call init_outgoing_cpool.
3341         * parse.y (java_complete_expand_methods): Don't call
3342         init_outgoing_cpool.  Don't save outgoing_cpool.
3343         (java_expand_classes): Don't restore outgoing_cpool.
3344         (java_finish_classes): Likewise.
3345
3346 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
3347
3348         * Make-lang.in: (java.install-common) Add
3349         symlink for $(target_noncanonical)-gcjh for
3350         native builds.
3351
3352 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
3353
3354         * Make-lang.in (java.extraclean): Delete.
3355
3356 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
3357
3358         * Make-lang.in (check-java): Add.
3359
3360 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
3361
3362         Fix PR java/13024.
3363         * except.c (prepare_eh_table_type): Allocate variable-sized
3364         buffer `buf' with alloca.
3365
3366 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
3367
3368         Fix PR java/12857.
3369
3370         decl.c (java_init_decl_processing): Don't initialize
3371         class_not_found_type_node, no_class_def_found_type_node.
3372
3373         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
3374         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
3375         (class_not_found_type_node, no_class_def_found_type_node):
3376         Don't define.
3377
3378         parse.y (build_dot_class_method_invocation): Add this_class
3379         argument.  Qualify method invocations to a different class.
3380         (create_new_parser_context): Initialize saved_data_ctx to 0.
3381         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
3382         (build_dot_class_method): Don't load classes.  Register
3383         incomplete types.
3384         (build_incomplete_class_ref): Special cases for interfaces
3385         and inner classes.  Move build_dot_class_method call to here...
3386         (patch_incomplete_class_ref): ...from here.  Pass current_class
3387         to build_dot_class_method_invocation.
3388         (build_assertion): Pass class_type to
3389         build_dot_class_method_invocation.
3390         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
3391
3392 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
3393
3394         Fix PR java/12739.
3395         * java-tree.h (BLOCK_EMPTY_P): Define.
3396         * parse.y (java_complete_lhs): Check for empty blocks
3397         in TRY_FINALLY_EXPR case.
3398
3399 2003-11-17  Andrew Haley  <aph@redhat.com>
3400
3401         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
3402         (struct lang_decl_var:freed): New variable.
3403         * decl.c (poplevel): Mark local vars that have gone out of scope.
3404         (push_jvm_slot): Don't use the RTL of a var that has gone out of
3405         scope.
3406
3407 2003-11-16  Jason Merrill  <jason@redhat.com>
3408
3409         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
3410         and TAGS files that include them for each front end.
3411
3412 2003-11-15  Tom Tromey  <tromey@redhat.com>
3413
3414         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
3415
3416 2003-11-12  Jason Merrill  <jason@redhat.com>
3417
3418         PR optimization/12547
3419         * lang.c (java_tree_inlining_walk_subtrees): Just walk
3420         BLOCK_EXPR_BODY directly.
3421
3422 2003-11-12  Andrew Haley  <aph@redhat.com>
3423
3424         PR java/11045
3425         * parse.y (fold_constant_for_init): Check that we really do have a
3426         constant.
3427
3428         PR java/11533
3429         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
3430         init_test_decls being inlined.
3431
3432         PR java/12890:
3433         * parse.y (do_resolve_class): Check return value from
3434         breakdown_qualified().
3435
3436 2003-11-11  Tom Tromey  <tromey@redhat.com>
3437
3438         PR java/12915:
3439         * parse.y (merge_string_cste): Handle case where we have a
3440         pointer that happens to be zero, not null_pointer_node.
3441
3442 2003-11-10  Tom Tromey  <tromey@redhat.com>
3443
3444         * jcf-parse.c (classify_zip_file): Correctly compare
3445         filename_length against length of manifest file's name.
3446
3447 2003-11-08  Tom Tromey  <tromey@redhat.com>
3448
3449         PR java/12894:
3450         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
3451
3452 2003-11-06  Andrew Haley  <aph@redhat.com>
3453
3454         * expr.c (java_stack_swap): Make sure destination stack slots are
3455         of the correct type.
3456
3457 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
3458
3459         * Make-lang.in (dvi): Move targets to $(docobjdir).
3460         (gcj.dvi): Simplify rule and adjust target.
3461         (gcj.info): Simplify rule.
3462         (gcj.pod): New intermediate rule.
3463         (gcjh.pod): Likewise.
3464         (jv-scan.pod): Likewise.
3465         (jcf-dump.pod): Likewise.
3466         (gij.pod): Likewise.
3467         (jv-convert.pod): Likewise.
3468         (rmic.pod): Likewise.
3469         (rmiregistry.pod): Likewise.
3470         (gcj.1): Delete.
3471         (gcjh.1): Delete.
3472         (jv-scan.1): Delete.
3473         (jcf-dump.1): Delete.
3474         (gij.1): Delete.
3475         (jv-convert.1): Delete.
3476         (rmic.1): Delete.
3477         (rmiregistry.1): Delete.
3478
3479 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
3480
3481         Fixes PR java/12866.
3482         * parse.y (resolve_qualified_expression_name): Move test
3483         for outer field access methods from here...
3484         (check_thrown_exceptions) ...to here.
3485
3486 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
3487
3488         * .cvsignore: Delete.
3489
3490 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
3491
3492         * verify.c (verify_jvm_instructions): Don't warn about legal
3493         eh binding regions generated for example by jdk 1.4.1.
3494
3495 2003-10-24  David S. Miller  <davem@redhat.com>
3496
3497         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3498
3499 2003-10-22  Andrew Haley  <aph@redhat.com>
3500
3501         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3502         (java_get_callee_fndecl): New.
3503
3504         * jcf-parse.c (java_parse_file): Call emit_catch_table().
3505
3506         * java-tree.h (ctable_decl): New.
3507         (catch_classes):  New.
3508         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3509
3510         * decl.c (java_init_decl_processing): Add catch_class_type.
3511         Add ctable_decl.
3512         Add catch_classes field.
3513
3514         * class.c (build_indirect_class_ref): Break out from
3515         build_class_ref.
3516         (make_field_value): Check flag_indirect_dispatch.
3517         (make_class_data): Ditto.
3518         Tidy uses of PUSH_FIELD_VALUE.
3519         Add field catch_classes.
3520         (make_catch_class_record): New.
3521
3522         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3523
3524 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
3525
3526         * jcf-write.c: Follow spelling conventions.
3527         * parse.y: Likewise.
3528
3529 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
3530
3531         * ChangeLog: Fix typos.
3532         * expr.c: Fix comment typos.
3533         * jcf-write.c: Likewise.
3534         * lang.c: Likewise.
3535         * lex.c: Likewise.
3536         * mangle.c: Likewise.
3537         * parse-scan.y: Likewise.
3538         * parse.y: Likewise.
3539
3540 2003-10-22  Tom Tromey  <tromey@redhat.com>
3541
3542         * expr.c (expand_byte_code): Only warn about dead bytecode when
3543         extra_warnings is set.
3544
3545 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
3546
3547         Fix for PR java/12586.
3548         * mangle.c (find_compression_record_match): Don't iterate through
3549         package namespace elements unless they all match compression_table
3550         entries.
3551
3552 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
3553
3554         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3555         (generate-manpages): Likewise.
3556         (java.maintainer-clean): Likewise.
3557         (gcj.info): Likewise.
3558         (gcj.1): Likewise.
3559         (gcjh.1): Likewise.
3560         (jv-scan.1): Likewise.
3561         (jcf-dump.1): Likewise.
3562         (gij.1): Likewise.
3563         (jv-convert.1): Likewise.
3564         (rmic.1): Likewise.
3565         (rmiregistry.1): Likewise.
3566         (java.install-man): Likewise.
3567         (parse-scan.o): Move and define complete compile line.
3568         (parse.o): Likewise.
3569         (jcf-tree-inline.o): Move.
3570
3571 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
3572
3573         * Make-lang.in (info): Update dependencies.
3574         (java.install-info): Remove.
3575         ($(srcdir)/java/gcj.info): Replace with ...
3576         ($(docobjdir)/gcj.info): ... this.
3577
3578 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
3579
3580         * Make-lang.in: Replace uses of $(target_alias) with
3581         $(target_noncanonical).
3582
3583 2003-10-09  Tom Tromey  <tromey@redhat.com>
3584
3585         * decl.c (java_init_decl_processing): Declare signers field.
3586         * class.c (make_class_data): Set signers field.
3587
3588 2003-10-09  Jason Merrill  <jason@redhat.com>
3589
3590         * parse.y (patch_assignment): Use make_node to create a BLOCK.
3591         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
3592         POINTER_TYPE.
3593
3594 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
3595
3596         * Make-lang.in (java.info): Replace with ...
3597         (info): ... this.
3598         (java.dvi): Replace with ...
3599         (dvi): ... this.
3600         (java.generated-manpages): Replace with ...
3601
3602 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
3603
3604         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
3605
3606 2003-10-01  Andrew Haley  <aph@redhat.com>
3607
3608         * jcf-parse.c (java_parse_file): Write otable and atable.
3609         * java-tree.h (atable_methods): New.
3610         (atable_decl): New.
3611         (atable_syms_decl): New.
3612         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
3613         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
3614         (symbol_*type): Rename method_symbol* to symbol*type.
3615         (emit_offset_symbol_table): Delete.
3616         (emit_symbol_table): New.
3617         (get_symbol_table_index): New.
3618         (atable_type): New.
3619         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
3620         (build_known_method_ref): Likewise.
3621         (get_symbol_table_index): Rename from get_offset_table_index.
3622         Parameterize to allow re-use by differing types of symbol table.
3623         (build_invokevirtual): Pass table to get_offset_table_index.
3624         * decl.c (java_init_decl_processing): Push types and decls for
3625         atable and atable_syyms.
3626         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
3627         (make_class_data): Add new fields atable and atable_syms.
3628         (emit_symbol_table): Rename from emit_offset_symbol_table.
3629         Parameterize to allow re-use by different types of symbol table.
3630         (build_symbol_entry): Renamed from build_method_symbols_entry.
3631
3632 2003-09-30  Roger Sayle  <roger@eyesopen.com>
3633
3634         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
3635         semantics for SAVE_EXPR, by caching the result in a temporary.
3636
3637 2003-09-28  Richard Henderson  <rth@redhat.com>
3638
3639         * check-init.c (check_init): Save and restore input_location
3640         instead of file and line separately.
3641         * decl.c (java_expand_body): Likewise.
3642         * jcf-write.c (generate_bytecode_insns): Likewise.
3643         * parse.y (safe_layout_class): Likewise.
3644         * jcf-parse.c (read_class, parse_class_file): Likewise.
3645         (java_parse_file): Use %H for warning locator.
3646
3647 2003-09-28  Roger Sayle  <roger@eyesopen.com>
3648
3649         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
3650         with void-type branches instead of using a COMPOUND_EXPR.
3651
3652 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
3653
3654         * decl.c (java_optimize_inline, dump_function): Remove.
3655         * java-tree.h (java_optimize_inline): Remove declaration.
3656         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
3657         * parse.y (source_end_java_method, java_expand_classes):
3658         Likewise.  Remove dead code.
3659
3660 2003-09-27  Roger Sayle  <roger@eyesopen.com>
3661
3662         * lang.c (java_init_options): Set flag_evaluation_order.
3663         * expr.c (force_evaluation_order): Don't attempt to force
3664         evaluation order of binary operations using save_expr.
3665         * parse.y (java_complete_lhs): No longer need to call
3666         force_evaluation_order when constructing binary operators.
3667
3668 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3669             Bryce McKinlay  <bryce@mckinlay.net.nz>
3670
3671         PR java/1333:
3672         * parse.y (not_accessible_field_error): New function.
3673         (resolve_expression_name): Check field access permissions.
3674         (resolve_qualified_expression_name): Use
3675         not_accessible_field_error.
3676         (resolve_qualified_expression_name): Likewise.
3677
3678 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3679
3680         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
3681
3682 2003-09-23  Roger Sayle  <roger@eyesopen.com>
3683
3684         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
3685         with equal operands without side-effects.
3686
3687 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
3688
3689         * decl.c (java_init_decl_processing): Don't emit otable decls
3690         if flag_indirect_dispatch is not set.
3691
3692 2003-09-21  Richard Henderson  <rth@redhat.com>
3693
3694         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3695         resource.c: Revert.
3696
3697 2003-09-21  Richard Henderson  <rth@redhat.com>
3698
3699         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3700         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
3701
3702 2003-09-20  Richard Henderson  <rth@redhat.com>
3703
3704         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
3705
3706 2003-09-18  Roger Sayle  <roger@eyesopen.com>
3707
3708         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
3709         * check-init.c (check_init): Likewise.
3710
3711 2003-09-18  Roger Sayle  <roger@eyesopen.com>
3712
3713         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
3714
3715 2003-09-16  Andrew Haley  <aph@redhat.com>
3716
3717         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
3718
3719 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
3720
3721         Fixes PR java/9577
3722         * mangle.c (find_compression_record_match): Skip
3723         over a "6JArray" (the array template mangled string)
3724         IDENTIFIER_NODE.
3725         (mangle_array_type): Correct minor typo.
3726         (atms): Move definition to the beginning.
3727
3728 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
3729
3730         * class.c (add_miranda_methods): Ensure super-interfaces are laid
3731         out. Fix for PR java/12254.
3732
3733 2003-09-11  Richard Henderson  <rth@redhat.com>
3734
3735         * parse.y (source_end_java_method): Update for new
3736         cgraph_finalize_function argument.
3737
3738 2003-09-09  Richard Henderson  <rth@redhat.com>
3739
3740         * parse.y (source_end_java_method): Update call to
3741         cgraph_finalize_function.
3742
3743 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
3744
3745         * decl.c (java_expand_body): New function.
3746         * expr.c (build_class_init): Set DECL_IGNORED_P.
3747         * java-tree.h (start_complete_expand_method,
3748         java_expand_body): Declare.
3749         * jcf-parse.c (cgraph.h): Include.
3750         (java_parse_file): Handle flag_unit_at_a_time.
3751         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
3752         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
3753         (java_estimate_num_insns): Use walk_tree_without_duplicates.
3754         (java_start_inlining): New function.
3755         * parse.h (java_finish_classes): Declare.
3756         * parse.y: Include cgraph.h.
3757         (block): Don't special-case empty block production.
3758         (craft_constructor): Set DECL_INLINE.
3759         (source_end_java_method): Handle flag_unit_at_a_time.
3760         Replace inline code with call to java_expand_body.
3761         (start_complete_expand_method): Remove static modifier.
3762         (java_expand_method_bodies): Patch function tree for
3763         class initialization and/or synchronization as needed.
3764         Don't begin RTL expansion yet.
3765         (java_expand_classes): Check flag_unit_at_a_time before
3766         calling finish_class.
3767         (java_finish_classes): New function.
3768         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
3769         (patch_assignment): Set DECL_CONTEXT on temporary variable.
3770         (emit_test_initialization): Set DECL_IGNORED_P.
3771
3772 2003-09-03  Roger Sayle  <roger@eyesopen.com>
3773
3774         * builtins.c (enum builtin_type): Delete unused enumeration.
3775         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
3776
3777 2003-08-28  Tom Tromey  <tromey@redhat.com>
3778
3779         * gcj.texi (Extensions): Document gcjlib URLs.
3780
3781 2003-08-20  Tom Tromey  <tromey@redhat.com>
3782
3783         * gcj.texi (Extensions): Added xref.
3784         (libgcj Runtime Properties): Document
3785         gnu.gcj.runtime.VMClassLoader.library_control.
3786
3787 2003-08-20  Andrew Haley  <aph@redhat.com>
3788
3789         * except.c (prepare_eh_table_type): Use new encoding for exception
3790         handlers when using -fno-assume-compiled.
3791
3792 2003-08-13  Tom Tromey  <tromey@redhat.com>
3793
3794         * gcj.texi (Invoking gij): Document -X and -?.
3795
3796 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
3797
3798         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
3799         GCJH_OBJS, JCFDUMP_OBJS
3800         * win32-host.c: Removed the unnecessary and broken dependency
3801         on jcf.h
3802
3803 2003-08-11  Tom Tromey  <tromey@redhat.com>
3804
3805         * parse.y (java_check_regular_methods): Typo fixes.  Call
3806         check_interface_throws_clauses.  Use
3807         check_concrete_throws_clauses.
3808         (check_interface_throws_clauses): New function.
3809         (check_concrete_throws_clauses): New function.
3810         (hack_is_accessible_p): New function.
3811         (find_most_specific_methods_list): Added FIXME.
3812         * typeck.c (lookup_do): Use `flags' argument to decide what to
3813         do.  Reimplemented.
3814         (lookup_argument_method_generic): New function.
3815         (lookup_argument_method2): Removed.
3816         * jcf.h (ACC_INVISIBLE): New define.
3817         * jcf-write.c (generate_classfile): Skip invisible methods.
3818         * class.c (add_miranda_methods): New function.
3819         (layout_class_methods): Use it.
3820         (get_access_flags_from_decl): Use ACC_INVISIBLE.
3821         * java-tree.h (METHOD_INVISIBLE): New define.
3822         (lang_decl_func) [invisible]: New field.
3823         (lookup_argument_method_generic): Declare.
3824         (SEARCH_INTERFACE): New define.
3825         (SEARCH_SUPER): Likewise.
3826         (SEARCH_ONLY_INTERFACE): Likewise.
3827         (SEARCH_VISIBLE): Likewise.
3828         (lookup_argument_method2): Removed declaration.
3829
3830 2003-08-05  Tom Tromey  <tromey@redhat.com>
3831
3832         Fix for PR java/11600:
3833         * parse.y (java_complete_lhs): See whether we're calling a method
3834         on an array.
3835         (check_thrown_exceptions): Added `is_array_call' argument;
3836         fixed `clone' checking; updated all callers.
3837
3838 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
3839
3840         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3841
3842 2003-08-03  Tom Tromey  <tromey@redhat.com>
3843
3844         * java-tree.h (METHOD_TRANSIENT): Removed.
3845         * decl.c (pushdecl): Removed some dead code.
3846         * class.c (get_access_flags_from_decl): Can't have transient
3847         method.
3848         (add_method_1): Can't have a transient method.
3849
3850 2003-07-28  Andreas Jaeger  <aj@suse.de>
3851
3852         * jvspec.c: Convert to ISO C90 prototypes.
3853
3854 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3855
3856         * decl.c (force_poplevels): Fix warning call.
3857
3858 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3859
3860         * expr.c (expand_java_field_op): Don't use xxx_with_decl
3861         (expand_java_field_op): Likewise.
3862         * class.c (layout_class_method): Likewise
3863         (emit_register_classes): Likewise.
3864         * decl.c (pushdecl): Likewise.
3865         (poplevel): Likewise.
3866         (force_poplevels): Likewise.
3867         (give_name_to_locals): Likewise.
3868         * check-init.c (check_for_initialization): Likewise.
3869
3870 2003-07-24  Jason Merrill  <jason@redhat.com>
3871
3872         * java-tree.h: Move boolean_type_node et al to the back end.
3873
3874 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3875
3876         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3877         casts.
3878
3879 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
3880
3881         * lang.opt: Don't show -MD_ and -MDD_.
3882
3883 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
3884
3885         * lang-options.h: Remove.
3886         * lang.opt: Add help text.
3887
3888 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
3889
3890         * expr.c: Remove the last argument to expand_assignment().
3891
3892 2003-07-09  Jan Hubicka  <jh@suse.cz>
3893
3894         * java-tree.h (DECL_NUM_STMTS): Rename to...
3895         (DECL_ESTIMATED_INSNS): ... this.
3896         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3897         New static functions.
3898         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3899         * parser.y (add_stmt_to_compound): Do not account statements.
3900
3901 2003-07-08  Mark Wielaard  <mark@klomp.org>
3902
3903         * gcj.texi: CNI now expands to Compiled Native Interface.
3904
3905 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3906
3907         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3908
3909 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3910
3911         * expr.c (expand_byte_code): Adjist emit_line_note call.
3912
3913 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
3914
3915         * lang.c (java_handle_option): Don't handle filenames.
3916
3917 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
3918
3919         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3920         DIR_SEPARATOR.
3921         Use FILENAME_CMP.
3922         * jcf-write.c: Don't default-define DIR_SEPARATOR.
3923         * jcf.h: Delete COMPARE_FILENAMES definition.
3924
3925 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
3926
3927         * lang.c (java_init_options): Update prototype.
3928
3929 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3930
3931         * decl.c (poplevel): Adjust define_label call.
3932
3933 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3934
3935         * gjavah.c (flag_jni): Make non-static.
3936         * parse-scan.y (ctxp): Make non-static.
3937
3938         * class.c (build_method_symbols_entry)
3939         * expr.c (get_offset_table_index)
3940         * jcf-parse.c (jcf_parse):
3941         Mark the definition static, matching the forward declaration.
3942
3943 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
3944
3945         * lang.c (java_handle_option): Don't check for missing arguments.
3946
3947 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3948
3949         * class.c (push_class): Use a location_t to save place.
3950         (emit_register_classes): Set input_location. Adjust
3951         expand_function_end call.
3952         * resource.c (write_resource_constructor): Likewise.
3953         * decl.c (end_java_method): Adjust expand_function_end call.
3954         * parse.y (source_end_java_method): Likewise.
3955
3956 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3957
3958         * lang.c (java_handle_option): Likewise.
3959
3960 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
3961
3962         * lang.c (java_handle_option): Special-casing of optional
3963         joined arguments no longer needed.
3964         * lang.opt: Update switches that take optional argument.
3965
3966 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
3967
3968         * lang.opt: Declare Java.
3969         * lang.c (java_init_options): Update.
3970
3971 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
3972
3973         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3974
3975 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3976
3977         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3978         * lang.c (java_handle_option): -MD and -MMD have an underscore.
3979         * lang.opt: -MD and -MMD have an underscore.
3980
3981 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3982
3983         * class.c (emit_register_classes): Adjust init_function_start
3984         call.
3985         * decl.c (complete_start_java_method): Likewise.
3986         * resource.c (write_resource_constructor): Likewise.
3987
3988 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3989
3990         * Make-lang.in: Update to use options.c and options.h.
3991         * lang.c: Include options.h not j-options.h.
3992         (java_handle_option): Abort on unrecognized option.
3993         (java_init_options): Request Java switches.
3994
3995 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
3996
3997         * Make-lang.in: Handle mostlyclean.
3998
3999 2003-06-11  Tom Tromey  <tromey@redhat.com>
4000
4001         * lang.c (java_handle_option): Update dependency_tracking for
4002         OPT_MF case.
4003
4004         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
4005         empty argument.
4006
4007 2003-06-10  Andrew Haley  <aph@redhat.com>
4008
4009         * resource.c (write_resource_constructor): Use expand_expr to
4010         generate the address of the label attached to a resource.
4011         * Make-lang.in (java/resource.o): Add expr.h
4012
4013 2003-06-10  Andrew Haley  <aph@redhat.com>
4014
4015         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
4016         (java_decl_ok_for_sibcall): New.
4017
4018 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
4019
4020         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
4021         (java/j-options.c, java/j-options.h): New.
4022         * java-tree.h (resource_name, compile_resource_file,
4023         compile_resource_data): Constify.
4024         * jcf-write.c (jcf_write_base_directory): Similarly.
4025         * jcf.h (jcf_write_base_directory): Similarly.
4026         * lang.c: Include j-options.h.
4027         (cl_options_count, cl_options, string_option, java_decode_option,
4028         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
4029         process_option_with_no): Remove.
4030         (resource_name): Constify.
4031         (LANG_HOOKS_HANDLE_OPTION): Override.
4032         (java_handle_option): New.
4033         (java_init): Don't call jcf_path_init.
4034         (java_init_options): Call jcf_path_init.
4035         * lang.opt: New.
4036         * resource.c (compile_resource_data, compile_resource_file): Constify.
4037
4038 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
4039
4040         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
4041         (struct lang_decl_func): Add last_line field.
4042         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
4043         DECL_SOURCE_LINE_LAST): Remove.
4044         * parse.y (missing_return_error, finish_method_declaration,
4045         lookup_cl, start_artificial_method_body, source_end_java_method,
4046         start_complete_expand_method): Adjust.
4047
4048 2003-06-08  Tom Tromey  <tromey@redhat.com>
4049
4050         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
4051         fno-assume-compiled.
4052
4053 2003-06-08  Roger Sayle  <roger@eyesopen.com>
4054
4055         * builtins.c (define_builtin_type, builtin_types): Delete.
4056         (define_builtin): Rewritten to take just the built-in code,
4057         the function's name, type and fallback library function name.
4058         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
4059         (initialize_builtins): Overhaul to define the GCC builtins
4060         used by gcj manually, providing the Java run-time's
4061         implementations as the fallback library function.
4062
4063 2003-06-08  Anthony Green  <green@redhat.com>
4064
4065         * parse.y (patch_cast): Fix conversions from floating-point to
4066         integral types.
4067
4068 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
4069
4070         * Make-lang.in: Update.
4071         * lang.c: Include opts.h. Define cl_options_count and cl_options.
4072
4073 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
4074
4075         * lang.c (java_init_options): Update.
4076
4077 2003-06-05  Jan Hubicka  <jh@suse.cz>
4078
4079         * Make-lang.in:  Add support for stageprofile and stagefeedback
4080
4081 2003-05-31  Roger Sayle  <roger@eyesopen.com>
4082
4083         * lang.c (java_init_options): Prescribe wrap-around two's
4084         complement arithmetic overflow by setting flag_wrapv.
4085
4086 2003-05-29  Roger Sayle  <roger@eyesopen.com>
4087
4088         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
4089         (builtin_record): Add an additional builtin_code field to
4090         record which GCC built-in corresponds to the Java function.
4091         (java_builtins):  Add new entries for atan, atan2, exp, log,
4092         pow and tan.
4093         (max_builtin, min_builtin, abs_builtin): Perform constant
4094         folding on the resulting tree.
4095         (java_build_function_call_expr): Likewise, perform constant
4096         folding on the resulting tree.
4097         (initialize_builtins): The NULL creators are now allowed in
4098         the java_builtins table, which is now terminated by an entry
4099         with builtin_code == END_BUILTINS.
4100         (check_for_builtin): Likewise.  If the matching creator is
4101         NULL, construct the call using java_build_function_call_expr
4102         directly with the decl for the corresponding builtin_code.
4103
4104 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4105
4106         * win32-host.c: Normalize copyright boilerplate.
4107
4108 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4109
4110         * parse.y (print_int_node): Use string concatentation on
4111         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
4112         function calls into one.
4113
4114 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
4115
4116         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
4117         fatal_io_error with calls to fatal_error; add ": %m" to the end of
4118         all the affected error messages.
4119
4120 2003-05-13  Richard Henderson  <rth@redhat.com>
4121
4122         * class.c (layout_class_method): Set DECL_EXTERNAL.
4123         * decl.c (java_mark_decl_local, java_mark_class_local): New.
4124         * java-tree.h (java_mark_class_local): Declare.
4125         * jcf-parse.c (parse_class_file): Use it.
4126         * parse.y (java_expand_classes): Likewise.
4127
4128 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
4129
4130         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
4131         * lex.h: #include input.h.
4132         * jv-scan.c (input_filename): Remove.
4133
4134 2003-05-02  Tom Tromey  <tromey@redhat.com>
4135
4136         PR java/10491:
4137         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
4138         (handle_inner_classes): New function.
4139
4140 2003-05-01  Tom Tromey  <tromey@redhat.com>
4141
4142         PR java/10459:
4143         * parse.y (finish_for_loop): Do nothing if update expression is a
4144         EXPR_WFL_NODE wrapping nothing.
4145         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
4146
4147 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
4148
4149         * lex.h (input_lineno): Remove declaration.
4150         * parse-scan.y: #include input.h.
4151         (input_filename): Remove declaration.
4152         (input_location): Add definition.
4153         (input_line): Remove definition.
4154
4155 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4156
4157         * lex.h (lineno): Rename to ...
4158         (input_line): ... here
4159         * parse-scan.y (lineno): Rename to ...
4160         (input_line): ... here.
4161         (reset_report): Rename lineno to input_line.
4162         * check-init.c (check_init): Likewise.
4163         * class.c (push_class): Likewise.
4164         * decl.c (complete_start_java_method, end_java_method): Likewise.
4165         * expr.c (expand_byte_code): Likewise.
4166         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
4167         * jcf-write.c (generate_bytecode_insns): Likewise.
4168         * lex.c (java_init_lex, java_allocate_new_line,
4169         do_java_lex): Likewise.
4170         * parse.h (YYNOT_TWICE): Likewise.
4171         * parse.y (empty_statement, expression_statement,
4172         java_pop_parser_context, java_parser_context_save_global,
4173         yyerror, register_fields, method_header, safe_layout_class,
4174         find_in_imports_on_demand, create_artificial_method,
4175         source_end_java_method, start_complete_expand_method,
4176         build_thisn_assign, java_complete_lhs,
4177         maybe_absorb_scoping_block): Likewise.
4178
4179 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
4180
4181         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
4182         '/' when computing java source filename
4183
4184 2003-04-13  Tom Tromey  <tromey@redhat.com>
4185
4186         * gjavah.c (print_c_decl): Indentation fix.
4187
4188 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4189
4190         * class.c (make_field_value, make_method_value, get_dispatch_table)
4191         (make_class_data, emit_offset_symbol_table)
4192         * constants.c (build_constants_constructor)
4193         * java-tree.h (START_RECORD_CONSTRUCTOR)
4194         * parse.y (maybe_build_array_element_wfl):
4195         Use build_constructor.
4196
4197 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
4198
4199         PR java/10253:
4200         * parse.y (string_convert_int_cst): Always use at least one digit
4201         in string conversion. Remove ASCII dependence.
4202         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
4203
4204 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
4205
4206         * Make-lang.in: added win32-host.c
4207         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
4208         resolves to open() on non-Win32 platforms and
4209         Win32-specific jcf_open_exact_case() on Win32
4210         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
4211         when trying .java and .class files
4212         * win32-host.c: added to repository. Defines
4213         Win32-specific jcf_open_exact_case()
4214
4215 2003-04-10  Andrew Haley  <aph@redhat.com>
4216
4217         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
4218         (maybe_free_localvar): Renamed from localvar_free.
4219         Add new arg, really.
4220         (generate_bytecode_insns): Set new variable, jsrs.
4221         Only free local vars if no jsr insns have been emittted.
4222         Call maybe_free_localvar, not localvar_free.
4223
4224 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4225
4226         * gcj.texi: Remove @ at start of file.
4227
4228 2003-03-25  Tom Tromey  <tromey@redhat.com>
4229
4230         * parse.y (create_interface): Call CHECK_DEPRECATED.
4231
4232 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
4233
4234         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
4235
4236 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4237
4238         * javaop.h (jfloat, jdouble): Make them structures mirroring
4239         the bit fields of IEEE float and double respectively.
4240         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
4241         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
4242         (union Word, union DWord): Delete.
4243         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
4244
4245         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
4246         D_NAN_MASK): Delete.
4247         (jni_print_float, jni_print_double): New.  Generate
4248         hexadecimal floating constants.
4249         (print_field_info): Use jni_print_float/double.
4250
4251         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
4252         finite floating point numbers for output; special case
4253         non-finite floats.
4254
4255 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4256
4257         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
4258         Replace 0 and 1 with true and false in return statements.
4259
4260 2003-03-19  Tom Tromey  <tromey@redhat.com>
4261
4262         * lex.c (do_java_lex): Renamed from java_lex.
4263         (java_lex): New function.
4264         Include timevar.h.
4265
4266 2003-03-13  Tom Tromey  <tromey@redhat.com>
4267
4268         * parse.y (resolve_inner_class): Error if qualifier is a primitive
4269         type.
4270
4271 2003-03-04  Andrew Haley  <aph@redhat.com>
4272
4273         * gjavah.c (is_first_data_member): New global variable.
4274         (print_c_decl): If it's the first data member, align it as the
4275         superclass.
4276         (process_file): Set is_first_data_member.
4277
4278 2003-03-11  Tom Tromey  <tromey@redhat.com>
4279
4280         * parse.y (resolve_field_access): Initialize class if field is
4281         found in another static field.
4282         * expr.c (build_class_init): Don't optimize out initialization of
4283         implemented interface.
4284
4285 2003-03-11  Andrew Haley  <aph@redhat.com>
4286
4287         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
4288         warning.
4289
4290 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
4291
4292         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
4293         and DIR_SEPARATOR_2 for a target.
4294         Correct minor typos.
4295
4296         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
4297         and DIR_SEPARATOR_2 for a target into account.
4298
4299 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4300
4301         * lang.c (java_init): Update prototype, move code to java_post_options.
4302         (java_post_options): Similarly.
4303
4304 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
4305
4306         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
4307         compare file name components depending on the case-sensitivity
4308         or otherwise of the host file system.
4309
4310         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
4311         "strcmp" to compare file name components.
4312         Use IS_DIR_SEPARATOR instead of comparing directly against
4313         DIR_SEPARATOR.
4314         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
4315         comparing directly against DIR_SEPARATOR.
4316
4317 2003-03-04  Tom Tromey  <tromey@redhat.com>
4318
4319         * Make-lang.in (java.tags): New target.
4320
4321 2003-03-01  Roger Sayle  <roger@eyesopen.com>
4322
4323         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
4324         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
4325
4326 2003-03-01  Tom Tromey  <tromey@redhat.com>
4327
4328         * parse.y (jdep_resolve_class): Only check deprecation if we found
4329         a decl.
4330
4331 2003-02-28  Tom Tromey  <tromey@redhat.com>
4332
4333         PR java/9695:
4334         * class.c (maybe_layout_super_class): Always pass a WFL to
4335         do_resolve_class.
4336         * parse.y (do_resolve_class): Updated comment to explain
4337         parameters.
4338
4339 2003-02-26  Tom Tromey  <tromey@redhat.com>
4340
4341         * jcf-write.c (generate_classfile): Check whether class is
4342         deprecated before writing attribute count.
4343
4344 2003-02-25  Roger Sayle  <roger@eyesopen.com>
4345
4346         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
4347         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
4348
4349 2003-02-23  Tom Tromey  <tromey@redhat.com>
4350
4351         * lang-options.h: Added -Wdeprecated.
4352         * gcj.texi (Warnings): Document -Wdeprecated.
4353         * java-tree.h (flag_deprecated): Declare.
4354         * lang.c (lang_W_options): Added deprecated.
4355         (flag_deprecated): New global.
4356         * chartables.h: Rebuilt.
4357         * gen-table.pl (process_one): Look at whitespace.
4358         (print_tables): Define LETTER_SPACE, LETTER_MASK.
4359         * parse.h (CLEAR_DEPRECATED): New macro.
4360         (CHECK_DEPRECATED_NO_RESET): New macro.
4361         * jcf-parse.c (handle_deprecated): New function.
4362         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
4363         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
4364         * parse.y (resolve_type_during_patch): Check deprecation.
4365         (jdep_resolve_class): Likewise.
4366         (process_imports): Likewise.
4367         (resolve_expression_name): Likewise.
4368         (check_deprecation): Strip arrays from decl.  Check
4369         flag_deprecated.
4370         (patch_method_invocation): Also check the particular constructor
4371         for deprecation.
4372         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
4373         * jcf-write.c (append_deprecated_attribute): New function.
4374         (generate_classfile): Generate deprecated attribute when
4375         appropriate.
4376         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
4377         (java_lex) [case '*']: Simplify logic.
4378         (java_start_char_p): Use LETTER_MASK.
4379         (java_part_char_p): Likewise.
4380         (java_space_char_p): New function.
4381
4382 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4383
4384         Change base class access representation.
4385         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
4386         (add_interface_do): Likewise.
4387
4388 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
4389
4390         * decl.c (java_init_decl_processing): Change
4391         soft_lookupjnimethod_node to reflect the change in
4392         signature of _Jv_LookupJNIMethod in libjava/jni.cc
4393         * expr.c (build_jni_stub): Calculate and pass the size
4394         on the stack of the arguments to a JNI function. Use
4395         new target macro MODIFY_JNI_METHOD_CALL to allow a
4396         target to modify the call to a JNI method.
4397
4398 2003-02-08  Roger Sayle  <roger@eyesopen.com>
4399
4400         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
4401         instead of basename to avoid compiler warnings on Tru64.
4402
4403 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
4404
4405         * gcj.texi: Update to GFDL 1.2.
4406
4407 2003-01-31  Andrew Haley  <aph@redhat.com>
4408
4409         * parse.y (java_expand_classes): Scan the whole class list looking
4410         for access methods that haven't yet been expanded.
4411
4412 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
4413
4414         Fix for java/4269:
4415
4416         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
4417         to fix bootstrap on sparc-unknown-netbsdelf1.5.
4418         * jcf-parse.c: Likewise.
4419
4420 2003-01-31  Mark Wielaard  <mark@klomp.org>
4421
4422         * gjavah.c (throwable_p): Allocate 1 more byte for string.
4423
4424 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4425
4426         * class.c (make_class): Use BINFO_ELTS.
4427         (set_super_info): Likewse.
4428         (add_interface_do): Likewise.
4429
4430 2003-01-30  Tom Tromey  <tromey@redhat.com>
4431
4432         * jcf-parse.c (read_class): Update identifier's class value if it
4433         changed during parsing.
4434
4435 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
4436
4437         * Make-lang.in (po-generated): Find the targets in $(parsedir).
4438         Propagate change to all other rules as required.
4439         (java/parse-scan.o): Add explicit dependency on
4440         $(parsedir)/java/parse-scan.c .
4441
4442 2003-01-29  Tom Tromey  <tromey@redhat.com>
4443
4444         * parse.y (patch_assignment): Only transform the rhs of an
4445         assignment when compiling to native.
4446
4447 2003-01-28  Tom Tromey  <tromey@redhat.com>
4448
4449         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
4450
4451 2003-01-28  Tom Tromey  <tromey@redhat.com>
4452
4453         * lex.c (java_lex): Don't include UEOF as part of token.
4454         (java_read_unicode): Error if \u sequence prematurely terminated.
4455
4456 2003-01-27  Tom Tromey  <tromey@redhat.com>
4457
4458         * parse.y (java_check_regular_methods): Check for construct after
4459         checking types in throws clause.
4460
4461 2003-01-24  Tom Tromey  <tromey@redhat.com>
4462
4463         * class.c (build_static_field_ref): Only a String or numeric field
4464         can fold to a constant.
4465
4466 2003-01-23  Tom Tromey  <tromey@redhat.com>
4467
4468         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
4469         file name in resource buffer.
4470
4471 2003-01-23  Tom Tromey  <tromey@redhat.com>
4472
4473         * expr.c (build_known_method_ref): Use method's context to find
4474         method table index.
4475
4476 2003-01-23  Tom Tromey  <tromey@redhat.com>
4477
4478         * constants.c (set_constant_entry): Allocated cleared memory.
4479
4480 2003-01-22  Tom Tromey  <tromey@redhat.com>
4481
4482         * java-tree.h: Don't use PARAMS.
4483         * resource.c: Add prototypes for all functions.
4484         (write_resource_constructor): Use `const char *' to avoid
4485         warning.
4486
4487 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
4488
4489         * jcf-parse.c (process_zip_dir): Remove unused variable.
4490
4491 2003-01-22  Tom Tromey  <tromey@redhat.com>
4492
4493         * expr.c (build_invokeinterface): Abort if method's context is not
4494         an interface.
4495
4496 2003-01-22  Tom Tromey  <tromey@redhat.com>
4497
4498         * gcj.texi (Input and output files): Mention non-class entries.
4499         * decl.c (java_init_decl_processing): Call
4500         init_resource_processing.
4501         * java-tree.h (compile_resource_data, write_resource_constructor,
4502         compile_resource_file, init_resource_processing): Declare.
4503         * config-lang.in (gtfiles): Added resource.c.
4504         * Make-lang.in (gt-java-resource.h): New target.
4505         (JAVA_OBJS): Added resource.o.
4506         (java/resource.o): New target.
4507         * resource.c: New file.
4508         * class.c (compile_resource_file): Moved to resource.c.
4509         (registerResource_libfunc): Likewise.
4510         (utf8_decl_list): Mark with GTY; now static.
4511         * jcf-parse.c (classify_zip_file): New function.
4512         (parse_zip_file_entries): Use it; compile .properties files.
4513         (process_zip_dir): Use classify_zip_file and compute_class_name.
4514         Don't write class name into zip directory.
4515         (java_parse_file): Call write_resource_constructor.
4516         (compute_class_name): New function.
4517         * jcf-io.c (read_zip_member): Reindented.
4518
4519 2003-01-21  Tom Tromey  <tromey@redhat.com>
4520
4521         * class.c (supers_all_compiled): New function.
4522         (make_class_data): Use it.
4523
4524 2003-01-21  Tom Tromey  <tromey@redhat.com>
4525
4526         * parse.y (method_header): Native method can't be strictfp.
4527         No method can be transient or volatile.
4528
4529 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4530
4531         Make-lang.in (jvspec.o-warn): Add -Wno-error.
4532
4533 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
4534
4535         * check-init.c: Fix comment typos.
4536         * class.c: Likewise.
4537         * constants.c: Likewise.
4538         * decl.c: Likewise.
4539         * except.c: Likewise.
4540         * expr.c: Likewise.
4541         * java-except.h: Likewise.
4542         * java-tree.h: Likewise.
4543         * javaop.h: Likewise.
4544         * jcf-dump.c: Likewise.
4545         * jcf-io.c: Likewise.
4546         * jcf-parse.c: Likewise.
4547         * jcf-write.c: Likewise.
4548         * lang.c: Likewise.
4549         * mangle.c: Likewise.
4550         * typeck.c: Likewise.
4551         * verify.c: Likewise.
4552
4553 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4554
4555         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
4556         * jcf-write.c: Include "tm_p.h".
4557
4558 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4559
4560         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
4561
4562 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4563
4564         * builtins.c (java_build_function_call_expr): Renamed from
4565         build_function_call_expr.  All callers changed.
4566
4567         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
4568         * jcf-parse.c: Include tm_p.h.
4569
4570         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
4571         warning.
4572
4573 2003-01-14  Tom Tromey  <tromey@redhat.com>
4574
4575         * class.c (make_class_data): Check that super is compiled before
4576         building class reference to it.
4577
4578 2003-01-14  Andrew Haley  <aph@redhat.com>
4579
4580         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4581         varargs function -- correct.
4582
4583 2003-01-14  Andrew Haley  <aph@redhat.com>
4584
4585         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
4586
4587 2003-01-14  Andrew Haley  <aph@redhat.com>
4588
4589         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4590         varargs function -- correct.
4591
4592         * parse.y (patch_assignment): Copy the rhs of an assignment into a
4593         temporary if the RHS is a reference.
4594
4595 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4596
4597         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
4598         * keyword.h: Regenerated.
4599
4600         * All Files: Convert to ISO C style function definitions.
4601
4602 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
4603
4604         * parse.y (check_pkg_class_access): ANSIfy definition.
4605
4606 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4607
4608         * decl.c, parse-scan.y, parse.y: Don't cast return value of
4609         xmalloc et al.
4610
4611         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
4612
4613 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4614
4615         Merge from pch-branch:
4616
4617         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
4618
4619         * Make-lang.in (java/gjavah.o): Update dependencies.
4620         * gjavah.c: Include ggc.h.
4621
4622         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
4623
4624         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
4625         (JCFDUMP_OBJS): Add ggc-none.o.
4626         (java/jcf-dump.o): Depend on GGC_H.
4627         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
4628         CPool substructures.
4629         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
4630         * jcf-dump.c: Include ggc.h.
4631
4632         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
4633
4634         * jcf.h (union cpool_entry): New.
4635         (struct CPool): Use gengtype to mark.  Change field 'data' to be
4636         an array of unions.
4637         (struct JCF): Use gengtype to mark.
4638         (CPOOL_UINT): Update for new cpool_entry type.
4639         (CPOOL_USHORT1): Likewise.
4640         (CPOOL_USHORT2): Likewise.
4641         (CPOOL_FINISH): Use GC to free cpool subfields.
4642         * parse.h (struct parser_ctxt): Mark field current_jcf.
4643         * lex.c (java_init_lex): Use GC to allocate struct JCF.
4644         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
4645         (main_jcf): Use gengtype to mark.
4646         (ggc_mark_jcf): Delete.
4647         (get_constant): Update for new cpool_entry type.
4648         (give_name_to_class): Likewise.
4649         (get_class_constant): Likewise.
4650         (init_outgoing_cpool): Use GGC to allocate struct CPool.
4651         (java_parse_file): Use GGC to allocate struct JCF.
4652         (init_jcf_parse): Don't call ggc_add_root.
4653         * jcf-reader.c (jcf_parse_constant_pool): Update for new
4654         cpool_entry type.
4655         * java-tree.h (current_jcf): Use gengtype to mark.
4656         (CPOOL_UTF): Update for new cpool_entry type.
4657         (outgoing_cpool): Use gengtype to mark.
4658         (struct lang_type): GC struct JCF and struct CPool.
4659         * config-lang.in (gtfiles): Add jcf.h.
4660         * constants.c (find_tree_constant): New.
4661         (set_constant_entry): Allocate cpool subfields using GGC.  Update
4662         for new cpool_entry type.
4663         (find_constant1): Update for new cpool_entry type.
4664         (find_constant2): Likewise.
4665         (find_utf8_constant): Use find_tree_constant.
4666         (find_class_or_string_constant): Remove unnecessary cast to jword.
4667         Update for new cpool_entry type.
4668         (count_constant_pool_bytes): Update for new cpool_entry type.
4669         (write_constant_pool): Likewise.
4670         (alloc_name_constant): Use find_tree_constant.
4671         (build_constants_constructor): Update for new cpool_entry type.
4672
4673         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
4674
4675         * parse.y (mark_parser_ctxt): Delete.
4676         (goal): Don't use ggc_add_root.
4677         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
4678         (java_pop_parser_context): Let GC free parser_ctxt.
4679         (java_parser_context_resume): Likewise.
4680         * parse.h (struct parser_ctxt): Use gengtype to mark.
4681         (ctxp): Likewise.
4682         (ctxp_for_generation): Likewise.
4683         * lex.h (struct java_lc_s): Mark for gengtype.
4684         (java_lexer): Rearrange for gengtype.
4685         * config-lang.in (gtfiles): Add lex.h, parse.h.
4686
4687 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4688
4689         * All Files: Remove PARAMS macro.
4690
4691         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
4692         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
4693         `__STDC__' macros.
4694
4695         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
4696         VA_CLOSE.
4697
4698 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4699
4700         * Make-lang.in (java.install-common, java.uninstall,
4701         java.install-info, java.install-man): Prepend $(DESTDIR)
4702         to destination paths in all (un)installation commands.
4703         (java.install-common): Rewrite $(LN) command to support
4704         DESTDIR with "ln" as well as with "ln -s".
4705
4706 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
4707
4708         * java-tree.h: Protect against multiple inclusion.
4709
4710 2003-01-07  Tom Tromey  <tromey@redhat.com>
4711
4712         * class.c (add_assume_compiled): Don't adjust parent if we're
4713         already at the root of tree.
4714
4715 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4716
4717         * lang.c (dump_compound_expr): Prototype.
4718
4719 2003-01-03  Tom Tromey  <tromey@redhat.com>
4720
4721         Fix for PR java/8712:
4722         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
4723         when simply checking against `null'.
4724
4725 2003-01-03  Tom Tromey  <tromey@redhat.com>
4726
4727         * gcj.texi (Standard Properties): Document http.proxyHost and
4728         http.proxyPort.
4729
4730         * gcj.texi (GNU Classpath Properties): Document new properties.
4731
4732 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4733
4734         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
4735         java/lang-options.h, java/mangle.c, java/mangle_name.c,
4736         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
4737
4738 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4739
4740         * Make-lang.in, boehm.c, buffer.c,
4741           buffer.h, builtins.c, class.c,
4742           config-lang.in, constants.c,
4743           convert.h, decl.c, except.c,
4744           expr.c, java-except.h,
4745           java-tree.h, javaop.def,
4746           jcf-parse.c, jcf-write.c,
4747           jv-scan.c, jvgenmain.c,
4748           jvspec.c, keyword.gperf,
4749           keyword.h, lang-options.h,
4750           lang-specs.h, lang.c, lex.c,
4751           lex.h, mangle.c, mangle_name.c,
4752           parse-scan.y, parse.h, parse.y,
4753           typeck.c, verify.c, xref.c,
4754           xref.h: Replace "GNU CC" with
4755           "GCC" in the copyright header.
4756
4757         * check-init.c, gjavah.c, javaop.h,
4758           jcf-depend.c, jcf-dump.c, jcf-io.c,
4759           jcf-path.c, jcf-reader.c, jcf.h,
4760           zextract.c, zipfile.h: These files are
4761           "part of GCC". Also say "GCC" not "GNU CC".
4762
4763 2002-12-30  DJ Delorie  <dj@redhat.com>
4764
4765         * Make-lang.in: Protect against texi2pod/pod2man failing.
4766
4767 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
4768
4769         * gcj.texi: Use @copying.
4770
4771 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
4772
4773         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
4774         print_cxx_classname.
4775         (print_cxx_classname): Add add_scope parameter.
4776         (print_class_decls): Do not emit a semicolon after the extern
4777         "Java" block.
4778         (process_file): Adjust calls to print_cxx_classname.
4779
4780 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
4781
4782         * gcj.texi: Include Cover Texts in man page.
4783
4784 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
4785
4786         * class.c (build_static_field_ref): Check FIELD_FINAL.
4787
4788         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
4789         instead of current_constant_pool_data_ref.
4790         * java-tree.h (current_constant_pool_data_ref): Undefine.
4791         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
4792         * jcf-parse.c (init_outgoing_cpool): Don't initialize
4793         current_constant_pool_data_ref.
4794
4795         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
4796         not build_internal_class_name.
4797
4798         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
4799         Use it when class ref isn't certain to be compiled.
4800
4801 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
4802
4803         * gcj.texi: Include gcc-common.texi.
4804         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
4805         $(srcdir)/doc/include/gcc-common.texi.
4806
4807 2002-12-22  Anthony Green  <green@redhat.com>
4808
4809         * gcj.texi (Limitations): Add note about org.xml.sax and
4810         org.w3c.dom.
4811
4812 2002-12-20  Tom Tromey  <tromey@redhat.com>
4813
4814         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
4815         where minimum case value is Integer.MIN_VALUE.
4816         Fixes PR java/8955.
4817
4818 2002-12-18  Andrew Haley  <aph@redhat.com>
4819
4820         * parse.y (patch_invoke): Force evaluation order when `check' is
4821         set.  For PR libgcj/8945.
4822
4823 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
4824
4825         * gcj.texi: Change version number to 3.4.
4826
4827 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
4828         Andrew Haley <aph@redhat.com>
4829
4830         * parse.y (source_end_java_method): Remove custom encoding of line
4831         numbers for a function decl before passing it to the back end.
4832
4833 2002-12-03  Andrew Haley  <aph@redhat.com>
4834
4835         * class.c (make_class_data): New field, "chain".
4836         * decl.c (java_init_decl_processing): Likewise.
4837
4838 2002-12-02  Tom Tromey  <tromey@redhat.com>
4839
4840         For PR java/8740:
4841         * parse.y (do_resolve_class): Handle qualified name via
4842         recursion.
4843
4844 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
4845
4846         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
4847         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
4848         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
4849         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
4850         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
4851         Include coretypes.h and tm.h.
4852         * Make-lang.in: Update dependencies.
4853
4854 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4855
4856         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
4857
4858 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
4859
4860         * jcf-reader.c: Don't expand JCF_readu4 inside the
4861         expansion of JCF_SKIP.
4862
4863 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
4864
4865         * jcf-reader.c: Don't expand JCF_readu4 inside the
4866         expansion of JCF_SKIP.
4867
4868 2002-11-22  Tom Tromey  <tromey@redhat.com>
4869
4870         * parse.y (patch_binop): Cast right hand side of shift expression
4871         to `int'.  Fixes PR java/8676.
4872
4873 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
4874             Andrew Haley <aph@redhat.com>
4875
4876         * gcc/java/jcf-write.c (write_classfile): Remove target
4877         class file, if it exists, before renaming the temporary
4878         class file to it.
4879
4880 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
4881
4882         * jvspec.c (lang_specific_spec_functions): New.
4883
4884 2002-11-18  Tom Tromey  <tromey@redhat.com>
4885
4886         Fix for PR java/7912:
4887         * expr.c (can_widen_reference_to): Allow cast of array to
4888         Cloneable or Serializable.
4889         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
4890         (java_io_serializable_identifier_node): Likewise.
4891         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
4892         (valid_ref_assignconv_cast_p): Use new identifier nodes.
4893         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
4894         java_io_serializable.
4895         * decl.c (java_init_decl_processing): Initialize
4896         java_lang_cloneable_identifier_node and
4897         java_io_serializable_identifier_node.
4898         (java_lang_cloneable_identifier_node): New global.
4899         (java_io_serializable_identifier_node): Likewise.
4900
4901 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
4902
4903         * buffer.c: Remove unnecessary casts.
4904         * check-init.c: Likewise.
4905         * class.c: Likewise.
4906         * constants.c: Likewise.
4907         * decl.c: Likewise.
4908         * except.c: Likewise.
4909         * gjavah.c: Likewise.
4910         * jcf-io.c: Likewise.
4911         * jcf-parse.c: Likewise.
4912         * jcf-path.c: Likewise.
4913         * jvspec.c: Likewise.
4914         * lang.c: Likewise.
4915         * lex.c: Likewise.
4916         * verify.c: Likewise.
4917
4918 2002-11-06  Tom Tromey  <tromey@redhat.com>
4919
4920         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
4921         a JNI header.
4922
4923 2002-11-05  Tom Tromey  <tromey@redhat.com>
4924
4925         Fix for PR java/6388.
4926         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
4927         * java-tree.h (enum java_tree_index): New values
4928         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
4929         (decimal_int_max, decimal_long_max): New defines.
4930         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
4931         (error_if_numeric_overflow): Rewrote range checking.
4932         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
4933         decimal_long_max.
4934
4935 2002-11-02  Tom Tromey  <tromey@redhat.com>
4936
4937         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
4938
4939         * class.c (make_method_value): Put class name, not signature, into
4940         `throws' field.  For PR java/8415.
4941
4942 2002-10-24  Tom Tromey  <tromey@redhat.com>
4943
4944         * gcj.texi (Invoking gij): Document --showversion.
4945         (Standard Properties): java.library.path now set.
4946
4947 2002-10-23  Tom Tromey  <tromey@redhat.com>
4948
4949         * gjavah.c (decode_signature_piece): In JNI mode, print
4950         `jobjectArray' when array depth is nonzero.
4951         Fixes PR java/8296.
4952
4953 2002-10-15  Andrew Haley  <aph@redhat.com>
4954
4955         * parse.y (patch_invoke): Call force_evaluation_order on a static
4956         arg list.
4957         (resolve_qualified_expression_name): Call force_evaluation_order
4958         on a arg list that is part of a Qualified Expression Name.
4959
4960         * lang.c (dump_compound_expr): New.
4961         (java_dump_tree): New.
4962
4963 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
4964
4965         * gcj.texi: Added item describing the GCJ runtime property
4966         "gnu.gcj.progname".
4967
4968 2002-10-15  Richard Henderson  <rth@redhat.com>
4969
4970         * jcf-parse.c (get_constant): Fix type warning.
4971
4972 2002-10-15  Andrew Haley  <aph@redhat.com>
4973
4974         * java-tree.h (java_inlining_merge_static_initializers): Declare.
4975         (java_inlining_map_static_initializers): Declare.
4976
4977 2002-10-14  Andrew Haley  <aph@redhat.com>
4978
4979         * tree-inline.c (remap_block): All local class initialization
4980         flags go in the outermost scope.
4981         (expand_call_inline): Call java_inlining_map_static_initializers.
4982         (expand_call_inline): Call java_inlining_merge_static_initializers.
4983         * java/lang.c (merge_init_test_initialization): New.
4984         (java_inlining_merge_static_initializers): New.
4985         (inline_init_test_initialization): New.
4986         (java_inlining_map_static_initializers): New.
4987
4988 2002-10-11  Mark Wielaard  <mark@klomp.org>
4989
4990         * gcj.texi (Compatibility): Add Limitations and Extensions section.
4991
4992 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4993
4994         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
4995
4996 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4997
4998         * parse.y (merge_string_cste): Add parentheses around & within |.
4999
5000 2002-10-08  Tom Tromey  <tromey@redhat.com>
5001
5002         * parse.y (variable_declarator_id): Simplify error path for
5003         array declarator error.  For PR java/8003.
5004
5005 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
5006
5007         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
5008         bug_report_url.
5009
5010 2002-10-08  Andrew Haley  <aph@redhat.com>
5011
5012         * parse.y (attach_init_test_initialization_flags): Check for
5013         error_mark_node.
5014
5015 2002-10-07  Anthony Green  <green@redhat.com>
5016
5017         * parse.y (merge_string_cste): Fix bug in string concatenation.
5018
5019 2002-10-03  Michael Koch  <konqueror@gmx.de>
5020
5021         * gcj.texi (Standard properties):
5022         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
5023
5024 2002-10-02  Roger Sayle  <roger@eyesopen.com>
5025
5026         PR optimization/6627
5027         * lang.c (java_init): If storing the vbit in function
5028         pointers, ensure that force_align_functions_log is atleast
5029         one to aid compatability with g++ vtables.
5030
5031 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
5032
5033         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
5034         foul of type-based aliasing.
5035
5036 2002-09-30  Anthony Green  <green@redhat.com>
5037
5038         * gcj.texi (Invoking jv-scan): Fix texinfo.
5039
5040 2002-09-28  Anthony Green  <green@redhat.com>
5041
5042         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
5043         (Code Generation): Add -fno-assert documentation.
5044         * jv-scan.c (flag_assert): New global.
5045         (options): Add assert option.
5046         (help): Add --no-assert documentation.
5047         * parse-scan.y (flag_assert): New global.
5048         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
5049         (flag_assert): New global.
5050         * java-tree.h (flag_assert): New global.
5051         * lex.c (java_lex): Obey flag_assert.
5052         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
5053         calling cc1.
5054
5055 2002-09-26  Andrew Haley  <aph@redhat.com>
5056
5057         * expr.c (build_java_array_length_access): Check for null pointer.
5058         * expr.c (expand_java_arrayload): Likewise.
5059
5060 2002-09-21  Richard Henderson  <rth@redhat.com>
5061
5062         * jcf-parse.c (get_constant): Decode from IEEE no matter
5063         what the target format.
5064
5065 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
5066
5067         * ChangeLog: Follow spelling conventions.
5068         * class.c: Likewise.
5069         * decl.c: Likewise.
5070         * expr.c: Likewise.
5071         * gjavah.c: Likewise.
5072         * java-tree.h: Likewise.
5073         * jcf-dump.c: Likewise.
5074         * jcf-parse.c: Likewise.
5075         * jvspec.c: Likewise.
5076         * lang.c: Likewise.
5077         * mangle.c: Likewise.
5078         * parse.y: Likewise.
5079
5080 2002-09-17  Tom Tromey  <tromey@redhat.com>
5081
5082         * lex.c (java_read_unicode_collapsing_terminators): Handle case
5083         where \r appears at EOF.  Fixes PR java/7950.
5084
5085 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5086
5087         * jvspec.c (lang_specific_driver): Remove unused variable.
5088
5089 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
5090
5091         * java-tree.h (union lang_tree_node): Add chain_next option.
5092
5093 2002-09-16  Richard Henderson  <rth@redhat.com>
5094
5095         * jcf-parse.c (get_constant): Runtime check for IEEE format;
5096         use new real.h interface.
5097         * jcf-write.c (find_constant_index): Use new real.h interface.
5098         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
5099
5100 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
5101
5102         * lang.c: Follow spelling conventions.
5103
5104 2002-09-11  Per Bothner  <per@bothner.com>
5105
5106         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
5107         constant to the type of the field.
5108         (java_complete_tree):  Remove now-redundant code.
5109
5110         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
5111
5112 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
5113
5114         For PR java/5794:
5115         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
5116         return label if a ret instruction for the jsr has been reached.
5117
5118 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
5119
5120         * parse.y (DIR_SEPARATOR): Don't define.
5121         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
5122
5123 2002-08-28  Andrew Haley  <aph@redhat.com>
5124
5125         * verify.c (verify_jvm_instructions): Allow exception handler
5126         inside code that is being protected, but generate a warning.
5127         * except.c (link_handler): Initialize `expanded' in new eh_range.
5128         (binding_depth, is_class_level, current_pc): Declare extern.
5129
5130 2002-09-01  Mark Wielaard <mark@klomp.org>
5131
5132         * gcj.texi: Add chapter about system properties.
5133         Fixed some typos.
5134
5135 2002-08-26  Tom Tromey  <tromey@redhat.com>
5136
5137         * parse.y (try_builtin_assignconv): Allow narrowing primitive
5138         conversion if RHS_TYPE is byte, short, or char.
5139
5140 2002-08-22  Tom Tromey  <tromey@redhat.com>
5141
5142         * gcj.texi (Invoking gij): Document -cp and -classpath.
5143
5144 2002-08-21  Tom Tromey  <tromey@redhat.com>
5145
5146         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
5147         $(prefix)/share.  For PR libgcj/7633.
5148
5149         For PR java/6005 and PR java/7611:
5150         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
5151         (java_can_use_bit_fields_p): New function.
5152
5153 2002-08-16  Tom Tromey  <tromey@redhat.com>
5154
5155         * gcj.texi (Class Initialization): Mention class initialization of
5156         arrays.
5157
5158 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
5159
5160         * Make-lang.in (java-tree-inline.o): New.
5161         (JAVA_OBJS): Add java-tree-inline.o.
5162         * parse.y (source_end_java_method): Call java_optimize_inline.
5163         (java_expand_method_bodies): Save method's tree in
5164         DECL_SAVED_TREE.
5165         (add_stmt_to_compound): Keep track of the number of statments.
5166         * lang.c (java_init): Enable flag_inline_trees.
5167         (java_post_options): If flag_inline_functions is on, enable
5168         flag_inline_trees instread.
5169         (decl_constant_value): New.
5170         (java_tree_inlining_walk_subtrees): New.
5171         * java-tree.h (DECL_NUM_STMTS): New macro.
5172         (java_optimize_inline): Declare.
5173         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
5174         Handle a LABEL_EXPR.
5175         * decl.c (build_result_decl): If we already have a DECL_RESULT
5176         don't make another.
5177         (dump_function): New.
5178         (java_optimize_inline): New.
5179         (dump_function): New.
5180
5181 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
5182
5183         For PR java/7483:
5184         * parse.y (build_assertion): Invert return from
5185         desiredAssertionStatus.
5186
5187 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5188
5189         * jcf-write.c (get_access_flags): Return correct access flags for
5190         private and protected inner classes.
5191
5192 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5193
5194         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
5195
5196 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
5197
5198         * mangle_name.c: Don't include obstack.h twice.
5199         * xref.c: Don't include obstack.h.
5200
5201 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
5202
5203         * class.c: (permanent_obstack): Delete declaration.
5204         * constants.c: (permanent_obstack): Delete declaration.
5205         * except.c: (permanent_obstack): Delete declaration.
5206         * expr.c: (permanent_obstack): Delete declaration.
5207         * jcf-parse.c: (permanent_obstack): Delete declaration.
5208         (saveable_obstack): Delete declaration.
5209         * parse.h: (permanent_obstack): Delete declaration.
5210         * typeck.c: (permanent_obstack): Delete declaration.
5211
5212 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5213
5214         * gcj.texi (version-gcc): Increase to 3.3.
5215
5216 2002-07-22  Tom Tromey  <tromey@redhat.com>
5217
5218         * lex.c (java_lex): Check for `e' or `E' after 0.
5219
5220 2002-07-21  Richard Henderson  <rth@redhat.com>
5221
5222         * lang.c (java_unsafe_for_reeval): New.
5223         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
5224
5225 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
5226
5227         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
5228         (jcf_path_init): Use GET_ENVIRONMENT.
5229
5230 2002-07-10  Roger Sayle  <roger@eyesopen.com>
5231             Zack Weinberg <zack@codesourcery.com>
5232
5233         * builtins.c (initialize_builtins): Remove defines that
5234         handled C/C++ specific junk hereby removed from builtins.def.
5235
5236 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
5237
5238         * lang.c (java_post_options): Update prototype.
5239
5240 2002-07-05  Roger Sayle  <roger@eyesopen.com>
5241
5242         * builtins.c (initialize_builtins): Ignore the additional
5243         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
5244         the builtins.def file.
5245
5246 2002-07-01  Tom Tromey  <tromey@redhat.com>
5247
5248         For PR libgcj/7073:
5249         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
5250         specially.
5251
5252 2002-07-01  Roger Sayle  <roger@eyesopen.com>
5253
5254         * java/decl.c (builtin_function): Accept additional parameter.
5255         (java_init_decl_processing): Pass an additional NULL_TREE
5256         argument to builtin_function.
5257
5258 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
5259
5260         * gcj.texi: Fixed gcj invocation example so that it compiles.
5261
5262 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5263
5264         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
5265         * parse.y (mark_parser_ctxt): Likewise.
5266         (check_modifiers, declare_local_variables): Avoid incorrect
5267         hardcoded constant 10.
5268
5269         * lex.c (java_read_char): Avoid "comparison is always true"
5270         warning.
5271
5272 2002-06-25  Andreas Schwab  <schwab@suse.de>
5273
5274         * expr.c (JSR): Avoid undefined operation on PC.
5275
5276 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5277
5278         * decl.c (clear_binding_level): Const-ify.
5279
5280 2002-06-13  Akim Demaille  <akim@epita.fr>
5281
5282         * parse.y (class_declaration, interface_declaration): Make sure
5283         all their rules have an action, in order to avoid meaningless `$$
5284         = $1' and their type clashes.
5285
5286 2002-06-11  Tom Tromey  <tromey@redhat.com>
5287
5288         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
5289         * parse-scan.y (statement_without_trailing_substatement): Added
5290         assert_statement.
5291         (assert_statement): New rule.
5292         * java-tree.h (struct lang_type) [assertions]: New field.
5293         (TYPE_USES_ASSERTIONS): New macro.
5294         (CLASS_USES_ASSERTIONS): Likewise.
5295         (FIELD_SYNTHETIC): New define.
5296         * lex.c (java_lval;): Added ASSERT_TK.
5297         * parse.y (ASSERT_TK): Added.
5298         (statement_without_trailing_substatement): Added assert_statement.
5299         (assert_statement): New rule.
5300         (build_assertion): New function.
5301         (maybe_generate_pre_expand_clinit): Create and initialize
5302         $assertionsDisabled.
5303         (lookup_package_type): Removed decl.
5304         * keyword.h: Rebuilt.
5305         * keyword.gperf (assert): New token.
5306
5307 2002-06-10  Akim Demaille  <akim@epita.fr>
5308
5309         * parse.y (interface_type_list, class_member_declaration)
5310         (unary_expression_not_plus_minus): Remove duplicate %type.
5311         Whitespace changes.
5312
5313 2002-06-09  Tom Tromey  <tromey@redhat.com>
5314
5315         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
5316
5317         * parse.y (method_header): Give error message in all cases.
5318         Fixes PR java/6865.
5319
5320 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5321
5322         Don't use RTL inlining. Fix for PR java/6820.
5323         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
5324         (flag_really_inline): New.
5325         (java_decode_option): Set flag_really_inline if -finline-functions
5326         is seen.
5327         (java_post_options): New function. Turn off inlining unless
5328         flag_really_inline is set.
5329
5330 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5331
5332         * gjavah.c (throwable_p): Accept argument as either a classname or
5333         signature fragment. Create null-terminated classname string for super
5334         when calling itself recursively.
5335         (decode_signature_piece): Skip first character from class name
5336         signature when calling throwable_p.
5337
5338 2002-06-08  H.J. Lu  (hjl@gnu.org)
5339
5340         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
5341
5342 2002-06-04  Tom Tromey  <tromey@redhat.com>
5343
5344         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
5345
5346 2002-06-04  Michael Koch  <konqueror@gmx.de>
5347
5348         * gcj.texi (Input Options): Fixed typo.
5349
5350 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
5351
5352         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
5353         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
5354         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
5355         and all now-pointless local variables.  Rename other local
5356         variables to reflect their not being handles.
5357
5358         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
5359         #if JCF_USE_STDIO blocks.
5360
5361         * parse.y: Add missing semicolon at end of rule.
5362
5363 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
5364
5365         * check-init.c (attach_initialized_static_class): Delete, unused.
5366         * parse.y: Use htab_t instead of struct hashtable, update
5367         all uses.
5368         * java-tree.h: Include hashtab.h instead of hash.h.
5369         (struct lang_decl_func): Use htab_t, set up for gengtype.
5370         (struct init_test_hash_entry): Delete.
5371         (struct treetreehash_entry): New.
5372         (java_treetreehash_find): New
5373         (java_treetreehash_new): New prototype.
5374         (java_treetreehash_create): New prototype.
5375         (java_mark_tree): Delete prototype.
5376         (java_hash_hash_tree_node): Delete prototype.
5377         (java_hash_compare_tree_node): Delete prototype.
5378         (attach_initialized_static_class): Delete prototype.
5379         * expr.c (build_class_init): Update to use java_treetreehash
5380         functions.
5381         (java_expand_expr): Update to use htab_t.
5382         (emit_init_test_initialization): Likewise.
5383         * decl.c (java_mark_tree): Delete.
5384         * class.c (init_test_hash_newfunc): Delete.
5385         (java_hash_hash_tree_node): Delete.
5386         (java_hash_compare_tree_node): Delete.
5387         (add_method_1): Update to use java_treetreehash functions.
5388         (JAVA_TREEHASHHASH_H): New macro.
5389         (java_treetreehash_hash): New function.
5390         (java_treetreehash_compare): New function.
5391         (java_treetreehash_find): New function.
5392         (java_treetreehash_new): New function.
5393         (java_treetreehash_create): New function.
5394         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
5395
5396         * Make-lang.in (java/parse.o): Depend on debug.h.
5397         * java-tree.h (struct lang_identifier): Use gengtype.
5398         (union lang_tree_node): New.
5399         (struct lang_decl_func): Use gengtype.
5400         (struct lang_decl_var): Likewise.
5401         (struct lang_decl): Likewise.
5402         * parse.y: Include debug.h.
5403         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
5404
5405         * lang.c (struct language_function): New dummy structure.
5406
5407         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
5408         descriminator for DECL_LANG_SPECIFIC.
5409         (struct lang_decl_func): Rename from struct lang_decl.
5410         (enum lang_decl_desc): New.
5411         (struct lang_decl): Make it a union.  Update all the accessor macros.
5412         (struct lang_type): Use gengtype.
5413         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
5414         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
5415         are now the same size.
5416         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
5417         use discriminator to mark DECL_LANG_SPECIFIC.
5418
5419         * Make-lang.in (gt-java-builtins.h): New rule.
5420         (java/builtins.o): Add dependency on gt-<filename>.h.
5421         * builtins.c: Use gengtype for roots.
5422         (union string_or_tree): Use gengtype.
5423         (struct builtin_record): Use gengtype.
5424         * config-lang.in (gtfiles): Add builtins.c.
5425
5426         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
5427         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
5428         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
5429         gt-java-parse.h, gtype-java.h): Add rules to generate.
5430         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
5431         (class.o): Add dependency on gt-*.h.
5432         (constants.o): Likewise.
5433         (decl.o): Likewise.
5434         (expr.o): Likewise.
5435         (jcf-parse.o): Likewise.
5436         (jcf-write.o): Likewise.
5437         (lang.o): Likewise.
5438         * config-lang.in (gtfiles): New.
5439         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5440         * constants.c: Replace uses of ggc_add_* with GTY markers.
5441         Include gt-*.h.
5442         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5443         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5444         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
5445         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
5446         Include gt-*.h.
5447         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
5448         Include gt-*.h.
5449         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5450         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
5451         gt-*.h.
5452         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
5453         Include gtype-java.h.
5454
5455 2002-06-02  Tom Tromey  <tromey@redhat.com>
5456
5457         Fix for PR java/5913:
5458         * parse.y (patch_binop): Call patch_string on op1.
5459
5460 2002-06-02  Tom Tromey  <tromey@redhat.com>
5461
5462         Fix for PR java/1343, PR java/6336:
5463         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
5464         formatting.  Changed return type.
5465         (anonymous_class_counter): Moved to top of file.
5466         (maybe_make_nested_class_name): Append number to class name for
5467         function-local classes.
5468
5469 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5470
5471         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
5472         * Make-lang.in: Update dependency lists.
5473
5474 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
5475
5476         * gjavah.c (throwable_p): Do not free the name of the class after
5477         passing it to find_class.
5478         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
5479         * jcf-io.c (dirent.h): Include it.
5480         (fnmatch.h): Likewise.
5481         (compare_path): New function.
5482         (java_or_class_file): Likewise.
5483         (memoized_dirlist_entry): New type.
5484         (memoized_dirlist_lookup_eq): New function.
5485         (memoized_dirlists): New variable.
5486         (caching_stat): New function.
5487         (memoized_class_lookup_eq): New function.
5488         (memoized_class_lookups): Likewise.
5489         (find_class): Use memoized_class_lookups and caching_stat.
5490         * jcf.h (JCF_USE_SCANDIR): Define.
5491         * parse.y (java_expand_classes): Write the class files in reverse
5492         order.
5493
5494 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5495
5496         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
5497
5498 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
5499
5500         * jcf-write.c (write_classfile): Unlink the temporary file if it
5501         cannot be renamed.  Use concat to build up the name of the
5502         temporary file.
5503
5504 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
5505
5506         * jcf-write.c (write_classfile): Write the file to a
5507         temporary file and then rename it.
5508
5509 2002-05-07  Tom Tromey  <tromey@redhat.com>
5510
5511         * gjavah.c (throwable_p): Use xstrdup, not strdup.
5512
5513         Fix for PR java/1200:
5514         * gjavah.c (throwable_p): New function.
5515         (decode_signature_piece): Use it.  A `WeakReference' isn't the
5516         same as a `jweak'.
5517         Include hashtab.h.
5518         (gcjh_streq): New function.
5519
5520 2002-05-07  Andreas Jaeger  <aj@suse.de>
5521
5522         * parse.y (finish_for_loop): Fix if statement.
5523
5524 2002-05-06  Tom Tromey  <tromey@redhat.com>
5525
5526         Fix for PR java/5941:
5527         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
5528         loop update expression.
5529         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
5530         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
5531
5532 2002-05-04  Mark Wielaard  <mark@klomp.org>
5533
5534         For PR java/6519:
5535         * parse.y (build_string_concatenation): Return just op1 only when op2
5536         is null and op1 is a STRING_CST, otherwise always construct a
5537         StringBuffer.
5538
5539 2002-04-27  Tom Tromey  <tromey@redhat.com>
5540
5541         For PR java/6382:
5542         * parse.y (string_convert_int_cst): New function.
5543         (merge_string_cste): Use it.
5544
5545 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5546
5547         * java-tree.h (java_parse_file): Update.
5548         (java_set_yydebug): Remove.
5549         * jcf-parse.c (yydebug): Remove.
5550         (java_set_yydebug): Die.
5551         (java_parse_file): Update.
5552         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5553
5554 2002-04-24  Tom Tromey  <tromey@redhat.com>
5555
5556         For PR java/6425:
5557         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
5558         EXPR_WFL_QUALIFICATION of qual_wfl.
5559
5560 2002-04-23  Per Bothner  <per@bothner.com>
5561
5562         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
5563         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
5564         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
5565
5566 2002-04-23  Tom Tromey  <tromey@redhat.com>
5567
5568         For PR java/6314:
5569         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
5570         recognize `-fcompile-resource='.
5571         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
5572         a bit.
5573
5574 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
5575
5576         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
5577         paths. Fixes PR java/2791.
5578
5579 2002-04-19  Andrew Haley  <aph@redhat.com>
5580
5581         * jcf-write.c (push_long_const): lo, hi: New variables.
5582         Use rshift_double to extract the high part of a 64-bit long.
5583         Use WORD_TO_INT to extract the low part.
5584
5585         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
5586         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
5587         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
5588
5589 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5590
5591         * typeck.c (incomplete_type_error): Remove.
5592
5593 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5594
5595         * class.c (make_class_data): Set DECL_ALIGN on static class data,
5596         for hash synchronization.
5597         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
5598         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
5599         class_type_node.
5600
5601 2002-04-16  Mark Wielaard  <mark@klomp.org>
5602
5603         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
5604         negative zero.
5605
5606 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5607
5608         Fix for PR java/6294:
5609         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
5610         interfaces.
5611
5612 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5613
5614         Fix for PR java/6085:
5615         * parse.y (patch_method_invocation): Always use build_access_to_thisn
5616         to get enclosing "this" argument for inner-class constructor
5617         invocation. Pass correct arguments to build_access_to_thisn.
5618
5619 2002-04-10  Andreas Jaeger  <aj@suse.de>
5620
5621         * gcj.texi (Input Options): Fix extdirs patch.
5622
5623 2002-04-10  Anthony Green  <green@redhat.com>
5624
5625         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
5626
5627 2002-04-09  Anthony Green  <green@redhat.com>
5628
5629         * gcj.texi (Input Options): Add --extdirs documentation.
5630         * jcf-dump.c (OPT_extdirs): New macro.
5631         (options): Add extdirs option.
5632         (help): Describe --extdirs.
5633         (main): Handle OPT_extdirs.
5634         * gjavah.c (OPT_extdirs): New macro.
5635         (options): Add extdirs option.
5636         (help): Describe --extdirs.
5637         (main): Handle OPT_extdirs.
5638         * jcf-path.c (jcf_path_init): Add extdirs support.
5639         (jcf_path_extdirs_arg): New function.
5640         (extensions): New variable to hold extensions path entries.
5641         * jvspec.c: Remove -fextdirs= when compiling main().
5642         * lang.c (java_decode_option): Handle -fextdirs=.
5643         * jcf.h (jcf_path_extdirs_arg): Declare new function.
5644         * Make-lang.in: Compile jcf-path with version info for use in
5645         identifying the appropriate libgcj.jar.
5646
5647 2002-04-08  Tom Tromey  <tromey@redhat.com>
5648
5649         For PR libgcj/5303:
5650         * .cvsignore: Added rmic.1 and rmiregistry.1.
5651         * gcj.texi (Top): Link to new nodes.
5652         (Invoking rmic): New node.
5653         (Invoking rmiregistry): Likewise.
5654         * Make-lang.in (java.generated-manpages): Added rmic.1 and
5655         rmiregistry.1.
5656         (java.maintainer-clean): Likewise.
5657         ($(srcdir)/java/rmic.1): New target.
5658         ($(srcdir)/java/rmiregistry.1): Likewise.
5659         (java.install-man): Handle rmic.1 and rmiregistry.1.
5660
5661 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5662
5663         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
5664         Add note about handling uncaught exceptions. Add an exception handler
5665         to example.
5666
5667 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5668
5669         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
5670         after using it to patch CALL_EXPR.
5671
5672 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5673
5674         * gcj.texi (Invocation): Document CNI invocation API.
5675
5676 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5677
5678         * expr.c (truthvalue_conversion): Rename.  Update.
5679         (expand_compare): Update.
5680         * java-tree.h (java_truthvalue_conversion): New.
5681         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5682
5683 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5684
5685         * java-tree.h (java_mark_addressable): New.
5686         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5687         * typeck.c (mark_addressable): Rename, update.
5688
5689 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5690
5691         * expr.c (build_java_binop): Update.
5692         * java-tree.h (java_signed_type, java_unsigned_type,
5693         java_signed_or_unsigned_type): Update.
5694         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5695         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5696         * parse.y (patch_binop): Update.
5697         * typeck.c (signed_or_unsigned_type, unsigned_type,
5698         signed_type): Update.
5699
5700 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5701
5702         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5703         (java_dummy_print): Remove.
5704         (lang_print_error): Rename.  Exit early if inhibiting output.
5705         (inhibit_error_printing_function): New.
5706         (java_init): Don't set hook.
5707         (lang_init_source): Use new boolean.
5708
5709 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
5710
5711         * parse.y (do_resolve_class): Fix infinite recursion.
5712
5713 2002-03-29  Tom Tromey  <tromey@redhat.com>
5714
5715         * parse.y (check_inner_circular_reference): Ignore incomplete
5716         types.
5717
5718 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5719
5720         * Make-lang.in (builtins.o): Update.
5721         * boehm.c (get_boehm_type_descriptor): Update.
5722         * builtins.c: Include langhooks.h.
5723         * decl.c (java_init_decl_processing): Update.
5724         * java-tree.h (java_type_for_mode, java_type_for_size): New.
5725         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
5726         Redefine.
5727         * typeck.c (type_for_mode, type_for_size): Update.
5728
5729 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
5730
5731         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
5732
5733 2002-03-28  Tom Tromey  <tromey@redhat.com>
5734
5735         * except.c (expand_end_java_handler): If the handler type is NULL,
5736         use java.lang.Throwable.  Fixes PR java/5986.
5737
5738 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5739
5740         Fix for PR java/4715:
5741         * jcf-parse.c (parse_source_file_3): New function.
5742         (read_class): Call it.
5743         (java_parse_file): Likewise.
5744
5745 2002-03-28  Jan Hubicka  <jh@suse.cz>
5746
5747         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
5748
5749 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5750
5751         * parse.y (resolve_package): Initialize "decl".
5752         (lookup_package_type): Remove unused function.
5753
5754 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5755
5756         Fix for PR java/5993:
5757         * parse.y (resolve_package): Return the decl if resolution was
5758         successful. Don't special case "java.lang" and "java.lang.reflect"
5759         packages. Set type_name to the merged identifier.
5760         (resolved_qualified_expression_name): Print error using "name" if
5761         resolve_package returns NULL_TREE.
5762
5763 2002-03-27  Tom Tromey  <tromey@redhat.com>
5764
5765         * expr.c (expand_invoke): Don't generate null pointer check if
5766         we're calling <init>.
5767
5768 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5769
5770         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
5771         fix prototype.
5772         * java-tree.h (java_lang_expand_expr): Similarly.
5773         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5774         (java_init): Don't set hook.
5775
5776 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5777
5778         Fix for PR java/5850:
5779         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
5780         context if field was not found in the current scope.
5781         * expr.c (lookup_field): Don't look in enclosing contexts.
5782
5783 2002-03-26  Tom Tromey  <tromey@redhat.com>
5784
5785         Fix for PR java/5942:
5786         * parse.y (init_src_parse): Added sanity check.
5787         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
5788         elements, not 11.
5789
5790 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5791
5792         * decl.c (lang_mark_tree): Rename java_mark_tree.
5793         * java-tree.h (java_mark_tree): New.
5794         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5795
5796 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
5797
5798         * lex.c: Change java_perform_atof to take normal parameters
5799         instead of a pointer to a parameter block.  Call it directly
5800         from java_lex.
5801
5802 2002-03-22  Mark Wielaard  <mark@klomp.org>
5803
5804         Fix for PR java/5368:
5805         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
5806         when printing error message.
5807
5808 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5809
5810         * decl.c (maybe_build_cleanup): Remove.
5811
5812 2002-03-22  Tom Tromey  <tromey@redhat.com>
5813
5814         Andrew Haley  <aph@cambridge.redhat.com>
5815
5816         * expr.c (build_field_ref): Don't build a check if the field is a
5817         member of `this'.
5818
5819 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
5820
5821         Fix for PR java/6026:
5822         * lex.c (java_lex): Fix parsing of consecutive floats.
5823
5824 2002-03-21  Tom Tromey  <tromey@redhat.com>
5825
5826         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
5827         class.
5828
5829 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5830
5831         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5832         insert_block, getdecls, kept_level_p, global_bindings_p): New.
5833
5834 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
5835
5836         * gcj.texi: @code{gcj} becomes @command{gcj}.
5837         @code{gcc} becomes @command{gcc}.
5838         GcjRaw changed to gnu.gcc.RawData.
5839
5840 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5841
5842         * decl.c (start_java_method): Use new hook.
5843         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5844         (java_init): Remove old hook.
5845
5846 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
5847
5848         * builtins.c (define_builtin): Do nothing if `type' is null.
5849         Fixes PR java/5876.
5850
5851 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5852
5853         * parse.y (parser_check_super_interface): Fix error message
5854         grammar/order.
5855
5856 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5857
5858         * jcf-parse.c (get_constant): Delete unused variables.
5859
5860 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5861
5862         * java-tree.h (java_parse_file): New.
5863         * jcf-parse.c (yyparse): Rename java_parse_file.
5864         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5865
5866 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5867
5868         * parse.y (craft_constructor): Return the constructor decl.
5869         (java_expand_classes): Update comments.
5870         (lookup_method_invoke): Call fix_constructors immediately for
5871         anonymous class. Fixes PR java/5935.
5872
5873 2002-03-15  Anthony Green  <green@redhat.com>
5874
5875         * jcf-parse.c (yyparse): Don't emit class registration
5876         constructor when compiling resource files.
5877
5878 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5879
5880         * lang.c (java_tree_code_type, java_tree_code_length,
5881         tree_code_name): Delete.
5882         (tree_code_type, tree_code_length, tree_code_name): Define.
5883         (java_init): Don't try to copy into the various tree_code
5884         arrays.
5885
5886 2002-03-12  Tom Tromey  <tromey@redhat.com>
5887
5888         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
5889         UTF-8, not UCS-2.  Fixes PR java/5923.
5890
5891         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
5892         a call_expr wrapped in a convert.  Fixes PR java/5848.
5893
5894 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5895
5896         * jcf-write.c (write_classfile): Improve error strings.
5897
5898 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
5899
5900         * lex.c: Adjust comments to GNU standards.
5901
5902 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
5903
5904         Fix for PR java/5902:
5905         * lex.c (java_lex): Fix parsing of literals.
5906
5907 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5908
5909         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
5910         to prevent it getting evaluated twice in the store checking case.
5911         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
5912         examining OBJECT.
5913
5914 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5915
5916         * decl.c (java_init_decl_processing): Make sure class_type_node
5917         alignment is not less than 64 bits if hash synchronization is enabled.
5918
5919 2002-03-08  Per Bothner  <per@bothner.com>
5920
5921         * parse.y (java_complete_lhs):  Check if patch_assignment
5922         returned an error-mark.
5923
5924         * parse.y (try_builtin_assignconv):  Don't special-case zero.
5925
5926 2002-03-08  Per Bothner  <per@bothner.com>
5927
5928         Fix for PR java/5812.
5929         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
5930         here instead of in JSR macro.  Likewise with load_type_state call.
5931         Do the latter on if the return_pc has been verified (the jsr returns).
5932         (JSR):  Now just call build_java_jsr.
5933
5934 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
5935
5936         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
5937         (java.install-common): Link native driver to
5938         JAVA_TARGET_INSTALL_NAME.
5939
5940 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
5941
5942         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
5943         * builtins.c(sin_builtin): Likewise
5944         * builtins.c(sqrt_builtin): Likewise
5945
5946 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
5947
5948         * java/expr.c, java/jcf-parse.c, java/lex.c:
5949         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
5950         REAL_ARITHMETIC blocks unconditional.  Delete some further
5951         #ifdef blocks predicated on REAL_ARITHMETIC.
5952
5953 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5954
5955         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
5956         explicit sizeof/sizeof.
5957         * decl.c (java_init_decl_processing): Likewise.
5958         * jcf-parse.c (init_jcf_parse): Likewise.
5959         * parse.y (init_src_parse): Likewise.
5960
5961 2002-03-02  Per Bothner  <per@bothner.com>
5962
5963         Make --CLASSPATH by a synonym for --classpath and -classpath.
5964         Implement --bootclasspath.
5965         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
5966         (classpath_l):  Remove.
5967         (jcf_path_CLASSPATH_arg):  Remove.
5968         (jcf_path_bootclasspath_arg):  New function.
5969         (jcf_path_seal):  Simplify accordingly.
5970
5971         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
5972         (jcf_path_CLASSPATH):  Remove declaration.
5973         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
5974         (lang_specific_driver):  Translate -bootclasspath.
5975         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
5976         * lang.c (decode_lang_options):  Do jcf_path_init first.
5977         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
5978         * gjavah.c:  Also handle --bootclasspath.
5979         Handle --CLASSPATH as a synonum for --classpath.
5980         * jcf-dump.c: Likewise.
5981
5982         "." is not part of system path, but is the default for --classpath.
5983         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
5984         (jcf_path_seal):  Add "." if no CLASSPATH specified.
5985
5986         * gcj.texi:  Document changes.
5987
5988 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5989
5990         * expr.c (build_java_arraystore_check): Fix formatting.
5991
5992 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5993
5994         Fix for PR java/5758, java/5632:
5995         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
5996         inner-class separator too.
5997         * parse.y (do_resolve_class): New local `decl_result.'
5998         Progressively build a name for what can have been loaded.
5999
6000 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6001
6002         * expr.c (java_array_data_offset): Removed function.
6003         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
6004         (build_java_array_length_access): Obtain "length" value using a
6005         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
6006         (build_java_arrayaccess): Correct comment. Access "data" using a
6007         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
6008         (build_java_arraystore_check): New function.
6009         (expand_java_arraystore): Use build_java_arraystore_check.
6010         * parse.y (patch_assignment): Simplify code to insert a store check
6011         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
6012         * check-init.c (check_init): Update to reflect that an array length
6013         access is now a COMPONENT_REF.
6014         * gcj.texi (Code Generation): Improve documentation of
6015         -fno-bounds-check. Add documentation for -fno-store-check.
6016         * java-tree.h (flag_store_check): Declare.
6017         (build_java_arraystore_check): Declare.
6018         * lang.c (flag_store_check): Initialize to 1.
6019         (lang_f_options): Add store-check option.
6020         * jvspec.c: Don't pass store-check option to jvgenmain.
6021         * lang-options.h: Add help string for -fno-store-check.
6022
6023 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6024
6025         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
6026         * java-tree.h (java_dup_lang_specific_decl): New.
6027         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6028
6029 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6030
6031         * builtins.c, decl.c: Delete traditional-mode-related code
6032         copied from the C front end but not used, or used only to
6033         permit the compiler to link.
6034
6035 2002-02-22  Tom Tromey  <tromey@redhat.com>
6036
6037         Fix for PR java/2369:
6038         * jvspec.c (verify_class_name): New function.
6039         (lang_specific_driver): Call it.
6040         (JAVA_START_CHAR_P): New macro.
6041         (JAVA_PART_CHAR_P): Likewise.
6042
6043 2002-02-22  Per Bothner  <per@bothner.com>
6044
6045         * class.c:  Change vtable to be more compatible with g++ v3 abi.
6046         (get_dispatch_table):  Prepend offset-to-top (always 0) and
6047         type_info pointer (currently unimplemented hence NULL) to vtable.
6048         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
6049         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
6050         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
6051         (build_dtable_decl):  Add declarations for new fields.
6052
6053 2002-02-20  Per Bothner  <per@bothner.com>
6054
6055         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
6056         to finit$ (otherwise generate_bytecode_insns drops it). However, we
6057         don't need to set it on the COMPOUND_EXPR - the caller does that.
6058
6059 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6060
6061         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
6062         `--CLASSPATH' becomes `--classpath.'
6063         * gjavah.c: Likewise.
6064         * jcf-dump.c: Likewise.
6065         * lang-options.h: Likewise.
6066         * lang.c: Likewise.
6067         * jcf-path.c: Updated comment.
6068         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
6069         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
6070         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
6071         (jcf_path_CLASSPATH_arg): Ditto.
6072         (classpath_u): Updated leading comment.
6073
6074 2002-02-20  Per Bothner  <per@bothner.com>
6075
6076         * builtins.c (check_for_builtin):  New function.
6077         (build_call_or_builtin):  Remove.
6078         * java-tree.h:  Update accordingly.
6079         * expr.c (expand_invoke):  Use build + check_for_builtin instead
6080         of build_call_or_builtin.
6081         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
6082         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
6083         flag (which had caused jcf-write to incorrectly emit invokevirtual).
6084
6085 2002-02-17  Tom Tromey  <tromey@redhat.com>
6086
6087         * java-tree.h (TYPE_STRICTFP): New macro.
6088         (struct lang_type) [strictfp]: New field.
6089         (CLASS_STRICTFP): New macro.
6090         (METHOD_STRICTFP): New macro.
6091         (struct lang_decl) [strictfp]: New field.
6092         * parse.y (method_header): Disallow strictfp constructor or
6093         abstract method.
6094         (STRICT_TK): Move before MODIFIER_TK.
6095         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
6096         (METHOD_MODIFIERS): Likewise.
6097         (INTERFACE_MODIFIERS): Likewise.
6098         * jcf-write.c (get_access_flags): Likewise.
6099         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
6100         (add_method_1): Likewise.
6101         (get_access_flags_from_decl): Likewise.
6102         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
6103         recognize strictfp flag.
6104         * jcf.h (ACC_STRICT): New define.
6105
6106 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
6107
6108         * class.c(build_utf8_ref): Move declaration of decl_size
6109
6110 2002-02-07  Tom Tromey  <tromey@redhat.com>
6111
6112         * gcj.texi (Input Options): --CLASSPATH does not suppress system
6113         path.
6114
6115 2002-02-04  Anthony Green  <green@redhat.com>
6116
6117         * class.c (build_utf8_ref): Put UTF-8 constants into merged
6118         sections if available.
6119
6120 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6121
6122         * parse.y (java_expand_classes): Fix typo in static field loop.
6123
6124 2002-02-02  Richard Henderson  <rth@redhat.com>
6125
6126         * class.c (add_field): Mark static fields external.
6127         (build_class_ref): Remove redundant set.
6128         * parse.y (java_expand_classes): Mark static fields of classes
6129         to be compiled as local.
6130         * jcf-parse.c (parse_class_file): Likewise.
6131
6132 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6133
6134         * gcj.texi (About CNI): New node.
6135
6136 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6137
6138         PR java/5080
6139         * jcf-parse.c : Check for HAVE_LOCALE_H before using
6140         setlocale() with LC_CTYPE as a parameter.
6141         * jv-scan.c: Same.
6142
6143 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
6144
6145         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6146         Follow GNU Coding Standards for --version.
6147
6148 2002-01-28  Tom Tromey  <tromey@redhat.com>
6149
6150         * expr.c (build_jni_stub): Ensure storage for `meth' is
6151         generated.
6152         * parse.y (java_complete_expand_methods): Set
6153         current_function_decl before building JNI stub.
6154
6155 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
6156
6157         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
6158         BUILT_IN_SQRTF.
6159
6160 2002-01-22  Tom Tromey  <tromey@redhat.com>
6161
6162         * decl.c (java_init_decl_processing): Use add_predefined_file.
6163         Predefine RawData.java.
6164         (predef_filenames): Removed.
6165         (java_init_decl_processing): Don't register predef_filenames.
6166         * jcf-parse.c (add_predefined_file): New function.
6167         (predefined_filename_p): Rewrote.
6168         (predefined_filename_p): No longer static.
6169         * decl.c (java_init_decl_processing): Call initialize_builtins.
6170         * Make-lang.in (JAVA_OBJS): Added builtins.o.
6171         (java/builtins.o): New target.
6172         * builtins.c: New file.
6173         * parse.y (patch_invoke): Use build_call_or_builtin.
6174         * java-tree.h (build_call_or_builtin): Declare.
6175         (initialize_builtins): Declare.
6176         (java_set_exception_lang_code): Removed unused declaration.
6177         (PREDEF_FILENAMES_SIZE): Removed.
6178         (java_tree_index): Added JTI_PREDEF_FILENAMES.
6179         (predef_filenames): New define.
6180         (add_predefined_file): Declare.
6181         (predefined_filename_p): Declare.
6182         * expr.c (expand_invoke): Use build_call_or_builtin.
6183
6184 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6185
6186         * parse.y (patch_switch_statement): Fix format specifier.
6187
6188 2002-01-16  Tom Tromey  <tromey@redhat.com>
6189
6190         More for PR java/5365:
6191         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
6192         default.
6193         (process_file): Generate include for
6194         java.lang.UnsupportedOperationExceptions.
6195
6196 2002-01-15  Andreas Jaeger  <aj@suse.de>
6197
6198         * .cvsignore: Add man pages.
6199
6200 2002-01-15  Tom Tromey  <tromey@redhat.com>
6201
6202         Fix for PR java/5365:
6203         * gjavah.c (process_file): Turn class name into a file name.
6204
6205 2002-01-14  Matthias Klose  <doko@debian.org>
6206
6207         * gcj.texi: Fix whitespace and formatting errors in the
6208         synopsis of the man pages. Update copyright.
6209
6210 2002-01-14  Tom Tromey  <tromey@redhat.com>
6211
6212         For PR libgcj/5303:
6213         * Make-lang.in (java.install-man): Handle jv-convert man page.
6214         (java.generated-manpages): Added jv-convert.1.
6215         (java.uninstall): Remove jv-convert.1.
6216         (java.maintainer-clean): Likewise.
6217         ($(srcdir)/java/jv-convert.1): New target.
6218         * gcj.texi (Top): Link to jv-convert node.
6219         (Individual utilities): Likewise.
6220         (Invoking jv-convert): New node.
6221
6222 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
6223             Martin Kahlert  <martin.kahlert@infineon.com>
6224
6225         * jcf-parse.c (get_constant): Don't swap lo/hi for big
6226         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
6227
6228 2002-01-03  Graham Stott  <grahams@redhat.com>
6229
6230         * class.c (compile_resource_file): Update copyright date.
6231         Constify filename parameter.
6232         (java-tree.h): Update copyright date.
6233         (compile_resource_file): Constify filename parameter.
6234
6235 2002-01-03  Graham Stott  <grahams@redhat.com>
6236
6237         * gcc/jcf-parse.c: Update copyright date.
6238         (yyparse): Constify resource_filename.
6239
6240 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6241
6242         * parse.y (src_parse_roots): Don't needlessly zero init.
6243
6244 2001-12-31  Tom Tromey  <tromey@redhat.com>
6245
6246         * parse.y (dump_java_tree): New function.
6247         (source_end_java_method): Call it.
6248         (end_class_declaration): Likewise.
6249         * lang.c (java_decode_option): Call dump_switch_p.
6250
6251 2001-12-28  Tom Tromey  <tromey@redhat.com>
6252
6253         * gen-table.pl: Don't process characters after \uffff.  Added
6254         comment pointing to input file.
6255
6256 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6257
6258         * gen-table.pl: Const-ify output.  Document the location of a
6259         suitable unicode input file.
6260
6261         * chartables.h: Regenerate.
6262
6263 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6264
6265         * chartables.h: Const-ify.
6266         * gjavah.c (options): Likewise.
6267         * jcf-dump.c (options): Likewise.
6268         * jv-scan.c (options): Likewise.
6269         * lex.c (java_start_char_p, java_part_char_p): Likewise.
6270         * parse.y (binop_lookup): Likewise.
6271
6272 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6273
6274         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
6275         the static arrays that are output.
6276         * jvspec.c (jvgenmain_spec): Make static.
6277         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
6278         * keyword.h: Regenerate.
6279         * lang.c (string_option, process_option_with_no, lang_f_options,
6280         lang_W_options): Const-ify.
6281         * lex.c (java_lex): Likewise.
6282
6283 2001-12-21  Richard Henderson  <rth@redhat.com>
6284
6285         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
6286         (get_boehm_type_descriptor): ... here.  Arrange for the
6287         TREE_TYPE to get set properly.
6288
6289 2001-12-21  Richard Henderson  <rth@redhat.com>
6290
6291         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
6292         only if the target requires collect2.
6293
6294         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
6295
6296 2001-12-20  Tom Tromey  <tromey@redhat.com>
6297
6298         For PR java/4509:
6299         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
6300         CAN_COMPLETE_NORMALLY for the node.
6301         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
6302         generate code for second branch if first branch can't complete
6303         normally.
6304         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
6305         the loop head if the loop body can't complete normally.
6306
6307 2001-12-20  Tom Tromey  <tromey@redhat.com>
6308
6309         For PR java/4766:
6310         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
6311         case where `finally' clause can't complete normally.
6312
6313 2001-12-20  Tom Tromey  <tromey@redhat.com>
6314
6315         Fixes PR java/5057:
6316         * parse.y (analyze_clinit_body): Added this_class parameter.
6317         Check for more cases where we must keep <clinit>.
6318         (maybe_yank_clinit): Cleaned up flow control.
6319
6320 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6321
6322         * decl.c (java_init_decl_processing): Don't initialize
6323         finit_leg_identifier_node.
6324         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
6325         (finit_leg_identifier_node): Remove.
6326         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
6327
6328 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6329
6330         * mangle.c (mangle_member_name): Don't special-case for
6331         NO_DOLLAR_IN_LABEL.
6332         * mangle_name.c (unicode_mangling_length): Likewise.
6333         (append_unicode_mangled_name): Likewise.
6334         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
6335         code.
6336
6337 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6338
6339         * expr.c (build_java_array_length_access): Don't force null pointer
6340         check unless flag_check_references is set.
6341
6342 2001-12-20  Tom Tromey  <tromey@redhat.com>
6343
6344         Fix for PR java/3417:
6345         * parse.y (patch_assignment): Added special processing for
6346         `return'.
6347         (patch_return): Don't convert booleans to integers, and don't
6348         special-case `null'.
6349
6350 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6351
6352         * config-lang.in (diff_excludes): Remove.
6353
6354 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6355
6356         * gcj.texi: Update link to GCC manual.
6357
6358 2001-12-17  Tom Tromey  <tromey@redhat.com>
6359
6360         * parse.y (link_nested_class_to_enclosing): Removed useless
6361         statement.
6362
6363 2001-12-16  Tom Tromey  <tromey@redhat.com>
6364
6365         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
6366         Fixes PR java/5088.
6367
6368 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6369
6370         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
6371         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
6372         spelling errors.
6373
6374 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6375
6376         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
6377
6378 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6379
6380         * decl.c (java_init_decl_processing): Build otable_type correctly.
6381         otable_decl is an otable_type.
6382
6383 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6384
6385         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
6386         otable_type, otable_ptr_type, method_symbol_type,
6387         method_symbols_array_type, method_symbols_array_ptr_type): New
6388         field/global tree definitions.
6389         (flag_indirect_dispatch): New flag.
6390         * decl.c (java_init_decl_processing): Initialize new otable and
6391         otable_syms type nodes and decls. Add new field "index" to
6392         method_type_node.
6393         * class.c (build_method_symbols_entry): New function.
6394         (make_method_value): Set "index" to to method's vtable index for
6395         virtual methods when indirect-dispatch is not used.
6396         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
6397         and set vtable_method_count to -1. Set otable and otable_syms field
6398         if indirect-dispatch is used and there was something to put in them.
6399         (build_method_symbols_entry): New function.
6400         (emit_offset_symbol_table): New function.
6401         * expr.c (get_offset_table_index): New function.
6402         (build_invokevirtual): Build array reference to otable at the index
6403         returned by get_offset_table_index, and use the result as the vtable
6404         offset.
6405         (build_invokeinterface): Similar.
6406         * jcf-parse.c (yyparse): If indirect-dispatch, call
6407         emit_offset_symbol_table at the end of compilation, after all classes
6408         have been generated.
6409         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
6410         * lang.c (flag_indirect_dispatch): Define.
6411         (lang_f_options): Add indirect-dispatch flag.
6412
6413 2001-12-14  Matthias Klose  <doko@debian.org>
6414
6415         * gcj.texi: Markup for man page generation. Document missing
6416         options printed by <tool> --help.
6417         Terminate description of gij's -ms option with a dot.
6418         * Make-lang.in ($(srcdir)/java/*.1): New targets.
6419         (java.generated-manpages java.install-man, java.uninstall,
6420         java-maintainer-clean) Updated.
6421
6422 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
6423
6424         * class.c (get_dispatch_table): Fix java vtable layout
6425         for TARGET_VTABLE_USES_DESCRIPTORS.
6426         * decl.c (java_init_decl_processing): Initialize
6427         alloc_no_finalizer_node, finalize_identifier_node.
6428         * expr.c (class_has_finalize_method): New function.
6429         (expand_java_NEW): Generate calls for finalizer-free allocation.
6430         (build_invokevirtual): Fix java vtable layout for
6431         TARGET_VTABLE_USES_DESCRIPTORS.
6432         * java-tree.h (enum java_tree_index): New entries:
6433         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
6434         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
6435         (class_has_finalize_method): declare.
6436         (HAS_FINALIZER_P): New macro.
6437         * parse.y (patch_invoke): Generate calls for finalizer-free
6438         allocation.
6439
6440 2001-12-12  Matthias Klose  <doko@debian.org>
6441
6442         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
6443         whitespace at end of line.
6444
6445 2001-12-11  Tom Tromey  <tromey@redhat.com>
6446
6447         * lex.c (java_init_lex): Define wfl_to_string as
6448         gnu.gcj.runtime.StringBuffer unless generating bytecode.
6449
6450 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
6451
6452         * class.c (make_method_value): Use null_pointer_node to
6453         represent empty exception table.
6454
6455 2001-12-10  Tom Tromey  <tromey@redhat.com>
6456
6457         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
6458
6459 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
6460
6461         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
6462
6463 2001-12-09  Per Bothner  <per@bothner.com>
6464
6465         * check-init.c (current_switch_has_default):  New static field.
6466         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
6467         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
6468         DEFAULT_EXPR seen, simulate a default alternative that copies state.
6469
6470 2001-12-09  Tom Tromey  <tromey@redhat.com>
6471
6472         * check-init.c (check_init): Don't allow pre- or post- increment
6473         or decrement of final variable.
6474         (final_assign_error): Minor error message rewording.
6475
6476 2001-12-08  Tom Tromey  <tromey@redhat.com>
6477
6478         * java-tree.h: Fixed typo.
6479
6480         * gjavah.c (decompile_method): Don't decompile to `return this'
6481         for static methods.
6482
6483         * gjavah.c (cxx_keywords): Re-sorted.
6484         * lex.c (cxx_keywords): Re-sorted.
6485
6486         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
6487         else.
6488
6489         * gjavah.c (print_namelet): Clear subnamelets.
6490         (HANDLE_METHOD): Set `method_printed' earlier.
6491
6492 2001-12-07  Tom Tromey  <tromey@redhat.com>
6493
6494         * lang.c (lang_f_options): Added
6495         optimize-static-class-initialization.
6496         (java_decode_option): Removed special case.
6497
6498 2001-12-07  Per Bothner  <per@bothner.com>
6499
6500         * check-init.c (check_init):  Fix typo freeing memory twice.
6501
6502 2001-12-05  Per Bothner  <per@bothner.com>
6503
6504         Restore support for static class initialization optimization.
6505         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
6506         * check-init.c (check_int):  At end of BLOCK handle initialization
6507         blocks, which used to be done in java_complete_expand_method but did
6508         not handle the case where check_for_initialization might allocate
6509         more than a word of bits.
6510         * decl.c (lang_make_tree):  The smic field is now a tree.
6511         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
6512         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
6513
6514         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
6515
6516         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
6517         Change from a hash table to a list.
6518         (struct_lang_decl):  Change field 'smic' to match.
6519         * class.c (add_method_1):  Initialize
6520         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
6521         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
6522         (java_expand_method_bodies): -here, since 'smic' is now a list.
6523         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
6524
6525         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
6526
6527         * class.c (java_hash_compare_tree_node):  Fix casts.
6528
6529 2001-12-04  Per Bothner  <per@bothner.com>
6530
6531         * check-init.c:   Handle definite unassignment to finals in addition
6532         to definite assignment.
6533         (loop_current_locals):  New field.
6534         (num_current_locals, int start_current_locals, num_current_words):
6535         Make static.
6536         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
6537         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
6538         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
6539         (get_variable_decl, check_final_reassigned):  New functions.
6540         (check_init, check_bool_init):  Modify as needed for checking finals.
6541         (check_for_initialization):  Take extra parameter and return void.
6542         Do extra start-up logic to check final fields for assignment.
6543         * parse.y (check_static_final_variable_assignment_flag,
6544         reset_static_final_variable_assignment_flag, check_final_assignment,
6545         check_final_variable_local_assignment_flag,
6546         reset_final_variable_indirect_assignment_flag,
6547         reset_final_variable_global_assignment_flag):  Remove functions.
6548         (java_complete_expand_methods, outer_field_access_fix,
6549         patch_assignment): Remove no-longer used logic.
6550         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
6551         * parse.y (register_fields, java_complete_tree):  Update accordingly.
6552
6553         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
6554         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
6555         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
6556
6557         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
6558
6559         * java-tree.h (DECL FINAL):  New bit-field.
6560         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
6561         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
6562         (DECL_INIT_CALLS_THIS):  New macro.
6563         (struct lang_decl):  New bit-field init_calls_this.
6564         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
6565         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
6566         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
6567         use it for both local variables and final fields.
6568         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
6569         and local_final.
6570         (struct lang_type):  Remove hfv bit-field.
6571         (check_for_initialization):  Change to return void.
6572
6573         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
6574         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
6575         * check-init.c (final_assign_error):  New helper function.
6576         (check_final_reassigned, check_init):  Use it.
6577         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
6578
6579         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
6580         bit-fields to unsigned.
6581
6582 2001-12-03  Per Bothner  <per@bothner.com>
6583
6584         * parse.y (patch_binop):  Minor constant folding.
6585
6586         * parse.y (build_current_thisn):  Shorter 'buffer'.
6587
6588 2001-12-03  Per Bothner  <per@bothner.com>
6589
6590         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
6591         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
6592         * jcf-write.c (generate_bytecode_insns):  Remove support for
6593         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
6594         * check-init.c (check_init):  Likewise.
6595
6596 2001-12-03  Per Bothner  <per@bothner.com>
6597
6598         * verify.c (subroutine_nesting):  New function.
6599         (verify_jvm_instructions):  Use it to fix logic for checking that
6600         we're done with the current subroutine.
6601
6602         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
6603         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
6604
6605 2001-12-03  Per Bothner  <per@bothner.com>
6606
6607         * jcf.h:  Fix obvious typo in comment.
6608         * typeck.c (build_null_signature):  Add comment.
6609
6610 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6611
6612         * expr.c: Remove leading capital from diagnostic messages, as
6613         per GNU coding standards.
6614         * jcf-io.c: Similarly.
6615         * jcf-parse.c: Similarly.
6616         * jv-scan.c: Similarly.
6617         * jvspec.c: Similarly.
6618         * mangle.c: Similarly.
6619
6620 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
6621             Alexandre Petit-Bianco  <apbianco@redhat.com>
6622
6623         * expr.c (build_java_arrayaccess): Call save_expr on array for
6624         correct evaluation order, modified comment, fixed indentation.
6625         * parse.y: (patch_assignment): Correctly extract the array base
6626         from the tree generate by build_java_arrayaccess, added comments.
6627         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
6628         Fixes PR java/3096, PR java/3803, PR java/3965.
6629
6630 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6631
6632         * expr.c (expand_byte_code): Remove trailing periods from messages.
6633         * jcf-parse.c (load_class, jcf_parse): Similarly.
6634         * jcf-write.c (generate_classfile): Similarly.
6635         * lex.c (java_lex): Similarly.
6636
6637 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6638
6639         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
6640
6641 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6642
6643         * Make-lang.in (java.generated-manpages): New dummy target.
6644
6645 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6646
6647         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6648         ASM_FINAL_SPEC.
6649         (lang_specific_pre_link): Use set_input to set input_filename.
6650         Append `main' here.
6651         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6652         (main): Fix definition.
6653         Strip `main' from classname.
6654         Fixes PR java/227.
6655
6656 2001-11-18  Roger Sayle <roger@eyesopen.com>
6657
6658         * parse.h (java_expand_switch): Remove old prototype.
6659
6660 2001-11-18  Tom Tromey  <tromey@redhat.com>
6661
6662         Fix for PR java/1401:
6663         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
6664         arg0 is null.
6665         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
6666         correctly.
6667
6668 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6669
6670         * lang.c (finish_parse): Rename to java_finish.
6671         (LANG_HOOKS_FINISH, java_finish): New.
6672
6673 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6674
6675         * decl.c (init_decl_processing): Rename java_init_decl_processing.
6676         * java-tree.h: New prototype.
6677         * lang.c (java_init): Update prototype.  Combine with old init_parse.
6678
6679 2001-11-13  Tom Tromey  <tromey@redhat.com>
6680
6681         * gjavah.c (method_signature): New global.
6682         (HANDLE_METHOD): Set it.
6683         (decompile_return_statement): New function.
6684         (decompile_method): Use it.
6685         (print_method_info): Removed `synth' argument.
6686
6687 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6688
6689         * java-tree.h (java_set_yydebug): New.
6690         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
6691         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
6692         (print_lang_decl, print_lang_type, print_lang_identifier,
6693         print_lang_statistics, lang_print_xnode): Remove.
6694
6695 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6696
6697         * jcf-parse.c (init_lex): Remove.
6698         * lang.c (language_string, lang_identify): Remove.
6699         (struct lang_hooks): Constify.
6700         (LANG_HOOKS_NAME): Override.
6701         (init_parse): Update.
6702
6703 2001-11-08  Andreas Franck  <afranck@gmx.de>
6704
6705         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
6706         program_transform_name the way suggested by autoconf.
6707         (java.install-common): Also transform auxiliary program names with
6708         program_transform_name.
6709
6710 2001-11-08  Tom Tromey  <tromey@cygnus.com>
6711
6712         * parse.y (trap_overflow_corner_case): New rule.
6713         (unary_expression): Use it.
6714         * lex.c (java_init_lex): Don't set minus_seen.
6715         (yylex): Don't use minus_seen.  Communicate overflow to parser for
6716         it to handle.
6717         (error_if_numeric_overflow): New function.
6718         * parse.h (minus_seen): Removed field.
6719         (JAVA_RADIX10_FLAG): New define.
6720
6721 2001-11-07  Tom Tromey  <tromey@redhat.com>
6722
6723         Patch for PR java/1414:
6724         * parse.y (case_label_list): New global.
6725         (goal): Register case_label_list with GC.
6726         (java_complete_lhs): Save new case on case_label_list.
6727         (patch_switch_statement): Check for duplicate case labels.
6728
6729 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
6730
6731         * parse.y (patch_assignment): Removed unused third argument.
6732         (java_complete_lhs): Removed unused third argument to patch_assignment.
6733
6734 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6735
6736         * lang.c: Include langhooks-def.h.
6737         * Make-lang.in: Update.
6738
6739 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6740
6741         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6742
6743 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6744
6745         * mangle.c (find_compression_record_match): Don't match compression
6746         records for package name elements unless they occur at the start of
6747         the name. Fix for PR java/4717.
6748
6749 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6750
6751         * expr.c (expand_java_field_op): Don't special-case references to
6752         java.lang.PRIMTYPE.TYPE.
6753         (build_primtype_type_ref): Removed.
6754         * java-tree.h (build_primtype_type_ref): Remove prototype.
6755         * parse.y (maybe_build_primttype_type_ref): Removed.
6756         (complete_function_arguments): Don't special-case references to
6757         java.lang.PRIMTYPE.TYPE.
6758         (patch_assignment): Likewise.
6759         (array_constructor_check_entry): Likewise.
6760
6761 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
6762
6763         * mangle.c (static tree compression_table): Fixed leading comment.
6764         * parse.h (struct parser_ctxt): Fixed field comment.
6765         * parse.y (check_pkg_class_access): New prototype, fixed leading
6766         comment, new parameter used to emit error only if passed as true.
6767         (parse_check_super): Pass extra argument to check_pkg_class_access.
6768         (do_resolve_class): Likewise.
6769         (process_imports): Likewise.
6770         (read_import_dir): Fixed indentation.
6771         (find_in_imports_on_demand): New local class_type_name. Local
6772         node_to_use deleted. while loop changed into for loop. Report
6773         multiple definition only for accessible classes. Improved error
6774         message.
6775         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
6776         assigned to parameter list, fixed indentation. while loop changed
6777         into for loop, restore TREE_CHAIN on local `tem' before the next
6778         iteration.
6779
6780 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6781
6782         * lang.c (lang_get_alias_set): Deleted.
6783
6784 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6785
6786         * gjavah.c (jni_print_char): Fix thinko in last change.
6787
6788         * gjavah.c (jni_print_char, decode_signature_piece): Use
6789         safe-ctype macros and/or fold extra calls into fewer ones.
6790         * lex.c (java_read_unicode, java_lex): Likewise.
6791         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
6792         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
6793         * mangle_name.c (append_unicode_mangled_name,
6794         unicode_mangling_length): Likewise.
6795
6796 2001-10-17  Richard Henderson  <rth@redhat.com>
6797
6798         * Make-lang.in (java/lang.o): Depend on langhooks.h.
6799
6800 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
6801
6802         * lang.c (langhooks.h): Included.
6803         (LANG_HOOKS_INIT): Redefined.
6804         (LANG_HOOKS_INIT_OPTIONS): Likewise.
6805         (LANG_HOOKS_DECODE_OPTION): Likewise.
6806         (struct lang_hooks lang_hooks): New initialization.
6807
6808 2001-10-11  Per Bothner  <per@bothner.com>
6809
6810         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
6811         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
6812         The former is simpler, and jcf-write.c handles it better.
6813         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
6814         or WITH_CLEANUP_EXPR.
6815         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
6816         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
6817
6818         * parse.y (patch_if_else_statement):  If the condition is constant,
6819         optimize away the test.
6820
6821 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6822
6823         * parse.y (patch_cast): Call patch_string on the first operand of
6824         the incoming node, update it if necessary. Fixes PR java/4510.
6825
6826 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6827
6828         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
6829         when name qualifier matches a package name.
6830
6831 2001-10-08  Tom Tromey  <tromey@redhat.com>
6832
6833         Fix for PR java/4489:
6834         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
6835         force a new label when computing `body_block'.
6836
6837 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6838
6839         * jcf-io.c (format_uint): Const-ify.
6840         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
6841         * lex.c (java_get_line_col): Likewise.
6842         * parse.y (build_incdec): Likewise.
6843
6844 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
6845
6846         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
6847         a NULL enclosing context if appropriate. Fixes PR java/4466.
6848
6849 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
6850
6851         * parse.y (patch_assignment): Use lvalue's original TYPE when
6852         building the final COMPOUND_EXPR.
6853         (try_reference_assignconv): Fixed leading comment.
6854
6855 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
6856
6857         * parse.y (check_final_variable_indirect_assignment): For
6858         COMPOUND_EXPR, return only if finals were found initialized
6859         properly, if not, keep on checking.
6860         (check_final_variable_global_assignment_flag): New local
6861         error_found, set when appropriate and used to decide whether to
6862         report uninitialized finals. Fixed typo in comment.
6863
6864 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6865
6866         * decl.c (init_decl_processing): Fixed typo in predef_filenames
6867         last three initializations. Fixes PR java/4360.
6868
6869 2001-09-21  Richard Henderson  <rth@redhat.com>
6870
6871         * class.c (get_dispatch_table): Handle function descriptors.
6872         (build_dtable_decl): Likewise.
6873         * expr.c (build_invokevirtual): Likewise.
6874
6875 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
6876
6877         * parse.y (patch_method_invocation): Build class initialization
6878         when static finals are used to qualify method invocation.
6879         Fixes PR java/4366.
6880
6881 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
6882
6883         * parse.h: (WFL_STRIP_BRACKET): Re-written using
6884         build_type_name_from_array_name.
6885         (STRING_STRIP_BRACKETS): New macro.
6886         * parse.y (build_type_name_from_array_name): New function.
6887         (array_creation_expression:): Accumulate []s instead of [s.
6888         (cast_expression:): Accumulate []s instead of [s after cast type
6889         name.
6890         (build_array_from_name): Local string deleted, use
6891         build_type_name_from_array_name.
6892         (build_unresolved_array_type): Accumulate []s instead of [s after
6893         type name.
6894         (register_fields): Fixed comment.
6895         (resolve_class): Local name, base deleted, new locals tname and
6896         array_dims. Use build_type_name_from_array_name. Use array_dims to
6897         build array type.
6898         (purify_type_name): Use STRING_STRIP_BRACKETS.
6899
6900 2001-09-18  Andreas Jaeger  <aj@suse.de>
6901
6902         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
6903         * jv-scan.c: Likewise.
6904
6905 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
6906
6907         * parse.y (patch_method_invocation): Inner class creation context
6908         check not enforced within constructors. Fixes PR java/1873.
6909
6910 2001-09-16  Tom Tromey  <tromey@redhat.com>
6911
6912         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
6913         NOTE_PUSH for single-case push.  Fixes PR java/4189.
6914
6915 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6916
6917         * java-tree.h (TYPE_IMPORT_LIST): New macro.
6918         (TYPE_IMPORT_DEMAND_LIST): Likewise.
6919         (struct lang_type): New fields import_list and import_demand_list.
6920         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
6921         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
6922         (do_resolve_class): New local saved_enclosing_type, initialized,
6923         passed as parameter to find_in_imports and find_in_imports_on_demand.
6924         (find_in_imports): Added paramater enclosing_type, use its
6925         TYPE_IMPORT_LIST when applicable.
6926         (find_in_imports_on_demand): Added parameter enclosing_type, use
6927         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
6928         declaration and initialization.
6929         (fold_constant_for_init): Switch/restore current_class to the
6930         appropriate context.
6931
6932 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
6933
6934         * verify.c (verify_jvm_instructions): Fix typo.
6935
6936 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6937
6938         * expr.c (expand_invoke): Const-ification.
6939         * parse.y (patch_method_invocation): Likewise.
6940
6941 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6942
6943         * gjavah.c (cxx_keywords): Const-ification.
6944         * keyword.gperf (java_keyword): Likewise.
6945         * lang.c (java_tree_code_name): Likewise.
6946         * lex.c (cxx_keywords): Likewise.
6947         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
6948
6949 2001-09-11  Richard Henderson  <rth@redhat.com>
6950
6951         * parse.h (ctxp_for_generation): Mark extern.
6952
6953 2001-09-10  Richard Henderson  <rth@redhat.com>
6954
6955         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
6956
6957 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
6958
6959         * typeck.c (java_array_type_length, build_prim_array_type):
6960         Represent empty arrays by NULL index.
6961
6962 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
6963
6964         * java-tree.h (compile_resource_file): Grouped with other prototypes.
6965         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
6966
6967 2001-09-06  Anthony Green  <green@redhat.com>
6968
6969         * class.c (O_BINARY): Define if necessary.
6970         (registerResource_libfunc): Declare.
6971         (init_class_processing): Initilize registerResource_libfunc.
6972         (compile_resource_file): New function.
6973         * java-tree.h (resource_name): Declare.
6974         (compile_resource_file): Declare.
6975         * jcf-parse.c (yyparse): Handle compiling java resource files.
6976         * lang.c (java_decode_option): Handle -fcompile-resource option.
6977         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
6978         resource files.
6979         * gcj.texi (Code Generation): Add documentation for -R flag.
6980
6981 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
6982
6983         * jcf-write.c (generate_classfile): Issue an error in case of
6984         field/initial value mismatch.
6985         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
6986         being initialized and we're generating bytecode.
6987         (java_complete_lhs): In MODIFY_EXPR section: added comments,
6988         set DECL_INITIAL properly when appropriate.
6989         Fixes PR java/4230
6990         Fixes PR java/4204
6991
6992 2001-09-01  Per Bothner  <per@bothner.com>
6993
6994         * parse.y (maybe_yank_clinit):  A field without an initializer is not
6995         relevant.  All initializers except static final and constant require
6996         <clinit>, regardless of flag_emit_class_files.
6997
6998 2001-08-31  Per Bothner  <per@bothner.com>
6999
7000         * class.c (set_constant_value):  When not emitting class files, then a
7001         String ConstantValue is a utf8const_ptr_type.
7002
7003 2001-08-30  Per Bothner  <per@bothner.com>
7004
7005         * jcf-write.c (generate_classfile):  Check that field is primitive
7006         or string before emitting ConstantValue attribute.
7007
7008 2001-08-30  Per Bothner  <per@bothner.com>
7009
7010         * parse.y (resolve_qualified_expression_name):  If creating a
7011         COMPOUND_EXPR, set it's type correctly.
7012
7013 2001-08-30  Per Bothner  <per@bothner.com>
7014
7015         * jcf-io.c (open_class):  Set filename field.
7016
7017         * jcf-parse,c (parse_class_file):  Set current_function_decl
7018         for better error message when Code attribute is missing.
7019
7020         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
7021         better diagnostics, especially for constructors.
7022
7023 2001-08-30  Per Bothner  <per@bothner.com>
7024
7025         * jcf-write.c (generate_classfile):  Don't write ConstantValue
7026         attribute if field is not final, for compatibility with jdk.
7027
7028         * jcf-write.c (generate_classfile):  Convert ConstantValue values
7029         to correct type.  Work-around for front-end bug.
7030         * class.c (set_constant_value):  Error if constant has wrong type.
7031
7032 2001-08-30  Per Bothner  <per@bothner.com>
7033
7034         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
7035         "Double" are printed at verbosity 1.
7036
7037         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
7038
7039         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
7040
7041 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
7042
7043         * parse.y (patch_assignment): Don't verify final re-assignment here.
7044         (java_complete_lhs): Verify assignments to finals calling
7045         patch_assignment. Verify re-assignments to finals before calling
7046         patch_assignment.
7047
7048 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
7049
7050         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
7051         Fixes PR java/1413
7052
7053 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7054
7055         * lex.c (java_lex): new local found_hex_digits. Set and then used
7056         in test to reject invalid hexadecimal numbers.
7057         * parse.y (java_complete_tree): Prevent unwanted cast with
7058         initialized floating point finals.
7059         (patch_binop): Emit a warning when detecting a division by zero,
7060         mark result not constant, don't simplify non integer division.
7061
7062 2001-08-28  Per Bothner  <per@bothner.com>
7063
7064         * jcf-write.c  (generate_bytecode_insns):  For increments and
7065         decrements just recurse to push constant.  Improvement on Mark's patch.
7066
7067 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
7068
7069         * jcf-write.c (generate_bytecode_insns): Generate an integer to
7070         real conversion for increments and decrements of reals.
7071
7072 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7073
7074         * parse.y (resolve_qualified_expression_name): Handle unresolved
7075         qualified expressions, prevent numerical qualifiers, fixed typo.
7076         Fixes PR java/4141
7077
7078 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
7079
7080         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
7081         don't report anything but deprecated class when marked so. Handle
7082         VAR_DECL.
7083         (patch_method_invocation): Check deprecation on methods and types.
7084         (patch_binop): code becomes an enum tree_code, added default: to
7085         switch to handle that. Detect division by zero, try to fold and
7086         return before using a subroutine.
7087
7088 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
7089
7090         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
7091         file smaller than 4 bytes.
7092         * parse.y (check_inner_circular_reference): New function.
7093         (check_circular_reference): Likewise.
7094         (array_initializer:): Accept {,}.
7095         (java_check_circular_reference): Rewritten using
7096         check_circular_reference and check_inner_circular_reference.
7097         (java_complete_expand_method): Unconditionally save and restore
7098         the unpurged exception list.
7099         (build_dot_class_method_invocation): Unmangle signature parameter.
7100
7101 2001-08-21  Tom Tromey  <tromey@redhat.com>
7102
7103         * decl.c (init_decl_processing): Add `throws' field to method
7104         descriptor.
7105         * class.c (make_method_value): Compute `throws' field for method.
7106
7107 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7108
7109         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
7110         circularity is detected.
7111         (ctors_unchecked_throws_clause_p): Fixed leading comment.
7112
7113 2001-08-17  Richard Henderson  <rth@redhat.com>
7114
7115         * class.c (emit_register_classes): Add align parameter to
7116         call to assemble_integer.
7117
7118 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
7119
7120         * jcf-parse.c (load_class): New locals saved and class_loaded. If
7121         loading a class_or_name fails, try considering an innerclass name
7122         and load the enclosing context.
7123         * parse.y (resolve_inner_class): New function.
7124         (find_as_inner_class): Added leading comment.
7125         (register_incomplete_type): Keep the current context as enclosing
7126         context for JDEP_FIELD dependencies.
7127         (do_resolve_class): Locals new_class_decl and super initialized to
7128         NULL. Call resolve_inner_class, explore the enclosing context
7129         superclass if necessary.
7130         Fixes PR java/4007
7131
7132 2001-08-16  Tom Tromey  <tromey@redhat.com>
7133
7134         * jcf-dump.c (main): Updated for change to jcf_path_seal.
7135         * gjavah.c (main): Updated for change to jcf_path_seal.
7136         * lang.c (version_flag): New global.
7137         (java_decode_option): Recognize `-version'.
7138         (java_init): Update for change to jcf_path_seal.
7139         * jcf.h (jcf_path_seal): Added `print' argument.
7140         * jcf-path.c (jcf_path_seal): Added `print' argument.
7141
7142 2001-08-13  Zack Weinberg  <zackw@panix.com>
7143
7144         * Make-lang.in (java/decl.o): Update dependencies.
7145         * decl.c: Include libfuncs.h, don't include toplev.h.
7146
7147 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7148
7149         * decl.c (init_decl_processing): exception_type_node,
7150         class_not_found_type_node, and no_class_def_found_type_node
7151         initialized. predef_filenames augmented accordingly.
7152         instinit_identifier_node initialized.
7153         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
7154         * java-tree.h (enum java_tree_index): New entries
7155         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
7156         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
7157         (exception_type_node): New macro.
7158         (class_not_found_type_node): Likewise.
7159         (no_class_def_found_type_node): Likewise.
7160         (instinit_identifier_node): Likewise.
7161         (PREDEF_FILENAMES_SIZE): Adjusted.
7162         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
7163         (struct lang_type): Fixed typo in bitfield name.
7164         (DECL_INSTINIT_P): New macro.
7165         (ID_INSTINIT_P): Likewise.
7166         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
7167         attribute.
7168         * parse.y (encapsulate_with_try_catch): New function.
7169         (generate_instinit): Likewise.
7170         (build_instinit_invocation): Likewise.
7171         (ctors_unchecked_throws_clause_p): Likewise.
7172         (add_instance_initializer): Deleted.
7173         (build_instance_initializer): Likewise.
7174         (in_instance_initializer): Likewise.
7175         (check_method_redefinition): instinit$ not to be verified.
7176         (java_complete_expand_methods): Generate instinit$, simplified code.
7177         (build_dot_class_method): Eliminated unnecessary locals. Use
7178         encapsulate_with_try_catch, removed unnecessary code.
7179         (fix_constructors): New local iii. Use build_instinit_invocation.
7180         (patch_method_invocation): Added comment.
7181         (maybe_use_access_method): Don't consider instinit$.
7182         (find_applicable_accessible_methods_list): Shorten the search for
7183         instinit$ too.
7184         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
7185         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
7186         (patch_throw_statement): Likewise. Fixed typo.
7187
7188 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
7189
7190         Revert:
7191         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7192         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7193         ASM_FINAL_SPEC.
7194         (lang_specific_pre_link): Use set_input to set input_filename.
7195         Append `main' here.
7196         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7197         (main): Fix definition.
7198         Strip `main' from classname.
7199         Fixes PR java/227.
7200
7201 2001-08-11  Zack Weinberg  <zackw@panix.com>
7202
7203         * lex.h: Don't include setjmp.h.  Don't define
7204         SET_FLOAT_HANDLER or prototype set_float_handler.
7205
7206 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7207
7208         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
7209         `poplevel' in the right order.
7210
7211 2001-08-09  Richard Henderson  <rth@redhat.com>
7212
7213         * Make-lang.in (class.o): Depend on TARGET_H.
7214         * class.c (emit_register_classes): Use target hooks instead of
7215         assemble_constructor and assemble_destructor.
7216
7217 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
7218
7219         * check-init.c (flags.h): Include
7220         (check_init): Don't report uninitialized static class
7221         initialization flags, don't free bit index when doing static class
7222         initialization optimization.
7223         (check_for_initialization): Return type changed to `unsigned int.'
7224         (attach_initialized_static_class): New function.
7225         * class.c (add_method_1): Create the initialized static class
7226         table if necessary.
7227         (finish_class): Always emit deferred inline methods.
7228         * decl.c (emit_init_test_initialization): Moved to expr.c
7229         (complete_start_java_method): Don't traverse
7230         DECL_FUNCTION_INIT_TEST_TABLE.
7231         (lang_mark_tree): Mark hash tables in function decls.
7232         * expr.c (emit_init_test_initialization): Moved from decl.c.
7233         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
7234         initialization flag, set DECL_CONTEXT and
7235         LOCAL_CLASS_INITIALIZATION_FLAG.
7236         (java_lang_expand_expr): Emit initialization code for static class
7237         initialized flags when entering block, if necessary.
7238         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
7239         * java-tree.h (flag_optimize_sci): New global variable declaration.
7240         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
7241         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
7242         (LOCAL_FINAL_P): Fixed typo in comment.
7243         (FINAL_VARIABLE_P): Likewise.
7244         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
7245         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
7246         (struct lang_decl): New fields `ict', `smic' and `cif.'
7247         (check_for_initialization): New returned value for global.
7248         (attach_initialized_static_class): New global function.
7249         (STATIC_CLASS_INIT_OPT_P): New macro.
7250         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
7251         * lang.c (java_decode_option): Handle
7252         `-fno-optimize-static-class-initialization'
7253         * parse.y (start_complete_expand_method): New function.
7254         (java_expand_method_bodies): Likewise.
7255         (attach_init_test_initialization_flags): Likewise.
7256         (adjust_init_test_initialization): Likewise.
7257         (emit_test_initialization): Likewise.
7258         (java_complete_expand_methods): Nullify abstract and native method
7259         bodies.
7260         (java_complete_expand_method): New locals `fbody', `block_body'
7261         and `exception_copy.' Reorganized: directly return on empty method
7262         bodies, call `start_complete_expand_method', remember definitely
7263         initialized static class in function, don't expand method bodies.
7264         (java_expand_classes): Call `java_expand_method_bodies' before
7265         `finish_class' when compiling to native.
7266         (resolve_expression_name): Use `orig' after building outer class
7267         field access.
7268         (patch_invoke): Remember static method invocations.
7269
7270 2001-08-06  Richard Henderson  <rth@redhat.com>
7271
7272         * class.c (emit_register_classes): Pass a symbol_ref and priority
7273         to assemble_constructor.
7274
7275 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
7276
7277         * java-tree.h (all_class_filename): New macro.
7278         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
7279         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
7280         newly created IDENTIFIER_NODE to `all_class_filename.'
7281
7282 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
7283
7284         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
7285         Use ggc_add_tree_root to register roots.
7286
7287 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7288
7289         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
7290         second operand calling check_init.
7291         * decl.c (complete_start_java_method): Swaped second and third
7292         arguments while creating WITH_CLEANUP_EXPR node.
7293         * jcf-write.c (generate_bytecode_insns): Use second operand
7294         instead of third when handling WITH_CLEANUP_EXPR.
7295         * parse.y (java_complete_lhs): Expand second operand of
7296         WITH_CLEANUP_EXPR nodes.
7297         (patch_synchronized_statement): Swaped second and third arguments
7298         while creating WITH_CLEANUP_EXPR node.
7299
7300 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7301
7302         * parse.y (create_interface): Avoid cyclic inheritance report when
7303         syntax error encountered during class definition.
7304         Fixes PR java/2956
7305
7306 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7307
7308         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7309         ASM_FINAL_SPEC.
7310         (lang_specific_pre_link): Use set_input to set input_filename.
7311         Append `main' here.
7312         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7313         (main): Fix definition.
7314         Strip `main' from classname.
7315         Fixes PR java/227.
7316
7317 2001-07-18  Tom Tromey  <tromey@redhat.com>
7318
7319         For PR java/2812:
7320         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
7321         * lex.c (java_new_lexer): Use ICONV_CONST.
7322         (java_read_char): Likewise.
7323         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
7324         (jv-scan$(exeext)): Likewise.
7325
7326 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
7327
7328         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
7329         * parse.y (check_class_interface_creation): Allow `private' if the
7330         enclosing is not an interface.
7331         (create_interface): Interface tagged public if the enclosing
7332         context is an interface.
7333         (create_class): Class tagged public if the enclosing context
7334         is an interface.
7335         Fixes PR java/2959
7336
7337 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
7338
7339         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
7340         Fixes PR java/2665
7341
7342 2001-07-14  Tim Josling  <tej@melbpc.org.au>
7343
7344         * check-init.c (check_init): Remove references to EXPON_EXPR.
7345
7346 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7347
7348         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
7349         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
7350         Fixes PR java/3602
7351
7352 2001-07-13  Tom Tromey  <tromey@redhat.com>
7353
7354         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
7355         invocation.
7356
7357 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7358
7359         * parse.y (patch_method_invocation): Don't override primary if one
7360         is already provided, but let this$<n> be built. Fixed comment.
7361
7362 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7363
7364         * parse.y (empty_statement:): Report empty statement error only
7365         when found at class declaration level.
7366         Fixes PR java/3635
7367
7368 2001-07-12  Tom Tromey  <tromey@redhat.com>
7369
7370         * expr.c (expand_load_internal): New function.
7371         (LOAD_INTERNAL): Use it.
7372
7373 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
7374
7375         * parse.y (verify_constructor_super): Compare anonymous class ctor
7376         args with `valid_method_invocation_conversion_p.'
7377         Fixes PR java/3285
7378
7379 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
7380
7381         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
7382         `-fsyntax-only.' Fixes PR java/3248
7383
7384 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
7385
7386         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
7387
7388 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
7389
7390         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
7391         current function is static. Fixes PR java/1970
7392
7393 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7394
7395         * parse.y (patch_method_invocation): Add enclosing context to ctor
7396         calls if necessary. Fixes PR java/2953
7397
7398 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7399
7400         * parse.y (resolve_package): Abort if qualified expression member
7401         isn't right.
7402         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
7403         Fixes PR java/1391
7404
7405 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
7406
7407         * verify.c: Don't use // comments.
7408
7409 2001-07-05  Tom Tromey  <tromey@redhat.com>
7410
7411         * lang.c (flag_assume_compiled): Removed.
7412         * java-tree.h (flag_assume_compiled): Removed.
7413         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
7414         -fhash-synchronization, -fuse-divide-subroutine,
7415         -fcheck-references, -femit-class-file, -femit-class-files,
7416         -fassume-compiled.  Updated --encoding information.  Changed
7417         -foutput-class-dir to `-d'.
7418
7419 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
7420
7421         * jcf-parse.c (parse_class_file): Add lineno parameter to
7422         debug_start_source_file call.
7423
7424 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7425
7426         * gcj.texi: Use gpl.texi.
7427         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
7428         dependencies and use doc/include in search path.
7429
7430 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
7431
7432         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
7433         `this'.  If so, don't build instance initializers.
7434
7435 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
7436
7437         * parse.y (resolve_expression_name): Improved error message for
7438         inner class cases. Fixes PR java/1958
7439
7440 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
7441
7442         * lang.c: #include diagnostic.h
7443         (lang_print_error): Add a `diagnostic_context *' parameter.
7444         (java_dummy_print): Likewise.
7445         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
7446
7447 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7448
7449         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
7450         * jcf.h (typedef struct JCF): New bitfield `finished.'
7451         (JCF_FINISH): Set `finished.'
7452         (JCF_ZERO): Reset `finished.'
7453         Fixes PR java/2633
7454
7455 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7456
7457         * parse.y (class_body_declaration:): Don't install empty instance
7458         initializers.
7459         Fixes PR java/1314
7460
7461 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7462
7463         * class.c (set_super_info): Call `set_class_decl_access_flags.'
7464         (set_class_decl_access_flags): New function.
7465         * java-tree.h (set_class_decl_access_flags): New prototype.
7466         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
7467         (parse_class_file): New local `decl_max_locals.' Take wide types
7468         into account to compute DECL_MAX_LOCALS.
7469         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
7470         imports on demand.
7471
7472 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
7473
7474         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
7475
7476 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7477
7478         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
7479         * parse.y (do_resolve_class): Moved comments out to leading comment
7480         section. Removed local `start', New local `_ht' and
7481         `circularity_hash.'  Record `enclosing' in hash table and search
7482         it to detect circularity.  Use `enclosing' as an argument to
7483         `lookup_cl.' Free the hash table when done.
7484
7485 2001-06-19  Tom Tromey  <tromey@redhat.com>
7486
7487         * lex.c (java_read_char): Disallow invalid and overlong
7488         sequences.  Fixes PR java/2319.
7489
7490 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
7491
7492         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
7493
7494 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7495
7496         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
7497         arguments accordingly.
7498
7499 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7500
7501         * gcj.texi: Move contents to just after title page.
7502
7503 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
7504
7505         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
7506         builtin type.
7507         (patch_incomplete_class_ref): Build the class ref, build the class
7508         init if necessary, complete the tree.
7509         Fixes PR java/2605
7510
7511 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7512
7513         * parse.y (lookup_field_wrapper): Test `name' code.
7514         (resolve_qualified_expression_name): Test `qual_wfl' code.
7515         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
7516         handle `qual_wfl' by code.
7517         (maybe_build_primttype_type_ref): Test `wfl' code.
7518
7519 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7520
7521         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
7522         fdl.texi.
7523         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
7524         the dvi file in the java directory.
7525
7526 2001-05-25  Sam TH  <sam@uchicago.edu>
7527
7528         * gen-table.pl javaop.h jcf.h lex.h,
7529         parse.h: Fix header include guards.
7530
7531 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
7532
7533         * jv-scan.c (version): Update copyright year.
7534
7535 2001-05-21  Per Bothner  <per@bothner.com>
7536
7537         * jcf-parse.c (read_class):  If class is from .class or .zip file
7538         and it's already been read, don't push/pop parser context.
7539
7540 2001-05-18  Per Bothner  <per@bothner.com>
7541
7542         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
7543         command line so the jvgenmain-generated main program comes first.
7544
7545 2001-05-15  Tom Tromey  <tromey@redhat.com>
7546
7547         * class.c (build_utf8_ref): Don't generate identifier based on
7548         utf8const contents.
7549
7550 2001-05-12  Richard Henderson  <rth@redhat.com>
7551
7552         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
7553         * expr.c (java_lang_expand_expr): Expand it.
7554         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
7555         calling build_exception_object_ref.
7556         * parse.y (catch_clause_parameter): Likewise.
7557         (build_dot_class_method): Likewise.
7558         (try_reference_assignconv): Likewise.
7559         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
7560         * jcf-write.c (generate_bytecode_insns): Likewise.
7561
7562 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7563
7564         * parse.y (build_unresolved_array_type): Set
7565         EXPR_WFL_QUALIFICATION on the newly created wfl.
7566         Fixes PR java/2538. Fixes PR java/2535.
7567
7568 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7569
7570         * parse.y (fix_constructors): Removed unnecessary assignment to
7571         local. Moved assignment to `this$<n>', fixed comments and
7572         indentation.
7573         (build_wfl_wrap): Fixed indentation.
7574         Fixes PR java/2598, java/2579 and java/2658.
7575
7576 2001-05-03  Mo DeJong  <mdejong@redhat.com>
7577
7578         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
7579         check for byte swap.
7580
7581 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
7582
7583         * expr.c (build_class_init): Move MODIFY_EXPR
7584         outside of COND_EXPR.  Remove variable `call'.
7585
7586 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7587
7588         * decl.c: NULL_PTR -> NULL.
7589         * jcf-write.c: Likewise.
7590
7591 2001-05-01  Tom Tromey  <tromey@redhat.com>
7592
7593         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
7594         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
7595         * gcj.texi: Updated copyright text.  Include fdl.texi.
7596         (Top): Link to new node.
7597
7598 2001-05-01  Per Bothner  <per@bothner.com>
7599
7600         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
7601
7602 2001-05-01  Per Bothner  <per@bothner.com>
7603
7604         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
7605         import_list contains the name, not the TREE_PURPOSE.
7606
7607 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7608
7609         * jcf-io.c (read_zip_member): Cast to long in comparison with
7610         signed value.
7611
7612         * jvspec.c (lang_specific_driver): Initialize variables.
7613
7614         * mangle.c (find_compression_record_match): Likewise.
7615
7616         * typeck.c (build_null_signature): Provide static prototype.  Mark
7617         parameter with ATTRIBUTE_UNUSED.
7618
7619         * verify.c (verify_jvm_instructions): Initialize variable.
7620
7621 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7622
7623         * parse.y (do_resolve_class): Check for cyclic inheritance during
7624         inner class resolution.
7625
7626 2001-04-27  Per Bothner  <per@bothner.com>
7627
7628         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
7629         while iterating, since that could cause gc to lose stuff.
7630
7631 2001-04-26  Per Bothner  <per@bothner.com>
7632
7633         Fix method search wrt scope of inner classes to match JLS2.
7634         * typeck.c (build_null_signature):  New static function.
7635         (has_method):  New function.  Uses build_null_signature and lookup_do.
7636         * java-tree.h (has_method):  New declaration.
7637         * parse.y (find_applicable_accessible_methods_list):  Do not search
7638         context of inner classes here.
7639         (patch_method_invocation):  Search scope, ie. current and outer clases,
7640         for method matching simple name, to find class.
7641
7642 2001-04-26  Per Bothner  <per@bothner.com>
7643
7644         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
7645         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
7646
7647         * constants.c (find_methodref_with_class_index):  New function.
7648         (find_methodref_index):  Use find_methodref_with_class_index.
7649         * java-tree.h (find_methodref_with_class_index):  New declaration.
7650         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
7651         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
7652         If context changed from interface to class, don't use invokeinterface.
7653
7654 2001-04-25  Per Bothner  <per@bothner.com>
7655
7656         * verify.c (verify_jvm_instructions):  For field instructions,
7657         check that field index is valid.  For invoke instructions, check that
7658         method index is valid.
7659
7660 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
7661
7662         * config-lang.in (target_libs): Copy from $libgcj_saved.
7663
7664 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7665
7666         * decl.c (init_decl_processing): Add new class "protectionDomain"
7667         field.
7668         * class.c (make_class_data): Set initial value for "protectionDomain".
7669
7670 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7671
7672         * jvspec.c (lang_specific_driver): Fix memory allocation
7673         deficit, by using concat in lieu of xmalloc/sprintf.
7674
7675 2001-04-20  Per Bothner  <per@bothner.com>
7676
7677         Fixes to compile multiple .class files at once.
7678         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
7679         * java-tree.h (CLASS_PARSED_P):  New macro.
7680         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
7681         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
7682         (read_class):  Avoid some code duplication.
7683         Don't call JCF_FINISH for a .class file - might be needed later.
7684         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
7685         rather than CLASS_LOADED_P, since latter implies class laid out.
7686         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
7687         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
7688
7689 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7690
7691         * Make-lang.in (java/boehm.o): Depend on toplev.h.
7692
7693         * boehm.c: Include toplev.h.
7694
7695 2001-04-06  Tom Tromey  <tromey@redhat.com>
7696             Alexandre Petit-Bianco  <apbianco@redhat.com>
7697
7698         Fix for PR gcj/1404 and PR gcj/2332:
7699         * parse.y (build_array_from_name): If we use the type_wfl then
7700         accumulate dimensions from the original type as well.
7701         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
7702
7703 2001-04-06  Tom Tromey  <tromey@redhat.com>
7704
7705         * parse.y (analyze_clinit_body): Return true if the second operand
7706         of a METHOD_EXPR is nonzero.
7707
7708 2001-04-06  Tom Tromey  <tromey@redhat.com>
7709
7710         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
7711         directory.
7712         ($(srcdir)/java/parse.c): Likewise.
7713
7714 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
7715
7716         * gcj.texi: Use `which-gcj' instead of `which-g77.'
7717         (version-gcc): Initialized.
7718         (which-gcj): Likewise.
7719
7720 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7721
7722         * java-tree.h (struct lang_decl): New macro
7723         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
7724         * parse.y (build_instance_initializer): New function.
7725         (add_instance_initializer): Use it.
7726         (java_fix_constructors): Set `current_class' before fix pass.
7727         (fix_constructors): Just return if already fixed. Move `super()'
7728         invocation ahead. Use `build_instance_initializer.'
7729         Fixes PR java/1315.
7730
7731 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
7732
7733         * parse.y (resolve_qualified_expression_name): Pass field's
7734         DECL_CONTEXT to `not_accessible_p.'
7735         (not_accessible_p): Changed parameters order in `inherits_from_p'
7736         invocation.
7737
7738 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
7739
7740         * lang-options.h: Add flag_check_references.
7741
7742 2001-04-04  Per Bothner  <per@bothner.com>
7743
7744         * java-tree.h (CONSTANT_VALUE_P):  New macro.
7745         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
7746         * parse.y (maybe_build_class_init_for_field):  New static function.
7747         (resolve_expression_name, resolve_field_access):  Use
7748         maybe_build_class_init_for_field instead of build_class_init
7749         This does not do the init if the field is compile-time-constant.
7750         (resolve_field_access):  Simplify.
7751
7752         * parse.y (fold_constant_for_init):  Merge test into switch.
7753
7754 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
7755
7756         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
7757         on gansidecl.h.
7758         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
7759
7760 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
7761
7762         * expr.c (pop_type_0): Save the result of the first
7763         lang_printable_name call in a scratch buffer, so it
7764         won't be clobbered by the second call.
7765
7766 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
7767
7768         * parse-scan.y (array_type:): Rewritten.
7769         (type_declaration:): `empty_statement' replaces `SC_TK.'
7770         (class_member_declaration:): `empty statement' added.
7771         (method_body:): Simplified.
7772         (static_initializer:): Likewise.
7773         (primary_no_new_array:): Use `type_literals.'
7774         (type_literals:): New rule.
7775         (dims:): Set and update `bracket_count.'
7776         Fixes PR java/1074. Fixes PR java/2412.
7777
7778 2001-03-28  Hans Boehm  <boehm@acm.org>
7779
7780         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
7781         (get_boehm_type_descriptor): Set type on returned value to be a
7782         pointer length integer.
7783
7784 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7785
7786         * expr.c (pop_type_0): Call `concat' rather than building the
7787         string manually.
7788         (pop_type): Add format specifier in call to `error'.
7789
7790         * parse.y (patch_method_invocation): Avoid casting away
7791         const-ness.
7792
7793 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
7794
7795         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
7796
7797 2001-03-28  Richard Henderson  <rth@redhat.com>
7798
7799         IA-64 ABI Exception Handling:
7800         * Make-lang.in (except.o): Don't depend on eh-common.h.
7801         * check-init.c (check_init): Handle EXC_PTR_EXPR.
7802         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
7803         [soft_exceptioninfo_call_node]: Remove.
7804         [eh_personality_libfunc, lang_eh_runtime_type]: New.
7805         (end_java_method): No emit_handlers.
7806         * except.c (java_set_exception_lang_code): Remove.
7807         (method_init_exceptions): Don't call it.
7808         (prepare_eh_table_type): No CATCH_ALL_TYPE.
7809         (build_exception_object_ref): New.
7810         (expand_end_java_handler): Update for except.h name changes.
7811         (emit_handlers, expand_resume_after_catch): Remove.
7812         * expr.c (java_lang_expand_expr): Update for except.h name changes.
7813         (process_jvm_instruction): Use build_exception_object_ref.
7814         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
7815         (soft_exceptioninfo_call_node): Remove.
7816         (build_exception_object_ref): Declare.
7817         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
7818         soft_exceptioninfo_call_node.  Move processing ...
7819         [EXC_PTR_EXPR]: ... here.
7820         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
7821         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
7822         (source_end_java_method): No java_set_exception_lang_code or
7823         emit_handlers.
7824         (build_dot_class_method): Use build_exception_object_ref.
7825         (try_reference_assignconv): Check EXC_PTR_EXPR not
7826         soft_exceptioninfo_call_node.
7827
7828 2001-03-28  Richard Henderson  <rth@redhat.com>
7829
7830         * java-tree.h (throw_node): Define as a single member of
7831         java_global_trees instead of a separate array.
7832         (JTI_THROW_NODE): New.
7833         * decl.c (throw_node): Don't declare.
7834         (init_decl_processing): Init a scalar throw_node.
7835         Don't register it for gc.
7836         * check-init.c (check_init): Reference scalar throw_node.
7837         * expr.c (build_java_athrow): Likewise.
7838         * jcf-write.c (generate_bytecode_insns): Likewise.
7839         * parse.h (BUILD_THROW): Likewise.
7840
7841 2001-03-28  Richard Henderson  <rth@redhat.com>
7842
7843         * decl.c (end_java_method): Do not save and restore
7844         flag_non_call_exceptions.
7845         * parse.y (source_end_java_method): Likewise.
7846         * lang.c (flag_exceptions): Don't declare.
7847         (java_init_options): Set flag_non_call_exceptions.  Set
7848         flag_exceptions here ...
7849         (java_init): ... not here.
7850
7851 2001-03-27  Richard Henderson  <rth@redhat.com>
7852
7853         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
7854         exceptions_via_longjmp.
7855
7856         * lang.c (flag_new_exceptions): Don't declare it.
7857         (java_init_options): Or set it.
7858
7859 2001-03-27  Richard Henderson  <rth@redhat.com>
7860
7861         * decl.c (end_java_method): Rename asynchronous_exceptions to
7862         flag_non_call_exceptions.
7863         * parse.y (source_end_java_method): Likewise.
7864
7865 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7866
7867         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7868
7869 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7870
7871         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
7872
7873 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
7874
7875         * parse.y (find_as_inner_class): Follow current package
7876         indications not to mistakingly load an unrelated class.
7877
7878 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7879
7880         * constants.c (PUTN): Use memcpy, not bcopy.
7881
7882         * lex.c (java_read_char): Use memmove, not bcopy.
7883
7884         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
7885
7886 2001-03-23  Per Bothner  <per@bothner.com>
7887
7888         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
7889         macro for better error pin-pointing.
7890         * java-tree.h:  Fix typo in comment.
7891
7892         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
7893         Don't include jsr/goto in exception range.
7894         Check if start and end of exception range are the same (also TRY_EXPR).
7895         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
7896         However, do emit the following goto even if try_block is empty.
7897         Defer freeing exception_decl until after the finalizer, to make
7898         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
7899
7900         * parse.y (java_complete_lhs):  If the try-clause is empty, just
7901         return the finally-clause and vice versa.
7902
7903 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
7904
7905         * gcj.texi (Input Options): documented the check for attribute
7906         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
7907         * java-tree.h (flag_force_classes_archive_check): Declared extern.
7908         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
7909         (jcf_parse): Check for the right classes archive if necessary.
7910         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
7911         (jcf_parse_fields): Fixed indentation.
7912         * jcf-write.c (append_gcj_attribute): New function.
7913         (generate_classfile): Compute the attribute count, invoke
7914         `append_gcj_attribute'.
7915         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
7916         turned into bit-fields. New bit-field `right_zip.'
7917         (JCF_ZERO): Set `right_zip' to zero.
7918         * lang-options.h (-fforce-classes-archive-check): Added flag.
7919         * lang.c (flag_force_classes_archive_check): New flag.
7920         (lang_f_options): New entry `force-classes-archive-check.'
7921         Fixes PR java/1213.
7922
7923 2001-02-07  Andrew Haley  <aph@redhat.com>
7924
7925         * gcj.texi (Configure-time Options): Add -fcheck-references.
7926         * expr.c (build_java_indirect_ref): New function.
7927         (java_check_reference): New function.
7928         (build_java_array_length_access): Use build_java_indirect_ref to
7929         check for null references.
7930         (build_java_arrayaccess): Likewise.
7931         (build_get_class): Likewise.
7932         (build_field_ref): Likewise.
7933         (invoke_build_dtable): Likewise.
7934         (build_invokeinterface): Likewise.
7935         * lang.c (lang_f_options): Add flag_check_references.
7936         * jvspec.c (jvgenmain_spec): Add flag_check_references.
7937         * java-tree.h (flag_check_references): New variable.
7938         * lang.c (flag_check_references): Likewise.
7939         * parse.y (patch_invoke): Use java_check_reference.
7940         (patch_assignment): Allow for extra nesting in
7941         _Jv_CheckArrayStore.
7942
7943 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
7944
7945         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
7946         * lex.c (cxx_keywords): Likewise.
7947
7948 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
7949
7950         * parse.y (qualify_ambiguous_name): Broaden `length'
7951         recognition. Help MODIFY_EXPR be resolved as expression names.
7952         Fixes PR java/2066. Fixes PR java/2400.
7953
7954 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
7955
7956         * gjavah.c (process_file): Mark interface definitions with
7957         "__attribute__ ((java_interface))".
7958
7959 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
7960
7961         * class.c (layout_class): Fixed push_super_field's second
7962         argument. Fixes PR java/2333.
7963         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
7964         too early to lay innerclasses out.
7965
7966 2001-03-20  Tom Tromey  <tromey@redhat.com>
7967             Alexandre Petit-Bianco <apbianco@redhat.com>
7968
7969         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
7970         inside an array reference. Insertion of the array store check
7971         rewritten. Fixes PR java/2299.
7972
7973 2001-03-20  Tom Tromey  <tromey@redhat.com>
7974
7975         * lex.c (java_read_unicode): Only accept leading `u's.
7976
7977 2001-03-20  Tom Tromey  <tromey@redhat.com>
7978
7979         * jcf-parse.c (read_class): Initialize `class'.
7980
7981 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7982
7983         * jcf_parse.c (jcf_parse): Eliminate unused variable.
7984
7985 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7986
7987         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
7988         (layout_class): Likewise.
7989         (layout_class_method): Likewise.
7990         (emit_register_classes): Likewise.
7991         * decl.c (builtin_function): Likewise.
7992         (give_name_to_locals): Likewise.
7993
7994 2001-03-19  Per Bothner  <per@bothner.com>
7995
7996         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
7997         before trying to load an inner class.
7998
7999         Fixes to process to command-line .class files in two passes.
8000         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
8001         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
8002         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
8003         * class.c (is_compiled_class):  Fix for renamed flag.
8004         * parse.y (maybe_create_class_interface_decl):  Likewise.
8005         * jcf-parse.c (yyparse):  Also set if compiling .class files.
8006         * jcf-parse.c (read_class);  Read current_class.
8007         (jcf_parse):  Make static.
8008         (load_inner_classes):  New function, with code moved from jcf_parse,
8009         because we need to inner classes after the command-line files are read.
8010         (yyparse):  Set finput to NULL when it doesn't need to be closed.
8011         Reduce use of main_jcf (basically only for archive) and
8012         use finput instead of main_jcf->read_state.
8013         Inline jcf_figure_file_type into yyparse.
8014         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
8015         Defer load_inner_classes and parse_class_file to a second pass,
8016         after we've correctly mapped command-line .clas fiels to classes.
8017         (jcf_figure_file_type):  Removed.
8018         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
8019         (JCF_ZERO):  Also clear zipd field.
8020         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
8021
8022 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8023
8024         * jcf-parse.c (yyparse): Change ch from char * to char.
8025
8026 2001-03-19  Per Bothner  <per@bothner.com>
8027
8028         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
8029         Add constructed filelist-file at end, following -xjava.  Thus any .o
8030         and library files are not affected by the -xjava.  Also wrap
8031         explicit @FILE with -xjava and -xnone.
8032
8033 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
8034
8035         * class.c (build_static_field_ref): Call make_decl_rtl() after
8036         setting the DECL_EXTERNAL flag.
8037
8038 2001-03-17  Per Bothner  <per@bothner.com>
8039
8040         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
8041
8042         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
8043         when result is is needed (target is STACK_TARGET).
8044
8045         * parse.h (JDEP_SOLV):  Removed.
8046         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
8047
8048         * parse.y (incomplete_class_list): Removed.
8049         (obtain_incomplete_type): Don't use or set incomplete_class_list.
8050         It doesn't work if resolve_class changes the name of an array type
8051         that is on the list and then someone else looks for the modified name.
8052         Also, seems liable to break when compiling multiple source files at
8053         once.  So the simplest is to just remove incomplete_class_list -
8054         it is only a minor space win and it is not even clear it saves time.
8055
8056         * parse.y (resolve_class):  Remove unneeded promote_type.
8057
8058 2001-03-15  Per Bothner  <per@bothner.com>
8059
8060         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
8061         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
8062         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
8063         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8064
8065         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
8066         * parse.y (java_expand_classes):  Likewise.
8067
8068         * parse.y (expand_start_java_method):  Was only called once and had a
8069         misleading name, so inline in caller java_complete_expand_method.
8070         (enter_a_block):  Likewise inline in enter_block and remove.
8071
8072         Remove junk from when gcc/java was created (by copying from C/C++).
8073         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
8074         (struct binding_level):  Remove fields keep, keep_if_subblocks,
8075         more_cleanups_ok, have_cleanups (which have never been used).
8076         (pushlevel, poplevel):  Remove related useless code.
8077
8078         * class.c (make_class_data):  The class_dtable_decl (i.e. the
8079         vtable for Class) should be external, except when compiling Class.
8080
8081         * jvspec.c (lang_specific_driver):  Fix -C handling.
8082         Check -save-temps to see if temp @FILE should be deleted.
8083         Follow-up to/fix for February 16 patch.
8084
8085         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
8086         (type_stack_dup):  Remove no-longer neded error check.
8087
8088 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
8089
8090         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
8091         to 'for_pointer'. If this type is for a pointer (argument) mangling,
8092         don't surround the element with 'N..E' if the type name is
8093         unqualified.
8094
8095 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8096
8097         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
8098         DECL_RTL_SET_P, etc.
8099         (make_method_value): Likewise.
8100         (get_dispatch_table): Likewise.
8101
8102         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8103
8104 2001-03-07  Tom Tromey  <tromey@redhat.com>
8105
8106         * config-lang.in (lang_requires): Define.
8107
8108 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
8109
8110         * typeck.c (convert): Check flag_unsafe_math_optimizations,
8111         not flag_fast_math.
8112
8113 2001-03-05  Per Bothner  <per@bothner.com>
8114
8115         Fix a problem where rest_of_decl_compilation applied to
8116         class_dtable_decl causes problems because it was done too early,
8117         before output file was opened.
8118         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
8119         * class.c (class_dtable_decl):  Add macro - element of class_roots.
8120         (make_class_data):  Define class_dtable_decl.
8121         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
8122
8123 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8124
8125         * java/class.c, java/decl.c, java/java-tree.h: Replace all
8126         uses of 'boolean' with 'bool'.
8127
8128 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8129
8130         * lang-specs.h: Add zero initializer for cpp_spec field to all
8131         array elements.
8132
8133 2001-02-16  Per Bothner  <per@bothner.com>
8134
8135         Handle compiling multiple input files at once, and @FILE syntax.
8136         * gcj.texi:  Updated documentation to match.
8137         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
8138         * jcf-parse.c (parse_source_file):  Split into ...
8139         (parse_source_file_1):  New function - and:
8140         (parse_source_file_2):  New function.
8141         (yyparse):  On -ffilelist-file, open and scan named file.
8142         On first pass over files, only do parse_source_file_1.
8143         A new second pass calls parse_source_file_2 for each file to compile.
8144         (init_jcf_parse):  Call init_src_parse.
8145         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
8146         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
8147         as multiple input file combined in one compilation.
8148         * lang-options.h:  Add -ffilelist-file
8149         * lang.c (flag_filelist_file):  New flag variable.
8150         (lang_f_options):  Handle -ffilelist-file.
8151         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
8152         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
8153         gclass_list - use global fields of src_parse_roots instead.
8154         * parse.y (src_parse_roots):  New array.
8155         (incomplete_class_list, gclass_list):  New macros.
8156         (push_parser_context, java_pop_parser_context,
8157         java_parser_context_resume):  Don't fiddle with deleted fields.
8158         (various):  Use incomplete_class gclass_list and global macros
8159         instead of parse_ctxt fields - the lists are global.
8160         (init_src_parse):  New function.
8161
8162 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8163
8164         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
8165
8166 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8167
8168         * parse.y (check_inner_class_access): Moved declaration of local
8169         `enclosing_decl_type' to the right location.
8170
8171 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
8172
8173         * parse.y (parser_check_super_interface): Don't call
8174         check_pkg_class_access for an inner interface.
8175         (parser_check_super): Don't call check_pkg_class_access for inner
8176         class.
8177         (do_resolve_class): Simplify enclosing type loop. Don't call
8178         check_pkg_class_access if CL and DECL are not set.
8179         (find_in_imports_on_demand): Set DECL if class_type needed to be
8180         loaded. Don't call check_pkg_class_access for an inner class.
8181         (check_inner_class_access): Rewritten to implement member access
8182         rules as per spec 6.6.1.
8183         (check_pkg_class_access): Handle the empty package correctly.
8184         (in_same_package): New function. Determine if two classes are in the
8185         same package.
8186
8187 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
8188
8189         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
8190         method into array types.
8191         * parse.y (patch_method_invocation): Bypass access check on clone call
8192         to array instance.
8193
8194 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8195
8196         * expr.c (build_instanceof): Check for arrays when trying fold to
8197         false.
8198
8199 2001-02-15  Jim Meyering  <meyering@lucent.com>
8200
8201         * Make-lang.in (java.install-common): Depend on `installdirs'.
8202         (java.install-info): Likewise.
8203
8204 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
8205
8206         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
8207
8208 2001-02-14  Tom Tromey  <tromey@redhat.com>
8209             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8210
8211         Fix for PR java/1261.
8212         * typeck.c (build_java_array_type): Add public `clone' method to
8213         arrays.
8214         * parse.y (resolve_qualified_expression_name): Use current_class
8215         when checking for inaccessibility.
8216         (patch_method_invocation): Fixed error message when accessibility
8217         denied.  Added `from_super' argument.
8218
8219 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
8220
8221         * parse.y (resolve_class): Don't build a fake decl. Use the one
8222         already built.
8223         * typeck.c (build_java_array_type): Build and assign decl to array
8224         type.
8225
8226 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
8227
8228         * parse.y (not_accessible_p): Changed leading comment. Added extra
8229         `where' argument. Use it to enforce protected access rules.
8230         (resolve_qualified_expression_name): Added extra argument to
8231         not_accessible_p.
8232         (patch_method_invocation): Use argument `primary' to provide
8233         not_accessible_p with an extra argument.
8234         (lookup_method_invoke): Added extra argument to not_accessible_p.
8235         (search_applicable_method_list): Likewise.
8236
8237 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8238
8239         * parse.y (resolve_qualified_expression_name): Try to resolve as
8240         an inner class access only if `decl' is a TYPE_DECL.
8241
8242 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8243
8244         * decl.c (classdollar_identifier_node): Initialize.
8245         * java-tree.h (enum java_tree_index): New entry
8246         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
8247         (classdollar_identifier_node): New macro.
8248         (ID_CLASSDOLLAR_P): Likewise.
8249         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
8250         (build_dot_class_method_invocation): Likewise.
8251         (find_applicable_accessible_methods_list): `class$' can't be
8252         inherited.
8253
8254 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
8255
8256         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
8257
8258 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8259
8260         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
8261         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
8262         gone.
8263
8264 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8265
8266         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
8267         outside of the `__U' sequence too.
8268         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
8269         sequence too.
8270
8271 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8272
8273         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
8274
8275 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8276
8277         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
8278         (JVGENMAIN_OBJS): Likewise.
8279         * java-tree.h (append_gpp_mangled_name): New prototype.
8280         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
8281         Removed cast calling `gcc_add_root.'
8282         * jvgenmain.c (mangle_obstack): New global, initialized.
8283         (main): Use it.
8284         (do_mangle_class): Constify local `ptr.'
8285         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
8286         append_gpp_mangle_name and update `count' if necessary.
8287         Use `mangle_obstack.'
8288         * mangle.c (append_unicode_mangled_name): Removed.
8289         (append_gpp_mangled_name): Likewise.
8290         (unicode_mangling_length): Likewise.
8291         (mangle_member_name): Return type set to `void.'
8292         (mangle_field_decl): Don't append `U' in escaped names.
8293         (mangle_method_decl): Likewise.
8294         (mangle_member_name): Just use `append_gpp_mangled_name.'
8295         * mangle_name.c: New file.
8296
8297 2001-02-07  Per Bothner  <per@bothner.com>
8298
8299         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
8300
8301         * check-init.c (check_init):  Don't call done_alternative after
8302         processing loop code, as a LOOP_EXPR never terminates normally.
8303
8304 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8305
8306         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
8307
8308 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8309
8310         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
8311         DECLs.
8312
8313 2001-02-06  Tom Tromey  <tromey@redhat.com>
8314
8315         * lex.c (java_new_lexer): Longer error message.
8316
8317 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
8318             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8319
8320         * typeck.c (build_prim_array_type): Added leading comment.
8321         (build_java_array_type): Moved locals out of
8322         block. Always create the `data' field, fixed alignment to match
8323         C++.
8324
8325 2001-02-04  Tom Tromey  <tromey@redhat.com>
8326
8327         * expr.c (java_lang_expand_expr): Don't bother recomputing
8328         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
8329         Fixes PR java/1866.
8330
8331 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8332
8333         * parse.y (process_imports): Save the original name of the import
8334         for better error report.
8335
8336 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
8337
8338         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
8339         of macros used when compiling jvspec.c.
8340         * jvspec.c (lang_specific_driver): Link with the shared
8341         libgcc by default.
8342
8343 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8344
8345         * check-init.c (check_init): Call internal_error instead of fatal.
8346         * expr.c (java_lang_expand_expr): Likewise.
8347         * jcf-parse.c (get_constant): Likewise.
8348         * mangle.c (java_mangle_decl): Likewise.
8349         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
8350         (operator_string): Likewise.
8351         * check-init.c (check_init): Call abort instead of fatal.
8352         * class.c (build_class_ref): Likewise.
8353         * constants.c (write_constant_pool): Likewise.
8354         * decl.c (start_java_method): Likewise.
8355         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
8356         (java_stack_dup, encode_newarray_type): Likewise.
8357         (build_java_array_length_access): Likewise.
8358         (build_java_check_indexed_type, expand_java_pushc): Likewise.
8359         (build_java_soft_divmod, build_invokeinterface): Likewise.
8360         * java-tree.h (INNER_CLASS_P): Likewise.
8361         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
8362         (give_name_to_class, get_class_constant): Likewise.
8363         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
8364         (find_constant_index, generate_bytecode_conditional): Likewise.
8365         (generate_bytecode_insns, perform_relocations): Likewise.
8366         * lex.c (java_unget_unicode, java_lex): Likewise.
8367         * mangle.c (mangle_type, mangle_record_type): Likewise.
8368         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
8369         (finish_mangling): Likewise.
8370         * parse.h (MARK_FINAL_PARMS): Likewise.
8371         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
8372         (obtain_incomplete_type, java_complete_class): Likewise.
8373         (java_check_regular_methods, java_complete_expand_method): Likewise.
8374         (cut_identifier_in_qualified, check_deprecation): Likewise.
8375         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
8376         (java_complete_lhs, lookup_name_in_blocks): Likewise.
8377         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
8378         * typeck.c (set_local_type, parse_signature_type): Likewise.
8379         (parse_signature_string, build_java_signature): Likewise;
8380         (set_java_signature): Likewise.
8381         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
8382         * class.c (add_method): Call fatal_error instead of fatal.
8383         (build_static_field_ref): Likewise.
8384         * expr.c (build_known_method_ref, expand_invoke): Likewise.
8385         * jcf-parse.c (get_constant, jcf_parse): Likewise.
8386         * lex.c (java_new_new_lexer): Likewise.
8387         * jv-scan.c (main): Likewise.
8388         (fatal_error): Renamed from fatal.
8389         * jcf-parse.c (yyparse): Call fatal_io_error instead of
8390         pfatal_with_name.
8391         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
8392         (yyparse): Likewise.
8393         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
8394         * lex.c (java_get_line_col): Likewise.
8395         * jcf-parse.c (load_class): Make errors non-fatal.
8396         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
8397
8398 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
8399
8400         * jvgenmain.c (class_mangling_suffix): Remove unused string.
8401         (error): Remove unused function.
8402         (main): Don't use "__attribute__ alias" on generated class symbol.
8403
8404 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8405
8406         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
8407         argument.
8408         * parse.y (finish_method_declaration): Code accounting for WFLed
8409         method DECL_NAMEs deleted.
8410         (check_abstract_method_definitions): Likewise.
8411         (resolve_type_during_patch): Layout resolved type.
8412         * typeck.c (lookup_do): Removed unused local.
8413
8414 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
8415
8416         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
8417         * decl.c (init_decl_processing): Use integer_minus_one_node, not
8418         integer_negative_one_node.
8419         * expr.c (build_java_binop): Likewise.
8420
8421 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
8422
8423         * zextract.c (read_zip_archive): Read file_offset before writing
8424         zipd and consequently clobbering the header contents.
8425
8426 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8427
8428         * Make-lang.in: Remove all dependencies on defaults.h.
8429         * decl.c: Don't include defaults.h.
8430         * expr.c: Likewise.
8431         * parse.y: Likewise.
8432
8433 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8434
8435         * ChangeLog (2001-01-21): Fixed typo.
8436         * class.c (layout_class_method): Code accounting for WFLed
8437         method DECL_NAMEs deleted.
8438         * constant.c (find_methodref_index): Likewise.
8439         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
8440         * java-tree.h (DECL_FUNCTION_WFL): New macro.
8441         (struct lang_decl): New field `wfl'.
8442         (java_get_real_method_name): Prototype deleted.
8443         * mangle.c (mangle_method_decl): Code accounting for WFLed
8444         method DECL_NAMEs deleted.
8445         * parse.h (GET_METHOD_NAME): Macro deleted.
8446         * parse.y (reset_method_name): Deleted.
8447         (method_header): Set DECL_FUNCTION_WFL.
8448         (check_abstract_method_header): Code accounting for WFLed method
8449         DECL_NAMEs deleted.
8450         (java_get_real_method_name): Deleted.
8451         (check_method_redefinition): Code accounting for WFLed method
8452         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
8453         (java_check_regular_methods): Likewise.
8454         (java_check_abstract_methods): Likewise.
8455         (java_expand_classes): Don't call `reset_method_name.'
8456         (search_applicable_method_list): Use DECL_NAMEs instead of
8457         GET_METHOD_NAME.
8458         * typeck.c (lookup_do): Code accounting for WFLed method
8459         DECL_NAMEs deleted.
8460
8461 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
8462
8463         * lex.c (java_read_char): Check for EOF from getc first.
8464
8465 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8466
8467         * class.c (layout_class): Don't lay the superclass out if it's
8468         already being laid out.
8469         * jcf-parse.c (handle_innerclass_attribute): New function.
8470         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
8471         handle_innerclasses_attribute.
8472         (jcf_parse): Don't load an innerclasses if it's already being
8473         laid out.
8474         * jcf-write.c (append_innerclass_attribute_entry): Static
8475         `anonymous_name' and its initialization deleted. `ocii' and `ini'
8476         to be zero for anonymous classes.
8477
8478 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8479
8480         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
8481         necessary.
8482         * jcf-parse.c (set_source_filename): Use
8483         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
8484
8485 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8486
8487         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
8488         gets a unique asm name.
8489
8490 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8491
8492         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
8493         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8494         if necessary.
8495         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
8496         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
8497         * parse.y (lookup_package_type_and_set_next): Deleted.
8498         (resolve_package): Removed unnecessary code.
8499         (find_applicable_accessible_methods_list): `finit$' can't be
8500         inherited.
8501         * verify.c (pop_argument_types): Added missing prototype.
8502
8503 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
8504
8505         * config-lang.in: Disable java by default.
8506
8507 2001-01-23  Tom Tromey  <tromey@redhat.com>
8508
8509         * gcj.texi (Copying): New node.
8510         Added copyright information.
8511
8512 2001-01-21  Per Bothner  <per@bothner.com>
8513
8514         Various fixes to allow compiling a compressed .jar/.zip archive.
8515         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
8516         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
8517         (struct ZipDirectory):  New field zipf points to owning ZipFile.
8518         * jcf.h (struct ZipDirectory):  Add forward declaration.
8519         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
8520         Remove seen_in_zip and zip_offset fields.
8521         (JCF_SEEN_IN_ZIP):  New macro.
8522         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
8523         * jcf-io.c:  Change all ZipFileCache to ZipFile.
8524         (read_zip_member):  New function.
8525         (open_in_zip):  Call read_zip_member.
8526         * jcf-parse.c (find_in_current_zip):  Remove function.
8527         (read_class):  Merge in find_in_current_zip functionality.
8528         Call read_zip_member if needed.
8529         (parse_zip_file_entries):  Use read_zip_member.
8530         (process_zip_dir):  Update for removed and added JCF fields.
8531         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
8532
8533 2001-01-21  Per Bothner  <per@bothner.com>
8534
8535         Minor optimization of static ggc roots.
8536         * jcf-parse.c (parse_roots):  New static field.
8537         (current_field, current_method, current_file_list):  Replace by macros
8538         naming fields of parse_roots.
8539         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
8540         * class.c (class_roots):  New static field.
8541         (registered_class, fields_ident, info_ident, class_list):
8542         New macros naming fields of parse_roots.
8543         (build_static_field_ref):  Don't register roots here.
8544         (layout_class):  Static field list replaced by macro class_list.
8545         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
8546         Initialize fields_ident and info_ident here.
8547
8548 2001-01-21  Per Bothner  <per@bothner.com>
8549
8550         * jcf-parse.c (ggc_mark_jcf):  New function.
8551         (init_jcf_parse):  Register current_jcf as ggc root.
8552
8553 2001-01-21  Per Bothner  <per@bothner.com>
8554
8555         * lang.c (put_decl_node):  Print method's name.
8556
8557 2001-01-21  Per Bothner  <per@bothner.com>
8558
8559         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
8560         (verify_jvm_instructions):  Use it, for better error messages on loads.
8561
8562 2001-01-21  Per Bothner  <per@bothner.com>
8563
8564         * verify.c (merge_type_state):  Still may have to merge even if
8565         LABEL_VERIFIED (label).
8566
8567 2001-01-21  Per Bothner  <per@bothner.com>
8568
8569         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
8570         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
8571
8572 2001-01-19  Per Bothner  <per@bothner.com>
8573
8574         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
8575         if expeting an interface type.  Refines Tom's change of 2000-09-12.
8576
8577 2001-01-18  Per Bothner  <per@bothner.com>
8578
8579         * gcj.texi (Input Options): Mention .java files.
8580
8581 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8582
8583         * lang-options.h (-Wunsupported-jdk11): Removed.
8584         * lang.c (flag_not_overriding): Deleted.
8585         (flag_static_local_jdk1_1): Likewise.
8586         (lang_W_options): Removed "unsupported-jdk11" entry.
8587         * parse.y (java_check_methods): Removed dead code.
8588
8589 2001-01-17  Tom Tromey  <tromey@redhat.com>
8590
8591         Changes suggested by Per Bothner:
8592         * gcj.texi (Input Options): Don't mention input files.
8593         (Code Generation): Updated --main information.
8594         (Invoking jcf-dump): Mention that --javap is incomplete.
8595         From Alexandre Petit-Bianco:
8596         (Warnings): Don't mention -Wunsupported-jdk11.
8597         My stuff:
8598         (Compatibility): Mention JDK 1.2-ness of libraries.
8599         (Resources): Mention resources used when writing gcj.
8600
8601 2001-01-17  Tom Tromey  <tromey@redhat.com>
8602
8603         * gcj.texi: New file.
8604         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
8605         (java.info): Depend on gcj.info.
8606         (java/gcj.dvi): New target.
8607         (java.dvi): Depend on gcj.dvi.
8608         (java.install-info): Wrote.
8609
8610 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
8611
8612         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
8613         having called make_decl_rtl.
8614
8615 2001-01-14  Per Bothner  <per@bothner.com>
8616
8617         Various patches to emit better messages on verification errors.
8618         * expr.c (push_type_0):  Return error indication on stack overflow,
8619         instead of callinfg fatal.
8620         (push_type):  Now just call push_type_0 (nd fatal on overflow).
8621         (pop_type_0):  Return detailed error message (in a char** argument).
8622         (pop_type):  If pop_type_0 fails, print error message.
8623         (pop_argument_types):  Moved to verify.c.
8624         * verify.c (pop_argument_types):  Moved from expr.c.
8625         Return a (possible) error message, rather than void.
8626         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
8627         (verify_jvm_instruction):  Use new macros, improving error messages.
8628         For case OPCODE_astore use object_ptr_type_node.
8629         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
8630         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
8631
8632         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
8633         constant, return body without wrapper.  (Improves constant folding.)
8634         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
8635
8636 2001-01-13  Per Bothner  <per@bothner.com>
8637
8638         * expr.c (expand_java_field_op):  Assigning to a final field outside
8639         an initializer does not violate JVM spec, so should be warning, not
8640         error.  (Sun's verifier does not complain - though MicroSoft's does.)
8641
8642 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
8643
8644         * gjavah.c (version), jcf-dump.c (version): Update copyright year
8645         to 2001.
8646
8647 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
8648
8649         * parse.y (resolve_expression_name): Permit instance variables from
8650         enclosing context in super constructor call.
8651         (resolve_qualified_expression_name): Permit enclosing class's qualified
8652         "this" in super constructor call.
8653
8654 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8655
8656         * class.c (build_utf8_ref): Remove last argument in call to
8657         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8658         (build_class_ref): Likewise.
8659         (build_static_field_ref): Likewise.
8660         (get_dispatch_table): Likewise.
8661         (layout_class_method): Likewise.
8662         (emit_register_classes): Likewise.
8663         * constants.c (build_constant_data_ref): Likewise.
8664         * decl.c (builtin_function): Likewise.
8665         (create_primitive_vtable): Likewise.
8666         * expr.c (build_known_method_def): Likewise.
8667         (build_jni_stub): Likewise.
8668         (java_lang_expand_expr): Likewise.
8669
8670 2001-01-10  Tom Tromey  <tromey@redhat.com>
8671
8672         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
8673
8674 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8675
8676         * java-tree.h (lang_printable_name_wls): New prototype.
8677         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
8678         rather than `current_class' to print type name. Don't prepend type
8679         names when printing constructor names.
8680         (lang_printable_name_wls): New function.
8681         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
8682         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
8683         * parse.y (patch_method_invocation): Message tuned for constructors.
8684         (not_accessible_p): Grant `private' access from within
8685         enclosing contexts.
8686
8687 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8688
8689         All files with updated copyright when applicable.
8690         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
8691         * class.c (mangle_class_field): Function removed.
8692         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
8693         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
8694         (build_class_ref): Call `java_mangle_class_field' instead of
8695         `mangle_class_field.'
8696         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
8697         (layout_class): Call `java_mangle_decl' instead of
8698         `mangle_static_field.'
8699         (cxx_keywords): Initialized static array moved to `lex.c.'
8700         (layout_class_method): Changed leading comment. Simplified to
8701         call `java_mangle_decl.' Local `ptr' moved in for loop body.
8702         * decl.c (lang_mark_tree): Mark field `package_list.'
8703         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
8704         (struct lang_type): New field `package_list.'
8705         (unicode_mangling_length): Prototype removed.
8706         (append_gpp_mangled_name, append_gpp_mangled_classtype,
8707         emit_unicode_mangled_name): Likewise.
8708         (cxx_keyword_p): New prototype.
8709         (java_mangle_decl, java_mangle_class_field,
8710         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
8711         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
8712         `build_expr_wfl.'
8713         * jvgenmain.c (main_method_prefix): Global variable removed.
8714         (main_method_suffix): Likewise.
8715         (do_mangle_classname): New function.
8716         (main): Call it. Format changed to accommodate new mangling scheme.
8717         * lex.c: (utf8_cmp): Conditionally prototyped.
8718         (cxx_keywords): Moved from class.c, conditionally defined.
8719         (utf8_cmp, cxx_keyword_p): Likewise.
8720         * mangle.c (obstack.h, ggc.h): Included.
8721         (mangle_field_decl): New function.
8722         (mangle_method_decl, mangle_type, mangle_pointer_type,
8723         mangle_array_type, mangle_record_type,
8724         find_compression_pointer_match, find_compression_array_match,
8725         find_compression_record_match,
8726         find_compression_array_template_match, set_type_package_list,
8727         entry_match_pointer_p, emit_compression_string, init_mangling,
8728         finish_mangling, compression_table_add, mangle_member_name): Likewise.
8729         (mangle_obstack): New global.
8730         (MANGLE_RAW_STRING): New macro.
8731         (unicode_mangling_length): Turned static.
8732         (append_unicode_mangled_name): Renamed from
8733         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
8734         replaces `obstack', removed from the parameter list.
8735         (append_gpp_mangled_name): Turned static. `mangle_obstack'
8736         replaces parameter `obstack', removed from the parameter list. Call
8737         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
8738         (append_gpp_mangled_classtype): Removed.
8739         (compression_table, compression_next): New static variables.
8740         * parse.y (temporary_obstack): Extern declaration removed.
8741
8742 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8743
8744         * parse.y (patch_binop): Compute missing type in error situations.
8745
8746 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
8747
8748         * class.c (make_class_data): Push initial value for "arrayclass".
8749         * decl.c (init_decl_processing): Add new class field "arrayclass".
8750
8751 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
8752
8753         From patha@softlab.ericsson.se:
8754         * parse.y (switch_label): Use build, not build1, to construct
8755         DEFAULT_EXPR.
8756
8757 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8758
8759         * lang.c (lang_decode_option): Change -MA to -MP.
8760         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
8761         Update to new prototype; do quote targets.
8762         (jcf_dependency_write): Update.
8763
8764 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
8765
8766         Shorten primitive array allocation path:
8767         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
8768         to create new primitive arrays.
8769         * expr.c (build_newarray): If generating native code, call
8770         soft_newarray_node with a reference to the primitive TYPE identifier
8771         instead of type_value.
8772
8773 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
8774
8775         Fix for PRs gcj/312 and gcj/253:
8776         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
8777         dest if they arn't already.
8778         * class.c (layout_class): Call maybe_layout_super_class on
8779         superinterfaces also, but only if compiling from bytecode.
8780
8781         Fix for PR gcj/373:
8782         * parse.y (create_class): Set ACC_STATIC if class is declared in an
8783         interface.
8784
8785 2000-12-15  Tom Tromey  <tromey@redhat.com>
8786
8787         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
8788         set.
8789
8790 2000-12-14  Andrew Haley  <aph@redhat.com>
8791
8792         * boehm.c (mark_reference_fields): Change test to correctly detect
8793         bitmap overflow.
8794
8795 2000-12-15  Andreas Jaeger  <aj@suse.de>
8796
8797         * config-lang.in (lang_dirs): Added.
8798
8799 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8800
8801         * parse.y (end_artificial_method_body): Fixed undefined behavior.
8802         Credits go to rth for finding it.
8803
8804 2000-12-13  Mike Stump  <mrs@wrs.com>
8805
8806         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
8807
8808 2000-11-07  Tom Tromey  <tromey@cygnus.com>
8809
8810         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
8811         * lex.c (java_ignorable_control_p): Removed.
8812         (java_letter_or_digit_p): Removed.
8813         (java_start_char_p): New function.
8814         (java_read_char): Return `int', not `unicode_t'.  Changed
8815         callers.
8816         (java_read_unicode): Likewise.
8817         (java_read_unicode_collapsing_terminators): Likewise.
8818         (java_get_unicode): Likewise.
8819         (java_new_lexer): Initialize hit_eof.
8820         (java_parse_end_comment): Take `int' argument.
8821         (java_parse_doc_section): Likewise.
8822         (java_parse_escape_sequence): Don't allow backlash-newline.
8823         Return `int'.
8824         * lex.h (JAVA_DIGIT_P): Removed.
8825         (_JAVA_LETTER_OR_DIGIT_P): Removed.
8826         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
8827         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
8828         (JAVA_PART_CHAR_P): New macro.
8829         (UEOF): Now -1.
8830         (JAVA_CHAR_ERROR): Now -2.
8831         (java_lexer): New field `hit_eof'.
8832         * chartables.h: New file.
8833         * gen-table.pl: new file.
8834
8835 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8836             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8837
8838         * parse.y (java_complete_lhs): Only allow compound assignment of
8839         reference type if type is String.
8840
8841 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8842
8843         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
8844         jcf-path.c: Likewise.
8845
8846 2000-12-09  Anthony Green  <green@redhat.com>
8847
8848         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
8849         filestart and filename_length as int values.
8850
8851 2000-12-07  Mo DeJong  <mdejong@redhat.com>
8852
8853         * jcf-io.c (find_class): Correct the logic that tests to see if a
8854         .java file is newer than its .class file. The compiler was
8855         incorrectly printing a warning when file mod times were equal.
8856
8857 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
8858
8859         * jvgenmain.c: Use ISPRINT not isascii.
8860
8861 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8862
8863         * parse.y (end_artificial_method_body): Fixed typo.
8864
8865 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8866
8867         * parse.y (patch_method_invocation): Pick the correct enclosing
8868         context when creating inner class instances.
8869         Fixes gcj/332.
8870
8871 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
8872
8873         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8874         Update copyright year to 2000.
8875
8876 2000-11-23  Anthony Green  <green@redhat.com>
8877
8878         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
8879         Move current_file_list out of yyparse and make it static.
8880
8881         * expr.c: Declare quick_stack and tree_list_free_list as static
8882         (init_expr_processing): Register quick_stack and
8883         tree_list_free_list roots.
8884
8885 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8886
8887         * parse.y (build_outer_field_access): New local `decl_ctx', use
8888         it. Check for field's context and current class immediate outer
8889         context inheritance.
8890         (outer_field_access_p): Consider fields inherited from the last
8891         enclosing context.
8892         (build_access_to_thisn): Stop at the last enclosing context if
8893         necessary.
8894         Fixes gcj/367.
8895
8896 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
8897
8898         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
8899
8900 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
8901
8902         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
8903         scratch buffer.
8904
8905 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8906
8907         * jv-scan.c (help): Document --complexity.
8908         (options): Added --complexity.
8909         (flag_complexity): New global.
8910         (main): Call `report'.
8911         * parse-scan.y (complexity): New global.
8912         (if_then_statement, if_then_else_statement,
8913         if_then_else_statement_nsi, switch_block_statement_group,
8914         while_expression, do_statement, for_begin, continue_statement,
8915         throw_statement, catch_clause, finally, method_invocation,
8916         conditional_and_expression, conditional_or_expression,
8917         conditional_expression): Update complexity.
8918         (reset_report): Reset complexity.
8919         (report): New function.
8920
8921 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8922
8923         * lex.c (yylex): Added STRICT_TK case.
8924         * parse.y (STRICT_TK): Added.
8925         * parse-scan.y (STRICT_TK): Added.
8926         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
8927         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
8928         file.
8929         * keyword.h: Rebuilt.
8930         * keyword.gperf (strictfp): Added.
8931
8932 2000-11-20  Tom Tromey  <tromey@cygnus.com>
8933
8934         * lex.c (yylex): Recognize floating point constants with leading
8935         0.
8936
8937 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8938
8939         * java-tree.h (cyclic_inheritance_report): Constify.
8940         * parse.y (cyclic_inheritance_report): Likewise.
8941
8942 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
8943
8944         * parse.y (goal): Remove call to ggc_add_string_root.
8945
8946 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
8947
8948         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
8949         Create string in scratch buffer, then pass to build_string.
8950
8951 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8952
8953         * parse.y (issue_warning_error_from_context): Add
8954         ATTRIBUTE_PRINTF.
8955
8956 2000-11-11  Anthony Green  <green@redhat.com>
8957
8958         * jcf-parse.c (process_zip_dir): Add finput parameter.
8959         (jcf_figure_file_type): Call process_zip_dir with appropriate
8960         argument.
8961
8962 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8963
8964         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
8965         * jcf-parse.c (jcf_figure_file_type): Likewise.
8966
8967 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8968
8969         * parse.y (create_new_parser_context): Use memset () instead of
8970         bzero ().
8971
8972 2000-11-08  Tom Tromey  <tromey@cygnus.com>
8973
8974         * gjavah.c (process_file): Only include gcj/cni.h when generating
8975         CNI stubs.
8976
8977 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8978
8979         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
8980         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
8981         instead of bzero ().
8982
8983 2000-11-05  Tom Tromey  <tromey@cygnus.com>
8984
8985         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
8986         * lex.c (IS_ZERO): New define.
8987         (java_perform_atof): Error on floating point underflow.
8988
8989 2000-11-04  Tom Tromey  <tromey@cygnus.com>
8990
8991         * lex.c (java_parse_escape_sequence): Only read two octal
8992         characters if the first one is greater than 3.  Don't allow
8993         "octal" numbers to include the digits 8 or 9.
8994
8995 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
8996
8997         * Make-lang.in (java.distdir): Remove.
8998
8999 2000-11-03  Tom Tromey  <tromey@cygnus.com>
9000
9001         * Make-lang.in (java.dvi): New target.
9002         Partial fix for PR other/567.
9003
9004         * lang-options.h: Mention -Wout-of-date.
9005         * jcf-dump.c (flag_newer): New global.
9006         * gjavah.c (flag_newer): New global.
9007         * jcf-io.c (find_class): Only warn when flag_newer set.
9008         * lang.c (flag_newer): New global.
9009         (struct string_option): New declaration.
9010         (lang_W_options): New global.
9011         (process_option_with_no): New function.
9012         (lang_decode_option): Use it.
9013
9014         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
9015         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
9016         `$'.
9017
9018         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
9019         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
9020         * lex.c (java_read_unicode): Removed `term_context' argument.
9021         Recognize any number of `u' in `\u'.
9022         (java_read_unicode_collapsing_terminators): New function.
9023         (java_get_unicode): Use it.
9024         (java_lineterminator): Removed.
9025         (yylex): Produce error if character literal is newline or single
9026         quote.  Return if eof found in middle of `//' comment.  EOF in
9027         `//' comment is only an error if pedantic.
9028         (java_ignorable_control_p): New function.
9029         (java_parse_end_comment): Return if eof found in middle of
9030         comment.
9031         Include flags.h.
9032         * jv-scan.c (pedantic): New global.
9033
9034 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9035
9036         * parse.y (outer_field_access_p): Inherited fields aren't
9037         consider outer fields.
9038         (maybe_build_thisn_access_method): Use
9039         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
9040         (resolve_expression_name): Trigger an error if a static field
9041         is being accessed as an outer field.
9042
9043 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9044
9045         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
9046         Fixes gcj/365.
9047
9048 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9049
9050         * Make-lang.in: Move all build rules here from Makefile.in,
9051         adapt to new context.  Wrap all rules that change the current
9052         directory in parentheses.  Expunge all references to $(P).
9053         When one command depends on another and they're run all at
9054         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9055         all object-file generation rules.  Delete obsolete variables.
9056
9057         * Makefile.in: Delete.
9058         * config-lang.in: Delete outputs= line.
9059
9060 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9061
9062         * parse.y (patch_method_invocation): NULLify this_arg when already
9063         inserted.
9064         (maybe_use_access_method): Handle call to methods unrelated to the
9065         current class. Fixed comment.
9066         Fixes gcj/361.
9067
9068 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9069
9070        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
9071        scope.
9072
9073 2000-10-24  Tom Tromey  <tromey@cygnus.com>
9074
9075         * lex.c (java_new_lexer): Initialize new fields.  Work around
9076         broken iconv() implementations.
9077         (java_read_char): Swap bytes if required.  Use fallback decoder if
9078         required.
9079         (byteswap_init, need_byteswap): New globals.
9080         (java_destroy_lexer): Only close iconv handle if it is in use.
9081         * lex.h (java_lexer): New fields read_anything, byte_swap,
9082         use_fallback.
9083         Made out_buffer unsigned.
9084
9085 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9086
9087         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
9088         where an enclosing context can be set on the jdep.
9089         (do_resolve_class): Fixed identation.
9090
9091 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9092
9093         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
9094
9095         * jcf-reader.c (peek_attribute, skip_attribute): Only define
9096         when requested.
9097
9098         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
9099
9100         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
9101
9102 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9103
9104         * jcf-write.c (OP1): Update `last_bc'.
9105         (struct jcf_block): Fixed indentation and typo in comments.  New
9106         field `last_bc'.
9107         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
9108         follows `monitorenter'.
9109         * parse.y (patch_synchronized_statement): New local `tmp'. Call
9110         `patch_string'.
9111         Fixes gcj/232.
9112
9113 2000-10-16  Tom Tromey  <tromey@cygnus.com>
9114
9115         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
9116         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
9117         * lang-options.h: Added -MA, -MT, -MF..
9118         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
9119         (DEPEND_TARGET_SET): New macro.
9120         (DEPEND_FILE_ALREADY_SET): Likewise.
9121         (init_parse): Handle new flags.
9122         * jcf.h (jcf_dependency_print_dummies): Declare.
9123         * Make-lang.in (s-java): Added mkdeps.o.
9124         * Makefile.in (BACKEND): Added mkdeps.o.
9125         (../gcjh$(exeext)): Added mkdeps.o.
9126         (../jcf-dump$(exeext)): Added mkdeps.o.
9127         * jcf-depend.c: Include mkdeps.h.
9128         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
9129         add_entry): Removed.
9130         (jcf_dependency_reset): Rewrote.
9131         (dependencies): New global.
9132         (jcf_dependency_set_target): Rewrote.
9133         (jcf_dependency_add_target): Likewise.
9134         (jcf_dependency_add_file): Likewise.
9135         (munge): Removed.
9136         (print_ents): Removed.
9137         (jcf_dependency_write): Rewrote.
9138         (print_dummies): New global.
9139         (jcf_dependency_print_dummies): New function
9140         (jcf_dependency_write): Call deps_dummy_targets if required.
9141
9142 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9143
9144         * gjavah.c (add_class_decl): Removed unused variables `tname',
9145         `tlen' and `name_index'.
9146         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
9147         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
9148         in `wfl_operator' with value.
9149         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
9150         (jcf_figure_file_type): Fixed identation.
9151         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
9152         * parse.y (analyze_clinit_body): New function.
9153         (static_initializer:): Reset `current_static_block'.
9154         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
9155         `wfl_operator' with new value.
9156         (lookup_cl): Use EXPR_WFL_FILENAME.
9157         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
9158         analyze_clinit_body.
9159         (build_outer_field_access): Access to this$<n> built from
9160         current_class, not its outer context.
9161         (build_access_to_thisn): Fixed leading comment. Tidied things up.
9162         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
9163         (patch_method_invocation): Use `is_static_flag' when already
9164         initialized.
9165         (patch_newarray): Removed assignment in ternary operator.
9166
9167 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9168
9169         * except.c (free_eh_ranges): Don't free `whole_range'.
9170
9171 2000-10-15  Anthony Green  <green@redhat.com>
9172
9173         * decl.c (init_decl_processing): Call init_class_processing before
9174         anything else.
9175
9176 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9177
9178         * check-init.c (check_init): Fixed leading comment. Use
9179         LOCAL_FINAL_P.
9180         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9181         (give_name_to_locals): Likewise.
9182         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
9183         fields in lang_decl_var.
9184         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
9185         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
9186         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
9187         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
9188         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
9189         (LOCAL_FINAL): Rewritten.
9190         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
9191         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
9192         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
9193         `init_final' fields.
9194         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
9195         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
9196         (TYPE_HAS_FINAL_VARIABLE): New macro.
9197         (struct lang_type): Added `afv' field.
9198         * parse.y (check_static_final_variable_assignment_flag): New function.
9199         (reset_static_final_variable_assignment_flag): Likewise.
9200         (check_final_variable_local_assignment_flag): Likewise.
9201         (reset_final_variable_local_assignment_flag): Likewise.
9202         (check_final_variable_indirect_assignment): Likewise.
9203         (check_final_variable_global_assignment_flag): Likewise.
9204         (add_inner_class_fields): Use LOCAL_FINAL_P.
9205         (register_fields): Handle local finals and final variables.
9206         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
9207         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9208         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
9209         on local finals.
9210         (java_complete_expand_methods): Loop to set
9211         TYPE_HAS_FINAL_VARIABLE. Call
9212         `reset_final_variable_local_assignment_flag' and
9213         `check_final_variable_local_assignment_flag' accordingly before
9214         and after constructor expansion. Call
9215         `reset_static_final_variable_assignment_flag'
9216         before expanding <clinit> and after call
9217         `check_static_final_variable_assignment_flag' if the
9218         current_class isn't an interface. After all methods have been
9219         expanded, call `check_final_variable_global_assignment_flag' and
9220         `check_static_final_variable_assignment_flag' if the current class
9221         is an interface.
9222         (maybe_yank_clinit): Fixed typo in comment.
9223         (build_outer_field_access_methods): Removed old sanity check. Use
9224         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9225         Don't create access methods for finals.
9226         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
9227         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
9228         existing DECL_INIT has been processed.
9229         (java_complete_lhs): Likewise.
9230         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
9231         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
9232         logic.
9233         (patch_assignment): Use LOCAL_FINAL_P.
9234         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
9235         DECL_INITIAL is nullified.
9236         Fixes gcj/163.
9237
9238 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9239
9240         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
9241
9242         * Makefile.in (parse.c, parse-scan.c): Likewise.
9243
9244 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9245
9246         * class.c (temporary_obstack): Remove.
9247         (make_class): Don't mess with obstascks.
9248         (push_class): Likewise.
9249         (set_super_info): Likewise.
9250         (add_method_1): Likewise.
9251         (add_method): Likewise.
9252         (add_field): Likewise.
9253         (build_utf8_ref): Likewise.
9254         (build_class_ref): Likewise.
9255         (build_static_field_ref): Likewise.
9256         (finish_class): Likewise.
9257         (push_super_field): Likewise.
9258         (layout_class): Likewise.
9259         (layout_class_methods): Likewise.
9260         (init_class_processing): Likewise.
9261         * constants.c (get_tag_node): Likewise.
9262         (build_constant_data_ref): Likewise.
9263         * decl.c (ggc_p): Remove.
9264         (copy_lang_decl): Use ggc_alloc.
9265         (complete_start_java_method): Don't mess with obstacks.
9266         (start_java_method): Likewise.
9267         (end_java_method): Likewise.
9268         * except.c (link_handler): Use xmalloc.
9269         (free_eh_ranges): New function.
9270         (method_init_exceptions): Use it.
9271         (add_handler): Use xmalloc.
9272         (expand_start_java_handler): Don't mess with obstacks.
9273         (prepare_eh_table_type): Likewise.
9274         (expand_end_java_handler): Likewise.
9275         * expr.c (push_value): Likewise.
9276         (create_label_decl): Likewise.
9277         (build_jni_stub): Likewise.
9278         (java_lang_expand_expr): Likewise.
9279         (note_instructions): Use xrealloc.
9280         (java_push_constant_from_pool): Don't mess with obstacks.
9281         (process_jvm_instruction): Likewise.
9282         * java-tree.h (cyclic_inheritance_report): Remove duplicate
9283         declaration.
9284         * jcf-parse.c (get_constant): Don't mess with obstacks.
9285         (read_class): Likewise.
9286         (jcf_parse): Likewise.
9287         * lex.c (expression_obstack): Remove.
9288         (java_lex): Don't use obstack_free.
9289         * parse.h (exit_java_complete_class): Don't mess with obstacks.
9290         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
9291         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
9292         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
9293         * parse.y (gaol): Add more GC roots.
9294         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
9295         (lookup_field_wrapper): Likewise.
9296         (obtain_incomplete_type): Don't mess with obstacks.
9297         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
9298         macros.
9299         (craft_constructor): Don't mess with obstacks.
9300         (safe_layout_class): Likewise.
9301         (java_complete_class): Likewise.
9302         (source_end_java_method): Likewise.
9303         (build_outer_field_access_methods): Likewise.
9304         (build_outer_method_access_method): Likewise.
9305         (maybe_build_thisn_access_method): Likewise.
9306         (build_dot_class_method_invocation): Likewise.
9307         (java_complete_tree): Likewise.
9308         (java_complete_lhs): Likewise.
9309         (do_merge_string_cste): Likewise.
9310         (patch_string_cst): Likewise.
9311         (array_constructor_check_entry): Likewise.
9312         * typeck.c (build_java_array_type): Likewise.
9313         (parse_signature_string): Likewise.
9314         (build_java_signature): Likewise.
9315
9316 2000-10-12  Tom Tromey  <tromey@cygnus.com>
9317
9318         Fix for PR gcj/356:
9319         * gjavah.c (add_class_decl): Don't special-case inner classes.
9320         (add_namelet): Likewise.
9321
9322 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
9323
9324         * java-tree.h: Constify current_encoding.
9325         * lang.c: Constify current_encoding.
9326
9327 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
9328
9329         * jvgenmain.c (class_mangling_suffix): Omit `.'.
9330         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
9331
9332 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9333
9334         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
9335         patch. Fixes gcj/340.
9336
9337 2000-10-10  Tom Tromey  <tromey@cygnus.com>
9338
9339         * lex.c (java_new_lexer): Initialize out_first and out_last
9340         fields.
9341         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
9342
9343 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9344
9345         * parse.y (pop_current_osb): New function.
9346         (array_type:): Use `dims:', changed actions
9347         accordingly. Suggested by Anthony Green.
9348         (array_creation_expression:): Used pop_current_osb.
9349         (cast_expression:): Likewise.
9350         (search_applicable_method_list): Fixed indentation.
9351
9352 2000-10-08  Anthony Green  <green@redhat.com>
9353
9354         * parse.y (array_type_literal): Remove production.
9355         (type_literals): Refer to array_type, not array_type_literal.
9356
9357 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9358
9359         Patch contributed by Corey Minyard.
9360         * decl.c (check_local_named_variable): New function.
9361         (tree check_local_unnamed_variable): Likewise.
9362         (find_local_variable): Splitted. Call check_local_{un}named_variable.
9363
9364 2000-10-07  Anthony Green  <green@redhat.com>
9365
9366         * class.c (layout_class): Handle case where superclass can't be
9367         layed out yet.
9368
9369 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9370
9371         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
9372         gperf.
9373
9374 2000-10-05  Tom Tromey  <tromey@cygnus.com>
9375
9376         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
9377         * jvgenmain.c (class_mangling_prefix): Removed.
9378         (class_mangling_suffix): New global.
9379         (main): Use it.
9380         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
9381         `$'.
9382         (print_method_info): Handle overrides for static and final
9383         methods.
9384         (process_file): Generate declaration for class object field.
9385         * class.c (cxx_keywords): New array.
9386         (utf8_cmp): New function.
9387         (cxx_keyword_p): New function.
9388         (layout_class_method): Mangle C++ keywords by appending `$'.
9389         (mangle_field): New function.
9390         (mangle_class_field): Use mangle_field.  Mangle class name as
9391         `class$'.
9392         (mangle_static_field): Use mangle_field.
9393
9394 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9395
9396         * decl.c (find_local_variable): Removed uncessary type check and
9397         fixed range check typo. From Corey Minyard.
9398
9399 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9400
9401         * decl.c (give_name_to_locals): New local `code_offset'. Call
9402         `maybe_adjust_start_pc'.
9403         * expr.c (note_instructions): New function.
9404         (expand_byte_code): Don't collect insn starts here.
9405         (peek_opcode_at_pc): New function.
9406         (maybe_adjust_start_pc): Likewise.
9407         * java-tree.h (maybe_adjust_start_pc): Declare.
9408         (note_instructions): Likewise.
9409         * jcf-parse.c (parse_class_file): Call `note_instructions'.
9410
9411 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9412
9413         * parse.y (field_access:): Fixed indentation.
9414         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
9415
9416 2000-09-07  Tom Tromey  <tromey@cygnus.com>
9417
9418         Fix for PR gcj/307:
9419         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
9420         JPRIMITIVE_TYPE_P, for arithmetic operators.
9421         (patch_method_invocation): Indentation fix.
9422         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
9423         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
9424         (do_unary_numeric_promotion): Cleaned up code.
9425         (valid_cast_to_p): Handle boolean correctly.
9426
9427 2000-09-27  Tom Tromey  <tromey@cygnus.com>
9428
9429         * lex.c (java_read_unicode): Reset bs_count when finished with
9430         `\u' sequence.
9431
9432 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
9433
9434         Convert to GC.
9435         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
9436         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
9437         (typeck.o): Depend on ggc.h.
9438         * class.c (add_method_1): Use GC functions for allocation.
9439         (init_class_processing): Register roots.
9440         * decl.c (ggc_p): Set to 1.
9441         (pending_local_decls): Make it static.
9442         (push_jvm_slot): Use GC functions for allocation.
9443         (init_decl_processing): Register roots.
9444         (give_name_to_locals): Use GC functions for allocation.
9445         (lang_mark_tree): New function.
9446         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
9447         functions for allocation.
9448         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
9449         * lex.c (java_lex): Use build_string, rather than replicating it
9450         inline.
9451         * parse.y (goal): Add more roots.
9452         (mark_parser_ctxt): New function.
9453         * typeck.c: Include ggc.h.
9454
9455 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9456
9457         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
9458         contains something else than MODIFY_EXPR.
9459
9460 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
9461
9462         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
9463         * Makefile.in (parse.o): Depend on ggc.h.
9464         (class.o): Likewise.
9465         (constants.o): Likewise.
9466         (decl.o): Likewise.
9467         (expr.o): Likewise.
9468         (jcf-parse.o): Likewise.
9469         (jcf-write.o): Likewise.
9470         (mangle.o): Likewise.
9471         * class.c: Include ggc.h.
9472         (build_static_field_ref): Register GC roots.
9473         (layout_class): Likewise.
9474         (init_class_processing): Likewise.
9475         * constants.c: Include ggc.h.
9476         (current_constant_pool_data_ref): Remove.
9477         (tag_nodes): Move it to ...
9478         (get_tag_node): ... here.  Register GC roots.
9479         * decl.c: Include ggc.h.  Remove many global tree definitions.
9480         (throw_node): Define.
9481         (java_global_trees): Likewise.
9482         (predef_filenames): Make the size a constant.
9483         (init_decl_processing): Adjust accordingly.
9484         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
9485         * expr.c: Include ggc.h.
9486         (init_expr_processing): Register GC roots.
9487         (build_invokeinterface): Likewise.
9488         * java-tree.h: Replace extern tree declarations with macros.
9489         (java_global_trees): New variable.
9490         (java_tree_index): New enumeration.
9491         (init_jcf_parse): Declare.
9492         * jcf-parse.c: Include ggc.h.
9493         (current_class): Remove declaration.
9494         (main_class): Likewise.
9495         (all_class_list): Likewise.
9496         (predefined_filename_p): Adjust for constant size of
9497         predef_filenames.
9498         (init_jcf_parse): New function.
9499         * jcf-write.c: Include ggc.h.
9500         (generate_classfile): Register GC roots.
9501         (append_synthetic_attribute): Likewise.
9502         (append_innerclass_attribute_entry): Likewise.
9503         * lang.c: Include ggc.h.
9504         (lang_print_error): Register GC roots.
9505         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
9506         with macros.
9507         * parse.y: Include ggc.h.
9508         (wfl_operator): Remove.
9509         (goal): Register GC roots.
9510         (java_pop_parser_context): Adjust for new field names.
9511         (java_parser_context_save_global): Likewse.
9512         (java_parser_context_restore_global): Likewise.
9513         (java_parser_context_suspend): Likewise.
9514         (java_parser_context_resume): Likewise.
9515         (verify_constructor_circularity): Register GC roots.
9516         (lookup_cl): Likewise.
9517         (java_reorder_fields): Likewise.
9518         (build_current_this): Likewise.
9519         (class_in_current_package): Likewise.
9520         (argument_types_convertible): Likewise.
9521         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
9522
9523 2000-09-14  Tom Tromey  <tromey@cygnus.com>
9524
9525         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
9526
9527 2000-09-13  Tom Tromey  <tromey@cygnus.com>
9528
9529         * jcf-parse.c: Include <locale.h>.
9530         * jv-scan.c: Include <locale.h>.
9531
9532 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9533
9534         * expr.c (pop_type_0): Return `Object' if trying to merge two
9535         interface types.
9536         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
9537         interface types; `Object' is always a valid supertype.
9538
9539 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9540
9541         Fix for PR gcj/33:
9542         * jv-scan.c (help): Document --encoding.
9543         (options): Added `encoding' entry.
9544         (OPT_ENCODING): New define.
9545         (main): Handle --encoding.
9546         Include <langinfo.h> if nl_langinfo exists.
9547         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
9548         --encoding.
9549         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
9550         (parse_source_file): Correctly call java_init_lex.  Added `finput'
9551         argument.  Use nl_langinfo to determine default encoding.
9552         * java-tree.h (current_encoding): Declare.
9553         * parse.y (java_parser_context_restore_global): Don't restore
9554         `finput'.
9555         (java_parser_context_save_global): Don't set `finput' field.
9556         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
9557         if required.
9558         * lang.c (current_encoding): New global.
9559         (lang_decode_option): Recognize `-fencoding='.
9560         (finish_parse): Don't close finput.
9561         * parse.h (struct parser_ctxt): Removed `finput' and
9562         `unget_utf8_value' fields.  Added `lexer' field.
9563         (java_init_lex): Fixed declaration.
9564         * lex.c (java_new_lexer): New function.
9565         (java_destroy_lexer): Likewise.
9566         (java_read_char): Added `lex' argument.  Handle iconv case.
9567         (java_read_unicode): Added `lex' argument.  Count backslashes in
9568         lexer structure.
9569         (java_init_lex): Added `finput' and `encoding' arguments.  Set
9570         `lexer' field in ctxp.
9571         (BAD_UTF8_VALUE): Removed.
9572         (java_lex): Handle seeing UEOF in the middle of a string literal.
9573         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
9574         (java_lexer): New structure.
9575         (UNGETC): Removed.
9576         (GETC): Removed.
9577         (DEFAULT_ENCODING): New define.
9578         (java_destroy_lexer): Declare.
9579
9580 2000-09-12  Tom Tromey  <tromey@cygnus.com>
9581
9582         Fix for PR gcj/343:
9583         * lex.c (java_init_lex): Initialize java_io_serializable.
9584         * parse.y (java_io_serializable): New global.
9585         (valid_ref_assignconv_cast_p): An array can be cast to
9586         serializable.
9587
9588 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9589
9590         * decl.c, expr.c: Include defaults.h if not already included.
9591         Don't define the *_TYPE_SIZE macros.
9592
9593 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
9594
9595         * typeck.c (build_java_array_type): Correct first parameter
9596         in ADJUST_FIELD_ALIGN invocation.
9597
9598 2000-09-06  Tom Tromey  <tromey@cygnus.com>
9599
9600         * lang-specs.h: Also recognize `-femit-class-files'.
9601
9602 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9603
9604         * verify.c (merge_types): Load the types to merge if necessary.
9605
9606 2000-09-02  Anthony Green  <green@redhat.com>
9607
9608         * jcf-io.c: Include zlib.h.
9609         (open_in_zip): Read compressed class file archives.
9610         * zipfile.h (ZipDirectory): Add uncompressed_size and
9611         compression_method fields.
9612         * zextract.c (read_zip_archive): Collect file compression info.
9613
9614 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
9615
9616         * parse.y (do_resolve_class): Also explore superclasses of
9617         intermediate enclosing contexts when searching for inner classes.
9618
9619 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9620
9621         * parse.y (variable_declarator_id:): Better error message.
9622         (expression_statement:): Use YYNOT_TWICE.
9623         (cast_expression:): Likewise.
9624         (assignment:): Likewise.
9625
9626 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9627
9628         * parse.y (do_merge_string_cste): New locals. Create new
9629         STRING_CSTs each time, use memcpy. Fixes gcj/311.
9630
9631 2000-08-07  Hans Boehm  <boehm@acm.org>
9632
9633         * boehm.c (mark_reference_fields): Set marking bits for all words in
9634         a multiple-word record.
9635         (get_boehm_type_descriptor): Use the procedure marking descriptor for
9636         java.lang.Class.
9637
9638 2000-08-31  Mike Stump  <mrs@wrs.com>
9639
9640         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
9641         jcf-dump$(exeext)): Make parallel safe.
9642
9643 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9644
9645         * jcf-parse.c (set_source_filename): Constify a char *.
9646         * jcf-write.c (append_innerclasses_attribute,
9647         make_class_file_name): Constify a char *.  Don't recycle a
9648         variable for an unrelated purpose.
9649         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
9650         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
9651
9652 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9653
9654         * expr.c (can_widen_reference_to): Fixed indentation.
9655         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
9656         * parse.y: `finit$' replaces `$finit$' in comments.
9657         (try_builtin_assignconv): Fixed leading comment.
9658
9659 2000-08-25  Greg McGary  <greg@mcgary.org>
9660
9661         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
9662
9663 2000-08-24  Greg McGary  <greg@mcgary.org>
9664
9665         * lang.c (lang_decode_option): Use ARRAY_SIZE.
9666         * parse.y (BINOP_LOOKUP): Likewise.
9667
9668 2000-08-22  Andrew Haley  <aph@cygnus.com>
9669
9670         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
9671         sign extending. Fixes gcj/321.
9672         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
9673         combining to make a jlong. Fixes gcj/321.
9674
9675 2000-08-21  Nix  <nix@esperi.demon.co.uk>
9676
9677         * lang-specs.h: Do not process -o or run the assembler if
9678         -fsyntax-only.
9679
9680 2000-08-16  Andrew Haley  <aph@cygnus.com>
9681
9682         * typeck.c (build_java_array_type): Rewrite code to do array
9683         alignment.  Take into account back-end macros when aligning array
9684         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
9685         user to set alignment. Fixes gcj/252 and 160.
9686
9687 2000-08-09  Tom Tromey  <tromey@cygnus.com>
9688
9689         * parse.y (check_abstract_method_definitions): Now return `int'.
9690         Check implemented interfaces.  Fixes PR gcj/305.
9691
9692         * parse.y (patch_switch_statement): Disallow `long' in switch
9693         expressions.  Fixes PR gcj/310.
9694
9695 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9696
9697         * decl.c (finit_leg_identifier_node): New global.
9698         (init_decl_processing): Use `finit$' to initialize
9699         finit_identifier_node. Use `$finit$' to initialize
9700         finit_leg_identifier_node.
9701         * expr.c (expand_java_field_op): Use ID_FINIT_P.
9702         * java-tree.h (finit_identifier_node): Changed attached comment.
9703         (finit_leg_identifier_node): New declaration.
9704         (ID_FINIT_P): Take finit_identifier_node and
9705         finit_leg_identifier_node into account. This is a backward
9706         compatibility hack.
9707
9708 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9709
9710         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
9711         Jan 6 2000 patch.
9712         (generate_bytecode_insns): Check `nargs' before emitting it.
9713         * verify.c (merge_type_state): Fixed typo.
9714         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
9715         generate_bytecode_{conditional,insns}.
9716
9717 2000-08-13  Anthony Green  <green@redhat.com>
9718
9719         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
9720         for -pg builds).
9721
9722 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9723
9724         * class.c (maybe_layout_super_class): Fixed indentation.
9725         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
9726         (java_check_methods): New function declaration.
9727         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
9728         instead of `str_ptr'.
9729         * jcf-write.c (generate_bytecode_insns): Emit number the of args
9730         of a `invokeinterface' at the right time.
9731         * parse.h (WFL_STRIP_BRACKET): New macro.
9732         (SET_TYPE_FOR_RESOLUTION): Use it.
9733         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
9734         (check_class_interface_creation): Don't check for cross package
9735         innerclass name clashes.
9736         (method_header): Behave properly if MDECL is `error_mark_node'.
9737         (method_declarator): Return `error_mark_node' if bogus current
9738         class.
9739         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
9740         (resolve_and_layout): New local `decl_type', set and used. Call
9741         java_check_methods.
9742         (java_check_methods): New method.
9743         (java_layout_classes): Use it.
9744         (resolve_qualified_expression_name): No EH check necessary in
9745         access$<n>.
9746         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
9747         `case' statement.
9748         (patch_assignment): Set DECL_INITIAL on integral final local.
9749
9750 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9751
9752         * java-tree.h (flag_extraneous_semicolon): New extern.
9753         * lang-options.h: (-Wextraneous-semicolon): New option.
9754         * lang.c (flag_redundant): Fixed typo in leading comment.
9755         (flag_extraneous_semicolon): New global.
9756         (lang_decode_option): Set `flag_extraneous_semicolon' when
9757         -Wall. Decode `-Wextraneous-semicolon'.
9758         * parse.y (type_declaration:): Removed `SC_TK' hack, added
9759         `empty_statement' rule.
9760         (class_body_declaration): Likewise.
9761         (method_body:): Accept `;' as a method body.
9762         (static_initializer:): Removed `SC_TK' hack.
9763         (constructor_block_end:): Likewise.
9764         (empty_statement:): Report deprecated empty declaration. Fixes
9765         gcj/295
9766
9767 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9768
9769         * parse.y (build_dot_class_method_invocation): Changed parameter
9770         name to `type'. Build signature from `type' and convert it to a
9771         STRING_CST if it's an array.
9772         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
9773         to use `ref_type' directly.
9774
9775 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
9776
9777         * lang-options.h: Added a comma after the last element to avoid
9778         syntax errors when other languages define additional options.
9779
9780 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
9781
9782         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
9783         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
9784         (jc1): Link with $(BACKEND).
9785         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
9786
9787 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
9788
9789         * jvspec.c: Adjust type of second argument to
9790         lang_specific_driver, and update code as necessary.
9791
9792         * class.c (build_dtable_decl): Initialize dummy.
9793
9794 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9795
9796         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
9797         method bodies not to rule out discarding `<clinit>'; don't use
9798         <clinit> to initialize static fields with constant initializers.
9799
9800 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9801
9802         * gjavah.c (print_method_info): Added `synth' parameter. Skip
9803         synthetic methods.
9804         (method_synthetic): New global.
9805         (HANDLE_METHOD): Recognize synthetic method and tell
9806         `print_method_info' about it.
9807         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
9808         processing a synthetic method.
9809         * jcf-reader.c (skip_attribute): New function.
9810         ( skip_attribute): Likewise.
9811
9812 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9813
9814         * parse.y (build_outer_field_access): Fixed comments.
9815         (fix_constructors): Emit the initialization of this$<n> before
9816         calling $finit$.
9817         (resolve_qualified_expression_name): Build an access to `decl' if
9818         necessary.
9819
9820 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9821
9822         * parse-scan.y (curent_class): Non longer const.
9823         (inner_qualifier, inner_qualifier_length): Deleted.
9824         (current_class_length): New global.
9825         (bracket_count): Fixed typo in leading comment.
9826         (anonymous_count): New global.
9827         (class_instance_creation_expression:): Handle anonymous classes.
9828         (anonymous_class_creation:): New rule.
9829         (push_class_context): Rewritten.
9830         (pop_class_context): Likewise.
9831         (INNER_QUALIFIER): Macro deleted.
9832         (report_class_declaration): call `push_class_context' when
9833         entering the function. `fprintf' format modified not to use
9834         INNER_QUALIFIER.
9835         (report_class_declaration): Assign `package_name' and
9836         `current_class' to NULL separately.
9837
9838 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9839
9840         * expr.c (build_invokeinterface): Call layout_class_methods on
9841         target interface.
9842
9843 2000-07-27  Tom Tromey  <tromey@cygnus.com>
9844             Anthony Green  <green@cygnus.com>
9845             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9846
9847         * class.c (make_class_data): Create vtable for abstract classes.
9848         (get_dispatch_table): Changed to cope with abstract classes.
9849
9850 2000-07-27  Tom Tromey  <tromey@cygnus.com>
9851
9852         * parse.y (patch_method_invocation): Don't reverse the argument
9853         list when dealing with anonymous class constructors. Fixed typo in
9854         comment.
9855
9856 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9857
9858         * parse.y (build_alias_initializer_parameter_list): Reverse
9859         crafted list when building aliases for anonymous class
9860         constructors.
9861
9862 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9863
9864         * parse.y (jdep_resolve_class): Don't bother checking potential
9865         innerclass access if `decl' is NULL.
9866         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
9867         WFL.
9868
9869 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9870
9871         * parse.c: Remove (again.)
9872
9873 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9874
9875         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
9876         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
9877         outside the `if' statement, alias to innerclass removed, `decl'
9878         used to mark the class complete.
9879
9880 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9881
9882         * parse.y (simple_name:): Fixed typo in error message.
9883
9884 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9885
9886         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
9887         or its first operand can be error marks.
9888
9889 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9890
9891         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
9892         * parse.y (method_header): Likewise.
9893
9894 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9895
9896         * parse.y (process_imports): Consider that one might be trying to
9897         import an innerclass. Fixes gcj/254
9898
9899 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9900
9901         * parse.y (find_as_inner_class): Handle the case where the
9902         enclosing context of an innerclass has been loaded as bytecode.
9903
9904 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9905
9906         * parse.y (simple_name:): Reject `$' in type names.
9907         (resolve_type_during_patch): Use `type' as a second
9908         argument to resolve_no_layout. Fixes gcj/257.
9909
9910 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
9911
9912         * parse.y (find_most_specific_methods_list): Select the only
9913         non-abstract method even if max has been set.
9914         Fixes gcj/285, gcj/298.
9915
9916 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
9917
9918         * lang-specs.h: Added %(jc1) to java compiler options.
9919
9920 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
9921
9922         * .cvsignore: New file.
9923
9924 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9925
9926         * parse.y (not_accessible_p): Access granted to innerclasses
9927         (indirectly) extending the reference type. Fixes gcj/249.
9928
9929 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9930
9931         * parse.y (patch_method_invocation): Fixed comment.
9932         (maybe_use_access_method): Build this$<n>s to the context of the
9933         target method, or a type that extends it. Fixes gcj/242.
9934
9935 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
9936
9937         * parse.c: Remove.
9938
9939 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9940
9941         * parse.y (fold_constant_for_init): Avoid bullish conversion.
9942
9943 2000-07-13  Tom Tromey  <tromey@cygnus.com>
9944
9945         * lang-specs.h: Added %{I*}.
9946
9947 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
9948
9949         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
9950
9951 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
9952
9953         * parse-scan.c: Remove.
9954
9955 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9956
9957         * class.c (set_super_info): Handled protected inner classes.
9958         (common_enclosing_context_p): Bail early if arguments aren't both
9959         inner classes.
9960         (get_access_flags_from_decl): Handle private and protected inner
9961         classes.
9962         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
9963         (CLASS_PROTECTED): Likewise.
9964         (struct lang_type): New bitfield `poic'.
9965         * parse.y (jdep_resolve_class): Call check_inner_class_access on
9966         inner classes only.
9967         (check_inner_class_access): Renamed arguments, added
9968         comments. Handles protected inner classes (fixes gcj/225)
9969         (not_accessible_p): Fixed comments. Avoid handling inner classes.
9970
9971 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9972
9973         * parse.y (resolve_qualified_expression_name): Verify qualified
9974         access to `this'. Fixes gcj/239.
9975
9976 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9977
9978         * jcf-write.c (generate_classfile): Don't install ConstantValue
9979         for null pointers.
9980
9981 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9982
9983         * parse.y (resolve_qualified_expression_name): Handle inner class
9984         access. Fixes gcj/256.
9985
9986 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9987
9988         * jcf-write.c (generate_classfile): Properly install the
9989         ConstantValue attribute and the initial value constant pool index
9990         on string constants.
9991         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
9992         class files.
9993
9994 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9995
9996         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
9997         construct.
9998         * parse.y (find_as_inner_class): Fixed typo.
9999         (do_resolve_class): Explore enclosing contexts when searching for
10000         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
10001         (check_inner_class_access): Check `decl' which can be null in case
10002         of previous errors.
10003
10004 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10005
10006         * java-tree.h (java_debug_context): Declared `extern'.
10007         (safe_layout_class): Likewise.
10008         * parse.y (resolve_field_access): Field must be `static' in order
10009         to be replaced by its initial value. Added comments.
10010         (find_applicable_accessible_methods_list): Fixed typo.
10011         (find_most_specific_methods_list): Methods found in innerclasses
10012         take over methods founds in the enclosing contexts.
10013         (java_complete_tree): Loosen restrictions on the type of DECLs
10014         that can be replaced by their initialization values.
10015         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
10016
10017 2000-07-05  Tom Tromey  <tromey@cygnus.com>
10018
10019         * Make-lang.in (PARSE_DIR): New macro.
10020         (PARSE_RELDIR): Likewise.
10021         (PARSE_C): Likewise.
10022         (PARSE_SCAN_C): Likewise.
10023         ($(PARSE_C)): New target.
10024         ($(PARSE_SCAN_C)): Likewise.
10025         (SET_BISON): New macro.
10026         (BISONFLAGS): Likewise.
10027         (JAVABISONFLAGS): Likewise.
10028
10029 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
10030
10031         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
10032         argument on the first pass for CNI as well as JNI.
10033         (print_method_info): Set up method name on the first pass only.
10034
10035 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10036
10037         * parse.y (parser_qualified_classname): Removed parameter
10038         `is_static'.
10039         (create_interface): Removed first passed parameter to
10040         parser_qualified_classname.
10041         (create_class): Likewise. Don't install alias on static
10042         innerclasses. Fixes gcj/275.
10043
10044 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10045
10046         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
10047         debugable statement with empty_stmt_node. Fixes gcj/272
10048
10049 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10050
10051         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
10052         gcj/271.
10053
10054 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10055
10056         * jcf-write.c (push_long_const): Appropriately cast short negative
10057         constant to jword.
10058
10059 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10060
10061         * parse.y (verify_constructor_super): Use loop variable
10062         `m_arg_type' initialized with `mdecl_arg_type'.
10063
10064 2000-06-29  Tom Tromey  <tromey@cygnus.com>
10065
10066         * parse.y (resolve_field_access): Handle case where `type_found'
10067         is NULL.
10068
10069 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10070
10071         * expr.c (lookup_field): The same field can be found through two
10072         different interface. Don't declare it ambiguous in that case.
10073
10074 2000-06-27  Tom Tromey  <tromey@cygnus.com>
10075
10076         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
10077         follows \r, then unget it at a lower level.
10078
10079 2000-06-26  Tom Tromey  <tromey@cygnus.com>
10080
10081         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
10082         java_complete_tree.
10083
10084 2000-06-25  Tom Tromey  <tromey@cygnus.com>
10085
10086         * parse.y (for_statement): Wrap expression in a WFL if it is a
10087         constant.  For PR gcj/268.
10088
10089 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10090
10091         * parse.y (do_resolve_class): Minor optimiztion in the package
10092         list search. Removed unnecessary test and return statement.
10093         (valid_ref_assignconv_cast_p): Order of arguments to
10094         enclosing_context_p fixed.
10095
10096 2000-06-24  Tom Tromey  <tromey@cygnus.com>
10097
10098         * expr.c (lookup_field): Print error and return error_mark_node if
10099         field reference is ambiguous.
10100
10101         * parse.y (check_abstract_method_definitions): Also check if
10102         `other_method' is abstract.
10103
10104 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10105
10106         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
10107         classes.
10108         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
10109         (struct lang_type): New field `pic'.
10110         (CLASS_PRIVATE): New macro.
10111         * parse.y (check_inner_class_access): New function.
10112         (jdep_resolve_class): Call it.
10113
10114 2000-06-23  Tom Tromey  <tromey@cygnus.com>
10115
10116         * parse.y (patch_incomplete_class_ref): Initialize the returned
10117         class.  For PR gcj/260.
10118
10119 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10120
10121         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
10122
10123 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10124
10125         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
10126         Java specific checks.
10127         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
10128         screened by DECL_P.
10129         * java-tree.def (CASE_EXPR): Marked 'e'.
10130         (DEFAULT_EXPR): Likewise.
10131         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
10132         screened by DECL_P.
10133         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
10134         Java specific checks.
10135         (generate_bytecode_insns): Test try_block for BLOCK before using
10136         BLOCK_EXPR_BODY.
10137         * parse.y (build_wfl_wrap): Added `location' argument. Set
10138         EXPR_WFL_LINECOL accordingly.
10139         (dim_expr:): Wrap constants with WFLs.
10140         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
10141         (resolve_package): Check for `stmt' not being a BLOCK before
10142         building a debuggable statement with it.
10143         (make_qualified_primary): Added extra parameter to build_wfl_wrap
10144         invocation.
10145         (resolve_field_access): Make sure `decl' is a DECL before treating
10146         it as such.
10147         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
10148         IDENTIFIER_NODE before treating it as such.
10149         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
10150         treating it as such.
10151         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
10152         to be applied only on non array types.
10153
10154 2000-06-16  Per Bothner  <per@bothner.com>
10155
10156         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
10157         define in terms of DECL_RESULT, as that fails when --enable-checking.
10158
10159 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10160
10161         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
10162         types the same in comparison.
10163         (CHECK_OP): Add static prototype.
10164
10165 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
10166
10167         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
10168         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
10169         * parse.c: Rebuilt.
10170
10171 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10172
10173         * decl.c (create_primitive_vtable): Prototype.
10174
10175         * jcf-write.c (generate_bytecode_insns): Initialize variable
10176         `saved_context'.
10177
10178         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
10179
10180 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
10181
10182         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
10183         to track searched classes, and do not search the same class more than
10184         once. Call find_applicable_accessible_methods_list on immediate
10185         superclass, instead of search_applicable_method_list on all ancestors.
10186         Fix for PR gcj/238.
10187
10188 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
10189
10190         * parse.y (register_fields): Permit static fields in inner classes
10191         if they are final. Fix for PR gcj/255.
10192
10193 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10194
10195         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
10196         * parse.y (find_in_imports): Returned type changed to void,
10197         leading comment fixed.
10198         (register_package): New function.
10199         (qualify_and_find): Likewise.
10200         (package_declaration:): Use `register_package'.
10201         (single_type_import_declaration:): Removed local variable
10202         `node'. Added missing `;' for consistency.
10203         (type_import_on_demand_declaration:): Use `chainon' to link new
10204         entries.
10205         (lookup_field_wrapper): Lookup local variables defined in outer
10206         contexts first.
10207         (java_complete_class): Don't reverse the list of imported on demand.
10208         (do_resolve_class): Reorganized. Removed local variable
10209         `original_name'. Call `qualify_and_find' with the current package
10210         name, invoke `find_in_imports_on_demand' right after. Call
10211         `qualify_and_find' with the packages we've seen so far. Fixed
10212         operations numbering in comments.
10213         (java_expand_class): Don't reverse `package_list'.
10214         (find_most_specific_methods_list): New local variables `abstract'
10215         and `candidates'. Use them to pick the right method.
10216
10217 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
10218
10219         * parse.y (check_modifiers_consistency): Don't subtract out
10220         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
10221
10222 2000-06-04  Philipp Thomas  <pthomas@suse.de>
10223
10224         * Makefile.in (INTLLIBS): New.
10225         (LIBS): Add above.
10226         (DEPLIBS): Ditto.
10227
10228 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10229
10230         * class.c (get_dispatch_table): Build the vtable dummy entry list
10231         element with a null purpose. Fixed leading comment.
10232         (build_dtable_decl): Build an accurate dtable type when appropriate
10233         and use it.
10234
10235 2000-06-02  Richard Henderson  <rth@cygnus.com>
10236
10237         * lang.c (lang_get_alias_set): New.
10238
10239 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10240
10241         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
10242         before using it as the accessed field.
10243
10244 2000-05-31  Tom Tromey  <tromey@cygnus.com>
10245
10246         * java-tree.h (boolean_array_vtable, byte_array_vtable,
10247         char_array_vtable, short_array_vtable, int_array_vtable,
10248         long_array_vtable, float_array_vtable, double_array_vtable):
10249         Declare.
10250         * expr.c (get_primitive_array_vtable): New function.
10251         (create_primitive_vtable): New function.
10252         (java_lang_expand_expr): Enable code to statically generate
10253         arrays.
10254         * decl.c (init_decl_processing): Create primitive vtables.
10255         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
10256         short_array_vtable, int_array_vtable, long_array_vtable,
10257         float_array_vtable, double_array_vtable): Define.
10258
10259 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
10260
10261         * java/parse.y (find_applicable_accessible_methods_list):
10262         Don't add an uninitialized value to the list.
10263
10264 2000-05-25  Tom Tromey  <tromey@cygnus.com>
10265
10266         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
10267         when trying to see if field's class should be initialized.  Always
10268         initialize field's declaring class, not qualified class.
10269         For PR gcj/162.
10270
10271         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
10272         `wfl_operator', to maybe_build_primttype_type_ref.
10273         Fixes PR gcj/235.
10274
10275 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
10276
10277        * parse.y (patch_method_invocation): Don't try to lookup methods
10278        in primitive types.
10279
10280 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10281
10282         * parse.y (resolve_field_access): Call the appropriate <clinit>
10283         before accessing the length of a static array. Craft a decl for
10284         the field while its time. Fixes PR gcj/129.
10285
10286 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10287
10288         * parse.y (resolve_package): Correctly set `*next' (was off by
10289         one.)
10290         (resolve_qualified_expression_name): Fixed comment.
10291
10292 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10293
10294         * jcf-parse.c (jcf_parse_source): Reset current_class and
10295         current_function_decl to NULL before parsing a new file.
10296
10297 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10298
10299         * parse.y (block_end:): If the collected block doesn't feature a
10300         statement, insert an empty statement.
10301
10302 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10303
10304         * parse.y (maybe_yank_clinit): New function.
10305         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
10306         end of the list of methods belonging to a class.
10307         (java_complete_expand_method): Check whether <clinit> is really
10308         necessary and expand it accordingly.
10309
10310 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10311
10312         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
10313         processed by the method's switch statement.
10314
10315 2000-05-19  Tom Tromey  <tromey@cygnus.com>
10316
10317         * java-tree.h: Added init state enum.
10318         * decl.c (emit_init_test_initialization): Initialize class
10319         initialization check variable by looking at class' state.
10320
10321 2000-05-19  Tom Tromey  <tromey@cygnus.com>
10322
10323         * java-tree.h (build_instanceof): Declare.
10324         (build_get_class): Declare.
10325         * parse.y (patch_binop): Use build_instanceof.
10326         * expr.c (build_instanceof): New function.  If class is final,
10327         don't make a function call.
10328         (expand_java_INSTANCEOF): Use it.
10329         (build_get_class): New function.
10330
10331 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
10332
10333         * jcf-write.c (generate_classfile): Scan the source_file for
10334         slashes with the right pointer variable.
10335
10336 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
10337
10338         * lang.c (lang_decode_option): Update -Wunused flags by calling
10339         set_Wunused.
10340         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
10341
10342 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
10343
10344         * check_init.c (check_init): Constify local char *.
10345         * class.c (push_class): Constify local char *.
10346         * java_tree.h: Update prototypes.
10347         * jcf-io.c (open_class): Constify filename parameter and
10348         return value.
10349         (find_class): Remove redundant string copy.  Cast return from
10350         open_class.
10351         * jcf-parse.c (read_class, parse_class_file, yyparse):
10352         Constify local char *.
10353         * jcf-write.c (generate_bytecode_insns, generate_classfile):
10354         Constify local char *.
10355         * jcf.h (JCF): Constify filename and classname.
10356         (JCF_FINISH): Cast args to FREE to char * when appropriate.
10357         * lang.c (init_parse): Constify parameter and return value.
10358         * lex.c (java_get_line_col): Constify filename parameter.
10359         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
10360         * parse.y (java_parser_context_suspend,
10361         issue_warning_error_from_context, safe_layout_class): Constify
10362         local char *.
10363         * parse.c: Regenerate.
10364
10365 2000-05-08  Tom Tromey  <tromey@cygnus.com>
10366
10367         * expr.c (build_jni_stub): Cache the result of
10368         _Jv_LookupJNIMethod.
10369
10370 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10371
10372         * decl.c (predef_filenames_size): Now 7.
10373         (predef_filenames): New seventh entry.
10374
10375 2000-05-04  Tom Tromey  <tromey@cygnus.com>
10376
10377         * boehm.c (mark_reference_fields): Don't mark RawData fields.
10378         Keep track of when we've seen a reference field after a
10379         non-reference field.
10380         (get_boehm_type_descriptor): Handle case where we see
10381         non-reference fields but no trailing reference field.
10382         * decl.c (rawdata_ptr_type_node): Define.
10383         (init_decl_processing): Initialize rawdata_ptr_type_node.
10384         * java-tree.h (rawdata_ptr_type_node): Declare.
10385
10386 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10387
10388         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
10389         specifiers in calls to fprintf.
10390
10391 2000-05-03  Andrew Haley  <aph@cygnus.com>
10392
10393         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
10394
10395         * javaop.h (WORD_TO_INT): New function.
10396         (IMMEDIATE_s4): Use WORD_TO_INT.
10397         * jcf.h (JPOOL_INT): Ditto.
10398
10399         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
10400         separator.
10401
10402 2000-04-19  Tom Tromey  <tromey@cygnus.com>
10403
10404         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
10405         on native function.
10406         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
10407         JNI methods.
10408         * expr.c (build_jni_stub): New function.
10409         * lang-specs.h: -fjni and -femit-class-file are incompatible.
10410         * parse.c: Rebuilt.
10411         * parse.y (java_complete_expand_methods): Expand a native method
10412         and call build_jni_stub if -fjni given.
10413         * lang-options.h: Document -fjni.
10414         * lang.c (flag_jni): New global.
10415         (lang_f_options): Added `jni' entry.
10416         * java-tree.h (soft_lookupjnimethod_node,
10417         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
10418         Declare.
10419         (flag_jni): Declare.
10420         (build_jni_stub): Declare.
10421         (struct lang_decl): Added `native' flag.
10422         (METHOD_NATIVE): Redefined to use `native' field of lang specific
10423         structure.
10424         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
10425         soft_jnipopsystemframe_node): New globals.
10426         (init_decl_processing): Set them.  _Jv_InitClass only takes one
10427         argument.
10428
10429         * java-tree.def: Put into `C' mode.
10430
10431 2000-04-27  Tom Tromey  <tromey@cygnus.com>
10432
10433         Fix for PR gcj/2:
10434         * expr.c (expand_invoke): Generate check to see if object pointer
10435         is null in nonvirtual invocation case.
10436         * java-tree.h (soft_nullpointer_node): Declare.
10437         * decl.c (soft_nullpointer_node): New global.
10438         (init_decl_processing): Initialize soft_nullpointer_node.
10439         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
10440         or `private' methods.
10441         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
10442
10443 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10444
10445         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10446         from <clinit>
10447
10448 2000-04-26  Tom Tromey  <tromey@cygnus.com>
10449
10450         * zextract.c (find_zip_file_start): New function.
10451         (read_zip_archive): Use it.
10452
10453 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10454
10455         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
10456
10457 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10458
10459         * class.c (common_enclosing_context_p): New function.
10460         * java-tree.h (common_enclosing_context_p): Added prototype.
10461         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
10462         classes sharing an outer context with the current instance.
10463         * parse.y (build_access_to_thisn): Fixed leading comment.
10464         (verify_constructor_super): New local `supper_inner'. Skip
10465         enclosing context argument in the case of inner class constructors.
10466         (patch_method_invocation): Insert proper context as second
10467         parameter to pure inner class constructor super invocations.
10468
10469 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10470
10471         * parse.y (end_class_declaration): Reset the interface number
10472         counter.
10473
10474 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10475
10476         * parse.y (source_start_java_method): Deleted unnecessary code.
10477         (patch_method_invocation): Fixed comment.
10478
10479 2000-04-24  Robert Lipe <robertlipe@usa.net>
10480
10481         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
10482
10483 2000-04-23  Tom Tromey  <tromey@cygnus.com>
10484
10485         * boehm.c (mark_reference_fields): Use int_byte_position.
10486
10487 2000-04-22  Tom Tromey  <tromey@cygnus.com>
10488
10489         * boehm.c (mark_reference_fields): Only call byte_position on
10490         non-static fields.
10491
10492 2000-04-22  Tom Tromey  <tromey@cygnus.com>
10493
10494         * boehm.c (mark_reference_fields): Added `last_view_index'
10495         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
10496
10497 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
10498
10499         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
10500         * parse.y (check_class_interface_creation): Fixed comments. Select
10501         permitted modifiers for (inner) interfaces. Changed error message
10502         to report rejected modifiers used with local classes.
10503
10504 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10505
10506         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
10507         of directly inherited type considered in scope.
10508         * parse.y (do_resolve_class): Search inherited classes for inner
10509         classes.
10510
10511 2000-04-20  Tom Tromey  <tromey@cygnus.com>
10512
10513         * parse.y (not_accessible_p): Use member's class, not current
10514         class, when doing inheritance check for protected reference.
10515         Fixes PR gcj/124.
10516
10517 2000-04-20  Jason Schroeder  <shrode@subnature.com>
10518
10519         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
10520
10521 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10522
10523         * parse.y (lookup_field_wrapper): Search for final local aliases.
10524         (resolve_expression_name): Let lookup_field_wrapper search for
10525         final local aliases. Force the value of `name' if one is found.
10526         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
10527         an expression name. Fixed comments.
10528
10529 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10530
10531         * parse.y (yyerror): `msg' can be null, don't use it in that case.
10532
10533 2000-04-19  Tom Tromey  <tromey@cygnus.com>
10534
10535         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
10536
10537 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10538
10539         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
10540
10541 2000-04-18  Tom Tromey  <tromey@cygnus.com>
10542
10543         PR gcj/211:
10544         * gjavah.c (utf8_cmp): Changed return value.
10545         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
10546         result.
10547         (cxx_keywords): New global.
10548         (get_field_name): Handle new result of cxx_keyword_subst.
10549         (print_method_info): Likewise.
10550
10551 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
10552
10553         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
10554         with a newline, for CNI.
10555         (print_stub_or_jni): Print a space or newline before method name for
10556         CNI as well as JNI.
10557         (print_cxx_classname): Don't write leading "::" in CNI stub method.
10558         (process_file): Include gcj/cni.h if generating CNI stubs.
10559
10560 2000-04-16  Tom Tromey  <tromey@cygnus.com>
10561
10562         * gjavah.c (decompile_method): Use print_field_name.
10563         Fixes PR gcj/205.
10564
10565 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10566
10567         * parse.y (java_expand_classes): Reverse the package list once.
10568         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
10569         reduction.
10570         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
10571         the `==' and `!=' operators.
10572
10573 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10574
10575         * jcf-write.c (generate_bytecode_insns): At invocation time,
10576         always relate an interface method to the type of its selector.
10577
10578 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10579
10580         Fix for PR gcj/2:
10581         * expr.c (expand_invoke): Generate check to see if object pointer
10582         is null in nonvirtual invocation case.
10583         * java-tree.h (soft_nullpointer_node): Declare.
10584         * decl.c (soft_nullpointer_node): New global.
10585         (init_decl_processing): Initialize soft_nullpointer_node.
10586         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
10587         or `private' methods.
10588         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
10589
10590 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10591
10592         Fix for PR gcj/140:
10593         * parse.y (check_final_assignment): Recognize assignments to the
10594         `length' field of an array when generating class files.
10595
10596 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10597
10598         * class.c (decl_hash): Prototype removed.
10599         (decl_compare): Likewise.
10600
10601 2000-04-05  Tom Tromey  <tromey@cygnus.com>
10602
10603         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
10604         * parse.y (check_modifiers_consistency): Check for final/volatile
10605         clash.  Fixes PR gcj/164.
10606
10607 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10608
10609         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
10610         made global.
10611         (java_hash_compare_tree_node): Renamed from `decl_compare, made
10612         global.
10613         (add_method_1): Use `java_hash_hash_tree_node' and
10614         `java_hash_compare_tree_node'.
10615         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
10616         (java_hash_compare_tree_node): Likewise.
10617         * parse.y (find_applicable_accessible_methods_list): Create,
10618         delete and use a hash table to remember already searched interfaces.
10619
10620 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
10621
10622         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
10623         with latest entry.
10624
10625 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10626
10627         * boehm.c (mark_reference_fields, set_bit): Prototype.
10628         (set_bit): Un-ANSI-fy definition.
10629
10630         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
10631         Prototype.
10632
10633         * decl.c (emit_init_test_initialization): Likewise.
10634
10635         * gjavah.c (jni_print_char): Likewise.
10636
10637         * parse.y (create_new_parser_context): Likewise.
10638
10639 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10640
10641         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
10642         patch missing hunk. Fixed indentation.
10643
10644 2000-03-30  Tom Tromey  <tromey@cygnus.com>
10645
10646         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
10647         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
10648
10649 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10650
10651         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10652         when negative *before* using it as an array index.
10653         * ChangeLog: Fixed typo.
10654
10655 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10656
10657         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10658         to 0 when it reaches -1.
10659
10660 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10661
10662         * jcf-parse.c (get_constant): Properly cast `num' during the
10663         invocation of `add_double'.
10664         * jcf-write.c (push_long_const): Properly cast `lo' before
10665         comparing it to short bounds.
10666         * parse-scan.y (interface_declaration:): Rule re-arrange so that
10667         `interface_body:' is reduced after the current interface is
10668         pushed.
10669
10670 2000-03-26  Tom Tromey  <tromey@cygnus.com>
10671
10672         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
10673         Java-specific `-f' option.
10674
10675 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10676
10677         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
10678         Adjust order of making types.
10679         Make bitsize_*_node values.
10680
10681 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10682
10683         * class.c (make_field_value): Use byte_position.
10684         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
10685         (java_array_data_offset): Likewise.
10686         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
10687         bzero call.
10688
10689 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10690
10691         * parse.y (check_abstract_method_definitions): New local
10692         `end_type_reached'. Make sure we also consider `end_type'.
10693         (java_check_abstract_method_definitions): Make sure we eventually
10694         consider `java.lang.Object'.
10695         (maybe_use_access_method): Don't use access method if not in the
10696         context of a pure inner class or if the method's context is right.
10697         (find_applicable_accessible_methods_list): New static flag
10698         `object_done'. Don't search abstract classes as interfaces. Fixed
10699         indentation. Fixed the `java.lang.Object' only search. Search
10700         class interface(s) first, then fully search enclosing contexts.
10701         (find_most_specific_methods_list): Pick the closest candidate when
10702         they're all abstract.
10703
10704 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10705
10706         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10707         properly initialize `finished_label'. Don't emit gotos for empty
10708         try statements.
10709
10710 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10711
10712         * except.c (emit_handlers): Clear catch_clauses_last.
10713
10714 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10715
10716         * parse.y (check_method_types_complete): New function.
10717         (create_class): Reset anonymous class counter only when seeing an
10718         non inner classe.
10719         (java_complete_class): JDEP_METHOD: Don't recompute signature
10720         if incomplete.
10721
10722 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10723
10724         * class.c (build_static_ref): Fixed indentation in comment.
10725         * java-tree.def (TRY_EXPR): Fixed typo in name.
10726         (CLASS_LITERAL): Likewise.
10727         * java-tree.h: (TYPE_DOT_CLASS): New macro.
10728         (struct lang_type): New field `dot_class'.
10729         * jcf-write.c (generate_bytecode_insns): Fixed error message.
10730         (generate_classfile): Method `class$' is synthetic.
10731         * parse.y (build_do_class_method): New function.
10732         (build_dot_class_method_invocation): Likewise.
10733         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
10734         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
10735         (qualify_ambiguous_name): Likewise.
10736         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
10737         (build_try_statement): Fixed leading comment.
10738
10739 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10740
10741         * class.c (make_field_value): Properly handle sizes.
10742         (get_dispatch_vector): Use tree_low_cst and host_integerp.
10743         (layout_class_method): Count using trees.
10744         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
10745         * expr.c (java_array_data_offset): Use int_bit_position.
10746         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
10747         (build_invokevirtual): Use tree_low_cst and do computations with trees.
10748
10749 2000-03-16  Tom Tromey  <tromey@cygnus.com>
10750
10751         * lang.c (flag_hash_synchronization): New global.
10752         (lang_f_options): Added `hash-synchronization'.
10753         * lang-options.h: Mention -fhash-synchronization.
10754         * java-tree.h (flag_hash_synchronization): Declare.
10755         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
10756         hash table synchronization is disabled.
10757         * decl.c (init_decl_processing): Only push `sync_info' value when
10758         hash table synchronization is disabled.
10759         * class.c (make_class_data): Only push `sync_info' field when hash
10760         table synchronization is disabled.  Removed dead code.
10761
10762 2000-03-16  Tom Tromey  <tromey@cygnus.com>
10763
10764         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
10765
10766 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10767
10768         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
10769         classes.
10770         * parse.y (patch_method_invocation): Handle anonymous classes
10771         creation in static context.
10772
10773 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10774
10775         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
10776         * parse.y (resolve_qualified_expression_name): Use it.
10777         (patch_method_invocation): Likewise.
10778
10779 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10780
10781         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
10782         depending on the type of dependency which dictates what the
10783         current class is.
10784         (unresolved_type_p): Resolved types limited to the current class.
10785
10786 2000-03-15  Tom Tromey  <tromey@cygnus.com>
10787
10788         * decl.c (init_decl_processing): Set type of `sync_info' to be
10789         pointer to Object.
10790
10791         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
10792         Correctly compute bit number for current slot.  Zero `high' and
10793         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
10794         mark_reference_fields.
10795         (mark_reference_fields): New function.
10796
10797 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10798
10799         * parse.y (register_incomplete_type): Fixed initialization of
10800         JDEP_ENCLOSING.
10801
10802 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10803
10804         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
10805         static globals.
10806         (push_class_context, pop_class_context): New function.
10807         (class_body:): Call pop_class_context.
10808         (interface_body:): Likewise.
10809         (INNER_QUALIFIER): New macro.
10810         (report_class_declaration): Changed output format and use
10811         INNER_QUALIFIER. Call push_class_context.
10812
10813 2000-02-14  Andrew Haley  <aph@cygnus.com>
10814
10815         * check-init.c (check_init): Add new cases for unary and binary
10816         tree nodes.
10817
10818 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10819
10820         * parse.y (resolve_package): Set `next' once a type name has been
10821         progressively discovered.
10822         (resolve_qualified_expression_name): Propagate resolution only if
10823         there are remaining qualifiers. Take into account `q' might have
10824         been cleared after re-qualification.
10825         * parse.y (patch_method_invocation): New local `resolved'.
10826         Section dealing with qualified expression rewritten to use
10827         resolve_field_access.
10828
10829 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10830
10831         * parse.h (PUSH_CPC): Fixed indentation.
10832         (DEBUG_CPC): New macro.
10833         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
10834         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
10835         * parse.y (class_body_declaration:): Use
10836         SET_CPC_INSTANCE_INITIALIZER_STMT.
10837         (method_declaration:): Check for null current_function_decl.
10838         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
10839         (java_parser_context_pop_initialized_field): Better handling of
10840         empty lists.
10841         (maybe_make_nested_class_name): Mark nested class name as
10842         qualified when necessary.
10843         (end_class_declaration): Don't call java_parse_context_resume when
10844         one or more error occurred.
10845         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
10846         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
10847         SET_CPC_INITIALIZER_STMT.
10848         (method_header): Check for inner classes declaring static methods.
10849         (resolve_qualified_expression_name): Handle situation where `this'
10850         is implied.
10851
10852 2000-03-13  Hans Boehm <boehm@acm.org>
10853
10854         * typeck.c (build_prim_array_type): Correctly set the high word too.
10855
10856 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10857
10858         * parse.y (java_complete_expand_methods): Leave <clinit> out of
10859         ordinary methods.
10860         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
10861         list of methods for interfaces.
10862
10863 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10864
10865         * parse.y (qualify_ambiguous_name): Properly handle expressions
10866         using `null'.
10867
10868 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10869
10870         * parse.y (check_final_assignment): Extended to process
10871         COMPOUND_EXPR.
10872         (patch_assignment): Have check_final_assignment called only once.
10873
10874 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10875
10876         * java-tree.h (IS_INIT_CHECKED): New flag.
10877         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
10878         * parse.y (patch_string): Call force_evaluation_order on the
10879         completed string concatenation tree.
10880         * expr.c (force_evaluation_order): Call force_evaluation_order on
10881         function's arguments too.
10882
10883 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10884
10885         * decl.c (emit_init_test_initialization): Mark KEY as unused.
10886         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10887         (build_anewarray): Likewise.
10888         * parse.y (patch_newarray): Likewise.
10889         * parse.c: Regenerated.
10890
10891 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
10892
10893         * decl.c (init_decl_processing): Added new class fields `depth',
10894         `ancestors', and `idt' to class_type_node. Use
10895         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
10896         * class.c (make_class_data): Push initial values for new fields.
10897         * java-tree.h: Updated prototype for `build_invokeinterface'.
10898         * expr.c (build_invokeinterface): Changed parameters to accept
10899         `method' tree. Calculate index of `method' in its declaring
10900         interface. Build call to _Jv_LookupInterfaceMethodIdx.
10901         (expand_invoke): Call `build_invokeinterface' with new parameters.
10902         * parse.y (patch_invoke): Call `build_invokeinterface' with new
10903         parameters.
10904
10905 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
10906
10907         * typeck.c (lookup_do): Search superinterfaces first
10908         when looking up an interface method. From Godmar Back
10909         <gback@cs.utah.edu>
10910
10911 2000-03-06  Tom Tromey  <tromey@cygnus.com>
10912
10913         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
10914
10915 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10916
10917         * java-tree.h (lookup_argument_method2): Declared.
10918         (safe_layout_class): Prototype moved from parse.h.
10919         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
10920         * parse.y (java_check_regular_methods): Local `super_class' gone.
10921         Call lookup_argument_method2 instead of lookup_argument_method.
10922         Perform modifier match for methods found declared in implemented
10923         interfaces. Fixed indentation problem. Overriding/hiding error
10924         report to take place only for methods found in classes.
10925         * typeck.c (lookup_argument_method): Changed leading
10926         comment. Re-written by calling lookup_do.
10927         (lookup_argument_method2): New function.
10928         (lookup_java_method): Re-written by calling lookup_do.
10929         (lookup_do): New function.
10930
10931 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10932
10933         * check-init.c (check_init): Removed dead code. Handle (blank)
10934         final variables.
10935         * parse.y (declare_local_variables): New local `final_p', set it
10936         and use it to initialize LOCAL_FINAL.
10937         (check_final_assignment): Only check FIELD_DECLs.
10938
10939 2000-02-17  Tom Tromey  <tromey@cygnus.com>
10940
10941         * Makefile.in (JAVA_OBJS): Added boehm.o.
10942         (boehm.o): New target.
10943         * Make-lang.in (JAVA_SRCS): Added boehm.c.
10944         * java-tree.h (flag_use_boehm_gc): Declare.
10945         (get_boehm_type_descriptor): Declare.
10946         * lang.c (lang_f_options): Added `use-boehm-gc'.
10947         (flag_use_boehm_gc): New global.
10948         * lang-options.h: Added -fuse-boehm-gc.
10949         * boehm.c: New file.
10950         * class.c (get_dispatch_table): If class uses a Boehm type
10951         descriptor, put it in the vtable.
10952         (make_class_data): Removed dead code.
10953
10954 2000-03-03  Per Bothner  <per@bothner.com>
10955
10956         * decl.c (init_decl_processing):  Initialize sizetype properly.
10957
10958 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10959
10960         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
10961         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
10962         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10963         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
10964         (jcf_parse): New local `current'. Load innerclasses seen in outer
10965         context being processed.
10966         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10967         * jcf-write.c (append_innerclasses_attribute): New function.
10968         (append_innerclasses_attribute_entry): Likewise.
10969         (get_access_flags): Handle static classes. Set anonymous and local
10970         classes to be private.
10971         (generate_classfile): Attribute count adjusted. Call
10972         append_innerclasses_attribute.
10973         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
10974         PURE_INNER_CLASS_TYPE_P.
10975         * parse.y (parser_qualified_classname): New parameter `is_static',
10976         produce non qualified name accordingly.
10977         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
10978         (create_interface): Added argument to parser_qualified_classname.
10979         (create_class): Added argument to parser_qualified_classname. Setup
10980         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
10981         (add_inner_class_fields): Fixed indentation.
10982         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
10983         (method_declarator): Fixed typo in comment.
10984         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
10985         (build_current_thisn): Likewise.
10986         (patch_method_invocation): Likewise.
10987
10988 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10989
10990         * decl.c (current_function_decl): Move to toplev.c.
10991
10992 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10993
10994         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
10995         (DECL_BIT_INDEX): Use underlying representation.
10996         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
10997
10998 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10999
11000         * expr.c (build_java_ret): Pass proper type to size_binop.
11001
11002 2000-02-25  Anthony Green  <green@cygnus.com>
11003
11004         * expr.c (build_class_init): Mark the decl to be ignored by
11005         check_init.
11006         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
11007         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
11008         * class.c (init_test_hash_newfunc): New function.
11009         (decl_hash): New function.
11010         (decl_compare): New function.
11011         * decl.c (emit_init_test_initialization): New function.
11012         (complete_start_java_method): Traverse the init test hashtable,
11013         calling emit_init_test_initialization.
11014         (always_initialize_class_p): Define.
11015         * expr.c (build_class_init): Use initialization tests when
11016         emitting class initialization code.
11017         (always_initialize_class_p): Declare.
11018         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
11019         1.
11020         * java-tree.h: Include hash.h.
11021         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
11022         (struct lang_decl): Add init_test_table field.
11023         (init_test_hash_entry): Define.
11024
11025 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11026
11027         * gjavah.c (main): Avoid using `argi' to report unimplemented
11028         options.
11029
11030 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11031
11032         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
11033         initialize locals to avoid warnings. Local `exception_type' moved
11034         into if statement.
11035
11036 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11037
11038         * parse.y (resolve_expression_name): Use `orig' as a second
11039         argument to resolve_field_access.
11040         (resolve_field_access): Removed unnecessary code when dealing with
11041         static fields.
11042
11043 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11044
11045         * class.c (push_super_field): Don't push the field twice.
11046         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
11047         * parse.h (java_reorder_fields): Prototyped.
11048         * parse.y (java_reorder_fields): New function.
11049         (java_layout_class): Simplified not to worry about re-ordering.
11050
11051 2000-02-23  Tom Tromey  <tromey@cygnus.com>
11052
11053         * gjavah.c (print_name): In JNI case, correctly quote string.
11054         (print_method_info): Don't handle overrides in JNI mode.
11055
11056 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11057
11058         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
11059         value type set to `boolean_type_node'.
11060
11061 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11062
11063         * jcf-dump.c (main): Test for correct condition after
11064         output file creation.
11065
11066 2000-02-19  Anthony Green  <green@cygnus.com>
11067
11068         * jcf-depend.c (add_entry): Fix test for first list entry.
11069
11070 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11071
11072         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
11073         * constants.c (build_constants_constructor): Likewise.
11074
11075 2000-02-19  Anthony Green  <green@cygnus.com>
11076
11077         * jcf-depend.c (add_entry): Add entries to the end of the list.
11078
11079 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
11080
11081         * decl.c (INT_TYPE_SIZE): Define if necessary.
11082         (expand_java_return): Handle the case of a native integer smaller
11083         than a JVM integer.
11084
11085 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11086
11087         * gjavah.c (help): Use GCCBUGURL.
11088         * jv-scan.c (help): Likewise.
11089         * jcf-dump.c (help): Likewise.
11090
11091 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11092
11093         * jcf-write.c (generate_bytecode_insns): Don't generate empty
11094         `finally' clauses.
11095
11096 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11097
11098         * jcf-parse.c (load_class): Call `fatal' if no file containing
11099         the target class are found.
11100
11101 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
11102
11103         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
11104         lex.c, lex.h, and PARSE_H to...
11105         (parse.o, parse-scan.o): ...here, respectively.
11106
11107         * lex.c: Split out code that may trigger SIGFPE from yylex()
11108         to its own function.
11109         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
11110
11111 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11112
11113         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
11114
11115 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11116
11117         * parse.y (outer_field_access_p): Stop in time when outer contexts
11118         are exhausted.
11119         (resolve_qualified_expression_name): Properly qualify *everything*
11120         after a package.type to be resoled as expression names.
11121         (find_applicable_accessible_methods_list): Save/restore `class' to
11122         isolate it from a possible outer context search.
11123
11124 2000-02-15  Tom Tromey  <tromey@cygnus.com>
11125
11126         * gjavah.c (jni_print_char): New function.
11127         (print_full_cxx_name): Use it.
11128         (decode_signature_piece): Likewise.
11129         (print_cxx_classname): Likewise.
11130
11131 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11132
11133         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
11134         version.o.
11135         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
11136
11137         * gjavah.c: Include version.h.
11138
11139         * jcf-dump.c: Likewise.
11140
11141         * jv-scan.c: Likewise.
11142
11143 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11144
11145         * parse.y (outer_field_access_fix): First parameter now a tree
11146         node. Check for assignment to final. First argument to
11147         build_outer_field_access_fix modified to accommodate prototype.
11148         (build_outer_field_access): Don't check for assignment to final
11149         here.
11150         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
11151         possibly returned by outer_field_access_fix. Changed
11152         outer_field_access_fix's first argument.
11153         (check_final_assignment): $finit$'s context is OK.
11154         (patch_unaryop): Use node instead of its line/column value when
11155         calling outer_field_access_fix.
11156
11157 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11158
11159         * parse.y (interface_declaration:): No longer tagged
11160         <node>. Re-installed default action.
11161         (class_member_declaration:): Handle inner interfaces.
11162         (interface_member_declaration): Handle inner interfaces and
11163         classes.
11164         (create_interface): Push error if one seen. Suspend parsing
11165         context when processing an inner interface.
11166         (register_fields): Inner class static field limitations not to
11167         apply to inner interfaces.
11168
11169 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11170
11171         * jcf-parse.c (load_class): Update `java_error_count' when a
11172         class' file can't be found.
11173         (parse.y): Avoid (byte)code generation when errors seen.
11174
11175 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11176
11177         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
11178         decodes a valid node.
11179         (patch_binop): Handle TRUNC_DIV_EXPR.
11180
11181 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11182
11183         * parse.y (resolve_package): New local `acc'. Try to progressively
11184         build and guess a package and type name.
11185
11186 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11187
11188         * parse.y (find_applicable_accessible_methods_list): Load and
11189         layout the search class if necessary.
11190         (java_complete_tree): Keep to original type of the folded initial
11191         value.
11192
11193 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11194
11195         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
11196         Generate error message if circularity is detected. New static
11197         local `list'.
11198         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
11199         * jcf-write.c (generate_bytecode_insns): Very simply handle
11200         SAVE_EXPR.
11201         * parse.y (java_check_circular_reference): Use
11202         `cyclic_inheritance_report' during report, if necessary.
11203         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
11204         walking NEW_ARRAY_INIT twice.
11205
11206 2000-02-09  Tom Tromey  <tromey@cygnus.com>
11207
11208         * parse.y (check_class_interface_creation): Allow inner classes to
11209         be `private' or `protected', check modifiers' consistency. Prevent
11210         block local classes from bearing any modifiers.
11211
11212 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11213
11214         * except.c (check_start_handlers): Re-add prototype lost in last
11215         patch.
11216         (maybe_start_try): Remove excess argument to `check_start_handlers'.
11217
11218 2000-02-09  Andrew Haley  <aph@cygnus.com>
11219
11220         * decl.c (clear_binding_level): Remove excess initializer.
11221         (maybe_poplevels): Remove unused variable.
11222         (force_poplevels): Ditto.
11223         (struct binding_level): Add comment.
11224
11225 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11226
11227         * jcf-write.c (generate_classfile): Don't consider
11228         pre-initialization with reference value (use <clinit> instead.)
11229         * parse.y (java_fix_constructors): No generated constructor for
11230         interfaces.
11231         (build_outer_field_access): Removed debug message.
11232         (outer_field_expanded_access_p): Adapted to bytecode generation.
11233         (build_outer_field_access_method): Use fix_method_argument_names.
11234         (build_outer_method_access_method): Fixed indentation. Added
11235         comment. Handle access method generation for static and also void
11236         methods.
11237         (build_access_to_thisn): Inserted debug message.
11238         (maybe_build_thisn_access_method): Use fix_method_argument_names.
11239         (resolve_qualified_expression_name): Fixed comment.
11240         (not_accessible_p): Adapted to bytecode generation. Added comment.
11241         (patch_method_invocation): Added comment.
11242         (maybe_use_access_method): Fixed leading comment. Handle static
11243         methods.
11244         (java_complete_lhs): Don't shortcut handling of initialized upon
11245         declaration String type static fields when generating bytecode.
11246         (patch_unaryop): Handle outer field access when generating
11247         bytecode.
11248
11249 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11250
11251         * java-tree.h (FIELD_THISN): New macro.
11252         * jcf-write.c (append_synthetic_attribute): New function.
11253         (generate_classfile): Set "Synthetic" attribute on this$<n>,
11254         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
11255         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
11256         this$<n> fields.
11257         (build_outer_field_access): Turned on access functions usage and
11258         generation when compiling to bytecode.
11259         (maybe_use_access_method): Likewise.
11260
11261 2000-01-25  Andrew Haley  <aph@cygnus.com>
11262
11263         * java-except.h (struct eh_range): Add `expanded' field.
11264         (maybe_start_try): Add end_pc arg.
11265         (maybe_end_try): Ditto.
11266         * java-tree.h (force_poplevels): new function.
11267         * expr.c (expand_byte_code): Don't call maybe_start_try or
11268         maybe_end_try.
11269         * except.c (add_handler): Reset expanded.
11270         (expand_start_java_handler): Set expanded.
11271         (check_start_handlers): Don't expand a start handler that's
11272         already been expanded.
11273         (maybe_start_try): Add end_pc arg.  Only expand a handler which
11274         ends after end_pc.
11275         (expand_end_java_handler): call force_poplevels.
11276         (force_poplevels): new function.
11277         * decl.c (binding_level): Add start_pc of binding level.
11278         (maybe_pushlevels): Call maybe_start_try when pushing binding
11279         levels.
11280         (maybe_poplevels): Call maybe_end_try when popping binding levels.
11281         (LARGEST_PC): Define.
11282         (clear_binding_level): Use LARGEST_PC.
11283
11284         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
11285         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
11286         (binding_depth, is_class_level, current_pc): new variables.
11287         (struct binding_level): ditto.
11288         (indent): new function.
11289         (push_jvm_slot): add debugging info.
11290         (maybe_pushlevels): ditto.
11291         (maybe_poplevels): ditto.
11292         (pushlevel): ditto.
11293         (poplevel): ditto.
11294         (start_java_method): ditto.
11295         (give_name_to_locals): comment only.
11296         * except.c (binding_depth, is_class_level, current_pc):
11297         new variables.
11298         (expand_start_java_handler): add debugging info.
11299         (expand_end_java_handler): ditto.
11300
11301 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11302
11303         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
11304         (print_name_for_stub_or_jni, process_file): Constify a char*.
11305
11306 2000-02-03  Tom Tromey  <tromey@cygnus.com>
11307
11308         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
11309
11310 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
11311
11312         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
11313         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
11314         defined to be 1.
11315
11316 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11317
11318         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
11319         * java-tree.h (TYPE_II_STMT_LIST): New macro.
11320         (struct lang_type): New field `ii_block'.
11321         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
11322         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
11323         * parse.h (struct parser_ctxt): New field `instance_initializers'.
11324         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
11325         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
11326         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
11327         macros.
11328         * parse.y (add_instance_initializer): New function.
11329         (in_instance_initializer): New static global.
11330         (class_body_declaration:): Link instance initializer block.
11331         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
11332         (array_creation_expression:): Remove unused local.
11333         (java_parser_context_push_initialized_field): Fixed leading
11334         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
11335         CPC_INSTANCE_INITIALIZER_LIST.
11336         (java_parser_context_pop_initialized_field): Likewise.
11337         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
11338         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
11339         CPC_INITIALIZER_STMT.
11340         (fix_constructors): New local `class_type'. Use it. Call
11341         add_instance_initializer.
11342         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
11343         (patch_return): Forbid return in instance initializers.
11344         (patch_throw_statement): Enforce exception handling in the context
11345         of instance initializers.
11346
11347 2000-02-03  Tom Tromey  <tromey@cygnus.com>
11348
11349         * Make-lang.in (java.mostlyclean): Remove executables in
11350         `mostlyclean'.
11351
11352 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
11353
11354         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
11355         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
11356         (java_float_finite): Convert to use union Word from javaop.h.
11357         (java_double_finite): Convert to use union DWord from javaop.h.
11358
11359 2000-02-02  Tom Tromey  <tromey@cygnus.com>
11360
11361         * gjavah.c (options): Added `jni' entry.
11362         (help): Document -jni.
11363         (flag_jni): New global.
11364         (process_file): Handle JNI output.  Don't print text from
11365         -prepend, -add, etc, when generating stubs.  Only remove `.class'
11366         suffix if it actually exists.
11367         (main): Create a `.c' file when run with `--jni --stubs'.  Create
11368         correct output file name with `--jni'.
11369         (print_include): Mangle header name differently in JNI case.
11370         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
11371         method list.
11372         (print_method_info): Handle JNI case.  Put signature info into
11373         method name.  Handle case when STREAM is NULL.
11374         (print_name_for_stub_or_jni): New function.
11375         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
11376         (print_cxx_classname): Handle JNI.
11377         (print_full_cxx_name): Likewise.
11378         (decode_signature_piece): Likewise.
11379         (overloaded_jni_method_exists_p): New function.
11380         (struct method_name): Added `signature' and `sig_length' fields.
11381         (HANDLE_END_FIELD): Do nothing in JNI mode.
11382
11383 2000-02-02  Tom Tromey  <tromey@cygnus.com>
11384
11385         * jv-scan.c: Include version.c, <getopt.h>.
11386         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
11387         (options): New array.
11388         (usage): New function.
11389         (version): New function.
11390         (main): Use getopt_long to parse command line.
11391         * jcf-dump.c: Include version.c, <getopt.h>.
11392         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
11393         OPT_JAVAP): New macros.
11394         (options): New array.
11395         (usage): Return `void'.  Changed message.
11396         (help): New function.
11397         (version): New function.
11398         (main): Use getopt_long_only to parse command line.
11399         * gjavah.c: Include <getopt.h>.
11400         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
11401         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
11402         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
11403         (options): New array.
11404         (java_no_argument): Removed.
11405         (help): Updated with missing options.
11406         (main): Use getopt_long_only to parse command line.
11407         (usage): Changed message.
11408
11409 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11410
11411         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
11412         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
11413         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
11414         * parse.y (array_creation_expression:): Handle anonymous arrays.
11415         (build_array_from_name): Don't set `ret_name' if null.
11416         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
11417         (qualify_ambiguous_name): Likewise.
11418         (java_complete_expand_class): Likewise.
11419
11420 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11421
11422         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
11423         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
11424         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
11425         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
11426         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
11427         AIPL_FUNCTION_COMPLETED_INVOCATION.
11428         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
11429         AIPL_FUNCTION_INVOCATION_READY.
11430         (AIPL_FUNCTION_DECLARATION): New enum entry.
11431         * parse.y (reorder_static_initialized): New function.
11432         (java_parser_context_pop_initialized_field): Use it.
11433         (add_inner_class_fields): Use
11434         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
11435         augmented. Install marker after last alias initializer, if any.
11436         (generate_finit): Fixed typo. Don't try to retain only the used
11437         fields.
11438         (method_header): Compute and set DECL_FUNCTION_NAP.
11439         (method_declarator): Fixed comment. Insert alias initializer in
11440         parameter list.
11441         (build_alias_initializer_parameter_list): Fixed leading
11442         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
11443         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
11444         (java_complete_expand_class): Code to retain only used aliases
11445         removed.
11446         (java_complete_expand_methods): New local `first_decl'. Generate
11447         $finit$ first, then expand the constructors, regular methods and
11448         <clinit>.
11449         (java_complete_expand_method): Don't report error on missing
11450         return statement if previously detected bogus.
11451         (fix_constructors): Don't patch constructor parameters list.
11452         (patch_method_invocation): Use new AIPL enum values. Reverse
11453         alias initializer list for anonymous classes.
11454
11455 2000-01-30  Anthony Green  <green@redhat.com>
11456
11457         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
11458         determine how many stack slots to pop.
11459
11460 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11461
11462         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
11463         error handling/recovery.
11464         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
11465
11466 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11467
11468         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
11469         FIELD_LOCAL_ALIAS_USED): New macros.
11470         (DECL_FUNCTION_NAP): New macro.
11471         (struct lang_decl): New field `nap'.
11472         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
11473         (struct lang_type): New fields `finit_stmt_list' and
11474         `clinit_stmt_list'.
11475         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
11476         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
11477         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
11478         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
11479         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
11480         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
11481         (BUILD_THROW): Macro line separator re-indented.
11482         * parse.y (end_class_declaration): New function.
11483         (maybe_generate_pre_expand_clinit): New name for
11484         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
11485         pre-expand static fields.
11486         (maybe_generate_clinit): Function deleted.
11487         (check_for_static_method_reference): Prototype's parameter list
11488         indented.
11489         (generate_finit): New name for maybe_generate_finit. Changed
11490         leading comment. Function rewritten to use
11491         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
11492         (build_alias_initializer_parameter_list): New function.
11493         (java_parser_context_pop_initialized_field): Likewise.
11494         (add_inner_class_fields): Likewise.
11495         (type_declaration:): Call end_class_declaration.
11496         (class_member_declaration:): Likewise.
11497         (formal_parameter_list:): Fixed typos.
11498         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
11499         element. Improved error handling.
11500         (block_statement:): Call end_class_declaration.
11501         (anonymous_class_creation:): Likewise.
11502         (create_anonymous_class): Fixed comments.
11503         (create_class): Call add_inner_class_fields.
11504         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
11505         (method_header): Use MARK_FINAL_PARMS.
11506         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
11507         (method_declarator): Propagate final argument flag.
11508         (craft_constructor): New local `artificial'. Call
11509         build_alias_initializer_parameter_list. Use
11510         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
11511         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
11512         necessary.
11513         (complete_expand_class): Get rid of unused outer context local
11514         alias fields.
11515         (java_complete_expand_methods): Fixed leading
11516         comment. Generate/pre-expand <clinit> first. Changed method
11517         expansion order to regular, $finit$, constructors, <clinit>.
11518         (java_complete_expand_method): Set current_function_decl.
11519         (fix_constructors): Fix constructor parameter list to account for
11520         outer context local alias initializers.
11521         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11522         (resolve_expression_name): Lookup outer context local aliases. New
11523         local `access', use it.
11524         (patch_method_invocation): Patch inner class ctor invocation with
11525         outer context local aliases initialization values. $finit$
11526         invocation patching now includes things generated with
11527         build_alias_initializer_parameter_list.
11528         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11529         (build_super_invocation): Likewise.
11530         (patch_assignment): Changed comment.
11531
11532 2000-01-27  Andrew Haley  <aph@cygnus.com>
11533
11534         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
11535         (emit_if): Ditto.
11536         (emit_jsr): Ditto.
11537
11538 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11539
11540         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
11541         concatenation.
11542         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
11543
11544         * parse.y (register_fields): Don't pass a format specifier to
11545         OBSOLETE_MODIFIER_WARNING.
11546         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
11547         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
11548         specifier.
11549         (check_modifiers): Change function into a macro.
11550         (check_class_interface_creation): Pass a literal format string.
11551
11552 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11553
11554         * buffer.h: PROTO -> PARAMS.
11555         * check-init.c: Likewise.
11556         * class.c: Likewise.
11557         * constants.c: Likewise.
11558         * convert.h: Likewise.
11559         * decl.c: Likewise.
11560         * except.c: Likewise.
11561         * expr.c: Likewise.
11562         * gjavah.c: Likewise.
11563         * java-except.h: Likewise.
11564         * java-tree.h: Likewise.
11565         * jcf-depend.c: Likewise.
11566         * jcf-dump.c: Likewise.
11567         * jcf-parse.c: Likewise.
11568         * jcf-path.c: Likewise.
11569         * jcf-reader.c: Likewise.
11570         * jcf-write.c: Likewise.
11571         * jcf.h: Likewise.
11572         * jv-scan.c: Likewise.
11573         * jvgenmain.c: Likewise.
11574         * jvspec.c: Likewise.
11575         * lang.c: Likewise.
11576         * lex.c: Likewise.
11577         * lex.h: Likewise.
11578         * parse-scan.y: Likewise.
11579         * parse.h: Likewise.
11580         * parse.y: Likewise.
11581         * typeck.c: Likewise.
11582         * verify.c: Likewise.
11583         * xref.c: Likewise.
11584         * xref.h: Likewise.
11585         * zextract.c: Likewise.
11586         * zipfile.h: Likewise.
11587
11588 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11589
11590         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11591         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
11592         * constants.c (build_constant_data_ref): Check for cached
11593         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
11594         in TYPE_CPOOL_DATE_REF.
11595         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
11596         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
11597         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
11598         (LOCAL_FINAL): New macro.
11599         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
11600         constant pool -- don't try to reuse.
11601         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
11602         TYPE_LANG_SPECIFIC.
11603         (find_in_current_zip): Use TYPE_JCF.
11604         * parse.h (java_check_final): Prototype removed.
11605         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
11606         (maybe_create_class_interface_decl,
11607         check_class_interface_creation): Likewise.
11608         (java_expand_finals): Function removed.
11609         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
11610         (block_statement:): Fixed comment.
11611         (anonymous_class_creation:): Likewise.
11612         (check_class_interface_creation): Reversed Jan 12, 2000 extra
11613         argument patch.
11614         (check_class_interface_creation): Loosened error report on (inner)
11615         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
11616         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
11617         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
11618         argument patch.
11619         (create_interface): Likewise.
11620         (anonymous_class_counter): New static global.
11621         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
11622         patch. Fixed comments.
11623         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
11624         anonymous_class_counter when declaring a toplevel class.
11625         (craft_constructor): Fixed constructor name when handling
11626         anonymous classes. Anonymous class constructors to feature hidden
11627         this$<n> parameter.
11628         (java_fix_constructors): Added comment.
11629         (java_check_final): Function removed.
11630         (java_complete_expand_methods): Fixed comment. Don't generate
11631         class data, save its outgoing constant pool instead.
11632         (verify_constructor_super): Skip anonymous class constructor
11633         hidden this$<n> parameter.
11634         (java_expand_classes): New local `saved_ctxp'. Removed call to
11635         java_expand_finals and java_check_final. Expand anonymous class
11636         constructors. Generate class data.
11637         (build_super_invocation): Skip anonymous class hidden this$<n>
11638         parameter.
11639         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
11640         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11641         (set_java_signature): Likewise.
11642
11643 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11644
11645         * gjavah.c: Delete ACC_VISIBILITY define.
11646         * jcf.h: Add ACC_VISIBILITY define.
11647         * parse.y: final: rule tagged <value>.
11648         (java_check_regular_methods): Use ACC_VISIBILITY define for
11649         default package access check.
11650         (local_variable_declaration_statement): Use final: rule.
11651
11652 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11653
11654         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
11655         (final:): New rule.
11656
11657 2000-01-17  Tom Tromey  <tromey@cygnus.com>
11658
11659         * gjavah.c (print_field_info): Allow non-static final fields.
11660
11661 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11662
11663         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
11664         * parse.y (patch_anonymous_class): New function.
11665         (create_anonymous_class): Register incomplete type when the
11666         class/interface to extends/implement isn't known yet.
11667         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
11668         (verify_constructor_super): Tuned error message.
11669
11670 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11671
11672         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
11673         (ANONYMOUS_CLASS_P): New macro.
11674         (TYPE_SIGNATURE, TYPE_JCF): New macros.
11675         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
11676         * parse.y (create_class): Added leading argument.
11677         (maybe_create_class_interface_decl,
11678         check_class_interface_creation): Likewise.
11679         (craft_constructor): New function.
11680         (verify_constructor_super): Added argument in prototype.
11681         (class_declaration:): Inserted leading argument.
11682         (for_begin:): Use FOR_LOOP_P.
11683         (anonymous_class_creation): Create WFL of the anonymous class to
11684         instantiate. Call build_new_invocation. Added comments.
11685         (check_class_interface_creation): Handle parameter `anonymous' in
11686         verbose mode class creation announce.
11687         (link_nested_class_to_enclosing): Exclude anonymous classes.
11688         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
11689         anonymous class, even though they appear to have an enclosing
11690         context.
11691         (create_interface): Pass extra argument to
11692         check_class_interface_creation.
11693         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
11694         (create_class): Call check_class_interface_creation and
11695         maybe_create_class_interface_decl with extra new argument. Don't
11696         add private this$<n> to anonymous classes.
11697         (method_declarator): Insert hidden this$<n> to anonymous class
11698         constructors.
11699         (java_fix_constructors): Deleted code creating default
11700         constructor. Call craft_constructor instead.
11701         (java_check_regular_methods): Set `saw_constructor' to 1 for
11702         anonymous classes.
11703         (fix_constructors): Pass extra argument to verify_constructor_super.
11704         (verify_constructor_super): New local `sdecl', use it. Search for
11705         matching constructor (possibly featuring arguments) in super
11706         class.
11707         (lookup_method_invoke): Craft constructor according to arguments
11708         list when dealing with anonymous class constructors.
11709         (build_super_invocation): Pass arguments to anonymous class super
11710         constructors.
11711         (search_loop): Use FOR_LOOP_P.
11712         (labeled_block_contains_loop_p): Likewise.
11713
11714 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11715
11716         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
11717         (enclosing_context_p): New function.
11718         (get_access_flags_from_decl): Handle CLASS_STATIC.
11719         (maybe_layout_super_class): Extra first argument passed to
11720         do_resolve_class.
11721         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
11722         ID_INIT_P.
11723         * decl.c (access0_identifier_node): New global.
11724         (init_decl_processing): access0_identifier_node initialized.
11725         (pushdecl): Set DECL_CONTEXT only on non type decls.
11726         * expr.c (lookup_field): Lookup inner class fields in enclosing
11727         contexts.
11728         (expand_invoke): Use ID_INIT_P.
11729         (expand_java_field_op): Use DECL_CLINIT_P.
11730         * java-tree.def (CLASS_LITERAL): New tree code.
11731         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
11732         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
11733         (struct lang_decl): New field `inner_access'.
11734         (enclosing_context_p): Prototyped.
11735         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
11736         ID_CLINIT_P): New macros.
11737         (CLASS_STATIC): New macro.
11738         (CLASS_ACCESS0_GENERATED_P): New macro.
11739         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
11740         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
11741         INNER_CLASS_P): New macros.
11742         (DECL_INNER_CLASS_LIST): New macro.
11743         * jcf-parse.c (yyparse): Avoid the use of ANSI string
11744         concatenation.
11745         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11746         the shift value to int. Fixed typo in comment.
11747         * lex.c (inst_id, wpv_id): Initialize.
11748         * mangle.c (unicode_mangling_length): Take `$' into account.
11749         * parse.h (DRECOVER, RECOVER): Terminate properly.
11750         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
11751         (typedef struct _jdep): New field `enclosing'.
11752         (JDEP_ENCLOSING): New macro.
11753         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
11754         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
11755         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
11756         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
11757         GET_ENCLOSING_CPC_CONTEXT): New macros.
11758         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
11759         (do_resolve_class): Added extra argument in prototype.
11760         * parse.y (resolve_class): Added extra argument in prototype.
11761         (maybe_create_class_interface_decl): Likewise.
11762         (maybe_use_access_method, build_wfl_wrap): New functions.
11763         (java_complete_expand_classes, java_complete_expand_class):
11764         Likewise.
11765         (java_parser_context_push_initialized_field,
11766         java_parser_context_suspend, java_parser_context_resume):
11767         Likewise.
11768         (maybe_make_nested_class_name, make_nested_class_name,
11769         set_nested_class_simple_name_value,
11770         link_nested_class_to_enclosing, find_as_inner_class,
11771         find_as_inner_class_do, check_inner_class_redefinition,
11772         build_thisn_assign, build_current_thisn, build_access_to_thisn,
11773         maybe_build_thisn_access_method, build_outer_field_access,
11774         build_outer_field_access_methods, build_outer_field_access_expr,
11775         build_outer_method_access_method, build_new_access_id,
11776         build_outer_field_access_method, outer_field_access_p,
11777         outer_field_expanded_access_p, outer_field_access_fix,
11778         build_incomplete_class_ref, patch_incomplete_class_ref,
11779         create_anonymous_class): Likewise.
11780         (inst_id, wpv_id): New static global variables.
11781         (synchronized:): New rule, tagged <node>.
11782         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
11783         rules.
11784         (anonymous_class_creation:): New rule, tagged <node>.
11785         (NEW_TK): Tagged <node>.
11786         (type_literals, array_type_literal): New rules, tagged <node>.
11787         (class_declaration:): Removed action when reducing by class_body:
11788         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
11789         using GET_CPC in sub-rules.
11790         (class_member_declaration): Handle inner classes.
11791         (method_declaration): When reducing method_header:, reset
11792         current_function_decl when appropriate.
11793         (method_declarator:): Set the number of formal parameter to 0 for
11794         method declared without arguments.
11795         (constructor_declarator:): Likewise.
11796         (static_initializer:): List of elements kept in a list.
11797         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
11798         use of the keyword `static' for type declarations.
11799         (block_statement:): Handle inner class declarations.
11800         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
11801         type qualified `this'.
11802         (class_instance_creation_expression): Use anonymous_class_creation:
11803         to handle inner class instances creation. Handle qualified `new'.
11804         (something_dot_new): Added appropriate actions.
11805         (create_new_parser_context): New function.
11806         (java_push_parser_context, java_parser_context_save_global,
11807         java_parser_context_suspend): Use create_new_parser_context.
11808         (check_modifiers): Changed leading comment.
11809         (check_class_interface_creation): Handle interclasses.
11810         (add_superinterfaces): Fixed comment.
11811         (create_interface): Build qualified name from the raw_name instead
11812         of its matching WFL. Push the initialized fields list. raw_name added
11813         as an extra argument to maybe_create_class_interface_decl.
11814         (create_class): Build qualified name from the raw_name instead of
11815         its matching WFL. Removed assignment to current_parsed_class_un.
11816         Call PUSH_ERROR before returning an error. Suspend the current
11817         parser context when processing an inner class. Push the
11818         initialized fields list. raw_name added as an extra argument to
11819         maybe_create_class_interface_decl. Add the private this$<n>
11820         field.
11821         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
11822         (register_fields): Get the class type from GET_CPC and handle
11823         previous errors.  Added code to handle the creation of static
11824         fields in inner classes. Initialized fields initialization
11825         statements kept in a list of lists.
11826         (maybe_generate_finit): Initialized fields initialization
11827         statements kept in a list of lists. Use GET_CPC.
11828         (maybe_generate_clinit): Likewise.
11829         (method_header): Use GET_CPC and GET_CPC_UN.
11830         (parser_qualified_classname): Handle inner classes.
11831         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
11832         (java_fix_constructors): Hide pointer to enclosing context
11833         instance in constructor list when dealing with inner classes.
11834         (jdep_resolve_class): Call resolve_class with extra first argument
11835         JDEP_ENCLOSING.
11836         (resolve_class): Add enclosing context as a first extra argument
11837         to do_resolve_class.
11838         (do_resolve_class): Call find_as_inner_class. Handle WFLs
11839         properly.
11840         (resolve_no_layout): Extra argument added to resolve_class
11841         invocation.
11842         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
11843         (java_get_real_method_name): Use GET_CPC_UN.
11844         (check_abstract_method_definitions): Use DECL_CLINIT_P.
11845         (java_check_abstract_methods): Handle static method declared in
11846         inner classes by an error.
11847         (java_check_regular_methods): Use DECL_CLINIT_P.
11848         (source_start_java_method): Also set DECL_MAX_LOCALS.
11849         (create_artificial_method): Call java_parser_context_save_global
11850         and java_parser_context_restore_global instead of saving/restoring
11851         the context by hand.
11852         (expand_start_java_method): Improved verbose mode message.
11853         (java_complete_expand_methods): Fixed leading comment. Use
11854         DECL_CLINIT_P.
11855         (fix_constructors): Added assignment to this$<n> if necessary.
11856         (java_expand_classes): Call java_complete_expand_classes instead
11857         of java_complete_expand_methods.
11858         (make_qualified_primary): Simplified.
11859         (merge_qualified_name): Optimized for missing left or right parts.
11860         (resolve_expression_name): Handle access to outer class fields from
11861         interclasses.
11862         (resolve_qualified_expression_name): New macro
11863         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
11864         classes. Report error on non appropriate qualification of
11865         `new'. Handle qualified `this'.
11866         (not_accessible_p): Allow access to outer class private fields from
11867         inner classes.
11868         (patch_method_invocation): Handle method invocations through
11869         access methods and inner class constructor invocations.
11870         (find_applicable_accessible_methods_list): Search enclosing
11871         contexts of an inner class.
11872         (search_applicable_methods_list): Fixed typo.
11873         (argument_types_convertible): Handle inner class constructors'
11874         hidden outer context reference argument.
11875         (qualify_ambiguous_name): Handle qualified `this'.
11876         (java_complete_lhs): Handle use of field accessed through
11877         artificial access methods in various cases of assignments. Handle
11878         CLASS_LITERAL node.
11879         (check_final_assignment): Use DECL_CLINIT_P.
11880         (valid_ref_assignconv_cast_p): Handle the destination being an
11881         enclosing context of the source.
11882         (patch_unaryop): Handle use of field accessed through artificial
11883         access methods.
11884         (patch_return): Use DECL_CLINIT_P.
11885         (patch_throw_statement): Use DECL_CLINIT_P.
11886         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
11887         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
11888         ID_INIT_P.
11889
11890 2000-01-16  Anthony Green  <green@cygnus.com>
11891
11892         * parse.y (build_string_concatenation): Only use
11893         StringBuffer(String) shortcut if String arg is constant.
11894
11895 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11896
11897         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11898         the shift value to int. Fixed typo in comment.
11899
11900 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
11901
11902         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
11903         * jcf-write.c: Likewise.
11904         * parse.y: Likewise.
11905         * parse.c: Regenerate.
11906
11907 2000-01-09  Anthony Green  <green@cygnus.com>
11908
11909         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
11910         bytecodes in the correct order.
11911
11912 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11913
11914         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
11915
11916 2000-01-06  Anthony Green  <green@cygnus.com>
11917
11918         * expr.c (java_lang_expand_expr): Switch to permanent obstack
11919         before building constant array decl.
11920
11921 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11922
11923         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
11924         method invocation and typo in conditional expression.
11925         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
11926         the appropriate NOTE_POP.
11927         * parse.y (patch_binop): Shift value mask to feature the right
11928         type.
11929
11930 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11931
11932         * class.c (assume_compiled, assume_compiled_node): Add static
11933         prototype.
11934         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
11935
11936         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
11937
11938         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
11939
11940         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
11941         to `__modifier' to avoid stringifying it.
11942
11943         * parse.y (verify_constructor_circularity): Don't call a variadic
11944         function with a non-literal format string.
11945         (java_check_abstract_methods): Move unreachable code inside
11946         `continue' statement.
11947         (lookup_method_invoke): Call xstrdup, not strdup.
11948
11949         * expr.c (expand_java_field_op): Avoid the use of ANSI string
11950         concatenation.
11951
11952         * jcf-parse.c (yyparse): Likewise.
11953
11954         * jv-scan.c (main): Likewise.
11955
11956 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11957
11958         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
11959         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11960         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
11961         concatenation.
11962
11963         * parse.y (synchronized, variable_redefinition_error,
11964         check_class_interface_creation, create_interface, create_class,
11965         method_header, finish_method_declaration,
11966         check_modifiers_consistency, method_declarator,
11967         complete_class_report_errors, check_abstract_method_definitions,
11968         java_check_regular_methods, check_throws_clauses,
11969         java_check_abstract_methods, read_import_dir,
11970         check_pkg_class_access, declare_local_variables, fix_constructors,
11971         cut_identifier_in_qualified, resolve_expression_name,
11972         resolve_qualified_expression_name, patch_method_invocation,
11973         java_complete_lhs, patch_assignment, try_builtin_assignconv,
11974         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
11975         patch_exit_expr, patch_exit_expr, patch_switch_statement,
11976         patch_try_statement, patch_synchronized_statement,
11977         patch_throw_statement, check_thrown_exceptions,
11978         patch_conditional_expr): Likewise.
11979
11980 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11981
11982         * Makefile.in (LIBDEPS): Added gcc's errors.o
11983         (../jcf-dump$(exeext):): Link with gcc's errors.o
11984         (../gcjh$(exeext):): Likewise.
11985         * expr.c (expand_java_NEW): Layout the entire target type instead of
11986         laying out its methods only.
11987         (lookup_field): Layout the class after having loaded it.
11988         * java-tree.h (java_debug_context): Declared.
11989         * jcf-io.c (toplev.h): Included.
11990         (find_class): Removed assignment to jcf's outofsynch
11991         field. Force source file to be read if newer than its matching
11992         class file. Tweaked debug messages.
11993         * jcf-parse.c (jcf_out_of_synch): Deleted.
11994         (read_class): Call to jcf_out_of_synch removed.
11995         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
11996         (jcf_out_of_synch): Prototype deleted.
11997         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
11998         `deprecated' and `class_err': integer turned into bit-fields.
11999         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
12000         * parse.y (package_list): New global.
12001         (package_declaration:): Record newly parsed package name.
12002         (extra_ctxp_pushed_p): Static global deleted.
12003         (java_parser_context_save_global): Create buffer context for the
12004         purpose of saving globals, if necessary.
12005         (java_parser_context_restore_global): Pop context pushed for the
12006         purpose of saving globals, if necessary.
12007         (java_debug_context_do): New prototype and function.
12008         (java_debug_context): Likewise.
12009         (do_resolve_class): Use already parsed package names to qualify
12010         and lookup class candidate.
12011         (java_pre_expand_clinit): Removed unnecessary local variable.
12012
12013 1999-12-17  Tom Tromey  <tromey@cygnus.com>
12014
12015         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
12016         fixes PR gcj/119.
12017         (process_file): Use `\n\' at end of each line in string.
12018
12019 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12020
12021         * expr.c (expand_invoke): Layout the loaded class before
12022         attempting to use it.
12023         (expand_java_field_op): Allow final field assignments to take
12024         place in $finit$.
12025         * typeck.c (convert): Return error_mark_node if expr is null.
12026
12027 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12028
12029         * class.c (class_depth): Return -1 if the class doesn't load
12030         properly.
12031         * expr.c (can_widen_reference_to): Check for errors during depth
12032         computation and return 0 accordingly.
12033         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
12034         create default constructors and add an other error check.
12035         * parse.h (java_fix_constructors): Prototyped.
12036         * parse.y (java_pre_expand_clinit): Likewise.
12037         (build_super_invocation): Re-prototyped to feature one argument.
12038         (java_check_circular_reference): Directly use `current'.
12039         (java_fix_constructors): New function.
12040         (java_check_regular_methods): Don't create default constructors
12041         here, but abort if none were found.
12042         (java_complete_expand_methods): Pre-process <clinit> calling
12043         java_pre_expand_clinit.
12044         (java_pre_expand_clinit): New function.
12045         (fix_constructors): build_super_invocation invoked with the
12046         current method declaration as an argument.
12047         (build_super_invocation): Use the context of the processed method
12048         decl argument instead of current_class.
12049         * typeck.c (lookup_java_method): Take WFLs in method names into
12050         account.
12051
12052 1999-12-14  Per Bothner  <per@bothner.com>
12053
12054         * class.c (make_class_data): flag_keep_inline_functions to keep
12055         private methods in the method array.
12056
12057 1999-12-15  Anthony Green  <green@cygnus.com>
12058
12059         * check-init.c (check_init): Take into account both types of
12060         `throw's when checking for uninitialized variables.
12061
12062 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12063
12064         * parse.y (java_complete_lhs): Force conversion of array
12065         dimensions to int_type_node, that's what runtime's ABI expects.
12066
12067 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12068
12069         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
12070         operand of a WFL, until the Java front-end gets fixed with regard
12071         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
12072
12073 1999-12-10  Andrew Haley  <aph@cygnus.com>
12074
12075         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
12076         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
12077         expr.c (build_java_athrow): Add support for sjlj-exceptions.
12078         java-tree.h: Ditto.
12079         jcf-write.c: Ditto.
12080
12081 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12082
12083         * expr.c (java_lang_expand_expr): Switch to permanent obstack
12084         before calling expand_eh_region_start and expand_start_all_catch.
12085         * except.c (expand_start_java_handler): Switch to permanent
12086         obstack before calling expand_eh_region_start.
12087         (expand_end_java_handler): Switch to permanent obstack before
12088         calling expand_start_all_catch.
12089
12090 1999-12-5  Anthony Green  <green@cygnus.com>
12091
12092         * decl.c (init_decl_processing): Mark throw_node as a noreturn
12093         function with side effects.
12094         (init_decl_processing): Mark all memory allocating DECLs with
12095         DECL_IS_MALLOC.
12096
12097 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12098
12099         * except.c (expand_end_java_handler): Call
12100         expand_resume_after_catch and end_catch_handler.
12101
12102 1999-11-30  Anthony Green  <green@cygnus.com>
12103
12104         * verify.c (verify_jvm_instructions): Create new return label
12105         chain if non existent (don't rely on the verified state of the jsr
12106         target.)
12107
12108 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12109
12110         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
12111         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
12112
12113         * parse.y (patch_assignment): Removed bogus final class test on
12114         lhs when checking on whether to emit an ArrayStoreException runtime
12115         check.
12116         * expr.c (expand_java_arraystore): Likewise.
12117
12118 1999-11-28 Anthony Green <green@cygnus.com>
12119
12120         * decl.c (find_local_variable): Reuse single slot decls when
12121           appropriate.
12122
12123 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12124
12125         * jcf-parse.c (saw_java_source): Global variable removed.
12126         (read_class): Don't use `saw_java_source'. Added extra braces.
12127         (yyparse): Code setting `saw_java_source' removed.
12128
12129 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
12130
12131         * except.c (emit_handlers): Zero catch_clauses after emitting them.
12132
12133 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12134
12135         * verify.c (merge_type_state): Non verified subroutines being
12136         considered more than once to trigger passive type merge.
12137
12138 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12139
12140         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
12141         in case of error. Error message tuned.
12142
12143 1999-11-21  Anthony Green  <green@cygnus.com>
12144
12145         * constants.c (find_methodref_index): Unwrap method names before
12146         inserting them in the constant pool.
12147
12148         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
12149
12150         * class.c (assume_compiled_node): New typedef.
12151         (assume_compiled_tree): New static data.
12152         (find_assume_compiled_node): New function.
12153         (add_assume_compiled): New function.
12154         (assume_compiled): New function.
12155         * class.c (make_class_data): Use assume_compiled.
12156         (is_compiled_class): Use assume_compiled.
12157
12158         * java-tree.h (add_assume_compiled): Declare.
12159
12160         * lang.c (lang_decode_option): Parse new options.
12161
12162 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12163
12164         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
12165         int_type_node: that's what `_Jv_AllocObject' expects.
12166
12167 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12168
12169         * parse.y (lookup_method_invoke): Use lang_printable_name to
12170         reliably build the type name during error report. Fixes PR gcj/97.
12171
12172 1999-11-09  Tom Tromey  <tromey@cygnus.com>
12173
12174         * jcf-path.c: Include <sys/stat.h>.
12175         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
12176         (DIR_UP): New macro.
12177
12178 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12179
12180         * parse.y (source_end_java_method): Resume permanent allocation,
12181         reversing Apr 27 1998 patch.
12182         (patch_string_cst): Pop obstacks after having pushed the permanent
12183         ones.
12184
12185 1999-11-05  Tom Tromey  <tromey@cygnus.com>
12186
12187         * class.c (finish_class): Emit inlined methods if any native
12188         methods exist in the class.  Fixes PR gcj/85.
12189
12190 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12191
12192         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
12193         (qualify_ambiguous_name): Likewise.
12194
12195 1999-11-03  Godmar Back <gback@cs.utah.edu>
12196
12197         * typeck.c: (lookup_java_method):  search all inherited
12198         interfaces when looking up interface method.
12199
12200 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12201
12202         * parse.y (method_header:): Issue error message for rule `type
12203         error'.
12204         (synchronized:): Error report when not using synchronized.
12205
12206 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12207
12208         * parse.y (resolve_qualified_expression_name): Prevent `this' from
12209         being used before the superclass constructor has been called.
12210         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
12211         instead of `CALL_THIS_CONSTRUCTOR_P'.
12212
12213 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
12214
12215         * check-init.c: Fix typo in comment.
12216
12217 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12218
12219         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
12220         and final method.
12221
12222 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12223
12224         * parse.y (expression_statement:): Call function to report
12225         improper invocation of a constructor.
12226         (parse_ctor_invocation_error): New function.
12227
12228 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
12229
12230         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
12231         remember_end_note.
12232
12233 1999-10-21  Tom Tromey  <tromey@cygnus.com>
12234
12235         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
12236         in generated `main'.
12237
12238 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12239
12240         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
12241         (qualify_ambiguous_name): Likewise.
12242
12243 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12244
12245         * parse.y (java_complete_tree): fold_constant_for_init to work on
12246         permanent_obstack.
12247         (java_complete_lhs): Likewise.
12248         (array_constructor_check_entry): Complete an initializer element
12249         on permanent_obstack.
12250
12251 1999-10-19  Tom Tromey  <tromey@cygnus.com>
12252
12253         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
12254         From Mike Moreton <mike@pillim.demon.co.uk>.
12255
12256 1999-10-15  Greg McGary  <gkm@gnu.org>
12257
12258         * java-tree.h (flag_bounds_check): Remove extern decl.
12259         * lang.c (flag_bounds_check): Remove global variable.
12260         (lang_f_options): Remove "bounds-check" entry.
12261         (lang_init_options): Default flag_bounds_check to "on".
12262
12263 1999-10-14  Tom Tromey  <tromey@cygnus.com>
12264
12265         * jvgenmain.c (usage): New function.
12266         (main): Use it.  Also, handle `-D' options.
12267         * jvspec.c (lang_specific_driver): Recognize -D.
12268         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
12269
12270         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
12271
12272 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12273
12274         * jcf-dump.c (print_constant, disassemble_method): Don't call a
12275         variadic function with a non-literal format string.
12276
12277         * parse-scan.y (report_main_declaration): Likewise.
12278
12279         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
12280
12281         * parse.y (read_import_dir, patch_assignment, patch_binop,
12282         patch_array_ref): Likewise.
12283
12284         * typeck.c (build_java_array_type): Likewise.
12285
12286         * verify.c (verify_jvm_instructions): Likewise.
12287
12288 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12289
12290         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
12291
12292 1999-10-07  Anthony Green  <green@cygnus.com>
12293
12294         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
12295         where CHECK_PUT may fail for valid reasons.
12296
12297         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
12298         UNSAFE_PUTN): New macros.
12299
12300 1999-10-04  Tom Tromey  <tromey@cygnus.com>
12301
12302         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
12303         well.  Fixes Java PR gcj/59.
12304         * parse-scan.y (yyerror): Report errors.
12305
12306 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
12307
12308         * decl.c (insert_block): Remove unconditional `abort'.
12309
12310 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
12311
12312         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
12313         FUNCTION_CODE now of type int.  All callers changed.
12314         Set the builtin's DECL_BUILT_IN_CLASS.
12315
12316 1999-09-23  Tom Tromey  <tromey@cygnus.com>
12317
12318         * jvspec.c (lang_specific_driver): Don't read spec file if
12319         -fsyntax-only given.
12320
12321 1999-09-22  Tom Tromey  <tromey@cygnus.com>
12322
12323         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
12324
12325         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
12326         (WORDS_TO_LONG): Likewise.
12327         (WORDS_TO_DOUBLE): Likewise.
12328
12329 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12330
12331         * jcf-write.c (RELOCATION_VALUE_0): New macro.
12332         (RELOCATION_VALUE_1): Likewise.
12333         (emit_iinc, emit_reloc, push_constant1, push_constant2,
12334         push_in_const, push_long_const): Prototyped.
12335         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
12336         (push_constant2): Likewise.
12337         (push_int_const): Cast find_constant1's integer arguments to `jword'.
12338         (find_constant_wide): Cast find_constant2's integer arguments to
12339         `jword'.
12340         (find_constant_index): Cast find_constant2's and find_constant2's
12341         integer arguments to `jword'.
12342         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
12343         (emit_switch_reloc): Use RELOCATION_VALUE_0.
12344         (emit_if): Use RELOCATION_VALUE_1.
12345         (emit_goto): Likewise.
12346         (emit_jsr): Likewise.
12347         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
12348         argument to push_long_const to HOST_WIDE_INT.
12349
12350 1999-09-15  Andreas Schwab  <schwab@suse.de>
12351
12352         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
12353
12354 1999-09-20  Nick Clifton  <nickc@cygnus.com>
12355
12356         * lang.c (lang_decode_option): Extend comment.
12357
12358 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12359
12360         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
12361         instead of fndecl.
12362
12363 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12364
12365         * gjavah.c (get_field_name, print_method_info, print_include,
12366         add_namelet): Use xmalloc, not malloc.
12367
12368         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
12369         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
12370         NULL pointer.
12371
12372         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
12373
12374         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
12375
12376         * jcf-path.c (add_entry): Likewise.
12377
12378         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
12379
12380         * jv-scan.c (xmalloc): Remove definition.
12381
12382         * jvgenmain.c (xmalloc): Likewise.
12383
12384         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
12385
12386         * lex.c (java_store_unicode): Use xrealloc, not realloc.
12387
12388         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
12389         concat, not xmalloc/sprintf.
12390         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
12391         (xstrdup): Remove definition.
12392
12393         * parse.y (duplicate_declaration_error_p,
12394         constructor_circularity_msg, verify_constructor_circularity,
12395         check_abstract_method_definitions, java_check_regular_methods,
12396         java_check_abstract_methods, patch_method_invocation,
12397         check_for_static_method_reference, patch_assignment, patch_binop,
12398         patch_cast, array_constructor_check_entry, patch_return,
12399         patch_conditional_expr): Use xstrdup, not strdup.
12400
12401         * zextract.c (ALLOC): Use xmalloc, not malloc.
12402
12403 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12404
12405         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
12406
12407         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
12408         (do_spec, lang_specific_pre_link, lang_specific_driver,
12409         input_filename, input_filename_length): Don't declare.
12410         (main_class_name, jvgenmain_spec, lang_specific_driver):
12411         Constify a char*.
12412         (lang_specific_driver): All calls to the function pointer
12413         parameter now explicitly call `fatal'.
12414
12415 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12416
12417         * parse.y (find_applicable_accessible_methods_list): Search
12418         abstract classes as interfaces.
12419
12420 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12421
12422         * class.c (finish_class): We're now outside a valid method
12423         declaration. Tell the rest of gcc so.
12424
12425 1999-09-08  Bruce Korb  autogen@linuxbox.com
12426
12427         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
12428
12429 1999-09-07  Tom Tromey  <tromey@cygnus.com>
12430
12431         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
12432         java-array.h.
12433         (decode_signature_piece): Don't emit "::" in JArray<>.
12434         (print_namelet): Only print trailing `;' when printing a class.
12435
12436 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
12437
12438         * java-tree.h: Delete declarations for all tree nodes now moved to
12439         global_trees.
12440         * decl.c: Delete their definitions.
12441
12442 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
12443
12444         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
12445         * Makefile.in (OBJS): Add ggc-callbacks.o.
12446         (OBJDEPS): Likewise.
12447
12448 1999-09-03  Tom Tromey  <tromey@cygnus.com>
12449
12450         * parse.y (strip_out_static_field_access_decl): Return operand if
12451         it satisfies JDECL_P.
12452
12453 1999-09-02  Tom Tromey  <tromey@cygnus.com>
12454
12455         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
12456         Handle nested arrays, like `[[I'.
12457
12458 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12459
12460         * class.c (finish_class): Remove unused parameter, all callers
12461         changed.
12462
12463         * expr.c (build_java_athrow): Change return type to void.
12464         (java_lang_expand_expr): Make sure each case in switch returns a
12465         value.
12466
12467         * java-tree.h (finish_class): Fix prototype to take void args.
12468
12469         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
12470         (main): Issue return from main, not exit.
12471
12472         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
12473
12474         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
12475
12476         * jv-scan.c (main): Issue return from main, not exit.
12477
12478         * parse.y (check_abstract_method_definitions,
12479         java_check_abstract_method_definitions): Add static prototypes.
12480         (java_complete_expand_methods): Fix call to `finish_class'.
12481
12482         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
12483         and `prevpc'.
12484
12485 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12486
12487         * lang.c (language_string): Constify.
12488
12489 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12490
12491         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
12492         Remove hacks for stuff which comes from libiberty.
12493
12494         * Make-lang.in: Likewise.
12495
12496 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
12497
12498         * Makefile.in (xref.o): Depend on xref.c explicitly.
12499
12500 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12501
12502         * java-tree.h (lang_printable_name): Constify a char*.
12503
12504         * lang.c (lang_printable_name): Likewise.
12505
12506 1999-08-27  Jeffrey A Law  (law@cygnus.com)
12507
12508         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
12509         comments in C code.
12510
12511 1999-08-26  Tom Tromey  <tromey@cygnus.com>
12512
12513         * gjavah.c (print_cxx_classname): Print "::" before qualified
12514         name.
12515
12516 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12517
12518         * parse.y (lookup_cl): Changed leading comment. Now does its best
12519         to set the column number.
12520         (qualify_ambiguous_name): Take WFL wrappers into account.
12521
12522 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
12523
12524         * verify.c (verify_jvm_instructions): Don't check instruction
12525         validity beyond end of method.
12526
12527 1999-08-25  Tom Tromey  <tromey@cygnus.com>
12528
12529         * jvspec.c (lang_specific_driver): Correctly handle --help again.
12530
12531 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12532
12533         * gjavah.c (print_name, print_base_classname, utf8_cmp,
12534         cxx_keyword_subst, generate_access, name_is_method_p,
12535         get_field_name, print_field_name, super_class_name, print_include,
12536         decode_signature_piece, print_class_decls, usage, help,
12537         java_no_argument, version, add_namelet, print_namelet): Add static
12538         prototype.
12539         (print_base_classname, utf8_cmp, cxx_keyword_subst,
12540         name_is_method_p): Constify a char*.
12541         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
12542         Provide a final else clause in an if-else-if.
12543         (print_field_info): Add missing final arg in function call to
12544         `print_field_name'.
12545         (print_method_info, decompile_method, decode_signature_piece,
12546         print_c_decl, print_full_cxx_name, print_stub,
12547         print_mangled_classname, super_class_name, print_include,
12548         add_namelet, add_class_decl, print_class_decls, process_file,
12549         help): Constify a char*.
12550
12551         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
12552         push_int_const, find_constant_wide, find_constant_index,
12553         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
12554         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
12555         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
12556         emit_if, emit_goto, emit_jsr, call_cleanups,
12557         make_class_file_name): Add static prototypes.
12558         (generate_bytecode_return, generate_bytecode_insns): Pass a
12559         NULL_PTR, not a NULL_TREE.
12560
12561         * jv-scan.c: Include "jcf.h".
12562         (main): Declare using DEFUN macro.
12563
12564         * jvspec.c (find_spec_file, lang_specific_pre_link,
12565         lang_specific_driver): Add prototypes.
12566         (find_spec_file): Constify a char*.
12567
12568         * keyword.gperf (hash, java_keyword): Add prototypes.
12569
12570         * lang.c (lang_print_error): Add static prototype.
12571         (lang_init): Prefer memcpy over bcopy to avoid casts.
12572
12573         * lex.c (yylex): Add static prototype.
12574
12575         * parse-scan.y: Include "lex.c" earlier.
12576
12577         * parse.h: Remove redundant declaration for `yylex'.
12578
12579         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
12580         labeled_block_contains_loop_p): Add static prototypes.
12581         (not_accessible_p): Make static to match prototype.
12582
12583         * verify.c (start_pc_cmp): Don't needlessly cast away const.
12584
12585 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12586
12587         * parse.y (check_method_redefinition): Changed leading comment.
12588         (check_abstract_method_definitions): New function.
12589         (java_check_abstract_method_definitions): New function.
12590         (java_check_regular_methods): Call it.
12591         (verify_constructor_super): Fixed indentation.
12592         (lookup_method_invoke): Likewise.
12593
12594 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12595
12596         * parse.y (method_header): Return a null pointer if the current
12597         class node is null.
12598         (finish_method_declaration): Return if the current function decl
12599         is null.
12600         (source_start_java_method): Likewise.
12601         (java_method_add_stmt): Likewise.
12602
12603 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12604
12605         * class.c (emit_register_class): Removed unnecessary call to
12606         start_sequence.
12607         * parse.y (labeled_block_contains_loop_p): Removed unused local
12608         variable.
12609
12610 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12611
12612         * parse.y (java_refold): Added prototype.
12613
12614 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12615
12616         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
12617         (java_stabilize_reference): Removed unnecessary `else'.
12618         (java_complete_lhs): Set flag to remember boolean. Call
12619         java_refold. Added comments.
12620         (java_decl_equiv): New function.
12621         (binop_compound_p): Likewise.
12622         (java_refold): Likewise.
12623         (patch_unaryop): Striped static field access assigned to decl and
12624         op. Changed promotion scheme for ++/-- operators.
12625         (search_loop): New function.
12626         (labeled_block_contains_loop_p): Likewise.
12627         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
12628         comment.
12629         (patch_bc_statement): Call search_loop. Fixed comment.
12630
12631 1999-08-14  Anthony Green  <green@cygnus.com>
12632
12633         * expr.c (java_lang_expand_expr): Mark static array data as
12634         referenced.
12635
12636 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
12637
12638         * jvgenmain.c (main): NUL-terminate name_obstack.
12639
12640 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12641
12642         * check-init.c (check_bool2_init, done_alternative): Add static
12643         prototypes.
12644
12645         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
12646         (add_method, build_utf8_ref, build_class_ref,
12647         append_gpp_mangled_type, layout_class_method): Constify a char*.
12648
12649         * decl.c (push_promoted_type, make_binding_level): Add static
12650         prototypes.
12651         (push_promoted_type, pushdecl): Constify a char*.
12652
12653         * except.c (find_handler_in_range, link_handler,
12654         check_start_handlers): Add static prototypes.
12655
12656         * expr.c (process_jvm_instruction): Constify a char*.
12657
12658         * gjavah.c (main): Constify a char*.
12659
12660         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
12661         Constify a char*.
12662
12663         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
12664         static prototypes.
12665         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
12666         munge, print_ents): Constify a char*.
12667
12668         * jcf-dump.c (disassemble_method): Constify a char*.
12669         (print_constant_pool, print_exception_table): Add static prototypes.
12670         (print_constant, print_exception_table, main, disassemble_method):
12671         Constify a char*.
12672
12673         * jcf-io.c (find_classfile, find_class): Likewise.
12674
12675         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
12676         (set_source_filename, predefined_filename_p): Add static prototypes.
12677         (set_source_filename, get_constant, get_class_constant,
12678         find_in_current_zip): Constify a char*.
12679
12680         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
12681         static prototypes.
12682         (add_entry, add_path, jcf_path_classpath_arg,
12683         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12684
12685         * jcf-reader.c (get_attribute, jcf_parse_preamble,
12686         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
12687         jcf_parse_one_method, jcf_parse_methods,
12688         jcf_parse_final_attributes): Add static prototypes.
12689         (get_attribute): Constify a char*.
12690
12691         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
12692         jcf_dependency_add_target, jcf_path_classpath_arg,
12693         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12694
12695         * jv-scan.c (main): Constify a char*.
12696         (gcc_obstack_init): Add prototype arguments.
12697
12698         * jvgenmain.c (gcc_obstack_init): Likewise.
12699         (main): Constify a char*.
12700
12701         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
12702         static prototypes.
12703         (put_decl_string, lang_print_error): Constify a char*.
12704         (lang_init): Remove redundant extern prototype.
12705
12706         * mangle.c (emit_unicode_mangled_name): Constify a char*.
12707
12708         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
12709         Add static prototypes.
12710         (get_type_from_signature): Constify a char*.
12711
12712         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
12713         Add static prototypes.
12714         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
12715         (verify_jvm_instructions): Constify a char*.
12716
12717         * xref.c (xref_flag_value): Likewise.
12718
12719         * xref.h (xref_flag_value): Likewise.
12720
12721         * zextract.c (makeword, makelong): Add static prototypes.
12722         (makeword, makelong): Constify a uch*.
12723
12724 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12725
12726         * lang.c (java_dummy_print): Constify a char*.
12727         (lang_print_error): Likewise.
12728         (lang_init): Remove redundant prototype for `print_error_function'.
12729         (lang_init_source): Likewise.
12730         (lang_identify): Constify a char*.
12731
12732 1999-08-09  Tom Tromey  <tromey@cygnus.com>
12733
12734         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
12735         (WORDS_TO_LONG): Likewise.
12736         (WORDS_TO_DOUBLE): Likewise.
12737
12738 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12739
12740         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
12741
12742         * expr.c (java_stack_pop, java_array_data_offset,
12743         build_java_throw_out_of_bounds_exception, case_identity,
12744         build_java_check_indexed_type): Add static prototypes.
12745         (linenumber_table, expand_invoke, expand_java_field_op,
12746         build_primtype_type_ref, expand_byte_code): Constify a char*.
12747
12748         * java-tree.h (build_primtype_type_ref, linenumber_table):
12749         Constify a char*.
12750         (java_lang_expand_expr): Add prototype.
12751
12752         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
12753         `java_lang_expand_expr'.
12754
12755         * lex.c (java_lex_error): Constify a char*.
12756         (java_get_unicode, java_read_char, java_allocate_new_line,
12757         java_unget_unicode, java_sneak_unicode): Prototype.
12758
12759         * parse-scan.y (current_class, package_name, method_declarator,
12760         report_class_declaration, yyerror): Constify a char*.
12761
12762         * parse.h (java_report_errors): Prototype.
12763         (yyerror): Constify a char*.
12764
12765         * parse.y (classitf_redefinition_error, check_modifiers,
12766         parse_jdk1_1_error, lookup_package_type,
12767         lookup_package_type_and_set_next, get_printable_method_name,
12768         purify_type_name): Constify a char*.
12769         (build_super_invocation, maybe_generate_finit,
12770         verify_constructor_super, parser_add_interface,
12771         add_superinterfaces, jdep_resolve_class, note_possible_classname,
12772         java_complete_expand_methods, java_expand_finals,
12773         cut_identifier_in_qualified, java_stabilize_reference,
12774         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
12775         merge_string_cste): Prototype.
12776         (single_type_import_declaration, yyerror,
12777         variable_redefinition_error, build_array_from_name,
12778         build_unresolved_array_type, check_class_interface_creation,
12779         resolve_class, complete_class_report_errors,
12780         note_possible_classname, read_import_dir,
12781         find_in_imports_on_demand, resolve_package, fix_constructors,
12782         check_deprecation, lookup_method_invoke,
12783         maybe_build_primttype_type_ref, array_constructor_check_entry):
12784         Constify a char*.
12785         (java_complete_expand_methods, java_expand_finals): Make static.
12786         (convert_narrow): Remove static prototype.
12787
12788 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
12789
12790         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
12791
12792 1999-08-02  Richard Henderson  <rth@cygnus.com>
12793
12794         * decl.c: Include defaults.h instead of expr.h.
12795         * parse.y: Likewise.
12796
12797 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
12798
12799         * java/decl.c (start_java_method): Change all uses of
12800         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
12801         Ensure expr.h is included.
12802         * java/expr.c (pop_arguments): Ditto.
12803         * java/parse.y (expand_start_java_method): Ditto.
12804
12805 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12806
12807         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
12808
12809 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
12810
12811         * decl.c: Include "function.h".
12812         * except.c: Likewise.
12813         * parse.y: Likewise.
12814         * Makefile.in: Update dependencies.
12815
12816 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12817
12818         * expr.c (build_java_soft_divmod): Provide a default case in switch.
12819         (java_lang_expand_expr): Mark parameters `target', `tmode' and
12820         `modifier' with ATTRIBUTE_UNUSED.
12821
12822         * gjavah.c (process_file): Add braces around ambiguous `else'.
12823
12824         * jcf-dump.c (print_access_flags, localvar_free): Change return
12825         type to void.
12826
12827         * parse.y (java_complete_expand_method): Initialize variable
12828         `exception_copy'.
12829         (resolve_qualified_expression_name): Likewise for `field_decl'.
12830         (patch_method_invocation): Likewise for `class_to_search'.
12831         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
12832         (patch_assignment): Likewise for `lhs_type'.
12833
12834         * verify.c (verify_jvm_instructions): Remove unused variable
12835         `caller'.
12836
12837 1999-07-25  Richard Henderson  <rth@cygnus.com>
12838
12839         * decl.c (va_list_type_node): New.
12840
12841 1999-07-25  Anthony Green  <green@cygnus.com>
12842
12843         * gjavah.c (print_stub): New function.
12844         (METHOD_IS_NATIVE): New macro.
12845         (print_mangled_classname): Make static.
12846         (HANDLE_END_FIELD): Don't emit fields during stub generation.
12847         (process_file): Perform stub generation.
12848         (HANDLE_METHOD): Don't emit class decls during stub
12849         generation.
12850         (HANDLE_END_METHOD): Take into account stub generation.
12851         (print_method_info): Handle stub generation.
12852         (print_stub): New function.
12853         (print_cxx_classname): Make signature consistant with others.
12854         (help): Describe -stubs option.
12855         (main): Create stub file.
12856         (version): Use version.c.
12857         (print_full_cxx_name): New function.
12858         (print_c_decl): Use print_full_cxx_name.
12859
12860 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12861
12862         * check-init.c (check_init): Handle MAX_EXPR.
12863
12864 1999-07-15  Andrew Haley  <aph@cygnus.com>
12865
12866         * lang.c (flag_use_divide_subroutine): New variable.
12867         * typeck.c: (convert_ieee_real_to_integer): Bounds check
12868         fp-to-integer conversion.
12869         (convert): Call convert_ieee_real_to_integer when flag_fast_math
12870         is not set.
12871
12872         * expr.c (build_java_soft_divmod): New function.
12873         (build_java_binop): Call build_java_soft_divmod if
12874         flag_use_divide_subroutine is set.
12875         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12876         soft_lrem_node: new builtin functions.
12877         (init_decl_processing) Initialize the new builtins.
12878         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12879         soft_lrem_node: new builtin functions.
12880         (build_java_soft_divmod): New function.
12881         * parse.y: Call build_java_soft_divmod if
12882         flag_use_divide_subroutine is set.
12883         * parse.c: Rebuilt.
12884
12885         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
12886         a --specs= arg) even if not linking.
12887         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
12888         -fuse-divide-subroutine
12889
12890 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12891
12892         * parse.y (resolve_and_layout): Check methods only once.
12893         (resolve_qualified_expression_name): Verify thrown exceptions
12894         compatibility.
12895         (check_thrown_exceptions): Reject exceptions thrown in
12896         initializer. Error message tuned.
12897
12898 1999-07-14  Andrew Haley  <aph@cygnus.com>
12899
12900         * expr.c (expand_expr): Do not return the last statement in a
12901         block as the block's value.
12902
12903 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12904
12905         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
12906         CALL_EXPR, to avoid order of evaluation changes.
12907
12908 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12909
12910         * parse.y (qualify_ambiguous_name): Do not use
12911         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
12912
12913 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12914
12915         * check-init.c (check_init): Handle MAX_EXPR.
12916         * expr.c (force_evaluation_order): Force method call arguments to
12917         be evaluated in left-to-right order.
12918         * parse.y (qualify_ambiguous_name): Loop again to qualify
12919         NEW_ARRAY_EXPR properly.
12920
12921 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12922
12923         * parse.y (patch_invoke): Resolve unresolved invoked method
12924         returned type.
12925         (qualify_ambiguous_name): STRING_CST to qualify expression for
12926         type name resolution.
12927
12928 1999-06-24  Andrew Haley  <aph@cygnus.com>
12929
12930         * class.c (finish_class): Whenever a deferred method is
12931         output, rescan the list of methods to see if a new candidate for
12932         output can be found.
12933
12934 1999-06-28  Tom Tromey  <tromey@cygnus.com>
12935
12936         * jvspec.c (lang_specific_driver): Recognize --help.
12937
12938 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12939
12940         * parse.y (resolve_package): Fixed bogus return statement.
12941         (patch_method_invocation): Resolve method invocation beginning with
12942         a package name qualifier.
12943
12944 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12945
12946         * Make-lang.in (java.stage1): Depend on stage1-start.
12947         (java.stage2): Likewise for stage2-start.
12948         (java.stage3): Likewise for stage3-start.
12949         (java.stage4): Likewise for stage4-start.
12950
12951 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12952
12953         * parse.y (java_complete_lhs): When doing cross referencing, don't
12954         try to keep file location on a WFL expanded as a CALL_EXPR.
12955
12956 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12957
12958         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
12959         compiling to class file a void method with an empty method body.
12960         As a side effect, the bytecode backend will generate the
12961         appropriate `return' instruction.
12962
12963 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12964
12965         * parse.y (lookup_package_type_and_set_next): New function prototype.
12966         (resolve_package): Search current and imported packages.
12967         (lookup_package_type_and_set_next): New function.
12968
12969 1999-06-22  Andrew Haley  <aph@cygnus.com>
12970
12971         * verify.c (verify_jvm_instructions): Check for pending blocks
12972         before invalid PC test and opcode switch, not after.
12973
12974 1999-06-21  Andrew Haley  <aph@cygnus.com>
12975
12976         * except.c (find_handler_in_range): The upper limit for exception
12977         ranges is exclusive, not inclusive: (start <= pc < end).
12978         (link_handler): find child pointer which points to outer by
12979         searching sibling list: previous code incorrectly assumed that
12980         outer->outer->first_child must point to outer.
12981         * verify.c (verify_jvm_instructions): FIXME added to code for
12982         `athrow'.
12983         (verify_jvm_instructions): Do not assume that the last block
12984         processed in a subroutine is a block which ends with a `ret'
12985         instruction.  With some control flows it is possible that the last
12986         block ends with an `athrow'.
12987
12988 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12989
12990         * parse.y (qualify_ambiguous_name): Reorganized the post
12991         evaluation of non WFL leading expression nodes.
12992
12993 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12994
12995         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
12996         CONVERT_EXPR.
12997
12998 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12999
13000         * parse.y (qualify_ambiguous_name): Handle qualified expression
13001         beginning with a STRING_CST.
13002
13003 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13004
13005         * parse.y (register_fields): Set DECL_INITIAL on both
13006         pre-initialized static and public fields.
13007         (resolve_field_access): Static field access expressions to always
13008         use pointer types.
13009         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
13010         qualification. CONVERT_EXPR to be resolved as an expression name.
13011         (java_complete_lhs): Identify and access qualified final
13012         initialized field in switch statement case expression.
13013         (fold_constant_for_init): Pre-initialized field decl constant to
13014         be folded.
13015
13016 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13017
13018         * parse.y (note_possible_classname): Mark returned node with
13019         QUALIFIED_P only if the original class name contained a '/'.
13020
13021 1999-06-05  Anthony Green  <green@cygnus.com>
13022
13023         * Make-lang.in (gcjh): More parallel build fixes.
13024
13025 1999-06-03  Mike Stump  <mrs@wrs.com>
13026
13027         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
13028
13029 1999-06-02  Anthony Green  <green@cygnus.com>
13030
13031         * except.c (link_handler): Chain exception handlers in order.
13032
13033 1999-06-02  Anthony Green  <green@cygnus.com>
13034
13035         * expr.c (expand_byte_code): Fill unreachable bytecode regions
13036         with nops and process as usual in order to always set correct EH
13037         ranges.  Emit detailed warnings about unreachable bytecodes.
13038
13039 1999-06-02  Anthony Green  <green@cygnus.com>
13040
13041         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
13042         constant.
13043
13044 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13045
13046         * parse.y (lookup_field_wrapper): Unified returned value to NULL
13047           or the searched field decl.
13048
13049 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13050
13051         * parse.y (fold_constant_for_init): Convert numerical constant
13052         values to the type of the assigned field.
13053
13054 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13055
13056         * expr.c (lookup_field): Relaxed the test on class loading error
13057         detection.
13058         * parse.y (fold_constant_for_init): Enabeled old code.
13059
13060 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13061
13062         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
13063         decide the validity of the cast of a java.lang.Cloneable reference
13064         to an array.
13065         (patch_conditional_expr): Fixed first argument passed to
13066         binary_numeric_promotion.
13067
13068 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13069
13070         * parse.y (qualify_ambiguous_name): Take into account that a
13071         CONVERT_EXPR might specify a type as a WFL.
13072
13073 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13074
13075         * parse.y (patch_assignment): Save the rhs before using it as an
13076         argument to _Jv_CheckArrayStore.
13077
13078 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13079
13080         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
13081
13082 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13083
13084         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
13085         floating point literal only when the exponent indicator has been
13086         parsed.
13087
13088 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13089
13090         * parse.y (formal_parameter:): Construct argument tree list
13091         element even if a yet unsupported final parameter was encountered.
13092
13093 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13094
13095         * parse.y (finish_method_declaration): Issue errors for native or
13096         abstract methods declared with a method body, as well as for non
13097         native or non abstract methods with no method body.
13098
13099 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13100
13101         * class.c (build_utf8_ref): Initialize variable `field'.
13102
13103         * decl.c (init_decl_processing): Initialize variable `field'.
13104
13105         * expr.c (build_known_method_ref): Mark parameters `method_type',
13106         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
13107         (process_jvm_instruction): Likewise for parameter `length'.
13108
13109         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
13110         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
13111         ATTRIBUTE_UNUSED.
13112
13113         * parse.y (maybe_generate_clinit): Remove unused variable
13114         `has_non_primitive_fields'.
13115         (find_in_imports_on_demand): Initialize variables `node_to_use'
13116         and `cl'.
13117         (patch_binop): Likewise for variable `prom_type'.
13118         (patch_unaryop): Likewise for variable `prom_type'.
13119
13120         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
13121
13122         * xref.c (xref_table): Add missing initializer.
13123
13124 1999-05-14  Tom Tromey  <tromey@cygnus.com>
13125
13126         * java-except.h (struct eh_range): Removed unused `next' member.
13127         * verify.c (verify_jvm_instructions): Call check_nested_ranges
13128         after adding all exception handlers.  Sort exception ranges in
13129         order of start PC.
13130         (struct pc_index): New structure.
13131         (start_pc_cmp): New function.
13132         * except.c (add_handler): Return `void'.  Don't call link_handler;
13133         instead construct an ordinary linked list and do range
13134         coalescing.
13135         (check_nested_ranges): New function.
13136         (link_handler): Changed interface to allow merging of eh_ranges.
13137         Split overlapping ranges.  Return `void'.
13138
13139 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13140
13141         * parse.y (constructor_block_end:): New rule, tagged <node>.
13142         (constructor_body:): Use `constructor_block_end' instead of
13143         `block_end'.
13144
13145 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13146
13147         * parse.y (statement_nsi:): Pop `for' statement block.
13148         (java_complete_lhs): Labeled blocks containing no statement are
13149         marked as completing normally.
13150
13151 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13152
13153         * xref.c (xref_set_current_fp): New function, defined.
13154         * xref.h (xref_set_current_fp): New function, prototyped.
13155
13156 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13157
13158         * check-init.c (check_init): Take into account that
13159         LABELED_BLOCK_STMT can be empty.
13160
13161 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13162
13163         * parse.y (java_check_regular_methods): Warning check on not
13164         overriding methods with default access in other packages does not
13165         apply to `<clinit>'.
13166         (java_complete_lhs): If block body is an empty_stmt_node, replace
13167         it by NULL_TREE. This prevents gcc from generating an irrelevant
13168         warning.
13169
13170 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13171
13172         * check-init.c (check_init): Removed code accepting to see things
13173         falling through default:, when doing xrefs.
13174         * java-tree.h (do_not_fold): New global variable, declared.
13175         * parse.y (do_not_fold): New global variable, defined.
13176         (java_complete_expand_method): Set `do_not_fold' to the value of
13177         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
13178         and reinstall them after them have been purged; do not check for
13179         initializations; do not issue missing return errors.
13180         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
13181         when doing xrefs.
13182         (patch_binop): Skip the fold part when doing xrefs.
13183         (build_string_concatenation): Skip the concatenation part when
13184         doing xrefs.
13185         (patch_synchronized_statement): Do not generate a try-finally when
13186         doing xrefs.
13187         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
13188         and keep the location where the throw was seen.
13189         * typeck.c (convert): When `do_not_fold' is set, do not attempt
13190         any treatment on the converted node an simply return a NOP_EXPR of
13191         the targeted type.
13192         * xref.c (xref_get_data): New function, defined.
13193         * xref.h (xref_get_data): New function, declared.
13194         (XREF_GET_DATA): Use xref_get_data.
13195
13196 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13197
13198         * gjavah.c (print_include): Cast the result of `strlen' to int
13199         when comparing against a signed value.
13200         (add_namelet): Likewise.
13201
13202 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13203
13204         * expr.c (expand_invoke): Mark parameter `nargs' with
13205         ATTRIBUTE_UNUSED.
13206         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
13207
13208         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
13209         ATTRIBUTE_UNUSED.
13210
13211         * jcf-reader.c (get_attribute): Cast a value to long
13212         when comparing against a signed expression.  Likewise.
13213
13214         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
13215         HOST_BITS_PER_CHAR.
13216
13217 1999-05-11  Andrew Haley  <aph@cygnus.com>
13218
13219         * parse.y (source_end_java_method): If the current method contains
13220         any exception handlers, force asynchronous_exceptions: this is
13221         necessary because signal handlers in libjava may throw exceptions.
13222         * decl.c (end_java_method): Ditto.
13223
13224 1999-05-11  Tom Tromey  <tromey@cygnus.com>
13225
13226         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
13227         flags.
13228         * jvspec.c (THREAD_NAME): Removed.
13229         (GC_NAME): Likewise.
13230         (MATHLIB): Likewise.
13231         (WITHLIBC): Likewise.
13232         (GCLIB): Likewise.
13233         (THREADLIB): Likewise.
13234         (MATH_LIBRARY): Likewise.
13235         (lang_specific_driver): Don't add `-l' options to command line.
13236         Instead, add a single --specs option.  Recognize `-L' options and
13237         use them to search for spec file.
13238         (find_spec_file): New function.
13239         (SPEC_FILE): New define.
13240
13241 1999-05-11  Dave Brolley  <brolley@cygnus.com>
13242
13243         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
13244         cpplib-enabled build.
13245
13246 1999-05-05  Per Bothner  <bothner@cygnus.com>
13247
13248         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
13249         temporarily zero it while calling rest_of_decl_compilation.
13250
13251         * java-tree.h (string_ptr_type_node):  Add declaration.
13252         * decl.c:  Define and initialize string_ptr_type_node.
13253         * parse.y (patch_string_cst):  Use string_ptr_type_node.
13254
13255         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
13256         * parse.y (for_statement):  Now unconditionally exit_block.
13257         (finish_labeled_statement):  No longer exit_block if for-loop.
13258         (patch_loop_statement):  Check harder if the loop is already labeled.
13259
13260         * parse.y (patch_initialized_static_field):  Removed function.
13261         (maybe_generate_clinit):  Removed special handling for interfaces.
13262         (java_complete_expand_methods):  Do a preliminary java_complete_tree
13263         on <clinit> to determine if it can be removed.
13264         (java_complete_expand_method):  Remove special handling for <clinit>.
13265         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
13266         optimize if we get back empty_stmt_node.
13267         For MODIFY_EXPR, re-do checking of static initializers.
13268         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
13269         For VAR_DECL, pass correct context.
13270
13271         * verify.c (verify_jvm_instructions):  Better error messages.
13272
13273 1999-05-03  Tom Tromey  <tromey@cygnus.com>
13274
13275         * parse-scan.y (interface_declaration): Call
13276         report_class_declaration for interfaces.
13277
13278 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
13279
13280         * Makefile.in: Remove -v from bison command lines.
13281
13282 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13283
13284         * check-init.c (check_init): Exclude a case of error when doing
13285         xrefs.
13286         * class.c (layout_class_method): Don't generate the error message
13287         twice when compiling from source.
13288         * lang-options.h: Added `-Wredundant-modifers' and
13289         `-Wunusupported-jdk11' flags and help text.
13290         * lang.c (lang_decode_option): Added support for
13291         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
13292         flag_static_local_jdk11 and flag_redundant set accordingly.
13293         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
13294         * parse.h (EXPR_WFL_ADD_COL): New macro.
13295         (DECL_END_SOURCE_LINE): Likewise.
13296         (DECL_INHERITED_SOURCE_LINE): Likewise.
13297         * parse.y (static_ref_err): New function, prototyped.
13298         (CCB_TK): Now tagged <operator>.
13299         (class_body:): Remember the location of the closing '}' of a class
13300         definition when doing xrefs.
13301         (block:): Likewise.
13302         (block_end:): Likewise.
13303         (create_class): Remember the location of the inherited class
13304         identifier when doing xrefs.
13305         (register_fields): Added test on first operand of `init' before
13306         testing it TREE_CODE.
13307         (method_header): Store the location of the class identifier in the
13308         class decl when doing xrefs.
13309         (finish_method_declaration): Don't combine first/last method line
13310         when doing xref.
13311         (java_check_regular_methods): Warning check on not overriding
13312         methods with default access on other packages move before check on
13313         static methods. Initialization of `aflags' also moved up.
13314         (resolve_expression_name): Call static_ref_err to report the error.
13315         (static_ref_err): New function, implemented.
13316         (resolve_field_access): Returned simplified static field access
13317         when doing xrefs.
13318         (resolve_qualified_expression_name): Check for illegal use of
13319         static fields in a non static context. Call static_ref_err to
13320         report error in various places.
13321         (java_complete_tree): Do not fold initialized static fields when
13322         doing xrefs.
13323         (java_complete_lhs): Likewise.
13324
13325 1999-04-29  Anthony Green  <green@cygnus.com>
13326
13327         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
13328         create internal labels.
13329         (lookup_label): Ditto.
13330
13331 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13332
13333         * class.c (layout_class_method): Generate <clinit>'s rtl for
13334         interfaces.
13335         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13336         for interfaces' <clinit>.
13337         * expr.c (lookup_field): Search for fields in interfaces.
13338         (expand_invoke): Fixed indentation.
13339         (expand_java_field_op): Likewise. Use IS_CLINIT.
13340         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
13341         (IS_CLINIT): New macro.
13342         * parse.y (type_declaration:): Call maybe_generate_clinit after an
13343         interface was parsed.
13344         (maybe_generate_clinit): Don't generate if the current class is an
13345         interface with only fields of primitive types.
13346         (reset_method_name): Use IS_CLINIT.
13347         (java_complete_expand_method): Expand <clinit> when it exists for
13348         interfaces. Use IS_CLINIT.
13349         (resolve_expression_name): Use DECL_CONTEXT instead of
13350         current_class to build static field references.
13351         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
13352         ARRAY_REF when doing xreferencing.
13353         (check_final_assignment): Fixed typo in leading comment. Use
13354         IS_CLINIT.
13355         (patch_array_ref): Don't fully expand array references when
13356         xreferencing.
13357         (patch_return): Use IS_CLINIT.
13358         (patch_throw_statement): Likewise.
13359
13360 1999-04-22  Tom Tromey  <tromey@cygnus.com>
13361
13362         * Make-lang.in (JAVA_SRCS): Added check-init.c.
13363
13364 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13365
13366         * decl.c (predef_filenames, predef_filenames_size): New globals
13367         (init_decl_processing): predef_filenames and predef_filenames_size
13368         initialized.
13369         * java-tree.h (predef_filenames, predef_filenames_size): Declared
13370         extern.
13371         * jcf-parse.c (predefined_filename_p): New function.
13372         (yyparse): Check that files on the command line are specified only
13373         once and issue a warning otherwise.
13374         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
13375         * parse.y (source_end_java_method): Nullify NOP method bodies, to
13376         avoid a gcc warning with -W -Wall turned on.
13377         (java_expand_classes): Abort if errors were encountered.
13378         (java_complete_lhs): If the cross reference flag is set, wrap
13379         field DECL node around a WFL when resolving expression name.
13380
13381 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13382
13383         * lang.c (lang_decode_option): Fixed returned value when parsing
13384         `-fxref=...' and `-Wall'.
13385         * parse.y (source_end_java_method): Do not generate code when
13386         flag_emit_xref is set.
13387         (resolve_expression_name): Do not build static field access when
13388         flag_emit_xref is set.
13389         (resolve_field_access): No special treatment on `length' when
13390         flag_emit_xref is set. Do not build qualified static field access
13391         when flag_emit_xref is set.
13392         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
13393         when flag_emit_xref is set.
13394         (patch_assignment): Do not generate array store runtime check when
13395         flag_emit_xref is set.
13396         * xref.c (xref_flag_value): Fixed function declaration
13397         indentation.
13398         (xset_set_data): New function.
13399         * xref.h (xref_set_data): Added prototype for new function.
13400         (typedef struct xref_flag_table): New field data.
13401         (XREF_GET_DATA): New macro.
13402
13403 1999-04-19  Tom Tromey  <tromey@cygnus.com>
13404
13405         * xref.h (enum): Removed trailing comma.
13406
13407         * parse.y (resolve_qualified_expression_name): Added missing
13408         `break'.
13409
13410 1999-04-15  Anthony Green  <green@cygnus.com>
13411
13412         * gjavah.c: New prototypes for java_float_finite and
13413         java_double_finite.
13414
13415 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13416
13417         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
13418         references.
13419
13420 1999-04-06  Jeffrey A Law  (law@cygnus.com)
13421
13422         * Makefile.in (TREE_H): Add tree-check.h.
13423         (RTL_H): Add genrtl.h.
13424
13425 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13426
13427         * parse.y (patch_assignment): Added ArrayStoreException runtime
13428         check.
13429
13430 1999-04-06  Per Bothner  <bothner@cygnus.com>
13431
13432         * expr.c (pop_type_0):  New function.
13433         (pop_type):  Use pop_type_0.
13434         * java-tree.h (pop_type_0):  New declaration.
13435         * verify.c (verify_jvm_instructions):  Check return instructions.
13436
13437         * parse.y (patch_binop):  Don't fold if non-constant and emiting
13438         class files.
13439
13440 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13441
13442         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
13443
13444         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
13445         (main_jcf): Don't define.
13446         (process_file): Don't set `main_jcf'.
13447
13448         * java-tree.h (main_jcf): Don't declare.
13449
13450         * jcf-parse.c (main_jcf): Add static definition.
13451
13452         * lang.c (main_jcf): Don't define.
13453
13454 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13455
13456         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
13457
13458         * decl.c (copy_lang_decl): Likewise for `bcopy'.
13459
13460         * jcf-depend.c: Include "config.h", not <config.h>.
13461
13462         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
13463         `bcopy' to PTR.
13464
13465         * jcf-path.c: Include "config.h", not <config.h>.
13466
13467         * lex.c: Don't include various system header files.
13468         (java_init_lex): Cast the argument of `bzero' to PTR
13469
13470         * parse-scan.y (java_push_parser_context): Likewise.
13471
13472         * parse.y (java_push_parser_context): Likewise.
13473         (patch_bc_statement): Match format specifier to variable argument.
13474
13475         * xref.c: Don't include <stdio.h>.
13476
13477 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13478
13479         * parse.y (struct parser_ctxt *ctxp): Now global.
13480         (declare_local_variables): Use WFL compound value for the
13481         declaration source line value, when doing cross-referencing.
13482
13483 1999-03-31  Tom Tromey  <tromey@cygnus.com>
13484
13485         * gjavah.c (print_field_info): Allow constants of other types.
13486         (print_include): Generate include when new name is proper prefix
13487         of already printed name.
13488         (add_namelet): Likewise.
13489         (cxx_keyword_subst): New function.
13490         (print_method_info): Use it.
13491         (print_field_name): New function.
13492         (get_field_name): New function.
13493         (print_field_info): Use get_field_name and print_field_name.
13494
13495 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13496
13497         * Makefile.in (keyword.h): Generate using gperf language 'C', not
13498         'KR-C', so gperf uses the `const' keyword on strings.
13499
13500         * keyword.gperf (java_keyword): Const-ify a char*.
13501
13502 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13503
13504         * parse.y (patch_bc_statement): Fixed identation and a bogus
13505         `printf' format.
13506
13507 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13508
13509         * parse.y (patch_assignment): Allow static variables in other
13510         classes to be assigned.
13511
13512 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13513
13514         * class.c (maybe_add_interface): Remove unused variable
13515         `interface_binfo'.
13516         (make_class_data): Use = for assignment, not ==.  Likewise.
13517         (emit_register_classes): Remove unused variable `decl'.
13518
13519         * lex.c: Fix comment so as not to contain an embedded `/*'.
13520
13521         * verify.c (verify_jvm_instructions): Remove unused variable
13522         `self_type'.
13523
13524 1999-03-27  Per Bothner  <bothner@cygnus.com>
13525
13526         * parse.y (complete_loop_body):  Rename to finish_loop_body.
13527         (complete_labeled_statement):  Rename to finish_labeled_statement.
13528         (complete_for_loop):  Rename to finish_for_loop.
13529         (complete_method_declaration):  Rename to finish_method_declaration.
13530
13531         * java-tree.h (continue_identifier_node):  New global node.
13532         * decl.c:  Define and initialize continue_identifier_node.
13533         * parse.y (generate_labeled_block):  Remove - no longer needed.
13534         (build_loop_body):  Use continue_identifier_node for continue block.
13535         (finish_labeled_statement):  Also do pop_labeled_block actions.
13536         (java_complete_lhs):  POP_LOOP even if error.
13537         (build_labeled_block):  Special handling for continue_identifier_node.
13538         (patch_loop_statement):  Re-organize.
13539         (patch_bc_statement):  Re-write.
13540
13541 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13542
13543         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
13544         using a WFL compound value.
13545         * parse.y (xref.h): Include.
13546         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
13547         WFL compound value.
13548         (register_fields): Set WFL compound value to lineno if doing
13549         xrefs.
13550         (java_complete_expand_method): Call expand_xref if flag_emit_xref
13551         is set.
13552         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
13553         * xref.h (expand_xref): Prototype renamed from xref_generate.
13554
13555 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13556
13557         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
13558         (GET_CURRENT_BLOCK): New macro.
13559         * parse.y (current_static_block): New global variable.
13560         (method_body:): Define action.
13561         (complete_method_declaration): Set current_function_decl to NULL
13562         when work on the current method is done.
13563         (declare_local_variables): Use GET_CURRENT_BLOCK.
13564         (java_method_add_stmt): Likewise.
13565         (java_complete_expand_method): Disable the use of `this' when
13566         expanding <clinit>.
13567         (enter_a_block): If no current method exist, use
13568         current_static_block to link static initializer blocks.
13569         (exit_block): Rewritten to use current_static_block when no current
13570         method decl exists.
13571         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
13572         (patch_return): Forbid the use of `return' in static initializers.
13573         (patch_throw_statement): Fixed indentation. Issue specific error
13574         for uncaught thrown checked exception in static initializer
13575         blocks. Removed FIXME.
13576
13577 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
13578
13579         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
13580         Link gcj from gcc.o.
13581
13582 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13583
13584         * parse.y (find_applicable_accessible_methods_list): When dealing
13585         with interface: ensure that a given interface or java.lang.Object
13586         are searched only once.
13587
13588 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13589
13590         * gjavah.c (print_c_decl): Remove unused argument `flags'.
13591
13592         * jcf-dump.c (print_access_flags): Add braces around if-else.
13593
13594         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
13595         COMBINE_INPUTS.
13596
13597         * lex.c (build_wfl_node): Add static prototype.
13598
13599         * lex.h (build_wfl_node): Remove static prototype.
13600
13601         * parse.y: Include lex.c early enough to declare everything needed.
13602         Ensure calls to `build_wfl_node' pass the proper arguments.
13603         (create_class): Remove unused variable `super_decl'.
13604         (get_printable_method_name): Initialize variable `name'.
13605
13606 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13607
13608         * Changelog: Fixed 1999-03-22 typos.
13609         * lang.c (lang_decode_option): Fixed typo in error string in the
13610         XARG section.
13611
13612 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13613
13614         * Makefile.in (JAVA_OBJS): Added entry xref.o.
13615         (xref.o): New rule.
13616         * java-tree.h (flag_emit_xref): Declared extern.
13617         * lang.c (xref.h): Included.
13618         (flag_emit_xref): New global variable.
13619         (lang_decode_option): Added support for -fxref.
13620         * xref.c: Created.
13621         * xref.h: Likewise.
13622
13623 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
13624
13625         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
13626         linked with.
13627
13628 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13629
13630         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
13631         $(srcdir)/../system.h and $(JAVA_TREE_H).
13632         (jcf-io.o): Depend on $(JAVA_TREE_H).
13633         (mangle.o): Likewise.
13634
13635         * check-init.c (check_cond_init): Add static prototype.
13636
13637         * class.c (build_java_method_type, hashUtf8String,
13638         make_field_value, get_dispatch_vector, get_dispatch_table,
13639         append_gpp_mangled_type, mangle_static_field): Likewise.
13640         (strLengthUtf8): Hide unused definition.
13641         (hashUtf8String): Const-ify.
13642         (make_field_value): Un-ANSI-fy.
13643
13644         * constants.c: Move inclusion of jcf.h above java-tree.h.
13645         (set_constant_entry, find_class_or_string_constant,
13646         find_name_and_type_constant, get_tag_node,
13647         build_constant_data_ref): Add static prototype.
13648
13649         * decl.c (push_jvm_slot, builtin_function,
13650         lookup_name_current_level): Likewise.
13651         (builtin_function): Const-ify.
13652
13653         * except.c (expand_start_java_handler, expand_end_java_handler):
13654         Add static prototype.
13655
13656         * expr.c (flush_quick_stack, push_value, pop_value,
13657         java_stack_swap, java_stack_dup, build_java_athrow,
13658         build_java_jsr, build_java_ret, expand_java_multianewarray,
13659         expand_java_arraystore, expand_java_arrayload,
13660         expand_java_array_length, build_java_monitor, expand_java_pushc,
13661         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
13662         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
13663         expand_compare, expand_test, expand_cond, expand_java_goto,
13664         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
13665         expand_java_field_op, java_push_constant_from_pool): Likewise.
13666
13667         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
13668         (build_java_arraynull_check): Mark parameters `node' and `type'
13669         with ATTRIBUTE_UNUSED.
13670         (note_label): Likewise for parameter `current_pc'.
13671         (expand_java_call, expand_java_ret): Hide unused definition.
13672
13673         * java-tree.h (make_class, build_constants_constructor,
13674         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
13675         init_outgoing_cpool, register_class, emit_register_classes,
13676         java_layout_seen_class_methods): Prototype.
13677         (unicode_mangling_length): Const-ify.
13678         (append_gpp_mangled_name, append_gpp_mangled_classtype,
13679         emit_unicode_mangled_name, format_int, format_uint,
13680         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
13681         jcf_print_utf8_replace, open_class): Prototype.
13682
13683         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
13684         <stdio.h>.  Include tree.h/java-tree.h.
13685         (utf8_equal_string usage, process_class): Add static prototype.
13686         (open_class): Don't prototype this here.
13687         (utf8_equal_string): Match arguments to format specifiers.
13688         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
13689         TABLE_SWITCH, disassemble_method): Likewise.
13690
13691         * jcf-io.c: Include tree.h/java-tree.h.
13692         (open_class, find_classfile, jcf_print_utf8,
13693         jcf_print_utf8_replace): Const-ify.
13694
13695         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
13696         parse_class_file): Add static prototype.
13697         (find_in_current_zip): Match definition to existing static
13698         prototype.
13699
13700         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
13701         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
13702         finish_jcf_block, define_jcf_label, get_jcf_label_here,
13703         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
13704         write_chunks, adjust_typed_op, generate_bytecode_conditional,
13705         generate_bytecode_return, perform_relocations, init_jcf_state,
13706         init_jcf_method, release_jcf_state, generate_classfile):
13707         Add static prototype.
13708         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
13709         (make_class_file_name): Const-ify.
13710
13711         * jcf.h (find_classfile): Const-ify.
13712
13713         * jv-scan.c (reset_report): Remove prototype.
13714
13715         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
13716         (error): Rewrite to allow varargs.
13717
13718         * lang.c (lang_f_options): Const-ify.
13719
13720         * lex.c (java_parse_escape_sequence): Add static prototype.
13721         (java_allocate_new_line): Match definition to existing static
13722         prototype.
13723
13724         * mangle.c Include tree.h/java-tree.h.
13725         (unicode_mangling_length, emit_unicode_mangled_name,
13726         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
13727
13728         * parse.h (jdep_code): Remove trailing comma in enumeration.
13729         (java_get_line_col): Move prototype outside of !JC1_LITE test.
13730         (reset_report): Add prototype.
13731
13732         * verify.c (push_pending_label, merge_types): Add static
13733         prototypes.
13734
13735         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
13736
13737 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13738
13739         * parse.y (find_applicable_accessible_methods_list): Extend the
13740         search to superinterfaces when relevant.
13741         (search_applicable_methods_list): New function.
13742
13743 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13744
13745         * class.c (unmangle_classname): Implemented stricter testing
13746         before setting the QUALIFIED_P flag on an identifier.
13747
13748 1999-03-16  Per Bothner  <bothner@cygnus.com>
13749
13750         * parse.y (java_complete_lhs):  Call force_evaluation_order
13751         after patch_newarray.
13752         (patch_binop):  Don't call fold if there are side effects.
13753
13754 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13755
13756         * parse.y (java_stabilize_reference): Use save_expr instead of
13757         building a SAVE_EXPR node.
13758         (java_complete_lhs): Patch the resulting string of the `+='
13759         operator (if necessary) and complete the RHS after having built
13760         the cast.
13761
13762 1999-03-15  Per Bothner  <bothner@cygnus.com>
13763
13764         * class.c (make_class):  Don't set CLASS_P here (because
13765         this function is also called by build_java_array_type).
13766         (push_class):  Set CLASS_P here instead.
13767         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
13768
13769         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
13770         context.  If the context is class, perfer "super" over "synchronized".
13771         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
13772
13773         * parse.y (create_class):  Don't call parser_check_super here;
13774         it is not robust.  Always wait until later.
13775
13776         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
13777         match what JDK 1.2 does), but don't set ACC_PUBLIC.
13778
13779 1999-03-13  Per Bothner  <bothner@cygnus.com>
13780
13781         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
13782         * lex.h (UNGETC):  Change misleading macro.
13783
13784 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13785
13786         * parse.y (java_stabilize_reference): Return NODE when patching a
13787         COMPOUND_EXPR.
13788         (java_complete_lhs): Put parenthesis around truth values.
13789
13790 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13791
13792         * class.c (layout_class_method): Don't make rtl for interface
13793         methods.
13794         * parse.h (GET_TYPE_NAME): New macro.
13795         * parse.y (if_then_statement:): Fixed indentation.
13796         (if_then_else_statement:): Likewise.
13797         (for_statement:): Fixed spacing.
13798         (try_statement:): Fixed indentation.
13799         (create_interface): Don't force interfaces to be abstract.
13800         (method_header): Abstract methods are OK in interfaces.
13801         (declare_local_variables): Fixed typo in comment.
13802         (java_complete_expand_method): Fixed indentation.
13803         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
13804         non accessible fields.
13805         (java_stabilize_reference): New function.
13806         (java_complete_lhs): Fixed indentation. Use
13807         java_stabilize_reference in compound assignment. Insert the
13808         cast. If not processing `+' fix string constants before processing
13809         binop.
13810
13811 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13812
13813         * constants.c (find_class_or_string_constant): Cast variable `j'
13814         to a `jword' when comparing against one.
13815
13816         * expr.c (java_lang_expand_expr): Remove unused variables
13817         `has_finally_p' and `op0'.
13818
13819         * gjavah.c (print_field_info): Cast a value to jint when comparing
13820         against one.  Likewise for a jlong.
13821         (add_namelet): Likewise cast a `sizeof' to an int when comparing
13822         against a signed quantity.
13823
13824         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
13825         (print_signature): Don't needlessly dereference variable `str'
13826
13827         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
13828         `max_locals' with ATTRIBUTE_UNUSED.
13829         (jcf_parse_class): Likewise for variable `index'.
13830
13831         * parse.h (reverse_jdep_list): Remove static prototype.
13832
13833         * parse.y (build_jump_to_finally): Remove prototype and definition.
13834         (reverse_jdep_list): Add static prototype.
13835
13836         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
13837         `assignment' and `expr_decl'.
13838
13839         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
13840
13841 1999-03-12  Andrew Haley  <aph@cygnus.com>
13842
13843         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
13844         we'll need a directory separator and a null character.
13845
13846 1999-03-10  Per Bothner  <bothner@cygnus.com>
13847
13848         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
13849
13850   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13851
13852         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
13853         interfaces.
13854
13855 1999-03-05  Per Bothner  <bothner@cygnus.com>
13856
13857         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
13858
13859         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
13860
13861         * class.c (layout_class_method):  A static method in a base class
13862         is never overridden, so treat it like it doesn't exist.
13863         However, do complain about private non-static method overriding
13864         public static method.
13865
13866         * parse.y:  Don't set unused INITIALIZED_P flag.
13867         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
13868
13869         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
13870         (build_array_from_name):  Re-order &index[string] to &string[index].
13871
13872         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
13873         error_mark (it might catch more errors, but it is more likely to lose).
13874
13875 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13876
13877         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
13878         (parse-scan.o): Depend on toplev.h.
13879
13880         * class.c (make_method_value): Add prototype.  Make it static.
13881         Remove unused second argument, caller changed.
13882
13883         * expr.c (java_lang_expand_expr): Remove unused variable
13884         `return_label'.
13885
13886         * java-tree.h: Don't prototype find_in_current_zip.
13887         Add prototypes for verify_constant_pool, start_java_method,
13888         end_java_method, give_name_to_locals, expand_byte_code,
13889         open_in_zip, set_constant_value, find_constant1, find_constant2,
13890         find_utf8_constant, find_string_constant, find_class_constant,
13891         find_fieldref_index, find_methodref_index, write_constant_pool,
13892         count_constant_pool_bytes and encode_newarray_type.
13893
13894         * jcf-dump.c: Remove unused variable `LONG_temp'.
13895
13896         * jcf-parse.c: Include parse.h.
13897         (jcf_parse_source): Remove unused parameter, all callers changed.
13898         (jcf_figure_file_type): Add static prototype.
13899         (find_in_current_zip): Likewise.  Also remove unused parameter,
13900         all callers changed.
13901         (read_class): Initialize variable `saved_pos'.
13902
13903         * jcf-reader.c (jcf_parse_preamble): Mark variables
13904         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
13905
13906         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
13907         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
13908         (java_parse_doc_section): Initialize variable `seen_star'.
13909         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
13910         (java_lex_error): Mark parameters `msg' and `forward' with
13911         ATTRIBUTE_UNUSED.
13912         (java_get_line_col): Mark parameters `filename' and `line' with
13913         ATTRIBUTE_UNUSED.
13914
13915         * parse-scan.y: Include toplev.h.
13916         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
13917
13918         * parse.h: use `struct JCF', not plain `JCF'.
13919         (java_parser_context_save_global, java_expand_classes
13920         java_parser_context_restore_global, java_parse): Add prototypes.
13921
13922         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
13923         `node'.
13924
13925 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
13926
13927         *  check-init.c (check_init):  COPYN takes word count, not bit count.
13928
13929 1999-02-26  Per Bothner  <bothner@cygnus.com>
13930
13931         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
13932         explicit build_decl.  (Avoids crash in reload when optimizing.)
13933
13934 1999-02-25  Per Bothner  <bothner@cygnus.com>
13935
13936         * decl.c (complete_start_java_method):  Handle synchronized method
13937         even when compiling from bytecode.
13938
13939 1999-02-26  Tom Tromey  <tromey@cygnus.com>
13940
13941         * gjavah.c (add_class_decl): Only generate `#include' if outer
13942         class is not the name of the class we are processing.  Correctly
13943         append `.h' in #include.
13944         (process_file): Clean up newlines around generated `#include's.
13945         (decode_signature_piece): Correctly handle inner classes.
13946         (struct include): New structure.
13947         (all_includes): New global.
13948         (print_include): New function.
13949         (add_class_decl): Use it.
13950         (process_file): Likewise.
13951         (add_class_decl): Generate include for java-array.h if array
13952         seen.
13953         (process_file): Don't generate java-array.h include.
13954
13955         * gjavah.c (add_namelet): Check for standard package names here.
13956         (add_class_decl): Don't check for standard package names here.
13957
13958 1999-02-25  Tom Tromey  <tromey@cygnus.com>
13959
13960         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
13961         When reading a zip file, only use strncmp if both strings are
13962         bigger than the buffer length.  Initialize `k' when looping
13963         through zip file.
13964
13965 1999-02-24  Tom Tromey  <tromey@cygnus.com>
13966
13967         * gjavah.c (struct namelet): New structure.
13968         (add_namelet): New function.
13969         (print_namelet): New function.
13970         (print_class_decls): Use add_namelet and print_namelet to generate
13971         namespaces and not classes.
13972         (method_printed): New global.
13973         (HANDLE_END_METHOD): Examine method_printed.
13974         (print_method_info): Set method_printed when required.  Print
13975         error if function to be ignored is marked virtual.  Handle $finit$
13976         method.
13977         (METHOD_IS_FINAL): New macro.
13978         (print_field_info): Use it.
13979         (HANDLE_METHOD): Clear method_printed.
13980         (method_pass): New global.
13981         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
13982         (process_file): Do two passes over both fields and methods.
13983         (HANDLE_METHOD): Examine method_pass.
13984         (root): New global.
13985         (add_class_decl): New function.
13986         (print_class_decls): Don't scan over entire constant pool.
13987
13988 1999-02-23  Tom Tromey  <tromey@cygnus.com>
13989
13990         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
13991         disable linking in that case.
13992
13993 1999-02-20  Tom Tromey  <tromey@cygnus.com>
13994
13995         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
13996         not 0x1f.
13997
13998 1999-02-21  Per Bothner  <bothner@cygnus.com>
13999
14000         * decl.c (build_result_decl), java-tree.h:  New method.
14001         (complete_start_java_method):  Handle synchronized methods.
14002         Don't build DECL_RESULT here.  (Ordering dependency problem.)
14003         (start_java_method):  Call build_result_decl here instead  ...
14004         * parse.y (java_complete_expand_method):  ... and here.
14005         (expand_start_java_method): Don't call complete_start_java_method here.
14006         (java_complete_expand_method):  Call it here instead.
14007         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
14008         * java-tree.h:  ... here.
14009
14010         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
14011         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
14012         for ARRAY_REF - it doesn't work when array bounds are checked.
14013         (patch_array_ref):  Handle it here instead.
14014
14015         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
14016
14017 1999-02-19  Per Bothner  <bothner@cygnus.com>
14018
14019         Force left-to-right evaluation of binary operations etc.
14020         * expr.c (force_evaluation_order), java-tree.h:  New function.
14021         * parse.y (java_complete_lhs):  Pass binary operations, procedure
14022         calls, and ARRAY_REFs to force_evaluation_order.
14023         (various):  Set TREE_SIDE_EFFECTS more carefully.
14024
14025         Tolerate random (non-UTF8) encoding in comments without complaining.
14026         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
14027         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
14028
14029         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
14030         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
14031
14032         * parse.y (java_complete_lhs):  Ignore an empty statement in a
14033         COMPOUND_EXPR.  Don't complain about empty statement after return.
14034
14035 1999-02-19  Per Bothner  <bothner@cygnus.com>
14036
14037         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
14038         in TREE_LIST - just chain the POINTER_TYPEs together.
14039         (resolve_class):  If type already resolved, return decl.
14040         After resolving, update TREE_TYPE(class_type), and name (if array).
14041         * parse.h (do_resolve_class), parse.y:  Make non-static.
14042         * class.c (maybe_layout_super_class):  Take this_class argument.
14043         Do do_resolve_class if necessary.
14044         (layout_class, layout_class_methods): Adjust calls appropriately.
14045         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
14046         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
14047         * typeck.c (build_java_array_type):  Don't call layout_class.
14048
14049 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14050
14051         * parse.y (check_pkg_class_access): Allow private class access
14052         within the same package.
14053         (strip_out_static_field_access_decl): New function.
14054         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
14055         operator argument before testing its nature.
14056
14057 1999-02-03  Per Bothner  <bothner@cygnus.com>
14058
14059         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
14060         (TRY_EXPR):  Simplify - it no longer has a finally clause.
14061         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
14062         Simpler handling of TRY_EXPR, which no longer has a finally clause.
14063         * expr.c (java_lang_expand_expr):  Likewise.
14064         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
14065         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
14066         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
14067         (build_try_statement):  Remove finally parameter and handling.
14068         (build_try_finally_statement):  New function.
14069         (patch_try_statement):   No longer need to support finally clause.
14070         (try_statement):  Update grammar action rules.
14071         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
14072         Simpler handling of TRY_EXPR, which no longer has a finally clause.
14073
14074 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
14075
14076         * jcf-parse.c (get_constant): Add braces around computation of 'd'
14077         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
14078
14079 1999-02-17  Andrew Haley  <aph@cygnus.com>
14080
14081         * class.c (build_utf8_ref): Back out broken patch which was
14082         intended to to output signatures using '.' as a separator.
14083
14084         * class.c (make_class_data): Output signatures using '.' as a
14085         separator, rather than '/'.
14086         (mangled_classname): Likewise.
14087         (make_field_value): Likewise.
14088         (make_method_value): Likewise.
14089         * constants.c (alloc_class_constant): Likewise.
14090         * expr.c (build_invokeinterface): Likewise.
14091
14092 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14093
14094         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
14095         of an ancient workaround.
14096
14097 1999-02-10  Jeffrey A Law  (law@cygnus.com)
14098
14099         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
14100         here anymore.
14101
14102 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14103
14104         * lex.c (yylex): Encode \0 as UTF8.
14105
14106 1999-02-10  Tom Tromey  <tromey@cygnus.com>
14107
14108         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
14109         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
14110         (libgcj_zip): Renamed.
14111         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
14112         LIBJAVA_ZIP_FILE.
14113         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
14114
14115         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
14116         (GC_NAME): Renamed -lgc to -lgcjgc.
14117
14118 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14119
14120         * lex.c (java_lang_cloneable): Initialize.
14121         * parse.y (java_lang_cloneable): New static variable.
14122         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
14123         doing one more qualification round.
14124         (valid_ref_assignconv_cast_p): Reject null source or
14125         destination. Allow an array to be cast into java.lang.Cloneable.
14126         (patch_cast): Swapped two first arguments to first call to
14127         valid_ref_assignconv_cast_p.
14128
14129 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14130
14131         * parse.h: DECL_P renamed JDECL_P.
14132         * parse.y: DECL_P replaced by JDECL_P.
14133         (build_array_from_name): Always use pointer's type.
14134         (patch_bc_statement): Extra code to search continue target in a
14135         for loop. Fixed comments. Continue target is current loop when
14136         unlabeled.
14137
14138 1999-02-05  Andrew Haley  <aph@cygnus.com>
14139
14140         * class.c (make_class_data): The superclass of an interface should
14141         be null, not class Object.
14142
14143         * lex.c (java_lex): Sign extend hex literals.
14144
14145 1999-02-04  Andrew Haley  <aph@cygnus.com>
14146
14147         * class.c (build_utf8_ref): Output signatures using '.' as a
14148         separator, rather than '/'.
14149         (make_class_data): Likewise.
14150
14151 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
14152
14153         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
14154         mkstemp.o.  Get them from libiberty now.
14155
14156 1999-02-02  Jeffrey A Law  (law@cygnus.com)
14157
14158         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
14159
14160 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14161
14162         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
14163         from libiberty.h
14164
14165 1999-02-02  Per Bothner  <bothner@cygnus.com>
14166
14167         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
14168         * jcf-write.c (generate_bytecode_return):  New function.
14169         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
14170
14171         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
14172         generate special [fd]const_[01] instructions.
14173
14174         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
14175
14176         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
14177         handling OPCODE_lookupswitch or OPCODE_tableswitch.
14178
14179 1999-02-01  Per Bothner  <bothner@cygnus.com>
14180
14181         * parse.y (patch_method_invocation):  Handle calling static methods,
14182         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
14183
14184         * parse.y (java_complete_lhs):  Don't complain about unreachable
14185         exit condition in a do-while statement.
14186
14187 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14188
14189         * lex.c (java_read_char): Fixed utf8 decoding.
14190         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
14191         range.
14192         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
14193         comments. Local variable `all_primitive' is gone. Broadened
14194         acceptance of `0' to floating point targets. `long' can now be
14195         widened to `double' or `float'.
14196         (valid_method_invocation_conversion_p): Added leading
14197         comment. Fixed tabulation.
14198         (build_string_concatenation): Optimize out left or right empty
14199         string constants.
14200
14201 1999-01-28  Per Bothner  <bothner@cygnus.com>
14202
14203         * jcf-write.c (localvar_alloc):  Only emit entry for
14204         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
14205         (generate_bytecode_insns):  Only call put_linenumber if
14206         debug_info_level > DINFO_LEVEL_NONE.
14207         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
14208         is specified, add -g1 (for compatibility wih javac).
14209
14210 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
14211
14212         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
14213         gjavah.o, check-init.o, jv-scan.o
14214
14215 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14216
14217         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
14218
14219         * gjavah.c: Include config.h and system.h.
14220
14221         * javaop.h (inline): Don't define, its handled by system.h.
14222         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
14223         from `inline' to `static inline'.
14224
14225         * jcf.h (inline): Don't define, its handled by system.h.
14226
14227         * lex.c (inline): Likewise.
14228
14229 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
14230
14231         * lang-specs.h: Map -Qn to -fno-ident.
14232
14233 1999-01-29  Richard Henderson  <rth@cygnus.com>
14234
14235         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
14236
14237 1999-01-29  Tom Tromey  <tromey@cygnus.com>
14238
14239         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
14240         then cast it to Object before calling `append' method.
14241
14242 1999-01-28  Per Bothner  <bothner@cygnus.com>
14243
14244         * check-init.c (check_bool2_init, check_bool_init, check_init):
14245         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
14246         * jcf-write.c (generate_bytecode_insns):  Likewise.
14247
14248 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14249
14250         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
14251         * parse.y (patch_cast): Allow a boolean to be cast into a
14252         boolean.
14253
14254 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14255
14256         * parse.y: (class_declaration:): Fixed indentation.
14257         (class_member_declaration:): Extra `;' after field declaration now
14258         accepted.
14259         (interface_declaration:): Removed debug messages in error reports.
14260         (patch_binop): Nodes created and returned inherit the orignal
14261         node's COMPOUND_ASSIGN_P flag value.
14262         (patch_cast): Fix cast from char to floating point.
14263
14264 1999-01-25  Andrew Haley  <aph@cygnus.com>
14265
14266         * except.c, java-except.h (expand_resume_after_catch): new
14267         function.
14268         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
14269         to branch back to main flow of control after a catch block.
14270
14271 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14272
14273         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
14274         $(srcdir)/../system.h.
14275         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
14276         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
14277         (jcf-write.o): Likewise.
14278         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
14279         (mangle.o): Depend on $(srcdir)/../toplev.h.
14280         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
14281         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
14282
14283         * class.c: Include output.h and parse.h.
14284         (mangled_classname): Add the `const' keyword to a char*.
14285         (find_named_method): Hide unused function definition.
14286         (build_utf8_ref): Change type of variable `c' to unsigned char.
14287         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
14288         (build_class_ref): Add the `const' keyword to a char*.
14289         (layout_class_method): Remove unused variable `buf'.
14290
14291         * decl.c (find_local_variable): Remove unused variable `rtl'.
14292         (pushdecl): Likewise for variables `different_binding_level' and
14293         `oldglobal'.
14294         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
14295         (maybe_build_cleanup): Likewise for parameter `decl'.
14296
14297         * except.c (expand_start_java_handler): Mark parameter `range'
14298         with ATTRIBUTE_UNUSED.
14299
14300         * expr.c: Include except.h.
14301         (pop_type): Remove unused variable `i'.
14302         (pop_value): Likewise for variables `n_words' and `i'.
14303         (expand_java_arrayload): Likewise for variable `convert'.
14304         (java_lang_expand_expr): Likewise for variables `op0', `type',
14305         `mode', `unsignedp', `node' and `elements'.
14306         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
14307         `eh_ranges'.
14308         (process_jvm_instruction): Add a `const' qualifier to a char*.
14309
14310         * gjavah.c (output_directory): Add the `const' keyword to a char*.
14311         (temp_directory): Likewise.
14312         (print_c_decl): Likewise.
14313         (print_method_info): Likewise.
14314         (decode_signature_piece): Likewise.
14315         (print_mangled_classname): Likewise.
14316
14317         * java-except.h: Provide prototypes for maybe_start_try,
14318         maybe_end_try and add_handler.
14319
14320         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
14321         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
14322         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
14323         init_expr_processing, push_super_field, init_class_processing,
14324         can_widen_reference_to, class_depth, verify_jvm_instructions,
14325         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
14326         set_local_type, merge_type_state, push_type, load_type_state,
14327         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
14328         emit_unicode_mangled_name): Add prototypes.
14329
14330         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
14331         (print_signature_type): Use ISDIGIT, not isdigit.
14332         (print_signature): Remove unused variable `j'.
14333
14334         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
14335         int when comparing against one.
14336
14337         * jcf-parse.c: Include toplev.h.
14338
14339         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
14340         (localvar_free): Remove unused variable `i'.
14341         (generate_bytecode_conditional): Likewise for variable `kind'.
14342
14343         * jv-scan.c: Include config.h and system.h.  Remove redundant
14344         OS header and gansidecl.h includes.
14345         (warning): Add the `const' keyword to a char*.  Also add
14346         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
14347         __STDC__, when determining whether to use ANSI-isms.
14348         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
14349         (xmalloc): Don't redundantly prototype here.
14350         (main): Remove unused parameter `envp'.  Also fix the arguments
14351         passed to function `fatal' to match the format specifier.
14352
14353         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
14354
14355         * mangle.c: Include toplev.h.
14356         (emit_unicode_mangled_name): Declare parameter `len'.
14357
14358         * parse.y (parse_warning_context): Add the `const' keyword to a
14359         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
14360         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
14361         (issue_warning_error_from_context): Add the `const' keyword to
14362         a char*.
14363         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
14364         not `__STDC__' for whether to use ANSI-isms.
14365
14366         * typeck.c (incomplete_type_error): Mark parameters `value' and
14367         `type' with ATTRIBUTE_UNUSED.
14368         (parse_signature_type): Use ISDIGIT, not isdigit.
14369
14370         * verify.c (check_pending_block): Add the `const' keyword to a char*.
14371         (verify_jvm_instructions): Likewise.  Remove unused variables
14372         `field_name' and `default_val'.
14373
14374         * zextract.c: Include config.h and system.h.  Remove redundant
14375         OS header includes.
14376
14377         * zipfile.h: Prototype `read_zip_archive'.
14378
14379 1999-01-21  Andrew Haley  <aph@cygnus.com>
14380
14381         * typeck.c (convert): Allow conversions to void type: some
14382         optimizations in gcc do this.
14383
14384 1999-01-21  Andrew Haley  <aph@cygnus.com>
14385
14386         * typeck.c (convert_ieee_real_to_integer): New function.
14387         (convert): When not using fast-math and using hardware fp, convert
14388         an IEEE NaN to zero.
14389
14390 1999-01-18  Andrew Haley  <aph@cygnus.com>
14391
14392         * parse.y (patch_binop): Do a type conversion from signed to
14393         unsigned and then back to signed when a ">>>" is found.
14394
14395 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14396
14397         * java-tree.h: (check_for_initialization): Added prototype.
14398         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
14399         * parse.y (do_resolve_class): Removed unused locals.
14400         (read_import_dir): Likewise.
14401         (resolve_qualified_expression_name): Array creation
14402         expressions are valid primary expressions.
14403         (qualify_ambiguous_name): Likewise.
14404         (patch_synchronized_statement): Removed unused local.
14405
14406 1999-01-17  Jeffrey A Law  (law@cygnus.com)
14407
14408         * Makefile.in (zextract.o): Add dependencies.
14409
14410         * Makefile.in: Do not put ^Ls at the start of a line.
14411
14412 1999-01-15  Per Bothner  <bothner@cygnus.com>
14413
14414         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
14415         sub-type the result of the call that gets the exception value.
14416
14417         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
14418         don't call finish_class.
14419
14420         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
14421         clear found before continuing.
14422
14423         * verify.c (verify_jvm_instructions):  On an array load, allow
14424         and handle top of stack to be TYPE_NULL.
14425
14426         * gjavah.c (generate_access):  Translate Java package private or
14427         protected access to C++ public, but with a comment.
14428
14429 1999-01-13  Andrew Haley  <aph@cygnus.com>
14430
14431         * expr.c (generate_name): Name prefix changed to avoid clashes
14432         with assembler temp labels.
14433
14434         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
14435         MODIFY_EXPR.  Without this, code for the assignment may not be
14436         generated at all and the synchronized statement will read an
14437         uninitialized variable.
14438
14439 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14440
14441         * class.c (maybe_layout_super_class): Fixed returned value.
14442         * lex.c: Added 1999 to the copyright.
14443         (java_init_lex): Initialize java_lang_imported.
14444         * lex.h: Added 1999 to the copyright.
14445         * parse.h: Added 1999 to the copyright.
14446         (REGISTER_IMPORT): Fixed typo in trailing macro.
14447         (CURRENT_OSB): New macro.
14448         (struct parser_ctxt): New fields osb_depth, osb_limit.
14449         * parse.y (java_lang_id): New global variable.
14450         (type_import_on_demand_declaration): Don't import java.lang.* twice.
14451         (array_creation_expression:): Use CURRENT_OSB.
14452         (dims:): Uses a stack to keep track of array dimensions.
14453         (cast_expression:): Use CURRENT_OSB.
14454         (find_expr_with_wfl): Return NULL if node found doesn't meet the
14455         conditions.
14456         (register_fields): Fixed typos in comment.
14457         (check_method_redefinition): Fixed comment indentation.
14458         (java_check_regular_methods): Set saved found wfl to NULL after
14459         having reinstalled it in the previously found DECL_NAME.
14460
14461 1999-01-10  Richard Henderson  <rth@cygnus.com>
14462
14463         * gjavah.c (java_float_finite): Use a union to do type punning.
14464         (java_double_finite): Likewise.
14465
14466 1999-01-09  Per Bothner  <bothner@cygnus.com>
14467
14468         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
14469         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
14470         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
14471         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
14472         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
14473         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
14474
14475 1999-01-08  Per Bothner  <bothner@cygnus.com>
14476
14477         * check-init.c (check_init):  If compiling to native, we don't
14478         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
14479
14480 1999-01-08  Tom Tromey  <tromey@cygnus.com>
14481
14482         * parse-scan.y (variable_declarator_id): Set or increment
14483         bracket_count.
14484         (bracket_count): New global.
14485         (formal_parameter): Handle case where bracket pairs trail variable
14486         declarator id.
14487
14488 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
14489
14490         * jcf-parse.c (yyparse): variable len changed from a char to an
14491         int to prevent overflow.
14492
14493 1999-01-06  Per Bothner  <bothner@cygnus.com>
14494
14495         * java-tree.h:  Declare read_class.
14496         * jcf-parse.c (read_class):  New function.
14497         (load_class):  Now just call read_class.
14498
14499         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
14500         * jcf-parse.c (parse_source_file):  Declare save_error_count,
14501         which is needed by java_parse_abort_on_error macro,
14502         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
14503
14504         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
14505         constructor, if initializing a static field.
14506         (patch_new_array_init):  Set TREE_CONSTANT if it is.
14507         * expr.c (java_lang_expand_expr):  For a static array constructor
14508         of primitive elements, allocate the array itself statically.
14509         Disabled until we can set the vtable field statically.
14510
14511         * check-init.c:  New file.  Checks for definite assignment.
14512         * Makefile.in (JAVA_OBJS):  Add check-init.o.
14513         * parse.y (java_complete_expand_method): Call check_for_initialization.
14514         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
14515
14516 1999-01-06  Graham <grahams@rcp.co.uk>
14517
14518         * parse.y : include system.h instead of including
14519         standard headers directly with the exception of <dirent.h>.
14520
14521 1999-01-06  Per Bothner  <bothner@cygnus.com>
14522
14523         * lex.h:  Moved static function declarations to lex.c,
14524         to shut up some -Wall warnings.
14525         * lex.c:  Static function declarations moved here.
14526         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
14527
14528 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14529
14530         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
14531
14532 1998-12-22  Per Bothner  <bothner@cygnus.com>
14533
14534         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
14535         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
14536
14537         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
14538         (localvar_alloc):  Change return type to void,
14539         (emit_unop):  Remove unused variable size.
14540
14541         * jcf-write.c (struct jcf_block):  Add new union.
14542         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
14543         (call_cleanups):  New functions.
14544         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
14545         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
14546         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
14547         * lang.c (lang_init):  Call using_eh_for_cleanups.
14548         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
14549         completing operands to patch_synchronized_statement.
14550         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
14551         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
14552         WITH_CLEANUP_EXPR instead of TRY_EXPR.
14553
14554 1998-12-20  John F. Carr  <jfc@mit.edu>
14555
14556         * Make-lang.in: Comment out control-Ls; they upset some makes.
14557
14558 1998-12-18  Tom Tromey  <tromey@cygnus.com>
14559
14560         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
14561         consistently.
14562
14563 1998-12-17  Tom Tromey  <tromey@cygnus.com>
14564
14565         * parse.y (DIR_SEPARATOR): New define.
14566         (check_class_interface_creation): Use it.
14567
14568         * parse-scan.y (report_main_declaration): Recognize
14569         `java.lang.String' in argument to main.
14570
14571 1998-12-16  Per Bothner  <bothner@cygnus.com>
14572
14573         * parse.y (create_interface):  Remove bogus test.
14574
14575 1998-12-16  Per Bothner  <bothner@cygnus.com>
14576
14577         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
14578         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
14579
14580 1998-12-16  Tom Tromey  <tromey@cygnus.com>
14581
14582         * parse-scan.y (qualified_name): Use correct sprintf format.
14583
14584 1998-12-15  Tom Tromey  <tromey@cygnus.com>
14585
14586         * gjavah.c (print_field_info): Changed how most negative number is
14587         printed.
14588
14589 1998-12-14  Per Bothner  <bothner@cygnus.com>
14590
14591         * parse.y (fold_constant_for_init):  New function.
14592         (resolve_expression_name):  Don't replace static final
14593         constant-initialized fields by its value.
14594         (java_complete_lhs):  New.  Same as java_complete_tree, except does
14595         not replace static final constant-initialized fields by their values.
14596         (register_fields):  If there is an initializer, set DECL_INITIAL and
14597         MODIFY_EXPR_FROM_INITIALIZATION_P.
14598         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
14599         Only call patch_initialized_static_field if
14600         MODIFY_EXPR_FROM_INITIALIZATION_P.
14601         (patch_initialized_static_field):  If not valid constant, clear
14602         DECL_INITIAL.
14603
14604         * parse.y (lookup_field_wrapper):  Fix thinko.
14605
14606         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
14607         set and restore global lineno.
14608
14609 1998-12-14  Tom Tromey  <tromey@cygnus.com>
14610
14611         * gjavah.c (print_field_info): If value to print is the smallest
14612         value of its size, then print as hex to avoid later warnings from
14613         C++ compiler.
14614
14615 1998-12-14  Tom Tromey  <tromey@cygnus.com>
14616
14617         * gjavah.c (decompile_method): Decompile `return null'.
14618         (process_file): Generate `#pragma interface'.
14619         (method_declared): New global.
14620         (print_method_info): Set it.
14621         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
14622         (print_method_info): Handle abstract methods.
14623
14624 1998-12-13  Per Bothner  <bothner@cygnus.com>
14625
14626         * parse.y (patch_method_invocation):  If class_decl is null
14627         (e.g. an array type), use original type.
14628
14629         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
14630         errors about uncaught exception from clone (of array, specifically).
14631
14632 1998-12-13  Tom Tromey  <tromey@cygnus.com>
14633
14634         * gjavah.c (decompile_method): Handle all types of `return'
14635         opcode.  Decompile `return this' and `return'.
14636         (method_access): New global.
14637         (print_method_info): Set it.
14638         (decompile_method): Don't decompile a synchronized method.
14639
14640 1998-12-13  Tom Tromey  <tromey@cygnus.com>
14641
14642         * jcf-reader.c (jcf_parse_one_method): Recognize
14643         HANDLE_END_METHOD.
14644         * gjavah.c (HANDLE_END_METHOD): New macro.
14645         (HANDLE_CODE_ATTRIBUTE): New macro.
14646         (decompile_method): New function.
14647         (print_method_info): Don't print `;\n' at end of function decl.
14648         Include java-opcodes.h.
14649         (decompiled): New global.
14650
14651 1998-12-12  Per Bothner  <bothner@cygnus.com>
14652
14653         * class.c (build_class_ref):  Handle PRIMTYPE.class if
14654         flag_emit_class_files.
14655         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
14656         if flag_emit_class_files.
14657         * parse.y (java_complete_tree):  Pre-liminary support for
14658         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
14659
14660         * parse.y (patch_synchronized_statement):   Don't call monitorexit
14661         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
14662
14663         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
14664
14665         * zipfile.h (opendir_in_zip):  New declaration.
14666         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
14667         (opendir_in_zip):  New function, using code from open_in_zip.
14668         (open_in_zip):  Call opendir_in_zip.
14669         (find_class):  Remove no-longer-used do_class_file parameter,
14670         but add source_ok parameter.  Change logic so if we find a .java file,
14671         we don't look for .class in later classpath emtries.
14672         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
14673         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
14674         * gjavah.c: Update call to find_class.
14675         * jcf-dump.c:  Likewise.
14676
14677         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
14678         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
14679         nothing if body is empty_stmt_node.
14680         Various little fixes so SP gets correctly adjusted.
14681         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
14682         For CALL_EXPR, test if static first.
14683         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
14684         such as the ones we create for Object and Class.
14685         Set and restore current_function_decl.
14686         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
14687         (note_possible_classname):  New function.
14688         (read_import_entry):  Removed.  Merged with read_import_dir.
14689         (read_import_dir):  Don't call find_class - that only gives us
14690         the first classpath entry having the needed package.
14691         Use the struct buffer data structure from buffer.h.
14692         (read_import_dir, find_in_imports_on_demand):  The remembered
14693         class names now use '.' (not '/') as package separator.
14694
14695         * parse.y (java_complete_expand_methods):  Call write_classfile
14696         here, and not in java_expand_classes (which only gets first class).
14697
14698 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14699
14700         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
14701         (register_fields):  If a static fields has an initializer, just
14702         chain it on ctxp->static_initialized, and handle later.
14703         (java_complete_expand_methods):  Force <clinit> first.
14704         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
14705         - it's already been completed.
14706         (patch_initialized_static_field):  New function.
14707         (java_complete_field):  Call it.
14708
14709 1998-12-12  Per Bothner  <bothner@cygnus.com>
14710
14711         * expr.c (encode_newarray_type, build_new_array):  New functions.
14712         * java-tree.h:  Declare build_new_array.
14713         * jcf-write.c (patch_newarray):  Use build_new_array.
14714
14715         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
14716         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
14717
14718         * parse.y (patch_new_array_init):  Re-organize.
14719         Now is passed the actual array (pointer) type of the value.
14720         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
14721         (patch_array_constructor):  Removed - merged into patch_new_array_init.
14722         (java_complete_tree):  Update patch_new_array_init.
14723
14724         * jcf-write.c (find_constant_index):  New function.
14725         (generate_bytecode_insns):  Use find_constant_index.
14726         (generate_classfile):  Use find_constant_index for ConstantValue.
14727
14728 1998-12-11  Tom Tromey  <tromey@cygnus.com>
14729
14730         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
14731         * decl.c (init_decl_processing): Renamed dtable -> vtable.
14732         * class.c (make_class_data): Renamed dtable -> vtable, and
14733         dtable_method_count -> vtable_method_count.
14734
14735 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14736
14737         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
14738         global variables, initialized.
14739         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
14740         Declared new global variables.
14741         * lex.c (java_lex): Return long_zero_node, float_zero_node,
14742         double_zero_node, integer_zero_node upon direct matching.
14743         * parse.y (purify_type_name): Added function prototype.
14744         (duplicate_declaration_error_p): Consider new_type as potentially
14745         being a incomplete type. Use purify_type_name on type string.
14746         (method_header): saved_type: unused variable removed. Don't figure
14747         return type if method name is invalid.
14748         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
14749         processed by patch_unaryop.
14750         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
14751         increment/decrement node into its original type after binary
14752         numeric promotion on its operands.
14753
14754 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14755
14756         * parse.y (array_initializer:): Array init operand is NULL_TREE
14757         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
14758         now an error. Fixed indentation problems.
14759         (patch_string): Handle error_mark_node as an argument.
14760         (patch_new_array_init): Fixed indentation problems.
14761         (array_constructor_check_entry): Removed check on null wfl_value.
14762         Return an error if wfl_value's walk returns an error.
14763
14764 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14765
14766         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
14767         * lex.c (java_lex): Remember column position before advancing one
14768         token. Retain location information on OCB_TK.
14769         * lex.h (typedef struct java_lc): Added new field.
14770         * parse.h (GET_SKIP_TYPE): New macro.
14771         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
14772         * parse.y (build_new_array_init, patch_new_array_init,
14773         patch_array_constructor, maybe_build_array_element_wfl,
14774         array_constructor_check_entry): New function prototypes.
14775         (switch_block:): Tagged <node>.
14776         (OCB_TK): Tagged <operator>.
14777         (array_initializer:): Installed actions.
14778         (variable_initializer): Build location information on element if
14779         necessary.
14780         (switch_statement:): Fixed indentation typo.
14781         (switch_block:): Redefined default action.
14782         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
14783         (patch_assignment): Removed duplicate code.
14784         (maybe_build_array_element_wfl, build_new_array_init,
14785         patch_new_array_init, patch_array_constructor,
14786         array_constructor_check_entry): New functions.
14787
14788 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14789
14790         * parse.y (array_initializer): Tagged <node>.
14791         (variable_initializer:): Use default rule.
14792         (array_initializer:): Defined actions.
14793         (variable_initializers:): Likewise.
14794         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
14795         non-static field accesses.
14796         (patch_invoke): Fixed indentation typo.
14797         (java_complete_tree): Likewise.
14798         (build_labeled_block): Changed leading comment. Generate an error
14799         in case of duplicate loop labels.
14800         (patch_conditional_expr): Patch results of string concatenation
14801         operations.
14802
14803 1998-12-06  Per Bothner  <bothner@cygnus.com>
14804
14805         * constants.c (find_methodref_index):  When the class is an interface,
14806         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
14807
14808         * decl.c (finit_identifier_node):  Use "$finit$", rather than
14809         "<finit>" (which Sun's verifier rejects).
14810         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
14811         (generate_field_initialization_code):  Removed.
14812         (fix_constructors)  Don't add call to $finit$ here (wrong order).
14813         (patch_method_invocation):  Add $finit$ call here.
14814
14815         * java-tree.h (CALL_USING_SUPER):  New macro.
14816         * parse.y (patch_invoke):  Remove im local variable.
14817         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
14818         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
14819         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
14820
14821         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
14822
14823         * parse.y (java_complete_tree):  Don't complain about unreachable
14824         statement if it is empty_stmt_node.
14825
14826         * jcf-write.c (find_constant_wide):  New function.
14827         (push_long_const):  Use find_constant_wide.
14828
14829         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
14830         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
14831         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
14832         Emit invokeinterface when calling an interface method.
14833         Emit invokespecial also when calling super or private methods.
14834
14835         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
14836
14837 1998-12-06  Per Bothner  <bothner@cygnus.com>
14838
14839         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
14840
14841 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14842
14843         * java-tree.h (java_layout_seen_class_methods): New function
14844         prototype.
14845         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
14846         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
14847         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
14848         * parse.y (method_declarator:): Defined action.
14849         (issue_warning_error_from_context): input_filename saved, set to
14850         the appropriate value and restored after java_error is called.
14851         (build_unresolved_array_type): Fixed comment.
14852         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
14853         (method_header): Deal with return type the same way type are
14854         handled for fields and method's parameters and local variables
14855         types are handled.
14856         (check_method_redefinition): Removed extra CR.
14857         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
14858         (java_layout_seen_class_methods): New function.
14859         (java_layout_classes): Call java_layout_seen_class_methods.
14860
14861 1998-12-03  Per Bothner  <bothner@cygnus.com>
14862
14863         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
14864
14865 1998-12-03  Per Bothner  <bothner@cygnus.com>
14866
14867         * jcf-dump.c (main):  Fix error message.
14868         * jcf-path.c (add_entry):  Style fix.
14869
14870 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14871
14872         * class.c (layout_class_method): Call build_java_argument_signature
14873         on constructors too.
14874         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
14875         (patch_method_invocation): Define a primary when resolving an
14876         expression name. Augmented comment on code checking illegal `this'
14877         usage. Loosened it test by accepting NEW_CLASS_EXPR.
14878
14879 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14880
14881         * class.c (layout_class_method): Don't report error on non-static
14882         overriding static if the method is private.
14883         * java-tree.h (finish_class): Prototype added.
14884         * lex.c (java_get_line_col): Handle col argument -2 value.
14885         * parse.h: All static method declarations moved to parse.y.
14886         * parse.y: Now contains all static method declarations previously
14887         found in parse.h.
14888         (find_expr_with_wfl, missing_return_error,
14889         unreachable_stmt_error): New functions.
14890         (java_get_real_method_name): Identify constructors bearing class
14891         names in source code compiled classes only.
14892         (java_complete_expand_methods): Call missing_return_error.
14893         (invocation_mode): Private methods invoked as static methods.
14894         (java_complete_tree): Call unreachable_stmt_error.
14895
14896 1998-12-01  Tom Tromey  <tromey@cygnus.com>
14897
14898         * Makefile.in (+target): Removed.
14899         (+xmake_file): Likewise.
14900         (+tmake_file): Likewise.
14901         (.NOEXPORT): Removed duplicate.
14902
14903 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14904
14905         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
14906
14907         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
14908
14909         * jvgenmain.c: Remove the xmalloc prototype, we get it from
14910         libiberty.h.  Provide an xmalloc definition.
14911
14912         * jvspec.c: Remove the xmalloc prototype.
14913
14914         * parse-scan.y: Include config.h and system.h.  Don't include
14915         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
14916         Provide an xstrdup definition.
14917
14918 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
14919
14920         * jcf-path.c (add_entry): Recognize ".jar" too.
14921         * lang-specs.h: Likewise.
14922
14923 1998-11-26  Per Bothner  <bothner@cygnus.com>
14924
14925         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
14926         soft_monitorenter_node, soft_monitorexit_node, throw_node.
14927
14928         * jcf-write.c (generate_bytecode_insns):
14929         Handle pre/post-increment/decrement of long.
14930
14931         * jcf-write.c (generate_bytecode_insns):
14932         Handle missing exception handler (finally for synchronized).
14933
14934 1998-11-25  Per Bothner  <bothner@cygnus.com>
14935
14936         * java-tree.h (end_params_node):  Declare global.
14937         * decl.c (end_params_node):  New global.
14938         (init_decl_processing, start_java_method):  Use end_params_node for
14939         end of list of parameter types.  Follows correct gcc conventions.
14940         * expr.c (pop_argument_types, pop_arguments):  Likewise.
14941         * lang.c (put_decl_node):  Likewise.
14942         * typeck.c (various places):  Likewise.
14943         * class.y (various places):  Likewise.
14944         * parse.y (various places):  Likewise.
14945
14946         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
14947         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
14948
14949         * class.c:  Add #include flags.h, remove no-longer needed declaration.
14950
14951         * class.c (layout_class_method):  Remove commented-out code, re-format.
14952         Don't add vtable entry (or index) for private methods.
14953         * expr.c (expand_invoke):  A private method is implicitly final.
14954         * class.c (make_class_data):  If inlining or optimizing,
14955         skip private methods.
14956
14957         * class.c (finish_class):  New function.  Calls existing methods,
14958         but alls emits deferred inline functions.
14959         * jcf-parse.c (parse_class_file):  Call finish_class.
14960         * parse.y (java_complete_expand_methods):  Likewise.
14961
14962         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
14963
14964         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
14965
14966 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
14967
14968         * jcf-write.c (generate_bytecode_conditional): Fix typo.
14969
14970 1998-11-24  Per Bothner  <bothner@cygnus.com>
14971
14972         * (generate_classfile): Always write class access flag with
14973         ACC_SUPER set.
14974
14975 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14976
14977         * class.c (maybe_layout_super_class): New function.
14978         (layout_class): Reorganized. Loop on class methods dispatched into
14979         a new function. Call maybe_layout_super_class.
14980         (layout_class_methods, layout_class_method): New functions.
14981         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
14982         class.
14983         (expand_invoke): Likewise.
14984         * java-tree.h (all_class_list): New global variable declared.
14985         (layout_class_methods, layout_class_method): New function
14986         prototypes.
14987         (LAYOUT_SEEN_CLASS_METHODS): New macro.
14988         * jcf-parse.c (all_class_list): New global variable.
14989         (load_class): Extended what class_or_name can be. Use parser
14990         context mechanism to save globals before calling jcf_parse.
14991         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
14992         is set on the file name.
14993         (jcf_parse): Layout class methods when Object is loaded, otherwise
14994         record class in all_class_list for delayed method layout.
14995         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
14996         * lang.c (put_decl_node): Decode <init> into the decl context
14997         class name.
14998         * lex.c (java_allocate_new_line): Use xmalloc.
14999         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
15000         pointers, not TREE_LIST elements.
15001         (struct parser_ctxt): Fixed comment indentations, added comments
15002         and reordered some fields.
15003         (java_check_methods): Function prototype removed.
15004         * parse.y (java_push_parser_context): Use xmalloc.
15005         (java_parser_context_restore_global): Pop extra pushed ctxp only
15006         when there's nothing next.
15007         (maybe_create_class_interface_decl): Fixed comment, add new
15008         created class decl to all_class_list.
15009         (method_header): Use GET_REAL_TYPE on argument's types.
15010         (method_declarator): Use GET_REAL_TYPE, change type to the real
15011         type in TREE_LIST dependency node. Build argument list with the
15012         real type.
15013         (create_jdep_list): Use xmalloc. Removed allocation error message.
15014         (obtain_incomplete_type): Fixed leading comment. Broadened
15015         incoming argument meaning.
15016         (register_incomplete_type): Use xmalloc. Removed allocation error
15017         message.
15018         (safe_layout_class): Fixed leading comment.
15019         (jdep_resolve_class): Reversed if statement condition and switch
15020         if and else bodies.
15021         (resolve_and_layout): Fixed leading comment. Broadened incoming
15022         argument meaning.
15023         (complete_class_report_errors): New local variable name, for
15024         clarity. purify_type_name used for all error cases.
15025         (java_get_real_method_name): Stricter check on constructors.
15026         (java_check_regular_methods): Reverse methods list only if not
15027         already laid out. Layout artificial constructor.
15028         (java_check_methods): Deleted.
15029         (source_start_java_method): Obtain incomplete type for patchable
15030         method arguments.
15031         (java_layout_classes): Fixed leading comment. Use
15032         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
15033         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
15034         before returning. Fixed comments.
15035         (java_expand_classes): Check for errors up front.
15036         (patch_method_invocation): Class to search is resolved and laid
15037         out.
15038
15039 1998-11-24  Per Bothner  <bothner@cygnus.com>
15040
15041         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
15042
15043         * javaop.h (int8):  Removed - not used.
15044         (jbyte):  Redefine portably with correct signedness.
15045
15046         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
15047
15048         * jcf-write.c (generate_bytecode_insns):  Fix typo
15049         OPCODE_getstatic to OPCODE_getfield.
15050
15051         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
15052         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
15053         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
15054
15055 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15056
15057         * jcf-parse.c (jcf_parse_source): Function returned type is
15058         void. Added prototype.
15059         (jcf_parse): Function returned type is void.
15060         (yyparse): Remove call to fclose on the last parsed file.
15061
15062         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
15063
15064 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15065
15066         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
15067         (layout_class): Cope with methods featuring WFL in decl names.
15068         * decl.c (unqualified_object_id_node): New global variable,
15069         initialized.
15070         (build_decl_no_layout): Removed.
15071         * expr.c (build_primtype_type_ref): Handle Double.
15072         (java_lang_expand_expr): Fixed indentations.
15073         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
15074         (flag_wall, flag_redundant, flag_not_overriding,
15075         flag_static_local_jdk1_1, unqualified_object_id_node): Global
15076         variable declarations.
15077         (build_decl_no_layout): Removed prototype.
15078         (java_get_real_method_name): Added prototype.
15079         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
15080         (java_parse_abort_on_error): Macro now just returns.
15081         * jcf-parse.c (jcf_parse_source): Check fclose returned
15082         value. Call emit_register_classes if java_report_errors returns
15083         zero.
15084         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
15085         flag_static_local_jdk1_1): New integer flags.
15086         (lang_decode_option): New flags set here.
15087         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
15088         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
15089         the flag_redundant variable.
15090         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
15091         when parsing java.lang.Object class.
15092         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
15093         NULL_TREE to build.
15094         (resolve_qualified_expression_name): Fixed indentation.
15095         (patch_array_ref): Changed prototype.
15096         (not_initialized_as_it_should_p): Prototype removed.
15097         (java_report_errors): Added function prototype.
15098         * parse.y (formal_parameter:): Changed error message for not yet
15099         supported final parameters.
15100         (class_type_list:): Set both PURPOSE and VALUE of created
15101         TREE_LIST to be class_type.
15102         (primary_no_new_array:): Handle class literals on primitive types.
15103         (parse_warning_context): Reinstalled correct force_error and
15104         do_warning flags setups.
15105         (java_report_errors): Changed prototype. Return java_error_count
15106         value.
15107         (variable_redefinition_error): Consider treating variable type as
15108         a fake pointer.
15109         (create_interface): Warn about redundant abstract modifier if
15110         flag_redundant is set. Changed error message.
15111         (lookup_field_wrapper): Save/restore globals before/after looking
15112         up field.
15113         (duplicate_declaration_error_p): Consider treating declaration
15114         type as a fake pointer.
15115         (register_fields): Extract real type from dependency node. Check
15116         for duplicate field declaration after type adjustment. Use
15117         DECL_INITIAL to store static final initialized values.
15118         (method_header): Extract real function type from dependency node.
15119         (check_abstract_method_header): Use GET_METHOD_NAME.
15120         (obtain_incomplete_type): Layout fake pointer type.
15121         (safe_layout_class): Don't try to check for methods before layout.
15122         (java_complete_class): Don't check for correct throws clause
15123         elements inheritance here.
15124         (resolve_and_layout): Broadened name parameter meaning.
15125         (reset_method_name): Use GET_METHOD_NAME.
15126         (java_get_real_method_name): New function.
15127         (java_check_regular_methods): Don't check methods in
15128         java.lang.Object.  Verify lineage of throws clause elements. Use
15129         flag_no_overriding in warning report.
15130         (check_throws_clauses): Don't check if class was from
15131         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
15132         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
15133         (declare_local_variables): Use flag_static_local_jdk1_1 to report
15134         warning on unsupported final local variables. Use build_decl
15135         instead of build_decl_no_layout. Get real local variable type from
15136         dependency node.
15137         (source_start_java_method): Get real parameter type from
15138         dependency node. Call build_decl instead of build_decl_no_layout.
15139         (java_layout_classes): Reverse tree and layout type and class as
15140         required. Mark class as loaded when done.
15141         (resolve_field_access): Fixed indentation. Restricted condition
15142         leading to static field access code generation. Set field_type
15143         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
15144         (resolve_qualified_expression_name): Initialize type_found to
15145         null. Handle static field resolved during qualification. Fixed
15146         layout on non primitive field decl types.
15147         (not_accessible_p): Fixed typo in comment.
15148         (patch_method_invocation): Resolve and layout class to search from
15149         type.
15150         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
15151         layout non primitive type, if necessary. Make method node only to
15152         report errors.
15153         (find_applicable_accessible_methods_list): Consider WFL'ed method
15154         decl names. Fixed indentation.
15155         (argument_types_convertible): Resolve and layout target type if
15156         necessary.
15157         (java_complete_tree): Fixed indentation problems. Rewrote
15158         CALL_EXPR thrown exceptions check. Re-installed further processing
15159         of the assignment in certain cases.
15160         (patch_assignment): Call maybe_build_primttype_type_ref to perform
15161         inlining on class literals.
15162         (valid_builtin_assignconv_identity_widening_p): Cope with constant
15163         0 literal.
15164         (valid_method_invocation_conversion_p): Likewise.
15165         (patch_string): Temporary disable forbidden use of `this' in
15166         explicit constructor invocations when doing string concatenation
15167         within their scope.
15168         (patch_unaryop): Added comment. Reinstalled code to disable
15169         further check on assignment operation with cast expression RHS.
15170         (patch_switch_statement): Fixed indentation.
15171         (build_try_statement): Call build_decl instead of
15172         build_decl_no_layout.
15173         (patch_synchronized_statement): Likewise.
15174         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
15175         IS_UNCHECKED_EXPRESSION_P.
15176         (check_thrown_exceptions_do): Changed leading comment. Resolve and
15177         layout argument exception type.
15178         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
15179         of IS_UNCHECKED_EXPRESSION_P.
15180
15181 1998-11-18  Anthony Green  <green@cygnus.com>
15182
15183         * jcf-parse.c (yyparse): Open class file in binary mode.
15184
15185 1998-11-15  Per Bothner  <bothner@cygnus.com>
15186
15187         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
15188
15189         * jcf-write.c (perform_relocations):  Move check out one loop.
15190
15191 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
15192
15193         * Make-lang.in: Fix reference to srcdir.
15194         * jv-scan.c: Add missing xmalloc prototype.
15195         * jvgenmain.c: Ditto.
15196
15197 1998-11-15  Per Bothner  <bothner@cygnus.com>
15198
15199         * decl.c (error_mark_node), java-tree.h:  New global.
15200         * parse.y:  Use empty_stmt_node instead of size_zero_node.
15201         (build_if_else_statement):  If missing else, use empty_stmt_node.
15202
15203         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
15204         (java_complete_expand_method):  Complain if return is missing.
15205         (java_check_regular_methods):  Comment out incorrect error check.
15206         (not_accessible_p):  Fix incorrect handling of protected methods.
15207         (patch_method_invocation):  Pass correct context to not_accessible_p.
15208         (find_applicable_accessible_methods_list):  Likewise.
15209         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
15210         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
15211         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
15212         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
15213
15214         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
15215         (push_int_const):  Remove reundant NOTE_PUSH.
15216         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
15217         (- case SWITCH_EXPR):  Fix code generation bug.
15218         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
15219         (generate_classfile):  More robust for abstract methods.
15220
15221 1998-11-15  Anthony Green  <green@cygnus.com>
15222
15223         * Makefile.in: jv-scan and jvgenmain all require libiberty.
15224         * Make-lang.in: Ditto.
15225
15226         * jv-scan.c: Remove xmalloc and xstrdup definitions.
15227         * jvgenmain: Ditto.
15228
15229 1998-11-15  Per Bothner  <bothner@cygnus.com>
15230
15231         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
15232
15233         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
15234
15235 1998-11-14  Per Bothner  <bothner@cygnus.com>
15236
15237         Allow uses of interface types to verify.  This is not really
15238         type-safe, but it matches what Sun does, and is OK as long as
15239         there are appropriate run-time checks.
15240         * verify.c (merge_types):  If merging two interface types,
15241         just set the result to java.lang.Object.
15242         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
15243
15244 1998-11-13  Tom Tromey  <tromey@cygnus.com>
15245
15246         * gjavah.c (main): Handle --output-class-directory argument.
15247         * jvspec.c (lang_specific_driver): Translate `-d' into
15248         -foutput-class-dir.
15249         * jcf.h (jcf_write_base_directory): Declare.
15250         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
15251         * lang-options.h: Mention -foutput-class-dir.
15252         * jcf-write.c (jcf_write_base_directory): New global.
15253         (make_class_file_name): Put generated .class file into `-d'
15254         directory, or into source directory if -d not given.  Function now
15255         static.
15256         (write_classfile): Free class file name.  Handle case where class
15257         file name is NULL.
15258         (DIR_SEPARATOR): New macro.
15259         Include <sys/stat.h>
15260
15261         * Makefile.in (prefix): New macro.
15262
15263 1998-11-12  Per Bothner  <bothner@cygnus.com>
15264
15265         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
15266         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
15267         here (done in patch_invoke instead).
15268         (case_identity):  Moved here from parse.y.
15269
15270         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
15271         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
15272         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
15273         so they can be efficiently scanned without recursion.
15274         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
15275         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
15276         in BLOCK iteratively, rather than recursively.
15277
15278         * parse.y (do_unary_numeric_promotion):  New function.
15279         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
15280
15281         * parse.y (patch_newarray):  Various fixes.
15282
15283         Re-do handling of switch statements (for proper block scoping).
15284         * parse.y:  Add just a single block for the enture switch block,
15285         but don't create any "case blocks".
15286         (group_of_labels):  Rmeoved unneeded non-terminal.
15287         CASE_EXPR and DEFAULT_EXPR are added to current block.
15288         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
15289         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
15290         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
15291         * parse.y (wfl_operator, print_int_node): Make non-static.
15292         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
15293         as part of recursive scan of block.
15294         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
15295         (patch_switch_statement):  Most tests move dinto java_complete_tree.
15296
15297         * parse.y:  Make various production be non-typed (void).
15298         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
15299         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
15300         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
15301
15302         * jcf-write.c (struct jcf_handler):  New type.
15303         (struct jcf_switch_state):  New type.
15304         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
15305         (alloc_handler, emit_unop, emit_reloc):  New functions.
15306         (adjust_typed_op):  Add extra parameter ("max type" offset).
15307         (emit_switch_reloc, emit_case-reloc):  New function.
15308         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
15309         (generate_bytecode_insns):  Support REAL_CST, switch statements,
15310         exception handling, method calls, object/array creation, and more.
15311
15312         * class.c:  Remove some unused variables.
15313         * constants.c (find_string_constant):  New function.
15314         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
15315         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
15316         if flag_emit_class_files.
15317
15318 1998-11-12  Tom Tromey  <tromey@cygnus.com>
15319
15320         * jcf-io.c (find_class): Added explanatory comment.
15321
15322         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
15323         trailing slash to `.zip' entries.
15324
15325         * jvspec.c (lang_specific_driver): Correctly handle case where
15326         GC_NAME not defined.
15327
15328 1998-11-11  Tom Tromey  <tromey@cygnus.com>
15329
15330         * jvspec.c (GC_NAME): New define.
15331         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
15332         if required.
15333         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
15334
15335 1998-11-11  Per Bothner  <bothner@cygnus.com>
15336
15337         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
15338
15339 1998-11-11  Tom Tromey  <tromey@cygnus.com>
15340
15341         * jcf-dump.c (main): Correctly recognize `--'-style long options.
15342
15343 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15344
15345         * class.c (is_compiled_class): Call safe_layout_class for class
15346         compiled from source.
15347         * conver.h (convert_to_integer, convert_to_real,
15348         convert_to_pointer): Added prototypes.
15349         * decl.c (init_decl_processing): Non longer push the decls of
15350         `methodtable', `constants', `Class', `Field', `dispatchTable'
15351         `jexception' and `Method'.
15352         * expr.c (build_invokeinterface): New function.
15353         (expand_invoke): static variable CLASS_IDENT now in
15354         build_invokeinterface. Use build_invokeinterface.
15355         (expand_java_field_op): Moved code to inline
15356         java.lang.PRIMTYPE.TYPE into a function.
15357         (build_primtype_type_ref): New function.
15358         * java-tree.def (INSTANCEOF_EXPR): New tree code.
15359         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
15360         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
15361         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
15362         (DECL_LOCAL_STATIC_VALUE): New macro.
15363         (build_invokeinterface, build_primtype_type_ref): New function
15364         prototypes.
15365         (java_parse_abort_on_error): Macro rewritten.
15366         * jcf-parse.c (current_method): Add comment to declaration.
15367         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
15368         Function prototypes fixed.
15369         (jcf_parse_source): push/pop parser context. save/restore global.
15370         (parse_source_file): Fixed leading comment. Now take a
15371         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
15372         classes and pop the parser context anymore.
15373         (yyparse): Push parser context, save globals, parse the source
15374         file, restore globals and pop the parser context when processing a
15375         source file.
15376         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
15377         * lex.c (java_parse_doc_section): New function.
15378         (java_lex): Call java_parse_doc_section when appropriate. Build an
15379         operator around INSTANCEOF_TK.
15380         * lex.h (java_lineterminator, java_sprint_unicode,
15381         java_unicode_2_utf8, java_lex_error, java_store_unicode):
15382         Prototypes rewritten.
15383         (java_parse_escape_sequence, java_letter_or_digit_p,
15384         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
15385         java_read_unicode, java_store_unicode, java_read_char,
15386         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
15387         Added function prototypes.
15388         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
15389         define.
15390         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
15391         New macros
15392         (struct parser_ctxt): New fields: deprecated,
15393         current_parsed_class_un, gclass_list.
15394         (fix_method_argument_names, issue_warning_error_from_context,
15395         resolve_package, lookup_package_type): New function prototypes.
15396         (resolve_expression_name): Fixed function prototype.
15397         (find_applicable_accessible_methods_list): Fixed indentation, added
15398         extra argument in prototype.
15399         (check_final_assignment, build_null_of_type, check_deprecation,
15400         check_method_redefinition, reset_method_name,
15401         java_check_regular_methods, java_check_abstract_methods,
15402         maybe_build_primttype_type_ref): New function prototype.
15403         * parse.y (conver.h): Include.
15404         (INSTANCEOF_TK): Tagged <operator>.
15405         (single_type_import_declaration): Use REGISTER_IMPORT macro.
15406         (relational_expression:): Build binop for instanceof.
15407         (java_push_parser_context): Remember ctxp->gclass_list across
15408         contexts.
15409         (java_pop_parser_context): Simply return if no context
15410         exists. Remember gclass_list across contexts.
15411         (issue_warning_error_from_context): New function.
15412         (parse_error_context): Don't setup ctxp->elc here. Call
15413         issue_warning_error_from_context instead.
15414         (parse_warning_context): Likewise.
15415         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
15416         setup. Link new class/interface to ctxp->gclass_list.
15417         (add_superinterfaces): Register interface as incomplete if not
15418         loaded.
15419         (create_class): Remember class unqualified name in
15420         ctxp->current_parsed_class_un. Check class deprecation.
15421         (register_fields): Check field deprecation. Remember static final
15422         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
15423         processing INIT.
15424         (method_header): New local variable ORIG_ARG. Use unqualified
15425         current class name for check on constructor errors. Promote return
15426         type if of record type. Argument list fix moved in
15427         fix_method_argument_names, called here. Check method deprecation.
15428         (fix_method_argument_names): New function.
15429         (method_declarator): Promote record typed arguments.
15430         (safe_layout_class): Check class methods before layout.
15431         (java_complete_class): Compute field layout when patched.
15432         (do_resolve_class): Try to load class after having it renamed
15433         after the package name.
15434         (get_printable_method_name): Use DECL_CONTEXT.
15435         (reset_method_name): New function.
15436         (check_method_redefinition): Use reset_method_name.
15437         (java_check_regular_methods): New local variable
15438         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
15439         names for error report. Check for compile-time error when method
15440         found has default (package) access.
15441         (java_check_abstract_methods): Now takes an interface DECL node as
15442         an argument. Also reinstall real name on unchecked
15443         overriding/hiding methods for error report.
15444         (java_check_methods): Fixed leading comment. Get classes to verify
15445         from ctxp->gclass_list. Use CHECK_METHODS macro and set
15446         CLASS_METHOD_CHECKED_P on class verification.
15447         (lookup_java_method2): Get real method name if necessary.
15448         (find_in_imports): Don't check package class access here.
15449         (resolve_package, lookup_package_type): New functions.
15450         (java_layout_classes): Fixed leading comment. Take classes to be
15451         laid out from ctxp->gclass_list.
15452         (java_complete_expand_methods): Don't expand native and abstract
15453         methods.
15454         (java_expand_classes): New function.
15455         (resolve_expression_name): Use additional argument ORIG.  Retrieve
15456         values of static final field of primitive types.
15457         (resolve_field_access): Handles static final field of promotive
15458         type.
15459         (resolve_qualified_expression_name): Handle STRING_CST as
15460         primaries and package name resolution. Check deprecation on found
15461         decls. Set where_found and type_found on non static field resolved
15462         during qualification. Layout non primitive field decl types.
15463         (check_deprecation): New function.
15464         (maybe_access_field): Simplified.
15465         (patch_method_invocation_stmt): Local variable CLASS_TYPE
15466         removed. Reverse method's argument when primary is a type. Don't
15467         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
15468         instead. Include abstract class in the list of class searchable
15469         for constructors. Use DECL_CONTEXT of found method for access
15470         checks. Check method deprecation.
15471         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
15472         converting arguments. Handle INVOKE_INTERFACE.
15473         (lookup_method_invoke): Search constructor using existing
15474         infrastructure (don't rely on lookup_java_constructor anymore).
15475         (find_applicable_accessible_methods_list): Extra argument flag
15476         LC. Now include constructor in the search.
15477         (qualify_ambiguous_name): Conditional expression are primaries.
15478         (not_initialized_as_it_should_p): static final are always
15479         initialized.
15480         (java_complete_tree): Pass extra NULL argument to
15481         resolve_expression_name. Stricter test to carry on patching
15482         assignments. New case for INSTANCEOF_EXPR.
15483         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
15484         (check_final_assignment, maybe_build_primttype_type_ref): New
15485         functions.
15486         (patch_assignment): Detect resolved static finals and carry normal
15487         assignment error check on them. Inline PRIMTYPE.TYPE read access.
15488         (try_builtin_assignconv): Access constant 0 on all primitive
15489         types.
15490         (valid_builtin_assignconv_identity_widening_p): Accept identical
15491         types. Accept all promoted type on int type.
15492         (valid_ref_assignconv_cast_p): Accept a null pointer to be
15493         assigned to a reference.
15494         (valid_method_invocation_conversion_p): Accept to check null
15495         pointers.
15496         (build_binop): Merge declaration and initialization of local
15497         variable BINOP.
15498         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
15499         numeric types. Improved validity test for qualify operators on
15500         references.
15501         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
15502         and PREINCREMENT_EXPR. Also detect resolved static finals of a
15503         primitive type and issue the appropriate error message.
15504         (resolve_type_during_patch): Mark class loaded when resolved.
15505         (patch_cast): Allow null to be cased to reference types.
15506         (build_null_of_type): New function.
15507         (patch_array_ref): Handle array on references correctly.
15508         (patch_return): Removed unused local variable MODIFY. Force
15509         boolean to be returned as integers. Allows null to be returned by
15510         a function returning a reference.
15511         * typeck.c (convert_to_integer, convert_to_real,
15512         convert_to_pointer): Prototypes moved to convert.h
15513         (lookup_argument_method): Use method real name, if necessary.
15514
15515 1998-10-30  Tom Tromey  <tromey@cygnus.com>
15516
15517         * class.c (build_class_ref): Changed name of primitive classes to
15518         start with `_Jv_'.
15519
15520         * class.c (make_class_data): Renamed fields: nmethods to
15521         method_count, method_count to dtable_method_count.  Always set
15522         `state' field to 0.
15523         * decl.c (init_decl_processing): Likewise.
15524
15525 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15526
15527         * class.c (layout_class): Don't mangle <finit>, produce
15528         __finit<class> instead. Don't verify artificial methods.
15529         * decl.c (finit_identifier_node): New declared global.
15530         (init_decl_processing): finit_identifier_node initialized.
15531         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
15532         * java-tree.h (finit_identifier_node): Declared as extern.
15533         (struct lang_decl): New field called_constructor.
15534         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
15535         (CLASS_HAS_FINIT_P): New macro.
15536         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
15537         explicit constructor invocation.
15538         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
15539         CALL_SUPER_CONSTRUCTOR_P): New macros.
15540         (write_classfile): Added prototype.
15541         * jcf-parse.c (jcf_parse_source): Parse and remember for
15542         generation if the file was seen on the command line.
15543         (parse_source_file): Don't write the class file here.
15544         (yyparse): Loop on files rewritten. Set current_jcf.
15545         (parse_zip_file_entries): Parse class file only if it was found.
15546         * lang.c (init_parse): Don't open command line provided filename
15547         here.
15548         (lang_parse): Don't set main_jcf anymore.
15549         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
15550         (JCONSTRUCTOR_CHECK): New macro.
15551         (JBSC_TYPE_P): New macro.
15552         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
15553         (COMPLETE_CHECK_OP_2): New macro.
15554         (struct parse_ctxt): New field explicit_constructor_p.
15555         (check_class_interface_creation): Fixed prototype indentation.
15556         (patch_method_invocation_stmt): Prototype reflects added argument.
15557         (patch_invoke): Likewise.
15558         (complete_method_declaration, build_super_invocation,
15559         verify_constructor_circularity,
15560         build_this_super_qualified_invocation, get_printable_method_name,
15561         patch_conditional_expr, maybe_generate_finit, fix_constructors,
15562         verify_constructor_super, create_artificial_method,
15563         start_artificial_method_body, end_artificial_method_body,
15564         generate_field_initialization_code): New function prototypes.
15565         * parse.y: Fixed leading comment
15566         (constructor_header:, constructor_body:, block_end:): Rules tagged
15567         <node>.
15568         (type_declaration:): Call maybe_generate_finit.
15569         (method_declaration:): Action for method_body: placed in new
15570         function complete_method_declaration, called here.
15571         (constructor_declaration:): Defined actions. Removed leading
15572         FIXME.
15573         (constructor_header:): New rule with action.
15574         (constructor_body:): Rule rewritten using block_begin: and
15575         block_end:. Defined actions.
15576         (constructor_declarator:, explicit_constructor_invocation:):
15577         Defined actions.
15578         (block:): Use new rules block_begin: block_end:.
15579         (block_begin:, block_end:): New rules and actions.
15580         (block_statements:): Fixed error message for explicit
15581         constructors.
15582         (method_invocation:): Call build_this_super_qualified_invocation
15583         if primary is `this' or `super' was seen.
15584         (conditional_expression:): Action defined.
15585         (extra_ctxp_pushed_p): New static global flag.
15586         (java_parser_context_save_global): Create parser context if
15587         necessary. Use extra_ctxp_pushed_p to remember it.
15588         (java_parser_context_restore_global): Pop extra parser context if
15589         one exists.
15590         (build_array_from_name): Array on primitive types are marked
15591         loaded.
15592         (register_fields): Restore new name in field initializer
15593         expression if type was altered. Non static fields initialized upon
15594         declaration marked initialized.
15595         (maybe_generate_finit): New function.
15596         (maybe_generate_clinit): Use create_artificial_method,
15597         start_artificial_method_body, end_artificial_method_body. Generate
15598         debug info for enclosed initialization statements.
15599         (method_header): Fixed leading comment. Check constructor
15600         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
15601         accordingly.
15602         (complete_method_declaration, constructor_circularity_msg,
15603         verify_constructor_circularity): New functions.
15604         (get_printable_method_name): New function.
15605         (check_method_redefinition): Don't rename <finit> methods. Fix
15606         declared constructor names. Error message for
15607         constructors modified.
15608         (java_check_regular_methods): Local variable seen_constructor
15609         renamed saw_constructor. Skip verification on constructors. Create
15610         default constructor with create_artificial_method.
15611         (java_check_methods): Removed unnecessary empty line.
15612         (create_artificial_method, start_artificial_method_body,
15613         end_artificial_method_body): New functions.
15614         (java_layout_classes): Changed leading comment. Reverse fields
15615         list if necessary. Always layout java.lang.Object if being
15616         defined.
15617         (java_complete_expand_methods): Verify constructor circularity.
15618         (java_complete_expand_method): Call fix_constructor on
15619         constructors.  Local variable no_ac_found removed. Restore
15620         bindings if method body expansion failed.
15621         (fix_constructors, verify_constructor_super,
15622         generate_field_initialization_code): New function.
15623         (java_expand_classes): Fixed leading comment. Write class file
15624         here.
15625         (resolve_expression_name): Check for illegal instance variable
15626         usage within the argument scope of an explicit constructor
15627         invocation.
15628         (resolve_qualified_expression_name): Pass extra from_super flag
15629         when invoking patch_method_invocation_stmt. New case for
15630         conditional expression when used as a primary. Check for error
15631         when acquiring super.
15632         (patch_method_invocation_stmt): Added extra argument super. New
15633         local variable is_static_flag. Set class_to_search according to
15634         the nature of the constructor invocation. Don't add `this'
15635         argument when expanding NEW_CLASS_EXPR. Check for illegal method
15636         invocation within the argument scope of explicit constructor
15637         invocation. Set is_static according to is_static_flag. Provide
15638         extra `super' argument to patch_invoke invocation.
15639         (patch_invoke): New argument from_super. Loop on arguments
15640         indentation fixed. Pass from_super to invocation_mode. New switch
15641         case INVOKE_SUPER. Fixed error message in switch default case.
15642         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
15643         value.
15644         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
15645         (lookup_method_invoke): Fixed prototypes in candidates list. Error
15646         message takes constructors into account.
15647         (find_applicable_accessible_methods_list): Fixed indentation.
15648         (qualify_ambiguous_name): Take explicit constructor invocation
15649         into account. Deal with a conditional expression as a primary to
15650         a method call.
15651         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
15652         case. Added extra argument to patch_method_invocation_stmt.
15653         Register calls made to explicit constructor `this'. Don't call
15654         save_expr in ARRAY_REF case when emitting class files. Check for
15655         illegal use of this when expanding explicit constructor invocation
15656         arguments.
15657         (complete_function_arguments): Set and reset parser context
15658         explicit_constructor_p field value when appropriate.
15659         (build_super_invocation, build_this_super_qualified_invocation):
15660         New functions.
15661         (patch_assignment): Fixed typo.
15662         (patch_unaryop): Check on final fields occurs only when a decl
15663         exits.
15664         (patch_return): Take constructors into account.
15665         (patch_conditional_expr): New function.
15666         * typeck.c (build_java_signature): Removed unnecessary empty line.
15667
15668 1998-10-28  Jeffrey A Law  (law@cygnus.com)
15669
15670         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
15671
15672 1998-10-28  Tom Tromey  <tromey@cygnus.com>
15673
15674         * decl.c (init_decl_processing): Renamed fields.
15675         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
15676         interface_len, msize fields.
15677
15678         * class.c (make_class_data): Removed subclass_head and
15679         subclass_next fields.
15680         * decl.c (init_decl_processing): Removed subclass_head and
15681         subclass_next fields.
15682
15683 1998-10-28  Jeffrey A Law  (law@cygnus.com)
15684
15685         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
15686         * mangle.c (emit_unicode_mangled_name): Similarly.
15687
15688 1998-10-26  Nick Clifton  <nickc@cygnus.com>
15689
15690         * jcf-parse.c (get_constant): Place braces around code to compute
15691         'd' when REAL_ARITHMETIC is not defined.
15692
15693 1998-10-25  H.J. Lu  (hjl@gnu.org)
15694
15695         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
15696         dependency.
15697
15698 1998-10-23  Tom Tromey  <tromey@cygnus.com>
15699
15700         * lang-specs.h: `.zip' files are input to jc1.
15701
15702 1998-10-22  Per Bothner  <bothner@cygnus.com>
15703
15704         * jvspecs.c:  Add (but don't enable) support for combining multiple
15705         .class and .java input filenames to a single jc1 invocation.
15706         Add support for -C flag (copile to .class files).
15707         Translate -classpath and -CLASSPATH arguments.
15708         * lang-specs.h:  Don't set %2 spec.
15709
15710 1998-10-22  Tom Tromey  <tromey@cygnus.com>
15711
15712         * jcf-path.c (add_entry): Don't add trailing separator if entry is
15713         a .zip file.
15714         (add_path): Don't add trailing separator to non-empty path
15715         elements.
15716
15717         * lang.c (lang_decode_option): Check for -fclasspath and
15718         -fCLASSPATH before examining other `-f' options.
15719
15720         * java-tree.h (finalize_identifier_node): Don't declare.
15721         * class.c (make_class_data): Don't push "final" field.
15722         * decl.c (init_decl_processing): Don't push "final" field.
15723         (finalize_identifier_node): Removed.
15724         (init_decl_processing): Don't set finalize_identifier_node.
15725
15726         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
15727
15728 1998-10-11  Anthony Green  <green@cygnus.com>
15729
15730         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
15731         (JV_SCAN_SOURCES): New macro.
15732         (JCF_DUMP_SOURCES): Likewise.
15733         (jcf-dump$(exeext)): New target.
15734         (jv-scan$(exeext)): New target.
15735
15736 1998-10-22  Tom Tromey  <tromey@cygnus.com>
15737
15738         * Makefile.in (LEX): Removed.
15739         (LEXFLAGS): Likewise.
15740         (SET_BISON): New macro.
15741         (BISON): Removed.
15742         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
15743         spurious diffs in parse.c.
15744         ($(PARSE_SCAN_C)): Likewise.
15745         (PARSE_DIR): New macro.
15746         (PARSE_C): Use it.
15747         (PARSE_SCAN_C): Likewise.
15748         (PARSE_RELDIR): New macro.
15749
15750         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
15751
15752         * jcf-io.c (find_class): Use saw_java_source to determine when to
15753         look for `.java' file.
15754         * jcf-parse.c (saw_java_source): New global.
15755         (yyparse): Set it if `.java' file seen.
15756
15757         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
15758         (GCJH_SOURCES): Likewise.
15759         * Makefile.in (datadir): New macro.
15760         (libjava_zip): Likewise.
15761         (JAVA_OBJS): Added jcf-path.o.
15762         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15763         (../gcjh$(exeext)): Likewise.
15764         (jcf-path.o): New target.
15765         * java-tree.h (fix_classpath): Removed decl.
15766         * jcf-parse.c (fix_classpath): Removed.
15767         (load_class): Don't call fix_classpath.
15768         * parse.y (read_import_dir): Don't call fix_classpath.
15769         * lex.h: Don't mention classpath.
15770         * lex.c (java_init_lex): Don't initialize classpath.
15771         * jcf-io.c (classpath): Removed global.
15772         (find_class): Use jcf_path iteration functions.  Correctly search
15773         class path for .java file.
15774         (open_in_zip): New argument `is_system'.
15775         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
15776         classpath-related options.
15777         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
15778         and -I.
15779         (lang_init): Call jcf_path_init.
15780         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
15781         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
15782         Correctly put braces around second string in each entry.
15783         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
15784         classpath-related options.
15785         (help): Updated for new options.
15786         * jcf.h: Declare functions from jcf-path.c.  Don't mention
15787         `classpath' global.
15788         * jcf-path.c: New file.
15789
15790         * jcf-depend.c: Include jcf.h.
15791
15792         * jcf-write.c (localvar_alloc): Returns `void'.
15793         (localvar_free): Removed unused variable.
15794
15795         * lang.c (OBJECT_SUFFIX): Define if not already defined.
15796         (init_parse): Use OBJECT_SUFFIX, not ".o".
15797
15798 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15799
15800         * class.c (emit_register_classes): Renamed from
15801         emit_register_class.
15802         * java-tree.h (emit_register_classes): Prototype renamed from
15803         emit_register_class.
15804         * jcf-parse.c (yyparse): Call emit_register_classes once before
15805         returning.
15806         * parse.y (java_expand_classes): No longer register classes.
15807
15808 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15809
15810         * class.c (is_compiled_class): New local variable
15811         seen_in_zip. Identify classes found in currently compiled source
15812         file(s).
15813         * decl.c (complete_start_java_method): Fixed typo.
15814         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
15815         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
15816         (CLASS_P): Moved around.
15817         (java_parse_abort_on_error): Macro moved from jcf-parse.c
15818         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
15819         java-tree.h
15820         (jcf_parse_source): Changed leading comment. Removed unnecessary
15821         fclose and CLASS_FROM_SOURCE_P marking.
15822         (parse_source_file): New local variables remember_for_generation
15823         and filename. Mark parsed file name identifier node. Removed block
15824         executed when parse_only was null. Set remember_for_generation.
15825         Use it as an argument to java_pop_parser_context.
15826         (yyparse): New local variables several_files, list, next node and
15827         current_file_list. Split ampersand separated file names into
15828         current_file_list. Iterate through the list and parse accordingly.
15829         * parse.h (java_pop_parser_context): New function prototype.
15830         * parse.y (ctxp_for_generation): New static global variable.
15831         (java_pop_parser_context): New argument generate. Link popped ctxp
15832         to ctxp_for_generation list accordingly.
15833         (java_complete_expand_methods): Fixed indentation.
15834         (java_expand_classes): New function.
15835
15836 1998-10-17  Per Bothner  <bothner@cygnus.com>
15837
15838         * Makefile.in:  Link with libiberty.a instead of memmove.o.
15839
15840 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15841
15842         * lex.c (setjmp.h): No longer included.
15843         * lex.h (setjmp.h): Included.
15844         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
15845         (duplicate_declaration_error_p): Renamed from
15846         duplicate_declaration_error.
15847         (build_array_from_name): New function prototype.
15848         * parse.y (setjmp.h): No longer included.
15849         (variable_declarator_id): Define action.
15850         (build_array_from_name): New function.
15851         (duplicate_declaration_error_p): Renamed from
15852         duplicate_declaration_error.  Fixed leading comment.
15853         (register_fields): Main `for' loop reorganized. Uses
15854         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
15855         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
15856         build_array_from_name.
15857         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
15858         types.
15859         (read_import_dir): Don't try to skip `.' and `..'.
15860         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
15861         build_array_from_name. Main `for' loop reorganized.
15862         (resolve_qualified_expression_name): When building access to a
15863         field, use the type where the field was found, not its own type.
15864         (maybe_access_field): Use field DECL_CONTEXT if the type where the
15865         field was found is null.
15866         (qualify_ambiguous_name): Sweep through all successive array
15867         dimensions.
15868
15869 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15870
15871         * java-tree.h (pop_labeled_block, lang_printable_name,
15872         maybe_add_interface, set_super_info, get_access_flags_from_decl,
15873         interface_of_p, inherits_from_p, fix_classpath,
15874         complete_start_java_method, emit_handlers, init_outgoing_cpool,
15875         make_class_data, register_class, alloc_name_constant): New
15876         function prototypes.
15877         * lang.c (lang_decode_option): Set argc argument unused. Fixed
15878         indentation. Added cast to remove warning.
15879         (lang_printable_name): Set v argument unused.
15880         (lang_print_error): Added argument to lang_printable_name call.
15881         (java_dummy_print, print_lang_decl, print_lang_type,
15882         print_lang_identifier, lang_print_xnode): All argument marked
15883         unused.
15884         * lex.c (java_unget_unicode): Removed unnecessary argument.
15885         (java_allocate_new_line): Unused local variable is gone.
15886         (java_read_char): Added parenthesis in expressions to remove
15887         warnings.  Added final return statement.
15888         (java_read_unicode): Added parenthesis in expression to remove
15889         warning.
15890         (java_parse_end_comment): Fixed java_unget_unicode invocation.
15891         (java_parse_escape_sequence): Likewise.
15892         (java_lex): Unused local variables are gone. Fixed
15893         java_unget_unicode invocation.
15894         * lex.h (set_float_handler): Prototype added when JC1_LITE not
15895         defined.
15896         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
15897         lang_printable_name invocation in macro.
15898         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
15899         Likewise.
15900         (duplicate_declaration_error): Suppressed unused argument in
15901         prototype.
15902         (identical_subpath_p): Function declaration is gone.
15903         (patch_invoke): Suppressed unused argument in prototype.
15904         (patch_cast, build_labeled_block, check_thrown_exceptions):
15905         Likewise.
15906         * parse.y (setjmp.h): Included
15907         (toplev.h): Likewise.
15908         (field_declaration:): Suppressed unused local
15909         (label_decl:): Fixed build_labeled_block invocation.
15910         (java_pop_parser_context): Put extra parenthesis around assignment
15911         in if.
15912         (yyerror): Suppressed unused local variables.
15913         (variable_redefinition_error): Fixed lang_printable_name
15914         invocation.
15915         (create_interface): Suppressed unused local variables.
15916         (create_class): Likewise.
15917         (duplicate_declaration_error): Suppressed unused argument. Fixed
15918         lang_printable_name invocation.
15919         (register_fields): Suppressed unused local variable. Fixed
15920         duplicate_declaration_error invocation.
15921         (method_header): Suppressed unused local variable.
15922         (method_declarator, parser_check_super): Likewise.
15923         (java_complete_class): Suppressed unused local variable. Fixed
15924         fatal error message.
15925         (complete_class_report_errors): Added default: in switch.
15926         (java_check_regular_methods): Fixed lang_printable_name
15927         invocations.
15928         (check_throws_clauses): Likewise.
15929         (java_check_abstract_methods): Suppressed unused local
15930         variable. Fixed lang_printable_name invocation.
15931         (read_import_entry): Added supplemental return statement.
15932         (read_import_dir): Suppressed unused local variables.
15933         (check_pkg_class_access, declare_local_variables): Likewise.
15934         (source_start_java_method): Suppressed unused extern variable
15935         declarations
15936         (expand_start_java_method): Suppressed unused extern and local
15937         variable declarations.
15938         (java_complete_expand_methods): Likewise.
15939         (java_complete_expand_method): Suppressed unused local variables.
15940         (make_qualified_name): Likewise.
15941         (resolve_qualified_expression_name): Added default: in
15942         switch. Fixed lang_printable_name invocation.
15943         (class_instance_creation_expression): Added parenthesis around
15944         expressions.
15945         (patch_method_invocation_stmt): Fixed lang_printable_name and
15946         patch_invoke invocations.
15947         (check_for_static_method_reference): Fixed lang_printable_name
15948         invocation.
15949         (patch_invoke): Suppressed unused arguments and local variables.
15950         (lookup_method_invoke): Suppressed unused local variables.
15951         (qualify_ambiguous_name): Added default: in switch.
15952         (identical_subpath_p): Function removed.
15953         (patch_assignment): Suppressed unused local variables. Suppressed
15954         unnecessary if statement. Fixed lang_printable_name invocations.
15955         (try_builtin_assignconv): Fixed lang_printable_name invocations.
15956         (valid_ref_assignconv_cast_p): Parenthesis around
15957         expression. Suppressed unused local variables.
15958         (build_binop): Suppressed unused local variables. fixed
15959         lang_printable_name invocations.
15960         (string_constant_concatenation): Suppressed unused local
15961         variables.
15962         (patch_unaryop): Fixed lang_printable_name invocation.
15963         (patch_cast): Suppressed unnecessary argument. Fixed
15964         lang_printable_name invocation.
15965         (patch_array_ref): Fixed lang_printable_name invocation.
15966         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
15967         (build_labeled_block): Suppressed unused argument.
15968         (generate_labeled_block): Fixed build_labeled_block invocation.
15969         (build_loop_body): Suppressed unused local variables.
15970         (patch_loop_statement): Likewise.
15971         (patch_exit): Fixed lang_printable_name invocation.
15972         (patch_switch_statement): Likewise.
15973         (case_identity): First argument marked unused.
15974         (patch_try_statement): Fixed lang_printable_name invocations.
15975         (patch_synchronized_statement, patch_throw_statement): Likewise.
15976         (check_thrown_exceptions): Fixed check_thrown_exceptions and
15977         lang_printable_name invocations.
15978         (check_thrown_exceptions_do): Suppressed unused argument.
15979
15980 1998-10-14  Tom Tromey  <tromey@cygnus.com>
15981
15982         * jcf-write.c (write_classfile): Add output class file as target.
15983         * lang-options.h: Added -MD, -MMD, -M, and -MM.
15984         * jcf.h: Added declarations for dependency-tracking functions.
15985         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
15986         * lang.c (lang_decode_option): Recognize -MD and -MMD.
15987         (finish_parse): Call jcf_dependency_write.
15988         (dependency_tracking): New global.
15989         (DEPEND_SET_FILE): New define.
15990         (DEPEND_ENABLE): New define.
15991         (init_parse): Enable dependency tracking if required.
15992         Include "flags.h".
15993         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
15994         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15995         (../gcjh$(exeext)): Likewise.
15996         (jcf-depend.o): New target.
15997         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
15998         (GCJH_SOURCES): Likewise.
15999         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
16000         dep_name argument.
16001         (find_classfile): Added dep_name argument.
16002         (find_class): Compute name of dependency.
16003         (open_in_zip): Call jcf_dependency_add_file.
16004         * gjavah.c (output_file): No longer global.
16005         (usage): Don't mention "gjavah".
16006         (help): Likewise.
16007         (java_no_argument): Likewise.
16008         (version): Likewise.
16009         (main): Recognize and handle -M family of options.
16010         (print_mangled_classname): Return is void.
16011         (process_file): Handle case where output is suppressed.
16012         (HANDLE_END_FIELD): Likewise.
16013         (HANDLE_METHOD): Likewise.
16014         * jcf-depend.c: New file.
16015
16016 1998-10-13  Jeffrey A Law  (law@cygnus.com)
16017
16018         * java-tree.def: Add missing newline at EOF.
16019
16020 1998-10-13  Tom Tromey  <tromey@cygnus.com>
16021
16022         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
16023         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
16024         function.
16025         Include <config.h> and "system.h".
16026         (disassemble_method): Undefine RET to avoid clash with
16027         config/i386/i386.h.
16028
16029 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16030
16031         * decl.c (runtime_exception_type_node, error_exception_type_node):
16032         New global variables.
16033         (init_decl_processing): Initialized.
16034         * expr.c (java_lang_expand_expr): Set caught exception type to
16035         null if catch handler argument doesn't exit.
16036         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
16037         tree codes.
16038         * java-tree.h (runtime_exception_type_node,
16039         error_exception_type_node): Global variables declared.
16040         (DECL_FUNCTION_THROWS): New macro.
16041         (DECL_FUNCTION_BODY): Modified comment.
16042         (DECL_SPECIFIC_COUNT): Likewise.
16043         (struct lang_decl): New field throws_list.
16044         (IS_UNCHECKED_EXPRESSION_P): New macro.
16045         * lex.c (java_lex): Generate location information for THROW_TK.
16046         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
16047         EXCEPTIONS_P): New macros.
16048         (enum jdep_code): New value JDEP_EXCEPTION.
16049         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
16050         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
16051         PATCH_METHOD_RETURN_ERROR): New macros.
16052         (patch_method_invocation_stmt): Added new argument to prototype.
16053         (patch_synchronized_statement, patch_throw_statement,
16054         check_thrown_exceptions, check_thrown_exceptions_do,
16055         purge_unchecked_exceptions, check_throws_clauses): New function
16056         prototypes.
16057         * parse.y Fixed typo in keyword section.
16058         (throw:): Rule tagged <node>.
16059         (THROW_TK): Keyword tagged <operator>.
16060         (method_header:): Last argument to call to method_header passed
16061         from throws: rule.
16062         (throws:, class_type_list:, throw_statement:,
16063         synchronized_statement:, synchronized:): Defined actions.
16064         (method_header): New local variable current. Register exceptions
16065         from throws clause.
16066         (java_complete_tree): Complete and verify exceptions from throws
16067         clause.
16068         (complete_class_report_errors): Error message on exceptions not
16069         found
16070         (java_check_regular_methods): Fixed typo. Shortcut on private
16071         overriding methods. Changed error message on method
16072         redefinition. Check for throws clause compatibility.
16073         (check_throws_clauses): New function.
16074         (java_check_abstract_methods): Use DECL_NAME for wfl or current
16075         method. Changed error message on method redefinition.
16076         (currently_caught_type_list): New static variable.
16077         (java_complete_expand_methods): Purge unchecked exceptions from
16078         throws clause list. Call PUSH_EXCEPTIONS before walk and
16079         POP_EXCEPTIONS after.
16080         (resolve_qualified_expression_name): Pass new argument as NULL to
16081         patch_method_invocation_stmt.
16082         (patch_method_invocation_stmt): New argument ref_decl. Invoke
16083         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
16084         argument list when appropriate. Use new argument if non null to
16085         store selected method decl.
16086         (patch_invoke): Convert if necessary args of builtin types before
16087         forming CALL_EXPR. Argument list no longer reversed here.
16088         (invocation_mode): Treat final methods as static methods.
16089         (java_complete_tree): New cases for THROW_EXPR: and
16090         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
16091         function call.
16092         (complete_function_arguments): No more RECORD_TYPE
16093         conversion. Function parameter nodes no longer saved.
16094         (valid_ref_assignconv_cast_p): Avoid handling null type.
16095         (patch_binop): Fixed null constant reference handling.
16096         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
16097         BUILD_THROW macros.
16098         (patch_try_statement): Fixed comments. Record caught types in
16099         list, push the list, expand try block and pop the list.
16100         (patch_synchronized_statement, patch_throw_statement,
16101         check_thrown_exceptions, check_thrown_exceptions_do,
16102         purge_unchecked_exceptions): New functions.
16103         * typeck.c (lookup_argument_method): Allow WFL in place of method
16104         DECL_NAME during method definition check
16105
16106 1998-10-09  Tom Tromey  <tromey@cygnus.com>
16107
16108         * gjavah.c (decode_signature_piece): New function.
16109         (print_c_decl): Use it.  Added `name_override' argument.
16110         (print_method_info): Use name_override argument to print_c_decl.
16111         (seen_fields): Removed.
16112         (print_field_info): Don't update seen_fields.
16113         (struct method_name): New structure.
16114         (method_name_list): New global.
16115         (print_method_info): Add new method to list of methods.
16116         (name_is_method_p): New function.
16117         (print_field_info): If field name has same name as method, then
16118         change field name.
16119         (process_file): Parse methods before fields.
16120         (field_pass): New global.
16121         (HANDLE_END_FIELD): Take field_pass into account.
16122
16123 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16124
16125         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
16126         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
16127
16128 1998-10-03  Anthony Green  <green@cygnus.com>
16129
16130         * jvspec.c: Fix bug in jvgenmain_spec patch.
16131
16132 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16133
16134         * Makefile.in (lang.o:): Install dependency on java-tree.def.
16135         * decl.c (soft_exceptioninfo_call_node): New global variable.
16136         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
16137         takes extra integer argument. soft_exceptioninfo_call_node
16138         initialized.
16139         * except.c (java_set_exception_lang_code): New function
16140         (method_init_exceptions): Called here.
16141         (prepare_eh_table_type): New function.
16142         (expand_end_java_handler): Called here.
16143         * expr.c (build_java_throw_out_of_bounds_exception): Now features
16144         one argument. Modified generation of call to
16145         soft_badarrayindex_node to use new argument.
16146         (build_java_arrayaccess): Pass faulty index value to
16147         build_java_throw_out_of_bounds_exception.
16148         (generate_name): New function.
16149         (java_lang_expand_expr): New local variables node, current,
16150         has_finally_p. Expand TRY_EXPR node.
16151         (process_jvm_instruction): Replace top of the stack with thrown
16152         object reference when entering exception handler.
16153         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
16154         specific tree codes.
16155         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
16156         global.
16157         (DECL_SPECIFIC_COUNT): New macro.
16158         (prepare_eh_table_type, java_set_exception_lang_code,
16159         generate_name): New function declarations.
16160         (match_java_method): Declaration deleted.
16161         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
16162         macros.
16163         * lex.c (TRY_TK, CATCH_TK): Generate location information.
16164         * parse.h (redefinition_error, refine_accessible_methods_list,
16165         can_cast_to_p): Function declaration removed.
16166         (classitf_redefinition_error, variable_redefinition_error,
16167         parse_jdk1_1_error, find_applicable_accessible_methods_list,
16168         find_most_specific_methods_list, argument_types_convertible,
16169         enter_a_block, valid_builtin_assignconv_identity_widening_p,
16170         valid_cast_to_p, valid_method_invocation_conversion_p,
16171         try_reference_assignconv, add_stmt_to_compound,
16172         build_jump_to_finally, build_tree_list, patch_try_statement,
16173         java_get_catch_block): New function declarations.
16174         * parse.y (string_buffer_type): Global variable deleted.
16175         (group_of_labels, catches, catch_clause, catch_clause_parameter,
16176         finally): Rules tagged <node>.
16177         (TRY_TK, CATCH_TK): Token tagged <operator>.
16178         (class_body_declaration:, class_member_declaration:,
16179         formal_parameter:, explicit_constructor_invocation:,
16180         interface_member_declaration:, constant_declaration:,
16181         primary_no_new_array:, class_instance_creation_expression:,
16182         array_creation_expression:): Issue error on unsuported JDK1.1
16183         features.
16184         (try_statement:, catches:, finally:): Define actions.
16185         (catch_clause_parameter): New rule.
16186         (catch_clause:): Use new rule catch_clause_parameter.
16187         (parse_jdk1_1_error): New function.
16188         (redefinition_error): Renamed classitf_redefinition_error.
16189         (variable_redefinition_error): New function.
16190         (check_class_interface_creation): Call
16191         classitf_redefinition_error.
16192         (java_complete_tree): Added error message on JDEP_TYPE: case.
16193         (complete_class_report_errors): Fixed indentation.
16194         (declare_local_variables): Call variable_redefinition_error.
16195         (source_end_java_method): Call java_set_exception_lang_code and
16196         emit_handlers where appropriate.
16197         (java_method_add_stmt): Call add_stmt_to_block.
16198         (add_stmt_to_block): New function.
16199         (lookup_method_invoke): Fixed outside comment. new local variable
16200         candicates.  Call find_applicable_accessible_methods_list and
16201         find_most_specific_methods_list when searching for a
16202         method. Modified error report to list possible candidates when
16203         applicable.
16204         (find_applicable_accessible_methods_list,
16205         find_most_specific_methods_list, argument_types_convertible): New
16206         function.
16207         (refine_accessible_methods_list): Function deleted.
16208         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
16209         expr (if applicable) before calling patch_array_ref.
16210         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
16211         (enter_block): Fixed comment.
16212         (enter_a_block): New function.
16213         (patch_assignment): Reorganized. Call try_reference_assignconv for
16214         references. Call valid_cast_to_p instead of can_cast_to_p.
16215         (try_reference_assignconv,
16216         valid_builtin_assignconv_identity_widening_p): New functions.
16217         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
16218         (valid_cast_to_p, valid_method_invocation_conversion_p): New
16219         functions.
16220         (build_string_concatenation): Don't resolve StringBuffer.
16221         (patch_cast): Fixed inverted arguments.
16222         (patch_array_ref): Code to save array expr deleted. Call
16223         valid_cast_to_p instead of can_cast_to_p.
16224         (generate_labeled_block): Call generate_name.
16225         (build_jump_to_finally, build_try_statement, java_get_catch_block,
16226         patch_try_statement): New functions.
16227         * typeck.c (match_java_method): Function deleted.
16228
16229 1998-10-02  Anthony Green  <green@cygnus.com>
16230
16231         * jvspec.c: jvgenmain_spec uses different temporary file names.
16232
16233 1998-10-02  Anthony Green  <green@cygnus.com>
16234
16235         * jvspec.c (lang_specific_driver): Fail if user specifies
16236         --main= when not linking.
16237
16238 1998-09-28  Tom Tromey  <tromey@cygnus.com>
16239
16240         * class.c (make_class_data): Push value for `thread' field.
16241         * decl.c (init_decl_processing): Added `thread' field to class.
16242
16243         * class.c (add_field): Always make static fields externally
16244         visible.
16245
16246 1998-09-26  Anthony Green  <green@cygnus.com>
16247
16248         * expr.c (build_java_athrow,
16249         build_java_throw_out_of_bounds_exception, expand_invoke,
16250         build_newarray, expand_java_multianewarray, build_java_monitor):
16251         Update comments to reflect _Jv_* function names.
16252
16253 1998-09-25  Per Bothner  <bothner@cygnus.com>
16254
16255         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
16256         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
16257         * parse.y (expand_start_java_method):  Likewise.
16258
16259 1998-09-24  Per Bothner  <bothner@cygnus.com>
16260
16261         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
16262
16263         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
16264         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
16265         * expr.c:  Remove no-longer-needed calls to promote_type.
16266         * decl.c (give_name_to_locals):  Liekwise.
16267         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
16268         * parse.y:  Add/remove promote_type calls as appropriate.
16269         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
16270         (parse_signature_string):  Likewise.
16271         (build_java_array_type):  Fix for now signature convenions.
16272
16273         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
16274
16275 1998-09-23  Tom Tromey  <tromey@cygnus.com>
16276
16277         * class.c (init_class_processing): libjava function renamed to
16278         _Jv_RegisterClass.
16279
16280 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16281
16282         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
16283         * java-tree.def: Fixed DEFTREECODE third argument.
16284         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
16285         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
16286         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
16287         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16288         JAVA_THIS_EXPR): Now replaced by tree code definitions.
16289         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
16290         * lang.c (java_tree_code_type, java_tree_code_length,
16291         java_tree_code_name): New arrays.
16292         (lang_init): Append Java tree node definitions to Gcc ones.
16293         * lex.c (expression_obstack): Declared as extern when JC1_LITE
16294         defined.
16295         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
16296         wfl_to_string.
16297         (java_lex): Allow declaration of empty string constants. Retain
16298         location information on CASE_TK and DEFAULT_TK.
16299         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
16300         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
16301         Modified to be more robust.
16302         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
16303         (build_new_invocation, try_builtin_assignconv,
16304         patch_switch_statement, string_constant_concatenation,
16305         build_string_concatenation, patch_string_cst, patch_string,
16306         java_expand_switch): New function declarations.
16307         * parse.y: Rules related to switch and EH tagged <node>.
16308         (label_id): Set to NULL_TREE
16309         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
16310         tree nodes.
16311         (this_or_super:): Fixed indentation.
16312         (statement:, statement_nsi:, statement_without_trailing_substatement:,
16313         statement_expression:): Removed call to RULE on all sub-rules.
16314         (switch_expression:, switch_labels:): New rules.
16315         (switch_statement:, switch_block:, switch_block_statement_groups:,
16316         switch_block_statement_group:, switch_labels:, switch_label:):
16317         Defined actions.
16318         (throw_statement:, synchronized_statement:, try_statement:):
16319         Defined temporary actions.
16320         (class_instance_creation_expression:): Call
16321         build_new_invocation. Fixed indentation.
16322         (field_access): Fixed indentation.
16323         (method_invocation): Likewise.
16324         (make_qualified_primary): Use THIS_EXPR.
16325         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
16326         resolving from SUPER, set *type_found.
16327         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
16328         (java_complete_tree): Removed unused local variable `location'. Case
16329         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
16330         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
16331         on MODIFY_EXPR: and all binary operator tree code cases. Removed
16332         STRING_CST: case. default: checks for patchable strings.
16333         (complete_function_arguments): Transform string constant or
16334         crafted StringBuffer if necessary.
16335         (build_method_invocation): Fixed comments.
16336         (build_new_invocation): New function.
16337         (patch_assignment): Call try_builtin_assignconv to figure a valid
16338         assignment conversion between builtin types.
16339         (try_builtin_assignconv): New function.
16340         (build_binop): Use URSHIFT_EXPR directly to call build.
16341         (operator_string): Use UNARY_PLUS_EXPR.
16342         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
16343         operator.
16344         (do_merge_string_cste, merge_string_cste,
16345         string_constant_concatenation, build_string_concatenation,
16346         patch_string, patch_string_cst): New function.
16347         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
16348         (patch_unaryop): Likewise. New test of valid ++/-- operands.
16349         (build_newarray_node): Use NEW_ARRAY_EXPR.
16350         (build_this): Use THIS_EXPR.
16351         (build_return): Enable debug information on return statement.
16352         (build_if_else_statement): Likewise.
16353         (complete_labeled_statement): Fixed related comment.
16354         (build_loop_body): Fixed comment.
16355         (build_bc_statement): Enable debug information on break/continue
16356         statements.
16357         (patch_bc_statement): Fixed typos. Handle SWITCH statement
16358         context.
16359         (patch_switch_statement, case_identity, java_expand_switch): New
16360         functions.
16361
16362 1998-09-21  Per Bothner  <bothner@cygnus.com>
16363
16364         * buffer.h (BUFFER_INIT):  New macro.
16365         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
16366         Pass (struct jcf_partial *state) to most functions.
16367         (jcf_block, jcf_relocation):  New types.
16368         Support labels, branches, conditionals, loops.
16369
16370 1998-09-21  Tom Tromey  <tromey@cygnus.com>
16371
16372         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
16373
16374 1998-09-21  Per Bothner  <bothner@cygnus.com>
16375
16376         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
16377         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
16378         not integer_type_node (INT_TYPE_SIZ bits).
16379
16380         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
16381
16382         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
16383         * jcf-dump.c (print_exception_table):  New function.
16384         (disassemble_method):  Better handling of wide instructions.
16385         Make more robust for bad input.
16386
16387 1998-09-30  Jeffrey A Law  (law@cygnus.com)
16388
16389         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
16390         FreeBSD.
16391
16392 1998-09-17  Jeffrey A Law  (law@cygnus.com)
16393
16394         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
16395
16396 1998-09-17  Tom Tromey  <tromey@cygnus.com>
16397
16398         * Makefile.in ($(PARSE_H)): Removed target.
16399
16400 1998-09-17  Jeffrey A Law  (law@cygnus.com)
16401
16402         * Makefile.in (JAVA_OBJS): Add memmove.o
16403         (memmove.o): New target & rules.
16404
16405 1998-09-15  Tom Tromey  <tromey@cygnus.com>
16406
16407         * expr.c (expand_invoke): Don't generate a call to the class init
16408         code.
16409
16410 1998-09-14  Jeffrey A Law  (law@cygnus.com)
16411
16412         * Makefile.in: Add many missing dependencies.
16413         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
16414         as appropriate.
16415         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
16416         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
16417
16418 1998-09-11  Per Bothner  <bothner@cygnus.com>
16419
16420         * decl.c (complete_start_java_method):  If method is static (and
16421         not private) call _Jv_InitClass.
16422         * expr.c (expand_invoke):  Don't call build_class_init.
16423
16424         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
16425
16426 1998-09-10  Jeffrey A Law  (law@cygnus.com)
16427
16428         * Make-lang.in (GCJ): Define before using.
16429
16430 1998-09-09  Jeffrey A Law  (law@cygnus.com)
16431
16432         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
16433         losing due to namespace pollution in GNU getopt.h
16434
16435 1998-09-09  Tom Tromey  <tromey@cygnus.com>
16436
16437         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
16438         (java.all.cross): Likewise.
16439         (java.rest.encap): Likewise.
16440
16441 1998-09-08  Jeffrey A Law  (law@cygnus.com)
16442
16443         * gjavah.c (print_class_decls): Fix thinko in arglist
16444         * jcv-io.c (find_classfile): Similarly.
16445
16446 1998-09-07  Jeffrey A Law  (law@cygnus.com)
16447
16448         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
16449
16450 1998-09-05  Tom Tromey  <tromey@cygnus.com>
16451
16452         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
16453         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
16454         * Makefile.in (PARSE_C): New macro.
16455         (PARSE_H): Likewise.
16456         (PARSE_SCAN_C): Likewise.
16457         ($(PARSE_C)): Target renamed from parse.c.
16458         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
16459         (clean): Remove parse-scan.c as well.
16460         (parse.o): Depend on $(PARSE_C).
16461
16462 1998-09-05  Anthony Green  <green@cygnus.com>
16463
16464         * README, license.terms: Removed.
16465
16466         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
16467         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
16468         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
16469         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
16470         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
16471         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
16472         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
16473         and Java trademark attribution.
16474
16475 1998-09-04  Tom Tromey  <tromey@cygnus.com>
16476
16477         * Makefile.in: Use gcjh, not gjavah.
16478         * config-lang.in (stagestuff): Use gcjh, not gjavah.
16479         * Make-lang.in: Changed gjavah to gcjh everywhere.
16480
16481 1998-09-03  Per Bothner  <bothner@cygnus.com>
16482
16483         * gjavah.c:  Support new -prepend -add -append flags.
16484         (print_method_info):  Method is not virtual if class is final.
16485
16486 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16487
16488         * jv-scan.c: Fixed copyright assignment.
16489         * keyword.gperf: Likewise.
16490         * keyword.h: Likewise.
16491         * lex.c: Fixed copyright assignment.
16492         (java_lex): Push unicode back when parsing '<'.
16493         * lex.h: Fixed copyright assignment.
16494         * parse-scan.y: Likewise.
16495         * parse.h: Fixed copyright assignment.
16496         (build_debugable_stmt, complete_for_loop): New function prototypes.
16497         * parse.y: Fixed copyright assignment.
16498         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
16499         size_zero_node when completing a loop with no exit condition.
16500         (for_statement_nsi:): Define action.
16501         (for_init:, for_update:): Return size_zero_node when empty.
16502         (declare_local_variables): Call build_debugable_stmt.
16503         (build_debugable_stmt): New function.
16504         (build_loop_body): Build debugable statement around loop
16505         condition part.
16506         (complete_loop_body): Take into account the debugable statement
16507         around the EXIT_EXPR.
16508         (complete_loop_body): New function.
16509         (patch_exit_expr): Fixed condition inversion.
16510
16511 1998-09-02  Tom Tromey  <tromey@cygnus.com>
16512
16513         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
16514         name of thread define.
16515         * jvspec.c (THREAD_NAME): New macro.
16516         (GCLIB): Likewise.
16517         (THREADLIB): Likewise.
16518         (lang_specific_driver): Recognize attempt to link with thread
16519         library or gc library.  Recognize -ljava on command line so it
16520         isn't linked against more than once.
16521
16522 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16523
16524         * parse-scan.y (report_main_declaration): Name of the class
16525         containing `main' can be a qualified name.
16526
16527 1998-08-31  Tom Tromey  <tromey@cygnus.com>
16528
16529         * config-lang.in: Changed gjavac to gjc everywhere.
16530         * Make-lang.in: Changed gjavac to gjc everywhere.
16531
16532 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16533
16534         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
16535         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
16536         and install the files.
16537         * Makefile.in (JAVA_OBJS_LITE): New variable.
16538         (compiler:): Now include jv-scan as a dependency.
16539         (../jv-scan$(exeext), parse-scan.c): New targets.
16540         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
16541         * config-lang.in (compilers): Removed gcj, gjavah from the list.
16542         * jcf-parse.c (parse_source_file): Call java_layout_classes and
16543         check for errors even if parse_only.
16544         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
16545         defined.
16546         (yylex): New function. Uses java_lex body.
16547         (java_lex): Removed commented out statement. Remove local variable
16548         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
16549         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
16550         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
16551         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
16552         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
16553         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
16554         where appropriate.
16555         (java_lex_error): Empty if JC1_LITE is defined.
16556         (java_get_line_col): Return 0 if JC1_LITE is defined.
16557         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
16558         SET_MODIFIER_CTX): Moved into the section containing the macros
16559         conditionally defined by JC1_LITE.
16560         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
16561         argument if JC1_LITE is defined.
16562         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
16563         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
16564         is defined.
16565         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
16566         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
16567         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
16568         to different values according to JC1_LITE.
16569         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
16570         declared if JC1_LITE set.
16571         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
16572         defined if JC1_LITE not set.
16573         (struct parser_ctx): Reorganized and skip the jc1 front end part
16574         if JC1_LITE set.
16575         (java_layout_classes): New function definition.
16576         (java_push_parser_context, java_init_lex, yyparse, yylex,
16577         yyerror): Prototype always declared. All other static function
16578         prototypes declared only if JC1_LITE is not set.
16579         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
16580         declared in parse.h.
16581         (java_layout_classes): New function.
16582         (java_complete_expand_methods): No longer layout the class here.
16583         * parse-scan.y: New file.
16584         * jv-scan.c: New file.
16585
16586 1998-08-25  Tom Tromey  <tromey@cygnus.com>
16587
16588         * gjavah.c (main): Handle -friend option.
16589         (friend_specs): New global.
16590         (generate_access): Handle friend_specs.
16591         (process_file): Likewise.
16592         (MAX_FRIENDS): New macro.
16593         (friend_count): New global.
16594         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
16595         Changed all callers.
16596
16597 1998-08-24  Per Bothner  <bothner@cygnus.com>
16598
16599         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
16600         (main):  Handle processing all the entries of a named .zip archive.
16601         * jcf-io.c (jcf_trim_old_input):  New function.
16602         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
16603
16604 1998-08-24  Per Bothner  <bothner@cygnus.com>
16605
16606         * lang.c (flag_assume_compiled):  Make default be on.
16607
16608 1998-08-21  Per Bothner  <bothner@cygnus.com>
16609
16610         * jcf-dump.c:  Add bunches of flags to control output more.
16611         (process_class):  New function;  support printing more than one class.
16612         (main): Support new --print-main and --javap flags.
16613         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
16614         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
16615
16616 1998-08-20  Per Bothner  <bothner@cygnus.com>
16617
16618         Change mangling of dispatch table to match C++ vtable (w/thunks).
16619         * class.c (build_dtable_decl), java-tree.h:  New function.
16620         (make_class_data):  Call it.
16621         * decl.c (init_decl_processing):  Likewise.
16622
16623 1998-08-19  Warren Levy  <warrenl@cygnus.com>
16624
16625         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
16626         soft_anewarray; adjust args passed.
16627         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
16628         match _Jv_NewObjectArray.
16629
16630 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16631
16632         * decl.c (push_labeled_block, pop_labeled_block): New functions.
16633         * expr.c (loopup_label): Call create_label_decl.
16634         (create_label_decl): New function.
16635         (java_lang_expand_expr): Call expand_start_bindings with argument
16636         set to zero.
16637         * java-tree.h Added space after PROTO in function declarations
16638         when necessary.
16639         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
16640         (create_label_decl, push_labeled_block): New function
16641         declarations.
16642         * lex.c (label_id): Initialize.
16643         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
16644         switch.
16645         * parse.h Added space after PROTO in function declarations when
16646         necessary.
16647         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
16648         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
16649         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
16650         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
16651         macros.
16652         (struct parser_ctxt): New fields current_loop,
16653         current_labeled_block.
16654         (build_if_else_statement, patch_if_else_statement,
16655         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
16656         generate_labeled_block, complete_labeled_statement,
16657         build_bc_statement, patch_bc_statement, patch_loop_statement,
16658         build_new_loop, build_loop_body, complete_loop_body): New function
16659         declarations.
16660         * parse.y (java_warning_count): New global variable.
16661         (label_id): New static variable.
16662         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
16663         (block:): Return size_zero_node when block is empty.
16664         (empty_statement:): Return size_zero_node.
16665         (statement:): Implement supplemental action when for_statement: is
16666         reduced.
16667         (label_decl:): New rule.
16668         (labeled_statement:): Rewritten using label_decl. Actions
16669         implemented.
16670         (labeled_statement_nsi:): Likewise.
16671         (if_then_statement): Actions implemented.
16672         (while_expression): New rule.
16673         (while_statement:): Rewritten using while_expression. Actions
16674         implemented.
16675         (while_statement_nsi:): Likewise.
16676         (do_statement_begin:): New rule.
16677         (do_statement:): Rewritten using do_statement_begin. Actions
16678         implemented.
16679         (for_statement:): Rewritten using for_begin. Actions implemented.
16680         (for_statement_nsi:): Likewise.
16681         (for_header:, for_begin:): New rules.
16682         (for_init:): Actions implemented.
16683         (statement_expression_list:, break_statement:,
16684         continue_statement:): Likewise.
16685         (yyerror): Count number of issued warning(s).
16686         (java_report_errors): Report error(s) and/or warning(s).
16687         (java_complete_class): Use build_java_argument_signature to
16688         recompute completed method signature.
16689         (java_check_regular_methods): New locals method_wfl and aflags.
16690         Use method_wfl instead of lookup_cl during error reports. Fixed
16691         indentation and modified some error messages. Use
16692         lang_printable_name in method instead of the DECL_NAME. New code
16693         to issue warnings on methods not overriding corresponding methods
16694         private to a different package.
16695         (java_method_add_stmt): Call add_stmt_to_compound.
16696         (add_stmt_to_compound): New function.
16697         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
16698         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
16699         (build_if_else_statement, patch_if_else_statement,
16700         build_labeled_block, generate_labeled_block,
16701         complete_labeled_statement, build_new_loop, build_loop_body,
16702         complete_loop_body, patch_loop_statement, build_bc_statement,
16703         patch_bc_statement, patch_exit_expr): New functions.
16704         * typeck.c (build_java_signature): Build argument signature before
16705         enclosing it in between parenthesis.
16706
16707 1998-08-17  Warren Levy  <warrenl@cygnus.com>
16708
16709         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
16710         (JAVA_OBJS): Added reminder comment
16711
16712 1998-08-13  Nick Clifton  <nickc@cygnus.com>
16713
16714         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
16715         be interpreted as a long long.
16716
16717 1998-08-13  Warren Levy  <warrenl@cygnus.com>
16718
16719         * decl.c (init_decl_processing): Use _Jv_InitClass, not
16720         soft_initialise_class.  Use _Jv_NewMultiArray, not
16721         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
16722         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
16723         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
16724         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
16725
16726 1998-08-12  Per Bothner  <bothner@cygnus.com>
16727
16728         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
16729         length_identifier_node):  New global tree node constants.
16730         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
16731         Replace uses by super_identifier_node etc.
16732         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
16733
16734         * parse.y (resolve_field_access):  Don't special-case ".length" if
16735         flag_emit_class_files.
16736         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
16737         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
16738         and ARRAY.length.
16739
16740 1998-08-11  Per Bothner  <bothner@cygnus.com>
16741
16742         * decl.c (init_decl_processing): Remove unused method_type_node fields.
16743         * class.c (make_method_value):  Remove init for removed fields.
16744
16745         * class.c (layout_class):  Use build_java_argument_signature.
16746         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
16747
16748         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
16749         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
16750         (build_java_signature):  Don't use push_java_argument_signature.
16751
16752         * typeck.c (lookup_argument_method):  New function.
16753         * parse.y (java_check_regular_methods):  Use lookup_argument_method
16754         instead of lookup_java_method2 followed by lookup_java_method.
16755
16756         * parse.y (check_method_redefinition):  Minor optimization.
16757
16758         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
16759         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
16760
16761 1998-08-10  Tom Tromey  <tromey@cygnus.com>
16762
16763         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
16764         c-pragma.o.
16765
16766         * gjavah.c (java_float_finite): Use K&R-style definition.
16767         (java_double_finite): Likewise.
16768         (generate_access): Now returns void.  Changed all callers.
16769         (last_access_generated): Removed.
16770         (process_file): Only make a single pass over the .class file.
16771
16772 1998-07-29  Per Bothner  <bothner@cygnus.com>
16773
16774         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
16775         for compatibility for G++ (with -fvtable-thunks).
16776         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
16777
16778         * gjavah.c (process_file):  Use public inheritance for super-class.
16779
16780 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16781
16782         * lex.c (java_init_lex): Initialize ctxp->package.
16783         * parse.h (struct parser_ctxt): package and package_len replaced
16784         by tree package, an identifier node. Field method_decl_list is
16785         gone. Fixed comments.
16786         (lookup_field_wrapper, merge_qualified_name, not_accessible,
16787         class_in_current_package): New function prototypes.
16788         * parse.y (array_type:): Set class loaded flag on primitive type
16789         arrays.
16790         (package_declaration:): Assign ctxp->package to the
16791         identifier node.
16792         (method_invocation:): Handle invocation of method qualified by
16793         `super'.
16794         (single_type_import_declaration:): Removed ambiguity check.
16795         (java_pop_parser_context): New local variable `next'. Reset and
16796         set IMPORT_CLASSFILE_NAME flags on current and previous import
16797         list.
16798         (java_accstring_lookup): Use new local macro COPY_RETURN.
16799         (lookup_field_wrapper): New function.
16800         (parser_qualified_classname): Use merge_qualified_name.
16801         (parser_check_super_interface): Broaden error message.
16802         (do_resolve_class): Check for qualified class name in the current
16803         compilation unit if appropriate.
16804         (process_imports): Check for already defined classes.
16805         (check_pkg_class_access): Got rid of call to
16806         get_access_flags_from_decl.
16807         (java_complete_expand_methods): Call safe_layout_class based on
16808         the current class size.
16809         (make_qualified_primary): Build a WFL qualification on primary if
16810         none exists.
16811         (merge_qualified_name): New function.
16812         (make_qualified_name): Use merge_qualified_name.
16813         (resolve_expression_name): Use safe_lookup_field.
16814         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
16815         (resolve_qualified_expression_name): Likewise. Check on resolved
16816         element accessibility.
16817         (not_accessible_p, class_in_current_package): New functions.
16818         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
16819         (patch_method_invocation_stmt): Merged common pieces. Check
16820         accessibility of invoked method.
16821         (check_for_static_method_reference): Add returned type in error
16822         message.
16823         (invocation_mode): Get rid of bogus check on PRIVATE methods.
16824         (refine_accessible_methods_list): Merged two conditions in test.
16825         (java_complete_class): Sanity check on stabilize_ref gone.
16826         * zextract.c (read_zip_archive): Cast lseek second argument to long.
16827
16828 1998-07-28  Per Bothner  <bothner@cygnus.com>
16829
16830         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
16831
16832 1998-07-24  Tom Tromey  <tromey@cygnus.com>
16833
16834         * gjavah.c (F_NAN): Removed.
16835         (F_NAN_MASK): New macro.
16836         (F_POSITIVE_INFINITY): Removed.
16837         (F_NEGATIVE_INFINITY): Likewise.
16838         (java_float_finite): Rewrote.
16839         (D_NAN_MASK): Renamed.
16840         (java_double_finite): Rewrote.
16841         (D_POSITIVE_INFINITY): Removed.
16842         (D_NEGATIVE_INFINITY): Likewise.
16843
16844         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
16845         If verbose, print underlying representation of value in hex.
16846
16847 1998-07-24  Per Bothner  <bothner@cygnus.com>
16848
16849         * buffer.h, buffer.c:  New files.
16850         * Makefile.in (JAVA_OBJS):  Add buffer.o.
16851
16852         Support locals variables and writing their debug entries to .class.
16853         * jcf-write.c:  Simplify some by user new buffer type.
16854         (vode_buffer_grow):  Removed.
16855         (struct localvar_info):  New type.
16856         (localsvars, localvartable):  New buffers.
16857         (localvar_alloc, localvar_free):  New functions.
16858         (generate_bytecode_insns):  Handle local variables.
16859         (generate_classfile):  Write LocalVariableTable attribute.
16860
16861 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16862
16863         * jcf-io.c (open_in_zip): Check the zipfile magic number.
16864         * zipfile.h (ZIPMAGIC): New macro.
16865
16866 1998-07-24  Tom Tromey  <tromey@cygnus.com>
16867
16868         * Makefile.in (gjavah.o): Updated dependencies.
16869         (jcf-dump.o): Likewise.
16870         (all.indirect): Use ../gjavah.
16871         (../gjavah$(exeext)): Likewise.
16872         (clean): Don't remove gjavah.
16873         (clean): Remove parse.c, not java/parse.c.
16874         * Make-lang.in (java): Added gjavah.
16875         (gjavah$(exeext)): New target.
16876         (GJAVAH_SOURCES): New macro.
16877         (java.all.build): Added gjavah.
16878         (java.all.cross): Likewise.
16879         (java.rest.encap): Likewise.
16880         * config-lang.in (compilers, stagestuff): Added gjavah.
16881
16882 1998-07-23  Tom Tromey  <tromey@cygnus.com>
16883
16884         * gjavah.c (java_float_finite): New function.
16885         (java_double_finite): Likewise.
16886         (F_POSITIVE_INFINITY): New macro.
16887         (F_NEGATIVE_INFINITY): Likewise.
16888         (F_NAN): Likewise.
16889         (D_POSITIVE_INFINITY): Likewise.
16890         (D_NEGATIVE_INFINITY): Likewise.
16891         (D_NAN): Likewise.
16892         (print_field_info): Use java_float_finite and java_double_finite.
16893
16894 1998-07-23  Per Bothner  <bothner@cygnus.com>
16895
16896         * parse.y (method_header):  Name "this" implicit argument.
16897
16898 1998-07-22  Per Bothner  <bothner@cygnus.com>
16899
16900         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
16901         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
16902         (put_linenumber):  New function.
16903         (generate_bytecode_insns, generate_classfile):  Write line numbers.
16904
16905 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16906
16907         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
16908         (lookup_name, build_known_method_ref, build_class_init,
16909         build_invokevirtual, invoke_build_dtable, match_java_method,
16910         build_field_ref, pushdecl_force_head, build_java_binop,
16911         binary_numeric_promotion, build_decl_no_layout,
16912         build_java_arrayaccess, build_newarray, build_anewarray,
16913         build_java_array_length_access, build_java_arraynull_check): New
16914         extern function prototypes.
16915         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16916         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
16917         java-tree.h.
16918         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
16919         to NULL
16920         * jcf.h (jcf_out_of_synch): New extern function prototype.
16921         * parse.h: Static/global function implemented in parse.y
16922         prototyped and declarations moved at the end of the file.
16923         (DECL_P): Check that the argument isn't null.
16924         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16925         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
16926         (QUAL_DECL_TYPE): New macro.
16927         (PARAMS): Macro definition removed.
16928         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
16929         (return_statement:): Call build_return.
16930         (field_access:): Call make_qualified_primary in sub rule.
16931         (method_invocation:): Build method invocation and call
16932         make_qualified_primary when processing primaries.
16933         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
16934         get_type_from_signature.
16935         (java_check_regular_method): Extra integer 0 argument when calling
16936         lookup_java_method2.
16937         (lookup_java_interface_method2): Extra method DECL argument when
16938         calling lookup_java_interface_method2.
16939         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
16940         COMPOUND_EXPR node.
16941         (java_complete_expand_method): Layout current class iff not
16942         already done. Don't process interface's methods.
16943         (java_complete_expand_method): Use super class only if it
16944         exists. Use current class otherwise.
16945         (make_qualified_primary): New function.
16946         (resolve_expression_name): Process qualified expression or
16947         expression from primary the same way.
16948         (resolve_expression_name): Two last arguments to
16949         resolve_field_access are now NULL_TREEs.
16950         (resolve_field_access): New variable is_static. Local field must
16951         be DECLs. is_static computed on field DECLs only. Append code in
16952         where_found to the field access if necessary. Use QUAL_DECL_TYPE
16953         to initialize field_type.
16954         (resolve_qualified_expression_name): New local variable,
16955         previous_call_static and is_static. Handle primaries with function
16956         calls, casts, array references and `this'. `super' now handled as
16957         `(super_class)this'. Use is_static to clarify boolean expressions.
16958         Added code to handle case where a proper handle is required to
16959         access a field. Use QUAL_DECL_TYPE where applicable.
16960         (maybe_access_field): New function.
16961         (patch_method_invocation_stmt): New arguments primary, where,
16962         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
16963         deleted. Use `where' as a type to search from if specified. Check
16964         for static method reference where forbidden. Append primary or
16965         current_this to the argument list if not calling constructor nor
16966         static methods.
16967         (check_for_static_method_reference): New function.
16968         (patch_invoke): Layout the class on which new is done if
16969         necessary.
16970         (lookup_method_invoke): Changed format to report errors on
16971         methods.
16972         (qualify_ambiguous_name): New local variable this_found. Now
16973         handle things from primaries. Method call are considered
16974         expression names.
16975         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
16976         changed into NULLs.
16977         (not_initialized_as_it_should_p): Comply with the new DECL_P.
16978         (java_complete_tree): New case fo RETURN_EXPR. Process function
16979         call arguments in separate function.
16980         (complete_function_arguments): New function.
16981         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
16982         anymore.
16983         (patch_assignment): Take the return function slot into account as
16984         a RHS. Distinguish assignment from a return.
16985         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
16986         when checking methods in interfaces.
16987         (resolve_type_during_patch): NULL argument to unresolve_type_p
16988         instead of NULL_TREE.
16989         (patch_newarray): Fixed typo in comment.
16990         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
16991         (build_return, patch_return): New functions.
16992         * typeck.c (lookup_java_constructor): Fixed typo in comment.
16993
16994 1998-07-21  Per Bothner  <bothner@cygnus.com>
16995
16996         * constants.c (find_name_and_type_constant, find_fieldref_index,
16997         find_methodref_index):  New methods.
16998         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
16999         just return given method.  Also, rename to build_known_method_ref.
17000         (expand_invoke):  Rename call to build_invoke_non_interface.
17001         * java-tree.h, parse.h:  Update prototype.
17002         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
17003         (such as expand_expr_stmt) if flag_emit_class_files.
17004         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
17005         STACK_TARGET, IGNORE_TARGET):  New macros.
17006         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
17007         (generate_bytecode_insn):  New function to generate method's bytecode.
17008         (generate_classfile):  Node generate Code attribute for a method.
17009         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
17010         push_long_const, field_op, adjust_typed_op, maybe_wide):
17011         New functions used by generate_bytecode_insn.
17012
17013         * typeck.c (signature_include_return):  Remove variable.
17014         (push_java_argument_signature, build_java_argument_signature):  New.
17015         (build_java_signature):  Use push_java_argument_signature.
17016         * parse.y:  Use build_java_argument_signature instead of fiddling
17017         with signature_include_return.
17018
17019 1998-07-17  Tom Tromey  <tromey@cygnus.com>
17020
17021         * gjavah.c (print_c_decl): Always generate JArray<>* for array
17022         types.
17023
17024         * Makefile.in (all.indirect): Added gjavah$(exeext).
17025         (gjavah$(exeext)): Added $(exeext).
17026         (clean): Likewise.
17027
17028 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17029
17030         * class.c (layout_class): Call to java_layout_parsed_class replace
17031         by safe_layout_class.
17032         * expr.c (build_java_array_length_access): Removed static storage
17033         class in the function definition.
17034         (build_java_arraynull_check): Likewise.
17035         Also fixed typos in two comments.
17036         * lex.c (java_init_lex): Initialize static global kw_length.
17037         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
17038         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
17039         java_lex_error.
17040         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
17041         * parse.h (resolve_no_layout): New static function declaration.
17042         (get_identifier_in_static): Declaration removed.
17043         (java_layout_parsed_class): Function name declaration changed to
17044         safe_layout_class.
17045         (build_newarray_node, patch_newarray, resolve_type_during_patch,
17046         not_initialized_as_it_should_p, build_this): New static function
17047         declarations.
17048         (pushdecl_force_head, build_java_binop, int_fits_type_p,
17049         binary_numeric_promotion, stabilize_reference,
17050         build_decl_no_layout, build_java_arrayaccess): Extern function
17051         declarations moved into their own section.
17052         (build_newarray, build_anewarray, build_java_array_length_access,
17053         build_java_arraynull_check): New extern function declarations.
17054         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
17055         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
17056         fake tree codes.
17057         (CALL_CONSTRUCTOR_P): New macro.
17058         * parse.y (kw_length): New static global tree node.
17059         (return_statement): Tagged <node>.
17060         (RETURN_TK): Tagged <operator>.
17061         (variable_declarator_id:): Build variable declaration with an
17062         empty initialization value if a syntax error was found in the
17063         initialization part of the variable declaration.
17064         (statement_without_trailing_substatement:): return_statement: now
17065         uses the default rule.
17066         (return_statement:): Temporarily fixed to return NULL_TREE.
17067         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
17068         (class_instance_creation_expression:): Class creation rules now
17069         call build_method_invocation upon reduction.
17070         (array_creation_expression:): Rules call build_newarray_node upon
17071         reduction.
17072         (dim_exprs:): Build a list of dimension expressions.
17073         (dim_expr:): Store location of the OSB_TK in the dimension
17074         expression node.
17075         (method_invocation:): Added a new error rule.
17076         (build_unresolved_array_type): WFL argument may also be an array
17077         on a primitive type. Name of the argument changed to reflect this.
17078         (method_declarator): Insert argument type at the beginning of the
17079         argument type list and later reverse the list.
17080         (unresolved_type_p): Argument 'returned' may be optionally
17081         NULL_TREE.
17082         (java_layout_class_from_source): Function renamed
17083         safe_layout_class.
17084         (resolve_and_layout): Now call resolve_no_layout and
17085         safe_layout_class.
17086         (resolve_no_layout): New function.
17087         (purify_type_name): New function.
17088         (complete_class_report_errors): Call purify_type_name during error
17089         report on a type not found.
17090         (process_imports): error_found local variable doesn't need to be
17091         initialized to zero.
17092         (declare_local_variables): New local type_wfl. Fixed typo in error
17093         message. type_wfl assigned to unresolved type and used to register
17094         incomplete type. Build a WFL around the variable initialization
17095         statement so that debug info can be generated on it.
17096         (source_start_java_method): Reverse argument list after they've
17097         been processed.
17098         (current_this): New static global variable.
17099         (java_complete_expand_methods): Set current_this when appropriate.
17100         (resolve_expression_name): Build correct static and non static
17101         field access bearing a simple name.
17102         (resolve_field_access): Resolve the length field of arrays. Handle
17103         f.m() cases.
17104         (patch_method_invocation_stmt): Set the type of the method
17105         invocation to error_mark_node. This value is later overridden by a
17106         valid type, if any. Don't handle qualified constructor invocation
17107         as qualified method invocation. Call lookup_method_invoke with its
17108         new flag. It's no longer necessary to access the selected method
17109         as the value of a tree list. Handle constructor invocation.
17110         (patch_invoke): Reverse argument list when invoking non interface
17111         methods. Insert call to new as the first argument of the
17112         constructor.
17113         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
17114         defined within a final class. Return INVOKE_STATIC if the invoked
17115         method is a constructor.
17116         (lookup_method_invoke): New lc argument is a flag to indicate a
17117         constructor lookup. Now handle constructor lookup. Choose the most
17118         specific method in case several were matching the invocation
17119         requirements. Return a method decl instead of a tree list featuring
17120         one single method decl element.
17121         (refine_accessible_methods_list): New lc flag argument to
17122         indicate that a constructor is being looked up.
17123         (not_initialized_as_it_should_p): New function.
17124         (java_complete_tree): Now process fake tree codes
17125         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
17126         save_expr on resolved function call arguments. Case on
17127         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
17128         (patch_assignment): LHS can be a field access expression. When
17129         dealing with reference, lhs_type is the promoted type of the
17130         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
17131         applicable.
17132         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
17133         (patch_binop): Use not_initialized_as_it_should_p where
17134         applicable.
17135         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
17136         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
17137         where applicable.
17138         (resolve_type_during_patch): New function.
17139         (patch_cast): Call resolve_type_during_patch to resolve type and
17140         report error accordingly.
17141         (patch_array_ref): Use not_initialized_as_it_should_p where
17142         applicable. Array base expression is saved before being
17143         used. Promote the type of an array elements if it contains non
17144         builtin types.
17145         (build_newarray_node, patch_newarray, build_this): New functions.
17146
17147 1998-07-16  Tom Tromey  <tromey@cygnus.com>
17148
17149         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
17150         increment it in `for' statement.
17151         (print_field_info): If number is inf or nan, don't print it.
17152         (print_method_info): If method name is `delete', just ignore it.
17153         (print_c_decl): Special-case jstringArray.
17154
17155         * gjavah.c (help): New function.
17156         (no_argument): New function.
17157         (usage): Changed text.
17158         (main): Rewrote argument handling.  Now handles -v, --help,
17159         --version.
17160         (version): New function.
17161         (found_error): New global.
17162         (main): Return found_error.
17163         (generate_access): Set found_error.
17164         (print_c_decl): Likewise.
17165
17166 1998-07-15  Tom Tromey  <tromey@cygnus.com>
17167
17168         * gjavah.c (print_c_decl): Don't print "," when examining field.
17169         Skip type name when looking at "[L" types.
17170         (process_file): Now static.
17171         (generate_access): Now returns int.
17172         (last_access_generated): New global.
17173         (process_file): Clear last_access_generated; make multiple passes
17174         over the class.
17175         (print_field_info): Just return if generate_access returns true.
17176         (print_method_info): Likewise.  Also, allow <init> functions to
17177         pass through.
17178         (print_c_decl): Added is_init argument.  Print constructors
17179         properly.
17180         (print_cxx_classname): Use UTF8_GET to extract characters from
17181         string.
17182         (print_base_classname): New function.
17183         (print_class_decls): New function.
17184         (process_file): Use it.
17185         (utf8_cmp): New function.
17186
17187 1998-07-13  Nick Clifton  <nickc@cygnus.com>
17188
17189         * lang-options.h: Format changed to match changes in gcc/toplev.c
17190         to implement a --help option.
17191
17192 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
17193
17194         * decl.c (init_decl_processing): Revert change to dtable_type.
17195
17196 1998-07-09  Per Bothner  <bothner@cygnus.com>
17197
17198         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
17199
17200 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
17201
17202         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
17203
17204         * lang.c (lang_init): Default flag_exceptions to 1, without
17205         checking to see if it's 2 first.
17206
17207 1998-07-08  Jeffrey A Law  (law@cygnus.com)
17208
17209         * constants.c: Include "system.h".
17210         * decl.c: Likewise.
17211         * lang.c (flag_new_exceptions): Get via extern now.
17212         (lang_init_options): New functions.  Turn on flag_new_exceptions.
17213
17214 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17215
17216         * lex.c (java_lex): Return 0 when we see an invalid character in
17217         the input.
17218
17219         * lex.c (java_read_char): Specify extra argument when calling
17220         java_lex_error.
17221         (java_read_unicode, java_parse_end_comment,
17222         java_parse_escape_sequence): Likewise,
17223         (java_lex): Specify extra argument when calling
17224         java_lex_error. Test that IDs are beginning with a legal character
17225         for IDs. Handle invalid characters with an error message and a
17226         call to java_lex_error.
17227         (java_lex_error): Adjust column position by new argument
17228         `forward'. Issue an error even if in the middle of reporting an
17229         other error.
17230
17231 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
17232
17233         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
17234         we don't explicitly put a null pointer when we're copying it.
17235
17236 1998-07-07  Tom Tromey  <tromey@cygnus.com>
17237
17238         * gjavah.c (print_cxx_classname): New function.
17239         (super_class_name): Likewise.
17240         (print_super_fields): Removed.
17241         (in_super): Removed.
17242         (print_field_info): Never generate #defines.
17243         (print_c_decl): Changed generated types to match JNI.  No longer
17244         print class name before method name.
17245         (print_method_info): Print "static" before static methods.
17246         Print "virtual" before non-final methods.
17247         (usage): Use exit(1), not exit(-1).
17248         (main): Likewise.
17249         (print_field_info): Use %.17g to print a double.
17250         (last_access): New globals.
17251         (process_file): Initialize last_access.
17252         (usage): Now static.
17253         (ACC_VISIBILITY): New define.
17254         (generate_access): New function.
17255         (print_field_info): Call it.
17256         (print_method_info): Likewise.  Also, generate information for all
17257         methods, not just native methods.  Return void.
17258         (print_c_decl): Return void.
17259         (print_field_info): Return void.
17260
17261 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17262
17263         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
17264         processing the jc1 grammar file. Prefix bison functions and
17265         variables with java_.
17266         (parse.c): Dependencies on parse.h and lex.h
17267         * expr.c (build_java_arrayaccess): Function now global.
17268         * java-tree.h: Comment reorganized to carry on previous
17269         classification effort.
17270         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
17271         RESOLVE_TYPE_NAME_P): New flags on WFLs.
17272         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
17273         java_parse (new prefix java_ generated by bison).
17274         (java_layout_parsed_class, java_register_parsed_class): Function
17275         call removed.
17276         (yyparse): Removed unnecessary call to init_outgoing_cpool.
17277         * lex.c (static tree wfl_op): Variable deleted.
17278         (java_init_lex): Initialize kw_super and kw_this. Initialize more
17279         ctxp fields to NULL_TREE.
17280         (java_lex): No longer create WFL for operators. Filename caching
17281         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
17282         created as STRING_CST and later expanded. Removed extra argument
17283         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
17284         and SUPER.
17285         (build_wfl_node): Removed code in comments.
17286         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
17287         store token and location data in the current bison token.
17288         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
17289         static/extern function declaration at the beginning of the file.
17290         (struct qualification): Data structure definition deleted.
17291         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
17292         (qualify_ambiguous_name): Function declaration modified. Function
17293         now returns nothing.
17294         (build_array_ref, patch_array_ref, make_qualified_name,
17295         resolve_qualified_expression_name, maybe_generate_clinit,
17296         resolve_field_access): New static function declarations.
17297         (build_java_arrayaccess): New extern function declaration.
17298         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
17299         (CALL_EXPR_PRIMARY): Macro deleted.
17300         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
17301         (struct parser_ctxt): Field initialized_final
17302         removed. non_static_initialized, static_initialized: New fields.
17303         * parse.y (static tree kw_super, static tree kw_this): New global
17304         static.
17305         (%union): tree wfl field of operator member replaced by int
17306         location. WFLs are non longer created for operators.
17307         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
17308         (qualified_name:): Now calls make_qualified_name to build the
17309         identifier.
17310         (type_declaration:): Consider generating <clinit> when class
17311         parsing completed.
17312         (variable_declarator:): Directly build an assignment node when the
17313         variable is initialized when declared.
17314         (this_or_super:): Build a WFL and set current location when THIS
17315         or SUPER are parsed.
17316         (expression_statement:): Wrap statement around a WFL.
17317         (primary_no_new_array:): Fixed typo. Changed value returned by
17318         THIS_TK because of its new type (temporary).
17319         (dim_exprs:): Temporary fix because of OSB_TK's new type.
17320         (field_access:): Build qualified name with SUPER.
17321         (method_invocation:): Fixed returned value because of SUPER's new
17322         type.
17323         (array_access:): Use OSB_TK location information.
17324         (post_increment_expression:, post_decrement_expression:,
17325         unary_expression:, pre_increment_expression:,
17326         pre_decrement_expression:, unary_expression_not_plus_minus:,
17327         cast_expression:, multiplicative_expression:,
17328         additive_expression:, shift_expression:, relational_expression:,
17329         equality_expression:, and_expression:, exclusive_or_expression:,
17330         inclusive_or_expression:, conditional_and_expression:,
17331         conditional_or_expression:, assignment:): Use new location/token
17332         information available on operators.
17333         (create_class): Set super_decl_type to NULL_TREE when processing
17334         java.lang.Object.
17335         (register_fields): Field initialization is now a MODIFY_EXPR
17336         node. Chain initialization code to the matching lists (according
17337         to the field declaration modifiers).
17338         (maybe_generate_clinit): New function.
17339         (method_header): Don't set method's DECL_NAME to a WFL when adding
17340         methods to java.lang.Object.
17341         (resolve_and_layout): Now can return NULL_TREE if the type
17342         resolution fails. Otherwise, return the class DECL instead of its
17343         TYPE.
17344         (check_method_redefinition): Don't patch method DECL_NAME if it
17345         belongs to java.lang.Object.
17346         (process_imports): Simply assign error_found to the value returned
17347         by check_pkg_class_access.
17348         (declare_local_variables): Don't use their init statements (if
17349         any) when parsing error were previously found. Reuse MODIFY_EXPR
17350         build during parsing as an init statement.
17351         (java_method_add_stmt): Now return the current method body.
17352         (java_layout_parsed_class, java_register_parsed_class): Functions
17353         removed.
17354         (java_complete_expand_methods): Initialize the constant pool on a
17355         per class basis. Layout the classes before expanding their method
17356         bodies. Don't try expand artificial constructor code if error were
17357         found. Make the classes data and register them if no error were
17358         found.
17359         (java_complete_expand_method): Retrieve an artificial constructor
17360         argument list before entering its body. Assign the top block to
17361         the artificial constructor function body and set types of declared
17362         blocks and compound statements to void. Walk method body if not an
17363         artificial constructor.
17364         (make_qualified_name, cut_identifier_in_qualified): New functions.
17365         (resolve_expression_name): Fixed comments. Save/restore the
17366         current class CLASS_LOADED_P flag value. Build non qualified
17367         static field access and handle qualified expression names.
17368         (resolve_field_access, resolve_qualified_expression_name): New
17369         functions.
17370         (patch_method_invocation_stmt): Use the new expression resolution
17371         scheme, calling resolve_field_access when the function call is
17372         resolved as an expression.
17373         (qualify_ambiguous_name): Function rewritten to work on qualified
17374         expression produced by make_qualified_name.
17375         (java_complete_tree): Promote type when function's argument are
17376         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
17377         the assignment to discover further errors if RHS is a expression
17378         name that fails to evaluate. Declare LHS initialized even though
17379         the assignment failed. Don't use the location variable and removed
17380         extra argument in patch function calls. Now handle the ARRAY_REF
17381         case and build internal string representation when STRING_CSTs are
17382         walked.
17383         (build_method_invocation): Don't wrap function call around a WFL.
17384         (build_assignment): Likewise. Use the operator location
17385         information.
17386         (patch_assignment): Handle array access LHSs. Handle error
17387         provenance, resulting in a better error report.
17388         (build_binop): Use op_location from operator as binop location
17389         information.
17390         (build_unaryop, build_incdec, build_cast): Likewise.
17391         (patch_binop): Extract location information from the node. Fixed
17392         typo in error message.
17393         (patch_unary_op): Extract location information from the node.
17394         (build_array_ref, patch_array_ref): New functions.
17395
17396 1998-07-01  Tom Tromey  <tromey@cygnus.com>
17397
17398         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
17399         match _Jv_IsInstanceOf.
17400         * decl.c (init_decl_processing): Use _Jv_NewArray, not
17401         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
17402
17403 1998-06-30  Tom Tromey  <tromey@cygnus.com>
17404
17405         * decl.c (init_decl_processing): Functions are now named
17406         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
17407
17408 1998-06-29  Per Bothner  <bothner@cygnus.com>
17409
17410         * java-tree.h (load_class):  Add prototype.
17411         * class.c (is_compiled_class):  Add missing arg to load_class.
17412         * expr.c (expand_java_NEW):  Call load_class.
17413         * parse.y (process_import):  Removed bogus use of void return value.
17414
17415 1998-06-25  Per Bothner  <bothner@cygnus.com>
17416
17417         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
17418         Function name is "_Jv_Throw" instead of "soft_athrow".
17419         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
17420         Function name is "_Jv_AllocObject" instead of "soft_new".
17421         Takes an extra parameter (object size).
17422         * expr.c:  Update calls.
17423
17424 1998-06-24  Per Bothner  <bothner@cygnus.com>
17425
17426         * lex.c (java_get_line_col):  Handle end-of-file.
17427         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
17428
17429 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
17430
17431         * lang.c (lang_init): Make -fexceptions the default.
17432         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
17433         exception handling is not turned on.
17434
17435 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
17436
17437         * lang.c (flag_new_exceptions): Make this this default.
17438         * decl.c (end_java_method): Call emit_handlers.
17439         * except.c (method_init_exceptions): Set language code and version.
17440         (expand_start_java_handler): Enable exception, and call
17441         expand_eh_region_start.
17442         (expand_end_java_handler): Enable exception, and set up catch blocks.
17443         (emit_handlers): New routine to generate the saved handlers.
17444         * java-except.h (emit_handlers): Add prototype.
17445
17446 1998-06-12  Per Bothner  <bothner@cygnus.com>
17447
17448         We used to have three different representations of the constant pool:
17449         the CPool structure, the tree_constant_pool, and the constructures
17450         used to build the Class object (which may need class and string
17451         constants) in compiled code.  None were appropriate for compiling
17452         to .class files, so I did a major overhaul.
17453
17454         First, the tree_constant_pool array was removed.  Things were
17455         modified to the CPool structure in the JCF could be used.
17456         Second, a "capacity" field was added to the CPool, and functions
17457         written to search for a matching constant, adding one if not found.
17458         The code that generated the Class object was changed to use a CPool.
17459         The actual TREE_LISTs used to build the CONSTRUCTORs used for
17460         the static Class object are now only in build_constants_constructor.
17461         Finally, I wrote code which can generate a .class file (including its
17462         constant pool) from the RECORD_TYPE of a class.  This is a big step
17463         on the way to compiling Java source into .class files.
17464
17465         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
17466         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
17467
17468         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
17469         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
17470         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
17471         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
17472         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
17473         (lang_type):  Removed constant_pool field.
17474         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
17475         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
17476         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
17477         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
17478
17479         * constants.c (current_constant_pool_tags, current_constant_pool_data,
17480         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
17481         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
17482         (set_constant_entry, find_constant1, find_constant2,
17483         find_class_constant, count_constant_pool_bytes, write_constant_pool,
17484         find_utf8_constant, find_class_or_string_constant):  New functions.
17485
17486         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
17487         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
17488         (give_name_to_class, get_class_constant):  Likewise.
17489         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
17490         (get_name_and_type_constant, get_ref_constant):  Removed.
17491         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
17492         * parse.y:  Don't save/restore tree_constant_pool.
17493         * verify.c (verify_jvm_instructions):  Update for new approach.
17494         * expr.c (expand_invoke, expand_java_field_op): Likewise.
17495
17496         * lang-options.h:  Added -femit-class-file, -femit-class-files.
17497         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
17498         (lang_f_options):  Added "emit-class-file(s)".
17499
17500         * expr.c (build_java_arrayaccess):  Generate more efficient array
17501         bounds checking, by using unsigned compare.
17502
17503         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
17504
17505 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17506
17507         * parse.h: New comment on the handling of unresolved type
17508         identifiers. JDEPs are now part of the jdep_code enum.
17509         (typedef struct jdep): Now use enum jdep_code or int, depending on
17510         availability. Both are narrowed down to an 8 bits bitfield.
17511         (CALL_EXPR_PRIMARY): Fixed comment.
17512
17513 1998-06-10  Tom Tromey  <tromey@cygnus.com>
17514
17515         * Make-lang.in (java): Added gjavac and jvgenmain.
17516         (java.start.encap): Depend on gjavac.
17517         (java.rest.encap): Depend on jvgenmain.
17518
17519         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
17520         (JAVA_CROSS_NAME): Likewise.
17521         (java.all.build): Depend on jvgenmain and gjavac.
17522         (java.all.cross): Depend on jvgenmain and gjavac-cross.
17523         (jvgenmain$(exeext)): New target.
17524         (java.install-common): Wrote.
17525         * config-lang.in (compilers, stagestuff): Added gjavac and
17526         jvgenmain.
17527
17528 1998-06-10  Dave Brolley  <brolley@cygnus.com>
17529
17530         * lang.c (lang_decode_option): New argc/argv interface.
17531
17532 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17533
17534         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
17535         * decl.c (build_decl_no_layout): New function.
17536         * expr.c (java_lang_expand_expr): Layout declarations found in
17537         blocks before they're pushed.
17538         * jcf-parse.c (load_class): Save current line when parsing class
17539         file.
17540         (parse_source_file): Register class before expanding their
17541         methods.
17542         * lang.c (put_decl_node): Produce `null' when `void *' is
17543         processed.
17544         * lex.c (static tree wfl_op): New static global, for error report
17545         on casts.
17546         (java_init_lex): wfl_operator and wfl_op initialized
17547         here. Filename caching added for wfl_op. Return wfl_op when `(' is
17548         parsed.
17549         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
17550         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
17551         build_unresolved_array_type): New static function definitions.
17552         (build_decl_no_layout): New extern function declared.
17553         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
17554         faulty modifier exists.
17555         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
17556         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
17557         (UNARY_PLUS_EXPR): New fake operator.
17558         (struct parser_ctxt): New field osb_number.
17559         * parse.y (static tree wfl_operator): New static WFL for operator
17560         bound error messages.
17561         (DECR_TK, INCR_TK): Moved.
17562         (OP_TK): Tagged <operator>.
17563         (array_type:): Now call build_unresolved_array_type.
17564         (dim_expr:): Count the number of '[' seen.
17565         (post_increment_expression, post_decrement_expression,
17566         pre_increment_expression, pre_decrement_expression,
17567         unary_expression_not_plus_minus, unary_expression:): Actions are
17568         now building the corresponding unary expressions.
17569         (cast_expression:): Actions are now building cast expressions.
17570         (build_unresolved_array_type): New function.
17571         (create_interface): Reset the number of declared interfaces.
17572         (create_class): Likewise.
17573         (method_header): Methods declared within the scope of an interface
17574         are now implicitly set public and abstract.
17575         (java_complete_class): Variable's and parameter's type are patched
17576         with a promoted type.
17577         (declare_local_variables): Resolved non builtin types are promoted
17578         before being used to build a variable decl. Removed type patch
17579         posted on variable initialization statement.
17580         (source_start_java_method): Use build_decl_no_layout to build the
17581         decl of a parameter of incomplete type.
17582         (java_register_parsed_class): Process interfaces too. Call
17583         rest_of_decl_compilation on each processed class declarations.
17584         (java_complete_expand_methods): Don't attempt to expand things in
17585         interfaces.
17586         (java_complete_tree): Process CONVERT_EXPR, even though it always
17587         has a type. Propagate error_mark_node to node's type too. Promote
17588         method's call argument type and return error_mark_node if
17589         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
17590         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
17591         handle unary operator nodes.
17592         (build_assignment): Added comment.
17593         (print_int_node): New function.
17594         (patch_assignment): New second argument. New error handling. Use
17595         print_int_node. Handle references. Use can_cast_to_p to issue
17596         different error message according to the context and check upon
17597         the initialization of the RHS.
17598         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
17599         (operator_string): Handle more operators.
17600         (patch_binop): No longer use a function static
17601         wfl_operator. Improved error message on shift distance.
17602         (build_unaryop, build_incdec, build_cast, patch_unaryop,
17603         patch_cast): New functions.
17604
17605 1998-06-05  Per Bothner  <bothner@cygnus.com>
17606
17607         * jvspec.c:  New file.
17608         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
17609
17610         * java-tree.h (identifier_subst):  Add declaration.
17611
17612 1998-06-04  Tom Tromey  <tromey@cygnus.com>
17613
17614         * jvgenmain.c (main): Generate call to JvRunMain.
17615
17616         * class.c (make_class_data): Push value for "sync_info" field.
17617         * decl.c (init_decl_processing): Push "sync_info" field.
17618
17619 1998-06-03  Per Bothner  <bothner@cygnus.com>
17620
17621         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
17622         Java (source) name, not signature.
17623         Set TYPE_ALIGN to (at least) that of element_type.
17624
17625 1998-06-02  Per Bothner  <bothner@cygnus.com>
17626
17627         * class.c:  Moved classname-mangling-rekated code to ...
17628         * mangle.c:  ... this new file.
17629         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
17630         * Makefile.in:  Update for above changes.
17631
17632 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17633
17634         * expr.c (truthvalue_conversion): Convert integer and floating
17635         point value to their truth value.
17636         * lex.c (java_lex): Handle the `null' literal.
17637         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
17638         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
17639         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
17640         New macros.
17641
17642         * parse.y: Reorganization/documentation on token declaration.
17643         (binop_lookup[]): New added new tree codes.
17644         (relational_expression): Build corresponding binary operators.
17645         (equality_expression, conditional_and_expression,
17646         conditional_or_expression): Likewise.
17647         (java_complete_class): Fix crash in debug message.
17648         (java_complete_tree): Check initialization of method call
17649         arguments. Further bogus node evaluation to detect more error
17650         during assignments. Handles more binary operators.
17651         (patch_assignment): Use DECL_P.
17652         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
17653         code.
17654         (operator_string): Handle more case. Compacted source.
17655         (patch_binop): Changed function comment. Checking for
17656         uninitialized first operand takes the compound assignment into
17657         account and uses DECL_P. Checking for uninitialized second operand
17658         delayed to routine's end. Use macros to issue type bound error
17659         messages and issue messages on both operands if their types are
17660         different. Force fixed type into node. Handle all binary
17661         operators.
17662
17663 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17664
17665         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
17666         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
17667         build operator node and return tokens.
17668         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
17669         * parse.h (java_complete_tree): Changed returned type in prototype.
17670         (build_method_invocation, build_assignment, patch_assignment,
17671         patch_binop): New static function declarations.
17672         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
17673         BUILD_EXPR_WFL): New macros.
17674         * parse.y (enum tree_code binop_lookup[]): New static for token to
17675         TREE_CODE lookup.
17676         (%union): Parser union has new sub-structure `operator'.
17677         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
17678         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
17679         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
17680         ASSIGN_ANY_TK): Tokens tagged `operator'.
17681         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
17682         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
17683         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
17684         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
17685         (assignment_operator:): Rule tagged `operator'.
17686         (expression_statement:): Re-installed default rule.
17687         (method_invocation:): Sub rules call build_method_invocation.
17688         (postfix_expression:): Don't attempt to resolve name here. Just
17689         return an ID.
17690         (multiplicative_expression:): Sub-rules build corresponding binop
17691         expression node.
17692         (additive_expression:, shift_expression:, and_expression:,
17693         exclusive_or_expression:, inclusive_or_expression:): Likewise.
17694         (assignment:): Sub rule invoke build_assignment.
17695         (assignment_operator:): Default rules on sub rules.
17696         (force_error): Added documentation on this variable.
17697         (declare_local_variables): Build initialization calling
17698         build_assignment.
17699         (expand_start_java_method): Removed unused rtx declaration. Mark
17700         arguments as already initialized.
17701         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
17702         (java_complete_expand_methods): Don't process next method if
17703         completion of the previous one triggered errors.
17704         (java_complete_expand_method): Call source_end_java_method if no
17705         error were found during completion.
17706         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
17707         locals declaratilon. Handle names found within a class. Return
17708         error_mark_node when things aren't found.
17709         (patch_method_invocation_stmt): Return error_mark_node on failures.
17710         (patch_invoke): Removed unused local. Return the correct node.
17711         (java_complete_tree): Now returns a value. The BLOCK section binds
17712         local identifiers and the type of a BLOCK is now void. Assign the
17713         result of operand completion on COMPOUND_EXPR. Assign the
17714         encapsulated node of a WFL to the result of its completion, except
17715         when the node is an identifier. Now handle MODIFY_EXPR and several
17716         binary operators. Return error_mark_node on errors.
17717         (build_method_invocation, build_assignment, patch_assignment,
17718         build_binop, operator_string, patch_binop): New functions.
17719         * typeck.c (binary_numeric_promotion): New function.
17720
17721 1998-05-21  Per Bothner  <bothner@cygnus.com>
17722
17723         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
17724         Replace most uses of ident_subst by identifier_subst.
17725
17726         * class.c (push_class_static_dummy_field):  Removed function.
17727         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
17728         instead of looking got "class" static field.  Create that decl here.
17729         (class_identifier_node):  Removed;  no longer needed.
17730         (init_class_processing):  Don't init class_identifier_node.
17731         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
17732         Do nreverse 0 times (instead of twice) for Object and Class.
17733         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
17734
17735 1998-05-20  Per Bothner  <bothner@cygnus.com>
17736
17737         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
17738         while initializing linenumber_count and linenumber_table.
17739         Do it before init_function_start (which calls emit_line_note).
17740         * expr.c (expand_byte_code):  Don't need to clear lineno here.
17741
17742 1998-05-18  Tom Tromey  <tromey@cygnus.com>
17743
17744         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
17745         then mangle number as _N_.
17746
17747         * class.c (mangle_class_field): New function.
17748         (build_class_ref): Set assembler name of class reference using
17749         mangle_class_field.
17750         (push_class_static_dummy_field): Likewise.
17751
17752 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
17753
17754         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
17755         of assigning to TREE_CODE.  The latter method exploits a feature
17756         of GCC that is not ANSI compliant.
17757
17758 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17759
17760         * decl.c (pushdecl_force_head): New function.
17761         (pushlevel): Removed conditional printf.
17762         (complete_start_java_method): Don't enter local variable scope if
17763         function is compiled from source code.
17764         * expr.c: parse.h now included
17765         (java_lang_expand_expr): New function.
17766         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
17767         printf. Terminate buffer when doing directories.
17768         * jcf-parse.c (parse_source_file): Call lang_init_source before
17769         parsing and before code generation.
17770         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
17771         use printf if the macro is defined.
17772         * lang.c (lang_init): Install lang_expand_expr hook on
17773         java_lang_expand_expr.
17774         (java_dummy_print): New function.
17775         (lang_init_source): New function.
17776         * lex.c (java_lex): Remember location of an opening brace at the
17777         second nesting level.
17778         (java_is_eol): Unget character seen after a CR if it is EOF.
17779         * parse.h: Now includes lex.h
17780         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
17781         printf if the macro is defined.
17782         (expand_start_java_method, build_expr_block, enter_block,
17783         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
17784         New static function declarations.
17785         (pushdecl_force_head): New extern function declaration.
17786         (INCOMPLETE_TYPE_P): New macro.
17787         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
17788         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
17789         BLOCK_EXPR_ORIGIN): New macros.
17790         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
17791         DECL_SOURCE_LINE_LAST): New macros.
17792         (struct parser_ctxt): Removed field current_method_decl, redundant
17793         with the field current_function_decl. Added fields
17794         first_ccb_indent1 and pending_block.
17795         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
17796         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
17797         tagged <node>
17798         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
17799         (compilation_unit:): Cosmetic on sub rule.
17800         (type_declaration:): Cosmetic on sub rules. Added an error rule.
17801         (variable_initializer:): Installed default rule on expression:.
17802         (method_declaration:): method_header: starts a new
17803         method. method_body: installs the function body, absorbs blocks
17804         emitted for temporary variable scopings, pops function's body block
17805         and merges function's last statement lineno in DECL_SOURCE_LINE.
17806         (method_body:): Installed default rules.
17807         (block:): Call enter_block when an opening brace is seen.  Absorb
17808         scoping blocks and call exit_block when a closing brace is seen.
17809         (block_statement:): Cosmetic changes.
17810         (method_invocation:): Create WFL around CALL_EXPR node.
17811         (patch_stage): Added comment around definition.
17812         (method_header): Try to use first_ccb_indent1 as the first line of
17813         the method, so BP debug info are emitted at the first opening
17814         brace of the function. If the function has no body, use the
17815         location of the function's name. Override currently defined method
17816         name with the matching WFL so we can point redefinition errors
17817         using the location where the function's name was declared.
17818         (check_abstract_method_header): Interprets DECL_NAME as an
17819         identifier or as a WFL, accordingly.
17820         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
17821         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
17822         location and name information out of it and reinstall DECL_NAME to
17823         its original identifier node value.
17824         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
17825         function's source code).
17826         (read_import_dir): Test the value returned by find_class and issue
17827         a fatal accordingly.
17828         (declare_local_variables): Push a new block for the scope of the
17829         new variable(s) if code has been already generated at that nesting
17830         level. Pinpoint redefinition errors using the variable id
17831         WFLs. Generate initialization code if necessary. If the variable
17832         type is incomplete, register a patch on its decl.
17833         (source_start_java_method): Rewritten. Define a new block for the
17834         function's parameters. Build parameter decl out of function's
17835         arguments and register them for a patch if their types are
17836         incomplete.
17837         (expand_start_java_method): Includes the part of
17838         source_start_java_method that was pushing the parameter decls and
17839         completing the method start code.
17840         (source_end_java_method): Removed call the expand_end_bindings and
17841         poplevel (already taken care of). Reinstall function's arguments
17842         and get function's last line of code before calling
17843         expand_function_end.
17844         (java_method_add_stmt): New comment before the function's
17845         code. Complement the second operand of the current COMPOUND_EXPR
17846         if necessary.
17847         (java_complete_expand_methods): Don't generate debug info on line
17848         zero when expanding a generated constructor.
17849         (java_complete_expand_method): Set start and end line numbers for
17850         a artificially generated constructor to one and manually call
17851         enter_block and exit_block when defining it. For all methods:
17852         expand function's start calling the new expand_start_java_method
17853         and invoke java_complete_tree on the effective method's body, if
17854         any.
17855         (resolve_expression_name): Now use lookup_name_in_blocks to search
17856         local variable decls and print out an error when variables are
17857         undefined.
17858         (patch_method_invocation_stmt): Inserted comment before the
17859         function's code.
17860         (lookup_method_invoke): Chain method's arguments using chainon
17861         with the current arg list as a second argument. Inserted missing
17862         IDENTIFIER_POINTER when reporting an error on methods not found.
17863         (refine_accessible_methods_list): Don't retain constructors.
17864         (patch_arguments): Function removed.
17865         (java_complete_tree): Inserted comment before the function's
17866         code. New case for BLOCKs. Moved the WFL case a bit
17867         further. Complete function's arguments.
17868         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
17869         maybe_absorb_scoping_blocks): New functions.
17870
17871 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17872
17873         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
17874         previously set.
17875         * jcf-parse.c (parse_source_file, java_error_count): New forward
17876         and extern declarations.
17877         (java_parse_abort_on_error): Macro moved.
17878         (jcf_parse_source): fatal called if fopen fails. Now calls
17879         parse_source_file.
17880         (parse_source_file): New parse_only parameter. Reflects the
17881         elimination of the second pass.
17882         (yyparse): parse_source_file called with argument set to 0.
17883         * jcf.h (JCF_ZERO): Sets java_source to zero.
17884         * lex.c (java_init_lex): pass argument is gone. Function modified
17885         to be called once during the analysis of a file.
17886         (java_unget_unicode): Fixed typo in fatal message.
17887         (java_get_line_col): Likewise.
17888         (java_lval): Likewise. String literals no longer built during
17889         second pass.
17890         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
17891         account.
17892         * parse.h (MODIFIER_WFL): New macro.
17893         (parse_check_super, parser_check_super_interface): Now return int.
17894         (parser_chain_incomplete_item, not_builtin_p,
17895         complete_method_decl): Declarations removed.
17896         (build_method_invocation_stmt, build_invoke): Renamed using the
17897         `patch' instead of `build'
17898         (register-incomplete_type, obtain_incomplete_type,
17899         java_complete_tree, java_complete_expand_method,
17900         unresolved_type_p, create_jdep_list): New function declarations.
17901         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
17902         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
17903         (jdep): New typedef on new struct _jdep.
17904         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
17905         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
17906         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17907         JDEP_RESOLVED_P): New macros.
17908         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
17909         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
17910         JDEP_VARIABLE): New enum values and jdep kinds.
17911         (jdeplist): New typedef on struct _jdeplist.
17912         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
17913         macros.
17914         (CALL_EXPR_PRIMARY): New macro.
17915         (struct parser_ctxt): Fields java_pass, current_method_decl,
17916         method_decl_list deleted. New field jdeplist.
17917         (INCOMPLETE_P): Macro deleted.
17918         * parse.y (single_type_import_declaration:): Removed pass switch.
17919         (type_import_on_demand_declaration): Likewise.
17920         (field_declaration:): Removed pass switch on all sub rules.
17921         (class_declaration:): Call the complete_class_decl removed on
17922         class_body rules.
17923         (method_declaration:): Removed second pass switch. No longer chain
17924         methods decl when method_header reduced.
17925         (method_header:): Sub rules no longer depend on pass switch.
17926         (method_declarator:): Likewise.
17927         (method_body:): Likewise.
17928         (abstract_method_declaration:): Likewise.
17929         (block_statement:): Likewise.
17930         (local_variable_declaration:): Likewise.
17931         (argument_list:): Likewise.
17932         (method_invocation:): Likewise. Call to build_method_invocation_stmt
17933         removed. Partial CLASS_EXPR tree node built instead.
17934         (postfix_expression:): Removed pass switch on all sub rules.
17935         (java_pop_parser_context): Free classd_list content.
17936         (yyerror): Call obstrack_grow0 to finalize error message.
17937         (check_class_interface_creation): Comment modified to reflect new
17938         returned value meaning. Removed second pass switch. Return 1 if an
17939         error was found, 0 otherwise. Adjust pointer on filename if a
17940         leading path separator was found.
17941         (maybe_create_class_interface_decl): Removed first pass switch
17942         when linking the class decl to the class_list. Install a new
17943         jdep_list for the class.
17944         (add_superinterfaces): List of unresolved interfaces is
17945         gone. Unresolved interfaces are directly added to the current
17946         dependencies list.
17947         (create_interface): Second pass shortcut removed.
17948         ctpx->modifier_ctx access through MODIFIER_WFL.
17949         (create_class): Second pass shortcut removed. Call to
17950         register_incomplete_type replaces the call to
17951         parser_chain_incomplete_item.
17952         (complete_class_decl): Function removed.
17953         (duplicate_declaration_error): New way of retrieving redeclared
17954         item type.
17955         (register_fields): Call to lookup_modifier_cl replaced by
17956         MODIFIER_WFL. New way of handling unresolved type, using
17957         unresolved_type_p and obtain_incomplete_type.
17958         register_incomplete_type replaces call to parser_chain_incomplete_item.
17959         (patch_stage): New static global variable.
17960         (method_header): New way of handling unresolved type, using
17961         unresolved_type_p and obtain_incomplete_type. patch_stage used to
17962         indicates that the method decl needs to be patched.
17963         (check_abstract_method_header): Call to lookup_modifier_cl
17964         replaced by MODIFIER_WFL.
17965         (method_declarator): Incomplete argument type are registered
17966         calling register_incomplete_type. Patch on the declared method is
17967         issued in that case.
17968         (unresolved_type_p): New function.
17969         (parser_check_super_interface): New comment to reflect function's
17970         modified returned type (int). Function and has a new argument
17971         this_wfl. Call to parse_error_context uses this_wfl instead of
17972         relying on lookup_cl.
17973         (parser_check_super): Comment reflects function's new returned
17974         type (int). Function returns nonzero value on error.
17975         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
17976         register_incomplete_type, jdep_resolve_class): New functions to
17977         handle incomplete types in declarations.
17978         (java_complete_class): Rewritten to work with the new incomplete
17979         type handling scheme.
17980         (complete_class_report_errors): Likewise.
17981         (complete_method_decl): Removed: it jobs is now handled by
17982         java_complete_class.
17983         (do_resolve_class): Class loaded in not already loaded and not
17984         found in Java source code.
17985         (java_check_regular_methods, java_check_abstract_methods): Don't
17986         call complete_method_decl anymore.
17987         (lookup_modifier_cl, not_builtin_p): Functions deleted.
17988         (read_import_dir): Got rid of the pass number dependency.
17989         (declare_local_variables): New handling of unresolved types (patch
17990         issued).
17991         (source_start_java_method): New parameter level. Function called
17992         with level set to 1 when argument types are potentially
17993         unresolved.  Called to complete the job with level set to 2 once
17994         types are complete.
17995         (source_end_java_method): Call to permanent_allocation
17996         removed. Waiting to be replaced by a more suitable obstack
17997         management.
17998         (java_complete_expand_methods, java_complete_expand_method,
17999         java_expand_finals): New functions.
18000         (build_method_invocation_stmt): Renamed
18001         patch_method_invocation_stmt. Extracts function call expression
18002         (wfl) and arguments (args) from CALL_EXPR tree operands.
18003         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
18004         call. Patch the function and argument operand of the CALL_EXPR
18005         tree argument.
18006         (patch_argument, java_complete_tree): New functions.
18007
18008 1998-04-20  Per Bothner  <bothner@cygnus.com>
18009
18010         Recover from missing fields and methods (i.e. error instead of fatal).
18011         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
18012         * expr.c (expand_invoke):  Recover from missing method.
18013         (expand_java_field_op):  Recover from missing field.
18014         Inline references to java.lang.{Integer,Char,...}.TYPE.
18015         * typeck.c (get_type_from_signature), java-tree.h:  New function.
18016         * class.c (add_method):  Use get_type_from_signature.
18017         (build_class_ref):  Handle a class that was not found.
18018         * typeck.c (convert):  Handle conversion to pointers (for convenience).
18019         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
18020         instead of lookup_field to handle missing fields.
18021
18022         * jcf-parse.c (process_zip_dir):  Set java_source.
18023
18024 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
18025
18026         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
18027
18028 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18029
18030         * jcf-parse.c (load_class): Don't change input_filename before
18031         calling jcf_parse_source (but still do it before calling
18032         jcf_parse).
18033         (jcf_parse_source): Assign input_filename after having saved the
18034         parser context.
18035         * lex.c (java_init_lex): Chain a WFL node to the import on demand
18036         list. ctxp->modifier_ctx zeroed according to its new
18037         definition. ctxp->filename initialized. Removed
18038         JAVA_MODIFIER_CTX_UNMARK.
18039         (java_unget_unicode): Update the character based column position.
18040         (java_allocate_new_line): ref_count not used anymore. Always free
18041         ctxp->p_line. Initialize c_line->char_col to 0.
18042         (java_get_unicode): Update the character based column position.
18043         (java_lex): Use ctxp->elc to store current position in source
18044         file, at the beginning of the parsed token. Set modifier_ctx entry
18045         corresponding to the parse modifier to a WFL node. Return a WFL
18046         node when an identifier is parsed.
18047         (java_lex_error): Now uses ctxp->elc to store current position in
18048         source.
18049         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
18050         * lex.h (build_wfl_node): New function definitions.
18051         (struct java_line): ref_count and next fields are gone. New field
18052         char_col.
18053         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
18054         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
18055         (JAVA_COLUMN_DELTA): New macro.
18056         (java_lc): New typedef on new struct _java_lc.
18057         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
18058         (parse_error_context, parse_warning_context): Changed prototypes.
18059         (java_get_line_col): Added as an available global function.
18060         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
18061         (IC_DECL): Replaced by macro IC_TYPE
18062         (DEPEND_WFL): New macro.
18063         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
18064         wrong modifier.
18065         (exit_java_complete_class): Removed a commented out statement.
18066         (struct parser_ctxt): Added comments on fields. modifier_ctx is
18067         now an array of tree nodes. Deleted fields line_list and
18068         e_line. New field elc, to replace e_line.
18069         * parse.y (array_type:): Build WFL node.
18070         (qualified_name:): Build a single WFL node out of two. Retain
18071         the location information of the first node in the resulting node.
18072         (package_declaration:): Use package name as a WFL node
18073         (single_type_import_declaration:): Use imported name as a WFL node.
18074         (type_import_on_demand_declaration:): Use root of the imported
18075         packages as a WFL node.
18076         (field_declaration:): Removed unused local variable cl.
18077         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
18078         (yyerror): New static elc. Removed static error_line, error_pos.
18079         New local code_from_source. Save ctxp->elc into elc at the first
18080         pass. Call java_get_line_col to get a string of the line where
18081         the error occurred.
18082         (debug_line): Removed static function.
18083         (parse_error_context, parse_warning_context): Parameter cl is now
18084         a WFL node. Use its value to initialize ctxp->elc.
18085         (redefinition_error): Parameter cl is now a WFL node.
18086         (parse_add_interface): New parameter wfl. No longer call
18087         lookup_cl, use wfl instead.
18088         (check_class_interface_creation): Parameter cl is now a WFL node.
18089         (maybe_create_class_interface_decl): Likewise.
18090         (add_superinterfaces): New function.
18091         (create_interface): Removed local cl, node, super_decl,
18092         super_decl_type.  Function now uses id as a WFL node. Better
18093         warning/error report on obsolete or forbidden mix of
18094         modifiers. Now calls add_superinterfaces to register interfaces.
18095         (create_class): Removed local cl, node. Local variable id is used
18096         as a WFL node. Better error report on forbidden modifier
18097         mix. Uses add_superinterfaces to register interfaces.
18098         (find_field): Argument cl is now a WFL node. Now store the WFL
18099         node of a fields that needs to be checked for their
18100         initialization.
18101         (method_header): Local variable node non longer used. Local
18102         variable id replaces cl.
18103         (check_modifiers_consistency): Local variable cl is now a WFL
18104         node.
18105         (method_declarator): Local variable cl replaced by parameter id.
18106         (parser_qualified_name): Now uses parameter name as a WFL node.
18107         (parser_check_super_interface): New parameter wfl, for achieve
18108         greater accuracy during error reports.
18109         (parser_chain_incomplete_item): New parameter named location. Used,
18110         along the decl, to construct the incomplete item node.
18111         (java_complete_class): resolve_class now uses WFL node extracted
18112         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
18113         where appropriate.
18114         (complete_method_decl): Unresolved function's argument types are WFL.
18115         (resolve_class): Parameter cl is now a WFL node.
18116         (resolve_and_layout): Likewise.
18117         (do_resolve_class): Likewise. Try first to use cl and then do the
18118         lookup on the decl when calling check_pkg_class_access.
18119         (complete_class_report_errors): Use IC_TYPE in place of
18120         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
18121         instead of doing a lookup over the decl.
18122         (java_check_final): Use WFL info from field tree list.
18123         (lookup_cl): Rewritten and returns a statically defined WFL node.
18124         (lookup_modifier_cl): Now uses information from WFL nodes.
18125         (process_imports): Likewise.
18126         (read_import_dir): name and cl arguments replaced by a single WFL
18127         node. Function modified accordingly.
18128         (find_in_imports_on_demand): Now uses WFL node.
18129         (check_pkg_class_access): cl argument is now a WFL node.
18130         (declare_local_variables): Fixed to use WFL nodes.
18131         (resolve_expression_name): Likewise.
18132         (build_method_invocation_stmt): name_combo argument renamed
18133         wfl. Function modified to use WFL nodes.
18134         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
18135         (lookup_method_invoke): cl is now a WFL node. Added missing
18136         IDENTIFIER_POINTER to class type decl name.
18137
18138 1998-04-14  Dave Brolley  <brolley@cygnus.com>
18139
18140         * lang.c (init_parse): Now returns char* containing the filename.
18141
18142 1998-04-10  Per Bothner  <bothner@cygnus.com>
18143
18144         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
18145
18146         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
18147         * class.c (make_class_data):  If flag_assume_compiled, initial class
18148         state is CSTATE_PREPARED; make superclass and interfaces direct
18149         references, rather than constant pool indexes.
18150
18151 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18152
18153         * parser.y: Include flags.h. Removed debug variable pl.
18154         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
18155         (block:): Likewise.
18156         (labeled_statement_nsi:): Generate debug info when reducing
18157         expression_statement:.
18158         (check_pkg_class_access): get_access_flags_from_decl invocation
18159         fixed for new CLASS_* flags location.
18160         (source_end_java_method): Save/restore parser context when
18161         entering/leaving this routine. Restore lineno to its right value
18162         before calling expand_end_bindings.
18163         (build_method_invocation_stmt): build_invoke called with the
18164         current line information.
18165         (build_invoke): New argument cl. Wrap the function call around a
18166         wfl node.
18167         (refine_accessible_methods_list): Changed comment, removed
18168         unnecessary code.
18169         * parse.h: Fixed typo in comments.
18170         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
18171         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
18172         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
18173         parser_ccb_indent.
18174         * lex.c (java_lex): Record the last closing curly bracket of a
18175         function.
18176         * jcf-parse.c (jcf_parse_source): Now calls
18177         java_check_methods. Clarified comment, fixed typo.
18178
18179 1998-04-09  Dave Brolley  <brolley@cygnus.com>
18180
18181         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
18182         (finish_parse): Expose for non USE_CPPLIB builds.
18183
18184 1998-04-08  Jeffrey A Law  (law@cygnus.com)
18185
18186         * lang.c (lang_print_xnode): New function.
18187
18188 1998-04-03  Per Bothner  <bothner@cygnus.com>
18189
18190         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
18191         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
18192         used to build a class's dispatch table.
18193         (make_class_data):  Generate dispatch table if flag_assume_compiled.
18194         Set dtable of class object to address of class_dtable_decl.
18195
18196         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
18197         be volatile and have side effects - generates better code.
18198
18199         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
18200         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
18201
18202         * expr.c (expand_invoke):  If class is final, method is
18203         effectively final, so can call it directly.
18204
18205         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
18206
18207         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
18208
18209 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18210
18211         * parse.y (build_method_invocation_stmt): Removed extra argument
18212         to build_invoke.
18213
18214 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18215
18216         * expr.c (dtable_indent): Now static global.
18217         (expand_invoke): Now call invoke_build_dtable and
18218         build_invokevirtual.
18219         (invoke_build_dtable, build_invokevirtual): New functions.
18220         * jcf-io.c (find_class): Defer issuing a warning by setting
18221         jcf->outofsynch to 1.
18222         * jcf-parse.c (jcf_out_of_synch): New function.
18223         (load_class): Test this_jcf.outofsynch flag and call
18224         jcf_out_of_synch accordingly.
18225         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
18226         comment indentation.
18227         * lex.c (java_get_unicode): Fixed code indentation.
18228         (java_lex): Create string literal. Fixed typo. Removed several
18229         premature obstack_free.
18230         * parse.h: New enums for name resolution and invocation mode.
18231         (struct qualification): New data structure.
18232         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
18233         (do_resolve_class, build_method_invocation_stmt,
18234         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
18235         debug_line, identical_subpath_p, invocation_mode,
18236         refine_accessible_methods_list, build_invoke,
18237         lookup_method_invoke): New functions declared.
18238         (build_invokevirtual, invoke_build_dtable, match_java_method,
18239         build_field_ref, jcf_out_of_synch): New references to external
18240         functions.
18241         (struct parse_ctxt): Removed artificial_constructor field.
18242         * parse.y: (array_type:): Type defined for this rule.
18243         (class_type:): Installed default rule for interface_type:.
18244         (array_type:): Now build Java array type.
18245         (qualified_name:): Now use obstack_grow0.
18246         (method_declaration:): Skip the artificial constructor added to
18247         the list, if any.
18248         (abstract_method_declaration:): Execute the code only during pass 1.
18249         (block:): Installed default rule in block_statements:.
18250         (block_statement:): Add the statement to the method during pass 2.
18251         (statement_expression): Installed default rule for
18252         method_invocation:.
18253         (argument_list:): Added code to build the argument list.
18254         (method_invocation:): Added call to create the method invocation
18255         node.
18256         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
18257         (debug_line): New function for debug.
18258         (complete_class_decl): No longer do something during pass 1.
18259         (method_header): Use BUILD_PTR_FROM_NAME.
18260         (parser_qualified_classname): Use obstack_grow0. Removed bogus
18261         obstack_free.
18262         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
18263         function's main comment.
18264         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
18265         classes.
18266         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
18267         (resolve_class): Now works with arrays.
18268         (do_resolve_class, resolve_and_layout): New functions.
18269         (java_check_regular_methods): Reverse method list before and after
18270         having processed it. No longer set ctxp->artificial_constructor.
18271         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
18272         accordingly. Fixed typo in issued error message. Now use
18273         obstack_grow0.
18274         (find_in_imports_on_demand): Now use obstack_grow0.
18275         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
18276         (source_end_java_method): Call expand_expr_stmt instead of
18277         expand_expr. Calls it before calling expand_function_end.
18278         (java_method_add_stmt): Do nothing if errors were found during
18279         parsing.
18280         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
18281         (build_method_invocation_stmt, build_invoke, invocation_mode,
18282         lookup_method_invoke, refine_accessible_methods_list,
18283         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
18284         New functions.
18285         * typeck.c (build_java_signature): Properly end method signature
18286         if return type skipped.
18287         (match_java_method): New function.
18288
18289 1998-03-16  Per Bothner  <bothner@cygnus.com>
18290
18291         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
18292
18293 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18294
18295         * expr.c (build_invoke_non_interface): New function.
18296         (methods_ident, ncode_ident): Now static globals.
18297         (expand_invoke): Use build_invoke_non_interface.
18298         * java-tree.h (struct lang_decl): New field function_decl_body.
18299         (DECL_FUNCTION_BODY): New macro.
18300         * jcf-parse.c (jcf_parse_source): Deeper check before setting
18301         CLASS_FROM_SOURCE_P.
18302         (parse_source_file): Fixed typos. Call java_layout_parsed_class
18303         before starting pass 2. Call to java_generate_parsed_class replaced
18304         by java_register_parsed_class.
18305         * lex.c: Fixed typo in header. Some line width related formating.
18306         * lex.h: Some line width related formating.
18307         * parse.h (source_end_java_method, resolve_expression_name,
18308         complete_class_decl, maybe_create_class_interface_decl,
18309         check_class_interface_creation): New static function declarations.
18310         (java_layout_parsed_class, java_method_add_stmt): New function
18311         declarations.
18312         (struct parser_ctxt): Field mark_class_generate removed. New
18313         fields class_list and artificial_constructor.
18314         * parse.y: Fixed typo in header.
18315         (class_declaration:): Call complete_class_decl when class body
18316         parsed.
18317         (method_declaration:): Call source_end_java_method in pass 2 when
18318         the method body is defined.
18319         (postfix_expression:): Do expression name resolution on sub-rule
18320         name during pass 2.
18321         (create_class, create_interface): Merged common pieces.
18322         (check_class_interface_creation, maybe_create_class_interface_decl):
18323         New functions.
18324         (complete_class_decl): New function.
18325         (register_fields): Fixed line width related typo.
18326         (method_header): Correctly skip first argument when fixing
18327         argument line. Changed the loop.
18328         (java_check_circular_reference): Now use ctxp->class_list.
18329         (java_complete_class): Removed start/stop marking.
18330         (java_check_regular_methods): Now takes a class decl as an
18331         argument.  Add default constructor if none were encountered.
18332         (java_check_methods): Now use ctxp->class_list. Changed call to
18333         java_check_regular_methods.
18334         (source_start_java_method): Set DECL_ARG_TYPE for each function
18335         arguments.
18336         (source_end_java_method, java_method_add_stmt): New functions.
18337         (java_generate_parsed_class): No longer exists.
18338         (java_layout_parsed_class, java_register_parsed_class): New functions.
18339         (resolve_expression_name): New function.
18340
18341 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18342
18343         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
18344         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
18345         until pass initializations are done. Call read_import_dir with
18346         pass set to 0.
18347         * parse.h: (lookup_modifier_cl): New function declared.
18348         (INTERFACE_FIELD_MODIFIERS): New macro.
18349         (OBSOLETE_MODIFIER_WARNING): New macro.
18350         * parse.y: (register_fields): Class type and current field name in
18351         local variables. Check modifier(s) if adding field(s) to an interface.
18352         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
18353         and report errors using the faulty modifier line context.
18354         (lookup_modifier_cl): New function.
18355         (read_import_dir): Detect and report default import processing
18356         failure.
18357
18358 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
18359
18360         Add a pair of -fassume-compiled/-fno-assume-compiled options.
18361         * class.c (is_compiled_class): Return 1 after making sure it
18362         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
18363         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
18364         * java-tree.h (flag_assume_compiled): Add decl.
18365         * lang.c (lang_f_options): Add the flag.
18366         (flag_assume_compiled): Add decl, default to 0.
18367
18368 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18369
18370         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
18371         (is_compiled_class): Likewise.
18372         (layout_class): Likewise.
18373         (layout_class): Detect and lay out classes defined in source code.
18374         (interface_of_p, add_interface_do, may_add_interface): New
18375         function.
18376         (add_interface): Now use add_interface_do.
18377         (add_method_1): New function.
18378         (add_method): Now use add_method_1.
18379         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
18380         (complete_start_java_method): New function.
18381         (start_java_mehod): Now call complete_start_java_method.
18382         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
18383         (expand_invoke): Likewise and fixed typo.
18384         *gjava.c: (print_super_field): Use new argument to find_class
18385         DO_CLASS_FILE.
18386         (main): Likewise.
18387         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
18388         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
18389         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
18390         IDENTIFIER_NODE.
18391         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
18392         (add_method_1, push_class): New prototypes.
18393         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
18394         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
18395         directory where the class was found.
18396         (find_class): New argument DO_CLASS_FILE. Function find_class
18397         modified accordingly.
18398         *jcf-parse.c: (fix_class_path): New function.
18399         (load_class): Use new VERBOSE argument. load_class now finds and
18400         loads/parses .class/.java files. Save read_state of current_jcf
18401         if necessary.
18402         (java_parser_abort_on_error): New macro.
18403         (jcf_parse_source, parse_source_file): New function.
18404         (jcf_parse): Fixed typo.
18405         (yyparse): Call parse_source_file () only.
18406         (process_zip_dir): Fixed typo, fix zdir->filename_length when
18407         writing the real class name back in the zip directory entry.
18408         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
18409         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
18410         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
18411         (find_class): Prototype fixed.
18412         *lex.c: Added 1998 time stamp.
18413         Removed all static global variables, moved into the parser
18414         context data structure.. Now include unistd.h if SEEK_SET not
18415         defined.
18416         (java_init_lex): Rewritten.
18417         (java_sneak_unicode): Modified current unicode access in current line.
18418         (java_unget_unicode): Likewise.
18419         (java_allocate_new_line): New allocation management.
18420         (java_read_char): Modified access and storage of unget_utf8_value.
18421         New way of processing current unicode.
18422         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
18423         (java_get_unicode): Now use the parser context.
18424         (java_lineterminator): Likewise.
18425         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
18426         of the reentrant parser implementation. Function now use the
18427         parser context data structure and java_lval. Fixed production of
18428         the float and double constant "out of range" error message. Fixed
18429         obstack use. Return integer value when hitting a modifier. Now
18430         return type for TRUE, FALSE and other predefined types. Return
18431         identifier as a TREE_LIST list containing the current line context
18432         as the TREE_VALUE sub-node.
18433         (java_unicode_2_utf8): Fixed typo in declaration.
18434         (java_lex_error): Now use the parser context data structure.
18435         *lex.h: Added 1998 time stamp.
18436         (struct java_line): New fields ref_count and next.
18437         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
18438         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
18439         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
18440         *parse.h: Added 1998 time stamp.
18441         (java_parse_source_file): Renamed from parse_source_file.
18442         (YYERROR_NOW, YYNOT_TWICE): Fixed.
18443         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
18444         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
18445         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
18446         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
18447         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
18448         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
18449         (struct parser_ctxt): New data structure to keep the parser context.
18450         *parse.y: Added 1998 time stamp, got rid of static global variables.
18451         (java_error_count, ctxp): New global variables.
18452         (%union): New value field.
18453         (numeric_type, integral_type): Rules removed.
18454         (primitive_type): Rule defined to handle integral, float, double and
18455         boolean types.
18456         (qualified_name, package_declaration,
18457         single_type_import_declaration, type_import_on_demand_declaration,
18458         modifiers, class_declaration, super, interfaces,
18459         interface_type_list, class_body, field_declaration,
18460         field_declaration, variable_declarators, variable_declarator,
18461         variable_declarator_id, method_declaration, method_header,
18462         formal_parameter_list, formal_parameter, method_body, block,
18463         static, interface_declaration, extends_interfaces,
18464         abstract_method_declaration, local_variable_declarators): Rules now
18465         define actions.
18466         (force_error, do_warning): New global statics.
18467         (push_parser_context, parser_context_save_global,
18468         parser_context_restore_global, pop_parser_context): New functions.
18469         (yyerror): Now uses the global parser context. Fixed use of obstack.
18470         (parse_error, parse_error_context, parse_warning_context,
18471         java_accstring_lookup, redefinition_error, check_modifiers,
18472         parser_add_interface, create_interface, create_class, find_field,
18473         duplicate_declaration_error, register_fields, method_header,
18474         check_modifiers_consistency, check_abstract_method_header,
18475         method_declarator, parser_qualified_classname,
18476         parser_check_super_interface, parser_check_super,
18477         parser_chain_incomplete_item, java_check_circular_reference,
18478         layout_class_from_source, java_complete_class,
18479         complete_method_decl, resolve_class, complete_class_report_errors,
18480         java_check_final, check_method_redefinition,
18481         java_check_regular_methods, java_check_abstract_methods,
18482         java_check_methods, lookup_java_interface_method2,
18483         lookup_java_method2, lookup_cl, find_name_in_single_imports,
18484         process_imports, find_in_imports, read_import_entry,
18485         read_import_dir, find_in_imports_on_demand,
18486         check_pkg_class_access, not_builtin_p, declare_local_variables,
18487         source_start_java_method, java_generate_parsed_class): New
18488         functions.
18489         *typeck.c: (signature_include_return): New global variable.
18490         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
18491         to add the function returned type in the signature.
18492
18493 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
18494
18495         * jcf-io.c (open_in_zip): Use strncmp and LEN.
18496
18497 1998-01-29  Dave Brolley  <brolley@cygnus.com>
18498
18499         * Make-lang.in (java.info): Added.
18500         (java.install-info): Added
18501
18502 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
18503
18504         * Makefile.in (clean): Also remove java/parse.c.
18505
18506 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
18507
18508         Add a pair of -fbounds-check/-fno-bounds-check options.
18509         * lang.c (lang_decode_option): Add code to grok arguments.
18510         (flag_bounds_check): Add decl.
18511         (lang_f_options): New array w/ the option in it.
18512         * java-tree.h (flag_bounds_check): Add decl.
18513         * lang-options.h: New file.
18514         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
18515         of a static macro value.
18516         (JAVA_ARRAY_EXCEPTION): Delete macro.
18517
18518 1998-01-23  Per Bothner  <bothner@cygnus.com>
18519
18520         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
18521         * expr.c (build_anewarray):  Add missing promote_type.
18522
18523 1998-01-22  Per Bothner  <bothner@cygnus.com>
18524
18525         Add array types with known length to optimize bounds checking.
18526         * typeck.c (build_java_array_type):  Take length parameter.
18527         (java_array_type_length, build_prim_array_type):  New functions.
18528         * java-tree.h:  Update for new functions.
18529         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
18530         * class.c:  Use build_prim_array_type.
18531         * expr.c (can_widen_reference_to):  Handle known-length array types.
18532         (verify_jvm_instructions):  Keep track of integer push instructions
18533         followed by newarray/anewarray, so we can build known-length arrays.
18534         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
18535         (java_array_data_offset):  New function.
18536         (build_java_array_length_access):  New function.  Optimize if constant.
18537         (build_java_arrayaccess):  Constant fold bounds check.
18538         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
18539         (build_newarray, build_anewarray):  New functions.
18540         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
18541         * verify.c (merge_types):  Handle known-lengh array types.
18542
18543 1998-01-19  Per Bothner  <bothner@cygnus.com>
18544
18545         * expr.c (expand_byte_code):  Fix performace bug, which caused
18546         searching linenumber_table to be linear rather than constant.
18547
18548 1997-12-12  Per Bothner  <bothner@cygnus.com>
18549
18550         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
18551
18552         * decl.c, java-tree.h (soft_fmod_node):  New global.
18553         * decl.c (init_decl_processing):  Define __builtin_fmod.
18554         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
18555         using __builtin_fmod.
18556
18557 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18558
18559         * keyword.h: New file, output of keyword.gperf as processed by
18560         gperf.
18561         * lex.c (java_lex_init): Initialize java_error_flag.
18562         * parse.c (YYERROR_NOW): Uses java_error_flag.
18563         * parse.y: New static java_error_flag. Useless definition of
18564         buffer_error gone.
18565         * parse.y (java_error): Portable error recovery using
18566         java_error_flag (not yet completely tuned).
18567
18568 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
18569
18570         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
18571
18572 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18573
18574         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
18575         (parse.c, lex.c, keyword.h): New rules for Java source code
18576         front-end.
18577         * parse.c: Renamed into jcf-parse.c.
18578         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
18579         * keyword.gperf: New file, Java keywords.
18580         * parse.y: New file, Java language grammar.
18581         * parse.h: New file, Java language grammar definitions.
18582         * lex.c: New file, Java language lexer.
18583         * lex.h: New file, Java language lexer definitions.
18584
18585 1997-12-03  Per Bothner  <bothner@cygnus.com>
18586
18587         * decl.c (clinit_identifier_node), java-tree.h:  New global.
18588         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
18589         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
18590         * expr.c (expand_java_field_op):  Check for invalid assignment
18591         to final field.
18592
18593         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
18594
18595 1997-10-27  Per Bothner  <bothner@cygnus.com>
18596
18597         * verify.c (verify_jvm_instructions):  When processing a handler,
18598         attempt to set the current_subr to the right value.
18599         (More complicated code combines Sep 17 and Oct 22 versions.)
18600
18601 1997-10-24  Per Bothner  <bothner@cygnus.com>
18602
18603         * class.c (push_class):  Figure out (guess) name of source file.
18604         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
18605         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
18606         (parse_class_file):  Change return type from int to void.
18607         Call debug_start_source_file/debug_end_source_file.
18608
18609         * expr.c (build_java_binop):  Fix masking 2nd operand.
18610         * decl.c (init_decl_processing):  Set sizetype first.
18611
18612 1997-10-22  Per Bothner  <bothner@cygnus.com>
18613
18614         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
18615         (Revert Sep 17 change.)
18616
18617 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18618
18619         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
18620         .class extension in their name and fix thing so we don't process
18621         them parse_zip_file_entries().
18622         (parse_zip_file_entries): Cleaned unused local variables.
18623
18624 1997-10-20  Per Bothner  <bothner@cygnus.com>
18625
18626         * expr.c (can_widen_reference_to):  Allows equal array element types.
18627         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
18628         * jcf-dump.c (RET):  Get (and print) index.
18629
18630         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
18631         Promote element type to POINTER_TYPE.
18632
18633 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18634
18635         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
18636         find_in_current_zip, jcf_figure_file_type): Moved from
18637         jcf-reader.c to parse.c.
18638         * zextract.c: (read_zip_archive): takes file_comment_length possible
18639         field into account.
18640
18641 1997-10-20  Per Bothner  <bothner@cygnus.com>
18642
18643         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
18644
18645         * verify.c (merge_types):  Handle array types even better ...
18646
18647 1997-10-17  Per Bothner  <bothner@cygnus.com>
18648
18649         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
18650
18651         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
18652         * class.c (make_class_data):  Don't build fields_decl if no fields.
18653         When building fields_decl, skip if DECL_ARTIFICIAL.
18654
18655         * expr.c (java_stack_swap):  Update stack_type_map.
18656         * verify.c (merge_types):  Handle array types better.
18657
18658 1997-10-15  Per Bothner  <bothner@cygnus.com>
18659
18660         * class.c (add_field):  Don't promote short integral fields to
18661         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
18662         * expr.c (push_value):  Promote and convert short integral values.
18663
18664         * decl.c, java-tree.h (integer_two_node):  New constant node.
18665         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
18666
18667 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18668
18669         * class.c (append_gpp_mangled_type): Use function argument
18670         unpromoted type to generate mangled name.
18671
18672 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18673
18674         * constants.c (build_constant_data_ref): Now uses current_class
18675         instead of main_class.
18676         (build_constants_constructor): Now uses current_class instead of
18677         main_class.
18678         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
18679         of the global variable SeepZipFiles done here.
18680         * zextract.c (read_zip_archive): extra_field optional field taken
18681         into account while computing the position of the class file in the
18682         archive.
18683         * verify.c (verify_jvm_instructions): Use current_jcf to search
18684         the constant pool.
18685         * parse.c (load_class): First search for the class to load in the
18686         current zip file. Saves current_jcf (restored before returning
18687         from that function). Don't call JCF_FINISH in the class was found
18688         in the current ZIP file.
18689         (jcf_parse): If the class was found in the current ZIP file, save
18690         its tree_constant_pool (for later reuse).
18691         (parse_class_file): New function. Process each method defined in
18692         the current class and record the class as to be later registered.
18693         (yyparse): Rewritten. Figure the type of the current file and switch
18694         accordingly.
18695         * lang.c: New global variable current_jcf.
18696         (lang_init): Removed compiling_from_source test (done later, in
18697         yyparse). Removed call the jcf_parse ().
18698         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
18699         (typedef struct JCF): New fields seen_in_zip (to mark a class found
18700         in the current ZIP file) and zip_offset (offset to the class data in
18701         the current zip file).
18702         * jcf-reader.c: zipfile.h included.
18703         localToFile: New ZipFileCache static global variable
18704         (parse_zip_file_entries): New function. Browse the current ZIP
18705         file directory and process each class found.
18706         (process_zip_dir): New function. Register each class found in the
18707         ZIP file directory. The class aren't parsed but a valid JCF is
18708         link to each of them.
18709         (find_in_current_zip): New function. Search for a class in the
18710         current ZIP file directory. If found, prepare the class so that it
18711         can be loaded.
18712         (jcf_figure_file_type): New function. Examine the file structure
18713         to figure a class file, a ZIP file. If none of these categories are
18714         matched, a source file is assumed.
18715         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
18716         SeenZipFile: New global variable.
18717         (open_in_zip): Use zipmember's length to accelerate the search for
18718         a member. If zipmember was NULL and zip file successfully read,
18719         return 0.
18720         * java-tree.h: New global variable current_jcf declared.  Added
18721         declaration for current_constant_pool_tags, current_constant_pool_data,
18722         current_constant_pool_length, current_constant_pool_data_ref.
18723         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
18724         store the JCF of classes seen in a zip file) and tree *constant_pool
18725         (to save a loaded class constant pool). current_class declared here.
18726         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
18727         retrieve method_ref_constant.
18728         (PUSHC): java_push_constant_from_pool now uses current_jcf.
18729         (OBJECT): get_class_constant now uses current_jcf.
18730         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
18731         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
18732         (expand_invoke): Now uses current_class instead of main_class
18733         (build_class_init): Now uses current_class instead of main_class
18734         * class.c: New static global variable registered_class.
18735         (register_class): New function.
18736         (emit_register_class): Modified to use registered_class instead of
18737         main_class
18738         (is_compiled_class): Now take into account class seen in the archive.
18739
18740 1997-10-06  Per Bothner  <bothner@cygnus.com>
18741
18742         * except.h:  Renamed to: java-except.h.
18743         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
18744         * except.c:  Add semi-working (commented out) implementation.
18745
18746         * expr.c (expand_iinc):  Add needed flush_quick_stack.
18747         * parse.c (set_source_filename):  New function.
18748         (give_name_to_class):  Set input_filename from package.classname.java.
18749
18750         * jcf-io.c (find_class):  Don't look first in ".".
18751
18752 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18753
18754         * zextract.c (read_zip_archive): Now takes into account the
18755         extra_field field.
18756         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
18757
18758 1997-09-20  Per Bothner  <bothner@cygnus.com>
18759
18760         * constants.c, java-tree.h (build_internal_class_name):  New function.
18761         (alloc_class_constant):  Re-implement using build_internal_class_name.
18762         * class.c (make_class_data):  Likewise.
18763         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
18764
18765 1997-09-17  Per Bothner  <bothner@cygnus.com>
18766
18767         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
18768         to NULL before pushing an exception handler target.
18769
18770         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
18771         (java_stack_swap, java_stack_dup):  Re-write to be safe from
18772         clobbering registers.
18773         (build_class_init):  New function.
18774
18775 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18776
18777         * typeck.c (build_java_array_type): Temporary use
18778         permanent_obstack to create the array 'length' field.
18779         * expr.c (lookup_label): Temporay use permanent_obstack to create
18780         label if not found.
18781         * class.c (push_super_field): Tempory use permanent_obstack.
18782
18783 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18784
18785         * typeck.c (type_for_mode): Now handles double_type_node and
18786         float_type_node.
18787         * verify.c (verify_jvm_instructions): The instruction following
18788         the wide bytecode is checked. OPCODE_ret added to the list of
18789         wide.
18790
18791 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18792
18793         * class.c (make_class): Temporary use permanent_obstack. Set the
18794         class CLASS_P field to 1.
18795         (push_class): Temporary use permanent_obstack.
18796         (set_super_info): Temporary use permanent_obstack.
18797         (add_method): Temporary use permanent_obstack, set
18798         METHOD_TRANSIENT().
18799         (add_field): Temporary use permanent_obstack. Sets
18800         FIELD_VOLATILE() and FIELD_TRANSIENT().
18801         (build_class_ref): Temporary use permanent_obstack if the class
18802         isn't compiled.
18803         (build_static_field_ref): Temporary use permanent_obstack when
18804         creating field's rtl.
18805         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
18806         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
18807         and fields. Function finalized, as far as flag handling.
18808         (push_class_static_dummy_field): Temporary use permanent_obstack.
18809         (emit_register_class): Force generation of class registration at
18810         -O3 or deeper.
18811         * decl.c (end_java_method): Call permanent_allocation() before
18812         returning.
18813         * expr.c (can_widen_reference_to): Added comment to interface
18814         handling, fixed typo.
18815         (lookup_field): Now uses CLASS_P() to correct FIXME
18816         (expand_invoke): Verification on public && !static &&
18817         !abstract moved into soft_lookupinterfacemethod (kaffe).
18818         Use Object class dtable if objectref is an array when expanding
18819         invokeinterface.
18820         (java_push_constant_from_pool): Temporary use permanent_obstack
18821         for CONSTANT_string
18822         * parse.c (get_ref_constant): Temporary use permanent_obstack to
18823         create constant references.
18824         (get_constant): Temporary use permanent_obstack to create constant.
18825         (load_class): Temporary use permanent_obstack to load class.
18826         (jcf_parse): Temporary use permanent_obstack to perform class
18827         layout.
18828         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
18829         (build_java_signature): Temporary use permanent_obstack.
18830         * verify.c: (verify_jvm_instruction): removed unnecessary verification
18831         on ACC_SUPER flag.
18832         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
18833         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
18834         (CLASS_P): Defined
18835
18836 1997-09-11  Per Bothner  <bothner@cygnus.com>
18837
18838         * class.c (append_gpp_mangled_type):  Fix typo.
18839         (emit_register_class):  Use main_class to get class object, rather
18840         than looking for no-longer-existing static decl starting with _CL.
18841         * typeck.c (parse_signature_type):  Promote array element type
18842         if it is a RECORD_TYPE.
18843
18844 1997-09-10  Per Bothner  <bothner@cygnus.com>
18845
18846         * class.c (push_class_static_dummy_field):  New function.
18847         (mangle_static_field):  New. Do G++-style mangling of static fields.
18848         (layout_class):  Mandle static fields here, not in add_field.
18849         (build_class_ref):  The class object is now a dummy static field.
18850         * decl.c (find_local_variable):  Look for best, instead of first match.
18851         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
18852         (build_java_athrow):  Don't check here if exception is Throwable.
18853         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
18854         (TYPE_USED):  Removed.  No longer used ...
18855         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
18856         * verify.c (push_pending_label):  New function.
18857         (push_pending_block):  Renamed to check_pending_block.
18858         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
18859         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
18860         re-checking possible handlers) after a store (less wasted work).
18861         Check for null handler (finally) before calling add_handler.
18862         Various changes to (finally?) correctly handle try/finally.
18863
18864 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
18865
18866         * class.c: Include stdio.h.
18867
18868 1997-09-04  Per Bothner  <bothner@cygnus.com>
18869
18870         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
18871         to make sure class is initialized before static/special invoke.
18872
18873         * verify.c (verify_jvm_instructions):  On a store instruction,
18874         call find_local_variable to force pre-allocation of decl and rtx.
18875         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
18876
18877 1997-09-03  Per Bothner  <bothner@cygnus.com>
18878
18879         * class.c (build_class_ref):   Strip off "promoted_" if need be.
18880         (make_field_value): Call build_java_signature when needed.
18881         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
18882         * expr.c (build_java_athrow):  Don't push_value of exception.
18883         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
18884         match specification of [fd]cmp[lg] for NaNs.
18885         (expand_byte_code):  Add support for exception handler ranges.
18886         * except.c:  Add skeleton for EH code-generation.
18887         * verify.c (merge_types):  Treat all promoted integral types as equal.
18888         * constants.c (build_constants_constructor):  To force creation of
18889         current_constant_pool_data_ref, call build_constant_data_ref.
18890
18891         * javaop.def (lload):  Fix typo.
18892         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
18893
18894 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
18895
18896         * parse.c: Don't include function.h.
18897
18898 1997-08-27  Per Bothner  <bothner@cygnus.com>
18899
18900         * except.[ch]:  New files.
18901         * Makefile.in (JAVA_OBJS):  Add except.o
18902         * expr.c:  Temporary warning about unimplemented exceptions.
18903         * verify.c:  Verify exception handlers.
18904
18905         * jcf-dump.c (disassemble_method):  Print exception table.
18906
18907 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18908
18909         * expr.c (verify_jvm_instructions): Started a thorough
18910         verification of invoke* bytecodes.
18911         (expand_byte_code): flush quick stack if PC is the target of a
18912         branch.  and undef RET (conflicting with config/i386/i386.h).
18913         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
18914         used.
18915         (expand_invoke): Now handles invokeinterface and do more
18916         verification according to the bytecode.
18917         (lookup_field): Don't try to load the class if processing
18918         dtable_type.
18919         (can_widen_reference_to): Now handles interfaces.
18920         * decl.c (init_decl_processing): New global variable
18921         soft_lookupinterfacemethod_node, declared in java-tree.h.
18922         Call set_super_info on string_type_node.
18923         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
18924         defined.
18925         * class.c (set_super_info): Fills the CLASS_* flags according to
18926         access_flags.
18927         (get_access_flags_from_decl): Handles all class flags.
18928
18929 1997-08-26  Per Bothner  <bothner@cygnus.com>
18930
18931         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
18932         * parse.c (yyparse):  Check for abstract method, and missing code.
18933         * expr.c (expand_byte_code):  Change interface.
18934         * lang.c (put_decl_node):  Print promoted types prettier.
18935         * verify.c (verify_jvm_instruction):  Change interface.
18936         Partial support for scanning exception table.
18937         For load instructions, handle promoted integral types.
18938
18939 1997-08-21  Per Bothner  <bothner@cygnus.com>
18940
18941         * verify.c:  New file, with contents moved from expr.c.
18942         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
18943         * typeck.c (is_array_type_p):  Moved here from expr.c.
18944         * java-tree.h:  Add some now-needed function declarations.
18945         * Makefile.in (JAVA_OBJS): Added verify.o.
18946
18947 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18948
18949         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
18950         METHOD_ABSTRACT flag.
18951
18952         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
18953         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
18954         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
18955
18956         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
18957         variables.
18958         (start_java_method): Hook for SYNCHRONIZED methods.
18959
18960         * expr.c (build_java_jsr, build_java_ret): New functions
18961         (JSR,PRE): New macros
18962         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
18963         (verify_jvm_instructions): tableswitch, lookupswitch,
18964         monitorenter, monitorexit, goto_w: verified.
18965         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
18966         (build_java_monitor): New function.
18967         (MONITOR_OPERATION): Modified to call build_java_monitor()
18968         (verify_jvm_instructions): Started a thorough verification of
18969         invoke* bytecodes.
18970
18971 1997-08-19  Per Bothner  <bothner@cygnus.com>
18972
18973         Support verification of jsr/ret subroutines (used for try/finally).
18974         * decl.c (return_address_type_node):  New type node.
18975         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
18976         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
18977         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
18978         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
18979         TYPE_USED):  New macros for special types in type_map.
18980
18981         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
18982         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
18983         BCODE_JUMP_TARGET.
18984         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
18985
18986         * expr.c (can_widen_reference_to):  New function.
18987         (pop_type):  Use it.
18988         (merge_type_state):  Support handling start of subroutine.
18989         (push_pending_block):  Return char* error message, instead of calling
18990         fatal on an error.  Also handle subroutines.
18991         (verify_jvm_instructions):  Handle errors from push_poending_block.
18992         Support jsr and ret instructions.
18993
18994 1997-08-19  Per Bothner  <bothner@cygnus.com>
18995
18996         * jcf-io.c (find_classfile):  Fix thinko.
18997         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
18998
18999 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
19000
19001         * Makefile.in (BISON): Remove.
19002
19003 1997-08-07  Per Bothner  <bothner@cygnus.com>
19004
19005         * Makefile.in:  Convert to autoconf.
19006         * config-lang.in (outputs):  Added java/Makefile.
19007
19008         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
19009         Rename cc1java to jc1.
19010
19011         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
19012         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
19013
19014         * class.c (class_depth):  Do load_class if needed.
19015
19016         Mostly better verification.
19017         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
19018         (init_decl_processing):  Change return type of soft_checkcast.
19019         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
19020         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
19021         lang_print_error):  New functions.
19022         (lang_init):  Set global hook print_error_function to lang_print_error.
19023         * expr.c:  In the type_map ptr_type_node is only used for null now.
19024         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
19025         (merge_types):  Dererence pointer to record types before comparing.
19026         (decode_newarray_type, merge_types):  On error just return NULL.
19027         (build_java_binop):  Add preliminary implementation (with warning)
19028         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
19029         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
19030         (expand_compare, expand_java_goto, expand_java_call):  Don't
19031         push_pending_block, since that only makes sense when verifying.
19032         (merge_type_state):  Different return codes.
19033         (push_pending_block):  A block may need to be verified more than once.
19034         (expand_byte_code):  Warn about unused code at code generation time.
19035         (verify_jvm_instruction):  Changed logic, since code may need to be
19036         re-verified if type-state has changed.  Also, better error handling.
19037         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
19038         Improve newarray, anewarray, ?aload, athrow,
19039         * java-tree.h (LABEL_CHANGED):  New macro.
19040
19041 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19042
19043         * decl.c (soft_athrow_node): New global variable initialized.
19044         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
19045         * typeck.c (convert): Added support for REAL_TYPE.
19046         (convert_to_char): New function.
19047         (convert): Handle CHAR_TYPE.
19048         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
19049         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
19050         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
19051         promoted type.
19052         (verify_jvm_instructions): Added break a the end of bogus unop: label.
19053         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
19054         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
19055         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
19056         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
19057         to Use The Right Things.
19058         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
19059         compatible with INT. BOOLEAN is made equivalent to BYTE.
19060         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
19061         OPCODE_ifnonnull): Now supported.
19062         (build_java_athrow): New function.
19063
19064 1997-08-04  Per Bothner  <bothner@cygnus.com>
19065
19066         Rename method name <init> to match G++ (and fix mangling).
19067         * class.c (layout_class):  Replace method name of <init> by class name.
19068         (make_method_value):  Do inverse renaming of constructor from <init>.
19069         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
19070         * typeck.c (lookup_java_constructor):  New function.
19071         * expr.c (expand_invoke):  If method_name is <init>, call
19072         lookup_java_constructor to find constructor.
19073
19074         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
19075
19076 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19077
19078         * parse.c (get_class_constant): Modified to handle array "classes"
19079         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
19080         wide type.
19081         (convert): Modified to handle real type.
19082         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
19083         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
19084         variables declared.
19085         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
19086         soft_multianewarray, soft_newarray_node, soft_throw_node): New
19087         global variables initialized.
19088         (find_local_variable): Handles the case of a pointer
19089         (end_java_method): Restore the use of one more scope
19090         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
19091         build_java_array_length_access, expand_java_arrayload,
19092         expand_java_arraystore, expand_java_array_length,
19093         expand_java_multianewarray, expand_java_anewarray,
19094         build_java_check_indexed_type, is_array_type_p,
19095         build_java_throw_out_of_bound_exception): New functions.
19096         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
19097         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
19098         OPCODE_<t>aload): Implemented code for verification.
19099         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
19100         ARRAY_NEW_MULTI): Macro defined.
19101         (CONVERT): Modified to invoke convert().
19102         (case OPCODE_aload2): Fixed index typo from 2 to 1.
19103
19104 1997-07-31  Per Bothner  <bothner@cygnus.com>
19105
19106         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
19107         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
19108         (make_class_data):  Field name needs '/' as package prefix.
19109         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
19110
19111 1997-07-25  Per Bothner  <bothner@cygnus.com>
19112
19113         Implement debug information for local variables.
19114         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
19115         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
19116         DECL_LOCAL_SLOT_CHAIN):  New macros.
19117         (struct lang_decl_var):  New type.
19118         * parse.c (give_name_to_locals):  Move to decl.c.
19119         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
19120         (start_java_method):  Re-write parameter handling.
19121         (pending_local_decls):  New global variable.
19122         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
19123         (find_local_variable):  Accept pc so we can skips decls not in range.
19124         (struct binding_level):  Add end_pc field.
19125         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
19126         (various):  Change so current pc gets passed to find_local_variable.
19127
19128         * decl.c (init_decl_processing):  Re-arrange fields in
19129         class_type_node and and method_type_node to match kaffe 0.9.1.
19130         * class.c (make_method_value, make_class_data):  Update
19131         initializations to match.
19132
19133 1997-07-16  Per Bothner  <bothner@cygnus.com>
19134
19135         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
19136         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
19137         (push_super_field):  New function.
19138         (make_class_data):  Handle inheritance of class static initializer.
19139         (layout_class):  New name mangling.
19140         * constants.c (build_constant_data_ref):  Init type of data array
19141         to a one-element array.
19142         (build_constants_constructor):  Set DECL_SIZE from complete array type.
19143         * decl.c:  Rename class_type, object_type etc to class_type_node,
19144         object_type_node etc.  Make former inherit from latter.
19145         * expr.c (expand_invoke):  Add cast of function address.
19146         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
19147         * parse.c (yyparse):  Don't call layout_class here.
19148         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
19149
19150 1997-06-14  Per Bothner  <bothner@cygnus.com>
19151
19152         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
19153         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
19154         (alloc_class_constant):  New.
19155         * expr.c (expand_invoke):  Make sure method's class is initialized.
19156         * class.c (interits_from_p, emit_register_class):  New functions.
19157         * parse.c (yyparse):  Call emit_register_class.
19158
19159 1997-06-09  Per Bothner  <bothner@cygnus.com>
19160
19161         * constants.c:  New file, to handle constant pool.
19162         * Makefile.in (JAVA_OBJS):  Add constants.o.
19163         * decl.c (init_decl_processing):  Update, fix, finish various structs.
19164         (pushdecl_top_level):  New.
19165         * parse.c (layout_class):  Moved to class.c.
19166         * expr.c (java_push_constant_from_pool):  New function.
19167         * class.c (build_class_ref):  Make work fully
19168         (make_class_data):  Emit super-class, constant pool, interface vector.
19169
19170 1997-06-03  Per Bothner  <bothner@cygnus.com>
19171
19172         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
19173         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
19174         * class.c (class_depth):  New function.
19175         (lookup_named_class):  Replaced by new function lookup_class.
19176         * decl.c (object_type_node, string_type_node):  New.
19177         Remove various types that we no longer need.
19178         * expr.c (verify_jvm_instructions):  New separate verifier pass.
19179         (push_type, pop_type):  New functions for verifier.
19180         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
19181         (expand_byte_code):  Simplify, since we assume already verified.
19182         (expand_invoke):  Now mostly works.
19183         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
19184         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
19185         * parse.c:  Wait to allocate class object until we know its name.
19186         (layout_class):  Calculate DECL_VINDEX for each virtual method.
19187         * typeck.c (get_array_type):  Rename to ...
19188         (build_java_array_type):  ... and provide working implementation.
19189         (build_java_signature):  New function - build Java signature of type.
19190         (set_java_signature):  New function - cache signature with type.
19191         (lookup_java_method):  New function.
19192
19193 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
19194
19195         * class.c (ident_subst):  Take extra SUFFIX parameter.
19196         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
19197         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
19198         (build_class_ref):  Actually implement.
19199         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
19200         * decl.c (builtin_function):  New.
19201         (init_decl_processing):  Update for current Kaffe.  Declare some
19202         builtin Kaffe functions.
19203         * expr.c (build_address_of):  New.
19204         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
19205         Renamed (from expand_java_new etc), and added working implementations.
19206         (build_field_ref):  Now also handle static fields.
19207         (expand_invoke):  Implement invokestatic, and start implement rest.
19208         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
19209         * javaop.def:  Rename invokevirt -> invokevirtual.
19210         * lang.c (use_handles):  Removed.
19211         * parse.c:  Add support for ConstantValue attribute.
19212         Handle nested loading of a class.  (JPOOL_UTF):  New.
19213
19214 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
19215
19216         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
19217
19218 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
19219
19220         * Make-lang.in (java.install-man):  New empty rule.
19221         * typeck.c (set_local_type):  New function.
19222         * expr.c (STORE_INTERNAL):  Call find_local_variable,
19223         not find_stack_slot.  Call set_local_type.
19224
19225 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
19226
19227         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
19228         and building RECORD_TYPE CONSTRUCTORs.
19229         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
19230
19231         * lang.c (use_handles):  Change the default to 0.
19232         * decl.c:  Define and build class_type, field_type, utf8const_type.
19233         * class.c (make_class_data, make_field_value,
19234         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
19235         hashUtf8String, strLengthUtf8, mangled_classname:
19236         Functions to build reflective data structures.
19237         * parse.c (yyparse):  Call make_class_data.
19238
19239         * jcf-io.c (open_class, find_classfile):  New functions.
19240         * jcf-dump.c:  Support reading classfile from explicitly-named
19241         class file (without CLASSPATH searching).
19242
19243 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
19244
19245         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
19246         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
19247         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
19248         (get_constant):  Now trivial for CONSTANT_Utf8.
19249
19250         * jcf.h:  Make NEW_CPOOL the default.
19251         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
19252
19253 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
19254
19255         New directory.