OSDN Git Service

* c-decl.c (grokdeclarator): Don't frob current_function_decl
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-07-02  Richard Henderson  <rth@redhat.com>
2
3         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4
5 2004-07-01  Richard Henderson  <rth@redhat.com>
6
7         * class.c (registerClass_libfunc): Remove.
8         (init_class_processing): Don't set it.
9         (emit_register_classes): Take list_p parameter.  Fill it in
10         with _Jv_RegisterClass calls.
11         * decl.c (java_init_decl_processing): Don't call
12         init_resource_processing.
13         * jcf-parse.c (java_emit_static_constructor): New.
14         (java_parse_file): Call it.
15         * resource.c (registerResource_libfunc): Remove.
16         (init_resource_processing): Remove.
17         (write_resource_constructor): Take list_p parameter.  Fill it in
18         with _Jv_RegisterResource calls.
19         * java-tree.h: Update prototypes.
20
21 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
22
23         PR java/1262
24         * class.c (layout_class_method): Do not override package-private
25         method if its in a different package.
26         (split_qualified_name): Move here from parse.y. Rename from
27         breakdown_qualified. Add comment.
28         (in_same_package): Move here from parse.y. Add comment.
29         * java-tree.h (break_down_qualified, in_same_package): Declare.
30         (in_same_package): Likewise.
31         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
32         Callers updated.
33
34 2004-06-29  Andrew Haley  <aph@redhat.com>
35
36         * except.c (expand_start_java_handler): Push a new binding level.
37         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
38         register_exception_range() to register where we'll do it.
39         (expand_end_java_handler): Remove old bogus code.  Replace with
40         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
41         the top of the expression we're curently building.
42         (maybe_end_try): Delete.
43         * decl.c (binding_level.exception_range): New field.
44         (clear_binding_level): Add field exception_range.  Reformat.
45         (poplevel): Call expand_end_java_handler().
46         (poplevel): Call java_add_stmt only if functionbody is false.
47         (maybe_poplevels): Don't call maybe_end_try() from here.
48         (end_java_method): Clear no longer used trees in function decl.
49         (register_exception_range): New function.
50         * java-tree.h (register_exception_range, struct eh_range): Declare.
51
52 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
53
54         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
55
56 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
57
58         Formatting fixes.
59         * expr.c (class_has_finalize_method): Fix method name indentation.
60         (expand_java_call): Remove K&R style parameter declaration.
61         (expand_invoke): Fix statement indentation.
62         (expand_java_field_op): Likewise.
63         * parse-scan.y: Fix typo.
64         (reset_report): Fix method name indentation.
65         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
66         line. Fix typos.
67         * verify.c (verify_jvm_instructions): Document parameters, insert
68         page break.
69         * lang.c (lang_init_source): Fix method name indentation.
70         * class.c (common_enclosing_context_p): Likewise.
71         (emit_symbol_table): Fix parameter list indentation.
72         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
73         parameter declaration.
74         * constants.c: Fix copyright notice indentation.
75         * typeck.c (find_method_in_superclasses): Fix parameter list
76         indentation.
77         (find_method_in_interfaces): Likewise.
78         * zextract.c (makelong): Fix method name indentation.
79
80 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
81
82         PR java/15715.
83         * parse.y (create_interface): Set correct access modifiers for
84         interfaces.
85         * jcf-write.c (get_classfile_modifiers): New function.
86         (generate_classfile): Use get_classfile_modifiers, not 
87         get_access_flags.
88
89 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
90
91         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
92         dependency to current parser context, not NULL_TREE, for top-level
93         classes.
94         (jdep_resolve_class): Enable member access check for all inner
95         class dependencies.
96
97 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
98
99         * parse.y (qualify_and_find): Pass type decl, not identifier, to 
100         load_class.
101
102 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
103
104         PR java/15734
105         * expr.c (expand_java_field_op): Ensure that target class for static
106         field access has been loaded.
107
108 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
109             Ranjit Mathew  <rmathew@hotmail.com>
110
111         PR java/1207, java/16178
112         * jcf-parse.c (load_class): Return immediately if passed a type decl
113         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
114         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
115         before calling load_class.
116         (qualify_and_find): Likewise.
117         (find_in_imports_on_demand): Likewise.
118         (find_applicable_accessible_methods_list): Likewise.
119
120 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
121
122         * parse.y (java_layout_seen_class_methods): Don't call load_class
123         on class defined by source parser.
124
125 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
126
127         * parse.y (set_nested_class_simple_name_value): Removed.
128         (java_complete_expand_class): Remove calls to
129         set_nested_class_simple_name_value.
130
131 2004-06-22  Andrew Haley  <aph@redhat.com>
132             Ranjit Mathew  <rmathew@hotmail.com>
133         
134         Fixes PR java/16113.
135         * decl.c (force_poplevels): Remove call to expand_end_bindings.
136
137 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
138
139         * parse.y (create_class): Correct diagnostic message about
140         java.lang.Object extending anything else.
141
142 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
143
144         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
145         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
146         * constants.c (build_ref_from_constant_pool): Likewise.
147         * expr.c (build_java_array_length_access): Likewise.
148         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
149         (invoke_build_dtable, build_invokevirtual): Likewise.
150         (build_invokeinterface, java_expand_expr): Likewise.
151         (emit_init_test_initialization): Likewise.
152         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
153         * parse.y (make_qualifed_name, build_array_ref): Likewise.
154         
155 2004-06-21  Andrew Haley  <aph@redhat.com>
156
157         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
158         block.
159
160 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
161
162         * jcf.h (struct JCF): Change java_source, right_zip and finished
163         to unsigned int.
164         * lex.h (struct java_lexer): Change hit_eof, read_anything,
165         byte_swap and use_fallback to unsigned int.
166         * parse.h (struct _jdep): Change flag0 to unsigned int.
167
168 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
169
170         Fixes PR java/13948
171         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
172         before trying to lay out its methods.
173         * jcf-parse.c (read_class): Track parsed files using canonical paths
174         obtained via lrealpath from libiberty.
175         (java_parse_file): Likewise.
176         (parse_source_file_1): Rename formal parameter to reflect its
177         modified purpose. Minor formatting fix.
178
179 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
180
181         * class.c (emit_register_classes): Make the function uninlinable,
182         do not set current_function_cannot_inline.
183         * resource.c (write_resource_constructor): Do not reset
184         flag_inline_functions around rest_of_compilation.
185         
186 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
187
188         PR java/15769
189         * expr.c (java_truthvalue_conversion): Handle
190         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
191         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
192         i.e. return the expression.
193
194 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
195
196         * gjavah.c: Include version.h
197
198 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
199
200         * jcf-write.c (generate_bytecode_conditional): Correct handling
201         of unordered conditionals. Add comment.
202
203 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
204             Per Bothner  <per@bothner.com>
205
206         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
207         local variable was initialised upon declaration.
208         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
209         variable was final and initialised upon declaration.
210         * check-init.c (check_final_reassigned): Give error only if a blank
211         final is not definitely unassigned or if an initialised final is
212         reassigned.
213         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
214         assignment expressions. Remove case MODIFY_EXPR, label do_default.
215         (check_init): Perform initialised-variable-removing-optimisation
216         only on non-final local variables.
217
218 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
219
220         * jcf-write.c (generate_bytecode_conditional): Handle binops 
221         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, 
222         and LTGT_EXPR.
223         (generate_bytecode_insns): Likewise.
224
225 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
226
227         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
228         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
229
230 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
231
232         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
233         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
234
235 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
236
237         * decl.c (struct binding_level): Add GTY marker. Compile
238         binding_depth unconditionally.
239         (current_binding_level, free_binding_level, global_binding_level):
240         Likewise.
241         (clear_binding_level): Unconditionally set binding_depth.
242         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
243
244 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
245
246         * lex.c (java_new_lexer): Set 'encoding'.
247         (java_read_char): Improve error message for unrecognized characters.
248         * lex.h (struct java_lexer): New field 'encoding'.
249
250 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
251
252         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
253
254 2004-05-21  Mark Wielaard  <mark@klomp.org>
255
256         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
257         extern.
258
259 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
260
261         * typeck.c: Remove non-printable character 160.
262
263 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
264
265         * check-init.c: Correct minor typos.
266
267 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
268
269         * Make-lang.in, expr.c, java-gimplify.c: Rename
270         tree-simple.[ch] to tree-gimple.[ch].
271
272 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
273
274         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
275
276 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
277
278         Merge from tree-ssa-20020619-branch.  See
279         ChangeLog.tree-ssa for details.
280
281         * Make-lang.in, builtins.c, check-init.c, class.c,
282         constants.c, decl.c, except.c, expr.c, java-except.h,
283         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
284         lang.c, lang.opt, parse.y, resource.c: Merged.
285         * java-gimplify.c: New file.
286
287 2004-05-10  Andrew Haley  <aph@redhat.com>
288
289         * parse.y (create_class): Set TYPE_VFIELD.
290         * decl.c (java_init_decl_processing): Likewise.
291
292         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
293         * class.c (make_method_value): Replace DECL_VINDEX with call to
294         get_method_index().
295         (get_dispatch_vector): Likewise.
296         (layout_class_method): Likewise.
297         Replace set of DECL_VINDEX with call to set_method_index().
298         (set_method_index): New function.
299         (get_method_index): New function.
300         * java-tree.h (set_method_index): New function decl.
301         (get_method_index): New function decl.
302
303 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
304
305         * parse.y (check_pkg_class_access): Add new argument
306         and use it when cl is NULL to call lookup_cl on it.
307         (parser_check_super_interface): Do not call lookup_cl.
308         Pass this_decl to check_pkg_class_access and NULL
309         instead of lookup_cl.
310         (parser_check_super): Update for change in
311         check_pkg_class_access.
312         (do_resolve_class): Likewise.
313         (process_imports): Likewise.
314         (find_in_imports_on_demand): Likewise.
315         (resolve_qualified_expression_name): Likewise.
316
317 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
318
319         Fixes PR java/9685, PR java/15073
320         * parse.y (accessibility_string): New method.
321         (not_accessible_field_error): Use accessibility_string()
322         instead of java_accstring_lookup().
323         (resolve_qualified_expression_name): Check with
324         check_pkg_class_access() before allowing access using
325         qualified names.
326         Fix comment typo.
327         Use check_pkg_class_access() instead of not_accessible_p()
328         for unqualified types.
329         (not_accessible_p): Use DECL_CONTEXT (member) instead of 
330         REFERENCE for package-private access checking.
331         (patch_method_invocation): Use accessibility_string() instead
332         of java_accstring_lookup().
333
334 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
335
336         Fixes PR java/15133
337         * gjavah.c (struct method_name): Add member is_native.
338         (overloaded_jni_method_exists_p): Match candidate method only if
339         it is native.
340         (print_method_info): Initialise is_native flag from the method's
341         access flags.
342
343 2004-04-30  Roger Sayle  <roger@eyesopen.com>
344
345         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
346         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
347
348 2004-04-22  Roger Sayle  <roger@eyesopen.com>
349
350         * resource.c (write_resource_constructor): Guard call to possibly
351         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
352
353 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
354
355         * class.c (make_class_data): Add new field aux_info.
356         * decl.c (java_init_decl_processing): Push type and decl for 
357         `aux_info'.
358
359 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
360
361         * expr.c (expand_java_NEW): Don't use size argument for 
362         _Jv_AllocObject calls.
363         * parse.y (patch_invoke): Likewise.
364
365 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
366
367         * expr.c (build_invokeinterface): Remove unused variables to
368         fix warnings.
369
370 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
371
372         * class.c (get_interface_method_index): New function. Return dispatch 
373         index for interface method.
374         (make_method_value): For interface methods, set index field to
375         iface dispatch index, not DECL_VINDEX.
376         * expr.c (build_invokeinterface): Use get_interface_method_index.
377
378 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
379
380         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
381
382 2004-03-31  Andrew Haley  <aph@redhat.com>
383
384         PR java/14104
385         * jcf-io.c (opendir_in_zip): Tidy up error handling.
386
387 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
388
389         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
390         form of GTY markers.
391
392 2004-03-25  Marcus Meissner  <meissner@suse.de>
393
394         PR java/14689:
395         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
396
397 2004-03-23  Tom Tromey  <tromey@redhat.com>
398
399         PR java/14315:
400         * jcf-write.c (make_class_file_name): Don't report if mkdir
401         failed with EEXIST.
402
403 2004-03-23  Tom Tromey  <tromey@redhat.com>
404
405         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
406
407 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
408
409         * class.c, gjavah.c, lang.c: Fix comment typos.
410         * gcj.texi: Fix typos.
411
412 2004-03-19  Per Bothner  <per@bothner.com>
413
414         * gcj.texi (Code Generation):  Document new flags and assert defaults.
415
416         * class.c (assume_compiled_node_struct):  Rename type to
417         class_flag_node_struct, as it is now also used for enable_assertions.
418         Rename assume_compiled_node typedef.  Rename excludep field to value.
419         (find_assume_compiled_node):  Rename function to find_class_flag_node.
420         Minor optimization - avoid needless strlen.
421         (add_assume_compiled):  Some tweaking and optimization.
422         Rename and generalize to add_class_flag takem an extra parameter.
423         (add_assume_compled):  New just calls add_class_flag.
424         (add_enable_assert, enable_assertions):  New functions.
425         (enable_assert_tree):  New static.
426         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
427         * lang.opt (fenable-assertions, fenable-assertions=,
428         fdisable-assertions, fdisable-assertions=):  New options.
429         * lang.c (java_handle_option):  Handle new options.
430         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
431         class in an interface - create helper class nested in outer interface.
432         (build_assertion):  Short-circuit if enable_assertions is false.
433
434 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
435
436         * java-tree.h: Changes throughout to add checking to macros
437         and numerous whitespace changes.
438         (VAR_OR_FIELD_CHECK): New macro.
439         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
440         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
441
442 2004-03-16  Per Bothner  <per@bothner.com>
443
444         * jcf-jump.c (options):  New --print-constants option.
445         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
446
447         * jcf-dump.c (flag_print_constant_pool):  Default to off.
448         (print_constant_terse_with_index):  New helper function.
449         (various places):  Check flag_print_constant_pool where missing.
450         (main):  If verbose set flag_print_constant_pool.
451         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
452
453 2004-03-15  Andrew Haley  <aph@redhat.com>
454
455         PR java/14581
456         * parse.y (java_complete_lhs): Check that final variable has an
457         initializer.
458
459 2004-03-12  Andrew Haley  <aph@redhat.com>
460
461         PR java/14551
462         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
463         conversion.
464
465 2004-02-29  Roger Sayle  <roger@eyesopen.com>
466
467         * jcf-parse.c (java_parse_file): Handle the case that input_filename
468         is NULL.
469
470 2004-02-27  Per Bothner  <per@bothner.com>
471
472         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
473         suggestion:  Use build_incomplete_class_ref.
474         This fixes PR java/13508, java/11714.
475
476 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
477
478         * java/parse.h: Update copyright.
479
480 2004-02-26  Andrew Haley  <aph@redhat.com>
481
482         PR java/14231:
483         * parse.y (check_interface_throws_clauses): Check for
484         !METHOD_INVISIBLE (iface_method).
485         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
486         well as CLASS_ABSTRACT.
487
488 2004-02-25  Per Bothner  <per@bothner.com>
489
490         * parse.y (build_assertion):  If we're in an inner class, create the
491         class$ helper routine in the outer class.
492
493 2004-02-19  Richard Henderson  <rth@redhat.com>
494
495         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
496
497 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
498
499         * Make-lang.in (java.install-man): Add extra dependencies.
500
501 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
502
503         * Make-lang.in: Install man pages under the same names
504         (possibly transformed) as the program they document.
505
506 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
507
508         * gjavah.c: Include "intl.h".
509         (error): New function.
510         (main): Call gcc_init_libintl.
511         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
512         print_stub_or_jni, process_file, main): Use error rather than
513         fprintf.
514         (print_method_info, usage, help, version, main): Mark strings for
515         translation with _.  Avoid splitting up sentences.  Send
516         information messages to stdout.
517         * jcf-dump.c: Include "intl.h".
518         (main): Call gcc_init_libintl.
519         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
520         Mark error, usage and version messages for translation with _.
521         Avoid splitting up sentences.
522         * jv-scan.c: Include "intl.h".
523         (fatal_error, warning): Change parameter s to msgid.  Translate
524         messages.
525         (main): Call gcc_init_libintl.
526         (usage, help, version): Mark error, usage and version messages for
527         translation with _.  Avoid splitting up sentences.
528         * jvgenmain.c: Include "intl.h".
529         (main): Call gcc_init_libintl.
530         (usage, main): Mark error messages for translation with _.
531         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
532         JVGENMAIN_OBJS): Add intl.o.
533         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
534         java/jvgenmain.o): Update dependencies.
535
536 2004-02-08  Per Bothner  <per@bothner.com>
537
538         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
539         class don't use not_accessible_field_error, which can get confused.
540
541 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
542
543         Make-lang.in (po-generated):  Delete.
544
545 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
546
547         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
548         Depend on target.h.
549         * decl.c: Include target.h.
550         (start_java_method): Replace PROMOTE_PROTOTYPES with
551         targetm.calls.promote_prototypes.
552         * expr.c: Include target.h.
553         (pop_arguments): Replace PROMOTE_PROTOTYPES with
554         targetm.calls.promote_prototypes.
555         * parse.y: Include target.h.
556         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
557         with targetm.calls.promote_prototypes.
558
559 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
560
561         * typeck.c: Update copyright.
562
563 2004-02-02  Tom Tromey  <tromey@redhat.com>
564
565         * decl.c (java_init_decl_processing): Remove duplicate
566         gnu/gcj/RawData.
567
568 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
569
570         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
571
572 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
573
574         * expr.c (build_field_ref): Move variable
575         definition up.
576
577 2004-01-28  Andrew Haley  <aph@redhat.com>
578
579         * expr.c (build_field_ref): Widen field offset.
580
581 2004-01-27  Andrew Haley  <aph@redhat.com>
582
583         java/13273
584         * parse.y (check_interface_throws_clauses): Make sure class_decl
585         has been loaded.
586
587 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
588
589         PR java/13733
590         * parse.y (patch_assignment): Don't modify lhs_type for
591         reference assignments.
592
593 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
594
595         * Make-lang.in: Replace $(docdir) with doc.
596         (java.info, java.srcinfo, java.man, java.srcman): New rules.
597         (java.install-man): Revamp rule.
598
599 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
600
601         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
602         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
603         instead of deferred backquote.
604
605 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
606
607         * typeck.c (find_method_in_interfaces): Move variable
608         definition up.
609
610 2004-01-16  Andrew Haley  <aph@redhat.com>
611
612         PR java/13273:
613         * typeck.c (shallow_find_method): New.
614         (find_method_in_superclasses): New.
615         (find_method_in_interfaces): New.
616         (lookup_do): Rewrite.
617         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
618
619         * jcf-parse.c (read_class): Save and restore output_class.
620         * decl.c (java_expand_body): Set output_class from fndecl.
621
622 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
623
624         * class.c (gen_indirect_dispatch_tables): Fix string length
625         calculations.
626
627 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
628
629         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
630         (java.srcextra): Copy above back to source directory if requested.
631         (po-generated): Delete reference to $(parsedir).
632         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
633         Use implicit rule.
634
635 2004-01-14  Jan Hubicka  <jh@suse.cz>
636
637         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
638         estimation.
639
640 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
641
642         * java-tree.h (java_expand_expr): Change prototype.
643         * expr.c (java_expand_expr): Add alt_rtl parameter.
644
645 2004-01-09  Andrew Haley  <aph@redhat.com>
646
647         PR java/12755:
648         * parse.y (java_fix_constructors):  Set output_class.
649         (java_reorder_fields): Likewise.
650         (java_layout_classes): Likewise.
651         (java_expand_classes): Generate indirect dispatch tables.
652         (java_expand_classes): Set output_class.
653         (java_finish_classes): Likewise.
654         * lang.c (java_init): Turn on always_initialize_class_p if we're
655         using indirect dis[atch.
656         (java_decl_ok_for_sibcall): Use output_class, not current_class.
657         (java_get_callee_fndecl): Use class local atable.
658         * jcf-parse.c
659         (always_initialize_class_p): Decl moved to java-tree.h.
660         (HANDLE_CLASS_INFO): Set output_class.
661         (read_class): Likewise.
662         (parse_class_file): Call gen_indirect_dispatch_tables.
663         (parse_zip_file_entries): Set output_class.
664         (java_parse_file): Set output_class.  Don't emit symbol tables.
665         * java-tree.h (output_class): New.
666         Remove global declarations for otable, atable, and ctable.
667         (always_initialize_class_p): moved here from decl.c.
668         (DECL_OWNER): New.
669         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
670         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
671         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
672         (struct lang_type): Add otable_methods, otable_decl,
673         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
674         ctable_decl, catch_classes, type_to_runtime_map.
675         * expr.c (build_field_ref): Make otable, atable, and ctable class
676         local rather than global.
677         (build_known_method_ref): Likewise.
678         (build_invokeinterface): Likewise.
679         (java_expand_expr): Pass runtime type (rather than actual type) to
680         expand_start_catch.
681         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
682         this class.  Look up each class in that map to delete duplicates.
683         (expand_end_java_handler): Pass runtime type (rather than actual
684         type) to expand_start_catch.
685         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
686         (do_nothing): New.
687         (java_init_decl_processing): Rearrange things.  Remove global
688         declarations of otable, atable, and ctable.
689         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
690         (java_expand_body): Set output_class.
691         * constants.c (build_constant_data_ref): Use output_class, not
692         current_class.
693         (alloc_name_constant): Likewise.
694         * class.c (gen_indirect_dispatch_tables): New.
695         (build_class_ref): Generate hard reference to superclass, even if
696         using indirect dispatch.
697         (build_static_field_ref): Use class local atable.
698         (make_class_data): Generate hard reference to superclass, even if
699         using indirect dispatch.
700         Generate symbolic references to interfaces when using indirect
701         dispatch.
702         (make_class_data): Emit otable, atable, and ctable.
703         Make otable, atable, and ctable class local rather than global.
704         (emit_catch_table): Make otable, atable, and ctable class local
705         rather than global.
706
707 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
708
709         * parse.y (catch_clause_parameter): Fix typo.
710
711         PR java/13404
712         * parse.y: (catch_clause_parameter): Return early if $3, aka
713         formal_parameter, is null.
714
715 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
716
717         * class.c: Remove uses of "register" specifier in
718         declarations of arguments and local variables.
719         * decl.c: Likewise.
720         * expr.c: Likewise.
721         * gjavah.c: Likewise.
722         * jcf-dump.c: Likewise.
723         * jcf-io.c: Likewise.
724         * jcf-parse.c: Likewise.
725         * jcf-write.c: Likewise.
726         * keyword.h: Likewise.
727         * parse.y: Likewise.
728         * typeck.c: Likewise.
729         * verify.c: Likewise.
730
731 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
732
733         * Make-lang.in (GCJ_CROSS_NAME): Delete.
734         (java.install_common, java.install-man): Adjust for above.
735         (java.uninstall): Likewise.
736
737 2003-12-03  Michael Koch  <konqueror@gmx.de>
738
739         * class.c (make_class_data):
740         Push field value to 'hack_signers' instead of 'signers'.
741         * decl.c (java_init_decl_processing):
742         Push field 'hack_signers' instead of 'signers'.
743
744 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
745
746         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
747         including iconv.h.
748
749 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
750
751         PR java/12374:
752         * parse.y (qualify_ambiguous_name): Remove lots of broken
753         field access processing - there's no need to do that here,
754         because we have resolve_field_access.  Remove
755         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
756         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
757         used.
758
759 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
760
761         Fix PR java/13237
762         * parse.y (java_complete_lhs): Save location prior to patching
763         CALL_EXPR.
764
765 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
766
767         PR java/12548
768         * resource.c (write_resource_constructor): Append
769         "_resource" to constructor identifier name.
770
771 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
772
773         Fix PR java/13183.
774         * constants.c (cpool_for_class): New function.
775         (outgoing_cpool): Remove global variable.
776         (alloc_name_constant): Use cpool_for_class.
777         (build_constants_constructor): Likewise.
778         * decl.c (java_expand_body): Set current_class.
779         * java-tree.h (outgoing_cpool) Remove declaration.
780         (init_outgoing_cpool): Likewise.
781         * jcf-parse.c (init_outgoing_cpool): Remove function.
782         (parse_class_file): Don't call init_outgoing_cpool.
783         * parse.y (java_complete_expand_methods): Don't call
784         init_outgoing_cpool.  Don't save outgoing_cpool.
785         (java_expand_classes): Don't restore outgoing_cpool.
786         (java_finish_classes): Likewise.
787
788 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
789
790         * Make-lang.in: (java.install-common) Add
791         symlink for $(target_noncanonical)-gcjh for
792         native builds.
793
794 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
795
796         * Make-lang.in (java.extraclean): Delete.
797
798 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
799
800         * Make-lang.in (check-java): Add.
801
802 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
803
804         Fix PR java/13024.
805         * except.c (prepare_eh_table_type): Allocate variable-sized
806         buffer `buf' with alloca.
807
808 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
809
810         Fix PR java/12857.
811
812         decl.c (java_init_decl_processing): Don't initialize
813         class_not_found_type_node, no_class_def_found_type_node.
814
815         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
816         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
817         (class_not_found_type_node, no_class_def_found_type_node):
818         Don't define.
819
820         parse.y (build_dot_class_method_invocation): Add this_class
821         argument.  Qualify method invocations to a different class.
822         (create_new_parser_context): Initialize saved_data_ctx to 0.
823         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
824         (build_dot_class_method): Don't load classes.  Register
825         incomplete types.
826         (build_incomplete_class_ref): Special cases for interfaces
827         and inner classes.  Move build_dot_class_method call to here...
828         (patch_incomplete_class_ref): ...from here.  Pass current_class
829         to build_dot_class_method_invocation.
830         (build_assertion): Pass class_type to
831         build_dot_class_method_invocation.
832         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
833
834 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
835
836         Fix PR java/12739.
837         * java-tree.h (BLOCK_EMPTY_P): Define.
838         * parse.y (java_complete_lhs): Check for empty blocks
839         in TRY_FINALLY_EXPR case.
840
841 2003-11-17  Andrew Haley  <aph@redhat.com>
842
843         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
844         (struct lang_decl_var:freed): New variable.
845         * decl.c (poplevel): Mark local vars that have gone out of scope.
846         (push_jvm_slot): Don't use the RTL of a var that has gone out of
847         scope.
848
849 2003-11-16  Jason Merrill  <jason@redhat.com>
850
851         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
852         and TAGS files that include them for each front end.
853
854 2003-11-15  Tom Tromey  <tromey@redhat.com>
855
856         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
857
858 2003-11-12  Jason Merrill  <jason@redhat.com>
859
860         PR optimization/12547
861         * lang.c (java_tree_inlining_walk_subtrees): Just walk
862         BLOCK_EXPR_BODY directly.
863
864 2003-11-12  Andrew Haley  <aph@redhat.com>
865
866         PR java/11045
867         * parse.y (fold_constant_for_init): Check that we really do have a
868         constant.
869
870         PR java/11533
871         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
872         init_test_decls being inlined.
873
874         PR java/12890:
875         * parse.y (do_resolve_class): Check return value from
876         breakdown_qualified().
877
878 2003-11-11  Tom Tromey  <tromey@redhat.com>
879
880         PR java/12915:
881         * parse.y (merge_string_cste): Handle case where we have a
882         pointer that happens to be zero, not null_pointer_node.
883
884 2003-11-10  Tom Tromey  <tromey@redhat.com>
885
886         * jcf-parse.c (classify_zip_file): Correctly compare
887         filename_length against length of manifest file's name.
888
889 2003-11-08  Tom Tromey  <tromey@redhat.com>
890
891         PR java/12894:
892         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
893
894 2003-11-06  Andrew Haley  <aph@redhat.com>
895
896         * expr.c (java_stack_swap): Make sure destination stack slots are
897         of the correct type.
898
899 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
900
901         * Make-lang.in (dvi): Move targets to $(docobjdir).
902         (gcj.dvi): Simplify rule and adjust target.
903         (gcj.info): Simplify rule.
904         (gcj.pod): New intermediate rule.
905         (gcjh.pod): Likewise.
906         (jv-scan.pod): Likewise.
907         (jcf-dump.pod): Likewise.
908         (gij.pod): Likewise.
909         (jv-convert.pod): Likewise.
910         (rmic.pod): Likewise.
911         (rmiregistry.pod): Likewise.
912         (gcj.1): Delete.
913         (gcjh.1): Delete.
914         (jv-scan.1): Delete.
915         (jcf-dump.1): Delete.
916         (gij.1): Delete.
917         (jv-convert.1): Delete.
918         (rmic.1): Delete.
919         (rmiregistry.1): Delete.
920
921 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
922
923         Fixes PR java/12866.
924         * parse.y (resolve_qualified_expression_name): Move test
925         for outer field access methods from here...
926         (check_thrown_exceptions) ...to here.
927
928 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
929
930         * .cvsignore: Delete.
931
932 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
933
934         * verify.c (verify_jvm_instructions): Don't warn about legal
935         eh binding regions generated for example by jdk 1.4.1.
936
937 2003-10-24  David S. Miller  <davem@redhat.com>
938
939         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
940
941 2003-10-22  Andrew Haley  <aph@redhat.com>
942
943         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
944         (java_get_callee_fndecl): New.
945
946         * jcf-parse.c (java_parse_file): Call emit_catch_table().
947
948         * java-tree.h (ctable_decl): New.
949         (catch_classes):  New.
950         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
951
952         * decl.c (java_init_decl_processing): Add catch_class_type.
953         Add ctable_decl.
954         Add catch_classes field.
955
956         * class.c (build_indirect_class_ref): Break out from
957         build_class_ref.
958         (make_field_value): Check flag_indirect_dispatch.
959         (make_class_data): Ditto.
960         Tidy uses of PUSH_FIELD_VALUE.
961         Add field catch_classes.
962         (make_catch_class_record): New.
963
964         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
965
966 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
967
968         * jcf-write.c: Follow spelling conventions.
969         * parse.y: Likewise.
970
971 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
972
973         * ChangeLog: Fix typos.
974         * expr.c: Fix comment typos.
975         * jcf-write.c: Likewise.
976         * lang.c: Likewise.
977         * lex.c: Likewise.
978         * mangle.c: Likewise.
979         * parse-scan.y: Likewise.
980         * parse.y: Likewise.
981
982 2003-10-22  Tom Tromey  <tromey@redhat.com>
983
984         * expr.c (expand_byte_code): Only warn about dead bytecode when
985         extra_warnings is set.
986
987 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
988
989         Fix for PR java/12586.
990         * mangle.c (find_compression_record_match): Don't iterate through
991         package namespace elements unless they all match compression_table
992         entries.
993
994 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
995
996         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
997         (generate-manpages): Likewise.
998         (java.maintainer-clean): Likewise.
999         (gcj.info): Likewise.
1000         (gcj.1): Likewise.
1001         (gcjh.1): Likewise.
1002         (jv-scan.1): Likewise.
1003         (jcf-dump.1): Likewise.
1004         (gij.1): Likewise.
1005         (jv-convert.1): Likewise.
1006         (rmic.1): Likewise.
1007         (rmiregistry.1): Likewise.
1008         (java.install-man): Likewise.
1009         (parse-scan.o): Move and define complete compile line.
1010         (parse.o): Likewise.
1011         (jcf-tree-inline.o): Move.
1012
1013 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
1014
1015         * Make-lang.in (info): Update dependencies.
1016         (java.install-info): Remove.
1017         ($(srcdir)/java/gcj.info): Replace with ...
1018         ($(docobjdir)/gcj.info): ... this.
1019
1020 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
1021
1022         * Make-lang.in: Replace uses of $(target_alias) with
1023         $(target_noncanonical).
1024
1025 2003-10-09  Tom Tromey  <tromey@redhat.com>
1026
1027         * decl.c (java_init_decl_processing): Declare signers field.
1028         * class.c (make_class_data): Set signers field.
1029
1030 2003-10-09  Jason Merrill  <jason@redhat.com>
1031
1032         * parse.y (patch_assignment): Use make_node to create a BLOCK.
1033         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1034         POINTER_TYPE.
1035
1036 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1037
1038         * Make-lang.in (java.info): Replace with ...
1039         (info): ... this.
1040         (java.dvi): Replace with ...
1041         (dvi): ... this.
1042         (java.generated-manpages): Replace with ...
1043
1044 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
1045
1046         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1047
1048 2003-10-01  Andrew Haley  <aph@redhat.com>
1049
1050         * jcf-parse.c (java_parse_file): Write otable and atable.
1051         * java-tree.h (atable_methods): New.
1052         (atable_decl): New.
1053         (atable_syms_decl): New.
1054         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1055         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1056         (symbol_*type): Rename method_symbol* to symbol*type.
1057         (emit_offset_symbol_table): Delete.
1058         (emit_symbol_table): New.
1059         (get_symbol_table_index): New.
1060         (atable_type): New.
1061         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1062         (build_known_method_ref): Likewise.
1063         (get_symbol_table_index): Rename from get_offset_table_index.
1064         Parameterize to allow re-use by differing types of symbol table.
1065         (build_invokevirtual): Pass table to get_offset_table_index.
1066         * decl.c (java_init_decl_processing): Push types and decls for
1067         atable and atable_syyms.
1068         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1069         (make_class_data): Add new fields atable and atable_syms.
1070         (emit_symbol_table): Rename from emit_offset_symbol_table.
1071         Parameterize to allow re-use by different types of symbol table.
1072         (build_symbol_entry): Renamed from build_method_symbols_entry.
1073
1074 2003-09-30  Roger Sayle  <roger@eyesopen.com>
1075
1076         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1077         semantics for SAVE_EXPR, by caching the result in a temporary.
1078
1079 2003-09-28  Richard Henderson  <rth@redhat.com>
1080
1081         * check-init.c (check_init): Save and restore input_location
1082         instead of file and line separately.
1083         * decl.c (java_expand_body): Likewise.
1084         * jcf-write.c (generate_bytecode_insns): Likewise.
1085         * parse.y (safe_layout_class): Likewise.
1086         * jcf-parse.c (read_class, parse_class_file): Likewise.
1087         (java_parse_file): Use %H for warning locator.
1088
1089 2003-09-28  Roger Sayle  <roger@eyesopen.com>
1090
1091         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1092         with void-type branches instead of using a COMPOUND_EXPR.
1093
1094 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
1095
1096         * decl.c (java_optimize_inline, dump_function): Remove.
1097         * java-tree.h (java_optimize_inline): Remove declaration.
1098         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1099         * parse.y (source_end_java_method, java_expand_classes):
1100         Likewise.  Remove dead code.
1101
1102 2003-09-27  Roger Sayle  <roger@eyesopen.com>
1103
1104         * lang.c (java_init_options): Set flag_evaluation_order.
1105         * expr.c (force_evaluation_order): Don't attempt to force
1106         evaluation order of binary operations using save_expr.
1107         * parse.y (java_complete_lhs): No longer need to call
1108         force_evaluation_order when constructing binary operators.
1109
1110 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1111             Bryce McKinlay  <bryce@mckinlay.net.nz>
1112
1113         PR java/1333:
1114         * parse.y (not_accessible_field_error): New function.
1115         (resolve_expression_name): Check field access permissions.
1116         (resolve_qualified_expression_name): Use
1117         not_accessible_field_error.
1118         (resolve_qualified_expression_name): Likewise.
1119
1120 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1121
1122         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1123
1124 2003-09-23  Roger Sayle  <roger@eyesopen.com>
1125
1126         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1127         with equal operands without side-effects.
1128
1129 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
1130
1131         * decl.c (java_init_decl_processing): Don't emit otable decls
1132         if flag_indirect_dispatch is not set.
1133
1134 2003-09-21  Richard Henderson  <rth@redhat.com>
1135
1136         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1137         resource.c: Revert.
1138
1139 2003-09-21  Richard Henderson  <rth@redhat.com>
1140
1141         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1142         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1143
1144 2003-09-20  Richard Henderson  <rth@redhat.com>
1145
1146         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1147
1148 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1149
1150         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1151         * check-init.c (check_init): Likewise.
1152
1153 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1154
1155         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1156
1157 2003-09-16  Andrew Haley  <aph@redhat.com>
1158
1159         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1160
1161 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
1162
1163         Fixes PR java/9577
1164         * mangle.c (find_compression_record_match): Skip
1165         over a "6JArray" (the array template mangled string)
1166         IDENTIFIER_NODE.
1167         (mangle_array_type): Correct minor typo.
1168         (atms): Move definition to the beginning.
1169
1170 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
1171
1172         * class.c (add_miranda_methods): Ensure super-interfaces are laid
1173         out. Fix for PR java/12254.
1174
1175 2003-09-11  Richard Henderson  <rth@redhat.com>
1176
1177         * parse.y (source_end_java_method): Update for new
1178         cgraph_finalize_function argument.
1179
1180 2003-09-09  Richard Henderson  <rth@redhat.com>
1181
1182         * parse.y (source_end_java_method): Update call to
1183         cgraph_finalize_function.
1184
1185 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
1186
1187         * decl.c (java_expand_body): New function.
1188         * expr.c (build_class_init): Set DECL_IGNORED_P.
1189         * java-tree.h (start_complete_expand_method,
1190         java_expand_body): Declare.
1191         * jcf-parse.c (cgraph.h): Include.
1192         (java_parse_file): Handle flag_unit_at_a_time.
1193         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1194         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1195         (java_estimate_num_insns): Use walk_tree_without_duplicates.
1196         (java_start_inlining): New function.
1197         * parse.h (java_finish_classes): Declare.
1198         * parse.y: Include cgraph.h.
1199         (block): Don't special-case empty block production.
1200         (craft_constructor): Set DECL_INLINE.
1201         (source_end_java_method): Handle flag_unit_at_a_time.
1202         Replace inline code with call to java_expand_body.
1203         (start_complete_expand_method): Remove static modifier.
1204         (java_expand_method_bodies): Patch function tree for
1205         class initialization and/or synchronization as needed.
1206         Don't begin RTL expansion yet.
1207         (java_expand_classes): Check flag_unit_at_a_time before
1208         calling finish_class.
1209         (java_finish_classes): New function.
1210         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1211         (patch_assignment): Set DECL_CONTEXT on temporary variable.
1212         (emit_test_initialization): Set DECL_IGNORED_P.
1213
1214 2003-09-03  Roger Sayle  <roger@eyesopen.com>
1215
1216         * builtins.c (enum builtin_type): Delete unused enumeration.
1217         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1218
1219 2003-08-28  Tom Tromey  <tromey@redhat.com>
1220
1221         * gcj.texi (Extensions): Document gcjlib URLs.
1222
1223 2003-08-20  Tom Tromey  <tromey@redhat.com>
1224
1225         * gcj.texi (Extensions): Added xref.
1226         (libgcj Runtime Properties): Document
1227         gnu.gcj.runtime.VMClassLoader.library_control.
1228
1229 2003-08-20  Andrew Haley  <aph@redhat.com>
1230
1231         * except.c (prepare_eh_table_type): Use new encoding for exception
1232         handlers when using -fno-assume-compiled.
1233
1234 2003-08-13  Tom Tromey  <tromey@redhat.com>
1235
1236         * gcj.texi (Invoking gij): Document -X and -?.
1237
1238 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
1239
1240         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1241         GCJH_OBJS, JCFDUMP_OBJS
1242         * win32-host.c: Removed the unnecessary and broken dependency
1243         on jcf.h
1244
1245 2003-08-11  Tom Tromey  <tromey@redhat.com>
1246
1247         * parse.y (java_check_regular_methods): Typo fixes.  Call
1248         check_interface_throws_clauses.  Use
1249         check_concrete_throws_clauses.
1250         (check_interface_throws_clauses): New function.
1251         (check_concrete_throws_clauses): New function.
1252         (hack_is_accessible_p): New function.
1253         (find_most_specific_methods_list): Added FIXME.
1254         * typeck.c (lookup_do): Use `flags' argument to decide what to
1255         do.  Reimplemented.
1256         (lookup_argument_method_generic): New function.
1257         (lookup_argument_method2): Removed.
1258         * jcf.h (ACC_INVISIBLE): New define.
1259         * jcf-write.c (generate_classfile): Skip invisible methods.
1260         * class.c (add_miranda_methods): New function.
1261         (layout_class_methods): Use it.
1262         (get_access_flags_from_decl): Use ACC_INVISIBLE.
1263         * java-tree.h (METHOD_INVISIBLE): New define.
1264         (lang_decl_func) [invisible]: New field.
1265         (lookup_argument_method_generic): Declare.
1266         (SEARCH_INTERFACE): New define.
1267         (SEARCH_SUPER): Likewise.
1268         (SEARCH_ONLY_INTERFACE): Likewise.
1269         (SEARCH_VISIBLE): Likewise.
1270         (lookup_argument_method2): Removed declaration.
1271
1272 2003-08-05  Tom Tromey  <tromey@redhat.com>
1273
1274         Fix for PR java/11600:
1275         * parse.y (java_complete_lhs): See whether we're calling a method
1276         on an array.
1277         (check_thrown_exceptions): Added `is_array_call' argument;
1278         fixed `clone' checking; updated all callers.
1279
1280 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1281
1282         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1283
1284 2003-08-03  Tom Tromey  <tromey@redhat.com>
1285
1286         * java-tree.h (METHOD_TRANSIENT): Removed.
1287         * decl.c (pushdecl): Removed some dead code.
1288         * class.c (get_access_flags_from_decl): Can't have transient
1289         method.
1290         (add_method_1): Can't have a transient method.
1291
1292 2003-07-28  Andreas Jaeger  <aj@suse.de>
1293
1294         * jvspec.c: Convert to ISO C90 prototypes.
1295
1296 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1297
1298         * decl.c (force_poplevels): Fix warning call.
1299
1300 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1301
1302         * expr.c (expand_java_field_op): Don't use xxx_with_decl
1303         (expand_java_field_op): Likewise.
1304         * class.c (layout_class_method): Likewise
1305         (emit_register_classes): Likewise.
1306         * decl.c (pushdecl): Likewise.
1307         (poplevel): Likewise.
1308         (force_poplevels): Likewise.
1309         (give_name_to_locals): Likewise.
1310         * check-init.c (check_for_initialization): Likewise.
1311
1312 2003-07-24  Jason Merrill  <jason@redhat.com>
1313
1314         * java-tree.h: Move boolean_type_node et al to the back end.
1315
1316 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1317
1318         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1319         casts.
1320
1321 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
1322
1323         * lang.opt: Don't show -MD_ and -MDD_.
1324
1325 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
1326
1327         * lang-options.h: Remove.
1328         * lang.opt: Add help text.
1329
1330 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
1331
1332         * expr.c: Remove the last argument to expand_assignment().
1333
1334 2003-07-09  Jan Hubicka  <jh@suse.cz>
1335
1336         * java-tree.h (DECL_NUM_STMTS): Rename to...
1337         (DECL_ESTIMATED_INSNS): ... this.
1338         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1339         New static functions.
1340         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1341         * parser.y (add_stmt_to_compound): Do not account statements.
1342
1343 2003-07-08  Mark Wielaard  <mark@klomp.org>
1344
1345         * gcj.texi: CNI now expands to Compiled Native Interface.
1346
1347 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1348
1349         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1350
1351 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1352
1353         * expr.c (expand_byte_code): Adjist emit_line_note call.
1354
1355 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1356
1357         * lang.c (java_handle_option): Don't handle filenames.
1358
1359 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
1360
1361         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1362         DIR_SEPARATOR.
1363         Use FILENAME_CMP.
1364         * jcf-write.c: Don't default-define DIR_SEPARATOR.
1365         * jcf.h: Delete COMPARE_FILENAMES definition.
1366
1367 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
1368
1369         * lang.c (java_init_options): Update prototype.
1370
1371 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1372
1373         * decl.c (poplevel): Adjust define_label call.
1374
1375 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1376
1377         * gjavah.c (flag_jni): Make non-static.
1378         * parse-scan.y (ctxp): Make non-static.
1379
1380         * class.c (build_method_symbols_entry)
1381         * expr.c (get_offset_table_index)
1382         * jcf-parse.c (jcf_parse):
1383         Mark the definition static, matching the forward declaration.
1384
1385 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
1386
1387         * lang.c (java_handle_option): Don't check for missing arguments.
1388
1389 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1390
1391         * class.c (push_class): Use a location_t to save place.
1392         (emit_register_classes): Set input_location. Adjust
1393         expand_function_end call.
1394         * resource.c (write_resource_constructor): Likewise.
1395         * decl.c (end_java_method): Adjust expand_function_end call.
1396         * parse.y (source_end_java_method): Likewise.
1397
1398 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1399
1400         * lang.c (java_handle_option): Likewise.
1401
1402 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
1403
1404         * lang.c (java_handle_option): Special-casing of optional
1405         joined arguments no longer needed.
1406         * lang.opt: Update switches that take optional argument.
1407
1408 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1409
1410         * lang.opt: Declare Java.
1411         * lang.c (java_init_options): Update.
1412
1413 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
1414
1415         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1416
1417 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1418
1419         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1420         * lang.c (java_handle_option): -MD and -MMD have an underscore.
1421         * lang.opt: -MD and -MMD have an underscore.
1422
1423 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1424
1425         * class.c (emit_register_classes): Adjust init_function_start
1426         call.
1427         * decl.c (complete_start_java_method): Likewise.
1428         * resource.c (write_resource_constructor): Likewise.
1429
1430 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1431
1432         * Make-lang.in: Update to use options.c and options.h.
1433         * lang.c: Include options.h not j-options.h.
1434         (java_handle_option): Abort on unrecognized option.
1435         (java_init_options): Request Java switches.
1436
1437 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
1438
1439         * Make-lang.in: Handle mostlyclean.
1440
1441 2003-06-11  Tom Tromey  <tromey@redhat.com>
1442
1443         * lang.c (java_handle_option): Update dependency_tracking for
1444         OPT_MF case.
1445
1446         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1447         empty argument.
1448
1449 2003-06-10  Andrew Haley  <aph@redhat.com>
1450
1451         * resource.c (write_resource_constructor): Use expand_expr to
1452         generate the address of the label attached to a resource.
1453         * Make-lang.in (java/resource.o): Add expr.h
1454
1455 2003-06-10  Andrew Haley  <aph@redhat.com>
1456
1457         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1458         (java_decl_ok_for_sibcall): New.
1459
1460 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
1461
1462         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1463         (java/j-options.c, java/j-options.h): New.
1464         * java-tree.h (resource_name, compile_resource_file,
1465         compile_resource_data): Constify.
1466         * jcf-write.c (jcf_write_base_directory): Similarly.
1467         * jcf.h (jcf_write_base_directory): Similarly.
1468         * lang.c: Include j-options.h.
1469         (cl_options_count, cl_options, string_option, java_decode_option,
1470         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1471         process_option_with_no): Remove.
1472         (resource_name): Constify.
1473         (LANG_HOOKS_HANDLE_OPTION): Override.
1474         (java_handle_option): New.
1475         (java_init): Don't call jcf_path_init.
1476         (java_init_options): Call jcf_path_init.
1477         * lang.opt: New.
1478         * resource.c (compile_resource_data, compile_resource_file): Constify.
1479
1480 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
1481
1482         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1483         (struct lang_decl_func): Add last_line field.
1484         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1485         DECL_SOURCE_LINE_LAST): Remove.
1486         * parse.y (missing_return_error, finish_method_declaration,
1487         lookup_cl, start_artificial_method_body, source_end_java_method,
1488         start_complete_expand_method): Adjust.
1489
1490 2003-06-08  Tom Tromey  <tromey@redhat.com>
1491
1492         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1493         fno-assume-compiled.
1494
1495 2003-06-08  Roger Sayle  <roger@eyesopen.com>
1496
1497         * builtins.c (define_builtin_type, builtin_types): Delete.
1498         (define_builtin): Rewritten to take just the built-in code,
1499         the function's name, type and fallback library function name.
1500         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1501         (initialize_builtins): Overhaul to define the GCC builtins
1502         used by gcj manually, providing the Java run-time's
1503         implementations as the fallback library function.
1504
1505 2003-06-08  Anthony Green  <green@redhat.com>
1506
1507         * parse.y (patch_cast): Fix conversions from floating-point to
1508         integral types.
1509
1510 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
1511
1512         * Make-lang.in: Update.
1513         * lang.c: Include opts.h. Define cl_options_count and cl_options.
1514
1515 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1516
1517         * lang.c (java_init_options): Update.
1518
1519 2003-06-05  Jan Hubicka  <jh@suse.cz>
1520
1521         * Make-lang.in:  Add support for stageprofile and stagefeedback
1522
1523 2003-05-31  Roger Sayle  <roger@eyesopen.com>
1524
1525         * lang.c (java_init_options): Prescribe wrap-around two's
1526         complement arithmetic overflow by setting flag_wrapv.
1527
1528 2003-05-29  Roger Sayle  <roger@eyesopen.com>
1529
1530         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1531         (builtin_record): Add an additional builtin_code field to
1532         record which GCC built-in corresponds to the Java function.
1533         (java_builtins):  Add new entries for atan, atan2, exp, log,
1534         pow and tan.
1535         (max_builtin, min_builtin, abs_builtin): Perform constant
1536         folding on the resulting tree.
1537         (java_build_function_call_expr): Likewise, perform constant
1538         folding on the resulting tree.
1539         (initialize_builtins): The NULL creators are now allowed in
1540         the java_builtins table, which is now terminated by an entry
1541         with builtin_code == END_BUILTINS.
1542         (check_for_builtin): Likewise.  If the matching creator is
1543         NULL, construct the call using java_build_function_call_expr
1544         directly with the decl for the corresponding builtin_code.
1545
1546 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1547
1548         * win32-host.c: Normalize copyright boilerplate.
1549
1550 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1551
1552         * parse.y (print_int_node): Use string concatentation on
1553         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1554         function calls into one.
1555
1556 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
1557
1558         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1559         fatal_io_error with calls to fatal_error; add ": %m" to the end of
1560         all the affected error messages.
1561
1562 2003-05-13  Richard Henderson  <rth@redhat.com>
1563
1564         * class.c (layout_class_method): Set DECL_EXTERNAL.
1565         * decl.c (java_mark_decl_local, java_mark_class_local): New.
1566         * java-tree.h (java_mark_class_local): Declare.
1567         * jcf-parse.c (parse_class_file): Use it.
1568         * parse.y (java_expand_classes): Likewise.
1569
1570 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
1571
1572         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1573         * lex.h: #include input.h.
1574         * jv-scan.c (input_filename): Remove.
1575
1576 2003-05-02  Tom Tromey  <tromey@redhat.com>
1577
1578         PR java/10491:
1579         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1580         (handle_inner_classes): New function.
1581
1582 2003-05-01  Tom Tromey  <tromey@redhat.com>
1583
1584         PR java/10459:
1585         * parse.y (finish_for_loop): Do nothing if update expression is a
1586         EXPR_WFL_NODE wrapping nothing.
1587         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1588
1589 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
1590
1591         * lex.h (input_lineno): Remove declaration.
1592         * parse-scan.y: #include input.h.
1593         (input_filename): Remove declaration.
1594         (input_location): Add definition.
1595         (input_line): Remove definition.
1596
1597 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1598
1599         * lex.h (lineno): Rename to ...
1600         (input_line): ... here
1601         * parse-scan.y (lineno): Rename to ...
1602         (input_line): ... here.
1603         (reset_report): Rename lineno to input_line.
1604         * check-init.c (check_init): Likewise.
1605         * class.c (push_class): Likewise.
1606         * decl.c (complete_start_java_method, end_java_method): Likewise.
1607         * expr.c (expand_byte_code): Likewise.
1608         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1609         * jcf-write.c (generate_bytecode_insns): Likewise.
1610         * lex.c (java_init_lex, java_allocate_new_line,
1611         do_java_lex): Likewise.
1612         * parse.h (YYNOT_TWICE): Likewise.
1613         * parse.y (empty_statement, expression_statement,
1614         java_pop_parser_context, java_parser_context_save_global,
1615         yyerror, register_fields, method_header, safe_layout_class,
1616         find_in_imports_on_demand, create_artificial_method,
1617         source_end_java_method, start_complete_expand_method,
1618         build_thisn_assign, java_complete_lhs,
1619         maybe_absorb_scoping_block): Likewise.
1620
1621 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
1622
1623         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1624         '/' when computing java source filename
1625
1626 2003-04-13  Tom Tromey  <tromey@redhat.com>
1627
1628         * gjavah.c (print_c_decl): Indentation fix.
1629
1630 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
1631
1632         * class.c (make_field_value, make_method_value, get_dispatch_table)
1633         (make_class_data, emit_offset_symbol_table)
1634         * constants.c (build_constants_constructor)
1635         * java-tree.h (START_RECORD_CONSTRUCTOR)
1636         * parse.y (maybe_build_array_element_wfl):
1637         Use build_constructor.
1638
1639 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
1640
1641         PR java/10253:
1642         * parse.y (string_convert_int_cst): Always use at least one digit
1643         in string conversion. Remove ASCII dependence.
1644         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
1645
1646 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
1647
1648         * Make-lang.in: added win32-host.c
1649         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
1650         resolves to open() on non-Win32 platforms and
1651         Win32-specific jcf_open_exact_case() on Win32
1652         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
1653         when trying .java and .class files
1654         * win32-host.c: added to repository. Defines
1655         Win32-specific jcf_open_exact_case()
1656
1657 2003-04-10  Andrew Haley  <aph@redhat.com>
1658
1659         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
1660         (maybe_free_localvar): Renamed from localvar_free.
1661         Add new arg, really.
1662         (generate_bytecode_insns): Set new variable, jsrs.
1663         Only free local vars if no jsr insns have been emittted.
1664         Call maybe_free_localvar, not localvar_free.
1665
1666 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
1667
1668         * gcj.texi: Remove @ at start of file.
1669
1670 2003-03-25  Tom Tromey  <tromey@redhat.com>
1671
1672         * parse.y (create_interface): Call CHECK_DEPRECATED.
1673
1674 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
1675
1676         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
1677
1678 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
1679
1680         * javaop.h (jfloat, jdouble): Make them structures mirroring
1681         the bit fields of IEEE float and double respectively.
1682         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
1683         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
1684         (union Word, union DWord): Delete.
1685         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
1686
1687         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
1688         D_NAN_MASK): Delete.
1689         (jni_print_float, jni_print_double): New.  Generate
1690         hexadecimal floating constants.
1691         (print_field_info): Use jni_print_float/double.
1692
1693         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
1694         finite floating point numbers for output; special case
1695         non-finite floats.
1696
1697 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
1698
1699         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
1700         Replace 0 and 1 with true and false in return statements.
1701
1702 2003-03-19  Tom Tromey  <tromey@redhat.com>
1703
1704         * lex.c (do_java_lex): Renamed from java_lex.
1705         (java_lex): New function.
1706         Include timevar.h.
1707
1708 2003-03-13  Tom Tromey  <tromey@redhat.com>
1709
1710         * parse.y (resolve_inner_class): Error if qualifier is a primitive
1711         type.
1712
1713 2003-03-04  Andrew Haley  <aph@redhat.com>
1714
1715         * gjavah.c (is_first_data_member): New global variable.
1716         (print_c_decl): If it's the first data member, align it as the
1717         superclass.
1718         (process_file): Set is_first_data_member.
1719
1720 2003-03-11  Tom Tromey  <tromey@redhat.com>
1721
1722         * parse.y (resolve_field_access): Initialize class if field is
1723         found in another static field.
1724         * expr.c (build_class_init): Don't optimize out initialization of
1725         implemented interface.
1726
1727 2003-03-11  Andrew Haley  <aph@redhat.com>
1728
1729         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
1730         warning.
1731
1732 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1733
1734         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
1735         and DIR_SEPARATOR_2 for a target.
1736         Correct minor typos.
1737
1738         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
1739         and DIR_SEPARATOR_2 for a target into account.
1740
1741 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
1742
1743         * lang.c (java_init): Update prototype, move code to java_post_options.
1744         (java_post_options): Similarly.
1745
1746 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
1747
1748         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
1749         compare file name components depending on the case-sensitivity
1750         or otherwise of the host file system.
1751
1752         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
1753         "strcmp" to compare file name components.
1754         Use IS_DIR_SEPARATOR instead of comparing directly against
1755         DIR_SEPARATOR.
1756         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
1757         comparing directly against DIR_SEPARATOR.
1758
1759 2003-03-04  Tom Tromey  <tromey@redhat.com>
1760
1761         * Make-lang.in (java.tags): New target.
1762
1763 2003-03-01  Roger Sayle  <roger@eyesopen.com>
1764
1765         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
1766         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
1767
1768 2003-03-01  Tom Tromey  <tromey@redhat.com>
1769
1770         * parse.y (jdep_resolve_class): Only check deprecation if we found
1771         a decl.
1772
1773 2003-02-28  Tom Tromey  <tromey@redhat.com>
1774
1775         PR java/9695:
1776         * class.c (maybe_layout_super_class): Always pass a WFL to
1777         do_resolve_class.
1778         * parse.y (do_resolve_class): Updated comment to explain
1779         parameters.
1780
1781 2003-02-26  Tom Tromey  <tromey@redhat.com>
1782
1783         * jcf-write.c (generate_classfile): Check whether class is
1784         deprecated before writing attribute count.
1785
1786 2003-02-25  Roger Sayle  <roger@eyesopen.com>
1787
1788         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
1789         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
1790
1791 2003-02-23  Tom Tromey  <tromey@redhat.com>
1792
1793         * lang-options.h: Added -Wdeprecated.
1794         * gcj.texi (Warnings): Document -Wdeprecated.
1795         * java-tree.h (flag_deprecated): Declare.
1796         * lang.c (lang_W_options): Added deprecated.
1797         (flag_deprecated): New global.
1798         * chartables.h: Rebuilt.
1799         * gen-table.pl (process_one): Look at whitespace.
1800         (print_tables): Define LETTER_SPACE, LETTER_MASK.
1801         * parse.h (CLEAR_DEPRECATED): New macro.
1802         (CHECK_DEPRECATED_NO_RESET): New macro.
1803         * jcf-parse.c (handle_deprecated): New function.
1804         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
1805         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
1806         * parse.y (resolve_type_during_patch): Check deprecation.
1807         (jdep_resolve_class): Likewise.
1808         (process_imports): Likewise.
1809         (resolve_expression_name): Likewise.
1810         (check_deprecation): Strip arrays from decl.  Check
1811         flag_deprecated.
1812         (patch_method_invocation): Also check the particular constructor
1813         for deprecation.
1814         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
1815         * jcf-write.c (append_deprecated_attribute): New function.
1816         (generate_classfile): Generate deprecated attribute when
1817         appropriate.
1818         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
1819         (java_lex) [case '*']: Simplify logic.
1820         (java_start_char_p): Use LETTER_MASK.
1821         (java_part_char_p): Likewise.
1822         (java_space_char_p): New function.
1823
1824 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1825
1826         Change base class access representation.
1827         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
1828         (add_interface_do): Likewise.
1829
1830 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
1831
1832         * decl.c (java_init_decl_processing): Change
1833         soft_lookupjnimethod_node to reflect the change in
1834         signature of _Jv_LookupJNIMethod in libjava/jni.cc
1835         * expr.c (build_jni_stub): Calculate and pass the size
1836         on the stack of the arguments to a JNI function. Use
1837         new target macro MODIFY_JNI_METHOD_CALL to allow a
1838         target to modify the call to a JNI method.
1839
1840 2003-02-08  Roger Sayle  <roger@eyesopen.com>
1841
1842         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
1843         instead of basename to avoid compiler warnings on Tru64.
1844
1845 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1846
1847         * gcj.texi: Update to GFDL 1.2.
1848
1849 2003-01-31  Andrew Haley  <aph@redhat.com>
1850
1851         * parse.y (java_expand_classes): Scan the whole class list looking
1852         for access methods that haven't yet been expanded.
1853
1854 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
1855
1856         Fix for java/4269:
1857
1858         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
1859         to fix bootstrap on sparc-unknown-netbsdelf1.5.
1860         * jcf-parse.c: Likewise.
1861
1862 2003-01-31  Mark Wielaard  <mark@klomp.org>
1863
1864         * gjavah.c (throwable_p): Allocate 1 more byte for string.
1865
1866 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1867
1868         * class.c (make_class): Use BINFO_ELTS.
1869         (set_super_info): Likewse.
1870         (add_interface_do): Likewise.
1871
1872 2003-01-30  Tom Tromey  <tromey@redhat.com>
1873
1874         * jcf-parse.c (read_class): Update identifier's class value if it
1875         changed during parsing.
1876
1877 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
1878
1879         * Make-lang.in (po-generated): Find the targets in $(parsedir).
1880         Propagate change to all other rules as required.
1881         (java/parse-scan.o): Add explicit dependency on
1882         $(parsedir)/java/parse-scan.c .
1883
1884 2003-01-29  Tom Tromey  <tromey@redhat.com>
1885
1886         * parse.y (patch_assignment): Only transform the rhs of an
1887         assignment when compiling to native.
1888
1889 2003-01-28  Tom Tromey  <tromey@redhat.com>
1890
1891         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
1892
1893 2003-01-28  Tom Tromey  <tromey@redhat.com>
1894
1895         * lex.c (java_lex): Don't include UEOF as part of token.
1896         (java_read_unicode): Error if \u sequence prematurely terminated.
1897
1898 2003-01-27  Tom Tromey  <tromey@redhat.com>
1899
1900         * parse.y (java_check_regular_methods): Check for construct after
1901         checking types in throws clause.
1902
1903 2003-01-24  Tom Tromey  <tromey@redhat.com>
1904
1905         * class.c (build_static_field_ref): Only a String or numeric field
1906         can fold to a constant.
1907
1908 2003-01-23  Tom Tromey  <tromey@redhat.com>
1909
1910         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
1911         file name in resource buffer.
1912
1913 2003-01-23  Tom Tromey  <tromey@redhat.com>
1914
1915         * expr.c (build_known_method_ref): Use method's context to find
1916         method table index.
1917
1918 2003-01-23  Tom Tromey  <tromey@redhat.com>
1919
1920         * constants.c (set_constant_entry): Allocated cleared memory.
1921
1922 2003-01-22  Tom Tromey  <tromey@redhat.com>
1923
1924         * java-tree.h: Don't use PARAMS.
1925         * resource.c: Add prototypes for all functions.
1926         (write_resource_constructor): Use `const char *' to avoid
1927         warning.
1928
1929 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
1930
1931         * jcf-parse.c (process_zip_dir): Remove unused variable.
1932
1933 2003-01-22  Tom Tromey  <tromey@redhat.com>
1934
1935         * expr.c (build_invokeinterface): Abort if method's context is not
1936         an interface.
1937
1938 2003-01-22  Tom Tromey  <tromey@redhat.com>
1939
1940         * gcj.texi (Input and output files): Mention non-class entries.
1941         * decl.c (java_init_decl_processing): Call
1942         init_resource_processing.
1943         * java-tree.h (compile_resource_data, write_resource_constructor,
1944         compile_resource_file, init_resource_processing): Declare.
1945         * config-lang.in (gtfiles): Added resource.c.
1946         * Make-lang.in (gt-java-resource.h): New target.
1947         (JAVA_OBJS): Added resource.o.
1948         (java/resource.o): New target.
1949         * resource.c: New file.
1950         * class.c (compile_resource_file): Moved to resource.c.
1951         (registerResource_libfunc): Likewise.
1952         (utf8_decl_list): Mark with GTY; now static.
1953         * jcf-parse.c (classify_zip_file): New function.
1954         (parse_zip_file_entries): Use it; compile .properties files.
1955         (process_zip_dir): Use classify_zip_file and compute_class_name.
1956         Don't write class name into zip directory.
1957         (java_parse_file): Call write_resource_constructor.
1958         (compute_class_name): New function.
1959         * jcf-io.c (read_zip_member): Reindented.
1960
1961 2003-01-21  Tom Tromey  <tromey@redhat.com>
1962
1963         * class.c (supers_all_compiled): New function.
1964         (make_class_data): Use it.
1965
1966 2003-01-21  Tom Tromey  <tromey@redhat.com>
1967
1968         * parse.y (method_header): Native method can't be strictfp.
1969         No method can be transient or volatile.
1970
1971 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1972
1973         Make-lang.in (jvspec.o-warn): Add -Wno-error.
1974
1975 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1976
1977         * check-init.c: Fix comment typos.
1978         * class.c: Likewise.
1979         * constants.c: Likewise.
1980         * decl.c: Likewise.
1981         * except.c: Likewise.
1982         * expr.c: Likewise.
1983         * java-except.h: Likewise.
1984         * java-tree.h: Likewise.
1985         * javaop.h: Likewise.
1986         * jcf-dump.c: Likewise.
1987         * jcf-io.c: Likewise.
1988         * jcf-parse.c: Likewise.
1989         * jcf-write.c: Likewise.
1990         * lang.c: Likewise.
1991         * mangle.c: Likewise.
1992         * typeck.c: Likewise.
1993         * verify.c: Likewise.
1994
1995 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1996
1997         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
1998         * jcf-write.c: Include "tm_p.h".
1999
2000 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2001
2002         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2003
2004 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2005
2006         * builtins.c (java_build_function_call_expr): Renamed from
2007         build_function_call_expr.  All callers changed.
2008
2009         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2010         * jcf-parse.c: Include tm_p.h.
2011
2012         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2013         warning.
2014
2015 2003-01-14  Tom Tromey  <tromey@redhat.com>
2016
2017         * class.c (make_class_data): Check that super is compiled before
2018         building class reference to it.
2019
2020 2003-01-14  Andrew Haley  <aph@redhat.com>
2021
2022         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2023         varargs function -- correct.
2024
2025 2003-01-14  Andrew Haley  <aph@redhat.com>
2026
2027         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2028
2029 2003-01-14  Andrew Haley  <aph@redhat.com>
2030
2031         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2032         varargs function -- correct.
2033
2034         * parse.y (patch_assignment): Copy the rhs of an assignment into a
2035         temporary if the RHS is a reference.
2036
2037 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2038
2039         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2040         * keyword.h: Regenerated.
2041
2042         * All Files: Convert to ISO C style function definitions.
2043
2044 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2045
2046         * parse.y (check_pkg_class_access): ANSIfy definition.
2047
2048 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2049
2050         * decl.c, parse-scan.y, parse.y: Don't cast return value of
2051         xmalloc et al.
2052
2053         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2054
2055 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2056
2057         Merge from pch-branch:
2058
2059         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
2060
2061         * Make-lang.in (java/gjavah.o): Update dependencies.
2062         * gjavah.c: Include ggc.h.
2063
2064         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
2065
2066         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2067         (JCFDUMP_OBJS): Add ggc-none.o.
2068         (java/jcf-dump.o): Depend on GGC_H.
2069         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2070         CPool substructures.
2071         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2072         * jcf-dump.c: Include ggc.h.
2073
2074         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2075
2076         * jcf.h (union cpool_entry): New.
2077         (struct CPool): Use gengtype to mark.  Change field 'data' to be
2078         an array of unions.
2079         (struct JCF): Use gengtype to mark.
2080         (CPOOL_UINT): Update for new cpool_entry type.
2081         (CPOOL_USHORT1): Likewise.
2082         (CPOOL_USHORT2): Likewise.
2083         (CPOOL_FINISH): Use GC to free cpool subfields.
2084         * parse.h (struct parser_ctxt): Mark field current_jcf.
2085         * lex.c (java_init_lex): Use GC to allocate struct JCF.
2086         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2087         (main_jcf): Use gengtype to mark.
2088         (ggc_mark_jcf): Delete.
2089         (get_constant): Update for new cpool_entry type.
2090         (give_name_to_class): Likewise.
2091         (get_class_constant): Likewise.
2092         (init_outgoing_cpool): Use GGC to allocate struct CPool.
2093         (java_parse_file): Use GGC to allocate struct JCF.
2094         (init_jcf_parse): Don't call ggc_add_root.
2095         * jcf-reader.c (jcf_parse_constant_pool): Update for new
2096         cpool_entry type.
2097         * java-tree.h (current_jcf): Use gengtype to mark.
2098         (CPOOL_UTF): Update for new cpool_entry type.
2099         (outgoing_cpool): Use gengtype to mark.
2100         (struct lang_type): GC struct JCF and struct CPool.
2101         * config-lang.in (gtfiles): Add jcf.h.
2102         * constants.c (find_tree_constant): New.
2103         (set_constant_entry): Allocate cpool subfields using GGC.  Update
2104         for new cpool_entry type.
2105         (find_constant1): Update for new cpool_entry type.
2106         (find_constant2): Likewise.
2107         (find_utf8_constant): Use find_tree_constant.
2108         (find_class_or_string_constant): Remove unnecessary cast to jword.
2109         Update for new cpool_entry type.
2110         (count_constant_pool_bytes): Update for new cpool_entry type.
2111         (write_constant_pool): Likewise.
2112         (alloc_name_constant): Use find_tree_constant.
2113         (build_constants_constructor): Update for new cpool_entry type.
2114
2115         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2116
2117         * parse.y (mark_parser_ctxt): Delete.
2118         (goal): Don't use ggc_add_root.
2119         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2120         (java_pop_parser_context): Let GC free parser_ctxt.
2121         (java_parser_context_resume): Likewise.
2122         * parse.h (struct parser_ctxt): Use gengtype to mark.
2123         (ctxp): Likewise.
2124         (ctxp_for_generation): Likewise.
2125         * lex.h (struct java_lc_s): Mark for gengtype.
2126         (java_lexer): Rearrange for gengtype.
2127         * config-lang.in (gtfiles): Add lex.h, parse.h.
2128
2129 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2130
2131         * All Files: Remove PARAMS macro.
2132
2133         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2134         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2135         `__STDC__' macros.
2136
2137         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2138         VA_CLOSE.
2139
2140 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2141
2142         * Make-lang.in (java.install-common, java.uninstall,
2143         java.install-info, java.install-man): Prepend $(DESTDIR)
2144         to destination paths in all (un)installation commands.
2145         (java.install-common): Rewrite $(LN) command to support
2146         DESTDIR with "ln" as well as with "ln -s".
2147
2148 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2149
2150         * java-tree.h: Protect against multiple inclusion.
2151
2152 2003-01-07  Tom Tromey  <tromey@redhat.com>
2153
2154         * class.c (add_assume_compiled): Don't adjust parent if we're
2155         already at the root of tree.
2156
2157 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2158
2159         * lang.c (dump_compound_expr): Prototype.
2160
2161 2003-01-03  Tom Tromey  <tromey@redhat.com>
2162
2163         Fix for PR java/8712:
2164         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2165         when simply checking against `null'.
2166
2167 2003-01-03  Tom Tromey  <tromey@redhat.com>
2168
2169         * gcj.texi (Standard Properties): Document http.proxyHost and
2170         http.proxyPort.
2171
2172         * gcj.texi (GNU Classpath Properties): Document new properties.
2173
2174 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2175
2176         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2177         java/lang-options.h, java/mangle.c, java/mangle_name.c,
2178         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2179
2180 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2181
2182         * Make-lang.in, boehm.c, buffer.c,
2183           buffer.h, builtins.c, class.c,
2184           config-lang.in, constants.c,
2185           convert.h, decl.c, except.c,
2186           expr.c, java-except.h,
2187           java-tree.h, javaop.def,
2188           jcf-parse.c, jcf-write.c,
2189           jv-scan.c, jvgenmain.c,
2190           jvspec.c, keyword.gperf,
2191           keyword.h, lang-options.h,
2192           lang-specs.h, lang.c, lex.c,
2193           lex.h, mangle.c, mangle_name.c,
2194           parse-scan.y, parse.h, parse.y,
2195           typeck.c, verify.c, xref.c,
2196           xref.h: Replace "GNU CC" with
2197           "GCC" in the copyright header.
2198
2199         * check-init.c, gjavah.c, javaop.h,
2200           jcf-depend.c, jcf-dump.c, jcf-io.c,
2201           jcf-path.c, jcf-reader.c, jcf.h,
2202           zextract.c, zipfile.h: These files are
2203           "part of GCC". Also say "GCC" not "GNU CC".
2204
2205 2002-12-30  DJ Delorie  <dj@redhat.com>
2206
2207         * Make-lang.in: Protect against texi2pod/pod2man failing.
2208
2209 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
2210
2211         * gcj.texi: Use @copying.
2212
2213 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2214
2215         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2216         print_cxx_classname.
2217         (print_cxx_classname): Add add_scope parameter.
2218         (print_class_decls): Do not emit a semicolon after the extern
2219         "Java" block.
2220         (process_file): Adjust calls to print_cxx_classname.
2221
2222 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2223
2224         * gcj.texi: Include Cover Texts in man page.
2225
2226 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
2227
2228         * class.c (build_static_field_ref): Check FIELD_FINAL.
2229
2230         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2231         instead of current_constant_pool_data_ref.
2232         * java-tree.h (current_constant_pool_data_ref): Undefine.
2233         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2234         * jcf-parse.c (init_outgoing_cpool): Don't initialize
2235         current_constant_pool_data_ref.
2236
2237         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2238         not build_internal_class_name.
2239
2240         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2241         Use it when class ref isn't certain to be compiled.
2242
2243 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
2244
2245         * gcj.texi: Include gcc-common.texi.
2246         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2247         $(srcdir)/doc/include/gcc-common.texi.
2248
2249 2002-12-22  Anthony Green  <green@redhat.com>
2250
2251         * gcj.texi (Limitations): Add note about org.xml.sax and
2252         org.w3c.dom.
2253
2254 2002-12-20  Tom Tromey  <tromey@redhat.com>
2255
2256         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2257         where minimum case value is Integer.MIN_VALUE.
2258         Fixes PR java/8955.
2259
2260 2002-12-18  Andrew Haley  <aph@redhat.com>
2261
2262         * parse.y (patch_invoke): Force evaluation order when `check' is
2263         set.  For PR libgcj/8945.
2264
2265 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
2266
2267         * gcj.texi: Change version number to 3.4.
2268
2269 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
2270         Andrew Haley <aph@redhat.com>
2271
2272         * parse.y (source_end_java_method): Remove custom encoding of line
2273         numbers for a function decl before passing it to the back end.
2274
2275 2002-12-03  Andrew Haley  <aph@redhat.com>
2276
2277         * class.c (make_class_data): New field, "chain".
2278         * decl.c (java_init_decl_processing): Likewise.
2279
2280 2002-12-02  Tom Tromey  <tromey@redhat.com>
2281
2282         For PR java/8740:
2283         * parse.y (do_resolve_class): Handle qualified name via
2284         recursion.
2285
2286 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2287
2288         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2289         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2290         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2291         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2292         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2293         Include coretypes.h and tm.h.
2294         * Make-lang.in: Update dependencies.
2295
2296 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2297
2298         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2299
2300 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2301
2302         * jcf-reader.c: Don't expand JCF_readu4 inside the
2303         expansion of JCF_SKIP.
2304
2305 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
2306
2307         * jcf-reader.c: Don't expand JCF_readu4 inside the
2308         expansion of JCF_SKIP.
2309
2310 2002-11-22  Tom Tromey  <tromey@redhat.com>
2311
2312         * parse.y (patch_binop): Cast right hand side of shift expression
2313         to `int'.  Fixes PR java/8676.
2314
2315 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
2316             Andrew Haley <aph@redhat.com>
2317
2318         * gcc/java/jcf-write.c (write_classfile): Remove target
2319         class file, if it exists, before renaming the temporary
2320         class file to it.
2321
2322 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2323
2324         * jvspec.c (lang_specific_spec_functions): New.
2325
2326 2002-11-18  Tom Tromey  <tromey@redhat.com>
2327
2328         Fix for PR java/7912:
2329         * expr.c (can_widen_reference_to): Allow cast of array to
2330         Cloneable or Serializable.
2331         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2332         (java_io_serializable_identifier_node): Likewise.
2333         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2334         (valid_ref_assignconv_cast_p): Use new identifier nodes.
2335         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2336         java_io_serializable.
2337         * decl.c (java_init_decl_processing): Initialize
2338         java_lang_cloneable_identifier_node and
2339         java_io_serializable_identifier_node.
2340         (java_lang_cloneable_identifier_node): New global.
2341         (java_io_serializable_identifier_node): Likewise.
2342
2343 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
2344
2345         * buffer.c: Remove unnecessary casts.
2346         * check-init.c: Likewise.
2347         * class.c: Likewise.
2348         * constants.c: Likewise.
2349         * decl.c: Likewise.
2350         * except.c: Likewise.
2351         * gjavah.c: Likewise.
2352         * jcf-io.c: Likewise.
2353         * jcf-parse.c: Likewise.
2354         * jcf-path.c: Likewise.
2355         * jvspec.c: Likewise.
2356         * lang.c: Likewise.
2357         * lex.c: Likewise.
2358         * verify.c: Likewise.
2359
2360 2002-11-06  Tom Tromey  <tromey@redhat.com>
2361
2362         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2363         a JNI header.
2364
2365 2002-11-05  Tom Tromey  <tromey@redhat.com>
2366
2367         Fix for PR java/6388.
2368         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2369         * java-tree.h (enum java_tree_index): New values
2370         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2371         (decimal_int_max, decimal_long_max): New defines.
2372         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
2373         (error_if_numeric_overflow): Rewrote range checking.
2374         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2375         decimal_long_max.
2376
2377 2002-11-02  Tom Tromey  <tromey@redhat.com>
2378
2379         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2380
2381         * class.c (make_method_value): Put class name, not signature, into
2382         `throws' field.  For PR java/8415.
2383
2384 2002-10-24  Tom Tromey  <tromey@redhat.com>
2385
2386         * gcj.texi (Invoking gij): Document --showversion.
2387         (Standard Properties): java.library.path now set.
2388
2389 2002-10-23  Tom Tromey  <tromey@redhat.com>
2390
2391         * gjavah.c (decode_signature_piece): In JNI mode, print
2392         `jobjectArray' when array depth is nonzero.
2393         Fixes PR java/8296.
2394
2395 2002-10-15  Andrew Haley  <aph@redhat.com>
2396
2397         * parse.y (patch_invoke): Call force_evaluation_order on a static
2398         arg list.
2399         (resolve_qualified_expression_name): Call force_evaluation_order
2400         on a arg list that is part of a Qualified Expression Name.
2401
2402         * lang.c (dump_compound_expr): New.
2403         (java_dump_tree): New.
2404
2405 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
2406
2407         * gcj.texi: Added item describing the GCJ runtime property
2408         "gnu.gcj.progname".
2409
2410 2002-10-15  Richard Henderson  <rth@redhat.com>
2411
2412         * jcf-parse.c (get_constant): Fix type warning.
2413
2414 2002-10-15  Andrew Haley  <aph@redhat.com>
2415
2416         * java-tree.h (java_inlining_merge_static_initializers): Declare.
2417         (java_inlining_map_static_initializers): Declare.
2418
2419 2002-10-14  Andrew Haley  <aph@redhat.com>
2420
2421         * tree-inline.c (remap_block): All local class initialization
2422         flags go in the outermost scope.
2423         (expand_call_inline): Call java_inlining_map_static_initializers.
2424         (expand_call_inline): Call java_inlining_merge_static_initializers.
2425         * java/lang.c (merge_init_test_initialization): New.
2426         (java_inlining_merge_static_initializers): New.
2427         (inline_init_test_initialization): New.
2428         (java_inlining_map_static_initializers): New.
2429
2430 2002-10-11  Mark Wielaard  <mark@klomp.org>
2431
2432         * gcj.texi (Compatibility): Add Limitations and Extensions section.
2433
2434 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2435
2436         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2437
2438 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2439
2440         * parse.y (merge_string_cste): Add parentheses around & within |.
2441
2442 2002-10-08  Tom Tromey  <tromey@redhat.com>
2443
2444         * parse.y (variable_declarator_id): Simplify error path for
2445         array declarator error.  For PR java/8003.
2446
2447 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
2448
2449         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2450         bug_report_url.
2451
2452 2002-10-08  Andrew Haley  <aph@redhat.com>
2453
2454         * parse.y (attach_init_test_initialization_flags): Check for
2455         error_mark_node.
2456
2457 2002-10-07  Anthony Green  <green@redhat.com>
2458
2459         * parse.y (merge_string_cste): Fix bug in string concatenation.
2460
2461 2002-10-03  Michael Koch  <konqueror@gmx.de>
2462
2463         * gcj.texi (Standard properties):
2464         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2465
2466 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2467
2468         PR optimization/6627
2469         * lang.c (java_init): If storing the vbit in function
2470         pointers, ensure that force_align_functions_log is atleast
2471         one to aid compatability with g++ vtables.
2472
2473 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
2474
2475         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2476         foul of type-based aliasing.
2477
2478 2002-09-30  Anthony Green  <green@redhat.com>
2479
2480         * gcj.texi (Invoking jv-scan): Fix texinfo.
2481
2482 2002-09-28  Anthony Green  <green@redhat.com>
2483
2484         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2485         (Code Generation): Add -fno-assert documentation.
2486         * jv-scan.c (flag_assert): New global.
2487         (options): Add assert option.
2488         (help): Add --no-assert documentation.
2489         * parse-scan.y (flag_assert): New global.
2490         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2491         (flag_assert): New global.
2492         * java-tree.h (flag_assert): New global.
2493         * lex.c (java_lex): Obey flag_assert.
2494         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2495         calling cc1.
2496
2497 2002-09-26  Andrew Haley  <aph@redhat.com>
2498
2499         * expr.c (build_java_array_length_access): Check for null pointer.
2500         * expr.c (expand_java_arrayload): Likewise.
2501
2502 2002-09-21  Richard Henderson  <rth@redhat.com>
2503
2504         * jcf-parse.c (get_constant): Decode from IEEE no matter
2505         what the target format.
2506
2507 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
2508
2509         * ChangeLog: Follow spelling conventions.
2510         * class.c: Likewise.
2511         * decl.c: Likewise.
2512         * expr.c: Likewise.
2513         * gjavah.c: Likewise.
2514         * java-tree.h: Likewise.
2515         * jcf-dump.c: Likewise.
2516         * jcf-parse.c: Likewise.
2517         * jvspec.c: Likewise.
2518         * lang.c: Likewise.
2519         * mangle.c: Likewise.
2520         * parse.y: Likewise.
2521
2522 2002-09-17  Tom Tromey  <tromey@redhat.com>
2523
2524         * lex.c (java_read_unicode_collapsing_terminators): Handle case
2525         where \r appears at EOF.  Fixes PR java/7950.
2526
2527 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2528
2529         * jvspec.c (lang_specific_driver): Remove unused variable.
2530
2531 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2532
2533         * java-tree.h (union lang_tree_node): Add chain_next option.
2534
2535 2002-09-16  Richard Henderson  <rth@redhat.com>
2536
2537         * jcf-parse.c (get_constant): Runtime check for IEEE format;
2538         use new real.h interface.
2539         * jcf-write.c (find_constant_index): Use new real.h interface.
2540         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2541
2542 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2543
2544         * lang.c: Follow spelling conventions.
2545
2546 2002-09-11  Per Bothner  <per@bothner.com>
2547
2548         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
2549         constant to the type of the field.
2550         (java_complete_tree):  Remove now-redundant code.
2551
2552         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
2553
2554 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
2555
2556         For PR java/5794:
2557         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2558         return label if a ret instruction for the jsr has been reached.
2559
2560 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
2561
2562         * parse.y (DIR_SEPARATOR): Don't define.
2563         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2564
2565 2002-08-28  Andrew Haley  <aph@redhat.com>
2566
2567         * verify.c (verify_jvm_instructions): Allow exception handler
2568         inside code that is being protected, but generate a warning.
2569         * except.c (link_handler): Initialize `expanded' in new eh_range.
2570         (binding_depth, is_class_level, current_pc): Declare extern.
2571
2572 2002-09-01  Mark Wielaard <mark@klomp.org>
2573
2574         * gcj.texi: Add chapter about system properties.
2575         Fixed some typos.
2576
2577 2002-08-26  Tom Tromey  <tromey@redhat.com>
2578
2579         * parse.y (try_builtin_assignconv): Allow narrowing primitive
2580         conversion if RHS_TYPE is byte, short, or char.
2581
2582 2002-08-22  Tom Tromey  <tromey@redhat.com>
2583
2584         * gcj.texi (Invoking gij): Document -cp and -classpath.
2585
2586 2002-08-21  Tom Tromey  <tromey@redhat.com>
2587
2588         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2589         $(prefix)/share.  For PR libgcj/7633.
2590
2591         For PR java/6005 and PR java/7611:
2592         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2593         (java_can_use_bit_fields_p): New function.
2594
2595 2002-08-16  Tom Tromey  <tromey@redhat.com>
2596
2597         * gcj.texi (Class Initialization): Mention class initialization of
2598         arrays.
2599
2600 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
2601
2602         * Make-lang.in (java-tree-inline.o): New.
2603         (JAVA_OBJS): Add java-tree-inline.o.
2604         * parse.y (source_end_java_method): Call java_optimize_inline.
2605         (java_expand_method_bodies): Save method's tree in
2606         DECL_SAVED_TREE.
2607         (add_stmt_to_compound): Keep track of the number of statments.
2608         * lang.c (java_init): Enable flag_inline_trees.
2609         (java_post_options): If flag_inline_functions is on, enable
2610         flag_inline_trees instread.
2611         (decl_constant_value): New.
2612         (java_tree_inlining_walk_subtrees): New.
2613         * java-tree.h (DECL_NUM_STMTS): New macro.
2614         (java_optimize_inline): Declare.
2615         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2616         Handle a LABEL_EXPR.
2617         * decl.c (build_result_decl): If we already have a DECL_RESULT
2618         don't make another.
2619         (dump_function): New.
2620         (java_optimize_inline): New.
2621         (dump_function): New.
2622
2623 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
2624
2625         For PR java/7483:
2626         * parse.y (build_assertion): Invert return from
2627         desiredAssertionStatus.
2628
2629 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2630
2631         * jcf-write.c (get_access_flags): Return correct access flags for
2632         private and protected inner classes.
2633
2634 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2635
2636         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
2637
2638 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2639
2640         * mangle_name.c: Don't include obstack.h twice.
2641         * xref.c: Don't include obstack.h.
2642
2643 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2644
2645         * class.c: (permanent_obstack): Delete declaration.
2646         * constants.c: (permanent_obstack): Delete declaration.
2647         * except.c: (permanent_obstack): Delete declaration.
2648         * expr.c: (permanent_obstack): Delete declaration.
2649         * jcf-parse.c: (permanent_obstack): Delete declaration.
2650         (saveable_obstack): Delete declaration.
2651         * parse.h: (permanent_obstack): Delete declaration.
2652         * typeck.c: (permanent_obstack): Delete declaration.
2653
2654 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2655
2656         * gcj.texi (version-gcc): Increase to 3.3.
2657
2658 2002-07-22  Tom Tromey  <tromey@redhat.com>
2659
2660         * lex.c (java_lex): Check for `e' or `E' after 0.
2661
2662 2002-07-21  Richard Henderson  <rth@redhat.com>
2663
2664         * lang.c (java_unsafe_for_reeval): New.
2665         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2666
2667 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
2668
2669         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
2670         (jcf_path_init): Use GET_ENVIRONMENT.
2671
2672 2002-07-10  Roger Sayle  <roger@eyesopen.com>
2673             Zack Weinberg <zack@codesourcery.com>
2674
2675         * builtins.c (initialize_builtins): Remove defines that
2676         handled C/C++ specific junk hereby removed from builtins.def.
2677
2678 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
2679
2680         * lang.c (java_post_options): Update prototype.
2681
2682 2002-07-05  Roger Sayle  <roger@eyesopen.com>
2683
2684         * builtins.c (initialize_builtins): Ignore the additional
2685         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
2686         the builtins.def file.
2687
2688 2002-07-01  Tom Tromey  <tromey@redhat.com>
2689
2690         For PR libgcj/7073:
2691         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2692         specially.
2693
2694 2002-07-01  Roger Sayle  <roger@eyesopen.com>
2695
2696         * java/decl.c (builtin_function): Accept additional parameter.
2697         (java_init_decl_processing): Pass an additional NULL_TREE
2698         argument to builtin_function.
2699
2700 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
2701
2702         * gcj.texi: Fixed gcj invocation example so that it compiles.
2703
2704 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2705
2706         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
2707         * parse.y (mark_parser_ctxt): Likewise.
2708         (check_modifiers, declare_local_variables): Avoid incorrect
2709         hardcoded constant 10.
2710
2711         * lex.c (java_read_char): Avoid "comparison is always true"
2712         warning.
2713
2714 2002-06-25  Andreas Schwab  <schwab@suse.de>
2715
2716         * expr.c (JSR): Avoid undefined operation on PC.
2717
2718 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2719
2720         * decl.c (clear_binding_level): Const-ify.
2721
2722 2002-06-13  Akim Demaille  <akim@epita.fr>
2723
2724         * parse.y (class_declaration, interface_declaration): Make sure
2725         all their rules have an action, in order to avoid meaningless `$$
2726         = $1' and their type clashes.
2727
2728 2002-06-11  Tom Tromey  <tromey@redhat.com>
2729
2730         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
2731         * parse-scan.y (statement_without_trailing_substatement): Added
2732         assert_statement.
2733         (assert_statement): New rule.
2734         * java-tree.h (struct lang_type) [assertions]: New field.
2735         (TYPE_USES_ASSERTIONS): New macro.
2736         (CLASS_USES_ASSERTIONS): Likewise.
2737         (FIELD_SYNTHETIC): New define.
2738         * lex.c (java_lval;): Added ASSERT_TK.
2739         * parse.y (ASSERT_TK): Added.
2740         (statement_without_trailing_substatement): Added assert_statement.
2741         (assert_statement): New rule.
2742         (build_assertion): New function.
2743         (maybe_generate_pre_expand_clinit): Create and initialize
2744         $assertionsDisabled.
2745         (lookup_package_type): Removed decl.
2746         * keyword.h: Rebuilt.
2747         * keyword.gperf (assert): New token.
2748
2749 2002-06-10  Akim Demaille  <akim@epita.fr>
2750
2751         * parse.y (interface_type_list, class_member_declaration)
2752         (unary_expression_not_plus_minus): Remove duplicate %type.
2753         Whitespace changes.
2754
2755 2002-06-09  Tom Tromey  <tromey@redhat.com>
2756
2757         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
2758
2759         * parse.y (method_header): Give error message in all cases.
2760         Fixes PR java/6865.
2761
2762 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2763
2764         Don't use RTL inlining. Fix for PR java/6820.
2765         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
2766         (flag_really_inline): New.
2767         (java_decode_option): Set flag_really_inline if -finline-functions
2768         is seen.
2769         (java_post_options): New function. Turn off inlining unless
2770         flag_really_inline is set.
2771
2772 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2773
2774         * gjavah.c (throwable_p): Accept argument as either a classname or
2775         signature fragment. Create null-terminated classname string for super
2776         when calling itself recursively.
2777         (decode_signature_piece): Skip first character from class name
2778         signature when calling throwable_p.
2779
2780 2002-06-08  H.J. Lu  (hjl@gnu.org)
2781
2782         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2783
2784 2002-06-04  Tom Tromey  <tromey@redhat.com>
2785
2786         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
2787
2788 2002-06-04  Michael Koch  <konqueror@gmx.de>
2789
2790         * gcj.texi (Input Options): Fixed typo.
2791
2792 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
2793
2794         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
2795         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
2796         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
2797         and all now-pointless local variables.  Rename other local
2798         variables to reflect their not being handles.
2799
2800         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
2801         #if JCF_USE_STDIO blocks.
2802
2803         * parse.y: Add missing semicolon at end of rule.
2804
2805 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2806
2807         * check-init.c (attach_initialized_static_class): Delete, unused.
2808         * parse.y: Use htab_t instead of struct hashtable, update
2809         all uses.
2810         * java-tree.h: Include hashtab.h instead of hash.h.
2811         (struct lang_decl_func): Use htab_t, set up for gengtype.
2812         (struct init_test_hash_entry): Delete.
2813         (struct treetreehash_entry): New.
2814         (java_treetreehash_find): New
2815         (java_treetreehash_new): New prototype.
2816         (java_treetreehash_create): New prototype.
2817         (java_mark_tree): Delete prototype.
2818         (java_hash_hash_tree_node): Delete prototype.
2819         (java_hash_compare_tree_node): Delete prototype.
2820         (attach_initialized_static_class): Delete prototype.
2821         * expr.c (build_class_init): Update to use java_treetreehash
2822         functions.
2823         (java_expand_expr): Update to use htab_t.
2824         (emit_init_test_initialization): Likewise.
2825         * decl.c (java_mark_tree): Delete.
2826         * class.c (init_test_hash_newfunc): Delete.
2827         (java_hash_hash_tree_node): Delete.
2828         (java_hash_compare_tree_node): Delete.
2829         (add_method_1): Update to use java_treetreehash functions.
2830         (JAVA_TREEHASHHASH_H): New macro.
2831         (java_treetreehash_hash): New function.
2832         (java_treetreehash_compare): New function.
2833         (java_treetreehash_find): New function.
2834         (java_treetreehash_new): New function.
2835         (java_treetreehash_create): New function.
2836         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
2837
2838         * Make-lang.in (java/parse.o): Depend on debug.h.
2839         * java-tree.h (struct lang_identifier): Use gengtype.
2840         (union lang_tree_node): New.
2841         (struct lang_decl_func): Use gengtype.
2842         (struct lang_decl_var): Likewise.
2843         (struct lang_decl): Likewise.
2844         * parse.y: Include debug.h.
2845         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
2846
2847         * lang.c (struct language_function): New dummy structure.
2848
2849         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
2850         descriminator for DECL_LANG_SPECIFIC.
2851         (struct lang_decl_func): Rename from struct lang_decl.
2852         (enum lang_decl_desc): New.
2853         (struct lang_decl): Make it a union.  Update all the accessor macros.
2854         (struct lang_type): Use gengtype.
2855         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
2856         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
2857         are now the same size.
2858         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
2859         use discriminator to mark DECL_LANG_SPECIFIC.
2860
2861         * Make-lang.in (gt-java-builtins.h): New rule.
2862         (java/builtins.o): Add dependency on gt-<filename>.h.
2863         * builtins.c: Use gengtype for roots.
2864         (union string_or_tree): Use gengtype.
2865         (struct builtin_record): Use gengtype.
2866         * config-lang.in (gtfiles): Add builtins.c.
2867
2868         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
2869         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
2870         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
2871         gt-java-parse.h, gtype-java.h): Add rules to generate.
2872         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
2873         (class.o): Add dependency on gt-*.h.
2874         (constants.o): Likewise.
2875         (decl.o): Likewise.
2876         (expr.o): Likewise.
2877         (jcf-parse.o): Likewise.
2878         (jcf-write.o): Likewise.
2879         (lang.o): Likewise.
2880         * config-lang.in (gtfiles): New.
2881         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2882         * constants.c: Replace uses of ggc_add_* with GTY markers.
2883         Include gt-*.h.
2884         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2885         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2886         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
2887         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
2888         Include gt-*.h.
2889         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
2890         Include gt-*.h.
2891         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2892         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
2893         gt-*.h.
2894         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2895         Include gtype-java.h.
2896
2897 2002-06-02  Tom Tromey  <tromey@redhat.com>
2898
2899         Fix for PR java/5913:
2900         * parse.y (patch_binop): Call patch_string on op1.
2901
2902 2002-06-02  Tom Tromey  <tromey@redhat.com>
2903
2904         Fix for PR java/1343, PR java/6336:
2905         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
2906         formatting.  Changed return type.
2907         (anonymous_class_counter): Moved to top of file.
2908         (maybe_make_nested_class_name): Append number to class name for
2909         function-local classes.
2910
2911 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2912
2913         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
2914         * Make-lang.in: Update dependency lists.
2915
2916 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
2917
2918         * gjavah.c (throwable_p): Do not free the name of the class after
2919         passing it to find_class.
2920         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
2921         * jcf-io.c (dirent.h): Include it.
2922         (fnmatch.h): Likewise.
2923         (compare_path): New function.
2924         (java_or_class_file): Likewise.
2925         (memoized_dirlist_entry): New type.
2926         (memoized_dirlist_lookup_eq): New function.
2927         (memoized_dirlists): New variable.
2928         (caching_stat): New function.
2929         (memoized_class_lookup_eq): New function.
2930         (memoized_class_lookups): Likewise.
2931         (find_class): Use memoized_class_lookups and caching_stat.
2932         * jcf.h (JCF_USE_SCANDIR): Define.
2933         * parse.y (java_expand_classes): Write the class files in reverse
2934         order.
2935
2936 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2937
2938         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2939
2940 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
2941
2942         * jcf-write.c (write_classfile): Unlink the temporary file if it
2943         cannot be renamed.  Use concat to build up the name of the
2944         temporary file.
2945
2946 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
2947
2948         * jcf-write.c (write_classfile): Write the file to a
2949         temporary file and then rename it.
2950
2951 2002-05-07  Tom Tromey  <tromey@redhat.com>
2952
2953         * gjavah.c (throwable_p): Use xstrdup, not strdup.
2954
2955         Fix for PR java/1200:
2956         * gjavah.c (throwable_p): New function.
2957         (decode_signature_piece): Use it.  A `WeakReference' isn't the
2958         same as a `jweak'.
2959         Include hashtab.h.
2960         (gcjh_streq): New function.
2961
2962 2002-05-07  Andreas Jaeger  <aj@suse.de>
2963
2964         * parse.y (finish_for_loop): Fix if statement.
2965
2966 2002-05-06  Tom Tromey  <tromey@redhat.com>
2967
2968         Fix for PR java/5941:
2969         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
2970         loop update expression.
2971         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
2972         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2973
2974 2002-05-04  Mark Wielaard  <mark@klomp.org>
2975
2976         For PR java/6519:
2977         * parse.y (build_string_concatenation): Return just op1 only when op2
2978         is null and op1 is a STRING_CST, otherwise always construct a
2979         StringBuffer.
2980
2981 2002-04-27  Tom Tromey  <tromey@redhat.com>
2982
2983         For PR java/6382:
2984         * parse.y (string_convert_int_cst): New function.
2985         (merge_string_cste): Use it.
2986
2987 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2988
2989         * java-tree.h (java_parse_file): Update.
2990         (java_set_yydebug): Remove.
2991         * jcf-parse.c (yydebug): Remove.
2992         (java_set_yydebug): Die.
2993         (java_parse_file): Update.
2994         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2995
2996 2002-04-24  Tom Tromey  <tromey@redhat.com>
2997
2998         For PR java/6425:
2999         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3000         EXPR_WFL_QUALIFICATION of qual_wfl.
3001
3002 2002-04-23  Per Bothner  <per@bothner.com>
3003
3004         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
3005         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
3006         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
3007
3008 2002-04-23  Tom Tromey  <tromey@redhat.com>
3009
3010         For PR java/6314:
3011         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
3012         recognize `-fcompile-resource='.
3013         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
3014         a bit.
3015
3016 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3017
3018         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3019         paths. Fixes PR java/2791.
3020
3021 2002-04-19  Andrew Haley  <aph@redhat.com>
3022
3023         * jcf-write.c (push_long_const): lo, hi: New variables.
3024         Use rshift_double to extract the high part of a 64-bit long.
3025         Use WORD_TO_INT to extract the low part.
3026
3027         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3028         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
3029         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3030
3031 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3032
3033         * typeck.c (incomplete_type_error): Remove.
3034
3035 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3036
3037         * class.c (make_class_data): Set DECL_ALIGN on static class data,
3038         for hash synchronization.
3039         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3040         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3041         class_type_node.
3042
3043 2002-04-16  Mark Wielaard  <mark@klomp.org>
3044
3045         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3046         negative zero.
3047
3048 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3049
3050         Fix for PR java/6294:
3051         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3052         interfaces.
3053
3054 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3055
3056         Fix for PR java/6085:
3057         * parse.y (patch_method_invocation): Always use build_access_to_thisn
3058         to get enclosing "this" argument for inner-class constructor
3059         invocation. Pass correct arguments to build_access_to_thisn.
3060
3061 2002-04-10  Andreas Jaeger  <aj@suse.de>
3062
3063         * gcj.texi (Input Options): Fix extdirs patch.
3064
3065 2002-04-10  Anthony Green  <green@redhat.com>
3066
3067         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3068
3069 2002-04-09  Anthony Green  <green@redhat.com>
3070
3071         * gcj.texi (Input Options): Add --extdirs documentation.
3072         * jcf-dump.c (OPT_extdirs): New macro.
3073         (options): Add extdirs option.
3074         (help): Describe --extdirs.
3075         (main): Handle OPT_extdirs.
3076         * gjavah.c (OPT_extdirs): New macro.
3077         (options): Add extdirs option.
3078         (help): Describe --extdirs.
3079         (main): Handle OPT_extdirs.
3080         * jcf-path.c (jcf_path_init): Add extdirs support.
3081         (jcf_path_extdirs_arg): New function.
3082         (extensions): New variable to hold extensions path entries.
3083         * jvspec.c: Remove -fextdirs= when compiling main().
3084         * lang.c (java_decode_option): Handle -fextdirs=.
3085         * jcf.h (jcf_path_extdirs_arg): Declare new function.
3086         * Make-lang.in: Compile jcf-path with version info for use in
3087         identifying the appropriate libgcj.jar.
3088
3089 2002-04-08  Tom Tromey  <tromey@redhat.com>
3090
3091         For PR libgcj/5303:
3092         * .cvsignore: Added rmic.1 and rmiregistry.1.
3093         * gcj.texi (Top): Link to new nodes.
3094         (Invoking rmic): New node.
3095         (Invoking rmiregistry): Likewise.
3096         * Make-lang.in (java.generated-manpages): Added rmic.1 and
3097         rmiregistry.1.
3098         (java.maintainer-clean): Likewise.
3099         ($(srcdir)/java/rmic.1): New target.
3100         ($(srcdir)/java/rmiregistry.1): Likewise.
3101         (java.install-man): Handle rmic.1 and rmiregistry.1.
3102
3103 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3104
3105         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3106         Add note about handling uncaught exceptions. Add an exception handler
3107         to example.
3108
3109 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3110
3111         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3112         after using it to patch CALL_EXPR.
3113
3114 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3115
3116         * gcj.texi (Invocation): Document CNI invocation API.
3117
3118 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3119
3120         * expr.c (truthvalue_conversion): Rename.  Update.
3121         (expand_compare): Update.
3122         * java-tree.h (java_truthvalue_conversion): New.
3123         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3124
3125 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3126
3127         * java-tree.h (java_mark_addressable): New.
3128         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3129         * typeck.c (mark_addressable): Rename, update.
3130
3131 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3132
3133         * expr.c (build_java_binop): Update.
3134         * java-tree.h (java_signed_type, java_unsigned_type,
3135         java_signed_or_unsigned_type): Update.
3136         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3137         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3138         * parse.y (patch_binop): Update.
3139         * typeck.c (signed_or_unsigned_type, unsigned_type,
3140         signed_type): Update.
3141
3142 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3143
3144         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3145         (java_dummy_print): Remove.
3146         (lang_print_error): Rename.  Exit early if inhibiting output.
3147         (inhibit_error_printing_function): New.
3148         (java_init): Don't set hook.
3149         (lang_init_source): Use new boolean.
3150
3151 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3152
3153         * parse.y (do_resolve_class): Fix infinite recursion.
3154
3155 2002-03-29  Tom Tromey  <tromey@redhat.com>
3156
3157         * parse.y (check_inner_circular_reference): Ignore incomplete
3158         types.
3159
3160 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3161
3162         * Make-lang.in (builtins.o): Update.
3163         * boehm.c (get_boehm_type_descriptor): Update.
3164         * builtins.c: Include langhooks.h.
3165         * decl.c (java_init_decl_processing): Update.
3166         * java-tree.h (java_type_for_mode, java_type_for_size): New.
3167         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3168         Redefine.
3169         * typeck.c (type_for_mode, type_for_size): Update.
3170
3171 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3172
3173         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3174
3175 2002-03-28  Tom Tromey  <tromey@redhat.com>
3176
3177         * except.c (expand_end_java_handler): If the handler type is NULL,
3178         use java.lang.Throwable.  Fixes PR java/5986.
3179
3180 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3181
3182         Fix for PR java/4715:
3183         * jcf-parse.c (parse_source_file_3): New function.
3184         (read_class): Call it.
3185         (java_parse_file): Likewise.
3186
3187 2002-03-28  Jan Hubicka  <jh@suse.cz>
3188
3189         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3190
3191 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3192
3193         * parse.y (resolve_package): Initialize "decl".
3194         (lookup_package_type): Remove unused function.
3195
3196 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3197
3198         Fix for PR java/5993:
3199         * parse.y (resolve_package): Return the decl if resolution was
3200         successful. Don't special case "java.lang" and "java.lang.reflect"
3201         packages. Set type_name to the merged identifier.
3202         (resolved_qualified_expression_name): Print error using "name" if
3203         resolve_package returns NULL_TREE.
3204
3205 2002-03-27  Tom Tromey  <tromey@redhat.com>
3206
3207         * expr.c (expand_invoke): Don't generate null pointer check if
3208         we're calling <init>.
3209
3210 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3211
3212         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3213         fix prototype.
3214         * java-tree.h (java_lang_expand_expr): Similarly.
3215         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3216         (java_init): Don't set hook.
3217
3218 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3219
3220         Fix for PR java/5850:
3221         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3222         context if field was not found in the current scope.
3223         * expr.c (lookup_field): Don't look in enclosing contexts.
3224
3225 2002-03-26  Tom Tromey  <tromey@redhat.com>
3226
3227         Fix for PR java/5942:
3228         * parse.y (init_src_parse): Added sanity check.
3229         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3230         elements, not 11.
3231
3232 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3233
3234         * decl.c (lang_mark_tree): Rename java_mark_tree.
3235         * java-tree.h (java_mark_tree): New.
3236         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3237
3238 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
3239
3240         * lex.c: Change java_perform_atof to take normal parameters
3241         instead of a pointer to a parameter block.  Call it directly
3242         from java_lex.
3243
3244 2002-03-22  Mark Wielaard  <mark@klomp.org>
3245
3246         Fix for PR java/5368:
3247         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3248         when printing error message.
3249
3250 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3251
3252         * decl.c (maybe_build_cleanup): Remove.
3253
3254 2002-03-22  Tom Tromey  <tromey@redhat.com>
3255
3256         Andrew Haley  <aph@cambridge.redhat.com>
3257
3258         * expr.c (build_field_ref): Don't build a check if the field is a
3259         member of `this'.
3260
3261 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
3262
3263         Fix for PR java/6026:
3264         * lex.c (java_lex): Fix parsing of consecutive floats.
3265
3266 2002-03-21  Tom Tromey  <tromey@redhat.com>
3267
3268         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3269         class.
3270
3271 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3272
3273         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3274         insert_block, getdecls, kept_level_p, global_bindings_p): New.
3275
3276 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3277
3278         * gcj.texi: @code{gcj} becomes @command{gcj}.
3279         @code{gcc} becomes @command{gcc}.
3280         GcjRaw changed to gnu.gcc.RawData.
3281
3282 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3283
3284         * decl.c (start_java_method): Use new hook.
3285         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3286         (java_init): Remove old hook.
3287
3288 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3289
3290         * builtins.c (define_builtin): Do nothing if `type' is null.
3291         Fixes PR java/5876.
3292
3293 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3294
3295         * parse.y (parser_check_super_interface): Fix error message
3296         grammar/order.
3297
3298 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3299
3300         * jcf-parse.c (get_constant): Delete unused variables.
3301
3302 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3303
3304         * java-tree.h (java_parse_file): New.
3305         * jcf-parse.c (yyparse): Rename java_parse_file.
3306         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3307
3308 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3309
3310         * parse.y (craft_constructor): Return the constructor decl.
3311         (java_expand_classes): Update comments.
3312         (lookup_method_invoke): Call fix_constructors immediately for
3313         anonymous class. Fixes PR java/5935.
3314
3315 2002-03-15  Anthony Green  <green@redhat.com>
3316
3317         * jcf-parse.c (yyparse): Don't emit class registration
3318         constructor when compiling resource files.
3319
3320 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3321
3322         * lang.c (java_tree_code_type, java_tree_code_length,
3323         tree_code_name): Delete.
3324         (tree_code_type, tree_code_length, tree_code_name): Define.
3325         (java_init): Don't try to copy into the various tree_code
3326         arrays.
3327
3328 2002-03-12  Tom Tromey  <tromey@redhat.com>
3329
3330         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3331         UTF-8, not UCS-2.  Fixes PR java/5923.
3332
3333         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3334         a call_expr wrapped in a convert.  Fixes PR java/5848.
3335
3336 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3337
3338         * jcf-write.c (write_classfile): Improve error strings.
3339
3340 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3341
3342         * lex.c: Adjust comments to GNU standards.
3343
3344 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
3345
3346         Fix for PR java/5902:
3347         * lex.c (java_lex): Fix parsing of literals.
3348
3349 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3350
3351         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3352         to prevent it getting evaluated twice in the store checking case.
3353         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3354         examining OBJECT.
3355
3356 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3357
3358         * decl.c (java_init_decl_processing): Make sure class_type_node
3359         alignment is not less than 64 bits if hash synchronization is enabled.
3360
3361 2002-03-08  Per Bothner  <per@bothner.com>
3362
3363         * parse.y (java_complete_lhs):  Check if patch_assignment
3364         returned an error-mark.
3365
3366         * parse.y (try_builtin_assignconv):  Don't special-case zero.
3367
3368 2002-03-08  Per Bothner  <per@bothner.com>
3369
3370         Fix for PR java/5812.
3371         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
3372         here instead of in JSR macro.  Likewise with load_type_state call.
3373         Do the latter on if the return_pc has been verified (the jsr returns).
3374         (JSR):  Now just call build_java_jsr.
3375
3376 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
3377
3378         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3379         (java.install-common): Link native driver to
3380         JAVA_TARGET_INSTALL_NAME.
3381
3382 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
3383
3384         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3385         * builtins.c(sin_builtin): Likewise
3386         * builtins.c(sqrt_builtin): Likewise
3387
3388 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
3389
3390         * java/expr.c, java/jcf-parse.c, java/lex.c:
3391         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3392         REAL_ARITHMETIC blocks unconditional.  Delete some further
3393         #ifdef blocks predicated on REAL_ARITHMETIC.
3394
3395 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3396
3397         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3398         explicit sizeof/sizeof.
3399         * decl.c (java_init_decl_processing): Likewise.
3400         * jcf-parse.c (init_jcf_parse): Likewise.
3401         * parse.y (init_src_parse): Likewise.
3402
3403 2002-03-02  Per Bothner  <per@bothner.com>
3404
3405         Make --CLASSPATH by a synonym for --classpath and -classpath.
3406         Implement --bootclasspath.
3407         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
3408         (classpath_l):  Remove.
3409         (jcf_path_CLASSPATH_arg):  Remove.
3410         (jcf_path_bootclasspath_arg):  New function.
3411         (jcf_path_seal):  Simplify accordingly.
3412
3413         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
3414         (jcf_path_CLASSPATH):  Remove declaration.
3415         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
3416         (lang_specific_driver):  Translate -bootclasspath.
3417         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
3418         * lang.c (decode_lang_options):  Do jcf_path_init first.
3419         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
3420         * gjavah.c:  Also handle --bootclasspath.
3421         Handle --CLASSPATH as a synonum for --classpath.
3422         * jcf-dump.c: Likewise.
3423
3424         "." is not part of system path, but is the default for --classpath.
3425         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
3426         (jcf_path_seal):  Add "." if no CLASSPATH specified.
3427
3428         * gcj.texi:  Document changes.
3429
3430 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3431
3432         * expr.c (build_java_arraystore_check): Fix formatting.
3433
3434 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3435
3436         Fix for PR java/5758, java/5632:
3437         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3438         inner-class separator too.
3439         * parse.y (do_resolve_class): New local `decl_result.'
3440         Progressively build a name for what can have been loaded.
3441
3442 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3443
3444         * expr.c (java_array_data_offset): Removed function.
3445         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3446         (build_java_array_length_access): Obtain "length" value using a
3447         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3448         (build_java_arrayaccess): Correct comment. Access "data" using a
3449         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3450         (build_java_arraystore_check): New function.
3451         (expand_java_arraystore): Use build_java_arraystore_check.
3452         * parse.y (patch_assignment): Simplify code to insert a store check
3453         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3454         * check-init.c (check_init): Update to reflect that an array length
3455         access is now a COMPONENT_REF.
3456         * gcj.texi (Code Generation): Improve documentation of
3457         -fno-bounds-check. Add documentation for -fno-store-check.
3458         * java-tree.h (flag_store_check): Declare.
3459         (build_java_arraystore_check): Declare.
3460         * lang.c (flag_store_check): Initialize to 1.
3461         (lang_f_options): Add store-check option.
3462         * jvspec.c: Don't pass store-check option to jvgenmain.
3463         * lang-options.h: Add help string for -fno-store-check.
3464
3465 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3466
3467         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3468         * java-tree.h (java_dup_lang_specific_decl): New.
3469         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3470
3471 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3472
3473         * builtins.c, decl.c: Delete traditional-mode-related code
3474         copied from the C front end but not used, or used only to
3475         permit the compiler to link.
3476
3477 2002-02-22  Tom Tromey  <tromey@redhat.com>
3478
3479         Fix for PR java/2369:
3480         * jvspec.c (verify_class_name): New function.
3481         (lang_specific_driver): Call it.
3482         (JAVA_START_CHAR_P): New macro.
3483         (JAVA_PART_CHAR_P): Likewise.
3484
3485 2002-02-22  Per Bothner  <per@bothner.com>
3486
3487         * class.c:  Change vtable to be more compatible with g++ v3 abi.
3488         (get_dispatch_table):  Prepend offset-to-top (always 0) and
3489         type_info pointer (currently unimplemented hence NULL) to vtable.
3490         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3491         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
3492         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3493         (build_dtable_decl):  Add declarations for new fields.
3494
3495 2002-02-20  Per Bothner  <per@bothner.com>
3496
3497         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3498         to finit$ (otherwise generate_bytecode_insns drops it). However, we
3499         don't need to set it on the COMPOUND_EXPR - the caller does that.
3500
3501 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3502
3503         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3504         `--CLASSPATH' becomes `--classpath.'
3505         * gjavah.c: Likewise.
3506         * jcf-dump.c: Likewise.
3507         * lang-options.h: Likewise.
3508         * lang.c: Likewise.
3509         * jcf-path.c: Updated comment.
3510         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3511         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3512         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3513         (jcf_path_CLASSPATH_arg): Ditto.
3514         (classpath_u): Updated leading comment.
3515
3516 2002-02-20  Per Bothner  <per@bothner.com>
3517
3518         * builtins.c (check_for_builtin):  New function.
3519         (build_call_or_builtin):  Remove.
3520         * java-tree.h:  Update accordingly.
3521         * expr.c (expand_invoke):  Use build + check_for_builtin instead
3522         of build_call_or_builtin.
3523         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
3524         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3525         flag (which had caused jcf-write to incorrectly emit invokevirtual).
3526
3527 2002-02-17  Tom Tromey  <tromey@redhat.com>
3528
3529         * java-tree.h (TYPE_STRICTFP): New macro.
3530         (struct lang_type) [strictfp]: New field.
3531         (CLASS_STRICTFP): New macro.
3532         (METHOD_STRICTFP): New macro.
3533         (struct lang_decl) [strictfp]: New field.
3534         * parse.y (method_header): Disallow strictfp constructor or
3535         abstract method.
3536         (STRICT_TK): Move before MODIFIER_TK.
3537         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3538         (METHOD_MODIFIERS): Likewise.
3539         (INTERFACE_MODIFIERS): Likewise.
3540         * jcf-write.c (get_access_flags): Likewise.
3541         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3542         (add_method_1): Likewise.
3543         (get_access_flags_from_decl): Likewise.
3544         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
3545         recognize strictfp flag.
3546         * jcf.h (ACC_STRICT): New define.
3547
3548 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
3549
3550         * class.c(build_utf8_ref): Move declaration of decl_size
3551
3552 2002-02-07  Tom Tromey  <tromey@redhat.com>
3553
3554         * gcj.texi (Input Options): --CLASSPATH does not suppress system
3555         path.
3556
3557 2002-02-04  Anthony Green  <green@redhat.com>
3558
3559         * class.c (build_utf8_ref): Put UTF-8 constants into merged
3560         sections if available.
3561
3562 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3563
3564         * parse.y (java_expand_classes): Fix typo in static field loop.
3565
3566 2002-02-02  Richard Henderson  <rth@redhat.com>
3567
3568         * class.c (add_field): Mark static fields external.
3569         (build_class_ref): Remove redundant set.
3570         * parse.y (java_expand_classes): Mark static fields of classes
3571         to be compiled as local.
3572         * jcf-parse.c (parse_class_file): Likewise.
3573
3574 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
3575
3576         * gcj.texi (About CNI): New node.
3577
3578 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3579
3580         PR java/5080
3581         * jcf-parse.c : Check for HAVE_LOCALE_H before using
3582         setlocale() with LC_CTYPE as a parameter.
3583         * jv-scan.c: Same.
3584
3585 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
3586
3587         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3588         Follow GNU Coding Standards for --version.
3589
3590 2002-01-28  Tom Tromey  <tromey@redhat.com>
3591
3592         * expr.c (build_jni_stub): Ensure storage for `meth' is
3593         generated.
3594         * parse.y (java_complete_expand_methods): Set
3595         current_function_decl before building JNI stub.
3596
3597 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3598
3599         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3600         BUILT_IN_SQRTF.
3601
3602 2002-01-22  Tom Tromey  <tromey@redhat.com>
3603
3604         * decl.c (java_init_decl_processing): Use add_predefined_file.
3605         Predefine RawData.java.
3606         (predef_filenames): Removed.
3607         (java_init_decl_processing): Don't register predef_filenames.
3608         * jcf-parse.c (add_predefined_file): New function.
3609         (predefined_filename_p): Rewrote.
3610         (predefined_filename_p): No longer static.
3611         * decl.c (java_init_decl_processing): Call initialize_builtins.
3612         * Make-lang.in (JAVA_OBJS): Added builtins.o.
3613         (java/builtins.o): New target.
3614         * builtins.c: New file.
3615         * parse.y (patch_invoke): Use build_call_or_builtin.
3616         * java-tree.h (build_call_or_builtin): Declare.
3617         (initialize_builtins): Declare.
3618         (java_set_exception_lang_code): Removed unused declaration.
3619         (PREDEF_FILENAMES_SIZE): Removed.
3620         (java_tree_index): Added JTI_PREDEF_FILENAMES.
3621         (predef_filenames): New define.
3622         (add_predefined_file): Declare.
3623         (predefined_filename_p): Declare.
3624         * expr.c (expand_invoke): Use build_call_or_builtin.
3625
3626 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3627
3628         * parse.y (patch_switch_statement): Fix format specifier.
3629
3630 2002-01-16  Tom Tromey  <tromey@redhat.com>
3631
3632         More for PR java/5365:
3633         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
3634         default.
3635         (process_file): Generate include for
3636         java.lang.UnsupportedOperationExceptions.
3637
3638 2002-01-15  Andreas Jaeger  <aj@suse.de>
3639
3640         * .cvsignore: Add man pages.
3641
3642 2002-01-15  Tom Tromey  <tromey@redhat.com>
3643
3644         Fix for PR java/5365:
3645         * gjavah.c (process_file): Turn class name into a file name.
3646
3647 2002-01-14  Matthias Klose  <doko@debian.org>
3648
3649         * gcj.texi: Fix whitespace and formatting errors in the
3650         synopsis of the man pages. Update copyright.
3651
3652 2002-01-14  Tom Tromey  <tromey@redhat.com>
3653
3654         For PR libgcj/5303:
3655         * Make-lang.in (java.install-man): Handle jv-convert man page.
3656         (java.generated-manpages): Added jv-convert.1.
3657         (java.uninstall): Remove jv-convert.1.
3658         (java.maintainer-clean): Likewise.
3659         ($(srcdir)/java/jv-convert.1): New target.
3660         * gcj.texi (Top): Link to jv-convert node.
3661         (Individual utilities): Likewise.
3662         (Invoking jv-convert): New node.
3663
3664 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
3665             Martin Kahlert  <martin.kahlert@infineon.com>
3666
3667         * jcf-parse.c (get_constant): Don't swap lo/hi for big
3668         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
3669
3670 2002-01-03  Graham Stott  <grahams@redhat.com>
3671
3672         * class.c (compile_resource_file): Update copyright date.
3673         Constify filename parameter.
3674         (java-tree.h): Update copyright date.
3675         (compile_resource_file): Constify filename parameter.
3676
3677 2002-01-03  Graham Stott  <grahams@redhat.com>
3678
3679         * gcc/jcf-parse.c: Update copyright date.
3680         (yyparse): Constify resource_filename.
3681
3682 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3683
3684         * parse.y (src_parse_roots): Don't needlessly zero init.
3685
3686 2001-12-31  Tom Tromey  <tromey@redhat.com>
3687
3688         * parse.y (dump_java_tree): New function.
3689         (source_end_java_method): Call it.
3690         (end_class_declaration): Likewise.
3691         * lang.c (java_decode_option): Call dump_switch_p.
3692
3693 2001-12-28  Tom Tromey  <tromey@redhat.com>
3694
3695         * gen-table.pl: Don't process characters after \uffff.  Added
3696         comment pointing to input file.
3697
3698 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3699
3700         * gen-table.pl: Const-ify output.  Document the location of a
3701         suitable unicode input file.
3702
3703         * chartables.h: Regenerate.
3704
3705 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3706
3707         * chartables.h: Const-ify.
3708         * gjavah.c (options): Likewise.
3709         * jcf-dump.c (options): Likewise.
3710         * jv-scan.c (options): Likewise.
3711         * lex.c (java_start_char_p, java_part_char_p): Likewise.
3712         * parse.y (binop_lookup): Likewise.
3713
3714 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3715
3716         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
3717         the static arrays that are output.
3718         * jvspec.c (jvgenmain_spec): Make static.
3719         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
3720         * keyword.h: Regenerate.
3721         * lang.c (string_option, process_option_with_no, lang_f_options,
3722         lang_W_options): Const-ify.
3723         * lex.c (java_lex): Likewise.
3724
3725 2001-12-21  Richard Henderson  <rth@redhat.com>
3726
3727         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
3728         (get_boehm_type_descriptor): ... here.  Arrange for the
3729         TREE_TYPE to get set properly.
3730
3731 2001-12-21  Richard Henderson  <rth@redhat.com>
3732
3733         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
3734         only if the target requires collect2.
3735
3736         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
3737
3738 2001-12-20  Tom Tromey  <tromey@redhat.com>
3739
3740         For PR java/4509:
3741         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
3742         CAN_COMPLETE_NORMALLY for the node.
3743         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
3744         generate code for second branch if first branch can't complete
3745         normally.
3746         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
3747         the loop head if the loop body can't complete normally.
3748
3749 2001-12-20  Tom Tromey  <tromey@redhat.com>
3750
3751         For PR java/4766:
3752         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
3753         case where `finally' clause can't complete normally.
3754
3755 2001-12-20  Tom Tromey  <tromey@redhat.com>
3756
3757         Fixes PR java/5057:
3758         * parse.y (analyze_clinit_body): Added this_class parameter.
3759         Check for more cases where we must keep <clinit>.
3760         (maybe_yank_clinit): Cleaned up flow control.
3761
3762 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3763
3764         * decl.c (java_init_decl_processing): Don't initialize
3765         finit_leg_identifier_node.
3766         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
3767         (finit_leg_identifier_node): Remove.
3768         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
3769
3770 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3771
3772         * mangle.c (mangle_member_name): Don't special-case for
3773         NO_DOLLAR_IN_LABEL.
3774         * mangle_name.c (unicode_mangling_length): Likewise.
3775         (append_unicode_mangled_name): Likewise.
3776         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
3777         code.
3778
3779 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3780
3781         * expr.c (build_java_array_length_access): Don't force null pointer
3782         check unless flag_check_references is set.
3783
3784 2001-12-20  Tom Tromey  <tromey@redhat.com>
3785
3786         Fix for PR java/3417:
3787         * parse.y (patch_assignment): Added special processing for
3788         `return'.
3789         (patch_return): Don't convert booleans to integers, and don't
3790         special-case `null'.
3791
3792 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
3793
3794         * config-lang.in (diff_excludes): Remove.
3795
3796 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3797
3798         * gcj.texi: Update link to GCC manual.
3799
3800 2001-12-17  Tom Tromey  <tromey@redhat.com>
3801
3802         * parse.y (link_nested_class_to_enclosing): Removed useless
3803         statement.
3804
3805 2001-12-16  Tom Tromey  <tromey@redhat.com>
3806
3807         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
3808         Fixes PR java/5088.
3809
3810 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
3811
3812         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
3813         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
3814         spelling errors.
3815
3816 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3817
3818         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
3819
3820 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3821
3822         * decl.c (java_init_decl_processing): Build otable_type correctly.
3823         otable_decl is an otable_type.
3824
3825 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3826
3827         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
3828         otable_type, otable_ptr_type, method_symbol_type,
3829         method_symbols_array_type, method_symbols_array_ptr_type): New
3830         field/global tree definitions.
3831         (flag_indirect_dispatch): New flag.
3832         * decl.c (java_init_decl_processing): Initialize new otable and
3833         otable_syms type nodes and decls. Add new field "index" to
3834         method_type_node.
3835         * class.c (build_method_symbols_entry): New function.
3836         (make_method_value): Set "index" to to method's vtable index for
3837         virtual methods when indirect-dispatch is not used.
3838         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
3839         and set vtable_method_count to -1. Set otable and otable_syms field
3840         if indirect-dispatch is used and there was something to put in them.
3841         (build_method_symbols_entry): New function.
3842         (emit_offset_symbol_table): New function.
3843         * expr.c (get_offset_table_index): New function.
3844         (build_invokevirtual): Build array reference to otable at the index
3845         returned by get_offset_table_index, and use the result as the vtable
3846         offset.
3847         (build_invokeinterface): Similar.
3848         * jcf-parse.c (yyparse): If indirect-dispatch, call
3849         emit_offset_symbol_table at the end of compilation, after all classes
3850         have been generated.
3851         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
3852         * lang.c (flag_indirect_dispatch): Define.
3853         (lang_f_options): Add indirect-dispatch flag.
3854
3855 2001-12-14  Matthias Klose  <doko@debian.org>
3856
3857         * gcj.texi: Markup for man page generation. Document missing
3858         options printed by <tool> --help.
3859         Terminate description of gij's -ms option with a dot.
3860         * Make-lang.in ($(srcdir)/java/*.1): New targets.
3861         (java.generated-manpages java.install-man, java.uninstall,
3862         java-maintainer-clean) Updated.
3863
3864 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
3865
3866         * class.c (get_dispatch_table): Fix java vtable layout
3867         for TARGET_VTABLE_USES_DESCRIPTORS.
3868         * decl.c (java_init_decl_processing): Initialize
3869         alloc_no_finalizer_node, finalize_identifier_node.
3870         * expr.c (class_has_finalize_method): New function.
3871         (expand_java_NEW): Generate calls for finalizer-free allocation.
3872         (build_invokevirtual): Fix java vtable layout for
3873         TARGET_VTABLE_USES_DESCRIPTORS.
3874         * java-tree.h (enum java_tree_index): New entries:
3875         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
3876         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
3877         (class_has_finalize_method): declare.
3878         (HAS_FINALIZER_P): New macro.
3879         * parse.y (patch_invoke): Generate calls for finalizer-free
3880         allocation.
3881
3882 2001-12-12  Matthias Klose  <doko@debian.org>
3883
3884         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
3885         whitespace at end of line.
3886
3887 2001-12-11  Tom Tromey  <tromey@redhat.com>
3888
3889         * lex.c (java_init_lex): Define wfl_to_string as
3890         gnu.gcj.runtime.StringBuffer unless generating bytecode.
3891
3892 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
3893
3894         * class.c (make_method_value): Use null_pointer_node to
3895         represent empty exception table.
3896
3897 2001-12-10  Tom Tromey  <tromey@redhat.com>
3898
3899         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
3900
3901 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
3902
3903         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
3904
3905 2001-12-09  Per Bothner  <per@bothner.com>
3906
3907         * check-init.c (current_switch_has_default):  New static field.
3908         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
3909         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
3910         DEFAULT_EXPR seen, simulate a default alternative that copies state.
3911
3912 2001-12-09  Tom Tromey  <tromey@redhat.com>
3913
3914         * check-init.c (check_init): Don't allow pre- or post- increment
3915         or decrement of final variable.
3916         (final_assign_error): Minor error message rewording.
3917
3918 2001-12-08  Tom Tromey  <tromey@redhat.com>
3919
3920         * java-tree.h: Fixed typo.
3921
3922         * gjavah.c (decompile_method): Don't decompile to `return this'
3923         for static methods.
3924
3925         * gjavah.c (cxx_keywords): Re-sorted.
3926         * lex.c (cxx_keywords): Re-sorted.
3927
3928         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
3929         else.
3930
3931         * gjavah.c (print_namelet): Clear subnamelets.
3932         (HANDLE_METHOD): Set `method_printed' earlier.
3933
3934 2001-12-07  Tom Tromey  <tromey@redhat.com>
3935
3936         * lang.c (lang_f_options): Added
3937         optimize-static-class-initialization.
3938         (java_decode_option): Removed special case.
3939
3940 2001-12-07  Per Bothner  <per@bothner.com>
3941
3942         * check-init.c (check_init):  Fix typo freeing memory twice.
3943
3944 2001-12-05  Per Bothner  <per@bothner.com>
3945
3946         Restore support for static class initialization optimization.
3947         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
3948         * check-init.c (check_int):  At end of BLOCK handle initialization
3949         blocks, which used to be done in java_complete_expand_method but did
3950         not handle the case where check_for_initialization might allocate
3951         more than a word of bits.
3952         * decl.c (lang_make_tree):  The smic field is now a tree.
3953         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
3954         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
3955
3956         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
3957
3958         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
3959         Change from a hash table to a list.
3960         (struct_lang_decl):  Change field 'smic' to match.
3961         * class.c (add_method_1):  Initialize
3962         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
3963         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
3964         (java_expand_method_bodies): -here, since 'smic' is now a list.
3965         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
3966
3967         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
3968
3969         * class.c (java_hash_compare_tree_node):  Fix casts.
3970
3971 2001-12-04  Per Bothner  <per@bothner.com>
3972
3973         * check-init.c:   Handle definite unassignment to finals in addition
3974         to definite assignment.
3975         (loop_current_locals):  New field.
3976         (num_current_locals, int start_current_locals, num_current_words):
3977         Make static.
3978         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
3979         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
3980         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
3981         (get_variable_decl, check_final_reassigned):  New functions.
3982         (check_init, check_bool_init):  Modify as needed for checking finals.
3983         (check_for_initialization):  Take extra parameter and return void.
3984         Do extra start-up logic to check final fields for assignment.
3985         * parse.y (check_static_final_variable_assignment_flag,
3986         reset_static_final_variable_assignment_flag, check_final_assignment,
3987         check_final_variable_local_assignment_flag,
3988         reset_final_variable_indirect_assignment_flag,
3989         reset_final_variable_global_assignment_flag):  Remove functions.
3990         (java_complete_expand_methods, outer_field_access_fix,
3991         patch_assignment): Remove no-longer used logic.
3992         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
3993         * parse.y (register_fields, java_complete_tree):  Update accordingly.
3994
3995         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
3996         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
3997         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
3998
3999         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
4000
4001         * java-tree.h (DECL FINAL):  New bit-field.
4002         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
4003         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
4004         (DECL_INIT_CALLS_THIS):  New macro.
4005         (struct lang_decl):  New bit-field init_calls_this.
4006         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4007         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4008         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
4009         use it for both local variables and final fields.
4010         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
4011         and local_final.
4012         (struct lang_type):  Remove hfv bit-field.
4013         (check_for_initialization):  Change to return void.
4014
4015         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
4016         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
4017         * check-init.c (final_assign_error):  New helper function.
4018         (check_final_reassigned, check_init):  Use it.
4019         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4020
4021         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
4022         bit-fields to unsigned.
4023
4024 2001-12-03  Per Bothner  <per@bothner.com>
4025
4026         * parse.y (patch_binop):  Minor constant folding.
4027
4028         * parse.y (build_current_thisn):  Shorter 'buffer'.
4029
4030 2001-12-03  Per Bothner  <per@bothner.com>
4031
4032         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
4033         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4034         * jcf-write.c (generate_bytecode_insns):  Remove support for
4035         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4036         * check-init.c (check_init):  Likewise.
4037
4038 2001-12-03  Per Bothner  <per@bothner.com>
4039
4040         * verify.c (subroutine_nesting):  New function.
4041         (verify_jvm_instructions):  Use it to fix logic for checking that
4042         we're done with the current subroutine.
4043
4044         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4045         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4046
4047 2001-12-03  Per Bothner  <per@bothner.com>
4048
4049         * jcf.h:  Fix obvious typo in comment.
4050         * typeck.c (build_null_signature):  Add comment.
4051
4052 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4053
4054         * expr.c: Remove leading capital from diagnostic messages, as
4055         per GNU coding standards.
4056         * jcf-io.c: Similarly.
4057         * jcf-parse.c: Similarly.
4058         * jv-scan.c: Similarly.
4059         * jvspec.c: Similarly.
4060         * mangle.c: Similarly.
4061
4062 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
4063             Alexandre Petit-Bianco  <apbianco@redhat.com>
4064
4065         * expr.c (build_java_arrayaccess): Call save_expr on array for
4066         correct evaluation order, modified comment, fixed indentation.
4067         * parse.y: (patch_assignment): Correctly extract the array base
4068         from the tree generate by build_java_arrayaccess, added comments.
4069         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4070         Fixes PR java/3096, PR java/3803, PR java/3965.
4071
4072 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4073
4074         * expr.c (expand_byte_code): Remove trailing periods from messages.
4075         * jcf-parse.c (load_class, jcf_parse): Similarly.
4076         * jcf-write.c (generate_classfile): Similarly.
4077         * lex.c (java_lex): Similarly.
4078
4079 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4080
4081         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4082
4083 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4084
4085         * Make-lang.in (java.generated-manpages): New dummy target.
4086
4087 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4088
4089         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4090         ASM_FINAL_SPEC.
4091         (lang_specific_pre_link): Use set_input to set input_filename.
4092         Append `main' here.
4093         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4094         (main): Fix definition.
4095         Strip `main' from classname.
4096         Fixes PR java/227.
4097
4098 2001-11-18  Roger Sayle <roger@eyesopen.com>
4099
4100         * parse.h (java_expand_switch): Remove old prototype.
4101
4102 2001-11-18  Tom Tromey  <tromey@redhat.com>
4103
4104         Fix for PR java/1401:
4105         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4106         arg0 is null.
4107         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4108         correctly.
4109
4110 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4111
4112         * lang.c (finish_parse): Rename to java_finish.
4113         (LANG_HOOKS_FINISH, java_finish): New.
4114
4115 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4116
4117         * decl.c (init_decl_processing): Rename java_init_decl_processing.
4118         * java-tree.h: New prototype.
4119         * lang.c (java_init): Update prototype.  Combine with old init_parse.
4120
4121 2001-11-13  Tom Tromey  <tromey@redhat.com>
4122
4123         * gjavah.c (method_signature): New global.
4124         (HANDLE_METHOD): Set it.
4125         (decompile_return_statement): New function.
4126         (decompile_method): Use it.
4127         (print_method_info): Removed `synth' argument.
4128
4129 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4130
4131         * java-tree.h (java_set_yydebug): New.
4132         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4133         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4134         (print_lang_decl, print_lang_type, print_lang_identifier,
4135         print_lang_statistics, lang_print_xnode): Remove.
4136
4137 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4138
4139         * jcf-parse.c (init_lex): Remove.
4140         * lang.c (language_string, lang_identify): Remove.
4141         (struct lang_hooks): Constify.
4142         (LANG_HOOKS_NAME): Override.
4143         (init_parse): Update.
4144
4145 2001-11-08  Andreas Franck  <afranck@gmx.de>
4146
4147         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4148         program_transform_name the way suggested by autoconf.
4149         (java.install-common): Also transform auxiliary program names with
4150         program_transform_name.
4151
4152 2001-11-08  Tom Tromey  <tromey@cygnus.com>
4153
4154         * parse.y (trap_overflow_corner_case): New rule.
4155         (unary_expression): Use it.
4156         * lex.c (java_init_lex): Don't set minus_seen.
4157         (yylex): Don't use minus_seen.  Communicate overflow to parser for
4158         it to handle.
4159         (error_if_numeric_overflow): New function.
4160         * parse.h (minus_seen): Removed field.
4161         (JAVA_RADIX10_FLAG): New define.
4162
4163 2001-11-07  Tom Tromey  <tromey@redhat.com>
4164
4165         Patch for PR java/1414:
4166         * parse.y (case_label_list): New global.
4167         (goal): Register case_label_list with GC.
4168         (java_complete_lhs): Save new case on case_label_list.
4169         (patch_switch_statement): Check for duplicate case labels.
4170
4171 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4172
4173         * parse.y (patch_assignment): Removed unused third argument.
4174         (java_complete_lhs): Removed unused third argument to patch_assignment.
4175
4176 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4177
4178         * lang.c: Include langhooks-def.h.
4179         * Make-lang.in: Update.
4180
4181 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
4182
4183         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4184
4185 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4186
4187         * mangle.c (find_compression_record_match): Don't match compression
4188         records for package name elements unless they occur at the start of
4189         the name. Fix for PR java/4717.
4190
4191 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4192
4193         * expr.c (expand_java_field_op): Don't special-case references to
4194         java.lang.PRIMTYPE.TYPE.
4195         (build_primtype_type_ref): Removed.
4196         * java-tree.h (build_primtype_type_ref): Remove prototype.
4197         * parse.y (maybe_build_primttype_type_ref): Removed.
4198         (complete_function_arguments): Don't special-case references to
4199         java.lang.PRIMTYPE.TYPE.
4200         (patch_assignment): Likewise.
4201         (array_constructor_check_entry): Likewise.
4202
4203 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4204
4205         * mangle.c (static tree compression_table): Fixed leading comment.
4206         * parse.h (struct parser_ctxt): Fixed field comment.
4207         * parse.y (check_pkg_class_access): New prototype, fixed leading
4208         comment, new parameter used to emit error only if passed as true.
4209         (parse_check_super): Pass extra argument to check_pkg_class_access.
4210         (do_resolve_class): Likewise.
4211         (process_imports): Likewise.
4212         (read_import_dir): Fixed indentation.
4213         (find_in_imports_on_demand): New local class_type_name. Local
4214         node_to_use deleted. while loop changed into for loop. Report
4215         multiple definition only for accessible classes. Improved error
4216         message.
4217         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4218         assigned to parameter list, fixed indentation. while loop changed
4219         into for loop, restore TREE_CHAIN on local `tem' before the next
4220         iteration.
4221
4222 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4223
4224         * lang.c (lang_get_alias_set): Deleted.
4225
4226 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4227
4228         * gjavah.c (jni_print_char): Fix thinko in last change.
4229
4230         * gjavah.c (jni_print_char, decode_signature_piece): Use
4231         safe-ctype macros and/or fold extra calls into fewer ones.
4232         * lex.c (java_read_unicode, java_lex): Likewise.
4233         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4234         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4235         * mangle_name.c (append_unicode_mangled_name,
4236         unicode_mangling_length): Likewise.
4237
4238 2001-10-17  Richard Henderson  <rth@redhat.com>
4239
4240         * Make-lang.in (java/lang.o): Depend on langhooks.h.
4241
4242 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4243
4244         * lang.c (langhooks.h): Included.
4245         (LANG_HOOKS_INIT): Redefined.
4246         (LANG_HOOKS_INIT_OPTIONS): Likewise.
4247         (LANG_HOOKS_DECODE_OPTION): Likewise.
4248         (struct lang_hooks lang_hooks): New initialization.
4249
4250 2001-10-11  Per Bothner  <per@bothner.com>
4251
4252         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
4253         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4254         The former is simpler, and jcf-write.c handles it better.
4255         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
4256         or WITH_CLEANUP_EXPR.
4257         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
4258         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4259
4260         * parse.y (patch_if_else_statement):  If the condition is constant,
4261         optimize away the test.
4262
4263 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4264
4265         * parse.y (patch_cast): Call patch_string on the first operand of
4266         the incoming node, update it if necessary. Fixes PR java/4510.
4267
4268 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4269
4270         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4271         when name qualifier matches a package name.
4272
4273 2001-10-08  Tom Tromey  <tromey@redhat.com>
4274
4275         Fix for PR java/4489:
4276         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4277         force a new label when computing `body_block'.
4278
4279 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4280
4281         * jcf-io.c (format_uint): Const-ify.
4282         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4283         * lex.c (java_get_line_col): Likewise.
4284         * parse.y (build_incdec): Likewise.
4285
4286 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4287
4288         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4289         a NULL enclosing context if appropriate. Fixes PR java/4466.
4290
4291 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4292
4293         * parse.y (patch_assignment): Use lvalue's original TYPE when
4294         building the final COMPOUND_EXPR.
4295         (try_reference_assignconv): Fixed leading comment.
4296
4297 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4298
4299         * parse.y (check_final_variable_indirect_assignment): For
4300         COMPOUND_EXPR, return only if finals were found initialized
4301         properly, if not, keep on checking.
4302         (check_final_variable_global_assignment_flag): New local
4303         error_found, set when appropriate and used to decide whether to
4304         report uninitialized finals. Fixed typo in comment.
4305
4306 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4307
4308         * decl.c (init_decl_processing): Fixed typo in predef_filenames
4309         last three initializations. Fixes PR java/4360.
4310
4311 2001-09-21  Richard Henderson  <rth@redhat.com>
4312
4313         * class.c (get_dispatch_table): Handle function descriptors.
4314         (build_dtable_decl): Likewise.
4315         * expr.c (build_invokevirtual): Likewise.
4316
4317 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4318
4319         * parse.y (patch_method_invocation): Build class initialization
4320         when static finals are used to qualify method invocation.
4321         Fixes PR java/4366.
4322
4323 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
4324
4325         * parse.h: (WFL_STRIP_BRACKET): Re-written using
4326         build_type_name_from_array_name.
4327         (STRING_STRIP_BRACKETS): New macro.
4328         * parse.y (build_type_name_from_array_name): New function.
4329         (array_creation_expression:): Accumulate []s instead of [s.
4330         (cast_expression:): Accumulate []s instead of [s after cast type
4331         name.
4332         (build_array_from_name): Local string deleted, use
4333         build_type_name_from_array_name.
4334         (build_unresolved_array_type): Accumulate []s instead of [s after
4335         type name.
4336         (register_fields): Fixed comment.
4337         (resolve_class): Local name, base deleted, new locals tname and
4338         array_dims. Use build_type_name_from_array_name. Use array_dims to
4339         build array type.
4340         (purify_type_name): Use STRING_STRIP_BRACKETS.
4341
4342 2001-09-18  Andreas Jaeger  <aj@suse.de>
4343
4344         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4345         * jv-scan.c: Likewise.
4346
4347 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4348
4349         * parse.y (patch_method_invocation): Inner class creation context
4350         check not enforced within constructors. Fixes PR java/1873.
4351
4352 2001-09-16  Tom Tromey  <tromey@redhat.com>
4353
4354         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4355         NOTE_PUSH for single-case push.  Fixes PR java/4189.
4356
4357 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4358
4359         * java-tree.h (TYPE_IMPORT_LIST): New macro.
4360         (TYPE_IMPORT_DEMAND_LIST): Likewise.
4361         (struct lang_type): New fields import_list and import_demand_list.
4362         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4363         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4364         (do_resolve_class): New local saved_enclosing_type, initialized,
4365         passed as parameter to find_in_imports and find_in_imports_on_demand.
4366         (find_in_imports): Added paramater enclosing_type, use its
4367         TYPE_IMPORT_LIST when applicable.
4368         (find_in_imports_on_demand): Added parameter enclosing_type, use
4369         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4370         declaration and initialization.
4371         (fold_constant_for_init): Switch/restore current_class to the
4372         appropriate context.
4373
4374 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
4375
4376         * verify.c (verify_jvm_instructions): Fix typo.
4377
4378 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4379
4380         * expr.c (expand_invoke): Const-ification.
4381         * parse.y (patch_method_invocation): Likewise.
4382
4383 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4384
4385         * gjavah.c (cxx_keywords): Const-ification.
4386         * keyword.gperf (java_keyword): Likewise.
4387         * lang.c (java_tree_code_name): Likewise.
4388         * lex.c (cxx_keywords): Likewise.
4389         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4390
4391 2001-09-11  Richard Henderson  <rth@redhat.com>
4392
4393         * parse.h (ctxp_for_generation): Mark extern.
4394
4395 2001-09-10  Richard Henderson  <rth@redhat.com>
4396
4397         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4398
4399 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4400
4401         * typeck.c (java_array_type_length, build_prim_array_type):
4402         Represent empty arrays by NULL index.
4403
4404 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
4405
4406         * java-tree.h (compile_resource_file): Grouped with other prototypes.
4407         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4408
4409 2001-09-06  Anthony Green  <green@redhat.com>
4410
4411         * class.c (O_BINARY): Define if necessary.
4412         (registerResource_libfunc): Declare.
4413         (init_class_processing): Initilize registerResource_libfunc.
4414         (compile_resource_file): New function.
4415         * java-tree.h (resource_name): Declare.
4416         (compile_resource_file): Declare.
4417         * jcf-parse.c (yyparse): Handle compiling java resource files.
4418         * lang.c (java_decode_option): Handle -fcompile-resource option.
4419         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4420         resource files.
4421         * gcj.texi (Code Generation): Add documentation for -R flag.
4422
4423 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
4424
4425         * jcf-write.c (generate_classfile): Issue an error in case of
4426         field/initial value mismatch.
4427         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4428         being initialized and we're generating bytecode.
4429         (java_complete_lhs): In MODIFY_EXPR section: added comments,
4430         set DECL_INITIAL properly when appropriate.
4431         Fixes PR java/4230
4432         Fixes PR java/4204
4433
4434 2001-09-01  Per Bothner  <per@bothner.com>
4435
4436         * parse.y (maybe_yank_clinit):  A field without an initializer is not
4437         relevant.  All initializers except static final and constant require
4438         <clinit>, regardless of flag_emit_class_files.
4439
4440 2001-08-31  Per Bothner  <per@bothner.com>
4441
4442         * class.c (set_constant_value):  When not emitting class files, then a
4443         String ConstantValue is a utf8const_ptr_type.
4444
4445 2001-08-30  Per Bothner  <per@bothner.com>
4446
4447         * jcf-write.c (generate_classfile):  Check that field is primitive
4448         or string before emitting ConstantValue attribute.
4449
4450 2001-08-30  Per Bothner  <per@bothner.com>
4451
4452         * parse.y (resolve_qualified_expression_name):  If creating a
4453         COMPOUND_EXPR, set it's type correctly.
4454
4455 2001-08-30  Per Bothner  <per@bothner.com>
4456
4457         * jcf-io.c (open_class):  Set filename field.
4458
4459         * jcf-parse,c (parse_class_file):  Set current_function_decl
4460         for better error message when Code attribute is missing.
4461
4462         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
4463         better diagnostics, especially for constructors.
4464
4465 2001-08-30  Per Bothner  <per@bothner.com>
4466
4467         * jcf-write.c (generate_classfile):  Don't write ConstantValue
4468         attribute if field is not final, for compatibility with jdk.
4469
4470         * jcf-write.c (generate_classfile):  Convert ConstantValue values
4471         to correct type.  Work-around for front-end bug.
4472         * class.c (set_constant_value):  Error if constant has wrong type.
4473
4474 2001-08-30  Per Bothner  <per@bothner.com>
4475
4476         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
4477         "Double" are printed at verbosity 1.
4478
4479         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
4480
4481         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
4482
4483 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4484
4485         * parse.y (patch_assignment): Don't verify final re-assignment here.
4486         (java_complete_lhs): Verify assignments to finals calling
4487         patch_assignment. Verify re-assignments to finals before calling
4488         patch_assignment.
4489
4490 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
4491
4492         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4493         Fixes PR java/1413
4494
4495 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4496
4497         * lex.c (java_lex): new local found_hex_digits. Set and then used
4498         in test to reject invalid hexadecimal numbers.
4499         * parse.y (java_complete_tree): Prevent unwanted cast with
4500         initialized floating point finals.
4501         (patch_binop): Emit a warning when detecting a division by zero,
4502         mark result not constant, don't simplify non integer division.
4503
4504 2001-08-28  Per Bothner  <per@bothner.com>
4505
4506         * jcf-write.c  (generate_bytecode_insns):  For increments and
4507         decrements just recurse to push constant.  Improvement on Mark's patch.
4508
4509 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
4510
4511         * jcf-write.c (generate_bytecode_insns): Generate an integer to
4512         real conversion for increments and decrements of reals.
4513
4514 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4515
4516         * parse.y (resolve_qualified_expression_name): Handle unresolved
4517         qualified expressions, prevent numerical qualifiers, fixed typo.
4518         Fixes PR java/4141
4519
4520 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
4521
4522         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4523         don't report anything but deprecated class when marked so. Handle
4524         VAR_DECL.
4525         (patch_method_invocation): Check deprecation on methods and types.
4526         (patch_binop): code becomes an enum tree_code, added default: to
4527         switch to handle that. Detect division by zero, try to fold and
4528         return before using a subroutine.
4529
4530 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4531
4532         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4533         file smaller than 4 bytes.
4534         * parse.y (check_inner_circular_reference): New function.
4535         (check_circular_reference): Likewise.
4536         (array_initializer:): Accept {,}.
4537         (java_check_circular_reference): Rewritten using
4538         check_circular_reference and check_inner_circular_reference.
4539         (java_complete_expand_method): Unconditionally save and restore
4540         the unpurged exception list.
4541         (build_dot_class_method_invocation): Unmangle signature parameter.
4542
4543 2001-08-21  Tom Tromey  <tromey@redhat.com>
4544
4545         * decl.c (init_decl_processing): Add `throws' field to method
4546         descriptor.
4547         * class.c (make_method_value): Compute `throws' field for method.
4548
4549 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
4550
4551         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4552         circularity is detected.
4553         (ctors_unchecked_throws_clause_p): Fixed leading comment.
4554
4555 2001-08-17  Richard Henderson  <rth@redhat.com>
4556
4557         * class.c (emit_register_classes): Add align parameter to
4558         call to assemble_integer.
4559
4560 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
4561
4562         * jcf-parse.c (load_class): New locals saved and class_loaded. If
4563         loading a class_or_name fails, try considering an innerclass name
4564         and load the enclosing context.
4565         * parse.y (resolve_inner_class): New function.
4566         (find_as_inner_class): Added leading comment.
4567         (register_incomplete_type): Keep the current context as enclosing
4568         context for JDEP_FIELD dependencies.
4569         (do_resolve_class): Locals new_class_decl and super initialized to
4570         NULL. Call resolve_inner_class, explore the enclosing context
4571         superclass if necessary.
4572         Fixes PR java/4007
4573
4574 2001-08-16  Tom Tromey  <tromey@redhat.com>
4575
4576         * jcf-dump.c (main): Updated for change to jcf_path_seal.
4577         * gjavah.c (main): Updated for change to jcf_path_seal.
4578         * lang.c (version_flag): New global.
4579         (java_decode_option): Recognize `-version'.
4580         (java_init): Update for change to jcf_path_seal.
4581         * jcf.h (jcf_path_seal): Added `print' argument.
4582         * jcf-path.c (jcf_path_seal): Added `print' argument.
4583
4584 2001-08-13  Zack Weinberg  <zackw@panix.com>
4585
4586         * Make-lang.in (java/decl.o): Update dependencies.
4587         * decl.c: Include libfuncs.h, don't include toplev.h.
4588
4589 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4590
4591         * decl.c (init_decl_processing): exception_type_node,
4592         class_not_found_type_node, and no_class_def_found_type_node
4593         initialized. predef_filenames augmented accordingly.
4594         instinit_identifier_node initialized.
4595         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4596         * java-tree.h (enum java_tree_index): New entries
4597         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4598         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4599         (exception_type_node): New macro.
4600         (class_not_found_type_node): Likewise.
4601         (no_class_def_found_type_node): Likewise.
4602         (instinit_identifier_node): Likewise.
4603         (PREDEF_FILENAMES_SIZE): Adjusted.
4604         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4605         (struct lang_type): Fixed typo in bitfield name.
4606         (DECL_INSTINIT_P): New macro.
4607         (ID_INSTINIT_P): Likewise.
4608         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4609         attribute.
4610         * parse.y (encapsulate_with_try_catch): New function.
4611         (generate_instinit): Likewise.
4612         (build_instinit_invocation): Likewise.
4613         (ctors_unchecked_throws_clause_p): Likewise.
4614         (add_instance_initializer): Deleted.
4615         (build_instance_initializer): Likewise.
4616         (in_instance_initializer): Likewise.
4617         (check_method_redefinition): instinit$ not to be verified.
4618         (java_complete_expand_methods): Generate instinit$, simplified code.
4619         (build_dot_class_method): Eliminated unnecessary locals. Use
4620         encapsulate_with_try_catch, removed unnecessary code.
4621         (fix_constructors): New local iii. Use build_instinit_invocation.
4622         (patch_method_invocation): Added comment.
4623         (maybe_use_access_method): Don't consider instinit$.
4624         (find_applicable_accessible_methods_list): Shorten the search for
4625         instinit$ too.
4626         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4627         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4628         (patch_throw_statement): Likewise. Fixed typo.
4629
4630 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
4631
4632         Revert:
4633         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4634         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4635         ASM_FINAL_SPEC.
4636         (lang_specific_pre_link): Use set_input to set input_filename.
4637         Append `main' here.
4638         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4639         (main): Fix definition.
4640         Strip `main' from classname.
4641         Fixes PR java/227.
4642
4643 2001-08-11  Zack Weinberg  <zackw@panix.com>
4644
4645         * lex.h: Don't include setjmp.h.  Don't define
4646         SET_FLOAT_HANDLER or prototype set_float_handler.
4647
4648 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4649
4650         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
4651         `poplevel' in the right order.
4652
4653 2001-08-09  Richard Henderson  <rth@redhat.com>
4654
4655         * Make-lang.in (class.o): Depend on TARGET_H.
4656         * class.c (emit_register_classes): Use target hooks instead of
4657         assemble_constructor and assemble_destructor.
4658
4659 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
4660
4661         * check-init.c (flags.h): Include
4662         (check_init): Don't report uninitialized static class
4663         initialization flags, don't free bit index when doing static class
4664         initialization optimization.
4665         (check_for_initialization): Return type changed to `unsigned int.'
4666         (attach_initialized_static_class): New function.
4667         * class.c (add_method_1): Create the initialized static class
4668         table if necessary.
4669         (finish_class): Always emit deferred inline methods.
4670         * decl.c (emit_init_test_initialization): Moved to expr.c
4671         (complete_start_java_method): Don't traverse
4672         DECL_FUNCTION_INIT_TEST_TABLE.
4673         (lang_mark_tree): Mark hash tables in function decls.
4674         * expr.c (emit_init_test_initialization): Moved from decl.c.
4675         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
4676         initialization flag, set DECL_CONTEXT and
4677         LOCAL_CLASS_INITIALIZATION_FLAG.
4678         (java_lang_expand_expr): Emit initialization code for static class
4679         initialized flags when entering block, if necessary.
4680         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
4681         * java-tree.h (flag_optimize_sci): New global variable declaration.
4682         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
4683         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
4684         (LOCAL_FINAL_P): Fixed typo in comment.
4685         (FINAL_VARIABLE_P): Likewise.
4686         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
4687         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
4688         (struct lang_decl): New fields `ict', `smic' and `cif.'
4689         (check_for_initialization): New returned value for global.
4690         (attach_initialized_static_class): New global function.
4691         (STATIC_CLASS_INIT_OPT_P): New macro.
4692         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
4693         * lang.c (java_decode_option): Handle
4694         `-fno-optimize-static-class-initialization'
4695         * parse.y (start_complete_expand_method): New function.
4696         (java_expand_method_bodies): Likewise.
4697         (attach_init_test_initialization_flags): Likewise.
4698         (adjust_init_test_initialization): Likewise.
4699         (emit_test_initialization): Likewise.
4700         (java_complete_expand_methods): Nullify abstract and native method
4701         bodies.
4702         (java_complete_expand_method): New locals `fbody', `block_body'
4703         and `exception_copy.' Reorganized: directly return on empty method
4704         bodies, call `start_complete_expand_method', remember definitely
4705         initialized static class in function, don't expand method bodies.
4706         (java_expand_classes): Call `java_expand_method_bodies' before
4707         `finish_class' when compiling to native.
4708         (resolve_expression_name): Use `orig' after building outer class
4709         field access.
4710         (patch_invoke): Remember static method invocations.
4711
4712 2001-08-06  Richard Henderson  <rth@redhat.com>
4713
4714         * class.c (emit_register_classes): Pass a symbol_ref and priority
4715         to assemble_constructor.
4716
4717 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
4718
4719         * java-tree.h (all_class_filename): New macro.
4720         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
4721         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
4722         newly created IDENTIFIER_NODE to `all_class_filename.'
4723
4724 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
4725
4726         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
4727         Use ggc_add_tree_root to register roots.
4728
4729 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4730
4731         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
4732         second operand calling check_init.
4733         * decl.c (complete_start_java_method): Swaped second and third
4734         arguments while creating WITH_CLEANUP_EXPR node.
4735         * jcf-write.c (generate_bytecode_insns): Use second operand
4736         instead of third when handling WITH_CLEANUP_EXPR.
4737         * parse.y (java_complete_lhs): Expand second operand of
4738         WITH_CLEANUP_EXPR nodes.
4739         (patch_synchronized_statement): Swaped second and third arguments
4740         while creating WITH_CLEANUP_EXPR node.
4741
4742 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4743
4744         * parse.y (create_interface): Avoid cyclic inheritance report when
4745         syntax error encountered during class definition.
4746         Fixes PR java/2956
4747
4748 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4749
4750         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4751         ASM_FINAL_SPEC.
4752         (lang_specific_pre_link): Use set_input to set input_filename.
4753         Append `main' here.
4754         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4755         (main): Fix definition.
4756         Strip `main' from classname.
4757         Fixes PR java/227.
4758
4759 2001-07-18  Tom Tromey  <tromey@redhat.com>
4760
4761         For PR java/2812:
4762         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
4763         * lex.c (java_new_lexer): Use ICONV_CONST.
4764         (java_read_char): Likewise.
4765         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
4766         (jv-scan$(exeext)): Likewise.
4767
4768 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4769
4770         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
4771         * parse.y (check_class_interface_creation): Allow `private' if the
4772         enclosing is not an interface.
4773         (create_interface): Interface tagged public if the enclosing
4774         context is an interface.
4775         (create_class): Class tagged public if the enclosing context
4776         is an interface.
4777         Fixes PR java/2959
4778
4779 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
4780
4781         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
4782         Fixes PR java/2665
4783
4784 2001-07-14  Tim Josling  <tej@melbpc.org.au>
4785
4786         * check-init.c (check_init): Remove references to EXPON_EXPR.
4787
4788 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4789
4790         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
4791         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
4792         Fixes PR java/3602
4793
4794 2001-07-13  Tom Tromey  <tromey@redhat.com>
4795
4796         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
4797         invocation.
4798
4799 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4800
4801         * parse.y (patch_method_invocation): Don't override primary if one
4802         is already provided, but let this$<n> be built. Fixed comment.
4803
4804 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
4805
4806         * parse.y (empty_statement:): Report empty statement error only
4807         when found at class declaration level.
4808         Fixes PR java/3635
4809
4810 2001-07-12  Tom Tromey  <tromey@redhat.com>
4811
4812         * expr.c (expand_load_internal): New function.
4813         (LOAD_INTERNAL): Use it.
4814
4815 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
4816
4817         * parse.y (verify_constructor_super): Compare anonymous class ctor
4818         args with `valid_method_invocation_conversion_p.'
4819         Fixes PR java/3285
4820
4821 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4822
4823         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
4824         `-fsyntax-only.' Fixes PR java/3248
4825
4826 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4827
4828         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
4829
4830 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
4831
4832         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
4833         current function is static. Fixes PR java/1970
4834
4835 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4836
4837         * parse.y (patch_method_invocation): Add enclosing context to ctor
4838         calls if necessary. Fixes PR java/2953
4839
4840 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4841
4842         * parse.y (resolve_package): Abort if qualified expression member
4843         isn't right.
4844         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
4845         Fixes PR java/1391
4846
4847 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
4848
4849         * verify.c: Don't use // comments.
4850
4851 2001-07-05  Tom Tromey  <tromey@redhat.com>
4852
4853         * lang.c (flag_assume_compiled): Removed.
4854         * java-tree.h (flag_assume_compiled): Removed.
4855         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
4856         -fhash-synchronization, -fuse-divide-subroutine,
4857         -fcheck-references, -femit-class-file, -femit-class-files,
4858         -fassume-compiled.  Updated --encoding information.  Changed
4859         -foutput-class-dir to `-d'.
4860
4861 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
4862
4863         * jcf-parse.c (parse_class_file): Add lineno parameter to
4864         debug_start_source_file call.
4865
4866 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4867
4868         * gcj.texi: Use gpl.texi.
4869         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
4870         dependencies and use doc/include in search path.
4871
4872 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
4873
4874         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
4875         `this'.  If so, don't build instance initializers.
4876
4877 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4878
4879         * parse.y (resolve_expression_name): Improved error message for
4880         inner class cases. Fixes PR java/1958
4881
4882 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4883
4884         * lang.c: #include diagnostic.h
4885         (lang_print_error): Add a `diagnostic_context *' parameter.
4886         (java_dummy_print): Likewise.
4887         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
4888
4889 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4890
4891         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
4892         * jcf.h (typedef struct JCF): New bitfield `finished.'
4893         (JCF_FINISH): Set `finished.'
4894         (JCF_ZERO): Reset `finished.'
4895         Fixes PR java/2633
4896
4897 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4898
4899         * parse.y (class_body_declaration:): Don't install empty instance
4900         initializers.
4901         Fixes PR java/1314
4902
4903 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4904
4905         * class.c (set_super_info): Call `set_class_decl_access_flags.'
4906         (set_class_decl_access_flags): New function.
4907         * java-tree.h (set_class_decl_access_flags): New prototype.
4908         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
4909         (parse_class_file): New local `decl_max_locals.' Take wide types
4910         into account to compute DECL_MAX_LOCALS.
4911         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
4912         imports on demand.
4913
4914 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
4915
4916         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
4917
4918 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4919
4920         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
4921         * parse.y (do_resolve_class): Moved comments out to leading comment
4922         section. Removed local `start', New local `_ht' and
4923         `circularity_hash.'  Record `enclosing' in hash table and search
4924         it to detect circularity.  Use `enclosing' as an argument to
4925         `lookup_cl.' Free the hash table when done.
4926
4927 2001-06-19  Tom Tromey  <tromey@redhat.com>
4928
4929         * lex.c (java_read_char): Disallow invalid and overlong
4930         sequences.  Fixes PR java/2319.
4931
4932 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
4933
4934         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
4935
4936 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4937
4938         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
4939         arguments accordingly.
4940
4941 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4942
4943         * gcj.texi: Move contents to just after title page.
4944
4945 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
4946
4947         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
4948         builtin type.
4949         (patch_incomplete_class_ref): Build the class ref, build the class
4950         init if necessary, complete the tree.
4951         Fixes PR java/2605
4952
4953 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4954
4955         * parse.y (lookup_field_wrapper): Test `name' code.
4956         (resolve_qualified_expression_name): Test `qual_wfl' code.
4957         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
4958         handle `qual_wfl' by code.
4959         (maybe_build_primttype_type_ref): Test `wfl' code.
4960
4961 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4962
4963         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
4964         fdl.texi.
4965         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
4966         the dvi file in the java directory.
4967
4968 2001-05-25  Sam TH  <sam@uchicago.edu>
4969
4970         * gen-table.pl javaop.h jcf.h lex.h,
4971         parse.h: Fix header include guards.
4972
4973 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
4974
4975         * jv-scan.c (version): Update copyright year.
4976
4977 2001-05-21  Per Bothner  <per@bothner.com>
4978
4979         * jcf-parse.c (read_class):  If class is from .class or .zip file
4980         and it's already been read, don't push/pop parser context.
4981
4982 2001-05-18  Per Bothner  <per@bothner.com>
4983
4984         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
4985         command line so the jvgenmain-generated main program comes first.
4986
4987 2001-05-15  Tom Tromey  <tromey@redhat.com>
4988
4989         * class.c (build_utf8_ref): Don't generate identifier based on
4990         utf8const contents.
4991
4992 2001-05-12  Richard Henderson  <rth@redhat.com>
4993
4994         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
4995         * expr.c (java_lang_expand_expr): Expand it.
4996         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
4997         calling build_exception_object_ref.
4998         * parse.y (catch_clause_parameter): Likewise.
4999         (build_dot_class_method): Likewise.
5000         (try_reference_assignconv): Likewise.
5001         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5002         * jcf-write.c (generate_bytecode_insns): Likewise.
5003
5004 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5005
5006         * parse.y (build_unresolved_array_type): Set
5007         EXPR_WFL_QUALIFICATION on the newly created wfl.
5008         Fixes PR java/2538. Fixes PR java/2535.
5009
5010 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5011
5012         * parse.y (fix_constructors): Removed unnecessary assignment to
5013         local. Moved assignment to `this$<n>', fixed comments and
5014         indentation.
5015         (build_wfl_wrap): Fixed indentation.
5016         Fixes PR java/2598, java/2579 and java/2658.
5017
5018 2001-05-03  Mo DeJong  <mdejong@redhat.com>
5019
5020         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5021         check for byte swap.
5022
5023 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
5024
5025         * expr.c (build_class_init): Move MODIFY_EXPR
5026         outside of COND_EXPR.  Remove variable `call'.
5027
5028 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5029
5030         * decl.c: NULL_PTR -> NULL.
5031         * jcf-write.c: Likewise.
5032
5033 2001-05-01  Tom Tromey  <tromey@redhat.com>
5034
5035         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5036         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5037         * gcj.texi: Updated copyright text.  Include fdl.texi.
5038         (Top): Link to new node.
5039
5040 2001-05-01  Per Bothner  <per@bothner.com>
5041
5042         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
5043
5044 2001-05-01  Per Bothner  <per@bothner.com>
5045
5046         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
5047         import_list contains the name, not the TREE_PURPOSE.
5048
5049 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5050
5051         * jcf-io.c (read_zip_member): Cast to long in comparison with
5052         signed value.
5053
5054         * jvspec.c (lang_specific_driver): Initialize variables.
5055
5056         * mangle.c (find_compression_record_match): Likewise.
5057
5058         * typeck.c (build_null_signature): Provide static prototype.  Mark
5059         parameter with ATTRIBUTE_UNUSED.
5060
5061         * verify.c (verify_jvm_instructions): Initialize variable.
5062
5063 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5064
5065         * parse.y (do_resolve_class): Check for cyclic inheritance during
5066         inner class resolution.
5067
5068 2001-04-27  Per Bothner  <per@bothner.com>
5069
5070         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
5071         while iterating, since that could cause gc to lose stuff.
5072
5073 2001-04-26  Per Bothner  <per@bothner.com>
5074
5075         Fix method search wrt scope of inner classes to match JLS2.
5076         * typeck.c (build_null_signature):  New static function.
5077         (has_method):  New function.  Uses build_null_signature and lookup_do.
5078         * java-tree.h (has_method):  New declaration.
5079         * parse.y (find_applicable_accessible_methods_list):  Do not search
5080         context of inner classes here.
5081         (patch_method_invocation):  Search scope, ie. current and outer clases,
5082         for method matching simple name, to find class.
5083
5084 2001-04-26  Per Bothner  <per@bothner.com>
5085
5086         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5087         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
5088
5089         * constants.c (find_methodref_with_class_index):  New function.
5090         (find_methodref_index):  Use find_methodref_with_class_index.
5091         * java-tree.h (find_methodref_with_class_index):  New declaration.
5092         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
5093         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5094         If context changed from interface to class, don't use invokeinterface.
5095
5096 2001-04-25  Per Bothner  <per@bothner.com>
5097
5098         * verify.c (verify_jvm_instructions):  For field instructions,
5099         check that field index is valid.  For invoke instructions, check that
5100         method index is valid.
5101
5102 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
5103
5104         * config-lang.in (target_libs): Copy from $libgcj_saved.
5105
5106 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5107
5108         * decl.c (init_decl_processing): Add new class "protectionDomain"
5109         field.
5110         * class.c (make_class_data): Set initial value for "protectionDomain".
5111
5112 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5113
5114         * jvspec.c (lang_specific_driver): Fix memory allocation
5115         deficit, by using concat in lieu of xmalloc/sprintf.
5116
5117 2001-04-20  Per Bothner  <per@bothner.com>
5118
5119         Fixes to compile multiple .class files at once.
5120         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
5121         * java-tree.h (CLASS_PARSED_P):  New macro.
5122         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5123         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
5124         (read_class):  Avoid some code duplication.
5125         Don't call JCF_FINISH for a .class file - might be needed later.
5126         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
5127         rather than CLASS_LOADED_P, since latter implies class laid out.
5128         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
5129         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
5130
5131 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5132
5133         * Make-lang.in (java/boehm.o): Depend on toplev.h.
5134
5135         * boehm.c: Include toplev.h.
5136
5137 2001-04-06  Tom Tromey  <tromey@redhat.com>
5138             Alexandre Petit-Bianco  <apbianco@redhat.com>
5139
5140         Fix for PR gcj/1404 and PR gcj/2332:
5141         * parse.y (build_array_from_name): If we use the type_wfl then
5142         accumulate dimensions from the original type as well.
5143         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5144
5145 2001-04-06  Tom Tromey  <tromey@redhat.com>
5146
5147         * parse.y (analyze_clinit_body): Return true if the second operand
5148         of a METHOD_EXPR is nonzero.
5149
5150 2001-04-06  Tom Tromey  <tromey@redhat.com>
5151
5152         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5153         directory.
5154         ($(srcdir)/java/parse.c): Likewise.
5155
5156 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5157
5158         * gcj.texi: Use `which-gcj' instead of `which-g77.'
5159         (version-gcc): Initialized.
5160         (which-gcj): Likewise.
5161
5162 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5163
5164         * java-tree.h (struct lang_decl): New macro
5165         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5166         * parse.y (build_instance_initializer): New function.
5167         (add_instance_initializer): Use it.
5168         (java_fix_constructors): Set `current_class' before fix pass.
5169         (fix_constructors): Just return if already fixed. Move `super()'
5170         invocation ahead. Use `build_instance_initializer.'
5171         Fixes PR java/1315.
5172
5173 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5174
5175         * parse.y (resolve_qualified_expression_name): Pass field's
5176         DECL_CONTEXT to `not_accessible_p.'
5177         (not_accessible_p): Changed parameters order in `inherits_from_p'
5178         invocation.
5179
5180 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
5181
5182         * lang-options.h: Add flag_check_references.
5183
5184 2001-04-04  Per Bothner  <per@bothner.com>
5185
5186         * java-tree.h (CONSTANT_VALUE_P):  New macro.
5187         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
5188         * parse.y (maybe_build_class_init_for_field):  New static function.
5189         (resolve_expression_name, resolve_field_access):  Use
5190         maybe_build_class_init_for_field instead of build_class_init
5191         This does not do the init if the field is compile-time-constant.
5192         (resolve_field_access):  Simplify.
5193
5194         * parse.y (fold_constant_for_init):  Merge test into switch.
5195
5196 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
5197
5198         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5199         on gansidecl.h.
5200         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5201
5202 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
5203
5204         * expr.c (pop_type_0): Save the result of the first
5205         lang_printable_name call in a scratch buffer, so it
5206         won't be clobbered by the second call.
5207
5208 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
5209
5210         * parse-scan.y (array_type:): Rewritten.
5211         (type_declaration:): `empty_statement' replaces `SC_TK.'
5212         (class_member_declaration:): `empty statement' added.
5213         (method_body:): Simplified.
5214         (static_initializer:): Likewise.
5215         (primary_no_new_array:): Use `type_literals.'
5216         (type_literals:): New rule.
5217         (dims:): Set and update `bracket_count.'
5218         Fixes PR java/1074. Fixes PR java/2412.
5219
5220 2001-03-28  Hans Boehm  <boehm@acm.org>
5221
5222         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5223         (get_boehm_type_descriptor): Set type on returned value to be a
5224         pointer length integer.
5225
5226 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5227
5228         * expr.c (pop_type_0): Call `concat' rather than building the
5229         string manually.
5230         (pop_type): Add format specifier in call to `error'.
5231
5232         * parse.y (patch_method_invocation): Avoid casting away
5233         const-ness.
5234
5235 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
5236
5237         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5238
5239 2001-03-28  Richard Henderson  <rth@redhat.com>
5240
5241         IA-64 ABI Exception Handling:
5242         * Make-lang.in (except.o): Don't depend on eh-common.h.
5243         * check-init.c (check_init): Handle EXC_PTR_EXPR.
5244         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5245         [soft_exceptioninfo_call_node]: Remove.
5246         [eh_personality_libfunc, lang_eh_runtime_type]: New.
5247         (end_java_method): No emit_handlers.
5248         * except.c (java_set_exception_lang_code): Remove.
5249         (method_init_exceptions): Don't call it.
5250         (prepare_eh_table_type): No CATCH_ALL_TYPE.
5251         (build_exception_object_ref): New.
5252         (expand_end_java_handler): Update for except.h name changes.
5253         (emit_handlers, expand_resume_after_catch): Remove.
5254         * expr.c (java_lang_expand_expr): Update for except.h name changes.
5255         (process_jvm_instruction): Use build_exception_object_ref.
5256         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5257         (soft_exceptioninfo_call_node): Remove.
5258         (build_exception_object_ref): Declare.
5259         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5260         soft_exceptioninfo_call_node.  Move processing ...
5261         [EXC_PTR_EXPR]: ... here.
5262         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5263         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5264         (source_end_java_method): No java_set_exception_lang_code or
5265         emit_handlers.
5266         (build_dot_class_method): Use build_exception_object_ref.
5267         (try_reference_assignconv): Check EXC_PTR_EXPR not
5268         soft_exceptioninfo_call_node.
5269
5270 2001-03-28  Richard Henderson  <rth@redhat.com>
5271
5272         * java-tree.h (throw_node): Define as a single member of
5273         java_global_trees instead of a separate array.
5274         (JTI_THROW_NODE): New.
5275         * decl.c (throw_node): Don't declare.
5276         (init_decl_processing): Init a scalar throw_node.
5277         Don't register it for gc.
5278         * check-init.c (check_init): Reference scalar throw_node.
5279         * expr.c (build_java_athrow): Likewise.
5280         * jcf-write.c (generate_bytecode_insns): Likewise.
5281         * parse.h (BUILD_THROW): Likewise.
5282
5283 2001-03-28  Richard Henderson  <rth@redhat.com>
5284
5285         * decl.c (end_java_method): Do not save and restore
5286         flag_non_call_exceptions.
5287         * parse.y (source_end_java_method): Likewise.
5288         * lang.c (flag_exceptions): Don't declare.
5289         (java_init_options): Set flag_non_call_exceptions.  Set
5290         flag_exceptions here ...
5291         (java_init): ... not here.
5292
5293 2001-03-27  Richard Henderson  <rth@redhat.com>
5294
5295         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5296         exceptions_via_longjmp.
5297
5298         * lang.c (flag_new_exceptions): Don't declare it.
5299         (java_init_options): Or set it.
5300
5301 2001-03-27  Richard Henderson  <rth@redhat.com>
5302
5303         * decl.c (end_java_method): Rename asynchronous_exceptions to
5304         flag_non_call_exceptions.
5305         * parse.y (source_end_java_method): Likewise.
5306
5307 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5308
5309         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5310
5311 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5312
5313         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5314
5315 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5316
5317         * parse.y (find_as_inner_class): Follow current package
5318         indications not to mistakingly load an unrelated class.
5319
5320 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5321
5322         * constants.c (PUTN): Use memcpy, not bcopy.
5323
5324         * lex.c (java_read_char): Use memmove, not bcopy.
5325
5326         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5327
5328 2001-03-23  Per Bothner  <per@bothner.com>
5329
5330         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
5331         macro for better error pin-pointing.
5332         * java-tree.h:  Fix typo in comment.
5333
5334         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
5335         Don't include jsr/goto in exception range.
5336         Check if start and end of exception range are the same (also TRY_EXPR).
5337         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5338         However, do emit the following goto even if try_block is empty.
5339         Defer freeing exception_decl until after the finalizer, to make
5340         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
5341
5342         * parse.y (java_complete_lhs):  If the try-clause is empty, just
5343         return the finally-clause and vice versa.
5344
5345 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5346
5347         * gcj.texi (Input Options): documented the check for attribute
5348         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5349         * java-tree.h (flag_force_classes_archive_check): Declared extern.
5350         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5351         (jcf_parse): Check for the right classes archive if necessary.
5352         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5353         (jcf_parse_fields): Fixed indentation.
5354         * jcf-write.c (append_gcj_attribute): New function.
5355         (generate_classfile): Compute the attribute count, invoke
5356         `append_gcj_attribute'.
5357         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5358         turned into bit-fields. New bit-field `right_zip.'
5359         (JCF_ZERO): Set `right_zip' to zero.
5360         * lang-options.h (-fforce-classes-archive-check): Added flag.
5361         * lang.c (flag_force_classes_archive_check): New flag.
5362         (lang_f_options): New entry `force-classes-archive-check.'
5363         Fixes PR java/1213.
5364
5365 2001-02-07  Andrew Haley  <aph@redhat.com>
5366
5367         * gcj.texi (Configure-time Options): Add -fcheck-references.
5368         * expr.c (build_java_indirect_ref): New function.
5369         (java_check_reference): New function.
5370         (build_java_array_length_access): Use build_java_indirect_ref to
5371         check for null references.
5372         (build_java_arrayaccess): Likewise.
5373         (build_get_class): Likewise.
5374         (build_field_ref): Likewise.
5375         (invoke_build_dtable): Likewise.
5376         (build_invokeinterface): Likewise.
5377         * lang.c (lang_f_options): Add flag_check_references.
5378         * jvspec.c (jvgenmain_spec): Add flag_check_references.
5379         * java-tree.h (flag_check_references): New variable.
5380         * lang.c (flag_check_references): Likewise.
5381         * parse.y (patch_invoke): Use java_check_reference.
5382         (patch_assignment): Allow for extra nesting in
5383         _Jv_CheckArrayStore.
5384
5385 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
5386
5387         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5388         * lex.c (cxx_keywords): Likewise.
5389
5390 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5391
5392         * parse.y (qualify_ambiguous_name): Broaden `length'
5393         recognition. Help MODIFY_EXPR be resolved as expression names.
5394         Fixes PR java/2066. Fixes PR java/2400.
5395
5396 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
5397
5398         * gjavah.c (process_file): Mark interface definitions with
5399         "__attribute__ ((java_interface))".
5400
5401 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
5402
5403         * class.c (layout_class): Fixed push_super_field's second
5404         argument. Fixes PR java/2333.
5405         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5406         too early to lay innerclasses out.
5407
5408 2001-03-20  Tom Tromey  <tromey@redhat.com>
5409             Alexandre Petit-Bianco <apbianco@redhat.com>
5410
5411         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5412         inside an array reference. Insertion of the array store check
5413         rewritten. Fixes PR java/2299.
5414
5415 2001-03-20  Tom Tromey  <tromey@redhat.com>
5416
5417         * lex.c (java_read_unicode): Only accept leading `u's.
5418
5419 2001-03-20  Tom Tromey  <tromey@redhat.com>
5420
5421         * jcf-parse.c (read_class): Initialize `class'.
5422
5423 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5424
5425         * jcf_parse.c (jcf_parse): Eliminate unused variable.
5426
5427 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5428
5429         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5430         (layout_class): Likewise.
5431         (layout_class_method): Likewise.
5432         (emit_register_classes): Likewise.
5433         * decl.c (builtin_function): Likewise.
5434         (give_name_to_locals): Likewise.
5435
5436 2001-03-19  Per Bothner  <per@bothner.com>
5437
5438         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
5439         before trying to load an inner class.
5440
5441         Fixes to process to command-line .class files in two passes.
5442         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
5443         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
5444         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
5445         * class.c (is_compiled_class):  Fix for renamed flag.
5446         * parse.y (maybe_create_class_interface_decl):  Likewise.
5447         * jcf-parse.c (yyparse):  Also set if compiling .class files.
5448         * jcf-parse.c (read_class);  Read current_class.
5449         (jcf_parse):  Make static.
5450         (load_inner_classes):  New function, with code moved from jcf_parse,
5451         because we need to inner classes after the command-line files are read.
5452         (yyparse):  Set finput to NULL when it doesn't need to be closed.
5453         Reduce use of main_jcf (basically only for archive) and
5454         use finput instead of main_jcf->read_state.
5455         Inline jcf_figure_file_type into yyparse.
5456         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5457         Defer load_inner_classes and parse_class_file to a second pass,
5458         after we've correctly mapped command-line .clas fiels to classes.
5459         (jcf_figure_file_type):  Removed.
5460         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
5461         (JCF_ZERO):  Also clear zipd field.
5462         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
5463
5464 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5465
5466         * jcf-parse.c (yyparse): Change ch from char * to char.
5467
5468 2001-03-19  Per Bothner  <per@bothner.com>
5469
5470         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
5471         Add constructed filelist-file at end, following -xjava.  Thus any .o
5472         and library files are not affected by the -xjava.  Also wrap
5473         explicit @FILE with -xjava and -xnone.
5474
5475 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
5476
5477         * class.c (build_static_field_ref): Call make_decl_rtl() after
5478         setting the DECL_EXTERNAL flag.
5479
5480 2001-03-17  Per Bothner  <per@bothner.com>
5481
5482         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
5483
5484         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
5485         when result is is needed (target is STACK_TARGET).
5486
5487         * parse.h (JDEP_SOLV):  Removed.
5488         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
5489
5490         * parse.y (incomplete_class_list): Removed.
5491         (obtain_incomplete_type): Don't use or set incomplete_class_list.
5492         It doesn't work if resolve_class changes the name of an array type
5493         that is on the list and then someone else looks for the modified name.
5494         Also, seems liable to break when compiling multiple source files at
5495         once.  So the simplest is to just remove incomplete_class_list -
5496         it is only a minor space win and it is not even clear it saves time.
5497
5498         * parse.y (resolve_class):  Remove unneeded promote_type.
5499
5500 2001-03-15  Per Bothner  <per@bothner.com>
5501
5502         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
5503         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
5504         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5505         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5506
5507         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
5508         * parse.y (java_expand_classes):  Likewise.
5509
5510         * parse.y (expand_start_java_method):  Was only called once and had a
5511         misleading name, so inline in caller java_complete_expand_method.
5512         (enter_a_block):  Likewise inline in enter_block and remove.
5513
5514         Remove junk from when gcc/java was created (by copying from C/C++).
5515         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
5516         (struct binding_level):  Remove fields keep, keep_if_subblocks,
5517         more_cleanups_ok, have_cleanups (which have never been used).
5518         (pushlevel, poplevel):  Remove related useless code.
5519
5520         * class.c (make_class_data):  The class_dtable_decl (i.e. the
5521         vtable for Class) should be external, except when compiling Class.
5522
5523         * jvspec.c (lang_specific_driver):  Fix -C handling.
5524         Check -save-temps to see if temp @FILE should be deleted.
5525         Follow-up to/fix for February 16 patch.
5526
5527         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
5528         (type_stack_dup):  Remove no-longer neded error check.
5529
5530 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
5531
5532         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5533         to 'for_pointer'. If this type is for a pointer (argument) mangling,
5534         don't surround the element with 'N..E' if the type name is
5535         unqualified.
5536
5537 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5538
5539         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5540         DECL_RTL_SET_P, etc.
5541         (make_method_value): Likewise.
5542         (get_dispatch_table): Likewise.
5543
5544         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5545
5546 2001-03-07  Tom Tromey  <tromey@redhat.com>
5547
5548         * config-lang.in (lang_requires): Define.
5549
5550 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
5551
5552         * typeck.c (convert): Check flag_unsafe_math_optimizations,
5553         not flag_fast_math.
5554
5555 2001-03-05  Per Bothner  <per@bothner.com>
5556
5557         Fix a problem where rest_of_decl_compilation applied to
5558         class_dtable_decl causes problems because it was done too early,
5559         before output file was opened.
5560         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
5561         * class.c (class_dtable_decl):  Add macro - element of class_roots.
5562         (make_class_data):  Define class_dtable_decl.
5563         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
5564
5565 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5566
5567         * java/class.c, java/decl.c, java/java-tree.h: Replace all
5568         uses of 'boolean' with 'bool'.
5569
5570 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5571
5572         * lang-specs.h: Add zero initializer for cpp_spec field to all
5573         array elements.
5574
5575 2001-02-16  Per Bothner  <per@bothner.com>
5576
5577         Handle compiling multiple input files at once, and @FILE syntax.
5578         * gcj.texi:  Updated documentation to match.
5579         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
5580         * jcf-parse.c (parse_source_file):  Split into ...
5581         (parse_source_file_1):  New function - and:
5582         (parse_source_file_2):  New function.
5583         (yyparse):  On -ffilelist-file, open and scan named file.
5584         On first pass over files, only do parse_source_file_1.
5585         A new second pass calls parse_source_file_2 for each file to compile.
5586         (init_jcf_parse):  Call init_src_parse.
5587         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
5588         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
5589         as multiple input file combined in one compilation.
5590         * lang-options.h:  Add -ffilelist-file
5591         * lang.c (flag_filelist_file):  New flag variable.
5592         (lang_f_options):  Handle -ffilelist-file.
5593         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5594         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
5595         gclass_list - use global fields of src_parse_roots instead.
5596         * parse.y (src_parse_roots):  New array.
5597         (incomplete_class_list, gclass_list):  New macros.
5598         (push_parser_context, java_pop_parser_context,
5599         java_parser_context_resume):  Don't fiddle with deleted fields.
5600         (various):  Use incomplete_class gclass_list and global macros
5601         instead of parse_ctxt fields - the lists are global.
5602         (init_src_parse):  New function.
5603
5604 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5605
5606         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5607
5608 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5609
5610         * parse.y (check_inner_class_access): Moved declaration of local
5611         `enclosing_decl_type' to the right location.
5612
5613 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
5614
5615         * parse.y (parser_check_super_interface): Don't call
5616         check_pkg_class_access for an inner interface.
5617         (parser_check_super): Don't call check_pkg_class_access for inner
5618         class.
5619         (do_resolve_class): Simplify enclosing type loop. Don't call
5620         check_pkg_class_access if CL and DECL are not set.
5621         (find_in_imports_on_demand): Set DECL if class_type needed to be
5622         loaded. Don't call check_pkg_class_access for an inner class.
5623         (check_inner_class_access): Rewritten to implement member access
5624         rules as per spec 6.6.1.
5625         (check_pkg_class_access): Handle the empty package correctly.
5626         (in_same_package): New function. Determine if two classes are in the
5627         same package.
5628
5629 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
5630
5631         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
5632         method into array types.
5633         * parse.y (patch_method_invocation): Bypass access check on clone call
5634         to array instance.
5635
5636 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5637
5638         * expr.c (build_instanceof): Check for arrays when trying fold to
5639         false.
5640
5641 2001-02-15  Jim Meyering  <meyering@lucent.com>
5642
5643         * Make-lang.in (java.install-common): Depend on `installdirs'.
5644         (java.install-info): Likewise.
5645
5646 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
5647
5648         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
5649
5650 2001-02-14  Tom Tromey  <tromey@redhat.com>
5651             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5652
5653         Fix for PR java/1261.
5654         * typeck.c (build_java_array_type): Add public `clone' method to
5655         arrays.
5656         * parse.y (resolve_qualified_expression_name): Use current_class
5657         when checking for inaccessibility.
5658         (patch_method_invocation): Fixed error message when accessibility
5659         denied.  Added `from_super' argument.
5660
5661 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5662
5663         * parse.y (resolve_class): Don't build a fake decl. Use the one
5664         already built.
5665         * typeck.c (build_java_array_type): Build and assign decl to array
5666         type.
5667
5668 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
5669
5670         * parse.y (not_accessible_p): Changed leading comment. Added extra
5671         `where' argument. Use it to enforce protected access rules.
5672         (resolve_qualified_expression_name): Added extra argument to
5673         not_accessible_p.
5674         (patch_method_invocation): Use argument `primary' to provide
5675         not_accessible_p with an extra argument.
5676         (lookup_method_invoke): Added extra argument to not_accessible_p.
5677         (search_applicable_method_list): Likewise.
5678
5679 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5680
5681         * parse.y (resolve_qualified_expression_name): Try to resolve as
5682         an inner class access only if `decl' is a TYPE_DECL.
5683
5684 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5685
5686         * decl.c (classdollar_identifier_node): Initialize.
5687         * java-tree.h (enum java_tree_index): New entry
5688         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
5689         (classdollar_identifier_node): New macro.
5690         (ID_CLASSDOLLAR_P): Likewise.
5691         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
5692         (build_dot_class_method_invocation): Likewise.
5693         (find_applicable_accessible_methods_list): `class$' can't be
5694         inherited.
5695
5696 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
5697
5698         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
5699
5700 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5701
5702         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
5703         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
5704         gone.
5705
5706 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5707
5708         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
5709         outside of the `__U' sequence too.
5710         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
5711         sequence too.
5712
5713 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5714
5715         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
5716
5717 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5718
5719         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
5720         (JVGENMAIN_OBJS): Likewise.
5721         * java-tree.h (append_gpp_mangled_name): New prototype.
5722         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
5723         Removed cast calling `gcc_add_root.'
5724         * jvgenmain.c (mangle_obstack): New global, initialized.
5725         (main): Use it.
5726         (do_mangle_class): Constify local `ptr.'
5727         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
5728         append_gpp_mangle_name and update `count' if necessary.
5729         Use `mangle_obstack.'
5730         * mangle.c (append_unicode_mangled_name): Removed.
5731         (append_gpp_mangled_name): Likewise.
5732         (unicode_mangling_length): Likewise.
5733         (mangle_member_name): Return type set to `void.'
5734         (mangle_field_decl): Don't append `U' in escaped names.
5735         (mangle_method_decl): Likewise.
5736         (mangle_member_name): Just use `append_gpp_mangled_name.'
5737         * mangle_name.c: New file.
5738
5739 2001-02-07  Per Bothner  <per@bothner.com>
5740
5741         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
5742
5743         * check-init.c (check_init):  Don't call done_alternative after
5744         processing loop code, as a LOOP_EXPR never terminates normally.
5745
5746 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5747
5748         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
5749
5750 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5751
5752         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
5753         DECLs.
5754
5755 2001-02-06  Tom Tromey  <tromey@redhat.com>
5756
5757         * lex.c (java_new_lexer): Longer error message.
5758
5759 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
5760             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5761
5762         * typeck.c (build_prim_array_type): Added leading comment.
5763         (build_java_array_type): Moved locals out of
5764         block. Always create the `data' field, fixed alignment to match
5765         C++.
5766
5767 2001-02-04  Tom Tromey  <tromey@redhat.com>
5768
5769         * expr.c (java_lang_expand_expr): Don't bother recomputing
5770         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
5771         Fixes PR java/1866.
5772
5773 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5774
5775         * parse.y (process_imports): Save the original name of the import
5776         for better error report.
5777
5778 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
5779
5780         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
5781         of macros used when compiling jvspec.c.
5782         * jvspec.c (lang_specific_driver): Link with the shared
5783         libgcc by default.
5784
5785 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5786
5787         * check-init.c (check_init): Call internal_error instead of fatal.
5788         * expr.c (java_lang_expand_expr): Likewise.
5789         * jcf-parse.c (get_constant): Likewise.
5790         * mangle.c (java_mangle_decl): Likewise.
5791         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
5792         (operator_string): Likewise.
5793         * check-init.c (check_init): Call abort instead of fatal.
5794         * class.c (build_class_ref): Likewise.
5795         * constants.c (write_constant_pool): Likewise.
5796         * decl.c (start_java_method): Likewise.
5797         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
5798         (java_stack_dup, encode_newarray_type): Likewise.
5799         (build_java_array_length_access): Likewise.
5800         (build_java_check_indexed_type, expand_java_pushc): Likewise.
5801         (build_java_soft_divmod, build_invokeinterface): Likewise.
5802         * java-tree.h (INNER_CLASS_P): Likewise.
5803         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
5804         (give_name_to_class, get_class_constant): Likewise.
5805         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
5806         (find_constant_index, generate_bytecode_conditional): Likewise.
5807         (generate_bytecode_insns, perform_relocations): Likewise.
5808         * lex.c (java_unget_unicode, java_lex): Likewise.
5809         * mangle.c (mangle_type, mangle_record_type): Likewise.
5810         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
5811         (finish_mangling): Likewise.
5812         * parse.h (MARK_FINAL_PARMS): Likewise.
5813         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
5814         (obtain_incomplete_type, java_complete_class): Likewise.
5815         (java_check_regular_methods, java_complete_expand_method): Likewise.
5816         (cut_identifier_in_qualified, check_deprecation): Likewise.
5817         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
5818         (java_complete_lhs, lookup_name_in_blocks): Likewise.
5819         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
5820         * typeck.c (set_local_type, parse_signature_type): Likewise.
5821         (parse_signature_string, build_java_signature): Likewise;
5822         (set_java_signature): Likewise.
5823         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
5824         * class.c (add_method): Call fatal_error instead of fatal.
5825         (build_static_field_ref): Likewise.
5826         * expr.c (build_known_method_ref, expand_invoke): Likewise.
5827         * jcf-parse.c (get_constant, jcf_parse): Likewise.
5828         * lex.c (java_new_new_lexer): Likewise.
5829         * jv-scan.c (main): Likewise.
5830         (fatal_error): Renamed from fatal.
5831         * jcf-parse.c (yyparse): Call fatal_io_error instead of
5832         pfatal_with_name.
5833         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
5834         (yyparse): Likewise.
5835         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
5836         * lex.c (java_get_line_col): Likewise.
5837         * jcf-parse.c (load_class): Make errors non-fatal.
5838         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
5839
5840 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
5841
5842         * jvgenmain.c (class_mangling_suffix): Remove unused string.
5843         (error): Remove unused function.
5844         (main): Don't use "__attribute__ alias" on generated class symbol.
5845
5846 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5847
5848         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
5849         argument.
5850         * parse.y (finish_method_declaration): Code accounting for WFLed
5851         method DECL_NAMEs deleted.
5852         (check_abstract_method_definitions): Likewise.
5853         (resolve_type_during_patch): Layout resolved type.
5854         * typeck.c (lookup_do): Removed unused local.
5855
5856 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
5857
5858         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
5859         * decl.c (init_decl_processing): Use integer_minus_one_node, not
5860         integer_negative_one_node.
5861         * expr.c (build_java_binop): Likewise.
5862
5863 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
5864
5865         * zextract.c (read_zip_archive): Read file_offset before writing
5866         zipd and consequently clobbering the header contents.
5867
5868 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5869
5870         * Make-lang.in: Remove all dependencies on defaults.h.
5871         * decl.c: Don't include defaults.h.
5872         * expr.c: Likewise.
5873         * parse.y: Likewise.
5874
5875 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5876
5877         * ChangeLog (2001-01-21): Fixed typo.
5878         * class.c (layout_class_method): Code accounting for WFLed
5879         method DECL_NAMEs deleted.
5880         * constant.c (find_methodref_index): Likewise.
5881         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
5882         * java-tree.h (DECL_FUNCTION_WFL): New macro.
5883         (struct lang_decl): New field `wfl'.
5884         (java_get_real_method_name): Prototype deleted.
5885         * mangle.c (mangle_method_decl): Code accounting for WFLed
5886         method DECL_NAMEs deleted.
5887         * parse.h (GET_METHOD_NAME): Macro deleted.
5888         * parse.y (reset_method_name): Deleted.
5889         (method_header): Set DECL_FUNCTION_WFL.
5890         (check_abstract_method_header): Code accounting for WFLed method
5891         DECL_NAMEs deleted.
5892         (java_get_real_method_name): Deleted.
5893         (check_method_redefinition): Code accounting for WFLed method
5894         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
5895         (java_check_regular_methods): Likewise.
5896         (java_check_abstract_methods): Likewise.
5897         (java_expand_classes): Don't call `reset_method_name.'
5898         (search_applicable_method_list): Use DECL_NAMEs instead of
5899         GET_METHOD_NAME.
5900         * typeck.c (lookup_do): Code accounting for WFLed method
5901         DECL_NAMEs deleted.
5902
5903 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
5904
5905         * lex.c (java_read_char): Check for EOF from getc first.
5906
5907 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5908
5909         * class.c (layout_class): Don't lay the superclass out if it's
5910         already being laid out.
5911         * jcf-parse.c (handle_innerclass_attribute): New function.
5912         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
5913         handle_innerclasses_attribute.
5914         (jcf_parse): Don't load an innerclasses if it's already being
5915         laid out.
5916         * jcf-write.c (append_innerclass_attribute_entry): Static
5917         `anonymous_name' and its initialization deleted. `ocii' and `ini'
5918         to be zero for anonymous classes.
5919
5920 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5921
5922         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
5923         necessary.
5924         * jcf-parse.c (set_source_filename): Use
5925         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
5926
5927 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5928
5929         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
5930         gets a unique asm name.
5931
5932 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5933
5934         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
5935         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5936         if necessary.
5937         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
5938         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
5939         * parse.y (lookup_package_type_and_set_next): Deleted.
5940         (resolve_package): Removed unnecessary code.
5941         (find_applicable_accessible_methods_list): `finit$' can't be
5942         inherited.
5943         * verify.c (pop_argument_types): Added missing prototype.
5944
5945 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
5946
5947         * config-lang.in: Disable java by default.
5948
5949 2001-01-23  Tom Tromey  <tromey@redhat.com>
5950
5951         * gcj.texi (Copying): New node.
5952         Added copyright information.
5953
5954 2001-01-21  Per Bothner  <per@bothner.com>
5955
5956         Various fixes to allow compiling a compressed .jar/.zip archive.
5957         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
5958         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
5959         (struct ZipDirectory):  New field zipf points to owning ZipFile.
5960         * jcf.h (struct ZipDirectory):  Add forward declaration.
5961         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
5962         Remove seen_in_zip and zip_offset fields.
5963         (JCF_SEEN_IN_ZIP):  New macro.
5964         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
5965         * jcf-io.c:  Change all ZipFileCache to ZipFile.
5966         (read_zip_member):  New function.
5967         (open_in_zip):  Call read_zip_member.
5968         * jcf-parse.c (find_in_current_zip):  Remove function.
5969         (read_class):  Merge in find_in_current_zip functionality.
5970         Call read_zip_member if needed.
5971         (parse_zip_file_entries):  Use read_zip_member.
5972         (process_zip_dir):  Update for removed and added JCF fields.
5973         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
5974
5975 2001-01-21  Per Bothner  <per@bothner.com>
5976
5977         Minor optimization of static ggc roots.
5978         * jcf-parse.c (parse_roots):  New static field.
5979         (current_field, current_method, current_file_list):  Replace by macros
5980         naming fields of parse_roots.
5981         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
5982         * class.c (class_roots):  New static field.
5983         (registered_class, fields_ident, info_ident, class_list):
5984         New macros naming fields of parse_roots.
5985         (build_static_field_ref):  Don't register roots here.
5986         (layout_class):  Static field list replaced by macro class_list.
5987         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
5988         Initialize fields_ident and info_ident here.
5989
5990 2001-01-21  Per Bothner  <per@bothner.com>
5991
5992         * jcf-parse.c (ggc_mark_jcf):  New function.
5993         (init_jcf_parse):  Register current_jcf as ggc root.
5994
5995 2001-01-21  Per Bothner  <per@bothner.com>
5996
5997         * lang.c (put_decl_node):  Print method's name.
5998
5999 2001-01-21  Per Bothner  <per@bothner.com>
6000
6001         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
6002         (verify_jvm_instructions):  Use it, for better error messages on loads.
6003
6004 2001-01-21  Per Bothner  <per@bothner.com>
6005
6006         * verify.c (merge_type_state):  Still may have to merge even if
6007         LABEL_VERIFIED (label).
6008
6009 2001-01-21  Per Bothner  <per@bothner.com>
6010
6011         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
6012         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6013
6014 2001-01-19  Per Bothner  <per@bothner.com>
6015
6016         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
6017         if expeting an interface type.  Refines Tom's change of 2000-09-12.
6018
6019 2001-01-18  Per Bothner  <per@bothner.com>
6020
6021         * gcj.texi (Input Options): Mention .java files.
6022
6023 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6024
6025         * lang-options.h (-Wunsupported-jdk11): Removed.
6026         * lang.c (flag_not_overriding): Deleted.
6027         (flag_static_local_jdk1_1): Likewise.
6028         (lang_W_options): Removed "unsupported-jdk11" entry.
6029         * parse.y (java_check_methods): Removed dead code.
6030
6031 2001-01-17  Tom Tromey  <tromey@redhat.com>
6032
6033         Changes suggested by Per Bothner:
6034         * gcj.texi (Input Options): Don't mention input files.
6035         (Code Generation): Updated --main information.
6036         (Invoking jcf-dump): Mention that --javap is incomplete.
6037         From Alexandre Petit-Bianco:
6038         (Warnings): Don't mention -Wunsupported-jdk11.
6039         My stuff:
6040         (Compatibility): Mention JDK 1.2-ness of libraries.
6041         (Resources): Mention resources used when writing gcj.
6042
6043 2001-01-17  Tom Tromey  <tromey@redhat.com>
6044
6045         * gcj.texi: New file.
6046         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6047         (java.info): Depend on gcj.info.
6048         (java/gcj.dvi): New target.
6049         (java.dvi): Depend on gcj.dvi.
6050         (java.install-info): Wrote.
6051
6052 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
6053
6054         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6055         having called make_decl_rtl.
6056
6057 2001-01-14  Per Bothner  <per@bothner.com>
6058
6059         Various patches to emit better messages on verification errors.
6060         * expr.c (push_type_0):  Return error indication on stack overflow,
6061         instead of callinfg fatal.
6062         (push_type):  Now just call push_type_0 (nd fatal on overflow).
6063         (pop_type_0):  Return detailed error message (in a char** argument).
6064         (pop_type):  If pop_type_0 fails, print error message.
6065         (pop_argument_types):  Moved to verify.c.
6066         * verify.c (pop_argument_types):  Moved from expr.c.
6067         Return a (possible) error message, rather than void.
6068         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
6069         (verify_jvm_instruction):  Use new macros, improving error messages.
6070         For case OPCODE_astore use object_ptr_type_node.
6071         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
6072         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
6073
6074         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6075         constant, return body without wrapper.  (Improves constant folding.)
6076         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
6077
6078 2001-01-13  Per Bothner  <per@bothner.com>
6079
6080         * expr.c (expand_java_field_op):  Assigning to a final field outside
6081         an initializer does not violate JVM spec, so should be warning, not
6082         error.  (Sun's verifier does not complain - though MicroSoft's does.)
6083
6084 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
6085
6086         * gjavah.c (version), jcf-dump.c (version): Update copyright year
6087         to 2001.
6088
6089 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
6090
6091         * parse.y (resolve_expression_name): Permit instance variables from
6092         enclosing context in super constructor call.
6093         (resolve_qualified_expression_name): Permit enclosing class's qualified
6094         "this" in super constructor call.
6095
6096 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6097
6098         * class.c (build_utf8_ref): Remove last argument in call to
6099         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6100         (build_class_ref): Likewise.
6101         (build_static_field_ref): Likewise.
6102         (get_dispatch_table): Likewise.
6103         (layout_class_method): Likewise.
6104         (emit_register_classes): Likewise.
6105         * constants.c (build_constant_data_ref): Likewise.
6106         * decl.c (builtin_function): Likewise.
6107         (create_primitive_vtable): Likewise.
6108         * expr.c (build_known_method_def): Likewise.
6109         (build_jni_stub): Likewise.
6110         (java_lang_expand_expr): Likewise.
6111
6112 2001-01-10  Tom Tromey  <tromey@redhat.com>
6113
6114         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6115
6116 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6117
6118         * java-tree.h (lang_printable_name_wls): New prototype.
6119         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6120         rather than `current_class' to print type name. Don't prepend type
6121         names when printing constructor names.
6122         (lang_printable_name_wls): New function.
6123         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6124         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6125         * parse.y (patch_method_invocation): Message tuned for constructors.
6126         (not_accessible_p): Grant `private' access from within
6127         enclosing contexts.
6128
6129 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6130
6131         All files with updated copyright when applicable.
6132         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6133         * class.c (mangle_class_field): Function removed.
6134         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6135         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6136         (build_class_ref): Call `java_mangle_class_field' instead of
6137         `mangle_class_field.'
6138         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6139         (layout_class): Call `java_mangle_decl' instead of
6140         `mangle_static_field.'
6141         (cxx_keywords): Initialized static array moved to `lex.c.'
6142         (layout_class_method): Changed leading comment. Simplified to
6143         call `java_mangle_decl.' Local `ptr' moved in for loop body.
6144         * decl.c (lang_mark_tree): Mark field `package_list.'
6145         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6146         (struct lang_type): New field `package_list.'
6147         (unicode_mangling_length): Prototype removed.
6148         (append_gpp_mangled_name, append_gpp_mangled_classtype,
6149         emit_unicode_mangled_name): Likewise.
6150         (cxx_keyword_p): New prototype.
6151         (java_mangle_decl, java_mangle_class_field,
6152         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6153         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6154         `build_expr_wfl.'
6155         * jvgenmain.c (main_method_prefix): Global variable removed.
6156         (main_method_suffix): Likewise.
6157         (do_mangle_classname): New function.
6158         (main): Call it. Format changed to accommodate new mangling scheme.
6159         * lex.c: (utf8_cmp): Conditionally prototyped.
6160         (cxx_keywords): Moved from class.c, conditionally defined.
6161         (utf8_cmp, cxx_keyword_p): Likewise.
6162         * mangle.c (obstack.h, ggc.h): Included.
6163         (mangle_field_decl): New function.
6164         (mangle_method_decl, mangle_type, mangle_pointer_type,
6165         mangle_array_type, mangle_record_type,
6166         find_compression_pointer_match, find_compression_array_match,
6167         find_compression_record_match,
6168         find_compression_array_template_match, set_type_package_list,
6169         entry_match_pointer_p, emit_compression_string, init_mangling,
6170         finish_mangling, compression_table_add, mangle_member_name): Likewise.
6171         (mangle_obstack): New global.
6172         (MANGLE_RAW_STRING): New macro.
6173         (unicode_mangling_length): Turned static.
6174         (append_unicode_mangled_name): Renamed from
6175         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
6176         replaces `obstack', removed from the parameter list.
6177         (append_gpp_mangled_name): Turned static. `mangle_obstack'
6178         replaces parameter `obstack', removed from the parameter list. Call
6179         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6180         (append_gpp_mangled_classtype): Removed.
6181         (compression_table, compression_next): New static variables.
6182         * parse.y (temporary_obstack): Extern declaration removed.
6183
6184 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6185
6186         * parse.y (patch_binop): Compute missing type in error situations.
6187
6188 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6189
6190         * class.c (make_class_data): Push initial value for "arrayclass".
6191         * decl.c (init_decl_processing): Add new class field "arrayclass".
6192
6193 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
6194
6195         From patha@softlab.ericsson.se:
6196         * parse.y (switch_label): Use build, not build1, to construct
6197         DEFAULT_EXPR.
6198
6199 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6200
6201         * lang.c (lang_decode_option): Change -MA to -MP.
6202         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6203         Update to new prototype; do quote targets.
6204         (jcf_dependency_write): Update.
6205
6206 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
6207
6208         Shorten primitive array allocation path:
6209         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6210         to create new primitive arrays.
6211         * expr.c (build_newarray): If generating native code, call
6212         soft_newarray_node with a reference to the primitive TYPE identifier
6213         instead of type_value.
6214
6215 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
6216
6217         Fix for PRs gcj/312 and gcj/253:
6218         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6219         dest if they arn't already.
6220         * class.c (layout_class): Call maybe_layout_super_class on
6221         superinterfaces also, but only if compiling from bytecode.
6222
6223         Fix for PR gcj/373:
6224         * parse.y (create_class): Set ACC_STATIC if class is declared in an
6225         interface.
6226
6227 2000-12-15  Tom Tromey  <tromey@redhat.com>
6228
6229         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6230         set.
6231
6232 2000-12-14  Andrew Haley  <aph@redhat.com>
6233
6234         * boehm.c (mark_reference_fields): Change test to correctly detect
6235         bitmap overflow.
6236
6237 2000-12-15  Andreas Jaeger  <aj@suse.de>
6238
6239         * config-lang.in (lang_dirs): Added.
6240
6241 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6242
6243         * parse.y (end_artificial_method_body): Fixed undefined behavior.
6244         Credits go to rth for finding it.
6245
6246 2000-12-13  Mike Stump  <mrs@wrs.com>
6247
6248         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6249
6250 2000-11-07  Tom Tromey  <tromey@cygnus.com>
6251
6252         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6253         * lex.c (java_ignorable_control_p): Removed.
6254         (java_letter_or_digit_p): Removed.
6255         (java_start_char_p): New function.
6256         (java_read_char): Return `int', not `unicode_t'.  Changed
6257         callers.
6258         (java_read_unicode): Likewise.
6259         (java_read_unicode_collapsing_terminators): Likewise.
6260         (java_get_unicode): Likewise.
6261         (java_new_lexer): Initialize hit_eof.
6262         (java_parse_end_comment): Take `int' argument.
6263         (java_parse_doc_section): Likewise.
6264         (java_parse_escape_sequence): Don't allow backlash-newline.
6265         Return `int'.
6266         * lex.h (JAVA_DIGIT_P): Removed.
6267         (_JAVA_LETTER_OR_DIGIT_P): Removed.
6268         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6269         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6270         (JAVA_PART_CHAR_P): New macro.
6271         (UEOF): Now -1.
6272         (JAVA_CHAR_ERROR): Now -2.
6273         (java_lexer): New field `hit_eof'.
6274         * chartables.h: New file.
6275         * gen-table.pl: new file.
6276
6277 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6278             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6279
6280         * parse.y (java_complete_lhs): Only allow compound assignment of
6281         reference type if type is String.
6282
6283 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6284
6285         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6286         jcf-path.c: Likewise.
6287
6288 2000-12-09  Anthony Green  <green@redhat.com>
6289
6290         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6291         filestart and filename_length as int values.
6292
6293 2000-12-07  Mo DeJong  <mdejong@redhat.com>
6294
6295         * jcf-io.c (find_class): Correct the logic that tests to see if a
6296         .java file is newer than its .class file. The compiler was
6297         incorrectly printing a warning when file mod times were equal.
6298
6299 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
6300
6301         * jvgenmain.c: Use ISPRINT not isascii.
6302
6303 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6304
6305         * parse.y (end_artificial_method_body): Fixed typo.
6306
6307 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6308
6309         * parse.y (patch_method_invocation): Pick the correct enclosing
6310         context when creating inner class instances.
6311         Fixes gcj/332.
6312
6313 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
6314
6315         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6316         Update copyright year to 2000.
6317
6318 2000-11-23  Anthony Green  <green@redhat.com>
6319
6320         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6321         Move current_file_list out of yyparse and make it static.
6322
6323         * expr.c: Declare quick_stack and tree_list_free_list as static
6324         (init_expr_processing): Register quick_stack and
6325         tree_list_free_list roots.
6326
6327 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6328
6329         * parse.y (build_outer_field_access): New local `decl_ctx', use
6330         it. Check for field's context and current class immediate outer
6331         context inheritance.
6332         (outer_field_access_p): Consider fields inherited from the last
6333         enclosing context.
6334         (build_access_to_thisn): Stop at the last enclosing context if
6335         necessary.
6336         Fixes gcj/367.
6337
6338 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
6339
6340         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6341
6342 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
6343
6344         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6345         scratch buffer.
6346
6347 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6348
6349         * jv-scan.c (help): Document --complexity.
6350         (options): Added --complexity.
6351         (flag_complexity): New global.
6352         (main): Call `report'.
6353         * parse-scan.y (complexity): New global.
6354         (if_then_statement, if_then_else_statement,
6355         if_then_else_statement_nsi, switch_block_statement_group,
6356         while_expression, do_statement, for_begin, continue_statement,
6357         throw_statement, catch_clause, finally, method_invocation,
6358         conditional_and_expression, conditional_or_expression,
6359         conditional_expression): Update complexity.
6360         (reset_report): Reset complexity.
6361         (report): New function.
6362
6363 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6364
6365         * lex.c (yylex): Added STRICT_TK case.
6366         * parse.y (STRICT_TK): Added.
6367         * parse-scan.y (STRICT_TK): Added.
6368         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6369         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
6370         file.
6371         * keyword.h: Rebuilt.
6372         * keyword.gperf (strictfp): Added.
6373
6374 2000-11-20  Tom Tromey  <tromey@cygnus.com>
6375
6376         * lex.c (yylex): Recognize floating point constants with leading
6377         0.
6378
6379 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6380
6381         * java-tree.h (cyclic_inheritance_report): Constify.
6382         * parse.y (cyclic_inheritance_report): Likewise.
6383
6384 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6385
6386         * parse.y (goal): Remove call to ggc_add_string_root.
6387
6388 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6389
6390         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6391         Create string in scratch buffer, then pass to build_string.
6392
6393 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6394
6395         * parse.y (issue_warning_error_from_context): Add
6396         ATTRIBUTE_PRINTF.
6397
6398 2000-11-11  Anthony Green  <green@redhat.com>
6399
6400         * jcf-parse.c (process_zip_dir): Add finput parameter.
6401         (jcf_figure_file_type): Call process_zip_dir with appropriate
6402         argument.
6403
6404 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6405
6406         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6407         * jcf-parse.c (jcf_figure_file_type): Likewise.
6408
6409 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6410
6411         * parse.y (create_new_parser_context): Use memset () instead of
6412         bzero ().
6413
6414 2000-11-08  Tom Tromey  <tromey@cygnus.com>
6415
6416         * gjavah.c (process_file): Only include gcj/cni.h when generating
6417         CNI stubs.
6418
6419 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6420
6421         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6422         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6423         instead of bzero ().
6424
6425 2000-11-05  Tom Tromey  <tromey@cygnus.com>
6426
6427         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6428         * lex.c (IS_ZERO): New define.
6429         (java_perform_atof): Error on floating point underflow.
6430
6431 2000-11-04  Tom Tromey  <tromey@cygnus.com>
6432
6433         * lex.c (java_parse_escape_sequence): Only read two octal
6434         characters if the first one is greater than 3.  Don't allow
6435         "octal" numbers to include the digits 8 or 9.
6436
6437 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6438
6439         * Make-lang.in (java.distdir): Remove.
6440
6441 2000-11-03  Tom Tromey  <tromey@cygnus.com>
6442
6443         * Make-lang.in (java.dvi): New target.
6444         Partial fix for PR other/567.
6445
6446         * lang-options.h: Mention -Wout-of-date.
6447         * jcf-dump.c (flag_newer): New global.
6448         * gjavah.c (flag_newer): New global.
6449         * jcf-io.c (find_class): Only warn when flag_newer set.
6450         * lang.c (flag_newer): New global.
6451         (struct string_option): New declaration.
6452         (lang_W_options): New global.
6453         (process_option_with_no): New function.
6454         (lang_decode_option): Use it.
6455
6456         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6457         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6458         `$'.
6459
6460         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6461         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6462         * lex.c (java_read_unicode): Removed `term_context' argument.
6463         Recognize any number of `u' in `\u'.
6464         (java_read_unicode_collapsing_terminators): New function.
6465         (java_get_unicode): Use it.
6466         (java_lineterminator): Removed.
6467         (yylex): Produce error if character literal is newline or single
6468         quote.  Return if eof found in middle of `//' comment.  EOF in
6469         `//' comment is only an error if pedantic.
6470         (java_ignorable_control_p): New function.
6471         (java_parse_end_comment): Return if eof found in middle of
6472         comment.
6473         Include flags.h.
6474         * jv-scan.c (pedantic): New global.
6475
6476 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6477
6478         * parse.y (outer_field_access_p): Inherited fields aren't
6479         consider outer fields.
6480         (maybe_build_thisn_access_method): Use
6481         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6482         (resolve_expression_name): Trigger an error if a static field
6483         is being accessed as an outer field.
6484
6485 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6486
6487         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6488         Fixes gcj/365.
6489
6490 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6491
6492         * Make-lang.in: Move all build rules here from Makefile.in,
6493         adapt to new context.  Wrap all rules that change the current
6494         directory in parentheses.  Expunge all references to $(P).
6495         When one command depends on another and they're run all at
6496         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6497         all object-file generation rules.  Delete obsolete variables.
6498
6499         * Makefile.in: Delete.
6500         * config-lang.in: Delete outputs= line.
6501
6502 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6503
6504         * parse.y (patch_method_invocation): NULLify this_arg when already
6505         inserted.
6506         (maybe_use_access_method): Handle call to methods unrelated to the
6507         current class. Fixed comment.
6508         Fixes gcj/361.
6509
6510 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6511
6512        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6513        scope.
6514
6515 2000-10-24  Tom Tromey  <tromey@cygnus.com>
6516
6517         * lex.c (java_new_lexer): Initialize new fields.  Work around
6518         broken iconv() implementations.
6519         (java_read_char): Swap bytes if required.  Use fallback decoder if
6520         required.
6521         (byteswap_init, need_byteswap): New globals.
6522         (java_destroy_lexer): Only close iconv handle if it is in use.
6523         * lex.h (java_lexer): New fields read_anything, byte_swap,
6524         use_fallback.
6525         Made out_buffer unsigned.
6526
6527 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6528
6529         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6530         where an enclosing context can be set on the jdep.
6531         (do_resolve_class): Fixed identation.
6532
6533 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6534
6535         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6536
6537         * jcf-reader.c (peek_attribute, skip_attribute): Only define
6538         when requested.
6539
6540         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6541
6542         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6543
6544 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6545
6546         * jcf-write.c (OP1): Update `last_bc'.
6547         (struct jcf_block): Fixed indentation and typo in comments.  New
6548         field `last_bc'.
6549         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6550         follows `monitorenter'.
6551         * parse.y (patch_synchronized_statement): New local `tmp'. Call
6552         `patch_string'.
6553         Fixes gcj/232.
6554
6555 2000-10-16  Tom Tromey  <tromey@cygnus.com>
6556
6557         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6558         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6559         * lang-options.h: Added -MA, -MT, -MF..
6560         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6561         (DEPEND_TARGET_SET): New macro.
6562         (DEPEND_FILE_ALREADY_SET): Likewise.
6563         (init_parse): Handle new flags.
6564         * jcf.h (jcf_dependency_print_dummies): Declare.
6565         * Make-lang.in (s-java): Added mkdeps.o.
6566         * Makefile.in (BACKEND): Added mkdeps.o.
6567         (../gcjh$(exeext)): Added mkdeps.o.
6568         (../jcf-dump$(exeext)): Added mkdeps.o.
6569         * jcf-depend.c: Include mkdeps.h.
6570         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6571         add_entry): Removed.
6572         (jcf_dependency_reset): Rewrote.
6573         (dependencies): New global.
6574         (jcf_dependency_set_target): Rewrote.
6575         (jcf_dependency_add_target): Likewise.
6576         (jcf_dependency_add_file): Likewise.
6577         (munge): Removed.
6578         (print_ents): Removed.
6579         (jcf_dependency_write): Rewrote.
6580         (print_dummies): New global.
6581         (jcf_dependency_print_dummies): New function
6582         (jcf_dependency_write): Call deps_dummy_targets if required.
6583
6584 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6585
6586         * gjavah.c (add_class_decl): Removed unused variables `tname',
6587         `tlen' and `name_index'.
6588         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6589         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6590         in `wfl_operator' with value.
6591         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6592         (jcf_figure_file_type): Fixed identation.
6593         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6594         * parse.y (analyze_clinit_body): New function.
6595         (static_initializer:): Reset `current_static_block'.
6596         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6597         `wfl_operator' with new value.
6598         (lookup_cl): Use EXPR_WFL_FILENAME.
6599         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6600         analyze_clinit_body.
6601         (build_outer_field_access): Access to this$<n> built from
6602         current_class, not its outer context.
6603         (build_access_to_thisn): Fixed leading comment. Tidied things up.
6604         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6605         (patch_method_invocation): Use `is_static_flag' when already
6606         initialized.
6607         (patch_newarray): Removed assignment in ternary operator.
6608
6609 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6610
6611         * except.c (free_eh_ranges): Don't free `whole_range'.
6612
6613 2000-10-15  Anthony Green  <green@redhat.com>
6614
6615         * decl.c (init_decl_processing): Call init_class_processing before
6616         anything else.
6617
6618 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6619
6620         * check-init.c (check_init): Fixed leading comment. Use
6621         LOCAL_FINAL_P.
6622         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6623         (give_name_to_locals): Likewise.
6624         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6625         fields in lang_decl_var.
6626         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6627         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6628         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
6629         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
6630         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
6631         (LOCAL_FINAL): Rewritten.
6632         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
6633         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
6634         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
6635         `init_final' fields.
6636         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
6637         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
6638         (TYPE_HAS_FINAL_VARIABLE): New macro.
6639         (struct lang_type): Added `afv' field.
6640         * parse.y (check_static_final_variable_assignment_flag): New function.
6641         (reset_static_final_variable_assignment_flag): Likewise.
6642         (check_final_variable_local_assignment_flag): Likewise.
6643         (reset_final_variable_local_assignment_flag): Likewise.
6644         (check_final_variable_indirect_assignment): Likewise.
6645         (check_final_variable_global_assignment_flag): Likewise.
6646         (add_inner_class_fields): Use LOCAL_FINAL_P.
6647         (register_fields): Handle local finals and final variables.
6648         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
6649         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6650         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6651         on local finals.
6652         (java_complete_expand_methods): Loop to set
6653         TYPE_HAS_FINAL_VARIABLE. Call
6654         `reset_final_variable_local_assignment_flag' and
6655         `check_final_variable_local_assignment_flag' accordingly before
6656         and after constructor expansion. Call
6657         `reset_static_final_variable_assignment_flag'
6658         before expanding <clinit> and after call
6659         `check_static_final_variable_assignment_flag' if the
6660         current_class isn't an interface. After all methods have been
6661         expanded, call `check_final_variable_global_assignment_flag' and
6662         `check_static_final_variable_assignment_flag' if the current class
6663         is an interface.
6664         (maybe_yank_clinit): Fixed typo in comment.
6665         (build_outer_field_access_methods): Removed old sanity check. Use
6666         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6667         Don't create access methods for finals.
6668         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
6669         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
6670         existing DECL_INIT has been processed.
6671         (java_complete_lhs): Likewise.
6672         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
6673         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
6674         logic.
6675         (patch_assignment): Use LOCAL_FINAL_P.
6676         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
6677         DECL_INITIAL is nullified.
6678         Fixes gcj/163.
6679
6680 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6681
6682         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
6683
6684         * Makefile.in (parse.c, parse-scan.c): Likewise.
6685
6686 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6687
6688         * class.c (temporary_obstack): Remove.
6689         (make_class): Don't mess with obstascks.
6690         (push_class): Likewise.
6691         (set_super_info): Likewise.
6692         (add_method_1): Likewise.
6693         (add_method): Likewise.
6694         (add_field): Likewise.
6695         (build_utf8_ref): Likewise.
6696         (build_class_ref): Likewise.
6697         (build_static_field_ref): Likewise.
6698         (finish_class): Likewise.
6699         (push_super_field): Likewise.
6700         (layout_class): Likewise.
6701         (layout_class_methods): Likewise.
6702         (init_class_processing): Likewise.
6703         * constants.c (get_tag_node): Likewise.
6704         (build_constant_data_ref): Likewise.
6705         * decl.c (ggc_p): Remove.
6706         (copy_lang_decl): Use ggc_alloc.
6707         (complete_start_java_method): Don't mess with obstacks.
6708         (start_java_method): Likewise.
6709         (end_java_method): Likewise.
6710         * except.c (link_handler): Use xmalloc.
6711         (free_eh_ranges): New function.
6712         (method_init_exceptions): Use it.
6713         (add_handler): Use xmalloc.
6714         (expand_start_java_handler): Don't mess with obstacks.
6715         (prepare_eh_table_type): Likewise.
6716         (expand_end_java_handler): Likewise.
6717         * expr.c (push_value): Likewise.
6718         (create_label_decl): Likewise.
6719         (build_jni_stub): Likewise.
6720         (java_lang_expand_expr): Likewise.
6721         (note_instructions): Use xrealloc.
6722         (java_push_constant_from_pool): Don't mess with obstacks.
6723         (process_jvm_instruction): Likewise.
6724         * java-tree.h (cyclic_inheritance_report): Remove duplicate
6725         declaration.
6726         * jcf-parse.c (get_constant): Don't mess with obstacks.
6727         (read_class): Likewise.
6728         (jcf_parse): Likewise.
6729         * lex.c (expression_obstack): Remove.
6730         (java_lex): Don't use obstack_free.
6731         * parse.h (exit_java_complete_class): Don't mess with obstacks.
6732         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
6733         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
6734         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
6735         * parse.y (gaol): Add more GC roots.
6736         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
6737         (lookup_field_wrapper): Likewise.
6738         (obtain_incomplete_type): Don't mess with obstacks.
6739         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
6740         macros.
6741         (craft_constructor): Don't mess with obstacks.
6742         (safe_layout_class): Likewise.
6743         (java_complete_class): Likewise.
6744         (source_end_java_method): Likewise.
6745         (build_outer_field_access_methods): Likewise.
6746         (build_outer_method_access_method): Likewise.
6747         (maybe_build_thisn_access_method): Likewise.
6748         (build_dot_class_method_invocation): Likewise.
6749         (java_complete_tree): Likewise.
6750         (java_complete_lhs): Likewise.
6751         (do_merge_string_cste): Likewise.
6752         (patch_string_cst): Likewise.
6753         (array_constructor_check_entry): Likewise.
6754         * typeck.c (build_java_array_type): Likewise.
6755         (parse_signature_string): Likewise.
6756         (build_java_signature): Likewise.
6757
6758 2000-10-12  Tom Tromey  <tromey@cygnus.com>
6759
6760         Fix for PR gcj/356:
6761         * gjavah.c (add_class_decl): Don't special-case inner classes.
6762         (add_namelet): Likewise.
6763
6764 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
6765
6766         * java-tree.h: Constify current_encoding.
6767         * lang.c: Constify current_encoding.
6768
6769 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
6770
6771         * jvgenmain.c (class_mangling_suffix): Omit `.'.
6772         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
6773
6774 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6775
6776         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
6777         patch. Fixes gcj/340.
6778
6779 2000-10-10  Tom Tromey  <tromey@cygnus.com>
6780
6781         * lex.c (java_new_lexer): Initialize out_first and out_last
6782         fields.
6783         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
6784
6785 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6786
6787         * parse.y (pop_current_osb): New function.
6788         (array_type:): Use `dims:', changed actions
6789         accordingly. Suggested by Anthony Green.
6790         (array_creation_expression:): Used pop_current_osb.
6791         (cast_expression:): Likewise.
6792         (search_applicable_method_list): Fixed indentation.
6793
6794 2000-10-08  Anthony Green  <green@redhat.com>
6795
6796         * parse.y (array_type_literal): Remove production.
6797         (type_literals): Refer to array_type, not array_type_literal.
6798
6799 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6800
6801         Patch contributed by Corey Minyard.
6802         * decl.c (check_local_named_variable): New function.
6803         (tree check_local_unnamed_variable): Likewise.
6804         (find_local_variable): Splitted. Call check_local_{un}named_variable.
6805
6806 2000-10-07  Anthony Green  <green@redhat.com>
6807
6808         * class.c (layout_class): Handle case where superclass can't be
6809         layed out yet.
6810
6811 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6812
6813         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
6814         gperf.
6815
6816 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6817
6818         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
6819         * jvgenmain.c (class_mangling_prefix): Removed.
6820         (class_mangling_suffix): New global.
6821         (main): Use it.
6822         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
6823         `$'.
6824         (print_method_info): Handle overrides for static and final
6825         methods.
6826         (process_file): Generate declaration for class object field.
6827         * class.c (cxx_keywords): New array.
6828         (utf8_cmp): New function.
6829         (cxx_keyword_p): New function.
6830         (layout_class_method): Mangle C++ keywords by appending `$'.
6831         (mangle_field): New function.
6832         (mangle_class_field): Use mangle_field.  Mangle class name as
6833         `class$'.
6834         (mangle_static_field): Use mangle_field.
6835
6836 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6837
6838         * decl.c (find_local_variable): Removed uncessary type check and
6839         fixed range check typo. From Corey Minyard.
6840
6841 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6842
6843         * decl.c (give_name_to_locals): New local `code_offset'. Call
6844         `maybe_adjust_start_pc'.
6845         * expr.c (note_instructions): New function.
6846         (expand_byte_code): Don't collect insn starts here.
6847         (peek_opcode_at_pc): New function.
6848         (maybe_adjust_start_pc): Likewise.
6849         * java-tree.h (maybe_adjust_start_pc): Declare.
6850         (note_instructions): Likewise.
6851         * jcf-parse.c (parse_class_file): Call `note_instructions'.
6852
6853 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6854
6855         * parse.y (field_access:): Fixed indentation.
6856         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
6857
6858 2000-09-07  Tom Tromey  <tromey@cygnus.com>
6859
6860         Fix for PR gcj/307:
6861         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
6862         JPRIMITIVE_TYPE_P, for arithmetic operators.
6863         (patch_method_invocation): Indentation fix.
6864         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
6865         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
6866         (do_unary_numeric_promotion): Cleaned up code.
6867         (valid_cast_to_p): Handle boolean correctly.
6868
6869 2000-09-27  Tom Tromey  <tromey@cygnus.com>
6870
6871         * lex.c (java_read_unicode): Reset bs_count when finished with
6872         `\u' sequence.
6873
6874 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6875
6876         Convert to GC.
6877         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
6878         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
6879         (typeck.o): Depend on ggc.h.
6880         * class.c (add_method_1): Use GC functions for allocation.
6881         (init_class_processing): Register roots.
6882         * decl.c (ggc_p): Set to 1.
6883         (pending_local_decls): Make it static.
6884         (push_jvm_slot): Use GC functions for allocation.
6885         (init_decl_processing): Register roots.
6886         (give_name_to_locals): Use GC functions for allocation.
6887         (lang_mark_tree): New function.
6888         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
6889         functions for allocation.
6890         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
6891         * lex.c (java_lex): Use build_string, rather than replicating it
6892         inline.
6893         * parse.y (goal): Add more roots.
6894         (mark_parser_ctxt): New function.
6895         * typeck.c: Include ggc.h.
6896
6897 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6898
6899         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
6900         contains something else than MODIFY_EXPR.
6901
6902 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
6903
6904         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
6905         * Makefile.in (parse.o): Depend on ggc.h.
6906         (class.o): Likewise.
6907         (constants.o): Likewise.
6908         (decl.o): Likewise.
6909         (expr.o): Likewise.
6910         (jcf-parse.o): Likewise.
6911         (jcf-write.o): Likewise.
6912         (mangle.o): Likewise.
6913         * class.c: Include ggc.h.
6914         (build_static_field_ref): Register GC roots.
6915         (layout_class): Likewise.
6916         (init_class_processing): Likewise.
6917         * constants.c: Include ggc.h.
6918         (current_constant_pool_data_ref): Remove.
6919         (tag_nodes): Move it to ...
6920         (get_tag_node): ... here.  Register GC roots.
6921         * decl.c: Include ggc.h.  Remove many global tree definitions.
6922         (throw_node): Define.
6923         (java_global_trees): Likewise.
6924         (predef_filenames): Make the size a constant.
6925         (init_decl_processing): Adjust accordingly.
6926         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
6927         * expr.c: Include ggc.h.
6928         (init_expr_processing): Register GC roots.
6929         (build_invokeinterface): Likewise.
6930         * java-tree.h: Replace extern tree declarations with macros.
6931         (java_global_trees): New variable.
6932         (java_tree_index): New enumeration.
6933         (init_jcf_parse): Declare.
6934         * jcf-parse.c: Include ggc.h.
6935         (current_class): Remove declaration.
6936         (main_class): Likewise.
6937         (all_class_list): Likewise.
6938         (predefined_filename_p): Adjust for constant size of
6939         predef_filenames.
6940         (init_jcf_parse): New function.
6941         * jcf-write.c: Include ggc.h.
6942         (generate_classfile): Register GC roots.
6943         (append_synthetic_attribute): Likewise.
6944         (append_innerclass_attribute_entry): Likewise.
6945         * lang.c: Include ggc.h.
6946         (lang_print_error): Register GC roots.
6947         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
6948         with macros.
6949         * parse.y: Include ggc.h.
6950         (wfl_operator): Remove.
6951         (goal): Register GC roots.
6952         (java_pop_parser_context): Adjust for new field names.
6953         (java_parser_context_save_global): Likewse.
6954         (java_parser_context_restore_global): Likewise.
6955         (java_parser_context_suspend): Likewise.
6956         (java_parser_context_resume): Likewise.
6957         (verify_constructor_circularity): Register GC roots.
6958         (lookup_cl): Likewise.
6959         (java_reorder_fields): Likewise.
6960         (build_current_this): Likewise.
6961         (class_in_current_package): Likewise.
6962         (argument_types_convertible): Likewise.
6963         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
6964
6965 2000-09-14  Tom Tromey  <tromey@cygnus.com>
6966
6967         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
6968
6969 2000-09-13  Tom Tromey  <tromey@cygnus.com>
6970
6971         * jcf-parse.c: Include <locale.h>.
6972         * jv-scan.c: Include <locale.h>.
6973
6974 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6975
6976         * expr.c (pop_type_0): Return `Object' if trying to merge two
6977         interface types.
6978         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
6979         interface types; `Object' is always a valid supertype.
6980
6981 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6982
6983         Fix for PR gcj/33:
6984         * jv-scan.c (help): Document --encoding.
6985         (options): Added `encoding' entry.
6986         (OPT_ENCODING): New define.
6987         (main): Handle --encoding.
6988         Include <langinfo.h> if nl_langinfo exists.
6989         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
6990         --encoding.
6991         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
6992         (parse_source_file): Correctly call java_init_lex.  Added `finput'
6993         argument.  Use nl_langinfo to determine default encoding.
6994         * java-tree.h (current_encoding): Declare.
6995         * parse.y (java_parser_context_restore_global): Don't restore
6996         `finput'.
6997         (java_parser_context_save_global): Don't set `finput' field.
6998         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
6999         if required.
7000         * lang.c (current_encoding): New global.
7001         (lang_decode_option): Recognize `-fencoding='.
7002         (finish_parse): Don't close finput.
7003         * parse.h (struct parser_ctxt): Removed `finput' and
7004         `unget_utf8_value' fields.  Added `lexer' field.
7005         (java_init_lex): Fixed declaration.
7006         * lex.c (java_new_lexer): New function.
7007         (java_destroy_lexer): Likewise.
7008         (java_read_char): Added `lex' argument.  Handle iconv case.
7009         (java_read_unicode): Added `lex' argument.  Count backslashes in
7010         lexer structure.
7011         (java_init_lex): Added `finput' and `encoding' arguments.  Set
7012         `lexer' field in ctxp.
7013         (BAD_UTF8_VALUE): Removed.
7014         (java_lex): Handle seeing UEOF in the middle of a string literal.
7015         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7016         (java_lexer): New structure.
7017         (UNGETC): Removed.
7018         (GETC): Removed.
7019         (DEFAULT_ENCODING): New define.
7020         (java_destroy_lexer): Declare.
7021
7022 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7023
7024         Fix for PR gcj/343:
7025         * lex.c (java_init_lex): Initialize java_io_serializable.
7026         * parse.y (java_io_serializable): New global.
7027         (valid_ref_assignconv_cast_p): An array can be cast to
7028         serializable.
7029
7030 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7031
7032         * decl.c, expr.c: Include defaults.h if not already included.
7033         Don't define the *_TYPE_SIZE macros.
7034
7035 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
7036
7037         * typeck.c (build_java_array_type): Correct first parameter
7038         in ADJUST_FIELD_ALIGN invocation.
7039
7040 2000-09-06  Tom Tromey  <tromey@cygnus.com>
7041
7042         * lang-specs.h: Also recognize `-femit-class-files'.
7043
7044 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7045
7046         * verify.c (merge_types): Load the types to merge if necessary.
7047
7048 2000-09-02  Anthony Green  <green@redhat.com>
7049
7050         * jcf-io.c: Include zlib.h.
7051         (open_in_zip): Read compressed class file archives.
7052         * zipfile.h (ZipDirectory): Add uncompressed_size and
7053         compression_method fields.
7054         * zextract.c (read_zip_archive): Collect file compression info.
7055
7056 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
7057
7058         * parse.y (do_resolve_class): Also explore superclasses of
7059         intermediate enclosing contexts when searching for inner classes.
7060
7061 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7062
7063         * parse.y (variable_declarator_id:): Better error message.
7064         (expression_statement:): Use YYNOT_TWICE.
7065         (cast_expression:): Likewise.
7066         (assignment:): Likewise.
7067
7068 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7069
7070         * parse.y (do_merge_string_cste): New locals. Create new
7071         STRING_CSTs each time, use memcpy. Fixes gcj/311.
7072
7073 2000-08-07  Hans Boehm  <boehm@acm.org>
7074
7075         * boehm.c (mark_reference_fields): Set marking bits for all words in
7076         a multiple-word record.
7077         (get_boehm_type_descriptor): Use the procedure marking descriptor for
7078         java.lang.Class.
7079
7080 2000-08-31  Mike Stump  <mrs@wrs.com>
7081
7082         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7083         jcf-dump$(exeext)): Make parallel safe.
7084
7085 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7086
7087         * jcf-parse.c (set_source_filename): Constify a char *.
7088         * jcf-write.c (append_innerclasses_attribute,
7089         make_class_file_name): Constify a char *.  Don't recycle a
7090         variable for an unrelated purpose.
7091         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7092         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7093
7094 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7095
7096         * expr.c (can_widen_reference_to): Fixed indentation.
7097         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7098         * parse.y: `finit$' replaces `$finit$' in comments.
7099         (try_builtin_assignconv): Fixed leading comment.
7100
7101 2000-08-25  Greg McGary  <greg@mcgary.org>
7102
7103         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7104
7105 2000-08-24  Greg McGary  <greg@mcgary.org>
7106
7107         * lang.c (lang_decode_option): Use ARRAY_SIZE.
7108         * parse.y (BINOP_LOOKUP): Likewise.
7109
7110 2000-08-22  Andrew Haley  <aph@cygnus.com>
7111
7112         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7113         sign extending. Fixes gcj/321.
7114         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7115         combining to make a jlong. Fixes gcj/321.
7116
7117 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7118
7119         * lang-specs.h: Do not process -o or run the assembler if
7120         -fsyntax-only.
7121
7122 2000-08-16  Andrew Haley  <aph@cygnus.com>
7123
7124         * typeck.c (build_java_array_type): Rewrite code to do array
7125         alignment.  Take into account back-end macros when aligning array
7126         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7127         user to set alignment. Fixes gcj/252 and 160.
7128
7129 2000-08-09  Tom Tromey  <tromey@cygnus.com>
7130
7131         * parse.y (check_abstract_method_definitions): Now return `int'.
7132         Check implemented interfaces.  Fixes PR gcj/305.
7133
7134         * parse.y (patch_switch_statement): Disallow `long' in switch
7135         expressions.  Fixes PR gcj/310.
7136
7137 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7138
7139         * decl.c (finit_leg_identifier_node): New global.
7140         (init_decl_processing): Use `finit$' to initialize
7141         finit_identifier_node. Use `$finit$' to initialize
7142         finit_leg_identifier_node.
7143         * expr.c (expand_java_field_op): Use ID_FINIT_P.
7144         * java-tree.h (finit_identifier_node): Changed attached comment.
7145         (finit_leg_identifier_node): New declaration.
7146         (ID_FINIT_P): Take finit_identifier_node and
7147         finit_leg_identifier_node into account. This is a backward
7148         compatibility hack.
7149
7150 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7151
7152         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7153         Jan 6 2000 patch.
7154         (generate_bytecode_insns): Check `nargs' before emitting it.
7155         * verify.c (merge_type_state): Fixed typo.
7156         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7157         generate_bytecode_{conditional,insns}.
7158
7159 2000-08-13  Anthony Green  <green@redhat.com>
7160
7161         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7162         for -pg builds).
7163
7164 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7165
7166         * class.c (maybe_layout_super_class): Fixed indentation.
7167         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7168         (java_check_methods): New function declaration.
7169         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7170         instead of `str_ptr'.
7171         * jcf-write.c (generate_bytecode_insns): Emit number the of args
7172         of a `invokeinterface' at the right time.
7173         * parse.h (WFL_STRIP_BRACKET): New macro.
7174         (SET_TYPE_FOR_RESOLUTION): Use it.
7175         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7176         (check_class_interface_creation): Don't check for cross package
7177         innerclass name clashes.
7178         (method_header): Behave properly if MDECL is `error_mark_node'.
7179         (method_declarator): Return `error_mark_node' if bogus current
7180         class.
7181         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7182         (resolve_and_layout): New local `decl_type', set and used. Call
7183         java_check_methods.
7184         (java_check_methods): New method.
7185         (java_layout_classes): Use it.
7186         (resolve_qualified_expression_name): No EH check necessary in
7187         access$<n>.
7188         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7189         `case' statement.
7190         (patch_assignment): Set DECL_INITIAL on integral final local.
7191
7192 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7193
7194         * java-tree.h (flag_extraneous_semicolon): New extern.
7195         * lang-options.h: (-Wextraneous-semicolon): New option.
7196         * lang.c (flag_redundant): Fixed typo in leading comment.
7197         (flag_extraneous_semicolon): New global.
7198         (lang_decode_option): Set `flag_extraneous_semicolon' when
7199         -Wall. Decode `-Wextraneous-semicolon'.
7200         * parse.y (type_declaration:): Removed `SC_TK' hack, added
7201         `empty_statement' rule.
7202         (class_body_declaration): Likewise.
7203         (method_body:): Accept `;' as a method body.
7204         (static_initializer:): Removed `SC_TK' hack.
7205         (constructor_block_end:): Likewise.
7206         (empty_statement:): Report deprecated empty declaration. Fixes
7207         gcj/295
7208
7209 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7210
7211         * parse.y (build_dot_class_method_invocation): Changed parameter
7212         name to `type'. Build signature from `type' and convert it to a
7213         STRING_CST if it's an array.
7214         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7215         to use `ref_type' directly.
7216
7217 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
7218
7219         * lang-options.h: Added a comma after the last element to avoid
7220         syntax errors when other languages define additional options.
7221
7222 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7223
7224         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7225         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7226         (jc1): Link with $(BACKEND).
7227         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7228
7229 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7230
7231         * jvspec.c: Adjust type of second argument to
7232         lang_specific_driver, and update code as necessary.
7233
7234         * class.c (build_dtable_decl): Initialize dummy.
7235
7236 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7237
7238         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7239         method bodies not to rule out discarding `<clinit>'; don't use
7240         <clinit> to initialize static fields with constant initializers.
7241
7242 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7243
7244         * gjavah.c (print_method_info): Added `synth' parameter. Skip
7245         synthetic methods.
7246         (method_synthetic): New global.
7247         (HANDLE_METHOD): Recognize synthetic method and tell
7248         `print_method_info' about it.
7249         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7250         processing a synthetic method.
7251         * jcf-reader.c (skip_attribute): New function.
7252         ( skip_attribute): Likewise.
7253
7254 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7255
7256         * parse.y (build_outer_field_access): Fixed comments.
7257         (fix_constructors): Emit the initialization of this$<n> before
7258         calling $finit$.
7259         (resolve_qualified_expression_name): Build an access to `decl' if
7260         necessary.
7261
7262 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7263
7264         * parse-scan.y (curent_class): Non longer const.
7265         (inner_qualifier, inner_qualifier_length): Deleted.
7266         (current_class_length): New global.
7267         (bracket_count): Fixed typo in leading comment.
7268         (anonymous_count): New global.
7269         (class_instance_creation_expression:): Handle anonymous classes.
7270         (anonymous_class_creation:): New rule.
7271         (push_class_context): Rewritten.
7272         (pop_class_context): Likewise.
7273         (INNER_QUALIFIER): Macro deleted.
7274         (report_class_declaration): call `push_class_context' when
7275         entering the function. `fprintf' format modified not to use
7276         INNER_QUALIFIER.
7277         (report_class_declaration): Assign `package_name' and
7278         `current_class' to NULL separately.
7279
7280 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7281
7282         * expr.c (build_invokeinterface): Call layout_class_methods on
7283         target interface.
7284
7285 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7286             Anthony Green  <green@cygnus.com>
7287             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7288
7289         * class.c (make_class_data): Create vtable for abstract classes.
7290         (get_dispatch_table): Changed to cope with abstract classes.
7291
7292 2000-07-27  Tom Tromey  <tromey@cygnus.com>
7293
7294         * parse.y (patch_method_invocation): Don't reverse the argument
7295         list when dealing with anonymous class constructors. Fixed typo in
7296         comment.
7297
7298 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7299
7300         * parse.y (build_alias_initializer_parameter_list): Reverse
7301         crafted list when building aliases for anonymous class
7302         constructors.
7303
7304 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7305
7306         * parse.y (jdep_resolve_class): Don't bother checking potential
7307         innerclass access if `decl' is NULL.
7308         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7309         WFL.
7310
7311 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7312
7313         * parse.c: Remove (again.)
7314
7315 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7316
7317         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7318         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7319         outside the `if' statement, alias to innerclass removed, `decl'
7320         used to mark the class complete.
7321
7322 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7323
7324         * parse.y (simple_name:): Fixed typo in error message.
7325
7326 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7327
7328         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7329         or its first operand can be error marks.
7330
7331 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7332
7333         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7334         * parse.y (method_header): Likewise.
7335
7336 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7337
7338         * parse.y (process_imports): Consider that one might be trying to
7339         import an innerclass. Fixes gcj/254
7340
7341 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7342
7343         * parse.y (find_as_inner_class): Handle the case where the
7344         enclosing context of an innerclass has been loaded as bytecode.
7345
7346 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7347
7348         * parse.y (simple_name:): Reject `$' in type names.
7349         (resolve_type_during_patch): Use `type' as a second
7350         argument to resolve_no_layout. Fixes gcj/257.
7351
7352 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
7353
7354         * parse.y (find_most_specific_methods_list): Select the only
7355         non-abstract method even if max has been set.
7356         Fixes gcj/285, gcj/298.
7357
7358 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
7359
7360         * lang-specs.h: Added %(jc1) to java compiler options.
7361
7362 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7363
7364         * .cvsignore: New file.
7365
7366 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7367
7368         * parse.y (not_accessible_p): Access granted to innerclasses
7369         (indirectly) extending the reference type. Fixes gcj/249.
7370
7371 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7372
7373         * parse.y (patch_method_invocation): Fixed comment.
7374         (maybe_use_access_method): Build this$<n>s to the context of the
7375         target method, or a type that extends it. Fixes gcj/242.
7376
7377 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7378
7379         * parse.c: Remove.
7380
7381 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7382
7383         * parse.y (fold_constant_for_init): Avoid bullish conversion.
7384
7385 2000-07-13  Tom Tromey  <tromey@cygnus.com>
7386
7387         * lang-specs.h: Added %{I*}.
7388
7389 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7390
7391         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7392
7393 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7394
7395         * parse-scan.c: Remove.
7396
7397 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7398
7399         * class.c (set_super_info): Handled protected inner classes.
7400         (common_enclosing_context_p): Bail early if arguments aren't both
7401         inner classes.
7402         (get_access_flags_from_decl): Handle private and protected inner
7403         classes.
7404         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7405         (CLASS_PROTECTED): Likewise.
7406         (struct lang_type): New bitfield `poic'.
7407         * parse.y (jdep_resolve_class): Call check_inner_class_access on
7408         inner classes only.
7409         (check_inner_class_access): Renamed arguments, added
7410         comments. Handles protected inner classes (fixes gcj/225)
7411         (not_accessible_p): Fixed comments. Avoid handling inner classes.
7412
7413 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7414
7415         * parse.y (resolve_qualified_expression_name): Verify qualified
7416         access to `this'. Fixes gcj/239.
7417
7418 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7419
7420         * jcf-write.c (generate_classfile): Don't install ConstantValue
7421         for null pointers.
7422
7423 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7424
7425         * parse.y (resolve_qualified_expression_name): Handle inner class
7426         access. Fixes gcj/256.
7427
7428 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7429
7430         * jcf-write.c (generate_classfile): Properly install the
7431         ConstantValue attribute and the initial value constant pool index
7432         on string constants.
7433         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7434         class files.
7435
7436 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7437
7438         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7439         construct.
7440         * parse.y (find_as_inner_class): Fixed typo.
7441         (do_resolve_class): Explore enclosing contexts when searching for
7442         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7443         (check_inner_class_access): Check `decl' which can be null in case
7444         of previous errors.
7445
7446 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7447
7448         * java-tree.h (java_debug_context): Declared `extern'.
7449         (safe_layout_class): Likewise.
7450         * parse.y (resolve_field_access): Field must be `static' in order
7451         to be replaced by its initial value. Added comments.
7452         (find_applicable_accessible_methods_list): Fixed typo.
7453         (find_most_specific_methods_list): Methods found in innerclasses
7454         take over methods founds in the enclosing contexts.
7455         (java_complete_tree): Loosen restrictions on the type of DECLs
7456         that can be replaced by their initialization values.
7457         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7458
7459 2000-07-05  Tom Tromey  <tromey@cygnus.com>
7460
7461         * Make-lang.in (PARSE_DIR): New macro.
7462         (PARSE_RELDIR): Likewise.
7463         (PARSE_C): Likewise.
7464         (PARSE_SCAN_C): Likewise.
7465         ($(PARSE_C)): New target.
7466         ($(PARSE_SCAN_C)): Likewise.
7467         (SET_BISON): New macro.
7468         (BISONFLAGS): Likewise.
7469         (JAVABISONFLAGS): Likewise.
7470
7471 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
7472
7473         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7474         argument on the first pass for CNI as well as JNI.
7475         (print_method_info): Set up method name on the first pass only.
7476
7477 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7478
7479         * parse.y (parser_qualified_classname): Removed parameter
7480         `is_static'.
7481         (create_interface): Removed first passed parameter to
7482         parser_qualified_classname.
7483         (create_class): Likewise. Don't install alias on static
7484         innerclasses. Fixes gcj/275.
7485
7486 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7487
7488         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7489         debugable statement with empty_stmt_node. Fixes gcj/272
7490
7491 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7492
7493         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7494         gcj/271.
7495
7496 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7497
7498         * jcf-write.c (push_long_const): Appropriately cast short negative
7499         constant to jword.
7500
7501 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7502
7503         * parse.y (verify_constructor_super): Use loop variable
7504         `m_arg_type' initialized with `mdecl_arg_type'.
7505
7506 2000-06-29  Tom Tromey  <tromey@cygnus.com>
7507
7508         * parse.y (resolve_field_access): Handle case where `type_found'
7509         is NULL.
7510
7511 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7512
7513         * expr.c (lookup_field): The same field can be found through two
7514         different interface. Don't declare it ambiguous in that case.
7515
7516 2000-06-27  Tom Tromey  <tromey@cygnus.com>
7517
7518         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
7519         follows \r, then unget it at a lower level.
7520
7521 2000-06-26  Tom Tromey  <tromey@cygnus.com>
7522
7523         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7524         java_complete_tree.
7525
7526 2000-06-25  Tom Tromey  <tromey@cygnus.com>
7527
7528         * parse.y (for_statement): Wrap expression in a WFL if it is a
7529         constant.  For PR gcj/268.
7530
7531 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7532
7533         * parse.y (do_resolve_class): Minor optimiztion in the package
7534         list search. Removed unnecessary test and return statement.
7535         (valid_ref_assignconv_cast_p): Order of arguments to
7536         enclosing_context_p fixed.
7537
7538 2000-06-24  Tom Tromey  <tromey@cygnus.com>
7539
7540         * expr.c (lookup_field): Print error and return error_mark_node if
7541         field reference is ambiguous.
7542
7543         * parse.y (check_abstract_method_definitions): Also check if
7544         `other_method' is abstract.
7545
7546 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7547
7548         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7549         classes.
7550         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7551         (struct lang_type): New field `pic'.
7552         (CLASS_PRIVATE): New macro.
7553         * parse.y (check_inner_class_access): New function.
7554         (jdep_resolve_class): Call it.
7555
7556 2000-06-23  Tom Tromey  <tromey@cygnus.com>
7557
7558         * parse.y (patch_incomplete_class_ref): Initialize the returned
7559         class.  For PR gcj/260.
7560
7561 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7562
7563         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7564
7565 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7566
7567         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7568         Java specific checks.
7569         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7570         screened by DECL_P.
7571         * java-tree.def (CASE_EXPR): Marked 'e'.
7572         (DEFAULT_EXPR): Likewise.
7573         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7574         screened by DECL_P.
7575         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7576         Java specific checks.
7577         (generate_bytecode_insns): Test try_block for BLOCK before using
7578         BLOCK_EXPR_BODY.
7579         * parse.y (build_wfl_wrap): Added `location' argument. Set
7580         EXPR_WFL_LINECOL accordingly.
7581         (dim_expr:): Wrap constants with WFLs.
7582         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7583         (resolve_package): Check for `stmt' not being a BLOCK before
7584         building a debuggable statement with it.
7585         (make_qualified_primary): Added extra parameter to build_wfl_wrap
7586         invocation.
7587         (resolve_field_access): Make sure `decl' is a DECL before treating
7588         it as such.
7589         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7590         IDENTIFIER_NODE before treating it as such.
7591         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7592         treating it as such.
7593         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7594         to be applied only on non array types.
7595
7596 2000-06-16  Per Bothner  <per@bothner.com>
7597
7598         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
7599         define in terms of DECL_RESULT, as that fails when --enable-checking.
7600
7601 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7602
7603         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
7604         types the same in comparison.
7605         (CHECK_OP): Add static prototype.
7606
7607 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7608
7609         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7610         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7611         * parse.c: Rebuilt.
7612
7613 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7614
7615         * decl.c (create_primitive_vtable): Prototype.
7616
7617         * jcf-write.c (generate_bytecode_insns): Initialize variable
7618         `saved_context'.
7619
7620         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7621
7622 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7623
7624         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7625         to track searched classes, and do not search the same class more than
7626         once. Call find_applicable_accessible_methods_list on immediate
7627         superclass, instead of search_applicable_method_list on all ancestors.
7628         Fix for PR gcj/238.
7629
7630 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
7631
7632         * parse.y (register_fields): Permit static fields in inner classes
7633         if they are final. Fix for PR gcj/255.
7634
7635 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7636
7637         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
7638         * parse.y (find_in_imports): Returned type changed to void,
7639         leading comment fixed.
7640         (register_package): New function.
7641         (qualify_and_find): Likewise.
7642         (package_declaration:): Use `register_package'.
7643         (single_type_import_declaration:): Removed local variable
7644         `node'. Added missing `;' for consistency.
7645         (type_import_on_demand_declaration:): Use `chainon' to link new
7646         entries.
7647         (lookup_field_wrapper): Lookup local variables defined in outer
7648         contexts first.
7649         (java_complete_class): Don't reverse the list of imported on demand.
7650         (do_resolve_class): Reorganized. Removed local variable
7651         `original_name'. Call `qualify_and_find' with the current package
7652         name, invoke `find_in_imports_on_demand' right after. Call
7653         `qualify_and_find' with the packages we've seen so far. Fixed
7654         operations numbering in comments.
7655         (java_expand_class): Don't reverse `package_list'.
7656         (find_most_specific_methods_list): New local variables `abstract'
7657         and `candidates'. Use them to pick the right method.
7658
7659 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
7660
7661         * parse.y (check_modifiers_consistency): Don't subtract out
7662         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
7663
7664 2000-06-04  Philipp Thomas  <pthomas@suse.de>
7665
7666         * Makefile.in (INTLLIBS): New.
7667         (LIBS): Add above.
7668         (DEPLIBS): Ditto.
7669
7670 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7671
7672         * class.c (get_dispatch_table): Build the vtable dummy entry list
7673         element with a null purpose. Fixed leading comment.
7674         (build_dtable_decl): Build an accurate dtable type when appropriate
7675         and use it.
7676
7677 2000-06-02  Richard Henderson  <rth@cygnus.com>
7678
7679         * lang.c (lang_get_alias_set): New.
7680
7681 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7682
7683         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
7684         before using it as the accessed field.
7685
7686 2000-05-31  Tom Tromey  <tromey@cygnus.com>
7687
7688         * java-tree.h (boolean_array_vtable, byte_array_vtable,
7689         char_array_vtable, short_array_vtable, int_array_vtable,
7690         long_array_vtable, float_array_vtable, double_array_vtable):
7691         Declare.
7692         * expr.c (get_primitive_array_vtable): New function.
7693         (create_primitive_vtable): New function.
7694         (java_lang_expand_expr): Enable code to statically generate
7695         arrays.
7696         * decl.c (init_decl_processing): Create primitive vtables.
7697         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
7698         short_array_vtable, int_array_vtable, long_array_vtable,
7699         float_array_vtable, double_array_vtable): Define.
7700
7701 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
7702
7703         * java/parse.y (find_applicable_accessible_methods_list):
7704         Don't add an uninitialized value to the list.
7705
7706 2000-05-25  Tom Tromey  <tromey@cygnus.com>
7707
7708         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
7709         when trying to see if field's class should be initialized.  Always
7710         initialize field's declaring class, not qualified class.
7711         For PR gcj/162.
7712
7713         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
7714         `wfl_operator', to maybe_build_primttype_type_ref.
7715         Fixes PR gcj/235.
7716
7717 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
7718
7719        * parse.y (patch_method_invocation): Don't try to lookup methods
7720        in primitive types.
7721
7722 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7723
7724         * parse.y (resolve_field_access): Call the appropriate <clinit>
7725         before accessing the length of a static array. Craft a decl for
7726         the field while its time. Fixes PR gcj/129.
7727
7728 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7729
7730         * parse.y (resolve_package): Correctly set `*next' (was off by
7731         one.)
7732         (resolve_qualified_expression_name): Fixed comment.
7733
7734 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7735
7736         * jcf-parse.c (jcf_parse_source): Reset current_class and
7737         current_function_decl to NULL before parsing a new file.
7738
7739 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7740
7741         * parse.y (block_end:): If the collected block doesn't feature a
7742         statement, insert an empty statement.
7743
7744 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7745
7746         * parse.y (maybe_yank_clinit): New function.
7747         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
7748         end of the list of methods belonging to a class.
7749         (java_complete_expand_method): Check whether <clinit> is really
7750         necessary and expand it accordingly.
7751
7752 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7753
7754         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
7755         processed by the method's switch statement.
7756
7757 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7758
7759         * java-tree.h: Added init state enum.
7760         * decl.c (emit_init_test_initialization): Initialize class
7761         initialization check variable by looking at class' state.
7762
7763 2000-05-19  Tom Tromey  <tromey@cygnus.com>
7764
7765         * java-tree.h (build_instanceof): Declare.
7766         (build_get_class): Declare.
7767         * parse.y (patch_binop): Use build_instanceof.
7768         * expr.c (build_instanceof): New function.  If class is final,
7769         don't make a function call.
7770         (expand_java_INSTANCEOF): Use it.
7771         (build_get_class): New function.
7772
7773 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
7774
7775         * jcf-write.c (generate_classfile): Scan the source_file for
7776         slashes with the right pointer variable.
7777
7778 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
7779
7780         * lang.c (lang_decode_option): Update -Wunused flags by calling
7781         set_Wunused.
7782         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
7783
7784 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
7785
7786         * check_init.c (check_init): Constify local char *.
7787         * class.c (push_class): Constify local char *.
7788         * java_tree.h: Update prototypes.
7789         * jcf-io.c (open_class): Constify filename parameter and
7790         return value.
7791         (find_class): Remove redundant string copy.  Cast return from
7792         open_class.
7793         * jcf-parse.c (read_class, parse_class_file, yyparse):
7794         Constify local char *.
7795         * jcf-write.c (generate_bytecode_insns, generate_classfile):
7796         Constify local char *.
7797         * jcf.h (JCF): Constify filename and classname.
7798         (JCF_FINISH): Cast args to FREE to char * when appropriate.
7799         * lang.c (init_parse): Constify parameter and return value.
7800         * lex.c (java_get_line_col): Constify filename parameter.
7801         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
7802         * parse.y (java_parser_context_suspend,
7803         issue_warning_error_from_context, safe_layout_class): Constify
7804         local char *.
7805         * parse.c: Regenerate.
7806
7807 2000-05-08  Tom Tromey  <tromey@cygnus.com>
7808
7809         * expr.c (build_jni_stub): Cache the result of
7810         _Jv_LookupJNIMethod.
7811
7812 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7813
7814         * decl.c (predef_filenames_size): Now 7.
7815         (predef_filenames): New seventh entry.
7816
7817 2000-05-04  Tom Tromey  <tromey@cygnus.com>
7818
7819         * boehm.c (mark_reference_fields): Don't mark RawData fields.
7820         Keep track of when we've seen a reference field after a
7821         non-reference field.
7822         (get_boehm_type_descriptor): Handle case where we see
7823         non-reference fields but no trailing reference field.
7824         * decl.c (rawdata_ptr_type_node): Define.
7825         (init_decl_processing): Initialize rawdata_ptr_type_node.
7826         * java-tree.h (rawdata_ptr_type_node): Declare.
7827
7828 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7829
7830         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
7831         specifiers in calls to fprintf.
7832
7833 2000-05-03  Andrew Haley  <aph@cygnus.com>
7834
7835         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
7836
7837         * javaop.h (WORD_TO_INT): New function.
7838         (IMMEDIATE_s4): Use WORD_TO_INT.
7839         * jcf.h (JPOOL_INT): Ditto.
7840
7841         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
7842         separator.
7843
7844 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7845
7846         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
7847         on native function.
7848         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
7849         JNI methods.
7850         * expr.c (build_jni_stub): New function.
7851         * lang-specs.h: -fjni and -femit-class-file are incompatible.
7852         * parse.c: Rebuilt.
7853         * parse.y (java_complete_expand_methods): Expand a native method
7854         and call build_jni_stub if -fjni given.
7855         * lang-options.h: Document -fjni.
7856         * lang.c (flag_jni): New global.
7857         (lang_f_options): Added `jni' entry.
7858         * java-tree.h (soft_lookupjnimethod_node,
7859         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
7860         Declare.
7861         (flag_jni): Declare.
7862         (build_jni_stub): Declare.
7863         (struct lang_decl): Added `native' flag.
7864         (METHOD_NATIVE): Redefined to use `native' field of lang specific
7865         structure.
7866         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
7867         soft_jnipopsystemframe_node): New globals.
7868         (init_decl_processing): Set them.  _Jv_InitClass only takes one
7869         argument.
7870
7871         * java-tree.def: Put into `C' mode.
7872
7873 2000-04-27  Tom Tromey  <tromey@cygnus.com>
7874
7875         Fix for PR gcj/2:
7876         * expr.c (expand_invoke): Generate check to see if object pointer
7877         is null in nonvirtual invocation case.
7878         * java-tree.h (soft_nullpointer_node): Declare.
7879         * decl.c (soft_nullpointer_node): New global.
7880         (init_decl_processing): Initialize soft_nullpointer_node.
7881         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7882         or `private' methods.
7883         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7884
7885 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7886
7887         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
7888         from <clinit>
7889
7890 2000-04-26  Tom Tromey  <tromey@cygnus.com>
7891
7892         * zextract.c (find_zip_file_start): New function.
7893         (read_zip_archive): Use it.
7894
7895 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7896
7897         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
7898
7899 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7900
7901         * class.c (common_enclosing_context_p): New function.
7902         * java-tree.h (common_enclosing_context_p): Added prototype.
7903         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
7904         classes sharing an outer context with the current instance.
7905         * parse.y (build_access_to_thisn): Fixed leading comment.
7906         (verify_constructor_super): New local `supper_inner'. Skip
7907         enclosing context argument in the case of inner class constructors.
7908         (patch_method_invocation): Insert proper context as second
7909         parameter to pure inner class constructor super invocations.
7910
7911 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7912
7913         * parse.y (end_class_declaration): Reset the interface number
7914         counter.
7915
7916 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7917
7918         * parse.y (source_start_java_method): Deleted unnecessary code.
7919         (patch_method_invocation): Fixed comment.
7920
7921 2000-04-24  Robert Lipe <robertlipe@usa.net>
7922
7923         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
7924
7925 2000-04-23  Tom Tromey  <tromey@cygnus.com>
7926
7927         * boehm.c (mark_reference_fields): Use int_byte_position.
7928
7929 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7930
7931         * boehm.c (mark_reference_fields): Only call byte_position on
7932         non-static fields.
7933
7934 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7935
7936         * boehm.c (mark_reference_fields): Added `last_view_index'
7937         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
7938
7939 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
7940
7941         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
7942         * parse.y (check_class_interface_creation): Fixed comments. Select
7943         permitted modifiers for (inner) interfaces. Changed error message
7944         to report rejected modifiers used with local classes.
7945
7946 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7947
7948         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
7949         of directly inherited type considered in scope.
7950         * parse.y (do_resolve_class): Search inherited classes for inner
7951         classes.
7952
7953 2000-04-20  Tom Tromey  <tromey@cygnus.com>
7954
7955         * parse.y (not_accessible_p): Use member's class, not current
7956         class, when doing inheritance check for protected reference.
7957         Fixes PR gcj/124.
7958
7959 2000-04-20  Jason Schroeder  <shrode@subnature.com>
7960
7961         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
7962
7963 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7964
7965         * parse.y (lookup_field_wrapper): Search for final local aliases.
7966         (resolve_expression_name): Let lookup_field_wrapper search for
7967         final local aliases. Force the value of `name' if one is found.
7968         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
7969         an expression name. Fixed comments.
7970
7971 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7972
7973         * parse.y (yyerror): `msg' can be null, don't use it in that case.
7974
7975 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7976
7977         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
7978
7979 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7980
7981         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
7982
7983 2000-04-18  Tom Tromey  <tromey@cygnus.com>
7984
7985         PR gcj/211:
7986         * gjavah.c (utf8_cmp): Changed return value.
7987         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
7988         result.
7989         (cxx_keywords): New global.
7990         (get_field_name): Handle new result of cxx_keyword_subst.
7991         (print_method_info): Likewise.
7992
7993 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
7994
7995         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
7996         with a newline, for CNI.
7997         (print_stub_or_jni): Print a space or newline before method name for
7998         CNI as well as JNI.
7999         (print_cxx_classname): Don't write leading "::" in CNI stub method.
8000         (process_file): Include gcj/cni.h if generating CNI stubs.
8001
8002 2000-04-16  Tom Tromey  <tromey@cygnus.com>
8003
8004         * gjavah.c (decompile_method): Use print_field_name.
8005         Fixes PR gcj/205.
8006
8007 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8008
8009         * parse.y (java_expand_classes): Reverse the package list once.
8010         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8011         reduction.
8012         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8013         the `==' and `!=' operators.
8014
8015 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8016
8017         * jcf-write.c (generate_bytecode_insns): At invocation time,
8018         always relate an interface method to the type of its selector.
8019
8020 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8021
8022         Fix for PR gcj/2:
8023         * expr.c (expand_invoke): Generate check to see if object pointer
8024         is null in nonvirtual invocation case.
8025         * java-tree.h (soft_nullpointer_node): Declare.
8026         * decl.c (soft_nullpointer_node): New global.
8027         (init_decl_processing): Initialize soft_nullpointer_node.
8028         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8029         or `private' methods.
8030         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8031
8032 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8033
8034         Fix for PR gcj/140:
8035         * parse.y (check_final_assignment): Recognize assignments to the
8036         `length' field of an array when generating class files.
8037
8038 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8039
8040         * class.c (decl_hash): Prototype removed.
8041         (decl_compare): Likewise.
8042
8043 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8044
8045         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8046         * parse.y (check_modifiers_consistency): Check for final/volatile
8047         clash.  Fixes PR gcj/164.
8048
8049 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8050
8051         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8052         made global.
8053         (java_hash_compare_tree_node): Renamed from `decl_compare, made
8054         global.
8055         (add_method_1): Use `java_hash_hash_tree_node' and
8056         `java_hash_compare_tree_node'.
8057         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8058         (java_hash_compare_tree_node): Likewise.
8059         * parse.y (find_applicable_accessible_methods_list): Create,
8060         delete and use a hash table to remember already searched interfaces.
8061
8062 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
8063
8064         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8065         with latest entry.
8066
8067 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8068
8069         * boehm.c (mark_reference_fields, set_bit): Prototype.
8070         (set_bit): Un-ANSI-fy definition.
8071
8072         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8073         Prototype.
8074
8075         * decl.c (emit_init_test_initialization): Likewise.
8076
8077         * gjavah.c (jni_print_char): Likewise.
8078
8079         * parse.y (create_new_parser_context): Likewise.
8080
8081 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8082
8083         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8084         patch missing hunk. Fixed indentation.
8085
8086 2000-03-30  Tom Tromey  <tromey@cygnus.com>
8087
8088         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8089         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8090
8091 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8092
8093         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8094         when negative *before* using it as an array index.
8095         * ChangeLog: Fixed typo.
8096
8097 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8098
8099         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8100         to 0 when it reaches -1.
8101
8102 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8103
8104         * jcf-parse.c (get_constant): Properly cast `num' during the
8105         invocation of `add_double'.
8106         * jcf-write.c (push_long_const): Properly cast `lo' before
8107         comparing it to short bounds.
8108         * parse-scan.y (interface_declaration:): Rule re-arrange so that
8109         `interface_body:' is reduced after the current interface is
8110         pushed.
8111
8112 2000-03-26  Tom Tromey  <tromey@cygnus.com>
8113
8114         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8115         Java-specific `-f' option.
8116
8117 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8118
8119         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8120         Adjust order of making types.
8121         Make bitsize_*_node values.
8122
8123 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8124
8125         * class.c (make_field_value): Use byte_position.
8126         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8127         (java_array_data_offset): Likewise.
8128         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8129         bzero call.
8130
8131 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8132
8133         * parse.y (check_abstract_method_definitions): New local
8134         `end_type_reached'. Make sure we also consider `end_type'.
8135         (java_check_abstract_method_definitions): Make sure we eventually
8136         consider `java.lang.Object'.
8137         (maybe_use_access_method): Don't use access method if not in the
8138         context of a pure inner class or if the method's context is right.
8139         (find_applicable_accessible_methods_list): New static flag
8140         `object_done'. Don't search abstract classes as interfaces. Fixed
8141         indentation. Fixed the `java.lang.Object' only search. Search
8142         class interface(s) first, then fully search enclosing contexts.
8143         (find_most_specific_methods_list): Pick the closest candidate when
8144         they're all abstract.
8145
8146 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8147
8148         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8149         properly initialize `finished_label'. Don't emit gotos for empty
8150         try statements.
8151
8152 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8153
8154         * except.c (emit_handlers): Clear catch_clauses_last.
8155
8156 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8157
8158         * parse.y (check_method_types_complete): New function.
8159         (create_class): Reset anonymous class counter only when seeing an
8160         non inner classe.
8161         (java_complete_class): JDEP_METHOD: Don't recompute signature
8162         if incomplete.
8163
8164 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8165
8166         * class.c (build_static_ref): Fixed indentation in comment.
8167         * java-tree.def (TRY_EXPR): Fixed typo in name.
8168         (CLASS_LITERAL): Likewise.
8169         * java-tree.h: (TYPE_DOT_CLASS): New macro.
8170         (struct lang_type): New field `dot_class'.
8171         * jcf-write.c (generate_bytecode_insns): Fixed error message.
8172         (generate_classfile): Method `class$' is synthetic.
8173         * parse.y (build_do_class_method): New function.
8174         (build_dot_class_method_invocation): Likewise.
8175         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8176         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8177         (qualify_ambiguous_name): Likewise.
8178         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8179         (build_try_statement): Fixed leading comment.
8180
8181 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8182
8183         * class.c (make_field_value): Properly handle sizes.
8184         (get_dispatch_vector): Use tree_low_cst and host_integerp.
8185         (layout_class_method): Count using trees.
8186         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8187         * expr.c (java_array_data_offset): Use int_bit_position.
8188         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8189         (build_invokevirtual): Use tree_low_cst and do computations with trees.
8190
8191 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8192
8193         * lang.c (flag_hash_synchronization): New global.
8194         (lang_f_options): Added `hash-synchronization'.
8195         * lang-options.h: Mention -fhash-synchronization.
8196         * java-tree.h (flag_hash_synchronization): Declare.
8197         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8198         hash table synchronization is disabled.
8199         * decl.c (init_decl_processing): Only push `sync_info' value when
8200         hash table synchronization is disabled.
8201         * class.c (make_class_data): Only push `sync_info' field when hash
8202         table synchronization is disabled.  Removed dead code.
8203
8204 2000-03-16  Tom Tromey  <tromey@cygnus.com>
8205
8206         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8207
8208 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8209
8210         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8211         classes.
8212         * parse.y (patch_method_invocation): Handle anonymous classes
8213         creation in static context.
8214
8215 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8216
8217         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8218         * parse.y (resolve_qualified_expression_name): Use it.
8219         (patch_method_invocation): Likewise.
8220
8221 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8222
8223         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8224         depending on the type of dependency which dictates what the
8225         current class is.
8226         (unresolved_type_p): Resolved types limited to the current class.
8227
8228 2000-03-15  Tom Tromey  <tromey@cygnus.com>
8229
8230         * decl.c (init_decl_processing): Set type of `sync_info' to be
8231         pointer to Object.
8232
8233         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8234         Correctly compute bit number for current slot.  Zero `high' and
8235         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
8236         mark_reference_fields.
8237         (mark_reference_fields): New function.
8238
8239 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8240
8241         * parse.y (register_incomplete_type): Fixed initialization of
8242         JDEP_ENCLOSING.
8243
8244 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8245
8246         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8247         static globals.
8248         (push_class_context, pop_class_context): New function.
8249         (class_body:): Call pop_class_context.
8250         (interface_body:): Likewise.
8251         (INNER_QUALIFIER): New macro.
8252         (report_class_declaration): Changed output format and use
8253         INNER_QUALIFIER. Call push_class_context.
8254
8255 2000-02-14  Andrew Haley  <aph@cygnus.com>
8256
8257         * check-init.c (check_init): Add new cases for unary and binary
8258         tree nodes.
8259
8260 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8261
8262         * parse.y (resolve_package): Set `next' once a type name has been
8263         progressively discovered.
8264         (resolve_qualified_expression_name): Propagate resolution only if
8265         there are remaining qualifiers. Take into account `q' might have
8266         been cleared after re-qualification.
8267         * parse.y (patch_method_invocation): New local `resolved'.
8268         Section dealing with qualified expression rewritten to use
8269         resolve_field_access.
8270
8271 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8272
8273         * parse.h (PUSH_CPC): Fixed indentation.
8274         (DEBUG_CPC): New macro.
8275         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8276         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8277         * parse.y (class_body_declaration:): Use
8278         SET_CPC_INSTANCE_INITIALIZER_STMT.
8279         (method_declaration:): Check for null current_function_decl.
8280         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8281         (java_parser_context_pop_initialized_field): Better handling of
8282         empty lists.
8283         (maybe_make_nested_class_name): Mark nested class name as
8284         qualified when necessary.
8285         (end_class_declaration): Don't call java_parse_context_resume when
8286         one or more error occurred.
8287         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8288         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8289         SET_CPC_INITIALIZER_STMT.
8290         (method_header): Check for inner classes declaring static methods.
8291         (resolve_qualified_expression_name): Handle situation where `this'
8292         is implied.
8293
8294 2000-03-13  Hans Boehm <boehm@acm.org>
8295
8296         * typeck.c (build_prim_array_type): Correctly set the high word too.
8297
8298 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8299
8300         * parse.y (java_complete_expand_methods): Leave <clinit> out of
8301         ordinary methods.
8302         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8303         list of methods for interfaces.
8304
8305 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8306
8307         * parse.y (qualify_ambiguous_name): Properly handle expressions
8308         using `null'.
8309
8310 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8311
8312         * parse.y (check_final_assignment): Extended to process
8313         COMPOUND_EXPR.
8314         (patch_assignment): Have check_final_assignment called only once.
8315
8316 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8317
8318         * java-tree.h (IS_INIT_CHECKED): New flag.
8319         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8320         * parse.y (patch_string): Call force_evaluation_order on the
8321         completed string concatenation tree.
8322         * expr.c (force_evaluation_order): Call force_evaluation_order on
8323         function's arguments too.
8324
8325 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8326
8327         * decl.c (emit_init_test_initialization): Mark KEY as unused.
8328         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8329         (build_anewarray): Likewise.
8330         * parse.y (patch_newarray): Likewise.
8331         * parse.c: Regenerated.
8332
8333 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
8334
8335         * decl.c (init_decl_processing): Added new class fields `depth',
8336         `ancestors', and `idt' to class_type_node. Use
8337         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8338         * class.c (make_class_data): Push initial values for new fields.
8339         * java-tree.h: Updated prototype for `build_invokeinterface'.
8340         * expr.c (build_invokeinterface): Changed parameters to accept
8341         `method' tree. Calculate index of `method' in its declaring
8342         interface. Build call to _Jv_LookupInterfaceMethodIdx.
8343         (expand_invoke): Call `build_invokeinterface' with new parameters.
8344         * parse.y (patch_invoke): Call `build_invokeinterface' with new
8345         parameters.
8346
8347 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
8348
8349         * typeck.c (lookup_do): Search superinterfaces first
8350         when looking up an interface method. From Godmar Back
8351         <gback@cs.utah.edu>
8352
8353 2000-03-06  Tom Tromey  <tromey@cygnus.com>
8354
8355         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8356
8357 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8358
8359         * java-tree.h (lookup_argument_method2): Declared.
8360         (safe_layout_class): Prototype moved from parse.h.
8361         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8362         * parse.y (java_check_regular_methods): Local `super_class' gone.
8363         Call lookup_argument_method2 instead of lookup_argument_method.
8364         Perform modifier match for methods found declared in implemented
8365         interfaces. Fixed indentation problem. Overriding/hiding error
8366         report to take place only for methods found in classes.
8367         * typeck.c (lookup_argument_method): Changed leading
8368         comment. Re-written by calling lookup_do.
8369         (lookup_argument_method2): New function.
8370         (lookup_java_method): Re-written by calling lookup_do.
8371         (lookup_do): New function.
8372
8373 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8374
8375         * check-init.c (check_init): Removed dead code. Handle (blank)
8376         final variables.
8377         * parse.y (declare_local_variables): New local `final_p', set it
8378         and use it to initialize LOCAL_FINAL.
8379         (check_final_assignment): Only check FIELD_DECLs.
8380
8381 2000-02-17  Tom Tromey  <tromey@cygnus.com>
8382
8383         * Makefile.in (JAVA_OBJS): Added boehm.o.
8384         (boehm.o): New target.
8385         * Make-lang.in (JAVA_SRCS): Added boehm.c.
8386         * java-tree.h (flag_use_boehm_gc): Declare.
8387         (get_boehm_type_descriptor): Declare.
8388         * lang.c (lang_f_options): Added `use-boehm-gc'.
8389         (flag_use_boehm_gc): New global.
8390         * lang-options.h: Added -fuse-boehm-gc.
8391         * boehm.c: New file.
8392         * class.c (get_dispatch_table): If class uses a Boehm type
8393         descriptor, put it in the vtable.
8394         (make_class_data): Removed dead code.
8395
8396 2000-03-03  Per Bothner  <per@bothner.com>
8397
8398         * decl.c (init_decl_processing):  Initialize sizetype properly.
8399
8400 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8401
8402         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8403         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8404         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8405         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8406         (jcf_parse): New local `current'. Load innerclasses seen in outer
8407         context being processed.
8408         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8409         * jcf-write.c (append_innerclasses_attribute): New function.
8410         (append_innerclasses_attribute_entry): Likewise.
8411         (get_access_flags): Handle static classes. Set anonymous and local
8412         classes to be private.
8413         (generate_classfile): Attribute count adjusted. Call
8414         append_innerclasses_attribute.
8415         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8416         PURE_INNER_CLASS_TYPE_P.
8417         * parse.y (parser_qualified_classname): New parameter `is_static',
8418         produce non qualified name accordingly.
8419         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8420         (create_interface): Added argument to parser_qualified_classname.
8421         (create_class): Added argument to parser_qualified_classname. Setup
8422         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8423         (add_inner_class_fields): Fixed indentation.
8424         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8425         (method_declarator): Fixed typo in comment.
8426         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8427         (build_current_thisn): Likewise.
8428         (patch_method_invocation): Likewise.
8429
8430 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8431
8432         * decl.c (current_function_decl): Move to toplev.c.
8433
8434 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8435
8436         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8437         (DECL_BIT_INDEX): Use underlying representation.
8438         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8439
8440 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8441
8442         * expr.c (build_java_ret): Pass proper type to size_binop.
8443
8444 2000-02-25  Anthony Green  <green@cygnus.com>
8445
8446         * expr.c (build_class_init): Mark the decl to be ignored by
8447         check_init.
8448         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8449         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8450         * class.c (init_test_hash_newfunc): New function.
8451         (decl_hash): New function.
8452         (decl_compare): New function.
8453         * decl.c (emit_init_test_initialization): New function.
8454         (complete_start_java_method): Traverse the init test hashtable,
8455         calling emit_init_test_initialization.
8456         (always_initialize_class_p): Define.
8457         * expr.c (build_class_init): Use initialization tests when
8458         emitting class initialization code.
8459         (always_initialize_class_p): Declare.
8460         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8461         1.
8462         * java-tree.h: Include hash.h.
8463         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8464         (struct lang_decl): Add init_test_table field.
8465         (init_test_hash_entry): Define.
8466
8467 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8468
8469         * gjavah.c (main): Avoid using `argi' to report unimplemented
8470         options.
8471
8472 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8473
8474         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8475         initialize locals to avoid warnings. Local `exception_type' moved
8476         into if statement.
8477
8478 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8479
8480         * parse.y (resolve_expression_name): Use `orig' as a second
8481         argument to resolve_field_access.
8482         (resolve_field_access): Removed unnecessary code when dealing with
8483         static fields.
8484
8485 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8486
8487         * class.c (push_super_field): Don't push the field twice.
8488         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8489         * parse.h (java_reorder_fields): Prototyped.
8490         * parse.y (java_reorder_fields): New function.
8491         (java_layout_class): Simplified not to worry about re-ordering.
8492
8493 2000-02-23  Tom Tromey  <tromey@cygnus.com>
8494
8495         * gjavah.c (print_name): In JNI case, correctly quote string.
8496         (print_method_info): Don't handle overrides in JNI mode.
8497
8498 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8499
8500         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8501         value type set to `boolean_type_node'.
8502
8503 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8504
8505         * jcf-dump.c (main): Test for correct condition after
8506         output file creation.
8507
8508 2000-02-19  Anthony Green  <green@cygnus.com>
8509
8510         * jcf-depend.c (add_entry): Fix test for first list entry.
8511
8512 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8513
8514         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8515         * constants.c (build_constants_constructor): Likewise.
8516
8517 2000-02-19  Anthony Green  <green@cygnus.com>
8518
8519         * jcf-depend.c (add_entry): Add entries to the end of the list.
8520
8521 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
8522
8523         * decl.c (INT_TYPE_SIZE): Define if necessary.
8524         (expand_java_return): Handle the case of a native integer smaller
8525         than a JVM integer.
8526
8527 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8528
8529         * gjavah.c (help): Use GCCBUGURL.
8530         * jv-scan.c (help): Likewise.
8531         * jcf-dump.c (help): Likewise.
8532
8533 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8534
8535         * jcf-write.c (generate_bytecode_insns): Don't generate empty
8536         `finally' clauses.
8537
8538 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8539
8540         * jcf-parse.c (load_class): Call `fatal' if no file containing
8541         the target class are found.
8542
8543 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
8544
8545         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8546         lex.c, lex.h, and PARSE_H to...
8547         (parse.o, parse-scan.o): ...here, respectively.
8548
8549         * lex.c: Split out code that may trigger SIGFPE from yylex()
8550         to its own function.
8551         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8552
8553 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8554
8555         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8556
8557 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8558
8559         * parse.y (outer_field_access_p): Stop in time when outer contexts
8560         are exhausted.
8561         (resolve_qualified_expression_name): Properly qualify *everything*
8562         after a package.type to be resoled as expression names.
8563         (find_applicable_accessible_methods_list): Save/restore `class' to
8564         isolate it from a possible outer context search.
8565
8566 2000-02-15  Tom Tromey  <tromey@cygnus.com>
8567
8568         * gjavah.c (jni_print_char): New function.
8569         (print_full_cxx_name): Use it.
8570         (decode_signature_piece): Likewise.
8571         (print_cxx_classname): Likewise.
8572
8573 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8574
8575         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8576         version.o.
8577         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8578
8579         * gjavah.c: Include version.h.
8580
8581         * jcf-dump.c: Likewise.
8582
8583         * jv-scan.c: Likewise.
8584
8585 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8586
8587         * parse.y (outer_field_access_fix): First parameter now a tree
8588         node. Check for assignment to final. First argument to
8589         build_outer_field_access_fix modified to accommodate prototype.
8590         (build_outer_field_access): Don't check for assignment to final
8591         here.
8592         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8593         possibly returned by outer_field_access_fix. Changed
8594         outer_field_access_fix's first argument.
8595         (check_final_assignment): $finit$'s context is OK.
8596         (patch_unaryop): Use node instead of its line/column value when
8597         calling outer_field_access_fix.
8598
8599 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8600
8601         * parse.y (interface_declaration:): No longer tagged
8602         <node>. Re-installed default action.
8603         (class_member_declaration:): Handle inner interfaces.
8604         (interface_member_declaration): Handle inner interfaces and
8605         classes.
8606         (create_interface): Push error if one seen. Suspend parsing
8607         context when processing an inner interface.
8608         (register_fields): Inner class static field limitations not to
8609         apply to inner interfaces.
8610
8611 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8612
8613         * jcf-parse.c (load_class): Update `java_error_count' when a
8614         class' file can't be found.
8615         (parse.y): Avoid (byte)code generation when errors seen.
8616
8617 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8618
8619         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8620         decodes a valid node.
8621         (patch_binop): Handle TRUNC_DIV_EXPR.
8622
8623 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8624
8625         * parse.y (resolve_package): New local `acc'. Try to progressively
8626         build and guess a package and type name.
8627
8628 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8629
8630         * parse.y (find_applicable_accessible_methods_list): Load and
8631         layout the search class if necessary.
8632         (java_complete_tree): Keep to original type of the folded initial
8633         value.
8634
8635 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8636
8637         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
8638         Generate error message if circularity is detected. New static
8639         local `list'.
8640         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
8641         * jcf-write.c (generate_bytecode_insns): Very simply handle
8642         SAVE_EXPR.
8643         * parse.y (java_check_circular_reference): Use
8644         `cyclic_inheritance_report' during report, if necessary.
8645         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
8646         walking NEW_ARRAY_INIT twice.
8647
8648 2000-02-09  Tom Tromey  <tromey@cygnus.com>
8649
8650         * parse.y (check_class_interface_creation): Allow inner classes to
8651         be `private' or `protected', check modifiers' consistency. Prevent
8652         block local classes from bearing any modifiers.
8653
8654 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8655
8656         * except.c (check_start_handlers): Re-add prototype lost in last
8657         patch.
8658         (maybe_start_try): Remove excess argument to `check_start_handlers'.
8659
8660 2000-02-09  Andrew Haley  <aph@cygnus.com>
8661
8662         * decl.c (clear_binding_level): Remove excess initializer.
8663         (maybe_poplevels): Remove unused variable.
8664         (force_poplevels): Ditto.
8665         (struct binding_level): Add comment.
8666
8667 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8668
8669         * jcf-write.c (generate_classfile): Don't consider
8670         pre-initialization with reference value (use <clinit> instead.)
8671         * parse.y (java_fix_constructors): No generated constructor for
8672         interfaces.
8673         (build_outer_field_access): Removed debug message.
8674         (outer_field_expanded_access_p): Adapted to bytecode generation.
8675         (build_outer_field_access_method): Use fix_method_argument_names.
8676         (build_outer_method_access_method): Fixed indentation. Added
8677         comment. Handle access method generation for static and also void
8678         methods.
8679         (build_access_to_thisn): Inserted debug message.
8680         (maybe_build_thisn_access_method): Use fix_method_argument_names.
8681         (resolve_qualified_expression_name): Fixed comment.
8682         (not_accessible_p): Adapted to bytecode generation. Added comment.
8683         (patch_method_invocation): Added comment.
8684         (maybe_use_access_method): Fixed leading comment. Handle static
8685         methods.
8686         (java_complete_lhs): Don't shortcut handling of initialized upon
8687         declaration String type static fields when generating bytecode.
8688         (patch_unaryop): Handle outer field access when generating
8689         bytecode.
8690
8691 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8692
8693         * java-tree.h (FIELD_THISN): New macro.
8694         * jcf-write.c (append_synthetic_attribute): New function.
8695         (generate_classfile): Set "Synthetic" attribute on this$<n>,
8696         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
8697         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
8698         this$<n> fields.
8699         (build_outer_field_access): Turned on access functions usage and
8700         generation when compiling to bytecode.
8701         (maybe_use_access_method): Likewise.
8702
8703 2000-01-25  Andrew Haley  <aph@cygnus.com>
8704
8705         * java-except.h (struct eh_range): Add `expanded' field.
8706         (maybe_start_try): Add end_pc arg.
8707         (maybe_end_try): Ditto.
8708         * java-tree.h (force_poplevels): new function.
8709         * expr.c (expand_byte_code): Don't call maybe_start_try or
8710         maybe_end_try.
8711         * except.c (add_handler): Reset expanded.
8712         (expand_start_java_handler): Set expanded.
8713         (check_start_handlers): Don't expand a start handler that's
8714         already been expanded.
8715         (maybe_start_try): Add end_pc arg.  Only expand a handler which
8716         ends after end_pc.
8717         (expand_end_java_handler): call force_poplevels.
8718         (force_poplevels): new function.
8719         * decl.c (binding_level): Add start_pc of binding level.
8720         (maybe_pushlevels): Call maybe_start_try when pushing binding
8721         levels.
8722         (maybe_poplevels): Call maybe_end_try when popping binding levels.
8723         (LARGEST_PC): Define.
8724         (clear_binding_level): Use LARGEST_PC.
8725
8726         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
8727         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
8728         (binding_depth, is_class_level, current_pc): new variables.
8729         (struct binding_level): ditto.
8730         (indent): new function.
8731         (push_jvm_slot): add debugging info.
8732         (maybe_pushlevels): ditto.
8733         (maybe_poplevels): ditto.
8734         (pushlevel): ditto.
8735         (poplevel): ditto.
8736         (start_java_method): ditto.
8737         (give_name_to_locals): comment only.
8738         * except.c (binding_depth, is_class_level, current_pc):
8739         new variables.
8740         (expand_start_java_handler): add debugging info.
8741         (expand_end_java_handler): ditto.
8742
8743 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8744
8745         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
8746         (print_name_for_stub_or_jni, process_file): Constify a char*.
8747
8748 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8749
8750         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
8751
8752 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8753
8754         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
8755         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
8756         defined to be 1.
8757
8758 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8759
8760         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
8761         * java-tree.h (TYPE_II_STMT_LIST): New macro.
8762         (struct lang_type): New field `ii_block'.
8763         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
8764         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
8765         * parse.h (struct parser_ctxt): New field `instance_initializers'.
8766         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
8767         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
8768         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
8769         macros.
8770         * parse.y (add_instance_initializer): New function.
8771         (in_instance_initializer): New static global.
8772         (class_body_declaration:): Link instance initializer block.
8773         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
8774         (array_creation_expression:): Remove unused local.
8775         (java_parser_context_push_initialized_field): Fixed leading
8776         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
8777         CPC_INSTANCE_INITIALIZER_LIST.
8778         (java_parser_context_pop_initialized_field): Likewise.
8779         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
8780         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
8781         CPC_INITIALIZER_STMT.
8782         (fix_constructors): New local `class_type'. Use it. Call
8783         add_instance_initializer.
8784         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
8785         (patch_return): Forbid return in instance initializers.
8786         (patch_throw_statement): Enforce exception handling in the context
8787         of instance initializers.
8788
8789 2000-02-03  Tom Tromey  <tromey@cygnus.com>
8790
8791         * Make-lang.in (java.mostlyclean): Remove executables in
8792         `mostlyclean'.
8793
8794 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
8795
8796         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
8797         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
8798         (java_float_finite): Convert to use union Word from javaop.h.
8799         (java_double_finite): Convert to use union DWord from javaop.h.
8800
8801 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8802
8803         * gjavah.c (options): Added `jni' entry.
8804         (help): Document -jni.
8805         (flag_jni): New global.
8806         (process_file): Handle JNI output.  Don't print text from
8807         -prepend, -add, etc, when generating stubs.  Only remove `.class'
8808         suffix if it actually exists.
8809         (main): Create a `.c' file when run with `--jni --stubs'.  Create
8810         correct output file name with `--jni'.
8811         (print_include): Mangle header name differently in JNI case.
8812         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
8813         method list.
8814         (print_method_info): Handle JNI case.  Put signature info into
8815         method name.  Handle case when STREAM is NULL.
8816         (print_name_for_stub_or_jni): New function.
8817         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
8818         (print_cxx_classname): Handle JNI.
8819         (print_full_cxx_name): Likewise.
8820         (decode_signature_piece): Likewise.
8821         (overloaded_jni_method_exists_p): New function.
8822         (struct method_name): Added `signature' and `sig_length' fields.
8823         (HANDLE_END_FIELD): Do nothing in JNI mode.
8824
8825 2000-02-02  Tom Tromey  <tromey@cygnus.com>
8826
8827         * jv-scan.c: Include version.c, <getopt.h>.
8828         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
8829         (options): New array.
8830         (usage): New function.
8831         (version): New function.
8832         (main): Use getopt_long to parse command line.
8833         * jcf-dump.c: Include version.c, <getopt.h>.
8834         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
8835         OPT_JAVAP): New macros.
8836         (options): New array.
8837         (usage): Return `void'.  Changed message.
8838         (help): New function.
8839         (version): New function.
8840         (main): Use getopt_long_only to parse command line.
8841         * gjavah.c: Include <getopt.h>.
8842         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
8843         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
8844         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
8845         (options): New array.
8846         (java_no_argument): Removed.
8847         (help): Updated with missing options.
8848         (main): Use getopt_long_only to parse command line.
8849         (usage): Changed message.
8850
8851 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8852
8853         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
8854         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
8855         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
8856         * parse.y (array_creation_expression:): Handle anonymous arrays.
8857         (build_array_from_name): Don't set `ret_name' if null.
8858         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
8859         (qualify_ambiguous_name): Likewise.
8860         (java_complete_expand_class): Likewise.
8861
8862 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8863
8864         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
8865         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
8866         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
8867         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
8868         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
8869         AIPL_FUNCTION_COMPLETED_INVOCATION.
8870         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
8871         AIPL_FUNCTION_INVOCATION_READY.
8872         (AIPL_FUNCTION_DECLARATION): New enum entry.
8873         * parse.y (reorder_static_initialized): New function.
8874         (java_parser_context_pop_initialized_field): Use it.
8875         (add_inner_class_fields): Use
8876         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
8877         augmented. Install marker after last alias initializer, if any.
8878         (generate_finit): Fixed typo. Don't try to retain only the used
8879         fields.
8880         (method_header): Compute and set DECL_FUNCTION_NAP.
8881         (method_declarator): Fixed comment. Insert alias initializer in
8882         parameter list.
8883         (build_alias_initializer_parameter_list): Fixed leading
8884         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
8885         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
8886         (java_complete_expand_class): Code to retain only used aliases
8887         removed.
8888         (java_complete_expand_methods): New local `first_decl'. Generate
8889         $finit$ first, then expand the constructors, regular methods and
8890         <clinit>.
8891         (java_complete_expand_method): Don't report error on missing
8892         return statement if previously detected bogus.
8893         (fix_constructors): Don't patch constructor parameters list.
8894         (patch_method_invocation): Use new AIPL enum values. Reverse
8895         alias initializer list for anonymous classes.
8896
8897 2000-01-30  Anthony Green  <green@redhat.com>
8898
8899         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
8900         determine how many stack slots to pop.
8901
8902 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8903
8904         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
8905         error handling/recovery.
8906         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
8907
8908 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8909
8910         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
8911         FIELD_LOCAL_ALIAS_USED): New macros.
8912         (DECL_FUNCTION_NAP): New macro.
8913         (struct lang_decl): New field `nap'.
8914         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
8915         (struct lang_type): New fields `finit_stmt_list' and
8916         `clinit_stmt_list'.
8917         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
8918         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
8919         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
8920         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
8921         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
8922         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
8923         (BUILD_THROW): Macro line separator re-indented.
8924         * parse.y (end_class_declaration): New function.
8925         (maybe_generate_pre_expand_clinit): New name for
8926         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
8927         pre-expand static fields.
8928         (maybe_generate_clinit): Function deleted.
8929         (check_for_static_method_reference): Prototype's parameter list
8930         indented.
8931         (generate_finit): New name for maybe_generate_finit. Changed
8932         leading comment. Function rewritten to use
8933         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
8934         (build_alias_initializer_parameter_list): New function.
8935         (java_parser_context_pop_initialized_field): Likewise.
8936         (add_inner_class_fields): Likewise.
8937         (type_declaration:): Call end_class_declaration.
8938         (class_member_declaration:): Likewise.
8939         (formal_parameter_list:): Fixed typos.
8940         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
8941         element. Improved error handling.
8942         (block_statement:): Call end_class_declaration.
8943         (anonymous_class_creation:): Likewise.
8944         (create_anonymous_class): Fixed comments.
8945         (create_class): Call add_inner_class_fields.
8946         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
8947         (method_header): Use MARK_FINAL_PARMS.
8948         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
8949         (method_declarator): Propagate final argument flag.
8950         (craft_constructor): New local `artificial'. Call
8951         build_alias_initializer_parameter_list. Use
8952         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
8953         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
8954         necessary.
8955         (complete_expand_class): Get rid of unused outer context local
8956         alias fields.
8957         (java_complete_expand_methods): Fixed leading
8958         comment. Generate/pre-expand <clinit> first. Changed method
8959         expansion order to regular, $finit$, constructors, <clinit>.
8960         (java_complete_expand_method): Set current_function_decl.
8961         (fix_constructors): Fix constructor parameter list to account for
8962         outer context local alias initializers.
8963         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8964         (resolve_expression_name): Lookup outer context local aliases. New
8965         local `access', use it.
8966         (patch_method_invocation): Patch inner class ctor invocation with
8967         outer context local aliases initialization values. $finit$
8968         invocation patching now includes things generated with
8969         build_alias_initializer_parameter_list.
8970         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8971         (build_super_invocation): Likewise.
8972         (patch_assignment): Changed comment.
8973
8974 2000-01-27  Andrew Haley  <aph@cygnus.com>
8975
8976         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
8977         (emit_if): Ditto.
8978         (emit_jsr): Ditto.
8979
8980 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8981
8982         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
8983         concatenation.
8984         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
8985
8986         * parse.y (register_fields): Don't pass a format specifier to
8987         OBSOLETE_MODIFIER_WARNING.
8988         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
8989         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
8990         specifier.
8991         (check_modifiers): Change function into a macro.
8992         (check_class_interface_creation): Pass a literal format string.
8993
8994 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8995
8996         * buffer.h: PROTO -> PARAMS.
8997         * check-init.c: Likewise.
8998         * class.c: Likewise.
8999         * constants.c: Likewise.
9000         * convert.h: Likewise.
9001         * decl.c: Likewise.
9002         * except.c: Likewise.
9003         * expr.c: Likewise.
9004         * gjavah.c: Likewise.
9005         * java-except.h: Likewise.
9006         * java-tree.h: Likewise.
9007         * jcf-depend.c: Likewise.
9008         * jcf-dump.c: Likewise.
9009         * jcf-parse.c: Likewise.
9010         * jcf-path.c: Likewise.
9011         * jcf-reader.c: Likewise.
9012         * jcf-write.c: Likewise.
9013         * jcf.h: Likewise.
9014         * jv-scan.c: Likewise.
9015         * jvgenmain.c: Likewise.
9016         * jvspec.c: Likewise.
9017         * lang.c: Likewise.
9018         * lex.c: Likewise.
9019         * lex.h: Likewise.
9020         * parse-scan.y: Likewise.
9021         * parse.h: Likewise.
9022         * parse.y: Likewise.
9023         * typeck.c: Likewise.
9024         * verify.c: Likewise.
9025         * xref.c: Likewise.
9026         * xref.h: Likewise.
9027         * zextract.c: Likewise.
9028         * zipfile.h: Likewise.
9029
9030 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9031
9032         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9033         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9034         * constants.c (build_constant_data_ref): Check for cached
9035         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9036         in TYPE_CPOOL_DATE_REF.
9037         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9038         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9039         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9040         (LOCAL_FINAL): New macro.
9041         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9042         constant pool -- don't try to reuse.
9043         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9044         TYPE_LANG_SPECIFIC.
9045         (find_in_current_zip): Use TYPE_JCF.
9046         * parse.h (java_check_final): Prototype removed.
9047         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9048         (maybe_create_class_interface_decl,
9049         check_class_interface_creation): Likewise.
9050         (java_expand_finals): Function removed.
9051         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9052         (block_statement:): Fixed comment.
9053         (anonymous_class_creation:): Likewise.
9054         (check_class_interface_creation): Reversed Jan 12, 2000 extra
9055         argument patch.
9056         (check_class_interface_creation): Loosened error report on (inner)
9057         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9058         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9059         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9060         argument patch.
9061         (create_interface): Likewise.
9062         (anonymous_class_counter): New static global.
9063         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9064         patch. Fixed comments.
9065         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9066         anonymous_class_counter when declaring a toplevel class.
9067         (craft_constructor): Fixed constructor name when handling
9068         anonymous classes. Anonymous class constructors to feature hidden
9069         this$<n> parameter.
9070         (java_fix_constructors): Added comment.
9071         (java_check_final): Function removed.
9072         (java_complete_expand_methods): Fixed comment. Don't generate
9073         class data, save its outgoing constant pool instead.
9074         (verify_constructor_super): Skip anonymous class constructor
9075         hidden this$<n> parameter.
9076         (java_expand_classes): New local `saved_ctxp'. Removed call to
9077         java_expand_finals and java_check_final. Expand anonymous class
9078         constructors. Generate class data.
9079         (build_super_invocation): Skip anonymous class hidden this$<n>
9080         parameter.
9081         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9082         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9083         (set_java_signature): Likewise.
9084
9085 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9086
9087         * gjavah.c: Delete ACC_VISIBILITY define.
9088         * jcf.h: Add ACC_VISIBILITY define.
9089         * parse.y: final: rule tagged <value>.
9090         (java_check_regular_methods): Use ACC_VISIBILITY define for
9091         default package access check.
9092         (local_variable_declaration_statement): Use final: rule.
9093
9094 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9095
9096         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9097         (final:): New rule.
9098
9099 2000-01-17  Tom Tromey  <tromey@cygnus.com>
9100
9101         * gjavah.c (print_field_info): Allow non-static final fields.
9102
9103 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9104
9105         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9106         * parse.y (patch_anonymous_class): New function.
9107         (create_anonymous_class): Register incomplete type when the
9108         class/interface to extends/implement isn't known yet.
9109         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9110         (verify_constructor_super): Tuned error message.
9111
9112 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9113
9114         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9115         (ANONYMOUS_CLASS_P): New macro.
9116         (TYPE_SIGNATURE, TYPE_JCF): New macros.
9117         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9118         * parse.y (create_class): Added leading argument.
9119         (maybe_create_class_interface_decl,
9120         check_class_interface_creation): Likewise.
9121         (craft_constructor): New function.
9122         (verify_constructor_super): Added argument in prototype.
9123         (class_declaration:): Inserted leading argument.
9124         (for_begin:): Use FOR_LOOP_P.
9125         (anonymous_class_creation): Create WFL of the anonymous class to
9126         instantiate. Call build_new_invocation. Added comments.
9127         (check_class_interface_creation): Handle parameter `anonymous' in
9128         verbose mode class creation announce.
9129         (link_nested_class_to_enclosing): Exclude anonymous classes.
9130         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9131         anonymous class, even though they appear to have an enclosing
9132         context.
9133         (create_interface): Pass extra argument to
9134         check_class_interface_creation.
9135         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9136         (create_class): Call check_class_interface_creation and
9137         maybe_create_class_interface_decl with extra new argument. Don't
9138         add private this$<n> to anonymous classes.
9139         (method_declarator): Insert hidden this$<n> to anonymous class
9140         constructors.
9141         (java_fix_constructors): Deleted code creating default
9142         constructor. Call craft_constructor instead.
9143         (java_check_regular_methods): Set `saw_constructor' to 1 for
9144         anonymous classes.
9145         (fix_constructors): Pass extra argument to verify_constructor_super.
9146         (verify_constructor_super): New local `sdecl', use it. Search for
9147         matching constructor (possibly featuring arguments) in super
9148         class.
9149         (lookup_method_invoke): Craft constructor according to arguments
9150         list when dealing with anonymous class constructors.
9151         (build_super_invocation): Pass arguments to anonymous class super
9152         constructors.
9153         (search_loop): Use FOR_LOOP_P.
9154         (labeled_block_contains_loop_p): Likewise.
9155
9156 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9157
9158         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9159         (enclosing_context_p): New function.
9160         (get_access_flags_from_decl): Handle CLASS_STATIC.
9161         (maybe_layout_super_class): Extra first argument passed to
9162         do_resolve_class.
9163         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9164         ID_INIT_P.
9165         * decl.c (access0_identifier_node): New global.
9166         (init_decl_processing): access0_identifier_node initialized.
9167         (pushdecl): Set DECL_CONTEXT only on non type decls.
9168         * expr.c (lookup_field): Lookup inner class fields in enclosing
9169         contexts.
9170         (expand_invoke): Use ID_INIT_P.
9171         (expand_java_field_op): Use DECL_CLINIT_P.
9172         * java-tree.def (CLASS_LITERAL): New tree code.
9173         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9174         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9175         (struct lang_decl): New field `inner_access'.
9176         (enclosing_context_p): Prototyped.
9177         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9178         ID_CLINIT_P): New macros.
9179         (CLASS_STATIC): New macro.
9180         (CLASS_ACCESS0_GENERATED_P): New macro.
9181         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9182         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9183         INNER_CLASS_P): New macros.
9184         (DECL_INNER_CLASS_LIST): New macro.
9185         * jcf-parse.c (yyparse): Avoid the use of ANSI string
9186         concatenation.
9187         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9188         the shift value to int. Fixed typo in comment.
9189         * lex.c (inst_id, wpv_id): Initialize.
9190         * mangle.c (unicode_mangling_length): Take `$' into account.
9191         * parse.h (DRECOVER, RECOVER): Terminate properly.
9192         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9193         (typedef struct _jdep): New field `enclosing'.
9194         (JDEP_ENCLOSING): New macro.
9195         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9196         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9197         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9198         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9199         GET_ENCLOSING_CPC_CONTEXT): New macros.
9200         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9201         (do_resolve_class): Added extra argument in prototype.
9202         * parse.y (resolve_class): Added extra argument in prototype.
9203         (maybe_create_class_interface_decl): Likewise.
9204         (maybe_use_access_method, build_wfl_wrap): New functions.
9205         (java_complete_expand_classes, java_complete_expand_class):
9206         Likewise.
9207         (java_parser_context_push_initialized_field,
9208         java_parser_context_suspend, java_parser_context_resume):
9209         Likewise.
9210         (maybe_make_nested_class_name, make_nested_class_name,
9211         set_nested_class_simple_name_value,
9212         link_nested_class_to_enclosing, find_as_inner_class,
9213         find_as_inner_class_do, check_inner_class_redefinition,
9214         build_thisn_assign, build_current_thisn, build_access_to_thisn,
9215         maybe_build_thisn_access_method, build_outer_field_access,
9216         build_outer_field_access_methods, build_outer_field_access_expr,
9217         build_outer_method_access_method, build_new_access_id,
9218         build_outer_field_access_method, outer_field_access_p,
9219         outer_field_expanded_access_p, outer_field_access_fix,
9220         build_incomplete_class_ref, patch_incomplete_class_ref,
9221         create_anonymous_class): Likewise.
9222         (inst_id, wpv_id): New static global variables.
9223         (synchronized:): New rule, tagged <node>.
9224         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9225         rules.
9226         (anonymous_class_creation:): New rule, tagged <node>.
9227         (NEW_TK): Tagged <node>.
9228         (type_literals, array_type_literal): New rules, tagged <node>.
9229         (class_declaration:): Removed action when reducing by class_body:
9230         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9231         using GET_CPC in sub-rules.
9232         (class_member_declaration): Handle inner classes.
9233         (method_declaration): When reducing method_header:, reset
9234         current_function_decl when appropriate.
9235         (method_declarator:): Set the number of formal parameter to 0 for
9236         method declared without arguments.
9237         (constructor_declarator:): Likewise.
9238         (static_initializer:): List of elements kept in a list.
9239         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9240         use of the keyword `static' for type declarations.
9241         (block_statement:): Handle inner class declarations.
9242         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9243         type qualified `this'.
9244         (class_instance_creation_expression): Use anonymous_class_creation:
9245         to handle inner class instances creation. Handle qualified `new'.
9246         (something_dot_new): Added appropriate actions.
9247         (create_new_parser_context): New function.
9248         (java_push_parser_context, java_parser_context_save_global,
9249         java_parser_context_suspend): Use create_new_parser_context.
9250         (check_modifiers): Changed leading comment.
9251         (check_class_interface_creation): Handle interclasses.
9252         (add_superinterfaces): Fixed comment.
9253         (create_interface): Build qualified name from the raw_name instead
9254         of its matching WFL. Push the initialized fields list. raw_name added
9255         as an extra argument to maybe_create_class_interface_decl.
9256         (create_class): Build qualified name from the raw_name instead of
9257         its matching WFL. Removed assignment to current_parsed_class_un.
9258         Call PUSH_ERROR before returning an error. Suspend the current
9259         parser context when processing an inner class. Push the
9260         initialized fields list. raw_name added as an extra argument to
9261         maybe_create_class_interface_decl. Add the private this$<n>
9262         field.
9263         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9264         (register_fields): Get the class type from GET_CPC and handle
9265         previous errors.  Added code to handle the creation of static
9266         fields in inner classes. Initialized fields initialization
9267         statements kept in a list of lists.
9268         (maybe_generate_finit): Initialized fields initialization
9269         statements kept in a list of lists. Use GET_CPC.
9270         (maybe_generate_clinit): Likewise.
9271         (method_header): Use GET_CPC and GET_CPC_UN.
9272         (parser_qualified_classname): Handle inner classes.
9273         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9274         (java_fix_constructors): Hide pointer to enclosing context
9275         instance in constructor list when dealing with inner classes.
9276         (jdep_resolve_class): Call resolve_class with extra first argument
9277         JDEP_ENCLOSING.
9278         (resolve_class): Add enclosing context as a first extra argument
9279         to do_resolve_class.
9280         (do_resolve_class): Call find_as_inner_class. Handle WFLs
9281         properly.
9282         (resolve_no_layout): Extra argument added to resolve_class
9283         invocation.
9284         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9285         (java_get_real_method_name): Use GET_CPC_UN.
9286         (check_abstract_method_definitions): Use DECL_CLINIT_P.
9287         (java_check_abstract_methods): Handle static method declared in
9288         inner classes by an error.
9289         (java_check_regular_methods): Use DECL_CLINIT_P.
9290         (source_start_java_method): Also set DECL_MAX_LOCALS.
9291         (create_artificial_method): Call java_parser_context_save_global
9292         and java_parser_context_restore_global instead of saving/restoring
9293         the context by hand.
9294         (expand_start_java_method): Improved verbose mode message.
9295         (java_complete_expand_methods): Fixed leading comment. Use
9296         DECL_CLINIT_P.
9297         (fix_constructors): Added assignment to this$<n> if necessary.
9298         (java_expand_classes): Call java_complete_expand_classes instead
9299         of java_complete_expand_methods.
9300         (make_qualified_primary): Simplified.
9301         (merge_qualified_name): Optimized for missing left or right parts.
9302         (resolve_expression_name): Handle access to outer class fields from
9303         interclasses.
9304         (resolve_qualified_expression_name): New macro
9305         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9306         classes. Report error on non appropriate qualification of
9307         `new'. Handle qualified `this'.
9308         (not_accessible_p): Allow access to outer class private fields from
9309         inner classes.
9310         (patch_method_invocation): Handle method invocations through
9311         access methods and inner class constructor invocations.
9312         (find_applicable_accessible_methods_list): Search enclosing
9313         contexts of an inner class.
9314         (search_applicable_methods_list): Fixed typo.
9315         (argument_types_convertible): Handle inner class constructors'
9316         hidden outer context reference argument.
9317         (qualify_ambiguous_name): Handle qualified `this'.
9318         (java_complete_lhs): Handle use of field accessed through
9319         artificial access methods in various cases of assignments. Handle
9320         CLASS_LITERAL node.
9321         (check_final_assignment): Use DECL_CLINIT_P.
9322         (valid_ref_assignconv_cast_p): Handle the destination being an
9323         enclosing context of the source.
9324         (patch_unaryop): Handle use of field accessed through artificial
9325         access methods.
9326         (patch_return): Use DECL_CLINIT_P.
9327         (patch_throw_statement): Use DECL_CLINIT_P.
9328         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9329         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9330         ID_INIT_P.
9331
9332 2000-01-16  Anthony Green  <green@cygnus.com>
9333
9334         * parse.y (build_string_concatenation): Only use
9335         StringBuffer(String) shortcut if String arg is constant.
9336
9337 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9338
9339         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9340         the shift value to int. Fixed typo in comment.
9341
9342 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9343
9344         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9345         * jcf-write.c: Likewise.
9346         * parse.y: Likewise.
9347         * parse.c: Regenerate.
9348
9349 2000-01-09  Anthony Green  <green@cygnus.com>
9350
9351         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9352         bytecodes in the correct order.
9353
9354 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9355
9356         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9357
9358 2000-01-06  Anthony Green  <green@cygnus.com>
9359
9360         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9361         before building constant array decl.
9362
9363 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9364
9365         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9366         method invocation and typo in conditional expression.
9367         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9368         the appropriate NOTE_POP.
9369         * parse.y (patch_binop): Shift value mask to feature the right
9370         type.
9371
9372 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9373
9374         * class.c (assume_compiled, assume_compiled_node): Add static
9375         prototype.
9376         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9377
9378         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9379
9380         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9381
9382         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9383         to `__modifier' to avoid stringifying it.
9384
9385         * parse.y (verify_constructor_circularity): Don't call a variadic
9386         function with a non-literal format string.
9387         (java_check_abstract_methods): Move unreachable code inside
9388         `continue' statement.
9389         (lookup_method_invoke): Call xstrdup, not strdup.
9390
9391         * expr.c (expand_java_field_op): Avoid the use of ANSI string
9392         concatenation.
9393
9394         * jcf-parse.c (yyparse): Likewise.
9395
9396         * jv-scan.c (main): Likewise.
9397
9398 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9399
9400         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9401         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9402         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9403         concatenation.
9404
9405         * parse.y (synchronized, variable_redefinition_error,
9406         check_class_interface_creation, create_interface, create_class,
9407         method_header, finish_method_declaration,
9408         check_modifiers_consistency, method_declarator,
9409         complete_class_report_errors, check_abstract_method_definitions,
9410         java_check_regular_methods, check_throws_clauses,
9411         java_check_abstract_methods, read_import_dir,
9412         check_pkg_class_access, declare_local_variables, fix_constructors,
9413         cut_identifier_in_qualified, resolve_expression_name,
9414         resolve_qualified_expression_name, patch_method_invocation,
9415         java_complete_lhs, patch_assignment, try_builtin_assignconv,
9416         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9417         patch_exit_expr, patch_exit_expr, patch_switch_statement,
9418         patch_try_statement, patch_synchronized_statement,
9419         patch_throw_statement, check_thrown_exceptions,
9420         patch_conditional_expr): Likewise.
9421
9422 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9423
9424         * Makefile.in (LIBDEPS): Added gcc's errors.o
9425         (../jcf-dump$(exeext):): Link with gcc's errors.o
9426         (../gcjh$(exeext):): Likewise.
9427         * expr.c (expand_java_NEW): Layout the entire target type instead of
9428         laying out its methods only.
9429         (lookup_field): Layout the class after having loaded it.
9430         * java-tree.h (java_debug_context): Declared.
9431         * jcf-io.c (toplev.h): Included.
9432         (find_class): Removed assignment to jcf's outofsynch
9433         field. Force source file to be read if newer than its matching
9434         class file. Tweaked debug messages.
9435         * jcf-parse.c (jcf_out_of_synch): Deleted.
9436         (read_class): Call to jcf_out_of_synch removed.
9437         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9438         (jcf_out_of_synch): Prototype deleted.
9439         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9440         `deprecated' and `class_err': integer turned into bit-fields.
9441         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9442         * parse.y (package_list): New global.
9443         (package_declaration:): Record newly parsed package name.
9444         (extra_ctxp_pushed_p): Static global deleted.
9445         (java_parser_context_save_global): Create buffer context for the
9446         purpose of saving globals, if necessary.
9447         (java_parser_context_restore_global): Pop context pushed for the
9448         purpose of saving globals, if necessary.
9449         (java_debug_context_do): New prototype and function.
9450         (java_debug_context): Likewise.
9451         (do_resolve_class): Use already parsed package names to qualify
9452         and lookup class candidate.
9453         (java_pre_expand_clinit): Removed unnecessary local variable.
9454
9455 1999-12-17  Tom Tromey  <tromey@cygnus.com>
9456
9457         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
9458         fixes PR gcj/119.
9459         (process_file): Use `\n\' at end of each line in string.
9460
9461 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9462
9463         * expr.c (expand_invoke): Layout the loaded class before
9464         attempting to use it.
9465         (expand_java_field_op): Allow final field assignments to take
9466         place in $finit$.
9467         * typeck.c (convert): Return error_mark_node if expr is null.
9468
9469 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9470
9471         * class.c (class_depth): Return -1 if the class doesn't load
9472         properly.
9473         * expr.c (can_widen_reference_to): Check for errors during depth
9474         computation and return 0 accordingly.
9475         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9476         create default constructors and add an other error check.
9477         * parse.h (java_fix_constructors): Prototyped.
9478         * parse.y (java_pre_expand_clinit): Likewise.
9479         (build_super_invocation): Re-prototyped to feature one argument.
9480         (java_check_circular_reference): Directly use `current'.
9481         (java_fix_constructors): New function.
9482         (java_check_regular_methods): Don't create default constructors
9483         here, but abort if none were found.
9484         (java_complete_expand_methods): Pre-process <clinit> calling
9485         java_pre_expand_clinit.
9486         (java_pre_expand_clinit): New function.
9487         (fix_constructors): build_super_invocation invoked with the
9488         current method declaration as an argument.
9489         (build_super_invocation): Use the context of the processed method
9490         decl argument instead of current_class.
9491         * typeck.c (lookup_java_method): Take WFLs in method names into
9492         account.
9493
9494 1999-12-14  Per Bothner  <per@bothner.com>
9495
9496         * class.c (make_class_data): flag_keep_inline_functions to keep
9497         private methods in the method array.
9498
9499 1999-12-15  Anthony Green  <green@cygnus.com>
9500
9501         * check-init.c (check_init): Take into account both types of
9502         `throw's when checking for uninitialized variables.
9503
9504 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9505
9506         * parse.y (java_complete_lhs): Force conversion of array
9507         dimensions to int_type_node, that's what runtime's ABI expects.
9508
9509 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9510
9511         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9512         operand of a WFL, until the Java front-end gets fixed with regard
9513         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9514
9515 1999-12-10  Andrew Haley  <aph@cygnus.com>
9516
9517         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9518         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9519         expr.c (build_java_athrow): Add support for sjlj-exceptions.
9520         java-tree.h: Ditto.
9521         jcf-write.c: Ditto.
9522
9523 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9524
9525         * expr.c (java_lang_expand_expr): Switch to permanent obstack
9526         before calling expand_eh_region_start and expand_start_all_catch.
9527         * except.c (expand_start_java_handler): Switch to permanent
9528         obstack before calling expand_eh_region_start.
9529         (expand_end_java_handler): Switch to permanent obstack before
9530         calling expand_start_all_catch.
9531
9532 1999-12-5  Anthony Green  <green@cygnus.com>
9533
9534         * decl.c (init_decl_processing): Mark throw_node as a noreturn
9535         function with side effects.
9536         (init_decl_processing): Mark all memory allocating DECLs with
9537         DECL_IS_MALLOC.
9538
9539 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9540
9541         * except.c (expand_end_java_handler): Call
9542         expand_resume_after_catch and end_catch_handler.
9543
9544 1999-11-30  Anthony Green  <green@cygnus.com>
9545
9546         * verify.c (verify_jvm_instructions): Create new return label
9547         chain if non existent (don't rely on the verified state of the jsr
9548         target.)
9549
9550 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9551
9552         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9553         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9554
9555         * parse.y (patch_assignment): Removed bogus final class test on
9556         lhs when checking on whether to emit an ArrayStoreException runtime
9557         check.
9558         * expr.c (expand_java_arraystore): Likewise.
9559
9560 1999-11-28 Anthony Green <green@cygnus.com>
9561
9562         * decl.c (find_local_variable): Reuse single slot decls when
9563           appropriate.
9564
9565 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9566
9567         * jcf-parse.c (saw_java_source): Global variable removed.
9568         (read_class): Don't use `saw_java_source'. Added extra braces.
9569         (yyparse): Code setting `saw_java_source' removed.
9570
9571 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
9572
9573         * except.c (emit_handlers): Zero catch_clauses after emitting them.
9574
9575 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9576
9577         * verify.c (merge_type_state): Non verified subroutines being
9578         considered more than once to trigger passive type merge.
9579
9580 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9581
9582         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9583         in case of error. Error message tuned.
9584
9585 1999-11-21  Anthony Green  <green@cygnus.com>
9586
9587         * constants.c (find_methodref_index): Unwrap method names before
9588         inserting them in the constant pool.
9589
9590         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9591
9592         * class.c (assume_compiled_node): New typedef.
9593         (assume_compiled_tree): New static data.
9594         (find_assume_compiled_node): New function.
9595         (add_assume_compiled): New function.
9596         (assume_compiled): New function.
9597         * class.c (make_class_data): Use assume_compiled.
9598         (is_compiled_class): Use assume_compiled.
9599
9600         * java-tree.h (add_assume_compiled): Declare.
9601
9602         * lang.c (lang_decode_option): Parse new options.
9603
9604 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9605
9606         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9607         int_type_node: that's what `_Jv_AllocObject' expects.
9608
9609 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9610
9611         * parse.y (lookup_method_invoke): Use lang_printable_name to
9612         reliably build the type name during error report. Fixes PR gcj/97.
9613
9614 1999-11-09  Tom Tromey  <tromey@cygnus.com>
9615
9616         * jcf-path.c: Include <sys/stat.h>.
9617         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
9618         (DIR_UP): New macro.
9619
9620 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9621
9622         * parse.y (source_end_java_method): Resume permanent allocation,
9623         reversing Apr 27 1998 patch.
9624         (patch_string_cst): Pop obstacks after having pushed the permanent
9625         ones.
9626
9627 1999-11-05  Tom Tromey  <tromey@cygnus.com>
9628
9629         * class.c (finish_class): Emit inlined methods if any native
9630         methods exist in the class.  Fixes PR gcj/85.
9631
9632 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9633
9634         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
9635         (qualify_ambiguous_name): Likewise.
9636
9637 1999-11-03  Godmar Back <gback@cs.utah.edu>
9638
9639         * typeck.c: (lookup_java_method):  search all inherited
9640         interfaces when looking up interface method.
9641
9642 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9643
9644         * parse.y (method_header:): Issue error message for rule `type
9645         error'.
9646         (synchronized:): Error report when not using synchronized.
9647
9648 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9649
9650         * parse.y (resolve_qualified_expression_name): Prevent `this' from
9651         being used before the superclass constructor has been called.
9652         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
9653         instead of `CALL_THIS_CONSTRUCTOR_P'.
9654
9655 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
9656
9657         * check-init.c: Fix typo in comment.
9658
9659 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9660
9661         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
9662         and final method.
9663
9664 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9665
9666         * parse.y (expression_statement:): Call function to report
9667         improper invocation of a constructor.
9668         (parse_ctor_invocation_error): New function.
9669
9670 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
9671
9672         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
9673         remember_end_note.
9674
9675 1999-10-21  Tom Tromey  <tromey@cygnus.com>
9676
9677         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
9678         in generated `main'.
9679
9680 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9681
9682         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
9683         (qualify_ambiguous_name): Likewise.
9684
9685 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9686
9687         * parse.y (java_complete_tree): fold_constant_for_init to work on
9688         permanent_obstack.
9689         (java_complete_lhs): Likewise.
9690         (array_constructor_check_entry): Complete an initializer element
9691         on permanent_obstack.
9692
9693 1999-10-19  Tom Tromey  <tromey@cygnus.com>
9694
9695         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
9696         From Mike Moreton <mike@pillim.demon.co.uk>.
9697
9698 1999-10-15  Greg McGary  <gkm@gnu.org>
9699
9700         * java-tree.h (flag_bounds_check): Remove extern decl.
9701         * lang.c (flag_bounds_check): Remove global variable.
9702         (lang_f_options): Remove "bounds-check" entry.
9703         (lang_init_options): Default flag_bounds_check to "on".
9704
9705 1999-10-14  Tom Tromey  <tromey@cygnus.com>
9706
9707         * jvgenmain.c (usage): New function.
9708         (main): Use it.  Also, handle `-D' options.
9709         * jvspec.c (lang_specific_driver): Recognize -D.
9710         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
9711
9712         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
9713
9714 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9715
9716         * jcf-dump.c (print_constant, disassemble_method): Don't call a
9717         variadic function with a non-literal format string.
9718
9719         * parse-scan.y (report_main_declaration): Likewise.
9720
9721         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
9722
9723         * parse.y (read_import_dir, patch_assignment, patch_binop,
9724         patch_array_ref): Likewise.
9725
9726         * typeck.c (build_java_array_type): Likewise.
9727
9728         * verify.c (verify_jvm_instructions): Likewise.
9729
9730 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9731
9732         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
9733
9734 1999-10-07  Anthony Green  <green@cygnus.com>
9735
9736         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
9737         where CHECK_PUT may fail for valid reasons.
9738
9739         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
9740         UNSAFE_PUTN): New macros.
9741
9742 1999-10-04  Tom Tromey  <tromey@cygnus.com>
9743
9744         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
9745         well.  Fixes Java PR gcj/59.
9746         * parse-scan.y (yyerror): Report errors.
9747
9748 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
9749
9750         * decl.c (insert_block): Remove unconditional `abort'.
9751
9752 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
9753
9754         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
9755         FUNCTION_CODE now of type int.  All callers changed.
9756         Set the builtin's DECL_BUILT_IN_CLASS.
9757
9758 1999-09-23  Tom Tromey  <tromey@cygnus.com>
9759
9760         * jvspec.c (lang_specific_driver): Don't read spec file if
9761         -fsyntax-only given.
9762
9763 1999-09-22  Tom Tromey  <tromey@cygnus.com>
9764
9765         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
9766
9767         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
9768         (WORDS_TO_LONG): Likewise.
9769         (WORDS_TO_DOUBLE): Likewise.
9770
9771 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9772
9773         * jcf-write.c (RELOCATION_VALUE_0): New macro.
9774         (RELOCATION_VALUE_1): Likewise.
9775         (emit_iinc, emit_reloc, push_constant1, push_constant2,
9776         push_in_const, push_long_const): Prototyped.
9777         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
9778         (push_constant2): Likewise.
9779         (push_int_const): Cast find_constant1's integer arguments to `jword'.
9780         (find_constant_wide): Cast find_constant2's integer arguments to
9781         `jword'.
9782         (find_constant_index): Cast find_constant2's and find_constant2's
9783         integer arguments to `jword'.
9784         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
9785         (emit_switch_reloc): Use RELOCATION_VALUE_0.
9786         (emit_if): Use RELOCATION_VALUE_1.
9787         (emit_goto): Likewise.
9788         (emit_jsr): Likewise.
9789         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
9790         argument to push_long_const to HOST_WIDE_INT.
9791
9792 1999-09-15  Andreas Schwab  <schwab@suse.de>
9793
9794         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
9795
9796 1999-09-20  Nick Clifton  <nickc@cygnus.com>
9797
9798         * lang.c (lang_decode_option): Extend comment.
9799
9800 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9801
9802         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
9803         instead of fndecl.
9804
9805 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9806
9807         * gjavah.c (get_field_name, print_method_info, print_include,
9808         add_namelet): Use xmalloc, not malloc.
9809
9810         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
9811         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
9812         NULL pointer.
9813
9814         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
9815
9816         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
9817
9818         * jcf-path.c (add_entry): Likewise.
9819
9820         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
9821
9822         * jv-scan.c (xmalloc): Remove definition.
9823
9824         * jvgenmain.c (xmalloc): Likewise.
9825
9826         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
9827
9828         * lex.c (java_store_unicode): Use xrealloc, not realloc.
9829
9830         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
9831         concat, not xmalloc/sprintf.
9832         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
9833         (xstrdup): Remove definition.
9834
9835         * parse.y (duplicate_declaration_error_p,
9836         constructor_circularity_msg, verify_constructor_circularity,
9837         check_abstract_method_definitions, java_check_regular_methods,
9838         java_check_abstract_methods, patch_method_invocation,
9839         check_for_static_method_reference, patch_assignment, patch_binop,
9840         patch_cast, array_constructor_check_entry, patch_return,
9841         patch_conditional_expr): Use xstrdup, not strdup.
9842
9843         * zextract.c (ALLOC): Use xmalloc, not malloc.
9844
9845 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9846
9847         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
9848
9849         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
9850         (do_spec, lang_specific_pre_link, lang_specific_driver,
9851         input_filename, input_filename_length): Don't declare.
9852         (main_class_name, jvgenmain_spec, lang_specific_driver):
9853         Constify a char*.
9854         (lang_specific_driver): All calls to the function pointer
9855         parameter now explicitly call `fatal'.
9856
9857 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9858
9859         * parse.y (find_applicable_accessible_methods_list): Search
9860         abstract classes as interfaces.
9861
9862 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9863
9864         * class.c (finish_class): We're now outside a valid method
9865         declaration. Tell the rest of gcc so.
9866
9867 1999-09-08  Bruce Korb  autogen@linuxbox.com
9868
9869         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
9870
9871 1999-09-07  Tom Tromey  <tromey@cygnus.com>
9872
9873         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
9874         java-array.h.
9875         (decode_signature_piece): Don't emit "::" in JArray<>.
9876         (print_namelet): Only print trailing `;' when printing a class.
9877
9878 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
9879
9880         * java-tree.h: Delete declarations for all tree nodes now moved to
9881         global_trees.
9882         * decl.c: Delete their definitions.
9883
9884 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
9885
9886         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
9887         * Makefile.in (OBJS): Add ggc-callbacks.o.
9888         (OBJDEPS): Likewise.
9889
9890 1999-09-03  Tom Tromey  <tromey@cygnus.com>
9891
9892         * parse.y (strip_out_static_field_access_decl): Return operand if
9893         it satisfies JDECL_P.
9894
9895 1999-09-02  Tom Tromey  <tromey@cygnus.com>
9896
9897         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
9898         Handle nested arrays, like `[[I'.
9899
9900 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9901
9902         * class.c (finish_class): Remove unused parameter, all callers
9903         changed.
9904
9905         * expr.c (build_java_athrow): Change return type to void.
9906         (java_lang_expand_expr): Make sure each case in switch returns a
9907         value.
9908
9909         * java-tree.h (finish_class): Fix prototype to take void args.
9910
9911         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
9912         (main): Issue return from main, not exit.
9913
9914         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
9915
9916         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
9917
9918         * jv-scan.c (main): Issue return from main, not exit.
9919
9920         * parse.y (check_abstract_method_definitions,
9921         java_check_abstract_method_definitions): Add static prototypes.
9922         (java_complete_expand_methods): Fix call to `finish_class'.
9923
9924         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
9925         and `prevpc'.
9926
9927 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9928
9929         * lang.c (language_string): Constify.
9930
9931 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9932
9933         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
9934         Remove hacks for stuff which comes from libiberty.
9935
9936         * Make-lang.in: Likewise.
9937
9938 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
9939
9940         * Makefile.in (xref.o): Depend on xref.c explicitly.
9941
9942 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9943
9944         * java-tree.h (lang_printable_name): Constify a char*.
9945
9946         * lang.c (lang_printable_name): Likewise.
9947
9948 1999-08-27  Jeffrey A Law  (law@cygnus.com)
9949
9950         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
9951         comments in C code.
9952
9953 1999-08-26  Tom Tromey  <tromey@cygnus.com>
9954
9955         * gjavah.c (print_cxx_classname): Print "::" before qualified
9956         name.
9957
9958 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9959
9960         * parse.y (lookup_cl): Changed leading comment. Now does its best
9961         to set the column number.
9962         (qualify_ambiguous_name): Take WFL wrappers into account.
9963
9964 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
9965
9966         * verify.c (verify_jvm_instructions): Don't check instruction
9967         validity beyond end of method.
9968
9969 1999-08-25  Tom Tromey  <tromey@cygnus.com>
9970
9971         * jvspec.c (lang_specific_driver): Correctly handle --help again.
9972
9973 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9974
9975         * gjavah.c (print_name, print_base_classname, utf8_cmp,
9976         cxx_keyword_subst, generate_access, name_is_method_p,
9977         get_field_name, print_field_name, super_class_name, print_include,
9978         decode_signature_piece, print_class_decls, usage, help,
9979         java_no_argument, version, add_namelet, print_namelet): Add static
9980         prototype.
9981         (print_base_classname, utf8_cmp, cxx_keyword_subst,
9982         name_is_method_p): Constify a char*.
9983         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
9984         Provide a final else clause in an if-else-if.
9985         (print_field_info): Add missing final arg in function call to
9986         `print_field_name'.
9987         (print_method_info, decompile_method, decode_signature_piece,
9988         print_c_decl, print_full_cxx_name, print_stub,
9989         print_mangled_classname, super_class_name, print_include,
9990         add_namelet, add_class_decl, print_class_decls, process_file,
9991         help): Constify a char*.
9992
9993         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
9994         push_int_const, find_constant_wide, find_constant_index,
9995         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
9996         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
9997         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
9998         emit_if, emit_goto, emit_jsr, call_cleanups,
9999         make_class_file_name): Add static prototypes.
10000         (generate_bytecode_return, generate_bytecode_insns): Pass a
10001         NULL_PTR, not a NULL_TREE.
10002
10003         * jv-scan.c: Include "jcf.h".
10004         (main): Declare using DEFUN macro.
10005
10006         * jvspec.c (find_spec_file, lang_specific_pre_link,
10007         lang_specific_driver): Add prototypes.
10008         (find_spec_file): Constify a char*.
10009
10010         * keyword.gperf (hash, java_keyword): Add prototypes.
10011
10012         * lang.c (lang_print_error): Add static prototype.
10013         (lang_init): Prefer memcpy over bcopy to avoid casts.
10014
10015         * lex.c (yylex): Add static prototype.
10016
10017         * parse-scan.y: Include "lex.c" earlier.
10018
10019         * parse.h: Remove redundant declaration for `yylex'.
10020
10021         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10022         labeled_block_contains_loop_p): Add static prototypes.
10023         (not_accessible_p): Make static to match prototype.
10024
10025         * verify.c (start_pc_cmp): Don't needlessly cast away const.
10026
10027 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10028
10029         * parse.y (check_method_redefinition): Changed leading comment.
10030         (check_abstract_method_definitions): New function.
10031         (java_check_abstract_method_definitions): New function.
10032         (java_check_regular_methods): Call it.
10033         (verify_constructor_super): Fixed indentation.
10034         (lookup_method_invoke): Likewise.
10035
10036 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10037
10038         * parse.y (method_header): Return a null pointer if the current
10039         class node is null.
10040         (finish_method_declaration): Return if the current function decl
10041         is null.
10042         (source_start_java_method): Likewise.
10043         (java_method_add_stmt): Likewise.
10044
10045 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10046
10047         * class.c (emit_register_class): Removed unnecessary call to
10048         start_sequence.
10049         * parse.y (labeled_block_contains_loop_p): Removed unused local
10050         variable.
10051
10052 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10053
10054         * parse.y (java_refold): Added prototype.
10055
10056 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10057
10058         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10059         (java_stabilize_reference): Removed unnecessary `else'.
10060         (java_complete_lhs): Set flag to remember boolean. Call
10061         java_refold. Added comments.
10062         (java_decl_equiv): New function.
10063         (binop_compound_p): Likewise.
10064         (java_refold): Likewise.
10065         (patch_unaryop): Striped static field access assigned to decl and
10066         op. Changed promotion scheme for ++/-- operators.
10067         (search_loop): New function.
10068         (labeled_block_contains_loop_p): Likewise.
10069         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10070         comment.
10071         (patch_bc_statement): Call search_loop. Fixed comment.
10072
10073 1999-08-14  Anthony Green  <green@cygnus.com>
10074
10075         * expr.c (java_lang_expand_expr): Mark static array data as
10076         referenced.
10077
10078 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10079
10080         * jvgenmain.c (main): NUL-terminate name_obstack.
10081
10082 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10083
10084         * check-init.c (check_bool2_init, done_alternative): Add static
10085         prototypes.
10086
10087         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10088         (add_method, build_utf8_ref, build_class_ref,
10089         append_gpp_mangled_type, layout_class_method): Constify a char*.
10090
10091         * decl.c (push_promoted_type, make_binding_level): Add static
10092         prototypes.
10093         (push_promoted_type, pushdecl): Constify a char*.
10094
10095         * except.c (find_handler_in_range, link_handler,
10096         check_start_handlers): Add static prototypes.
10097
10098         * expr.c (process_jvm_instruction): Constify a char*.
10099
10100         * gjavah.c (main): Constify a char*.
10101
10102         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10103         Constify a char*.
10104
10105         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10106         static prototypes.
10107         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10108         munge, print_ents): Constify a char*.
10109
10110         * jcf-dump.c (disassemble_method): Constify a char*.
10111         (print_constant_pool, print_exception_table): Add static prototypes.
10112         (print_constant, print_exception_table, main, disassemble_method):
10113         Constify a char*.
10114
10115         * jcf-io.c (find_classfile, find_class): Likewise.
10116
10117         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10118         (set_source_filename, predefined_filename_p): Add static prototypes.
10119         (set_source_filename, get_constant, get_class_constant,
10120         find_in_current_zip): Constify a char*.
10121
10122         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10123         static prototypes.
10124         (add_entry, add_path, jcf_path_classpath_arg,
10125         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10126
10127         * jcf-reader.c (get_attribute, jcf_parse_preamble,
10128         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10129         jcf_parse_one_method, jcf_parse_methods,
10130         jcf_parse_final_attributes): Add static prototypes.
10131         (get_attribute): Constify a char*.
10132
10133         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10134         jcf_dependency_add_target, jcf_path_classpath_arg,
10135         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10136
10137         * jv-scan.c (main): Constify a char*.
10138         (gcc_obstack_init): Add prototype arguments.
10139
10140         * jvgenmain.c (gcc_obstack_init): Likewise.
10141         (main): Constify a char*.
10142
10143         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10144         static prototypes.
10145         (put_decl_string, lang_print_error): Constify a char*.
10146         (lang_init): Remove redundant extern prototype.
10147
10148         * mangle.c (emit_unicode_mangled_name): Constify a char*.
10149
10150         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10151         Add static prototypes.
10152         (get_type_from_signature): Constify a char*.
10153
10154         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10155         Add static prototypes.
10156         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10157         (verify_jvm_instructions): Constify a char*.
10158
10159         * xref.c (xref_flag_value): Likewise.
10160
10161         * xref.h (xref_flag_value): Likewise.
10162
10163         * zextract.c (makeword, makelong): Add static prototypes.
10164         (makeword, makelong): Constify a uch*.
10165
10166 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10167
10168         * lang.c (java_dummy_print): Constify a char*.
10169         (lang_print_error): Likewise.
10170         (lang_init): Remove redundant prototype for `print_error_function'.
10171         (lang_init_source): Likewise.
10172         (lang_identify): Constify a char*.
10173
10174 1999-08-09  Tom Tromey  <tromey@cygnus.com>
10175
10176         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10177         (WORDS_TO_LONG): Likewise.
10178         (WORDS_TO_DOUBLE): Likewise.
10179
10180 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10181
10182         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10183
10184         * expr.c (java_stack_pop, java_array_data_offset,
10185         build_java_throw_out_of_bounds_exception, case_identity,
10186         build_java_check_indexed_type): Add static prototypes.
10187         (linenumber_table, expand_invoke, expand_java_field_op,
10188         build_primtype_type_ref, expand_byte_code): Constify a char*.
10189
10190         * java-tree.h (build_primtype_type_ref, linenumber_table):
10191         Constify a char*.
10192         (java_lang_expand_expr): Add prototype.
10193
10194         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
10195         `java_lang_expand_expr'.
10196
10197         * lex.c (java_lex_error): Constify a char*.
10198         (java_get_unicode, java_read_char, java_allocate_new_line,
10199         java_unget_unicode, java_sneak_unicode): Prototype.
10200
10201         * parse-scan.y (current_class, package_name, method_declarator,
10202         report_class_declaration, yyerror): Constify a char*.
10203
10204         * parse.h (java_report_errors): Prototype.
10205         (yyerror): Constify a char*.
10206
10207         * parse.y (classitf_redefinition_error, check_modifiers,
10208         parse_jdk1_1_error, lookup_package_type,
10209         lookup_package_type_and_set_next, get_printable_method_name,
10210         purify_type_name): Constify a char*.
10211         (build_super_invocation, maybe_generate_finit,
10212         verify_constructor_super, parser_add_interface,
10213         add_superinterfaces, jdep_resolve_class, note_possible_classname,
10214         java_complete_expand_methods, java_expand_finals,
10215         cut_identifier_in_qualified, java_stabilize_reference,
10216         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10217         merge_string_cste): Prototype.
10218         (single_type_import_declaration, yyerror,
10219         variable_redefinition_error, build_array_from_name,
10220         build_unresolved_array_type, check_class_interface_creation,
10221         resolve_class, complete_class_report_errors,
10222         note_possible_classname, read_import_dir,
10223         find_in_imports_on_demand, resolve_package, fix_constructors,
10224         check_deprecation, lookup_method_invoke,
10225         maybe_build_primttype_type_ref, array_constructor_check_entry):
10226         Constify a char*.
10227         (java_complete_expand_methods, java_expand_finals): Make static.
10228         (convert_narrow): Remove static prototype.
10229
10230 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
10231
10232         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10233
10234 1999-08-02  Richard Henderson  <rth@cygnus.com>
10235
10236         * decl.c: Include defaults.h instead of expr.h.
10237         * parse.y: Likewise.
10238
10239 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
10240
10241         * java/decl.c (start_java_method): Change all uses of
10242         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10243         Ensure expr.h is included.
10244         * java/expr.c (pop_arguments): Ditto.
10245         * java/parse.y (expand_start_java_method): Ditto.
10246
10247 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10248
10249         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10250
10251 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
10252
10253         * decl.c: Include "function.h".
10254         * except.c: Likewise.
10255         * parse.y: Likewise.
10256         * Makefile.in: Update dependencies.
10257
10258 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10259
10260         * expr.c (build_java_soft_divmod): Provide a default case in switch.
10261         (java_lang_expand_expr): Mark parameters `target', `tmode' and
10262         `modifier' with ATTRIBUTE_UNUSED.
10263
10264         * gjavah.c (process_file): Add braces around ambiguous `else'.
10265
10266         * jcf-dump.c (print_access_flags, localvar_free): Change return
10267         type to void.
10268
10269         * parse.y (java_complete_expand_method): Initialize variable
10270         `exception_copy'.
10271         (resolve_qualified_expression_name): Likewise for `field_decl'.
10272         (patch_method_invocation): Likewise for `class_to_search'.
10273         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10274         (patch_assignment): Likewise for `lhs_type'.
10275
10276         * verify.c (verify_jvm_instructions): Remove unused variable
10277         `caller'.
10278
10279 1999-07-25  Richard Henderson  <rth@cygnus.com>
10280
10281         * decl.c (va_list_type_node): New.
10282
10283 1999-07-25  Anthony Green  <green@cygnus.com>
10284
10285         * gjavah.c (print_stub): New function.
10286         (METHOD_IS_NATIVE): New macro.
10287         (print_mangled_classname): Make static.
10288         (HANDLE_END_FIELD): Don't emit fields during stub generation.
10289         (process_file): Perform stub generation.
10290         (HANDLE_METHOD): Don't emit class decls during stub
10291         generation.
10292         (HANDLE_END_METHOD): Take into account stub generation.
10293         (print_method_info): Handle stub generation.
10294         (print_stub): New function.
10295         (print_cxx_classname): Make signature consistant with others.
10296         (help): Describe -stubs option.
10297         (main): Create stub file.
10298         (version): Use version.c.
10299         (print_full_cxx_name): New function.
10300         (print_c_decl): Use print_full_cxx_name.
10301
10302 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10303
10304         * check-init.c (check_init): Handle MAX_EXPR.
10305
10306 1999-07-15  Andrew Haley  <aph@cygnus.com>
10307
10308         * lang.c (flag_use_divide_subroutine): New variable.
10309         * typeck.c: (convert_ieee_real_to_integer): Bounds check
10310         fp-to-integer conversion.
10311         (convert): Call convert_ieee_real_to_integer when flag_fast_math
10312         is not set.
10313
10314         * expr.c (build_java_soft_divmod): New function.
10315         (build_java_binop): Call build_java_soft_divmod if
10316         flag_use_divide_subroutine is set.
10317         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10318         soft_lrem_node: new builtin functions.
10319         (init_decl_processing) Initialize the new builtins.
10320         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10321         soft_lrem_node: new builtin functions.
10322         (build_java_soft_divmod): New function.
10323         * parse.y: Call build_java_soft_divmod if
10324         flag_use_divide_subroutine is set.
10325         * parse.c: Rebuilt.
10326
10327         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10328         a --specs= arg) even if not linking.
10329         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10330         -fuse-divide-subroutine
10331
10332 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10333
10334         * parse.y (resolve_and_layout): Check methods only once.
10335         (resolve_qualified_expression_name): Verify thrown exceptions
10336         compatibility.
10337         (check_thrown_exceptions): Reject exceptions thrown in
10338         initializer. Error message tuned.
10339
10340 1999-07-14  Andrew Haley  <aph@cygnus.com>
10341
10342         * expr.c (expand_expr): Do not return the last statement in a
10343         block as the block's value.
10344
10345 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10346
10347         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10348         CALL_EXPR, to avoid order of evaluation changes.
10349
10350 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10351
10352         * parse.y (qualify_ambiguous_name): Do not use
10353         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10354
10355 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10356
10357         * check-init.c (check_init): Handle MAX_EXPR.
10358         * expr.c (force_evaluation_order): Force method call arguments to
10359         be evaluated in left-to-right order.
10360         * parse.y (qualify_ambiguous_name): Loop again to qualify
10361         NEW_ARRAY_EXPR properly.
10362
10363 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10364
10365         * parse.y (patch_invoke): Resolve unresolved invoked method
10366         returned type.
10367         (qualify_ambiguous_name): STRING_CST to qualify expression for
10368         type name resolution.
10369
10370 1999-06-24  Andrew Haley  <aph@cygnus.com>
10371
10372         * class.c (finish_class): Whenever a deferred method is
10373         output, rescan the list of methods to see if a new candidate for
10374         output can be found.
10375
10376 1999-06-28  Tom Tromey  <tromey@cygnus.com>
10377
10378         * jvspec.c (lang_specific_driver): Recognize --help.
10379
10380 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10381
10382         * parse.y (resolve_package): Fixed bogus return statement.
10383         (patch_method_invocation): Resolve method invocation beginning with
10384         a package name qualifier.
10385
10386 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10387
10388         * Make-lang.in (java.stage1): Depend on stage1-start.
10389         (java.stage2): Likewise for stage2-start.
10390         (java.stage3): Likewise for stage3-start.
10391         (java.stage4): Likewise for stage4-start.
10392
10393 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10394
10395         * parse.y (java_complete_lhs): When doing cross referencing, don't
10396         try to keep file location on a WFL expanded as a CALL_EXPR.
10397
10398 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10399
10400         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10401         compiling to class file a void method with an empty method body.
10402         As a side effect, the bytecode backend will generate the
10403         appropriate `return' instruction.
10404
10405 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10406
10407         * parse.y (lookup_package_type_and_set_next): New function prototype.
10408         (resolve_package): Search current and imported packages.
10409         (lookup_package_type_and_set_next): New function.
10410
10411 1999-06-22  Andrew Haley  <aph@cygnus.com>
10412
10413         * verify.c (verify_jvm_instructions): Check for pending blocks
10414         before invalid PC test and opcode switch, not after.
10415
10416 1999-06-21  Andrew Haley  <aph@cygnus.com>
10417
10418         * except.c (find_handler_in_range): The upper limit for exception
10419         ranges is exclusive, not inclusive: (start <= pc < end).
10420         (link_handler): find child pointer which points to outer by
10421         searching sibling list: previous code incorrectly assumed that
10422         outer->outer->first_child must point to outer.
10423         * verify.c (verify_jvm_instructions): FIXME added to code for
10424         `athrow'.
10425         (verify_jvm_instructions): Do not assume that the last block
10426         processed in a subroutine is a block which ends with a `ret'
10427         instruction.  With some control flows it is possible that the last
10428         block ends with an `athrow'.
10429
10430 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10431
10432         * parse.y (qualify_ambiguous_name): Reorganized the post
10433         evaluation of non WFL leading expression nodes.
10434
10435 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10436
10437         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10438         CONVERT_EXPR.
10439
10440 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10441
10442         * parse.y (qualify_ambiguous_name): Handle qualified expression
10443         beginning with a STRING_CST.
10444
10445 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10446
10447         * parse.y (register_fields): Set DECL_INITIAL on both
10448         pre-initialized static and public fields.
10449         (resolve_field_access): Static field access expressions to always
10450         use pointer types.
10451         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10452         qualification. CONVERT_EXPR to be resolved as an expression name.
10453         (java_complete_lhs): Identify and access qualified final
10454         initialized field in switch statement case expression.
10455         (fold_constant_for_init): Pre-initialized field decl constant to
10456         be folded.
10457
10458 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10459
10460         * parse.y (note_possible_classname): Mark returned node with
10461         QUALIFIED_P only if the original class name contained a '/'.
10462
10463 1999-06-05  Anthony Green  <green@cygnus.com>
10464
10465         * Make-lang.in (gcjh): More parallel build fixes.
10466
10467 1999-06-03  Mike Stump  <mrs@wrs.com>
10468
10469         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10470
10471 1999-06-02  Anthony Green  <green@cygnus.com>
10472
10473         * except.c (link_handler): Chain exception handlers in order.
10474
10475 1999-06-02  Anthony Green  <green@cygnus.com>
10476
10477         * expr.c (expand_byte_code): Fill unreachable bytecode regions
10478         with nops and process as usual in order to always set correct EH
10479         ranges.  Emit detailed warnings about unreachable bytecodes.
10480
10481 1999-06-02  Anthony Green  <green@cygnus.com>
10482
10483         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10484         constant.
10485
10486 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10487
10488         * parse.y (lookup_field_wrapper): Unified returned value to NULL
10489           or the searched field decl.
10490
10491 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10492
10493         * parse.y (fold_constant_for_init): Convert numerical constant
10494         values to the type of the assigned field.
10495
10496 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10497
10498         * expr.c (lookup_field): Relaxed the test on class loading error
10499         detection.
10500         * parse.y (fold_constant_for_init): Enabeled old code.
10501
10502 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10503
10504         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10505         decide the validity of the cast of a java.lang.Cloneable reference
10506         to an array.
10507         (patch_conditional_expr): Fixed first argument passed to
10508         binary_numeric_promotion.
10509
10510 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10511
10512         * parse.y (qualify_ambiguous_name): Take into account that a
10513         CONVERT_EXPR might specify a type as a WFL.
10514
10515 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10516
10517         * parse.y (patch_assignment): Save the rhs before using it as an
10518         argument to _Jv_CheckArrayStore.
10519
10520 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10521
10522         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10523
10524 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10525
10526         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10527         floating point literal only when the exponent indicator has been
10528         parsed.
10529
10530 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10531
10532         * parse.y (formal_parameter:): Construct argument tree list
10533         element even if a yet unsupported final parameter was encountered.
10534
10535 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10536
10537         * parse.y (finish_method_declaration): Issue errors for native or
10538         abstract methods declared with a method body, as well as for non
10539         native or non abstract methods with no method body.
10540
10541 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10542
10543         * class.c (build_utf8_ref): Initialize variable `field'.
10544
10545         * decl.c (init_decl_processing): Initialize variable `field'.
10546
10547         * expr.c (build_known_method_ref): Mark parameters `method_type',
10548         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10549         (process_jvm_instruction): Likewise for parameter `length'.
10550
10551         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10552         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10553         ATTRIBUTE_UNUSED.
10554
10555         * parse.y (maybe_generate_clinit): Remove unused variable
10556         `has_non_primitive_fields'.
10557         (find_in_imports_on_demand): Initialize variables `node_to_use'
10558         and `cl'.
10559         (patch_binop): Likewise for variable `prom_type'.
10560         (patch_unaryop): Likewise for variable `prom_type'.
10561
10562         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10563
10564         * xref.c (xref_table): Add missing initializer.
10565
10566 1999-05-14  Tom Tromey  <tromey@cygnus.com>
10567
10568         * java-except.h (struct eh_range): Removed unused `next' member.
10569         * verify.c (verify_jvm_instructions): Call check_nested_ranges
10570         after adding all exception handlers.  Sort exception ranges in
10571         order of start PC.
10572         (struct pc_index): New structure.
10573         (start_pc_cmp): New function.
10574         * except.c (add_handler): Return `void'.  Don't call link_handler;
10575         instead construct an ordinary linked list and do range
10576         coalescing.
10577         (check_nested_ranges): New function.
10578         (link_handler): Changed interface to allow merging of eh_ranges.
10579         Split overlapping ranges.  Return `void'.
10580
10581 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10582
10583         * parse.y (constructor_block_end:): New rule, tagged <node>.
10584         (constructor_body:): Use `constructor_block_end' instead of
10585         `block_end'.
10586
10587 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10588
10589         * parse.y (statement_nsi:): Pop `for' statement block.
10590         (java_complete_lhs): Labeled blocks containing no statement are
10591         marked as completing normally.
10592
10593 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10594
10595         * xref.c (xref_set_current_fp): New function, defined.
10596         * xref.h (xref_set_current_fp): New function, prototyped.
10597
10598 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10599
10600         * check-init.c (check_init): Take into account that
10601         LABELED_BLOCK_STMT can be empty.
10602
10603 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10604
10605         * parse.y (java_check_regular_methods): Warning check on not
10606         overriding methods with default access in other packages does not
10607         apply to `<clinit>'.
10608         (java_complete_lhs): If block body is an empty_stmt_node, replace
10609         it by NULL_TREE. This prevents gcc from generating an irrelevant
10610         warning.
10611
10612 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10613
10614         * check-init.c (check_init): Removed code accepting to see things
10615         falling through default:, when doing xrefs.
10616         * java-tree.h (do_not_fold): New global variable, declared.
10617         * parse.y (do_not_fold): New global variable, defined.
10618         (java_complete_expand_method): Set `do_not_fold' to the value of
10619         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10620         and reinstall them after them have been purged; do not check for
10621         initializations; do not issue missing return errors.
10622         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10623         when doing xrefs.
10624         (patch_binop): Skip the fold part when doing xrefs.
10625         (build_string_concatenation): Skip the concatenation part when
10626         doing xrefs.
10627         (patch_synchronized_statement): Do not generate a try-finally when
10628         doing xrefs.
10629         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
10630         and keep the location where the throw was seen.
10631         * typeck.c (convert): When `do_not_fold' is set, do not attempt
10632         any treatment on the converted node an simply return a NOP_EXPR of
10633         the targeted type.
10634         * xref.c (xref_get_data): New function, defined.
10635         * xref.h (xref_get_data): New function, declared.
10636         (XREF_GET_DATA): Use xref_get_data.
10637
10638 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10639
10640         * gjavah.c (print_include): Cast the result of `strlen' to int
10641         when comparing against a signed value.
10642         (add_namelet): Likewise.
10643
10644 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10645
10646         * expr.c (expand_invoke): Mark parameter `nargs' with
10647         ATTRIBUTE_UNUSED.
10648         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
10649
10650         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
10651         ATTRIBUTE_UNUSED.
10652
10653         * jcf-reader.c (get_attribute): Cast a value to long
10654         when comparing against a signed expression.  Likewise.
10655
10656         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
10657         HOST_BITS_PER_CHAR.
10658
10659 1999-05-11  Andrew Haley  <aph@cygnus.com>
10660
10661         * parse.y (source_end_java_method): If the current method contains
10662         any exception handlers, force asynchronous_exceptions: this is
10663         necessary because signal handlers in libjava may throw exceptions.
10664         * decl.c (end_java_method): Ditto.
10665
10666 1999-05-11  Tom Tromey  <tromey@cygnus.com>
10667
10668         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
10669         flags.
10670         * jvspec.c (THREAD_NAME): Removed.
10671         (GC_NAME): Likewise.
10672         (MATHLIB): Likewise.
10673         (WITHLIBC): Likewise.
10674         (GCLIB): Likewise.
10675         (THREADLIB): Likewise.
10676         (MATH_LIBRARY): Likewise.
10677         (lang_specific_driver): Don't add `-l' options to command line.
10678         Instead, add a single --specs option.  Recognize `-L' options and
10679         use them to search for spec file.
10680         (find_spec_file): New function.
10681         (SPEC_FILE): New define.
10682
10683 1999-05-11  Dave Brolley  <brolley@cygnus.com>
10684
10685         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
10686         cpplib-enabled build.
10687
10688 1999-05-05  Per Bothner  <bothner@cygnus.com>
10689
10690         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
10691         temporarily zero it while calling rest_of_decl_compilation.
10692
10693         * java-tree.h (string_ptr_type_node):  Add declaration.
10694         * decl.c:  Define and initialize string_ptr_type_node.
10695         * parse.y (patch_string_cst):  Use string_ptr_type_node.
10696
10697         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
10698         * parse.y (for_statement):  Now unconditionally exit_block.
10699         (finish_labeled_statement):  No longer exit_block if for-loop.
10700         (patch_loop_statement):  Check harder if the loop is already labeled.
10701
10702         * parse.y (patch_initialized_static_field):  Removed function.
10703         (maybe_generate_clinit):  Removed special handling for interfaces.
10704         (java_complete_expand_methods):  Do a preliminary java_complete_tree
10705         on <clinit> to determine if it can be removed.
10706         (java_complete_expand_method):  Remove special handling for <clinit>.
10707         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
10708         optimize if we get back empty_stmt_node.
10709         For MODIFY_EXPR, re-do checking of static initializers.
10710         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
10711         For VAR_DECL, pass correct context.
10712
10713         * verify.c (verify_jvm_instructions):  Better error messages.
10714
10715 1999-05-03  Tom Tromey  <tromey@cygnus.com>
10716
10717         * parse-scan.y (interface_declaration): Call
10718         report_class_declaration for interfaces.
10719
10720 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
10721
10722         * Makefile.in: Remove -v from bison command lines.
10723
10724 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10725
10726         * check-init.c (check_init): Exclude a case of error when doing
10727         xrefs.
10728         * class.c (layout_class_method): Don't generate the error message
10729         twice when compiling from source.
10730         * lang-options.h: Added `-Wredundant-modifers' and
10731         `-Wunusupported-jdk11' flags and help text.
10732         * lang.c (lang_decode_option): Added support for
10733         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
10734         flag_static_local_jdk11 and flag_redundant set accordingly.
10735         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
10736         * parse.h (EXPR_WFL_ADD_COL): New macro.
10737         (DECL_END_SOURCE_LINE): Likewise.
10738         (DECL_INHERITED_SOURCE_LINE): Likewise.
10739         * parse.y (static_ref_err): New function, prototyped.
10740         (CCB_TK): Now tagged <operator>.
10741         (class_body:): Remember the location of the closing '}' of a class
10742         definition when doing xrefs.
10743         (block:): Likewise.
10744         (block_end:): Likewise.
10745         (create_class): Remember the location of the inherited class
10746         identifier when doing xrefs.
10747         (register_fields): Added test on first operand of `init' before
10748         testing it TREE_CODE.
10749         (method_header): Store the location of the class identifier in the
10750         class decl when doing xrefs.
10751         (finish_method_declaration): Don't combine first/last method line
10752         when doing xref.
10753         (java_check_regular_methods): Warning check on not overriding
10754         methods with default access on other packages move before check on
10755         static methods. Initialization of `aflags' also moved up.
10756         (resolve_expression_name): Call static_ref_err to report the error.
10757         (static_ref_err): New function, implemented.
10758         (resolve_field_access): Returned simplified static field access
10759         when doing xrefs.
10760         (resolve_qualified_expression_name): Check for illegal use of
10761         static fields in a non static context. Call static_ref_err to
10762         report error in various places.
10763         (java_complete_tree): Do not fold initialized static fields when
10764         doing xrefs.
10765         (java_complete_lhs): Likewise.
10766
10767 1999-04-29  Anthony Green  <green@cygnus.com>
10768
10769         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
10770         create internal labels.
10771         (lookup_label): Ditto.
10772
10773 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10774
10775         * class.c (layout_class_method): Generate <clinit>'s rtl for
10776         interfaces.
10777         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10778         for interfaces' <clinit>.
10779         * expr.c (lookup_field): Search for fields in interfaces.
10780         (expand_invoke): Fixed indentation.
10781         (expand_java_field_op): Likewise. Use IS_CLINIT.
10782         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
10783         (IS_CLINIT): New macro.
10784         * parse.y (type_declaration:): Call maybe_generate_clinit after an
10785         interface was parsed.
10786         (maybe_generate_clinit): Don't generate if the current class is an
10787         interface with only fields of primitive types.
10788         (reset_method_name): Use IS_CLINIT.
10789         (java_complete_expand_method): Expand <clinit> when it exists for
10790         interfaces. Use IS_CLINIT.
10791         (resolve_expression_name): Use DECL_CONTEXT instead of
10792         current_class to build static field references.
10793         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
10794         ARRAY_REF when doing xreferencing.
10795         (check_final_assignment): Fixed typo in leading comment. Use
10796         IS_CLINIT.
10797         (patch_array_ref): Don't fully expand array references when
10798         xreferencing.
10799         (patch_return): Use IS_CLINIT.
10800         (patch_throw_statement): Likewise.
10801
10802 1999-04-22  Tom Tromey  <tromey@cygnus.com>
10803
10804         * Make-lang.in (JAVA_SRCS): Added check-init.c.
10805
10806 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10807
10808         * decl.c (predef_filenames, predef_filenames_size): New globals
10809         (init_decl_processing): predef_filenames and predef_filenames_size
10810         initialized.
10811         * java-tree.h (predef_filenames, predef_filenames_size): Declared
10812         extern.
10813         * jcf-parse.c (predefined_filename_p): New function.
10814         (yyparse): Check that files on the command line are specified only
10815         once and issue a warning otherwise.
10816         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
10817         * parse.y (source_end_java_method): Nullify NOP method bodies, to
10818         avoid a gcc warning with -W -Wall turned on.
10819         (java_expand_classes): Abort if errors were encountered.
10820         (java_complete_lhs): If the cross reference flag is set, wrap
10821         field DECL node around a WFL when resolving expression name.
10822
10823 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10824
10825         * lang.c (lang_decode_option): Fixed returned value when parsing
10826         `-fxref=...' and `-Wall'.
10827         * parse.y (source_end_java_method): Do not generate code when
10828         flag_emit_xref is set.
10829         (resolve_expression_name): Do not build static field access when
10830         flag_emit_xref is set.
10831         (resolve_field_access): No special treatment on `length' when
10832         flag_emit_xref is set. Do not build qualified static field access
10833         when flag_emit_xref is set.
10834         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
10835         when flag_emit_xref is set.
10836         (patch_assignment): Do not generate array store runtime check when
10837         flag_emit_xref is set.
10838         * xref.c (xref_flag_value): Fixed function declaration
10839         indentation.
10840         (xset_set_data): New function.
10841         * xref.h (xref_set_data): Added prototype for new function.
10842         (typedef struct xref_flag_table): New field data.
10843         (XREF_GET_DATA): New macro.
10844
10845 1999-04-19  Tom Tromey  <tromey@cygnus.com>
10846
10847         * xref.h (enum): Removed trailing comma.
10848
10849         * parse.y (resolve_qualified_expression_name): Added missing
10850         `break'.
10851
10852 1999-04-15  Anthony Green  <green@cygnus.com>
10853
10854         * gjavah.c: New prototypes for java_float_finite and
10855         java_double_finite.
10856
10857 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10858
10859         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
10860         references.
10861
10862 1999-04-06  Jeffrey A Law  (law@cygnus.com)
10863
10864         * Makefile.in (TREE_H): Add tree-check.h.
10865         (RTL_H): Add genrtl.h.
10866
10867 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10868
10869         * parse.y (patch_assignment): Added ArrayStoreException runtime
10870         check.
10871
10872 1999-04-06  Per Bothner  <bothner@cygnus.com>
10873
10874         * expr.c (pop_type_0):  New function.
10875         (pop_type):  Use pop_type_0.
10876         * java-tree.h (pop_type_0):  New declaration.
10877         * verify.c (verify_jvm_instructions):  Check return instructions.
10878
10879         * parse.y (patch_binop):  Don't fold if non-constant and emiting
10880         class files.
10881
10882 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10883
10884         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
10885
10886         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
10887         (main_jcf): Don't define.
10888         (process_file): Don't set `main_jcf'.
10889
10890         * java-tree.h (main_jcf): Don't declare.
10891
10892         * jcf-parse.c (main_jcf): Add static definition.
10893
10894         * lang.c (main_jcf): Don't define.
10895
10896 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10897
10898         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
10899
10900         * decl.c (copy_lang_decl): Likewise for `bcopy'.
10901
10902         * jcf-depend.c: Include "config.h", not <config.h>.
10903
10904         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
10905         `bcopy' to PTR.
10906
10907         * jcf-path.c: Include "config.h", not <config.h>.
10908
10909         * lex.c: Don't include various system header files.
10910         (java_init_lex): Cast the argument of `bzero' to PTR
10911
10912         * parse-scan.y (java_push_parser_context): Likewise.
10913
10914         * parse.y (java_push_parser_context): Likewise.
10915         (patch_bc_statement): Match format specifier to variable argument.
10916
10917         * xref.c: Don't include <stdio.h>.
10918
10919 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10920
10921         * parse.y (struct parser_ctxt *ctxp): Now global.
10922         (declare_local_variables): Use WFL compound value for the
10923         declaration source line value, when doing cross-referencing.
10924
10925 1999-03-31  Tom Tromey  <tromey@cygnus.com>
10926
10927         * gjavah.c (print_field_info): Allow constants of other types.
10928         (print_include): Generate include when new name is proper prefix
10929         of already printed name.
10930         (add_namelet): Likewise.
10931         (cxx_keyword_subst): New function.
10932         (print_method_info): Use it.
10933         (print_field_name): New function.
10934         (get_field_name): New function.
10935         (print_field_info): Use get_field_name and print_field_name.
10936
10937 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10938
10939         * Makefile.in (keyword.h): Generate using gperf language 'C', not
10940         'KR-C', so gperf uses the `const' keyword on strings.
10941
10942         * keyword.gperf (java_keyword): Const-ify a char*.
10943
10944 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10945
10946         * parse.y (patch_bc_statement): Fixed identation and a bogus
10947         `printf' format.
10948
10949 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10950
10951         * parse.y (patch_assignment): Allow static variables in other
10952         classes to be assigned.
10953
10954 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10955
10956         * class.c (maybe_add_interface): Remove unused variable
10957         `interface_binfo'.
10958         (make_class_data): Use = for assignment, not ==.  Likewise.
10959         (emit_register_classes): Remove unused variable `decl'.
10960
10961         * lex.c: Fix comment so as not to contain an embedded `/*'.
10962
10963         * verify.c (verify_jvm_instructions): Remove unused variable
10964         `self_type'.
10965
10966 1999-03-27  Per Bothner  <bothner@cygnus.com>
10967
10968         * parse.y (complete_loop_body):  Rename to finish_loop_body.
10969         (complete_labeled_statement):  Rename to finish_labeled_statement.
10970         (complete_for_loop):  Rename to finish_for_loop.
10971         (complete_method_declaration):  Rename to finish_method_declaration.
10972
10973         * java-tree.h (continue_identifier_node):  New global node.
10974         * decl.c:  Define and initialize continue_identifier_node.
10975         * parse.y (generate_labeled_block):  Remove - no longer needed.
10976         (build_loop_body):  Use continue_identifier_node for continue block.
10977         (finish_labeled_statement):  Also do pop_labeled_block actions.
10978         (java_complete_lhs):  POP_LOOP even if error.
10979         (build_labeled_block):  Special handling for continue_identifier_node.
10980         (patch_loop_statement):  Re-organize.
10981         (patch_bc_statement):  Re-write.
10982
10983 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10984
10985         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
10986         using a WFL compound value.
10987         * parse.y (xref.h): Include.
10988         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
10989         WFL compound value.
10990         (register_fields): Set WFL compound value to lineno if doing
10991         xrefs.
10992         (java_complete_expand_method): Call expand_xref if flag_emit_xref
10993         is set.
10994         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
10995         * xref.h (expand_xref): Prototype renamed from xref_generate.
10996
10997 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10998
10999         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11000         (GET_CURRENT_BLOCK): New macro.
11001         * parse.y (current_static_block): New global variable.
11002         (method_body:): Define action.
11003         (complete_method_declaration): Set current_function_decl to NULL
11004         when work on the current method is done.
11005         (declare_local_variables): Use GET_CURRENT_BLOCK.
11006         (java_method_add_stmt): Likewise.
11007         (java_complete_expand_method): Disable the use of `this' when
11008         expanding <clinit>.
11009         (enter_a_block): If no current method exist, use
11010         current_static_block to link static initializer blocks.
11011         (exit_block): Rewritten to use current_static_block when no current
11012         method decl exists.
11013         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11014         (patch_return): Forbid the use of `return' in static initializers.
11015         (patch_throw_statement): Fixed indentation. Issue specific error
11016         for uncaught thrown checked exception in static initializer
11017         blocks. Removed FIXME.
11018
11019 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
11020
11021         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11022         Link gcj from gcc.o.
11023
11024 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11025
11026         * parse.y (find_applicable_accessible_methods_list): When dealing
11027         with interface: ensure that a given interface or java.lang.Object
11028         are searched only once.
11029
11030 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11031
11032         * gjavah.c (print_c_decl): Remove unused argument `flags'.
11033
11034         * jcf-dump.c (print_access_flags): Add braces around if-else.
11035
11036         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11037         COMBINE_INPUTS.
11038
11039         * lex.c (build_wfl_node): Add static prototype.
11040
11041         * lex.h (build_wfl_node): Remove static prototype.
11042
11043         * parse.y: Include lex.c early enough to declare everything needed.
11044         Ensure calls to `build_wfl_node' pass the proper arguments.
11045         (create_class): Remove unused variable `super_decl'.
11046         (get_printable_method_name): Initialize variable `name'.
11047
11048 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11049
11050         * Changelog: Fixed 1999-03-22 typos.
11051         * lang.c (lang_decode_option): Fixed typo in error string in the
11052         XARG section.
11053
11054 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11055
11056         * Makefile.in (JAVA_OBJS): Added entry xref.o.
11057         (xref.o): New rule.
11058         * java-tree.h (flag_emit_xref): Declared extern.
11059         * lang.c (xref.h): Included.
11060         (flag_emit_xref): New global variable.
11061         (lang_decode_option): Added support for -fxref.
11062         * xref.c: Created.
11063         * xref.h: Likewise.
11064
11065 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
11066
11067         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11068         linked with.
11069
11070 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11071
11072         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11073         $(srcdir)/../system.h and $(JAVA_TREE_H).
11074         (jcf-io.o): Depend on $(JAVA_TREE_H).
11075         (mangle.o): Likewise.
11076
11077         * check-init.c (check_cond_init): Add static prototype.
11078
11079         * class.c (build_java_method_type, hashUtf8String,
11080         make_field_value, get_dispatch_vector, get_dispatch_table,
11081         append_gpp_mangled_type, mangle_static_field): Likewise.
11082         (strLengthUtf8): Hide unused definition.
11083         (hashUtf8String): Const-ify.
11084         (make_field_value): Un-ANSI-fy.
11085
11086         * constants.c: Move inclusion of jcf.h above java-tree.h.
11087         (set_constant_entry, find_class_or_string_constant,
11088         find_name_and_type_constant, get_tag_node,
11089         build_constant_data_ref): Add static prototype.
11090
11091         * decl.c (push_jvm_slot, builtin_function,
11092         lookup_name_current_level): Likewise.
11093         (builtin_function): Const-ify.
11094
11095         * except.c (expand_start_java_handler, expand_end_java_handler):
11096         Add static prototype.
11097
11098         * expr.c (flush_quick_stack, push_value, pop_value,
11099         java_stack_swap, java_stack_dup, build_java_athrow,
11100         build_java_jsr, build_java_ret, expand_java_multianewarray,
11101         expand_java_arraystore, expand_java_arrayload,
11102         expand_java_array_length, build_java_monitor, expand_java_pushc,
11103         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11104         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11105         expand_compare, expand_test, expand_cond, expand_java_goto,
11106         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11107         expand_java_field_op, java_push_constant_from_pool): Likewise.
11108
11109         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11110         (build_java_arraynull_check): Mark parameters `node' and `type'
11111         with ATTRIBUTE_UNUSED.
11112         (note_label): Likewise for parameter `current_pc'.
11113         (expand_java_call, expand_java_ret): Hide unused definition.
11114
11115         * java-tree.h (make_class, build_constants_constructor,
11116         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11117         init_outgoing_cpool, register_class, emit_register_classes,
11118         java_layout_seen_class_methods): Prototype.
11119         (unicode_mangling_length): Const-ify.
11120         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11121         emit_unicode_mangled_name, format_int, format_uint,
11122         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11123         jcf_print_utf8_replace, open_class): Prototype.
11124
11125         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
11126         <stdio.h>.  Include tree.h/java-tree.h.
11127         (utf8_equal_string usage, process_class): Add static prototype.
11128         (open_class): Don't prototype this here.
11129         (utf8_equal_string): Match arguments to format specifiers.
11130         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11131         TABLE_SWITCH, disassemble_method): Likewise.
11132
11133         * jcf-io.c: Include tree.h/java-tree.h.
11134         (open_class, find_classfile, jcf_print_utf8,
11135         jcf_print_utf8_replace): Const-ify.
11136
11137         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11138         parse_class_file): Add static prototype.
11139         (find_in_current_zip): Match definition to existing static
11140         prototype.
11141
11142         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11143         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11144         finish_jcf_block, define_jcf_label, get_jcf_label_here,
11145         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11146         write_chunks, adjust_typed_op, generate_bytecode_conditional,
11147         generate_bytecode_return, perform_relocations, init_jcf_state,
11148         init_jcf_method, release_jcf_state, generate_classfile):
11149         Add static prototype.
11150         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11151         (make_class_file_name): Const-ify.
11152
11153         * jcf.h (find_classfile): Const-ify.
11154
11155         * jv-scan.c (reset_report): Remove prototype.
11156
11157         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11158         (error): Rewrite to allow varargs.
11159
11160         * lang.c (lang_f_options): Const-ify.
11161
11162         * lex.c (java_parse_escape_sequence): Add static prototype.
11163         (java_allocate_new_line): Match definition to existing static
11164         prototype.
11165
11166         * mangle.c Include tree.h/java-tree.h.
11167         (unicode_mangling_length, emit_unicode_mangled_name,
11168         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11169
11170         * parse.h (jdep_code): Remove trailing comma in enumeration.
11171         (java_get_line_col): Move prototype outside of !JC1_LITE test.
11172         (reset_report): Add prototype.
11173
11174         * verify.c (push_pending_label, merge_types): Add static
11175         prototypes.
11176
11177         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11178
11179 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11180
11181         * parse.y (find_applicable_accessible_methods_list): Extend the
11182         search to superinterfaces when relevant.
11183         (search_applicable_methods_list): New function.
11184
11185 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11186
11187         * class.c (unmangle_classname): Implemented stricter testing
11188         before setting the QUALIFIED_P flag on an identifier.
11189
11190 1999-03-16  Per Bothner  <bothner@cygnus.com>
11191
11192         * parse.y (java_complete_lhs):  Call force_evaluation_order
11193         after patch_newarray.
11194         (patch_binop):  Don't call fold if there are side effects.
11195
11196 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11197
11198         * parse.y (java_stabilize_reference): Use save_expr instead of
11199         building a SAVE_EXPR node.
11200         (java_complete_lhs): Patch the resulting string of the `+='
11201         operator (if necessary) and complete the RHS after having built
11202         the cast.
11203
11204 1999-03-15  Per Bothner  <bothner@cygnus.com>
11205
11206         * class.c (make_class):  Don't set CLASS_P here (because
11207         this function is also called by build_java_array_type).
11208         (push_class):  Set CLASS_P here instead.
11209         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
11210
11211         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
11212         context.  If the context is class, perfer "super" over "synchronized".
11213         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
11214
11215         * parse.y (create_class):  Don't call parser_check_super here;
11216         it is not robust.  Always wait until later.
11217
11218         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
11219         match what JDK 1.2 does), but don't set ACC_PUBLIC.
11220
11221 1999-03-13  Per Bothner  <bothner@cygnus.com>
11222
11223         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
11224         * lex.h (UNGETC):  Change misleading macro.
11225
11226 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11227
11228         * parse.y (java_stabilize_reference): Return NODE when patching a
11229         COMPOUND_EXPR.
11230         (java_complete_lhs): Put parenthesis around truth values.
11231
11232 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11233
11234         * class.c (layout_class_method): Don't make rtl for interface
11235         methods.
11236         * parse.h (GET_TYPE_NAME): New macro.
11237         * parse.y (if_then_statement:): Fixed indentation.
11238         (if_then_else_statement:): Likewise.
11239         (for_statement:): Fixed spacing.
11240         (try_statement:): Fixed indentation.
11241         (create_interface): Don't force interfaces to be abstract.
11242         (method_header): Abstract methods are OK in interfaces.
11243         (declare_local_variables): Fixed typo in comment.
11244         (java_complete_expand_method): Fixed indentation.
11245         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11246         non accessible fields.
11247         (java_stabilize_reference): New function.
11248         (java_complete_lhs): Fixed indentation. Use
11249         java_stabilize_reference in compound assignment. Insert the
11250         cast. If not processing `+' fix string constants before processing
11251         binop.
11252
11253 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11254
11255         * constants.c (find_class_or_string_constant): Cast variable `j'
11256         to a `jword' when comparing against one.
11257
11258         * expr.c (java_lang_expand_expr): Remove unused variables
11259         `has_finally_p' and `op0'.
11260
11261         * gjavah.c (print_field_info): Cast a value to jint when comparing
11262         against one.  Likewise for a jlong.
11263         (add_namelet): Likewise cast a `sizeof' to an int when comparing
11264         against a signed quantity.
11265
11266         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11267         (print_signature): Don't needlessly dereference variable `str'
11268
11269         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11270         `max_locals' with ATTRIBUTE_UNUSED.
11271         (jcf_parse_class): Likewise for variable `index'.
11272
11273         * parse.h (reverse_jdep_list): Remove static prototype.
11274
11275         * parse.y (build_jump_to_finally): Remove prototype and definition.
11276         (reverse_jdep_list): Add static prototype.
11277
11278         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11279         `assignment' and `expr_decl'.
11280
11281         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11282
11283 1999-03-12  Andrew Haley  <aph@cygnus.com>
11284
11285         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11286         we'll need a directory separator and a null character.
11287
11288 1999-03-10  Per Bothner  <bothner@cygnus.com>
11289
11290         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
11291
11292   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11293
11294         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11295         interfaces.
11296
11297 1999-03-05  Per Bothner  <bothner@cygnus.com>
11298
11299         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
11300
11301         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
11302
11303         * class.c (layout_class_method):  A static method in a base class
11304         is never overridden, so treat it like it doesn't exist.
11305         However, do complain about private non-static method overriding
11306         public static method.
11307
11308         * parse.y:  Don't set unused INITIALIZED_P flag.
11309         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
11310
11311         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
11312         (build_array_from_name):  Re-order &index[string] to &string[index].
11313
11314         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
11315         error_mark (it might catch more errors, but it is more likely to lose).
11316
11317 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11318
11319         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11320         (parse-scan.o): Depend on toplev.h.
11321
11322         * class.c (make_method_value): Add prototype.  Make it static.
11323         Remove unused second argument, caller changed.
11324
11325         * expr.c (java_lang_expand_expr): Remove unused variable
11326         `return_label'.
11327
11328         * java-tree.h: Don't prototype find_in_current_zip.
11329         Add prototypes for verify_constant_pool, start_java_method,
11330         end_java_method, give_name_to_locals, expand_byte_code,
11331         open_in_zip, set_constant_value, find_constant1, find_constant2,
11332         find_utf8_constant, find_string_constant, find_class_constant,
11333         find_fieldref_index, find_methodref_index, write_constant_pool,
11334         count_constant_pool_bytes and encode_newarray_type.
11335
11336         * jcf-dump.c: Remove unused variable `LONG_temp'.
11337
11338         * jcf-parse.c: Include parse.h.
11339         (jcf_parse_source): Remove unused parameter, all callers changed.
11340         (jcf_figure_file_type): Add static prototype.
11341         (find_in_current_zip): Likewise.  Also remove unused parameter,
11342         all callers changed.
11343         (read_class): Initialize variable `saved_pos'.
11344
11345         * jcf-reader.c (jcf_parse_preamble): Mark variables
11346         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11347
11348         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11349         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11350         (java_parse_doc_section): Initialize variable `seen_star'.
11351         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11352         (java_lex_error): Mark parameters `msg' and `forward' with
11353         ATTRIBUTE_UNUSED.
11354         (java_get_line_col): Mark parameters `filename' and `line' with
11355         ATTRIBUTE_UNUSED.
11356
11357         * parse-scan.y: Include toplev.h.
11358         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11359
11360         * parse.h: use `struct JCF', not plain `JCF'.
11361         (java_parser_context_save_global, java_expand_classes
11362         java_parser_context_restore_global, java_parse): Add prototypes.
11363
11364         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11365         `node'.
11366
11367 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
11368
11369         *  check-init.c (check_init):  COPYN takes word count, not bit count.
11370
11371 1999-02-26  Per Bothner  <bothner@cygnus.com>
11372
11373         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
11374         explicit build_decl.  (Avoids crash in reload when optimizing.)
11375
11376 1999-02-25  Per Bothner  <bothner@cygnus.com>
11377
11378         * decl.c (complete_start_java_method):  Handle synchronized method
11379         even when compiling from bytecode.
11380
11381 1999-02-26  Tom Tromey  <tromey@cygnus.com>
11382
11383         * gjavah.c (add_class_decl): Only generate `#include' if outer
11384         class is not the name of the class we are processing.  Correctly
11385         append `.h' in #include.
11386         (process_file): Clean up newlines around generated `#include's.
11387         (decode_signature_piece): Correctly handle inner classes.
11388         (struct include): New structure.
11389         (all_includes): New global.
11390         (print_include): New function.
11391         (add_class_decl): Use it.
11392         (process_file): Likewise.
11393         (add_class_decl): Generate include for java-array.h if array
11394         seen.
11395         (process_file): Don't generate java-array.h include.
11396
11397         * gjavah.c (add_namelet): Check for standard package names here.
11398         (add_class_decl): Don't check for standard package names here.
11399
11400 1999-02-25  Tom Tromey  <tromey@cygnus.com>
11401
11402         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11403         When reading a zip file, only use strncmp if both strings are
11404         bigger than the buffer length.  Initialize `k' when looping
11405         through zip file.
11406
11407 1999-02-24  Tom Tromey  <tromey@cygnus.com>
11408
11409         * gjavah.c (struct namelet): New structure.
11410         (add_namelet): New function.
11411         (print_namelet): New function.
11412         (print_class_decls): Use add_namelet and print_namelet to generate
11413         namespaces and not classes.
11414         (method_printed): New global.
11415         (HANDLE_END_METHOD): Examine method_printed.
11416         (print_method_info): Set method_printed when required.  Print
11417         error if function to be ignored is marked virtual.  Handle $finit$
11418         method.
11419         (METHOD_IS_FINAL): New macro.
11420         (print_field_info): Use it.
11421         (HANDLE_METHOD): Clear method_printed.
11422         (method_pass): New global.
11423         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11424         (process_file): Do two passes over both fields and methods.
11425         (HANDLE_METHOD): Examine method_pass.
11426         (root): New global.
11427         (add_class_decl): New function.
11428         (print_class_decls): Don't scan over entire constant pool.
11429
11430 1999-02-23  Tom Tromey  <tromey@cygnus.com>
11431
11432         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11433         disable linking in that case.
11434
11435 1999-02-20  Tom Tromey  <tromey@cygnus.com>
11436
11437         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11438         not 0x1f.
11439
11440 1999-02-21  Per Bothner  <bothner@cygnus.com>
11441
11442         * decl.c (build_result_decl), java-tree.h:  New method.
11443         (complete_start_java_method):  Handle synchronized methods.
11444         Don't build DECL_RESULT here.  (Ordering dependency problem.)
11445         (start_java_method):  Call build_result_decl here instead  ...
11446         * parse.y (java_complete_expand_method):  ... and here.
11447         (expand_start_java_method): Don't call complete_start_java_method here.
11448         (java_complete_expand_method):  Call it here instead.
11449         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
11450         * java-tree.h:  ... here.
11451
11452         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
11453         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
11454         for ARRAY_REF - it doesn't work when array bounds are checked.
11455         (patch_array_ref):  Handle it here instead.
11456
11457         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
11458
11459 1999-02-19  Per Bothner  <bothner@cygnus.com>
11460
11461         Force left-to-right evaluation of binary operations etc.
11462         * expr.c (force_evaluation_order), java-tree.h:  New function.
11463         * parse.y (java_complete_lhs):  Pass binary operations, procedure
11464         calls, and ARRAY_REFs to force_evaluation_order.
11465         (various):  Set TREE_SIDE_EFFECTS more carefully.
11466
11467         Tolerate random (non-UTF8) encoding in comments without complaining.
11468         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
11469         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
11470
11471         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
11472         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
11473
11474         * parse.y (java_complete_lhs):  Ignore an empty statement in a
11475         COMPOUND_EXPR.  Don't complain about empty statement after return.
11476
11477 1999-02-19  Per Bothner  <bothner@cygnus.com>
11478
11479         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
11480         in TREE_LIST - just chain the POINTER_TYPEs together.
11481         (resolve_class):  If type already resolved, return decl.
11482         After resolving, update TREE_TYPE(class_type), and name (if array).
11483         * parse.h (do_resolve_class), parse.y:  Make non-static.
11484         * class.c (maybe_layout_super_class):  Take this_class argument.
11485         Do do_resolve_class if necessary.
11486         (layout_class, layout_class_methods): Adjust calls appropriately.
11487         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11488         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
11489         * typeck.c (build_java_array_type):  Don't call layout_class.
11490
11491 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11492
11493         * parse.y (check_pkg_class_access): Allow private class access
11494         within the same package.
11495         (strip_out_static_field_access_decl): New function.
11496         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11497         operator argument before testing its nature.
11498
11499 1999-02-03  Per Bothner  <bothner@cygnus.com>
11500
11501         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
11502         (TRY_EXPR):  Simplify - it no longer has a finally clause.
11503         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
11504         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11505         * expr.c (java_lang_expand_expr):  Likewise.
11506         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
11507         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
11508         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
11509         (build_try_statement):  Remove finally parameter and handling.
11510         (build_try_finally_statement):  New function.
11511         (patch_try_statement):   No longer need to support finally clause.
11512         (try_statement):  Update grammar action rules.
11513         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
11514         Simpler handling of TRY_EXPR, which no longer has a finally clause.
11515
11516 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
11517
11518         * jcf-parse.c (get_constant): Add braces around computation of 'd'
11519         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
11520
11521 1999-02-17  Andrew Haley  <aph@cygnus.com>
11522
11523         * class.c (build_utf8_ref): Back out broken patch which was
11524         intended to to output signatures using '.' as a separator.
11525
11526         * class.c (make_class_data): Output signatures using '.' as a
11527         separator, rather than '/'.
11528         (mangled_classname): Likewise.
11529         (make_field_value): Likewise.
11530         (make_method_value): Likewise.
11531         * constants.c (alloc_class_constant): Likewise.
11532         * expr.c (build_invokeinterface): Likewise.
11533
11534 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11535
11536         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11537         of an ancient workaround.
11538
11539 1999-02-10  Jeffrey A Law  (law@cygnus.com)
11540
11541         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
11542         here anymore.
11543
11544 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11545
11546         * lex.c (yylex): Encode \0 as UTF8.
11547
11548 1999-02-10  Tom Tromey  <tromey@cygnus.com>
11549
11550         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11551         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11552         (libgcj_zip): Renamed.
11553         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11554         LIBJAVA_ZIP_FILE.
11555         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11556
11557         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11558         (GC_NAME): Renamed -lgc to -lgcjgc.
11559
11560 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11561
11562         * lex.c (java_lang_cloneable): Initialize.
11563         * parse.y (java_lang_cloneable): New static variable.
11564         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11565         doing one more qualification round.
11566         (valid_ref_assignconv_cast_p): Reject null source or
11567         destination. Allow an array to be cast into java.lang.Cloneable.
11568         (patch_cast): Swapped two first arguments to first call to
11569         valid_ref_assignconv_cast_p.
11570
11571 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11572
11573         * parse.h: DECL_P renamed JDECL_P.
11574         * parse.y: DECL_P replaced by JDECL_P.
11575         (build_array_from_name): Always use pointer's type.
11576         (patch_bc_statement): Extra code to search continue target in a
11577         for loop. Fixed comments. Continue target is current loop when
11578         unlabeled.
11579
11580 1999-02-05  Andrew Haley  <aph@cygnus.com>
11581
11582         * class.c (make_class_data): The superclass of an interface should
11583         be null, not class Object.
11584
11585         * lex.c (java_lex): Sign extend hex literals.
11586
11587 1999-02-04  Andrew Haley  <aph@cygnus.com>
11588
11589         * class.c (build_utf8_ref): Output signatures using '.' as a
11590         separator, rather than '/'.
11591         (make_class_data): Likewise.
11592
11593 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
11594
11595         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11596         mkstemp.o.  Get them from libiberty now.
11597
11598 1999-02-02  Jeffrey A Law  (law@cygnus.com)
11599
11600         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11601
11602 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11603
11604         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11605         from libiberty.h
11606
11607 1999-02-02  Per Bothner  <bothner@cygnus.com>
11608
11609         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11610         * jcf-write.c (generate_bytecode_return):  New function.
11611         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
11612
11613         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
11614         generate special [fd]const_[01] instructions.
11615
11616         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
11617
11618         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
11619         handling OPCODE_lookupswitch or OPCODE_tableswitch.
11620
11621 1999-02-01  Per Bothner  <bothner@cygnus.com>
11622
11623         * parse.y (patch_method_invocation):  Handle calling static methods,
11624         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11625
11626         * parse.y (java_complete_lhs):  Don't complain about unreachable
11627         exit condition in a do-while statement.
11628
11629 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11630
11631         * lex.c (java_read_char): Fixed utf8 decoding.
11632         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
11633         range.
11634         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
11635         comments. Local variable `all_primitive' is gone. Broadened
11636         acceptance of `0' to floating point targets. `long' can now be
11637         widened to `double' or `float'.
11638         (valid_method_invocation_conversion_p): Added leading
11639         comment. Fixed tabulation.
11640         (build_string_concatenation): Optimize out left or right empty
11641         string constants.
11642
11643 1999-01-28  Per Bothner  <bothner@cygnus.com>
11644
11645         * jcf-write.c (localvar_alloc):  Only emit entry for
11646         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
11647         (generate_bytecode_insns):  Only call put_linenumber if
11648         debug_info_level > DINFO_LEVEL_NONE.
11649         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
11650         is specified, add -g1 (for compatibility wih javac).
11651
11652 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
11653
11654         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
11655         gjavah.o, check-init.o, jv-scan.o
11656
11657 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11658
11659         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
11660
11661         * gjavah.c: Include config.h and system.h.
11662
11663         * javaop.h (inline): Don't define, its handled by system.h.
11664         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
11665         from `inline' to `static inline'.
11666
11667         * jcf.h (inline): Don't define, its handled by system.h.
11668
11669         * lex.c (inline): Likewise.
11670
11671 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
11672
11673         * lang-specs.h: Map -Qn to -fno-ident.
11674
11675 1999-01-29  Richard Henderson  <rth@cygnus.com>
11676
11677         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
11678
11679 1999-01-29  Tom Tromey  <tromey@cygnus.com>
11680
11681         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
11682         then cast it to Object before calling `append' method.
11683
11684 1999-01-28  Per Bothner  <bothner@cygnus.com>
11685
11686         * check-init.c (check_bool2_init, check_bool_init, check_init):
11687         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
11688         * jcf-write.c (generate_bytecode_insns):  Likewise.
11689
11690 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11691
11692         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
11693         * parse.y (patch_cast): Allow a boolean to be cast into a
11694         boolean.
11695
11696 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11697
11698         * parse.y: (class_declaration:): Fixed indentation.
11699         (class_member_declaration:): Extra `;' after field declaration now
11700         accepted.
11701         (interface_declaration:): Removed debug messages in error reports.
11702         (patch_binop): Nodes created and returned inherit the orignal
11703         node's COMPOUND_ASSIGN_P flag value.
11704         (patch_cast): Fix cast from char to floating point.
11705
11706 1999-01-25  Andrew Haley  <aph@cygnus.com>
11707
11708         * except.c, java-except.h (expand_resume_after_catch): new
11709         function.
11710         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
11711         to branch back to main flow of control after a catch block.
11712
11713 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11714
11715         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
11716         $(srcdir)/../system.h.
11717         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
11718         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
11719         (jcf-write.o): Likewise.
11720         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11721         (mangle.o): Depend on $(srcdir)/../toplev.h.
11722         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11723         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11724
11725         * class.c: Include output.h and parse.h.
11726         (mangled_classname): Add the `const' keyword to a char*.
11727         (find_named_method): Hide unused function definition.
11728         (build_utf8_ref): Change type of variable `c' to unsigned char.
11729         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
11730         (build_class_ref): Add the `const' keyword to a char*.
11731         (layout_class_method): Remove unused variable `buf'.
11732
11733         * decl.c (find_local_variable): Remove unused variable `rtl'.
11734         (pushdecl): Likewise for variables `different_binding_level' and
11735         `oldglobal'.
11736         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
11737         (maybe_build_cleanup): Likewise for parameter `decl'.
11738
11739         * except.c (expand_start_java_handler): Mark parameter `range'
11740         with ATTRIBUTE_UNUSED.
11741
11742         * expr.c: Include except.h.
11743         (pop_type): Remove unused variable `i'.
11744         (pop_value): Likewise for variables `n_words' and `i'.
11745         (expand_java_arrayload): Likewise for variable `convert'.
11746         (java_lang_expand_expr): Likewise for variables `op0', `type',
11747         `mode', `unsignedp', `node' and `elements'.
11748         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
11749         `eh_ranges'.
11750         (process_jvm_instruction): Add a `const' qualifier to a char*.
11751
11752         * gjavah.c (output_directory): Add the `const' keyword to a char*.
11753         (temp_directory): Likewise.
11754         (print_c_decl): Likewise.
11755         (print_method_info): Likewise.
11756         (decode_signature_piece): Likewise.
11757         (print_mangled_classname): Likewise.
11758
11759         * java-except.h: Provide prototypes for maybe_start_try,
11760         maybe_end_try and add_handler.
11761
11762         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
11763         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
11764         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
11765         init_expr_processing, push_super_field, init_class_processing,
11766         can_widen_reference_to, class_depth, verify_jvm_instructions,
11767         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
11768         set_local_type, merge_type_state, push_type, load_type_state,
11769         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
11770         emit_unicode_mangled_name): Add prototypes.
11771
11772         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
11773         (print_signature_type): Use ISDIGIT, not isdigit.
11774         (print_signature): Remove unused variable `j'.
11775
11776         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
11777         int when comparing against one.
11778
11779         * jcf-parse.c: Include toplev.h.
11780
11781         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
11782         (localvar_free): Remove unused variable `i'.
11783         (generate_bytecode_conditional): Likewise for variable `kind'.
11784
11785         * jv-scan.c: Include config.h and system.h.  Remove redundant
11786         OS header and gansidecl.h includes.
11787         (warning): Add the `const' keyword to a char*.  Also add
11788         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
11789         __STDC__, when determining whether to use ANSI-isms.
11790         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
11791         (xmalloc): Don't redundantly prototype here.
11792         (main): Remove unused parameter `envp'.  Also fix the arguments
11793         passed to function `fatal' to match the format specifier.
11794
11795         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
11796
11797         * mangle.c: Include toplev.h.
11798         (emit_unicode_mangled_name): Declare parameter `len'.
11799
11800         * parse.y (parse_warning_context): Add the `const' keyword to a
11801         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
11802         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
11803         (issue_warning_error_from_context): Add the `const' keyword to
11804         a char*.
11805         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
11806         not `__STDC__' for whether to use ANSI-isms.
11807
11808         * typeck.c (incomplete_type_error): Mark parameters `value' and
11809         `type' with ATTRIBUTE_UNUSED.
11810         (parse_signature_type): Use ISDIGIT, not isdigit.
11811
11812         * verify.c (check_pending_block): Add the `const' keyword to a char*.
11813         (verify_jvm_instructions): Likewise.  Remove unused variables
11814         `field_name' and `default_val'.
11815
11816         * zextract.c: Include config.h and system.h.  Remove redundant
11817         OS header includes.
11818
11819         * zipfile.h: Prototype `read_zip_archive'.
11820
11821 1999-01-21  Andrew Haley  <aph@cygnus.com>
11822
11823         * typeck.c (convert): Allow conversions to void type: some
11824         optimizations in gcc do this.
11825
11826 1999-01-21  Andrew Haley  <aph@cygnus.com>
11827
11828         * typeck.c (convert_ieee_real_to_integer): New function.
11829         (convert): When not using fast-math and using hardware fp, convert
11830         an IEEE NaN to zero.
11831
11832 1999-01-18  Andrew Haley  <aph@cygnus.com>
11833
11834         * parse.y (patch_binop): Do a type conversion from signed to
11835         unsigned and then back to signed when a ">>>" is found.
11836
11837 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11838
11839         * java-tree.h: (check_for_initialization): Added prototype.
11840         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
11841         * parse.y (do_resolve_class): Removed unused locals.
11842         (read_import_dir): Likewise.
11843         (resolve_qualified_expression_name): Array creation
11844         expressions are valid primary expressions.
11845         (qualify_ambiguous_name): Likewise.
11846         (patch_synchronized_statement): Removed unused local.
11847
11848 1999-01-17  Jeffrey A Law  (law@cygnus.com)
11849
11850         * Makefile.in (zextract.o): Add dependencies.
11851
11852         * Makefile.in: Do not put ^Ls at the start of a line.
11853
11854 1999-01-15  Per Bothner  <bothner@cygnus.com>
11855
11856         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
11857         sub-type the result of the call that gets the exception value.
11858
11859         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
11860         don't call finish_class.
11861
11862         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
11863         clear found before continuing.
11864
11865         * verify.c (verify_jvm_instructions):  On an array load, allow
11866         and handle top of stack to be TYPE_NULL.
11867
11868         * gjavah.c (generate_access):  Translate Java package private or
11869         protected access to C++ public, but with a comment.
11870
11871 1999-01-13  Andrew Haley  <aph@cygnus.com>
11872
11873         * expr.c (generate_name): Name prefix changed to avoid clashes
11874         with assembler temp labels.
11875
11876         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
11877         MODIFY_EXPR.  Without this, code for the assignment may not be
11878         generated at all and the synchronized statement will read an
11879         uninitialized variable.
11880
11881 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11882
11883         * class.c (maybe_layout_super_class): Fixed returned value.
11884         * lex.c: Added 1999 to the copyright.
11885         (java_init_lex): Initialize java_lang_imported.
11886         * lex.h: Added 1999 to the copyright.
11887         * parse.h: Added 1999 to the copyright.
11888         (REGISTER_IMPORT): Fixed typo in trailing macro.
11889         (CURRENT_OSB): New macro.
11890         (struct parser_ctxt): New fields osb_depth, osb_limit.
11891         * parse.y (java_lang_id): New global variable.
11892         (type_import_on_demand_declaration): Don't import java.lang.* twice.
11893         (array_creation_expression:): Use CURRENT_OSB.
11894         (dims:): Uses a stack to keep track of array dimensions.
11895         (cast_expression:): Use CURRENT_OSB.
11896         (find_expr_with_wfl): Return NULL if node found doesn't meet the
11897         conditions.
11898         (register_fields): Fixed typos in comment.
11899         (check_method_redefinition): Fixed comment indentation.
11900         (java_check_regular_methods): Set saved found wfl to NULL after
11901         having reinstalled it in the previously found DECL_NAME.
11902
11903 1999-01-10  Richard Henderson  <rth@cygnus.com>
11904
11905         * gjavah.c (java_float_finite): Use a union to do type punning.
11906         (java_double_finite): Likewise.
11907
11908 1999-01-09  Per Bothner  <bothner@cygnus.com>
11909
11910         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
11911         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
11912         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
11913         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
11914         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
11915         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
11916
11917 1999-01-08  Per Bothner  <bothner@cygnus.com>
11918
11919         * check-init.c (check_init):  If compiling to native, we don't
11920         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
11921
11922 1999-01-08  Tom Tromey  <tromey@cygnus.com>
11923
11924         * parse-scan.y (variable_declarator_id): Set or increment
11925         bracket_count.
11926         (bracket_count): New global.
11927         (formal_parameter): Handle case where bracket pairs trail variable
11928         declarator id.
11929
11930 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
11931
11932         * jcf-parse.c (yyparse): variable len changed from a char to an
11933         int to prevent overflow.
11934
11935 1999-01-06  Per Bothner  <bothner@cygnus.com>
11936
11937         * java-tree.h:  Declare read_class.
11938         * jcf-parse.c (read_class):  New function.
11939         (load_class):  Now just call read_class.
11940
11941         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
11942         * jcf-parse.c (parse_source_file):  Declare save_error_count,
11943         which is needed by java_parse_abort_on_error macro,
11944         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
11945
11946         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
11947         constructor, if initializing a static field.
11948         (patch_new_array_init):  Set TREE_CONSTANT if it is.
11949         * expr.c (java_lang_expand_expr):  For a static array constructor
11950         of primitive elements, allocate the array itself statically.
11951         Disabled until we can set the vtable field statically.
11952
11953         * check-init.c:  New file.  Checks for definite assignment.
11954         * Makefile.in (JAVA_OBJS):  Add check-init.o.
11955         * parse.y (java_complete_expand_method): Call check_for_initialization.
11956         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
11957
11958 1999-01-06  Graham <grahams@rcp.co.uk>
11959
11960         * parse.y : include system.h instead of including
11961         standard headers directly with the exception of <dirent.h>.
11962
11963 1999-01-06  Per Bothner  <bothner@cygnus.com>
11964
11965         * lex.h:  Moved static function declarations to lex.c,
11966         to shut up some -Wall warnings.
11967         * lex.c:  Static function declarations moved here.
11968         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
11969
11970 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11971
11972         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
11973
11974 1998-12-22  Per Bothner  <bothner@cygnus.com>
11975
11976         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
11977         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
11978
11979         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
11980         (localvar_alloc):  Change return type to void,
11981         (emit_unop):  Remove unused variable size.
11982
11983         * jcf-write.c (struct jcf_block):  Add new union.
11984         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
11985         (call_cleanups):  New functions.
11986         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
11987         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
11988         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
11989         * lang.c (lang_init):  Call using_eh_for_cleanups.
11990         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
11991         completing operands to patch_synchronized_statement.
11992         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
11993         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
11994         WITH_CLEANUP_EXPR instead of TRY_EXPR.
11995
11996 1998-12-20  John F. Carr  <jfc@mit.edu>
11997
11998         * Make-lang.in: Comment out control-Ls; they upset some makes.
11999
12000 1998-12-18  Tom Tromey  <tromey@cygnus.com>
12001
12002         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12003         consistently.
12004
12005 1998-12-17  Tom Tromey  <tromey@cygnus.com>
12006
12007         * parse.y (DIR_SEPARATOR): New define.
12008         (check_class_interface_creation): Use it.
12009
12010         * parse-scan.y (report_main_declaration): Recognize
12011         `java.lang.String' in argument to main.
12012
12013 1998-12-16  Per Bothner  <bothner@cygnus.com>
12014
12015         * parse.y (create_interface):  Remove bogus test.
12016
12017 1998-12-16  Per Bothner  <bothner@cygnus.com>
12018
12019         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
12020         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
12021
12022 1998-12-16  Tom Tromey  <tromey@cygnus.com>
12023
12024         * parse-scan.y (qualified_name): Use correct sprintf format.
12025
12026 1998-12-15  Tom Tromey  <tromey@cygnus.com>
12027
12028         * gjavah.c (print_field_info): Changed how most negative number is
12029         printed.
12030
12031 1998-12-14  Per Bothner  <bothner@cygnus.com>
12032
12033         * parse.y (fold_constant_for_init):  New function.
12034         (resolve_expression_name):  Don't replace static final
12035         constant-initialized fields by its value.
12036         (java_complete_lhs):  New.  Same as java_complete_tree, except does
12037         not replace static final constant-initialized fields by their values.
12038         (register_fields):  If there is an initializer, set DECL_INITIAL and
12039         MODIFY_EXPR_FROM_INITIALIZATION_P.
12040         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
12041         Only call patch_initialized_static_field if
12042         MODIFY_EXPR_FROM_INITIALIZATION_P.
12043         (patch_initialized_static_field):  If not valid constant, clear
12044         DECL_INITIAL.
12045
12046         * parse.y (lookup_field_wrapper):  Fix thinko.
12047
12048         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
12049         set and restore global lineno.
12050
12051 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12052
12053         * gjavah.c (print_field_info): If value to print is the smallest
12054         value of its size, then print as hex to avoid later warnings from
12055         C++ compiler.
12056
12057 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12058
12059         * gjavah.c (decompile_method): Decompile `return null'.
12060         (process_file): Generate `#pragma interface'.
12061         (method_declared): New global.
12062         (print_method_info): Set it.
12063         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12064         (print_method_info): Handle abstract methods.
12065
12066 1998-12-13  Per Bothner  <bothner@cygnus.com>
12067
12068         * parse.y (patch_method_invocation):  If class_decl is null
12069         (e.g. an array type), use original type.
12070
12071         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
12072         errors about uncaught exception from clone (of array, specifically).
12073
12074 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12075
12076         * gjavah.c (decompile_method): Handle all types of `return'
12077         opcode.  Decompile `return this' and `return'.
12078         (method_access): New global.
12079         (print_method_info): Set it.
12080         (decompile_method): Don't decompile a synchronized method.
12081
12082 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12083
12084         * jcf-reader.c (jcf_parse_one_method): Recognize
12085         HANDLE_END_METHOD.
12086         * gjavah.c (HANDLE_END_METHOD): New macro.
12087         (HANDLE_CODE_ATTRIBUTE): New macro.
12088         (decompile_method): New function.
12089         (print_method_info): Don't print `;\n' at end of function decl.
12090         Include java-opcodes.h.
12091         (decompiled): New global.
12092
12093 1998-12-12  Per Bothner  <bothner@cygnus.com>
12094
12095         * class.c (build_class_ref):  Handle PRIMTYPE.class if
12096         flag_emit_class_files.
12097         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
12098         if flag_emit_class_files.
12099         * parse.y (java_complete_tree):  Pre-liminary support for
12100         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12101
12102         * parse.y (patch_synchronized_statement):   Don't call monitorexit
12103         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
12104
12105         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
12106
12107         * zipfile.h (opendir_in_zip):  New declaration.
12108         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
12109         (opendir_in_zip):  New function, using code from open_in_zip.
12110         (open_in_zip):  Call opendir_in_zip.
12111         (find_class):  Remove no-longer-used do_class_file parameter,
12112         but add source_ok parameter.  Change logic so if we find a .java file,
12113         we don't look for .class in later classpath emtries.
12114         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
12115         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
12116         * gjavah.c: Update call to find_class.
12117         * jcf-dump.c:  Likewise.
12118
12119         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
12120         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
12121         nothing if body is empty_stmt_node.
12122         Various little fixes so SP gets correctly adjusted.
12123         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12124         For CALL_EXPR, test if static first.
12125         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
12126         such as the ones we create for Object and Class.
12127         Set and restore current_function_decl.
12128         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12129         (note_possible_classname):  New function.
12130         (read_import_entry):  Removed.  Merged with read_import_dir.
12131         (read_import_dir):  Don't call find_class - that only gives us
12132         the first classpath entry having the needed package.
12133         Use the struct buffer data structure from buffer.h.
12134         (read_import_dir, find_in_imports_on_demand):  The remembered
12135         class names now use '.' (not '/') as package separator.
12136
12137         * parse.y (java_complete_expand_methods):  Call write_classfile
12138         here, and not in java_expand_classes (which only gets first class).
12139
12140 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12141
12142         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
12143         (register_fields):  If a static fields has an initializer, just
12144         chain it on ctxp->static_initialized, and handle later.
12145         (java_complete_expand_methods):  Force <clinit> first.
12146         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
12147         - it's already been completed.
12148         (patch_initialized_static_field):  New function.
12149         (java_complete_field):  Call it.
12150
12151 1998-12-12  Per Bothner  <bothner@cygnus.com>
12152
12153         * expr.c (encode_newarray_type, build_new_array):  New functions.
12154         * java-tree.h:  Declare build_new_array.
12155         * jcf-write.c (patch_newarray):  Use build_new_array.
12156
12157         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
12158         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
12159
12160         * parse.y (patch_new_array_init):  Re-organize.
12161         Now is passed the actual array (pointer) type of the value.
12162         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12163         (patch_array_constructor):  Removed - merged into patch_new_array_init.
12164         (java_complete_tree):  Update patch_new_array_init.
12165
12166         * jcf-write.c (find_constant_index):  New function.
12167         (generate_bytecode_insns):  Use find_constant_index.
12168         (generate_classfile):  Use find_constant_index for ConstantValue.
12169
12170 1998-12-11  Tom Tromey  <tromey@cygnus.com>
12171
12172         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12173         * decl.c (init_decl_processing): Renamed dtable -> vtable.
12174         * class.c (make_class_data): Renamed dtable -> vtable, and
12175         dtable_method_count -> vtable_method_count.
12176
12177 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12178
12179         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12180         global variables, initialized.
12181         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12182         Declared new global variables.
12183         * lex.c (java_lex): Return long_zero_node, float_zero_node,
12184         double_zero_node, integer_zero_node upon direct matching.
12185         * parse.y (purify_type_name): Added function prototype.
12186         (duplicate_declaration_error_p): Consider new_type as potentially
12187         being a incomplete type. Use purify_type_name on type string.
12188         (method_header): saved_type: unused variable removed. Don't figure
12189         return type if method name is invalid.
12190         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12191         processed by patch_unaryop.
12192         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12193         increment/decrement node into its original type after binary
12194         numeric promotion on its operands.
12195
12196 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12197
12198         * parse.y (array_initializer:): Array init operand is NULL_TREE
12199         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12200         now an error. Fixed indentation problems.
12201         (patch_string): Handle error_mark_node as an argument.
12202         (patch_new_array_init): Fixed indentation problems.
12203         (array_constructor_check_entry): Removed check on null wfl_value.
12204         Return an error if wfl_value's walk returns an error.
12205
12206 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12207
12208         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12209         * lex.c (java_lex): Remember column position before advancing one
12210         token. Retain location information on OCB_TK.
12211         * lex.h (typedef struct java_lc): Added new field.
12212         * parse.h (GET_SKIP_TYPE): New macro.
12213         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12214         * parse.y (build_new_array_init, patch_new_array_init,
12215         patch_array_constructor, maybe_build_array_element_wfl,
12216         array_constructor_check_entry): New function prototypes.
12217         (switch_block:): Tagged <node>.
12218         (OCB_TK): Tagged <operator>.
12219         (array_initializer:): Installed actions.
12220         (variable_initializer): Build location information on element if
12221         necessary.
12222         (switch_statement:): Fixed indentation typo.
12223         (switch_block:): Redefined default action.
12224         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12225         (patch_assignment): Removed duplicate code.
12226         (maybe_build_array_element_wfl, build_new_array_init,
12227         patch_new_array_init, patch_array_constructor,
12228         array_constructor_check_entry): New functions.
12229
12230 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12231
12232         * parse.y (array_initializer): Tagged <node>.
12233         (variable_initializer:): Use default rule.
12234         (array_initializer:): Defined actions.
12235         (variable_initializers:): Likewise.
12236         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12237         non-static field accesses.
12238         (patch_invoke): Fixed indentation typo.
12239         (java_complete_tree): Likewise.
12240         (build_labeled_block): Changed leading comment. Generate an error
12241         in case of duplicate loop labels.
12242         (patch_conditional_expr): Patch results of string concatenation
12243         operations.
12244
12245 1998-12-06  Per Bothner  <bothner@cygnus.com>
12246
12247         * constants.c (find_methodref_index):  When the class is an interface,
12248         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12249
12250         * decl.c (finit_identifier_node):  Use "$finit$", rather than
12251         "<finit>" (which Sun's verifier rejects).
12252         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
12253         (generate_field_initialization_code):  Removed.
12254         (fix_constructors)  Don't add call to $finit$ here (wrong order).
12255         (patch_method_invocation):  Add $finit$ call here.
12256
12257         * java-tree.h (CALL_USING_SUPER):  New macro.
12258         * parse.y (patch_invoke):  Remove im local variable.
12259         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
12260         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
12261         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
12262
12263         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
12264
12265         * parse.y (java_complete_tree):  Don't complain about unreachable
12266         statement if it is empty_stmt_node.
12267
12268         * jcf-write.c (find_constant_wide):  New function.
12269         (push_long_const):  Use find_constant_wide.
12270
12271         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
12272         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
12273         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12274         Emit invokeinterface when calling an interface method.
12275         Emit invokespecial also when calling super or private methods.
12276
12277         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
12278
12279 1998-12-06  Per Bothner  <bothner@cygnus.com>
12280
12281         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
12282
12283 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12284
12285         * java-tree.h (java_layout_seen_class_methods): New function
12286         prototype.
12287         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12288         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12289         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12290         * parse.y (method_declarator:): Defined action.
12291         (issue_warning_error_from_context): input_filename saved, set to
12292         the appropriate value and restored after java_error is called.
12293         (build_unresolved_array_type): Fixed comment.
12294         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12295         (method_header): Deal with return type the same way type are
12296         handled for fields and method's parameters and local variables
12297         types are handled.
12298         (check_method_redefinition): Removed extra CR.
12299         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12300         (java_layout_seen_class_methods): New function.
12301         (java_layout_classes): Call java_layout_seen_class_methods.
12302
12303 1998-12-03  Per Bothner  <bothner@cygnus.com>
12304
12305         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
12306
12307 1998-12-03  Per Bothner  <bothner@cygnus.com>
12308
12309         * jcf-dump.c (main):  Fix error message.
12310         * jcf-path.c (add_entry):  Style fix.
12311
12312 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12313
12314         * class.c (layout_class_method): Call build_java_argument_signature
12315         on constructors too.
12316         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12317         (patch_method_invocation): Define a primary when resolving an
12318         expression name. Augmented comment on code checking illegal `this'
12319         usage. Loosened it test by accepting NEW_CLASS_EXPR.
12320
12321 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12322
12323         * class.c (layout_class_method): Don't report error on non-static
12324         overriding static if the method is private.
12325         * java-tree.h (finish_class): Prototype added.
12326         * lex.c (java_get_line_col): Handle col argument -2 value.
12327         * parse.h: All static method declarations moved to parse.y.
12328         * parse.y: Now contains all static method declarations previously
12329         found in parse.h.
12330         (find_expr_with_wfl, missing_return_error,
12331         unreachable_stmt_error): New functions.
12332         (java_get_real_method_name): Identify constructors bearing class
12333         names in source code compiled classes only.
12334         (java_complete_expand_methods): Call missing_return_error.
12335         (invocation_mode): Private methods invoked as static methods.
12336         (java_complete_tree): Call unreachable_stmt_error.
12337
12338 1998-12-01  Tom Tromey  <tromey@cygnus.com>
12339
12340         * Makefile.in (+target): Removed.
12341         (+xmake_file): Likewise.
12342         (+tmake_file): Likewise.
12343         (.NOEXPORT): Removed duplicate.
12344
12345 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12346
12347         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12348
12349         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
12350
12351         * jvgenmain.c: Remove the xmalloc prototype, we get it from
12352         libiberty.h.  Provide an xmalloc definition.
12353
12354         * jvspec.c: Remove the xmalloc prototype.
12355
12356         * parse-scan.y: Include config.h and system.h.  Don't include
12357         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
12358         Provide an xstrdup definition.
12359
12360 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
12361
12362         * jcf-path.c (add_entry): Recognize ".jar" too.
12363         * lang-specs.h: Likewise.
12364
12365 1998-11-26  Per Bothner  <bothner@cygnus.com>
12366
12367         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
12368         soft_monitorenter_node, soft_monitorexit_node, throw_node.
12369
12370         * jcf-write.c (generate_bytecode_insns):
12371         Handle pre/post-increment/decrement of long.
12372
12373         * jcf-write.c (generate_bytecode_insns):
12374         Handle missing exception handler (finally for synchronized).
12375
12376 1998-11-25  Per Bothner  <bothner@cygnus.com>
12377
12378         * java-tree.h (end_params_node):  Declare global.
12379         * decl.c (end_params_node):  New global.
12380         (init_decl_processing, start_java_method):  Use end_params_node for
12381         end of list of parameter types.  Follows correct gcc conventions.
12382         * expr.c (pop_argument_types, pop_arguments):  Likewise.
12383         * lang.c (put_decl_node):  Likewise.
12384         * typeck.c (various places):  Likewise.
12385         * class.y (various places):  Likewise.
12386         * parse.y (various places):  Likewise.
12387
12388         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
12389         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
12390
12391         * class.c:  Add #include flags.h, remove no-longer needed declaration.
12392
12393         * class.c (layout_class_method):  Remove commented-out code, re-format.
12394         Don't add vtable entry (or index) for private methods.
12395         * expr.c (expand_invoke):  A private method is implicitly final.
12396         * class.c (make_class_data):  If inlining or optimizing,
12397         skip private methods.
12398
12399         * class.c (finish_class):  New function.  Calls existing methods,
12400         but alls emits deferred inline functions.
12401         * jcf-parse.c (parse_class_file):  Call finish_class.
12402         * parse.y (java_complete_expand_methods):  Likewise.
12403
12404         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
12405
12406         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
12407
12408 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
12409
12410         * jcf-write.c (generate_bytecode_conditional): Fix typo.
12411
12412 1998-11-24  Per Bothner  <bothner@cygnus.com>
12413
12414         * (generate_classfile): Always write class access flag with
12415         ACC_SUPER set.
12416
12417 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12418
12419         * class.c (maybe_layout_super_class): New function.
12420         (layout_class): Reorganized. Loop on class methods dispatched into
12421         a new function. Call maybe_layout_super_class.
12422         (layout_class_methods, layout_class_method): New functions.
12423         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12424         class.
12425         (expand_invoke): Likewise.
12426         * java-tree.h (all_class_list): New global variable declared.
12427         (layout_class_methods, layout_class_method): New function
12428         prototypes.
12429         (LAYOUT_SEEN_CLASS_METHODS): New macro.
12430         * jcf-parse.c (all_class_list): New global variable.
12431         (load_class): Extended what class_or_name can be. Use parser
12432         context mechanism to save globals before calling jcf_parse.
12433         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12434         is set on the file name.
12435         (jcf_parse): Layout class methods when Object is loaded, otherwise
12436         record class in all_class_list for delayed method layout.
12437         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12438         * lang.c (put_decl_node): Decode <init> into the decl context
12439         class name.
12440         * lex.c (java_allocate_new_line): Use xmalloc.
12441         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12442         pointers, not TREE_LIST elements.
12443         (struct parser_ctxt): Fixed comment indentations, added comments
12444         and reordered some fields.
12445         (java_check_methods): Function prototype removed.
12446         * parse.y (java_push_parser_context): Use xmalloc.
12447         (java_parser_context_restore_global): Pop extra pushed ctxp only
12448         when there's nothing next.
12449         (maybe_create_class_interface_decl): Fixed comment, add new
12450         created class decl to all_class_list.
12451         (method_header): Use GET_REAL_TYPE on argument's types.
12452         (method_declarator): Use GET_REAL_TYPE, change type to the real
12453         type in TREE_LIST dependency node. Build argument list with the
12454         real type.
12455         (create_jdep_list): Use xmalloc. Removed allocation error message.
12456         (obtain_incomplete_type): Fixed leading comment. Broadened
12457         incoming argument meaning.
12458         (register_incomplete_type): Use xmalloc. Removed allocation error
12459         message.
12460         (safe_layout_class): Fixed leading comment.
12461         (jdep_resolve_class): Reversed if statement condition and switch
12462         if and else bodies.
12463         (resolve_and_layout): Fixed leading comment. Broadened incoming
12464         argument meaning.
12465         (complete_class_report_errors): New local variable name, for
12466         clarity. purify_type_name used for all error cases.
12467         (java_get_real_method_name): Stricter check on constructors.
12468         (java_check_regular_methods): Reverse methods list only if not
12469         already laid out. Layout artificial constructor.
12470         (java_check_methods): Deleted.
12471         (source_start_java_method): Obtain incomplete type for patchable
12472         method arguments.
12473         (java_layout_classes): Fixed leading comment. Use
12474         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12475         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12476         before returning. Fixed comments.
12477         (java_expand_classes): Check for errors up front.
12478         (patch_method_invocation): Class to search is resolved and laid
12479         out.
12480
12481 1998-11-24  Per Bothner  <bothner@cygnus.com>
12482
12483         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
12484
12485         * javaop.h (int8):  Removed - not used.
12486         (jbyte):  Redefine portably with correct signedness.
12487
12488         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
12489
12490         * jcf-write.c (generate_bytecode_insns):  Fix typo
12491         OPCODE_getstatic to OPCODE_getfield.
12492
12493         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
12494         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
12495         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12496
12497 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12498
12499         * jcf-parse.c (jcf_parse_source): Function returned type is
12500         void. Added prototype.
12501         (jcf_parse): Function returned type is void.
12502         (yyparse): Remove call to fclose on the last parsed file.
12503
12504         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12505
12506 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12507
12508         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12509         (layout_class): Cope with methods featuring WFL in decl names.
12510         * decl.c (unqualified_object_id_node): New global variable,
12511         initialized.
12512         (build_decl_no_layout): Removed.
12513         * expr.c (build_primtype_type_ref): Handle Double.
12514         (java_lang_expand_expr): Fixed indentations.
12515         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12516         (flag_wall, flag_redundant, flag_not_overriding,
12517         flag_static_local_jdk1_1, unqualified_object_id_node): Global
12518         variable declarations.
12519         (build_decl_no_layout): Removed prototype.
12520         (java_get_real_method_name): Added prototype.
12521         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12522         (java_parse_abort_on_error): Macro now just returns.
12523         * jcf-parse.c (jcf_parse_source): Check fclose returned
12524         value. Call emit_register_classes if java_report_errors returns
12525         zero.
12526         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12527         flag_static_local_jdk1_1): New integer flags.
12528         (lang_decode_option): New flags set here.
12529         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12530         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12531         the flag_redundant variable.
12532         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12533         when parsing java.lang.Object class.
12534         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12535         NULL_TREE to build.
12536         (resolve_qualified_expression_name): Fixed indentation.
12537         (patch_array_ref): Changed prototype.
12538         (not_initialized_as_it_should_p): Prototype removed.
12539         (java_report_errors): Added function prototype.
12540         * parse.y (formal_parameter:): Changed error message for not yet
12541         supported final parameters.
12542         (class_type_list:): Set both PURPOSE and VALUE of created
12543         TREE_LIST to be class_type.
12544         (primary_no_new_array:): Handle class literals on primitive types.
12545         (parse_warning_context): Reinstalled correct force_error and
12546         do_warning flags setups.
12547         (java_report_errors): Changed prototype. Return java_error_count
12548         value.
12549         (variable_redefinition_error): Consider treating variable type as
12550         a fake pointer.
12551         (create_interface): Warn about redundant abstract modifier if
12552         flag_redundant is set. Changed error message.
12553         (lookup_field_wrapper): Save/restore globals before/after looking
12554         up field.
12555         (duplicate_declaration_error_p): Consider treating declaration
12556         type as a fake pointer.
12557         (register_fields): Extract real type from dependency node. Check
12558         for duplicate field declaration after type adjustment. Use
12559         DECL_INITIAL to store static final initialized values.
12560         (method_header): Extract real function type from dependency node.
12561         (check_abstract_method_header): Use GET_METHOD_NAME.
12562         (obtain_incomplete_type): Layout fake pointer type.
12563         (safe_layout_class): Don't try to check for methods before layout.
12564         (java_complete_class): Don't check for correct throws clause
12565         elements inheritance here.
12566         (resolve_and_layout): Broadened name parameter meaning.
12567         (reset_method_name): Use GET_METHOD_NAME.
12568         (java_get_real_method_name): New function.
12569         (java_check_regular_methods): Don't check methods in
12570         java.lang.Object.  Verify lineage of throws clause elements. Use
12571         flag_no_overriding in warning report.
12572         (check_throws_clauses): Don't check if class was from
12573         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12574         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12575         (declare_local_variables): Use flag_static_local_jdk1_1 to report
12576         warning on unsupported final local variables. Use build_decl
12577         instead of build_decl_no_layout. Get real local variable type from
12578         dependency node.
12579         (source_start_java_method): Get real parameter type from
12580         dependency node. Call build_decl instead of build_decl_no_layout.
12581         (java_layout_classes): Reverse tree and layout type and class as
12582         required. Mark class as loaded when done.
12583         (resolve_field_access): Fixed indentation. Restricted condition
12584         leading to static field access code generation. Set field_type
12585         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12586         (resolve_qualified_expression_name): Initialize type_found to
12587         null. Handle static field resolved during qualification. Fixed
12588         layout on non primitive field decl types.
12589         (not_accessible_p): Fixed typo in comment.
12590         (patch_method_invocation): Resolve and layout class to search from
12591         type.
12592         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12593         layout non primitive type, if necessary. Make method node only to
12594         report errors.
12595         (find_applicable_accessible_methods_list): Consider WFL'ed method
12596         decl names. Fixed indentation.
12597         (argument_types_convertible): Resolve and layout target type if
12598         necessary.
12599         (java_complete_tree): Fixed indentation problems. Rewrote
12600         CALL_EXPR thrown exceptions check. Re-installed further processing
12601         of the assignment in certain cases.
12602         (patch_assignment): Call maybe_build_primttype_type_ref to perform
12603         inlining on class literals.
12604         (valid_builtin_assignconv_identity_widening_p): Cope with constant
12605         0 literal.
12606         (valid_method_invocation_conversion_p): Likewise.
12607         (patch_string): Temporary disable forbidden use of `this' in
12608         explicit constructor invocations when doing string concatenation
12609         within their scope.
12610         (patch_unaryop): Added comment. Reinstalled code to disable
12611         further check on assignment operation with cast expression RHS.
12612         (patch_switch_statement): Fixed indentation.
12613         (build_try_statement): Call build_decl instead of
12614         build_decl_no_layout.
12615         (patch_synchronized_statement): Likewise.
12616         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12617         IS_UNCHECKED_EXPRESSION_P.
12618         (check_thrown_exceptions_do): Changed leading comment. Resolve and
12619         layout argument exception type.
12620         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12621         of IS_UNCHECKED_EXPRESSION_P.
12622
12623 1998-11-18  Anthony Green  <green@cygnus.com>
12624
12625         * jcf-parse.c (yyparse): Open class file in binary mode.
12626
12627 1998-11-15  Per Bothner  <bothner@cygnus.com>
12628
12629         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
12630
12631         * jcf-write.c (perform_relocations):  Move check out one loop.
12632
12633 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
12634
12635         * Make-lang.in: Fix reference to srcdir.
12636         * jv-scan.c: Add missing xmalloc prototype.
12637         * jvgenmain.c: Ditto.
12638
12639 1998-11-15  Per Bothner  <bothner@cygnus.com>
12640
12641         * decl.c (error_mark_node), java-tree.h:  New global.
12642         * parse.y:  Use empty_stmt_node instead of size_zero_node.
12643         (build_if_else_statement):  If missing else, use empty_stmt_node.
12644
12645         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
12646         (java_complete_expand_method):  Complain if return is missing.
12647         (java_check_regular_methods):  Comment out incorrect error check.
12648         (not_accessible_p):  Fix incorrect handling of protected methods.
12649         (patch_method_invocation):  Pass correct context to not_accessible_p.
12650         (find_applicable_accessible_methods_list):  Likewise.
12651         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
12652         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
12653         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
12654         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
12655
12656         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
12657         (push_int_const):  Remove reundant NOTE_PUSH.
12658         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
12659         (- case SWITCH_EXPR):  Fix code generation bug.
12660         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
12661         (generate_classfile):  More robust for abstract methods.
12662
12663 1998-11-15  Anthony Green  <green@cygnus.com>
12664
12665         * Makefile.in: jv-scan and jvgenmain all require libiberty.
12666         * Make-lang.in: Ditto.
12667
12668         * jv-scan.c: Remove xmalloc and xstrdup definitions.
12669         * jvgenmain: Ditto.
12670
12671 1998-11-15  Per Bothner  <bothner@cygnus.com>
12672
12673         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
12674
12675         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
12676
12677 1998-11-14  Per Bothner  <bothner@cygnus.com>
12678
12679         Allow uses of interface types to verify.  This is not really
12680         type-safe, but it matches what Sun does, and is OK as long as
12681         there are appropriate run-time checks.
12682         * verify.c (merge_types):  If merging two interface types,
12683         just set the result to java.lang.Object.
12684         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
12685
12686 1998-11-13  Tom Tromey  <tromey@cygnus.com>
12687
12688         * gjavah.c (main): Handle --output-class-directory argument.
12689         * jvspec.c (lang_specific_driver): Translate `-d' into
12690         -foutput-class-dir.
12691         * jcf.h (jcf_write_base_directory): Declare.
12692         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
12693         * lang-options.h: Mention -foutput-class-dir.
12694         * jcf-write.c (jcf_write_base_directory): New global.
12695         (make_class_file_name): Put generated .class file into `-d'
12696         directory, or into source directory if -d not given.  Function now
12697         static.
12698         (write_classfile): Free class file name.  Handle case where class
12699         file name is NULL.
12700         (DIR_SEPARATOR): New macro.
12701         Include <sys/stat.h>
12702
12703         * Makefile.in (prefix): New macro.
12704
12705 1998-11-12  Per Bothner  <bothner@cygnus.com>
12706
12707         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
12708         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
12709         here (done in patch_invoke instead).
12710         (case_identity):  Moved here from parse.y.
12711
12712         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
12713         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
12714         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
12715         so they can be efficiently scanned without recursion.
12716         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
12717         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
12718         in BLOCK iteratively, rather than recursively.
12719
12720         * parse.y (do_unary_numeric_promotion):  New function.
12721         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
12722
12723         * parse.y (patch_newarray):  Various fixes.
12724
12725         Re-do handling of switch statements (for proper block scoping).
12726         * parse.y:  Add just a single block for the enture switch block,
12727         but don't create any "case blocks".
12728         (group_of_labels):  Rmeoved unneeded non-terminal.
12729         CASE_EXPR and DEFAULT_EXPR are added to current block.
12730         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
12731         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
12732         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
12733         * parse.y (wfl_operator, print_int_node): Make non-static.
12734         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
12735         as part of recursive scan of block.
12736         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
12737         (patch_switch_statement):  Most tests move dinto java_complete_tree.
12738
12739         * parse.y:  Make various production be non-typed (void).
12740         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
12741         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
12742         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
12743
12744         * jcf-write.c (struct jcf_handler):  New type.
12745         (struct jcf_switch_state):  New type.
12746         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
12747         (alloc_handler, emit_unop, emit_reloc):  New functions.
12748         (adjust_typed_op):  Add extra parameter ("max type" offset).
12749         (emit_switch_reloc, emit_case-reloc):  New function.
12750         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
12751         (generate_bytecode_insns):  Support REAL_CST, switch statements,
12752         exception handling, method calls, object/array creation, and more.
12753
12754         * class.c:  Remove some unused variables.
12755         * constants.c (find_string_constant):  New function.
12756         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
12757         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
12758         if flag_emit_class_files.
12759
12760 1998-11-12  Tom Tromey  <tromey@cygnus.com>
12761
12762         * jcf-io.c (find_class): Added explanatory comment.
12763
12764         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
12765         trailing slash to `.zip' entries.
12766
12767         * jvspec.c (lang_specific_driver): Correctly handle case where
12768         GC_NAME not defined.
12769
12770 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12771
12772         * jvspec.c (GC_NAME): New define.
12773         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
12774         if required.
12775         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
12776
12777 1998-11-11  Per Bothner  <bothner@cygnus.com>
12778
12779         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
12780
12781 1998-11-11  Tom Tromey  <tromey@cygnus.com>
12782
12783         * jcf-dump.c (main): Correctly recognize `--'-style long options.
12784
12785 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12786
12787         * class.c (is_compiled_class): Call safe_layout_class for class
12788         compiled from source.
12789         * conver.h (convert_to_integer, convert_to_real,
12790         convert_to_pointer): Added prototypes.
12791         * decl.c (init_decl_processing): Non longer push the decls of
12792         `methodtable', `constants', `Class', `Field', `dispatchTable'
12793         `jexception' and `Method'.
12794         * expr.c (build_invokeinterface): New function.
12795         (expand_invoke): static variable CLASS_IDENT now in
12796         build_invokeinterface. Use build_invokeinterface.
12797         (expand_java_field_op): Moved code to inline
12798         java.lang.PRIMTYPE.TYPE into a function.
12799         (build_primtype_type_ref): New function.
12800         * java-tree.def (INSTANCEOF_EXPR): New tree code.
12801         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
12802         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
12803         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
12804         (DECL_LOCAL_STATIC_VALUE): New macro.
12805         (build_invokeinterface, build_primtype_type_ref): New function
12806         prototypes.
12807         (java_parse_abort_on_error): Macro rewritten.
12808         * jcf-parse.c (current_method): Add comment to declaration.
12809         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
12810         Function prototypes fixed.
12811         (jcf_parse_source): push/pop parser context. save/restore global.
12812         (parse_source_file): Fixed leading comment. Now take a
12813         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
12814         classes and pop the parser context anymore.
12815         (yyparse): Push parser context, save globals, parse the source
12816         file, restore globals and pop the parser context when processing a
12817         source file.
12818         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
12819         * lex.c (java_parse_doc_section): New function.
12820         (java_lex): Call java_parse_doc_section when appropriate. Build an
12821         operator around INSTANCEOF_TK.
12822         * lex.h (java_lineterminator, java_sprint_unicode,
12823         java_unicode_2_utf8, java_lex_error, java_store_unicode):
12824         Prototypes rewritten.
12825         (java_parse_escape_sequence, java_letter_or_digit_p,
12826         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
12827         java_read_unicode, java_store_unicode, java_read_char,
12828         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
12829         Added function prototypes.
12830         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
12831         define.
12832         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
12833         New macros
12834         (struct parser_ctxt): New fields: deprecated,
12835         current_parsed_class_un, gclass_list.
12836         (fix_method_argument_names, issue_warning_error_from_context,
12837         resolve_package, lookup_package_type): New function prototypes.
12838         (resolve_expression_name): Fixed function prototype.
12839         (find_applicable_accessible_methods_list): Fixed indentation, added
12840         extra argument in prototype.
12841         (check_final_assignment, build_null_of_type, check_deprecation,
12842         check_method_redefinition, reset_method_name,
12843         java_check_regular_methods, java_check_abstract_methods,
12844         maybe_build_primttype_type_ref): New function prototype.
12845         * parse.y (conver.h): Include.
12846         (INSTANCEOF_TK): Tagged <operator>.
12847         (single_type_import_declaration): Use REGISTER_IMPORT macro.
12848         (relational_expression:): Build binop for instanceof.
12849         (java_push_parser_context): Remember ctxp->gclass_list across
12850         contexts.
12851         (java_pop_parser_context): Simply return if no context
12852         exists. Remember gclass_list across contexts.
12853         (issue_warning_error_from_context): New function.
12854         (parse_error_context): Don't setup ctxp->elc here. Call
12855         issue_warning_error_from_context instead.
12856         (parse_warning_context): Likewise.
12857         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
12858         setup. Link new class/interface to ctxp->gclass_list.
12859         (add_superinterfaces): Register interface as incomplete if not
12860         loaded.
12861         (create_class): Remember class unqualified name in
12862         ctxp->current_parsed_class_un. Check class deprecation.
12863         (register_fields): Check field deprecation. Remember static final
12864         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
12865         processing INIT.
12866         (method_header): New local variable ORIG_ARG. Use unqualified
12867         current class name for check on constructor errors. Promote return
12868         type if of record type. Argument list fix moved in
12869         fix_method_argument_names, called here. Check method deprecation.
12870         (fix_method_argument_names): New function.
12871         (method_declarator): Promote record typed arguments.
12872         (safe_layout_class): Check class methods before layout.
12873         (java_complete_class): Compute field layout when patched.
12874         (do_resolve_class): Try to load class after having it renamed
12875         after the package name.
12876         (get_printable_method_name): Use DECL_CONTEXT.
12877         (reset_method_name): New function.
12878         (check_method_redefinition): Use reset_method_name.
12879         (java_check_regular_methods): New local variable
12880         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
12881         names for error report. Check for compile-time error when method
12882         found has default (package) access.
12883         (java_check_abstract_methods): Now takes an interface DECL node as
12884         an argument. Also reinstall real name on unchecked
12885         overriding/hiding methods for error report.
12886         (java_check_methods): Fixed leading comment. Get classes to verify
12887         from ctxp->gclass_list. Use CHECK_METHODS macro and set
12888         CLASS_METHOD_CHECKED_P on class verification.
12889         (lookup_java_method2): Get real method name if necessary.
12890         (find_in_imports): Don't check package class access here.
12891         (resolve_package, lookup_package_type): New functions.
12892         (java_layout_classes): Fixed leading comment. Take classes to be
12893         laid out from ctxp->gclass_list.
12894         (java_complete_expand_methods): Don't expand native and abstract
12895         methods.
12896         (java_expand_classes): New function.
12897         (resolve_expression_name): Use additional argument ORIG.  Retrieve
12898         values of static final field of primitive types.
12899         (resolve_field_access): Handles static final field of promotive
12900         type.
12901         (resolve_qualified_expression_name): Handle STRING_CST as
12902         primaries and package name resolution. Check deprecation on found
12903         decls. Set where_found and type_found on non static field resolved
12904         during qualification. Layout non primitive field decl types.
12905         (check_deprecation): New function.
12906         (maybe_access_field): Simplified.
12907         (patch_method_invocation_stmt): Local variable CLASS_TYPE
12908         removed. Reverse method's argument when primary is a type. Don't
12909         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
12910         instead. Include abstract class in the list of class searchable
12911         for constructors. Use DECL_CONTEXT of found method for access
12912         checks. Check method deprecation.
12913         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
12914         converting arguments. Handle INVOKE_INTERFACE.
12915         (lookup_method_invoke): Search constructor using existing
12916         infrastructure (don't rely on lookup_java_constructor anymore).
12917         (find_applicable_accessible_methods_list): Extra argument flag
12918         LC. Now include constructor in the search.
12919         (qualify_ambiguous_name): Conditional expression are primaries.
12920         (not_initialized_as_it_should_p): static final are always
12921         initialized.
12922         (java_complete_tree): Pass extra NULL argument to
12923         resolve_expression_name. Stricter test to carry on patching
12924         assignments. New case for INSTANCEOF_EXPR.
12925         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
12926         (check_final_assignment, maybe_build_primttype_type_ref): New
12927         functions.
12928         (patch_assignment): Detect resolved static finals and carry normal
12929         assignment error check on them. Inline PRIMTYPE.TYPE read access.
12930         (try_builtin_assignconv): Access constant 0 on all primitive
12931         types.
12932         (valid_builtin_assignconv_identity_widening_p): Accept identical
12933         types. Accept all promoted type on int type.
12934         (valid_ref_assignconv_cast_p): Accept a null pointer to be
12935         assigned to a reference.
12936         (valid_method_invocation_conversion_p): Accept to check null
12937         pointers.
12938         (build_binop): Merge declaration and initialization of local
12939         variable BINOP.
12940         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
12941         numeric types. Improved validity test for qualify operators on
12942         references.
12943         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
12944         and PREINCREMENT_EXPR. Also detect resolved static finals of a
12945         primitive type and issue the appropriate error message.
12946         (resolve_type_during_patch): Mark class loaded when resolved.
12947         (patch_cast): Allow null to be cased to reference types.
12948         (build_null_of_type): New function.
12949         (patch_array_ref): Handle array on references correctly.
12950         (patch_return): Removed unused local variable MODIFY. Force
12951         boolean to be returned as integers. Allows null to be returned by
12952         a function returning a reference.
12953         * typeck.c (convert_to_integer, convert_to_real,
12954         convert_to_pointer): Prototypes moved to convert.h
12955         (lookup_argument_method): Use method real name, if necessary.
12956
12957 1998-10-30  Tom Tromey  <tromey@cygnus.com>
12958
12959         * class.c (build_class_ref): Changed name of primitive classes to
12960         start with `_Jv_'.
12961
12962         * class.c (make_class_data): Renamed fields: nmethods to
12963         method_count, method_count to dtable_method_count.  Always set
12964         `state' field to 0.
12965         * decl.c (init_decl_processing): Likewise.
12966
12967 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12968
12969         * class.c (layout_class): Don't mangle <finit>, produce
12970         __finit<class> instead. Don't verify artificial methods.
12971         * decl.c (finit_identifier_node): New declared global.
12972         (init_decl_processing): finit_identifier_node initialized.
12973         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
12974         * java-tree.h (finit_identifier_node): Declared as extern.
12975         (struct lang_decl): New field called_constructor.
12976         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
12977         (CLASS_HAS_FINIT_P): New macro.
12978         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
12979         explicit constructor invocation.
12980         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
12981         CALL_SUPER_CONSTRUCTOR_P): New macros.
12982         (write_classfile): Added prototype.
12983         * jcf-parse.c (jcf_parse_source): Parse and remember for
12984         generation if the file was seen on the command line.
12985         (parse_source_file): Don't write the class file here.
12986         (yyparse): Loop on files rewritten. Set current_jcf.
12987         (parse_zip_file_entries): Parse class file only if it was found.
12988         * lang.c (init_parse): Don't open command line provided filename
12989         here.
12990         (lang_parse): Don't set main_jcf anymore.
12991         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
12992         (JCONSTRUCTOR_CHECK): New macro.
12993         (JBSC_TYPE_P): New macro.
12994         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
12995         (COMPLETE_CHECK_OP_2): New macro.
12996         (struct parse_ctxt): New field explicit_constructor_p.
12997         (check_class_interface_creation): Fixed prototype indentation.
12998         (patch_method_invocation_stmt): Prototype reflects added argument.
12999         (patch_invoke): Likewise.
13000         (complete_method_declaration, build_super_invocation,
13001         verify_constructor_circularity,
13002         build_this_super_qualified_invocation, get_printable_method_name,
13003         patch_conditional_expr, maybe_generate_finit, fix_constructors,
13004         verify_constructor_super, create_artificial_method,
13005         start_artificial_method_body, end_artificial_method_body,
13006         generate_field_initialization_code): New function prototypes.
13007         * parse.y: Fixed leading comment
13008         (constructor_header:, constructor_body:, block_end:): Rules tagged
13009         <node>.
13010         (type_declaration:): Call maybe_generate_finit.
13011         (method_declaration:): Action for method_body: placed in new
13012         function complete_method_declaration, called here.
13013         (constructor_declaration:): Defined actions. Removed leading
13014         FIXME.
13015         (constructor_header:): New rule with action.
13016         (constructor_body:): Rule rewritten using block_begin: and
13017         block_end:. Defined actions.
13018         (constructor_declarator:, explicit_constructor_invocation:):
13019         Defined actions.
13020         (block:): Use new rules block_begin: block_end:.
13021         (block_begin:, block_end:): New rules and actions.
13022         (block_statements:): Fixed error message for explicit
13023         constructors.
13024         (method_invocation:): Call build_this_super_qualified_invocation
13025         if primary is `this' or `super' was seen.
13026         (conditional_expression:): Action defined.
13027         (extra_ctxp_pushed_p): New static global flag.
13028         (java_parser_context_save_global): Create parser context if
13029         necessary. Use extra_ctxp_pushed_p to remember it.
13030         (java_parser_context_restore_global): Pop extra parser context if
13031         one exists.
13032         (build_array_from_name): Array on primitive types are marked
13033         loaded.
13034         (register_fields): Restore new name in field initializer
13035         expression if type was altered. Non static fields initialized upon
13036         declaration marked initialized.
13037         (maybe_generate_finit): New function.
13038         (maybe_generate_clinit): Use create_artificial_method,
13039         start_artificial_method_body, end_artificial_method_body. Generate
13040         debug info for enclosed initialization statements.
13041         (method_header): Fixed leading comment. Check constructor
13042         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13043         accordingly.
13044         (complete_method_declaration, constructor_circularity_msg,
13045         verify_constructor_circularity): New functions.
13046         (get_printable_method_name): New function.
13047         (check_method_redefinition): Don't rename <finit> methods. Fix
13048         declared constructor names. Error message for
13049         constructors modified.
13050         (java_check_regular_methods): Local variable seen_constructor
13051         renamed saw_constructor. Skip verification on constructors. Create
13052         default constructor with create_artificial_method.
13053         (java_check_methods): Removed unnecessary empty line.
13054         (create_artificial_method, start_artificial_method_body,
13055         end_artificial_method_body): New functions.
13056         (java_layout_classes): Changed leading comment. Reverse fields
13057         list if necessary. Always layout java.lang.Object if being
13058         defined.
13059         (java_complete_expand_methods): Verify constructor circularity.
13060         (java_complete_expand_method): Call fix_constructor on
13061         constructors.  Local variable no_ac_found removed. Restore
13062         bindings if method body expansion failed.
13063         (fix_constructors, verify_constructor_super,
13064         generate_field_initialization_code): New function.
13065         (java_expand_classes): Fixed leading comment. Write class file
13066         here.
13067         (resolve_expression_name): Check for illegal instance variable
13068         usage within the argument scope of an explicit constructor
13069         invocation.
13070         (resolve_qualified_expression_name): Pass extra from_super flag
13071         when invoking patch_method_invocation_stmt. New case for
13072         conditional expression when used as a primary. Check for error
13073         when acquiring super.
13074         (patch_method_invocation_stmt): Added extra argument super. New
13075         local variable is_static_flag. Set class_to_search according to
13076         the nature of the constructor invocation. Don't add `this'
13077         argument when expanding NEW_CLASS_EXPR. Check for illegal method
13078         invocation within the argument scope of explicit constructor
13079         invocation. Set is_static according to is_static_flag. Provide
13080         extra `super' argument to patch_invoke invocation.
13081         (patch_invoke): New argument from_super. Loop on arguments
13082         indentation fixed. Pass from_super to invocation_mode. New switch
13083         case INVOKE_SUPER. Fixed error message in switch default case.
13084         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13085         value.
13086         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13087         (lookup_method_invoke): Fixed prototypes in candidates list. Error
13088         message takes constructors into account.
13089         (find_applicable_accessible_methods_list): Fixed indentation.
13090         (qualify_ambiguous_name): Take explicit constructor invocation
13091         into account. Deal with a conditional expression as a primary to
13092         a method call.
13093         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13094         case. Added extra argument to patch_method_invocation_stmt.
13095         Register calls made to explicit constructor `this'. Don't call
13096         save_expr in ARRAY_REF case when emitting class files. Check for
13097         illegal use of this when expanding explicit constructor invocation
13098         arguments.
13099         (complete_function_arguments): Set and reset parser context
13100         explicit_constructor_p field value when appropriate.
13101         (build_super_invocation, build_this_super_qualified_invocation):
13102         New functions.
13103         (patch_assignment): Fixed typo.
13104         (patch_unaryop): Check on final fields occurs only when a decl
13105         exits.
13106         (patch_return): Take constructors into account.
13107         (patch_conditional_expr): New function.
13108         * typeck.c (build_java_signature): Removed unnecessary empty line.
13109
13110 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13111
13112         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13113
13114 1998-10-28  Tom Tromey  <tromey@cygnus.com>
13115
13116         * decl.c (init_decl_processing): Renamed fields.
13117         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13118         interface_len, msize fields.
13119
13120         * class.c (make_class_data): Removed subclass_head and
13121         subclass_next fields.
13122         * decl.c (init_decl_processing): Removed subclass_head and
13123         subclass_next fields.
13124
13125 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13126
13127         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13128         * mangle.c (emit_unicode_mangled_name): Similarly.
13129
13130 1998-10-26  Nick Clifton  <nickc@cygnus.com>
13131
13132         * jcf-parse.c (get_constant): Place braces around code to compute
13133         'd' when REAL_ARITHMETIC is not defined.
13134
13135 1998-10-25  H.J. Lu  (hjl@gnu.org)
13136
13137         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13138         dependency.
13139
13140 1998-10-23  Tom Tromey  <tromey@cygnus.com>
13141
13142         * lang-specs.h: `.zip' files are input to jc1.
13143
13144 1998-10-22  Per Bothner  <bothner@cygnus.com>
13145
13146         * jvspecs.c:  Add (but don't enable) support for combining multiple
13147         .class and .java input filenames to a single jc1 invocation.
13148         Add support for -C flag (copile to .class files).
13149         Translate -classpath and -CLASSPATH arguments.
13150         * lang-specs.h:  Don't set %2 spec.
13151
13152 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13153
13154         * jcf-path.c (add_entry): Don't add trailing separator if entry is
13155         a .zip file.
13156         (add_path): Don't add trailing separator to non-empty path
13157         elements.
13158
13159         * lang.c (lang_decode_option): Check for -fclasspath and
13160         -fCLASSPATH before examining other `-f' options.
13161
13162         * java-tree.h (finalize_identifier_node): Don't declare.
13163         * class.c (make_class_data): Don't push "final" field.
13164         * decl.c (init_decl_processing): Don't push "final" field.
13165         (finalize_identifier_node): Removed.
13166         (init_decl_processing): Don't set finalize_identifier_node.
13167
13168         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13169
13170 1998-10-11  Anthony Green  <green@cygnus.com>
13171
13172         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13173         (JV_SCAN_SOURCES): New macro.
13174         (JCF_DUMP_SOURCES): Likewise.
13175         (jcf-dump$(exeext)): New target.
13176         (jv-scan$(exeext)): New target.
13177
13178 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13179
13180         * Makefile.in (LEX): Removed.
13181         (LEXFLAGS): Likewise.
13182         (SET_BISON): New macro.
13183         (BISON): Removed.
13184         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
13185         spurious diffs in parse.c.
13186         ($(PARSE_SCAN_C)): Likewise.
13187         (PARSE_DIR): New macro.
13188         (PARSE_C): Use it.
13189         (PARSE_SCAN_C): Likewise.
13190         (PARSE_RELDIR): New macro.
13191
13192         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13193
13194         * jcf-io.c (find_class): Use saw_java_source to determine when to
13195         look for `.java' file.
13196         * jcf-parse.c (saw_java_source): New global.
13197         (yyparse): Set it if `.java' file seen.
13198
13199         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13200         (GCJH_SOURCES): Likewise.
13201         * Makefile.in (datadir): New macro.
13202         (libjava_zip): Likewise.
13203         (JAVA_OBJS): Added jcf-path.o.
13204         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13205         (../gcjh$(exeext)): Likewise.
13206         (jcf-path.o): New target.
13207         * java-tree.h (fix_classpath): Removed decl.
13208         * jcf-parse.c (fix_classpath): Removed.
13209         (load_class): Don't call fix_classpath.
13210         * parse.y (read_import_dir): Don't call fix_classpath.
13211         * lex.h: Don't mention classpath.
13212         * lex.c (java_init_lex): Don't initialize classpath.
13213         * jcf-io.c (classpath): Removed global.
13214         (find_class): Use jcf_path iteration functions.  Correctly search
13215         class path for .java file.
13216         (open_in_zip): New argument `is_system'.
13217         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
13218         classpath-related options.
13219         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13220         and -I.
13221         (lang_init): Call jcf_path_init.
13222         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13223         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
13224         Correctly put braces around second string in each entry.
13225         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
13226         classpath-related options.
13227         (help): Updated for new options.
13228         * jcf.h: Declare functions from jcf-path.c.  Don't mention
13229         `classpath' global.
13230         * jcf-path.c: New file.
13231
13232         * jcf-depend.c: Include jcf.h.
13233
13234         * jcf-write.c (localvar_alloc): Returns `void'.
13235         (localvar_free): Removed unused variable.
13236
13237         * lang.c (OBJECT_SUFFIX): Define if not already defined.
13238         (init_parse): Use OBJECT_SUFFIX, not ".o".
13239
13240 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13241
13242         * class.c (emit_register_classes): Renamed from
13243         emit_register_class.
13244         * java-tree.h (emit_register_classes): Prototype renamed from
13245         emit_register_class.
13246         * jcf-parse.c (yyparse): Call emit_register_classes once before
13247         returning.
13248         * parse.y (java_expand_classes): No longer register classes.
13249
13250 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13251
13252         * class.c (is_compiled_class): New local variable
13253         seen_in_zip. Identify classes found in currently compiled source
13254         file(s).
13255         * decl.c (complete_start_java_method): Fixed typo.
13256         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13257         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13258         (CLASS_P): Moved around.
13259         (java_parse_abort_on_error): Macro moved from jcf-parse.c
13260         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13261         java-parse.h
13262         (jcf_parse_source): Changed leading comment. Removed unnecessary
13263         fclose and CLASS_FROM_SOURCE_P marking.
13264         (parse_source_file): New local variables remember_for_generation
13265         and filename. Mark parsed file name identifier node. Removed block
13266         executed when parse_only was null. Set remember_for_generation.
13267         Use it as an argument to java_pop_parser_context.
13268         (yyparse): New local variables several_files, list, next node and
13269         current_file_list. Split ampersand separated file names into
13270         current_file_list. Iterate through the list and parse accordingly.
13271         * parse.h (java_pop_parser_context): New function prototype.
13272         * parse.y (ctxp_for_generation): New static global variable.
13273         (java_pop_parser_context): New argument generate. Link popped ctxp
13274         to ctxp_for_generation list accordingly.
13275         (java_complete_expand_methods): Fixed indentation.
13276         (java_expand_classes): New function.
13277
13278 1998-10-17  Per Bothner  <bothner@cygnus.com>
13279
13280         * Makefile.in:  Link with libiberty.a instead of memmove.o.
13281
13282 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13283
13284         * lex.c (setjmp.h): No longer included.
13285         * lex.h (setjmp.h): Included.
13286         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13287         (duplicate_declaration_error_p): Renamed from
13288         duplicate_declaration_error.
13289         (build_array_from_name): New function prototype.
13290         * parse.y (setjmp.h): No longer included.
13291         (variable_declarator_id): Define action.
13292         (build_array_from_name): New function.
13293         (duplicate_declaration_error_p): Renamed from
13294         duplicate_declaration_error.  Fixed leading comment.
13295         (register_fields): Main `for' loop reorganized. Uses
13296         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13297         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13298         build_array_from_name.
13299         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13300         types.
13301         (read_import_dir): Don't try to skip `.' and `..'.
13302         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13303         build_array_from_name. Main `for' loop reorganized.
13304         (resolve_qualified_expression_name): When building access to a
13305         field, use the type where the field was found, not its own type.
13306         (maybe_access_field): Use field DECL_CONTEXT if the type where the
13307         field was found is null.
13308         (qualify_ambiguous_name): Sweep through all successive array
13309         dimensions.
13310
13311 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13312
13313         * java-tree.h (pop_labeled_block, lang_printable_name,
13314         maybe_add_interface, set_super_info, get_access_flags_from_decl,
13315         interface_of_p, inherits_from_p, fix_classpath,
13316         complete_start_java_method, emit_handlers, init_outgoing_cpool,
13317         make_class_data, register_class, alloc_name_constant): New
13318         function prototypes.
13319         * lang.c (lang_decode_option): Set argc argument unused. Fixed
13320         indentation. Added cast to remove warning.
13321         (lang_printable_name): Set v argument unused.
13322         (lang_print_error): Added argument to lang_printable_name call.
13323         (java_dummy_print, print_lang_decl, print_lang_type,
13324         print_lang_identifier, lang_print_xnode): All argument marked
13325         unused.
13326         * lex.c (java_unget_unicode): Removed unnecessary argument.
13327         (java_allocate_new_line): Unused local variable is gone.
13328         (java_read_char): Added parenthesis in expressions to remove
13329         warnings.  Added final return statement.
13330         (java_read_unicode): Added parenthesis in expression to remove
13331         warning.
13332         (java_parse_end_comment): Fixed java_unget_unicode invocation.
13333         (java_parse_escape_sequence): Likewise.
13334         (java_lex): Unused local variables are gone. Fixed
13335         java_unget_unicode invocation.
13336         * lex.h (set_float_handler): Prototype added when JC1_LITE not
13337         defined.
13338         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13339         lang_printable_name invocation in macro.
13340         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13341         Likewise.
13342         (duplicate_declaration_error): Suppressed unused argument in
13343         prototype.
13344         (identical_subpath_p): Function declaration is gone.
13345         (patch_invoke): Suppressed unused argument in prototype.
13346         (patch_cast, build_labeled_block, check_thrown_exceptions):
13347         Likewise.
13348         * parse.y (setjmp.h): Included
13349         (toplev.h): Likewise.
13350         (field_declaration:): Suppressed unused local
13351         (label_decl:): Fixed build_labeled_block invocation.
13352         (java_pop_parser_context): Put extra parenthesis around assignment
13353         in if.
13354         (yyerror): Suppressed unused local variables.
13355         (variable_redefinition_error): Fixed lang_printable_name
13356         invocation.
13357         (create_interface): Suppressed unused local variables.
13358         (create_class): Likewise.
13359         (duplicate_declaration_error): Suppressed unused argument. Fixed
13360         lang_printable_name invocation.
13361         (register_fields): Suppressed unused local variable. Fixed
13362         duplicate_declaration_error invocation.
13363         (method_header): Suppressed unused local variable.
13364         (method_declarator, parser_check_super): Likewise.
13365         (java_complete_class): Suppressed unused local variable. Fixed
13366         fatal error message.
13367         (complete_class_report_errors): Added default: in switch.
13368         (java_check_regular_methods): Fixed lang_printable_name
13369         invocations.
13370         (check_throws_clauses): Likewise.
13371         (java_check_abstract_methods): Suppressed unused local
13372         variable. Fixed lang_printable_name invocation.
13373         (read_import_entry): Added supplemental return statement.
13374         (read_import_dir): Suppressed unused local variables.
13375         (check_pkg_class_access, declare_local_variables): Likewise.
13376         (source_start_java_method): Suppressed unused extern variable
13377         declarations
13378         (expand_start_java_method): Suppressed unused extern and local
13379         variable declarations.
13380         (java_complete_expand_methods): Likewise.
13381         (java_complete_expand_method): Suppressed unused local variables.
13382         (make_qualified_name): Likewise.
13383         (resolve_qualified_expression_name): Added default: in
13384         switch. Fixed lang_printable_name invocation.
13385         (class_instance_creation_expression): Added parenthesis around
13386         expressions.
13387         (patch_method_invocation_stmt): Fixed lang_printable_name and
13388         patch_invoke invocations.
13389         (check_for_static_method_reference): Fixed lang_printable_name
13390         invocation.
13391         (patch_invoke): Suppressed unused arguments and local variables.
13392         (lookup_method_invoke): Suppressed unused local variables.
13393         (qualify_ambiguous_name): Added default: in switch.
13394         (identical_subpath_p): Function removed.
13395         (patch_assignment): Suppressed unused local variables. Suppressed
13396         unnecessary if statement. Fixed lang_printable_name invocations.
13397         (try_builtin_assignconv): Fixed lang_printable_name invocations.
13398         (valid_ref_assignconv_cast_p): Parenthesis around
13399         expression. Suppressed unused local variables.
13400         (build_binop): Suppressed unused local variables. fixed
13401         lang_printable_name invocations.
13402         (string_constant_concatenation): Suppressed unused local
13403         variables.
13404         (patch_unaryop): Fixed lang_printable_name invocation.
13405         (patch_cast): Suppressed unnecessary argument. Fixed
13406         lang_printable_name invocation.
13407         (patch_array_ref): Fixed lang_printable_name invocation.
13408         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13409         (build_labeled_block): Suppressed unused argument.
13410         (generate_labeled_block): Fixed build_labeled_block invocation.
13411         (build_loop_body): Suppressed unused local variables.
13412         (patch_loop_statement): Likewise.
13413         (patch_exit): Fixed lang_printable_name invocation.
13414         (patch_switch_statement): Likewise.
13415         (case_identity): First argument marked unused.
13416         (patch_try_statement): Fixed lang_printable_name invocations.
13417         (patch_synchronized_statement, patch_throw_statement): Likewise.
13418         (check_thrown_exceptions): Fixed check_thrown_exceptions and
13419         lang_printable_name invocations.
13420         (check_thrown_exceptions_do): Suppressed unused argument.
13421
13422 1998-10-14  Tom Tromey  <tromey@cygnus.com>
13423
13424         * jcf-write.c (write_classfile): Add output class file as target.
13425         * lang-options.h: Added -MD, -MMD, -M, and -MM.
13426         * jcf.h: Added declarations for dependency-tracking functions.
13427         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13428         * lang.c (lang_decode_option): Recognize -MD and -MMD.
13429         (finish_parse): Call jcf_dependency_write.
13430         (dependency_tracking): New global.
13431         (DEPEND_SET_FILE): New define.
13432         (DEPEND_ENABLE): New define.
13433         (init_parse): Enable dependency tracking if required.
13434         Include "flags.h".
13435         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13436         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13437         (../gcjh$(exeext)): Likewise.
13438         (jcf-depend.o): New target.
13439         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13440         (GCJH_SOURCES): Likewise.
13441         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
13442         dep_name argument.
13443         (find_classfile): Added dep_name argument.
13444         (find_class): Compute name of dependency.
13445         (open_in_zip): Call jcf_dependency_add_file.
13446         * gjavah.c (output_file): No longer global.
13447         (usage): Don't mention "gjavah".
13448         (help): Likewise.
13449         (java_no_argument): Likewise.
13450         (version): Likewise.
13451         (main): Recognize and handle -M family of options.
13452         (print_mangled_classname): Return is void.
13453         (process_file): Handle case where output is suppressed.
13454         (HANDLE_END_FIELD): Likewise.
13455         (HANDLE_METHOD): Likewise.
13456         * jcf-depend.c: New file.
13457
13458 1998-10-13  Jeffrey A Law  (law@cygnus.com)
13459
13460         * java-tree.def: Add missing newline at EOF.
13461
13462 1998-10-13  Tom Tromey  <tromey@cygnus.com>
13463
13464         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13465         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
13466         function.
13467         Include <config.h> and "system.h".
13468         (disassemble_method): Undefine RET to avoid clash with
13469         config/i386/i386.h.
13470
13471 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13472
13473         * decl.c (runtime_exception_type_node, error_exception_type_node):
13474         New global variables.
13475         (init_decl_processing): Initialized.
13476         * expr.c (java_lang_expand_expr): Set caught exception type to
13477         null if catch handler argument doesn't exit.
13478         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13479         tree codes.
13480         * java-tree.h (runtime_exception_type_node,
13481         error_exception_type_node): Global variables declared.
13482         (DECL_FUNCTION_THROWS): New macro.
13483         (DECL_FUNCTION_BODY): Modified comment.
13484         (DECL_SPECIFIC_COUNT): Likewise.
13485         (struct lang_decl): New field throws_list.
13486         (IS_UNCHECKED_EXPRESSION_P): New macro.
13487         * lex.c (java_lex): Generate location information for THROW_TK.
13488         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13489         EXCEPTIONS_P): New macros.
13490         (enum jdep_code): New value JDEP_EXCEPTION.
13491         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13492         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13493         PATCH_METHOD_RETURN_ERROR): New macros.
13494         (patch_method_invocation_stmt): Added new argument to prototype.
13495         (patch_synchronized_statement, patch_throw_statement,
13496         check_thrown_exceptions, check_thrown_exceptions_do,
13497         purge_unchecked_exceptions, check_throws_clauses): New function
13498         prototypes.
13499         * parse.y Fixed typo in keyword section.
13500         (throw:): Rule tagged <node>.
13501         (THROW_TK): Keyword tagged <operator>.
13502         (method_header:): Last argument to call to method_header passed
13503         from throws: rule.
13504         (throws:, class_type_list:, throw_statement:,
13505         synchronized_statement:, synchronized:): Defined actions.
13506         (method_header): New local variable current. Register exceptions
13507         from throws clause.
13508         (java_complete_tree): Complete and verify exceptions from throws
13509         clause.
13510         (complete_class_report_errors): Error message on exceptions not
13511         found
13512         (java_check_regular_methods): Fixed typo. Shortcut on private
13513         overriding methods. Changed error message on method
13514         redefinition. Check for throws clause compatibility.
13515         (check_throws_clauses): New function.
13516         (java_check_abstract_methods): Use DECL_NAME for wfl or current
13517         method. Changed error message on method redefinition.
13518         (currently_caught_type_list): New static variable.
13519         (java_complete_expand_methods): Purge unchecked exceptions from
13520         throws clause list. Call PUSH_EXCEPTIONS before walk and
13521         POP_EXCEPTIONS after.
13522         (resolve_qualified_expression_name): Pass new argument as NULL to
13523         patch_method_invocation_stmt.
13524         (patch_method_invocation_stmt): New argument ref_decl. Invoke
13525         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13526         argument list when appropriate. Use new argument if non null to
13527         store selected method decl.
13528         (patch_invoke): Convert if necessary args of builtin types before
13529         forming CALL_EXPR. Argument list no longer reversed here.
13530         (invocation_mode): Treat final methods as static methods.
13531         (java_complete_tree): New cases for THROW_EXPR: and
13532         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13533         function call.
13534         (complete_function_arguments): No more RECORD_TYPE
13535         conversion. Function parameter nodes no longer saved.
13536         (valid_ref_assignconv_cast_p): Avoid handling null type.
13537         (patch_binop): Fixed null constant reference handling.
13538         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13539         BUILD_THROW macros.
13540         (patch_try_statement): Fixed comments. Record caught types in
13541         list, push the list, expand try block and pop the list.
13542         (patch_synchronized_statement, patch_throw_statement,
13543         check_thrown_exceptions, check_thrown_exceptions_do,
13544         purge_unchecked_exceptions): New functions.
13545         * typeck.c (lookup_argument_method): Allow WFL in place of method
13546         DECL_NAME during method definition check
13547
13548 1998-10-09  Tom Tromey  <tromey@cygnus.com>
13549
13550         * gjavah.c (decode_signature_piece): New function.
13551         (print_c_decl): Use it.  Added `name_override' argument.
13552         (print_method_info): Use name_override argument to print_c_decl.
13553         (seen_fields): Removed.
13554         (print_field_info): Don't update seen_fields.
13555         (struct method_name): New structure.
13556         (method_name_list): New global.
13557         (print_method_info): Add new method to list of methods.
13558         (name_is_method_p): New function.
13559         (print_field_info): If field name has same name as method, then
13560         change field name.
13561         (process_file): Parse methods before fields.
13562         (field_pass): New global.
13563         (HANDLE_END_FIELD): Take field_pass into account.
13564
13565 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13566
13567         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13568         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13569
13570 1998-10-03  Anthony Green  <green@cygnus.com>
13571
13572         * jvspec.c: Fix bug in jvgenmain_spec patch.
13573
13574 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13575
13576         * Makefile.in (lang.o:): Install dependency on java-tree.def.
13577         * decl.c (soft_exceptioninfo_call_node): New global variable.
13578         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13579         takes extra integer argument. soft_exceptioninfo_call_node
13580         initialized.
13581         * except.c (java_set_exception_lang_code): New function
13582         (method_init_exceptions): Called here.
13583         (prepare_eh_table_type): New function.
13584         (expand_end_java_handler): Called here.
13585         * expr.c (build_java_throw_out_of_bounds_exception): Now features
13586         one argument. Modified generation of call to
13587         soft_badarrayindex_node to use new argument.
13588         (build_java_arrayaccess): Pass faulty index value to
13589         build_java_throw_out_of_bounds_exception.
13590         (generate_name): New function.
13591         (java_lang_expand_expr): New local variables node, current,
13592         has_finally_p. Expand TRY_EXPR node.
13593         (process_jvm_instruction): Replace top of the stack with thrown
13594         object reference when entering exception handler.
13595         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13596         specific tree codes.
13597         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13598         global.
13599         (DECL_SPECIFIC_COUNT): New macro.
13600         (prepare_eh_table_type, java_set_exception_lang_code,
13601         generate_name): New function declarations.
13602         (match_java_method): Declaration deleted.
13603         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13604         macros.
13605         * lex.c (TRY_TK, CATCH_TK): Generate location information.
13606         * parse.h (redefinition_error, refine_accessible_methods_list,
13607         can_cast_to_p): Function declaration removed.
13608         (classitf_redefinition_error, variable_redefinition_error,
13609         parse_jdk1_1_error, find_applicable_accessible_methods_list,
13610         find_most_specific_methods_list, argument_types_convertible,
13611         enter_a_block, valid_builtin_assignconv_identity_widening_p,
13612         valid_cast_to_p, valid_method_invocation_conversion_p,
13613         try_reference_assignconv, add_stmt_to_compound,
13614         build_jump_to_finally, build_tree_list, patch_try_statement,
13615         java_get_catch_block): New function declarations.
13616         * parse.y (string_buffer_type): Global variable deleted.
13617         (group_of_labels, catches, catch_clause, catch_clause_parameter,
13618         finally): Rules tagged <node>.
13619         (TRY_TK, CATCH_TK): Token tagged <operator>.
13620         (class_body_declaration:, class_member_declaration:,
13621         formal_parameter:, explicit_constructor_invocation:,
13622         interface_member_declaration:, constant_declaration:,
13623         primary_no_new_array:, class_instance_creation_expression:,
13624         array_creation_expression:): Issue error on unsuported JDK1.1
13625         features.
13626         (try_statement:, catches:, finally:): Define actions.
13627         (catch_clause_parameter): New rule.
13628         (catch_clause:): Use new rule catch_clause_parameter.
13629         (parse_jdk1_1_error): New function.
13630         (redefinition_error): Renamed classitf_redefinition_error.
13631         (variable_redefinition_error): New function.
13632         (check_class_interface_creation): Call
13633         classitf_redefinition_error.
13634         (java_complete_tree): Added error message on JDEP_TYPE: case.
13635         (complete_class_report_errors): Fixed indentation.
13636         (declare_local_variables): Call variable_redefinition_error.
13637         (source_end_java_method): Call java_set_exception_lang_code and
13638         emit_handlers where appropriate.
13639         (java_method_add_stmt): Call add_stmt_to_block.
13640         (add_stmt_to_block): New function.
13641         (lookup_method_invoke): Fixed outside comment. new local variable
13642         candicates.  Call find_applicable_accessible_methods_list and
13643         find_most_specific_methods_list when searching for a
13644         method. Modified error report to list possible candidates when
13645         applicable.
13646         (find_applicable_accessible_methods_list,
13647         find_most_specific_methods_list, argument_types_convertible): New
13648         function.
13649         (refine_accessible_methods_list): Function deleted.
13650         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
13651         expr (if applicable) before calling patch_array_ref.
13652         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
13653         (enter_block): Fixed comment.
13654         (enter_a_block): New function.
13655         (patch_assignment): Reorganized. Call try_reference_assignconv for
13656         references. Call valid_cast_to_p instead of can_cast_to_p.
13657         (try_reference_assignconv,
13658         valid_builtin_assignconv_identity_widening_p): New functions.
13659         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
13660         (valid_cast_to_p, valid_method_invocation_conversion_p): New
13661         functions.
13662         (build_string_concatenation): Don't resolve StringBuffer.
13663         (patch_cast): Fixed inverted arguments.
13664         (patch_array_ref): Code to save array expr deleted. Call
13665         valid_cast_to_p instead of can_cast_to_p.
13666         (generate_labeled_block): Call generate_name.
13667         (build_jump_to_finally, build_try_statement, java_get_catch_block,
13668         patch_try_statement): New functions.
13669         * typeck.c (match_java_method): Function deleted.
13670
13671 1998-10-02  Anthony Green  <green@cygnus.com>
13672
13673         * jvspec.c: jvgenmain_spec uses different temporary file names.
13674
13675 1998-10-02  Anthony Green  <green@cygnus.com>
13676
13677         * jvspec.c (lang_specific_driver): Fail if user specifies
13678         --main= when not linking.
13679
13680 1998-09-28  Tom Tromey  <tromey@cygnus.com>
13681
13682         * class.c (make_class_data): Push value for `thread' field.
13683         * decl.c (init_decl_processing): Added `thread' field to class.
13684
13685         * class.c (add_field): Always make static fields externally
13686         visible.
13687
13688 1998-09-26  Anthony Green  <green@cygnus.com>
13689
13690         * expr.c (build_java_athrow,
13691         build_java_throw_out_of_bounds_exception, expand_invoke,
13692         build_newarray, expand_java_multianewarray, build_java_monitor):
13693         Update comments to reflect _Jv_* function names.
13694
13695 1998-09-25  Per Bothner  <bothner@cygnus.com>
13696
13697         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
13698         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
13699         * parse.y (expand_start_java_method):  Likewise.
13700
13701 1998-09-24  Per Bothner  <bothner@cygnus.com>
13702
13703         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
13704
13705         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
13706         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
13707         * expr.c:  Remove no-longer-needed calls to promote_type.
13708         * decl.c (give_name_to_locals):  Liekwise.
13709         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
13710         * parse.y:  Add/remove promote_type calls as appropriate.
13711         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
13712         (parse_signature_string):  Likewise.
13713         (build_java_array_type):  Fix for now signature convenions.
13714
13715         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
13716
13717 1998-09-23  Tom Tromey  <tromey@cygnus.com>
13718
13719         * class.c (init_class_processing): libjava function renamed to
13720         _Jv_RegisterClass.
13721
13722 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13723
13724         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
13725         * java-tree.def: Fixed DEFTREECODE third argument.
13726         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
13727         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
13728         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
13729         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13730         JAVA_THIS_EXPR): Now replaced by tree code definitions.
13731         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
13732         * lang.c (java_tree_code_type, java_tree_code_length,
13733         java_tree_code_name): New arrays.
13734         (lang_init): Append Java tree node definitions to Gcc ones.
13735         * lex.c (expression_obstack): Declared as extern when JC1_LITE
13736         defined.
13737         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
13738         wfl_to_string.
13739         (java_lex): Allow declaration of empty string constants. Retain
13740         location information on CASE_TK and DEFAULT_TK.
13741         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
13742         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
13743         Modified to be more robust.
13744         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
13745         (build_new_invocation, try_builtin_assignconv,
13746         patch_switch_statement, string_constant_concatenation,
13747         build_string_concatenation, patch_string_cst, patch_string,
13748         java_expand_switch): New function declarations.
13749         * parse.y: Rules related to switch and EH tagged <node>.
13750         (label_id): Set to NULL_TREE
13751         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
13752         tree nodes.
13753         (this_or_super:): Fixed indentation.
13754         (statement:, statement_nsi:, statement_without_trailing_substatement:,
13755         statement_expression:): Removed call to RULE on all sub-rules.
13756         (switch_expression:, switch_labels:): New rules.
13757         (switch_statement:, switch_block:, switch_block_statement_groups:,
13758         switch_block_statement_group:, switch_labels:, switch_label:):
13759         Defined actions.
13760         (throw_statement:, synchronized_statement:, try_statement:):
13761         Defined temporary actions.
13762         (class_instance_creation_expression:): Call
13763         build_new_invocation. Fixed indentation.
13764         (field_access): Fixed indentation.
13765         (method_invocation): Likewise.
13766         (make_qualified_primary): Use THIS_EXPR.
13767         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
13768         resolving from SUPER, set *type_found.
13769         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
13770         (java_complete_tree): Removed unused local variable `location'. Case
13771         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
13772         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
13773         on MODIFY_EXPR: and all binary operator tree code cases. Removed
13774         STRING_CST: case. default: checks for patchable strings.
13775         (complete_function_arguments): Transform string constant or
13776         crafted StringBuffer if necessary.
13777         (build_method_invocation): Fixed comments.
13778         (build_new_invocation): New function.
13779         (patch_assignment): Call try_builtin_assignconv to figure a valid
13780         assignment conversion between builtin types.
13781         (try_builtin_assignconv): New function.
13782         (build_binop): Use URSHIFT_EXPR directly to call build.
13783         (operator_string): Use UNARY_PLUS_EXPR.
13784         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
13785         operator.
13786         (do_merge_string_cste, merge_string_cste,
13787         string_constant_concatenation, build_string_concatenation,
13788         patch_string, patch_string_cst): New function.
13789         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
13790         (patch_unaryop): Likewise. New test of valid ++/-- operands.
13791         (build_newarray_node): Use NEW_ARRAY_EXPR.
13792         (build_this): Use THIS_EXPR.
13793         (build_return): Enable debug information on return statement.
13794         (build_if_else_statement): Likewise.
13795         (complete_labeled_statement): Fixed related comment.
13796         (build_loop_body): Fixed comment.
13797         (build_bc_statement): Enable debug information on break/continue
13798         statements.
13799         (patch_bc_statement): Fixed typos. Handle SWITCH statement
13800         context.
13801         (patch_switch_statement, case_identity, java_expand_switch): New
13802         functions.
13803
13804 1998-09-21  Per Bothner  <bothner@cygnus.com>
13805
13806         * buffer.h (BUFFER_INIT):  New macro.
13807         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
13808         Pass (struct jcf_partial *state) to most functions.
13809         (jcf_block, jcf_relocation):  New types.
13810         Support labels, branches, conditionals, loops.
13811
13812 1998-09-21  Tom Tromey  <tromey@cygnus.com>
13813
13814         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
13815
13816 1998-09-21  Per Bothner  <bothner@cygnus.com>
13817
13818         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
13819         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
13820         not integer_type_node (INT_TYPE_SIZ bits).
13821
13822         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
13823
13824         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
13825         * jcf-dump.c (print_exception_table):  New function.
13826         (disassemble_method):  Better handling of wide instructions.
13827         Make more robust for bad input.
13828
13829 1998-09-30  Jeffrey A Law  (law@cygnus.com)
13830
13831         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
13832         FreeBSD.
13833
13834 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13835
13836         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
13837
13838 1998-09-17  Tom Tromey  <tromey@cygnus.com>
13839
13840         * Makefile.in ($(PARSE_H)): Removed target.
13841
13842 1998-09-17  Jeffrey A Law  (law@cygnus.com)
13843
13844         * Makefile.in (JAVA_OBJS): Add memmove.o
13845         (memmove.o): New target & rules.
13846
13847 1998-09-15  Tom Tromey  <tromey@cygnus.com>
13848
13849         * expr.c (expand_invoke): Don't generate a call to the class init
13850         code.
13851
13852 1998-09-14  Jeffrey A Law  (law@cygnus.com)
13853
13854         * Makefile.in: Add many missing dependencies.
13855         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
13856         as appropriate.
13857         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
13858         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
13859
13860 1998-09-11  Per Bothner  <bothner@cygnus.com>
13861
13862         * decl.c (complete_start_java_method):  If method is static (and
13863         not private) call _Jv_InitClass.
13864         * expr.c (expand_invoke):  Don't call build_class_init.
13865
13866         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
13867
13868 1998-09-10  Jeffrey A Law  (law@cygnus.com)
13869
13870         * Make-lang.in (GCJ): Define before using.
13871
13872 1998-09-09  Jeffrey A Law  (law@cygnus.com)
13873
13874         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
13875         losing due to namespace pollution in GNU getopt.h
13876
13877 1998-09-09  Tom Tromey  <tromey@cygnus.com>
13878
13879         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
13880         (java.all.cross): Likewise.
13881         (java.rest.encap): Likewise.
13882
13883 1998-09-08  Jeffrey A Law  (law@cygnus.com)
13884
13885         * gjavah.c (print_class_decls): Fix thinko in arglist
13886         * jcv-io.c (find_classfile): Similarly.
13887
13888 1998-09-07  Jeffrey A Law  (law@cygnus.com)
13889
13890         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
13891
13892 1998-09-05  Tom Tromey  <tromey@cygnus.com>
13893
13894         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
13895         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
13896         * Makefile.in (PARSE_C): New macro.
13897         (PARSE_H): Likewise.
13898         (PARSE_SCAN_C): Likewise.
13899         ($(PARSE_C)): Target renamed from parse.c.
13900         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
13901         (clean): Remove parse-scan.c as well.
13902         (parse.o): Depend on $(PARSE_C).
13903
13904 1998-09-05  Anthony Green  <green@cygnus.com>
13905
13906         * README, license.terms: Removed.
13907
13908         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
13909         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
13910         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
13911         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
13912         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
13913         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
13914         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
13915         and Java trademark attribution.
13916
13917 1998-09-04  Tom Tromey  <tromey@cygnus.com>
13918
13919         * Makefile.in: Use gcjh, not gjavah.
13920         * config-lang.in (stagestuff): Use gcjh, not gjavah.
13921         * Make-lang.in: Changed gjavah to gcjh everywhere.
13922
13923 1998-09-03  Per Bothner  <bothner@cygnus.com>
13924
13925         * gjavah.c:  Support new -prepend -add -append flags.
13926         (print_method_info):  Method is not virtual if class is final.
13927
13928 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13929
13930         * jv-scan.c: Fixed copyright assignment.
13931         * keyword.gperf: Likewise.
13932         * keyword.h: Likewise.
13933         * lex.c: Fixed copyright assignment.
13934         (java_lex): Push unicode back when parsing '<'.
13935         * lex.h: Fixed copyright assignment.
13936         * parse-scan.y: Likewise.
13937         * parse.h: Fixed copyright assignment.
13938         (build_debugable_stmt, complete_for_loop): New function prototypes.
13939         * parse.y: Fixed copyright assignment.
13940         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
13941         size_zero_node when completing a loop with no exit condition.
13942         (for_statement_nsi:): Define action.
13943         (for_init:, for_update:): Return size_zero_node when empty.
13944         (declare_local_variables): Call build_debugable_stmt.
13945         (build_debugable_stmt): New function.
13946         (build_loop_body): Build debugable statement around loop
13947         condition part.
13948         (complete_loop_body): Take into account the debugable statement
13949         around the EXIT_EXPR.
13950         (complete_loop_body): New function.
13951         (patch_exit_expr): Fixed condition inversion.
13952
13953 1998-09-02  Tom Tromey  <tromey@cygnus.com>
13954
13955         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
13956         name of thread define.
13957         * jvspec.c (THREAD_NAME): New macro.
13958         (GCLIB): Likewise.
13959         (THREADLIB): Likewise.
13960         (lang_specific_driver): Recognize attempt to link with thread
13961         library or gc library.  Recognize -ljava on command line so it
13962         isn't linked against more than once.
13963
13964 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13965
13966         * parse-scan.y (report_main_declaration): Name of the class
13967         containing `main' can be a qualified name.
13968
13969 1998-08-31  Tom Tromey  <tromey@cygnus.com>
13970
13971         * config-lang.in: Changed gjavac to gjc everywhere.
13972         * Make-lang.in: Changed gjavac to gjc everywhere.
13973
13974 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13975
13976         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
13977         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
13978         and install the files.
13979         * Makefile.in (JAVA_OBJS_LITE): New variable.
13980         (compiler:): Now include jv-scan as a dependency.
13981         (../jv-scan$(exeext), parse-scan.c): New targets.
13982         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
13983         * config-lang.in (compilers): Removed gcj, gjavah from the list.
13984         * jcf-parse.c (parse_source_file): Call java_layout_classes and
13985         check for errors even if parse_only.
13986         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
13987         defined.
13988         (yylex): New function. Uses java_lex body.
13989         (java_lex): Removed commented out statement. Remove local variable
13990         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
13991         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
13992         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
13993         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
13994         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
13995         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
13996         where appropriate.
13997         (java_lex_error): Empty if JC1_LITE is defined.
13998         (java_get_line_col): Return 0 if JC1_LITE is defined.
13999         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14000         SET_MODIFIER_CTX): Moved into the section containing the macros
14001         conditionally defined by JC1_LITE.
14002         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14003         argument if JC1_LITE is defined.
14004         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14005         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14006         is defined.
14007         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14008         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14009         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14010         to different values according to JC1_LITE.
14011         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14012         declared if JC1_LITE set.
14013         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14014         defined if JC1_LITE not set.
14015         (struct parser_ctx): Reorganized and skip the jc1 front end part
14016         if JC1_LITE set.
14017         (java_layout_classes): New function definition.
14018         (java_push_parser_context, java_init_lex, yyparse, yylex,
14019         yyerror): Prototype always declared. All other static function
14020         prototypes declared only if JC1_LITE is not set.
14021         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14022         declared in parse.h.
14023         (java_layout_classes): New function.
14024         (java_complete_expand_methods): No longer layout the class here.
14025         * parse-scan.y: New file.
14026         * jv-scan.c: New file.
14027
14028 1998-08-25  Tom Tromey  <tromey@cygnus.com>
14029
14030         * gjavah.c (main): Handle -friend option.
14031         (friend_specs): New global.
14032         (generate_access): Handle friend_specs.
14033         (process_file): Likewise.
14034         (MAX_FRIENDS): New macro.
14035         (friend_count): New global.
14036         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
14037         Changed all callers.
14038
14039 1998-08-24  Per Bothner  <bothner@cygnus.com>
14040
14041         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
14042         (main):  Handle processing all the entries of a named .zip archive.
14043         * jcf-io.c (jcf_trim_old_input):  New function.
14044         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
14045
14046 1998-08-24  Per Bothner  <bothner@cygnus.com>
14047
14048         * lang.c (flag_assume_compiled):  Make default be on.
14049
14050 1998-08-21  Per Bothner  <bothner@cygnus.com>
14051
14052         * jcf-dump.c:  Add bunches of flags to control output more.
14053         (process_class):  New function;  support printing more than one class.
14054         (main): Support new --print-main and --javap flags.
14055         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
14056         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
14057
14058 1998-08-20  Per Bothner  <bothner@cygnus.com>
14059
14060         Change mangling of dispatch table to match C++ vtable (w/thunks).
14061         * class.c (build_dtable_decl), java-tree.h:  New function.
14062         (make_class_data):  Call it.
14063         * decl.c (init_decl_processing):  Likewise.
14064
14065 1998-08-19  Warren Levy  <warrenl@cygnus.com>
14066
14067         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14068         soft_anewarray; adjust args passed.
14069         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14070         match _Jv_NewObjectArray.
14071
14072 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14073
14074         * decl.c (push_labeled_block, pop_labeled_block): New functions.
14075         * expr.c (loopup_label): Call create_label_decl.
14076         (create_label_decl): New function.
14077         (java_lang_expand_expr): Call expand_start_bindings with argument
14078         set to zero.
14079         * java-tree.h Added space after PROTO in function declarations
14080         when necessary.
14081         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14082         (create_label_decl, push_labeled_block): New function
14083         declarations.
14084         * lex.c (label_id): Initialize.
14085         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14086         switch.
14087         * parse.h Added space after PROTO in function declarations when
14088         necessary.
14089         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14090         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14091         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14092         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14093         macros.
14094         (struct parser_ctxt): New fields current_loop,
14095         current_labeled_block.
14096         (build_if_else_statement, patch_if_else_statement,
14097         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14098         generate_labeled_block, complete_labeled_statement,
14099         build_bc_statement, patch_bc_statement, patch_loop_statement,
14100         build_new_loop, build_loop_body, complete_loop_body): New function
14101         declarations.
14102         * parse.y (java_warning_count): New global variable.
14103         (label_id): New static variable.
14104         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14105         (block:): Return size_zero_node when block is empty.
14106         (empty_statement:): Return size_zero_node.
14107         (statement:): Implement supplemental action when for_statement: is
14108         reduced.
14109         (label_decl:): New rule.
14110         (labeled_statement:): Rewritten using label_decl. Actions
14111         implemented.
14112         (labeled_statement_nsi:): Likewise.
14113         (if_then_statement): Actions implemented.
14114         (while_expression): New rule.
14115         (while_statement:): Rewritten using while_expression. Actions
14116         implemented.
14117         (while_statement_nsi:): Likewise.
14118         (do_statement_begin:): New rule.
14119         (do_statement:): Rewritten using do_statement_begin. Actions
14120         implemented.
14121         (for_statement:): Rewritten using for_begin. Actions implemented.
14122         (for_statement_nsi:): Likewise.
14123         (for_header:, for_begin:): New rules.
14124         (for_init:): Actions implemented.
14125         (statement_expression_list:, break_statement:,
14126         continue_statement:): Likewise.
14127         (yyerror): Count number of issued warning(s).
14128         (java_report_errors): Report error(s) and/or warning(s).
14129         (java_complete_class): Use build_java_argument_signature to
14130         recompute completed method signature.
14131         (java_check_regular_methods): New locals method_wfl and aflags.
14132         Use method_wfl instead of lookup_cl during error reports. Fixed
14133         indentation and modified some error messages. Use
14134         lang_printable_name in method instead of the DECL_NAME. New code
14135         to issue warnings on methods not overriding corresponding methods
14136         private to a different package.
14137         (java_method_add_stmt): Call add_stmt_to_compound.
14138         (add_stmt_to_compound): New function.
14139         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14140         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14141         (build_if_else_statement, patch_if_else_statement,
14142         build_labeled_block, generate_labeled_block,
14143         complete_labeled_statement, build_new_loop, build_loop_body,
14144         complete_loop_body, patch_loop_statement, build_bc_statement,
14145         patch_bc_statement, patch_exit_expr): New functions.
14146         * typeck.c (build_java_signature): Build argument signature before
14147         enclosing it in between parenthesis.
14148
14149 1998-08-17  Warren Levy  <warrenl@cygnus.com>
14150
14151         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14152         (JAVA_OBJS): Added reminder comment
14153
14154 1998-08-13  Nick Clifton  <nickc@cygnus.com>
14155
14156         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14157         be interpreted as a long long.
14158
14159 1998-08-13  Warren Levy  <warrenl@cygnus.com>
14160
14161         * decl.c (init_decl_processing): Use _Jv_InitClass, not
14162         soft_initialise_class.  Use _Jv_NewMultiArray, not
14163         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
14164         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
14165         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
14166         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14167
14168 1998-08-12  Per Bothner  <bothner@cygnus.com>
14169
14170         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14171         length_identifier_node):  New global tree node constants.
14172         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
14173         Replace uses by super_identifier_node etc.
14174         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
14175
14176         * parse.y (resolve_field_access):  Don't special-case ".length" if
14177         flag_emit_class_files.
14178         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
14179         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
14180         and ARRAY.length.
14181
14182 1998-08-11  Per Bothner  <bothner@cygnus.com>
14183
14184         * decl.c (init_decl_processing): Remove unused method_type_node fields.
14185         * class.c (make_method_value):  Remove init for removed fields.
14186
14187         * class.c (layout_class):  Use build_java_argument_signature.
14188         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
14189
14190         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
14191         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
14192         (build_java_signature):  Don't use push_java_argument_signature.
14193
14194         * typeck.c (lookup_argument_method):  New function.
14195         * parse.y (java_check_regular_methods):  Use lookup_argument_method
14196         instead of lookup_java_method2 followed by lookup_java_method.
14197
14198         * parse.y (check_method_redefinition):  Minor optimization.
14199
14200         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
14201         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14202
14203 1998-08-10  Tom Tromey  <tromey@cygnus.com>
14204
14205         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14206         c-pragma.o.
14207
14208         * gjavah.c (java_float_finite): Use K&R-style definition.
14209         (java_double_finite): Likewise.
14210         (generate_access): Now returns void.  Changed all callers.
14211         (last_access_generated): Removed.
14212         (process_file): Only make a single pass over the .class file.
14213
14214 1998-07-29  Per Bothner  <bothner@cygnus.com>
14215
14216         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
14217         for compatibility for G++ (with -fvtable-thunks).
14218         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
14219
14220         * gjavah.c (process_file):  Use public inheritance for super-class.
14221
14222 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14223
14224         * lex.c (java_init_lex): Initialize ctxp->package.
14225         * parse.h (struct parser_ctxt): package and package_len replaced
14226         by tree package, an identifier node. Field method_decl_list is
14227         gone. Fixed comments.
14228         (lookup_field_wrapper, merge_qualified_name, not_accessible,
14229         class_in_current_package): New function prototypes.
14230         * parse.y (array_type:): Set class loaded flag on primitive type
14231         arrays.
14232         (package_declaration:): Assign ctxp->package to the
14233         identifier node.
14234         (method_invocation:): Handle invocation of method qualified by
14235         `super'.
14236         (single_type_import_declaration:): Removed ambiguity check.
14237         (java_pop_parser_context): New local variable `next'. Reset and
14238         set IMPORT_CLASSFILE_NAME flags on current and previous import
14239         list.
14240         (java_accstring_lookup): Use new local macro COPY_RETURN.
14241         (lookup_field_wrapper): New function.
14242         (parser_qualified_classname): Use merge_qualified_name.
14243         (parser_check_super_interface): Broaden error message.
14244         (do_resolve_class): Check for qualified class name in the current
14245         compilation unit if appropriate.
14246         (process_imports): Check for already defined classes.
14247         (check_pkg_class_access): Got rid of call to
14248         get_access_flags_from_decl.
14249         (java_complete_expand_methods): Call safe_layout_class based on
14250         the current class size.
14251         (make_qualified_primary): Build a WFL qualification on primary if
14252         none exists.
14253         (merge_qualified_name): New function.
14254         (make_qualified_name): Use merge_qualified_name.
14255         (resolve_expression_name): Use safe_lookup_field.
14256         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14257         (resolve_qualified_expression_name): Likewise. Check on resolved
14258         element accessibility.
14259         (not_accessible_p, class_in_current_package): New functions.
14260         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14261         (patch_method_invocation_stmt): Merged common pieces. Check
14262         accessibility of invoked method.
14263         (check_for_static_method_reference): Add returned type in error
14264         message.
14265         (invocation_mode): Get rid of bogus check on PRIVATE methods.
14266         (refine_accessible_methods_list): Merged two conditions in test.
14267         (java_complete_class): Sanity check on stabilize_ref gone.
14268         * zextract.c (read_zip_archive): Cast lseek second argument to long.
14269
14270 1998-07-28  Per Bothner  <bothner@cygnus.com>
14271
14272         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
14273
14274 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14275
14276         * gjavah.c (F_NAN): Removed.
14277         (F_NAN_MASK): New macro.
14278         (F_POSITIVE_INFINITY): Removed.
14279         (F_NEGATIVE_INFINITY): Likewise.
14280         (java_float_finite): Rewrote.
14281         (D_NAN_MASK): Renamed.
14282         (java_double_finite): Rewrote.
14283         (D_POSITIVE_INFINITY): Removed.
14284         (D_NEGATIVE_INFINITY): Likewise.
14285
14286         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14287         If verbose, print underlying representation of value in hex.
14288
14289 1998-07-24  Per Bothner  <bothner@cygnus.com>
14290
14291         * buffer.h, buffer.c:  New files.
14292         * Makefile.in (JAVA_OBJS):  Add buffer.o.
14293
14294         Support locals variables and writing their debug entries to .class.
14295         * jcf-write.c:  Simplify some by user new buffer type.
14296         (vode_buffer_grow):  Removed.
14297         (struct localvar_info):  New type.
14298         (localsvars, localvartable):  New buffers.
14299         (localvar_alloc, localvar_free):  New functions.
14300         (generate_bytecode_insns):  Handle local variables.
14301         (generate_classfile):  Write LocalVariableTable attribute.
14302
14303 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14304
14305         * jcf-io.c (open_in_zip): Check the zipfile magic number.
14306         * zipfile.h (ZIPMAGIC): New macro.
14307
14308 1998-07-24  Tom Tromey  <tromey@cygnus.com>
14309
14310         * Makefile.in (gjavah.o): Updated dependencies.
14311         (jcf-dump.o): Likewise.
14312         (all.indirect): Use ../gjavah.
14313         (../gjavah$(exeext)): Likewise.
14314         (clean): Don't remove gjavah.
14315         (clean): Remove parse.c, not java/parse.c.
14316         * Make-lang.in (java): Added gjavah.
14317         (gjavah$(exeext)): New target.
14318         (GJAVAH_SOURCES): New macro.
14319         (java.all.build): Added gjavah.
14320         (java.all.cross): Likewise.
14321         (java.rest.encap): Likewise.
14322         * config-lang.in (compilers, stagestuff): Added gjavah.
14323
14324 1998-07-23  Tom Tromey  <tromey@cygnus.com>
14325
14326         * gjavah.c (java_float_finite): New function.
14327         (java_double_finite): Likewise.
14328         (F_POSITIVE_INFINITY): New macro.
14329         (F_NEGATIVE_INFINITY): Likewise.
14330         (F_NAN): Likewise.
14331         (D_POSITIVE_INFINITY): Likewise.
14332         (D_NEGATIVE_INFINITY): Likewise.
14333         (D_NAN): Likewise.
14334         (print_field_info): Use java_float_finite and java_double_finite.
14335
14336 1998-07-23  Per Bothner  <bothner@cygnus.com>
14337
14338         * parse.y (method_header):  Name "this" implicit argument.
14339
14340 1998-07-22  Per Bothner  <bothner@cygnus.com>
14341
14342         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
14343         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
14344         (put_linenumber):  New function.
14345         (generate_bytecode_insns, generate_classfile):  Write line numbers.
14346
14347 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14348
14349         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14350         (lookup_name, build_known_method_ref, build_class_init,
14351         build_invokevirtual, invoke_build_dtable, match_java_method,
14352         build_field_ref, pushdecl_force_head, build_java_binop,
14353         binary_numeric_promotion, build_decl_no_layout,
14354         build_java_arrayaccess, build_newarray, build_anewarray,
14355         build_java_array_length_access, build_java_arraynull_check): New
14356         extern function prototypes.
14357         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14358         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14359         java-tree.h.
14360         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14361         to NULL
14362         * jcf.h (jcf_out_of_synch): New extern function prototype.
14363         * parse.h: Static/global function implemented in parse.y
14364         prototyped and declarations moved at the end of the file.
14365         (DECL_P): Check that the argument isn't null.
14366         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14367         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14368         (QUAL_DECL_TYPE): New macro.
14369         (PARAMS): Macro definition removed.
14370         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14371         (return_statement:): Call build_return.
14372         (field_access:): Call make_qualified_primary in sub rule.
14373         (method_invocation:): Build method invocation and call
14374         make_qualified_primary when processing primaries.
14375         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14376         get_type_from_signature.
14377         (java_check_regular_method): Extra integer 0 argument when calling
14378         lookup_java_method2.
14379         (lookup_java_interface_method2): Extra method DECL argument when
14380         calling lookup_java_interface_method2.
14381         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14382         COMPOUND_EXPR node.
14383         (java_complete_expand_method): Layout current class iff not
14384         already done. Don't process interface's methods.
14385         (java_complete_expand_method): Use super class only if it
14386         exists. Use current class otherwise.
14387         (make_qualified_primary): New function.
14388         (resolve_expression_name): Process qualified expression or
14389         expression from primary the same way.
14390         (resolve_expression_name): Two last arguments to
14391         resolve_field_access are now NULL_TREEs.
14392         (resolve_field_access): New variable is_static. Local field must
14393         be DECLs. is_static computed on field DECLs only. Append code in
14394         where_found to the field access if necessary. Use QUAL_DECL_TYPE
14395         to initialize field_type.
14396         (resolve_qualified_expression_name): New local variable,
14397         previous_call_static and is_static. Handle primaries with function
14398         calls, casts, array references and `this'. `super' now handled as
14399         `(super_class)this'. Use is_static to clarify boolean expressions.
14400         Added code to handle case where a proper handle is required to
14401         access a field. Use QUAL_DECL_TYPE where applicable.
14402         (maybe_access_field): New function.
14403         (patch_method_invocation_stmt): New arguments primary, where,
14404         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14405         deleted. Use `where' as a type to search from if specified. Check
14406         for static method reference where forbidden. Append primary or
14407         current_this to the argument list if not calling constructor nor
14408         static methods.
14409         (check_for_static_method_reference): New function.
14410         (patch_invoke): Layout the class on which new is done if
14411         necessary.
14412         (lookup_method_invoke): Changed format to report errors on
14413         methods.
14414         (qualify_ambiguous_name): New local variable this_found. Now
14415         handle things from primaries. Method call are considered
14416         expression names.
14417         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14418         changed into NULLs.
14419         (not_initialized_as_it_should_p): Comply with the new DECL_P.
14420         (java_complete_tree): New case fo RETURN_EXPR. Process function
14421         call arguments in separate function.
14422         (complete_function_arguments): New function.
14423         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14424         anymore.
14425         (patch_assignment): Take the return function slot into account as
14426         a RHS. Distinguish assignment from a return.
14427         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14428         when checking methods in interfaces.
14429         (resolve_type_during_patch): NULL argument to unresolve_type_p
14430         instead of NULL_TREE.
14431         (patch_newarray): Fixed typo in comment.
14432         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14433         (build_return, patch_return): New functions.
14434         * typeck.c (lookup_java_constructor): Fixed typo in comment.
14435
14436 1998-07-21  Per Bothner  <bothner@cygnus.com>
14437
14438         * constants.c (find_name_and_type_constant, find_fieldref_index,
14439         find_methodref_index):  New methods.
14440         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
14441         just return given method.  Also, rename to build_known_method_ref.
14442         (expand_invoke):  Rename call to build_invoke_non_interface.
14443         * java-tree.h, parse.h:  Update prototype.
14444         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
14445         (such as expand_expr_stmt) if flag_emit_class_files.
14446         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14447         STACK_TARGET, IGNORE_TARGET):  New macros.
14448         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
14449         (generate_bytecode_insn):  New function to generate method's bytecode.
14450         (generate_classfile):  Node generate Code attribute for a method.
14451         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14452         push_long_const, field_op, adjust_typed_op, maybe_wide):
14453         New functions used by generate_bytecode_insn.
14454
14455         * typeck.c (signature_include_return):  Remove variable.
14456         (push_java_argument_signature, build_java_argument_signature):  New.
14457         (build_java_signature):  Use push_java_argument_signature.
14458         * parse.y:  Use build_java_argument_signature instead of fiddling
14459         with signature_include_return.
14460
14461 1998-07-17  Tom Tromey  <tromey@cygnus.com>
14462
14463         * gjavah.c (print_c_decl): Always generate JArray<>* for array
14464         types.
14465
14466         * Makefile.in (all.indirect): Added gjavah$(exeext).
14467         (gjavah$(exeext)): Added $(exeext).
14468         (clean): Likewise.
14469
14470 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14471
14472         * class.c (layout_class): Call to java_layout_parsed_class replace
14473         by safe_layout_class.
14474         * expr.c (build_java_array_length_access): Removed static storage
14475         class in the function definition.
14476         (build_java_arraynull_check): Likewise.
14477         Also fixed typos in two comments.
14478         * lex.c (java_init_lex): Initialize static global kw_length.
14479         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14480         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14481         java_lex_error.
14482         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14483         * parse.h (resolve_no_layout): New static function declaration.
14484         (get_identifier_in_static): Declaration removed.
14485         (java_layout_parsed_class): Function name declaration changed to
14486         safe_layout_class.
14487         (build_newarray_node, patch_newarray, resolve_type_during_patch,
14488         not_initialized_as_it_should_p, build_this): New static function
14489         declarations.
14490         (pushdecl_force_head, build_java_binop, int_fits_type_p,
14491         binary_numeric_promotion, stabilize_reference,
14492         build_decl_no_layout, build_java_arrayaccess): Extern function
14493         declarations moved into their own section.
14494         (build_newarray, build_anewarray, build_java_array_length_access,
14495         build_java_arraynull_check): New extern function declarations.
14496         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14497         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14498         fake tree codes.
14499         (CALL_CONSTRUCTOR_P): New macro.
14500         * parse.y (kw_length): New static global tree node.
14501         (return_statement): Tagged <node>.
14502         (RETURN_TK): Tagged <operator>.
14503         (variable_declarator_id:): Build variable declaration with an
14504         empty initialization value if a syntax error was found in the
14505         initialization part of the variable declaration.
14506         (statement_without_trailing_substatement:): return_statement: now
14507         uses the default rule.
14508         (return_statement:): Temporarily fixed to return NULL_TREE.
14509         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14510         (class_instance_creation_expression:): Class creation rules now
14511         call build_method_invocation upon reduction.
14512         (array_creation_expression:): Rules call build_newarray_node upon
14513         reduction.
14514         (dim_exprs:): Build a list of dimension expressions.
14515         (dim_expr:): Store location of the OSB_TK in the dimension
14516         expression node.
14517         (method_invocation:): Added a new error rule.
14518         (build_unresolved_array_type): WFL argument may also be an array
14519         on a primitive type. Name of the argument changed to reflect this.
14520         (method_declarator): Insert argument type at the beginning of the
14521         argument type list and later reverse the list.
14522         (unresolved_type_p): Argument 'returned' may be optionally
14523         NULL_TREE.
14524         (java_layout_class_from_source): Function renamed
14525         safe_layout_class.
14526         (resolve_and_layout): Now call resolve_no_layout and
14527         safe_layout_class.
14528         (resolve_no_layout): New function.
14529         (purify_type_name): New function.
14530         (complete_class_report_errors): Call purify_type_name during error
14531         report on a type not found.
14532         (process_imports): error_found local variable doesn't need to be
14533         initialized to zero.
14534         (declare_local_variables): New local type_wfl. Fixed typo in error
14535         message. type_wfl assigned to unresolved type and used to register
14536         incomplete type. Build a WFL around the variable initialization
14537         statement so that debug info can be generated on it.
14538         (source_start_java_method): Reverse argument list after they've
14539         been processed.
14540         (current_this): New static global variable.
14541         (java_complete_expand_methods): Set current_this when appropriate.
14542         (resolve_expression_name): Build correct static and non static
14543         field access bearing a simple name.
14544         (resolve_field_access): Resolve the length field of arrays. Handle
14545         f.m() cases.
14546         (patch_method_invocation_stmt): Set the type of the method
14547         invocation to error_mark_node. This value is later overridden by a
14548         valid type, if any. Don't handle qualified constructor invocation
14549         as qualified method invocation. Call lookup_method_invoke with its
14550         new flag. It's no longer necessary to access the selected method
14551         as the value of a tree list. Handle constructor invocation.
14552         (patch_invoke): Reverse argument list when invoking non interface
14553         methods. Insert call to new as the first argument of the
14554         constructor.
14555         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14556         defined within a final class. Return INVOKE_STATIC if the invoked
14557         method is a constructor.
14558         (lookup_method_invoke): New lc argument is a flag to indicate a
14559         constructor lookup. Now handle constructor lookup. Choose the most
14560         specific method in case several were matching the invocation
14561         requirements. Return a method decl instead of a tree list featuring
14562         one single method decl element.
14563         (refine_accessible_methods_list): New lc flag argument to
14564         indicate that a constructor is being looked up.
14565         (not_initialized_as_it_should_p): New function.
14566         (java_complete_tree): Now process fake tree codes
14567         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14568         save_expr on resolved function call arguments. Case on
14569         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14570         (patch_assignment): LHS can be a field access expression. When
14571         dealing with reference, lhs_type is the promoted type of the
14572         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14573         applicable.
14574         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14575         (patch_binop): Use not_initialized_as_it_should_p where
14576         applicable.
14577         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14578         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14579         where applicable.
14580         (resolve_type_during_patch): New function.
14581         (patch_cast): Call resolve_type_during_patch to resolve type and
14582         report error accordingly.
14583         (patch_array_ref): Use not_initialized_as_it_should_p where
14584         applicable. Array base expression is saved before being
14585         used. Promote the type of an array elements if it contains non
14586         builtin types.
14587         (build_newarray_node, patch_newarray, build_this): New functions.
14588
14589 1998-07-16  Tom Tromey  <tromey@cygnus.com>
14590
14591         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14592         increment it in `for' statement.
14593         (print_field_info): If number is inf or nan, don't print it.
14594         (print_method_info): If method name is `delete', just ignore it.
14595         (print_c_decl): Special-case jstringArray.
14596
14597         * gjavah.c (help): New function.
14598         (no_argument): New function.
14599         (usage): Changed text.
14600         (main): Rewrote argument handling.  Now handles -v, --help,
14601         --version.
14602         (version): New function.
14603         (found_error): New global.
14604         (main): Return found_error.
14605         (generate_access): Set found_error.
14606         (print_c_decl): Likewise.
14607
14608 1998-07-15  Tom Tromey  <tromey@cygnus.com>
14609
14610         * gjavah.c (print_c_decl): Don't print "," when examining field.
14611         Skip type name when looking at "[L" types.
14612         (process_file): Now static.
14613         (generate_access): Now returns int.
14614         (last_access_generated): New global.
14615         (process_file): Clear last_access_generated; make multiple passes
14616         over the class.
14617         (print_field_info): Just return if generate_access returns true.
14618         (print_method_info): Likewise.  Also, allow <init> functions to
14619         pass through.
14620         (print_c_decl): Added is_init argument.  Print constructors
14621         properly.
14622         (print_cxx_classname): Use UTF8_GET to extract characters from
14623         string.
14624         (print_base_classname): New function.
14625         (print_class_decls): New function.
14626         (process_file): Use it.
14627         (utf8_cmp): New function.
14628
14629 1998-07-13  Nick Clifton  <nickc@cygnus.com>
14630
14631         * lang-options.h: Format changed to match changes in gcc/toplev.c
14632         to implement a --help option.
14633
14634 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
14635
14636         * decl.c (init_decl_processing): Revert change to dtable_type.
14637
14638 1998-07-09  Per Bothner  <bothner@cygnus.com>
14639
14640         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
14641
14642 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
14643
14644         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
14645
14646         * lang.c (lang_init): Default flag_exceptions to 1, without
14647         checking to see if it's 2 first.
14648
14649 1998-07-08  Jeffrey A Law  (law@cygnus.com)
14650
14651         * constants.c: Include "system.h".
14652         * decl.c: Likewise.
14653         * lang.c (flag_new_exceptions): Get via extern now.
14654         (lang_init_options): New functions.  Turn on flag_new_exceptions.
14655
14656 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14657
14658         * lex.c (java_lex): Return 0 when we see an invalid character in
14659         the input.
14660
14661         * lex.c (java_read_char): Specify extra argument when calling
14662         java_lex_error.
14663         (java_read_unicode, java_parse_end_comment,
14664         java_parse_escape_sequence): Likewise,
14665         (java_lex): Specify extra argument when calling
14666         java_lex_error. Test that IDs are beginning with a legal character
14667         for IDs. Handle invalid characters with an error message and a
14668         call to java_lex_error.
14669         (java_lex_error): Adjust column position by new argument
14670         `forward'. Issue an error even if in the middle of reporting an
14671         other error.
14672
14673 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
14674
14675         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
14676         we don't explicitly put a null pointer when we're copying it.
14677
14678 1998-07-07  Tom Tromey  <tromey@cygnus.com>
14679
14680         * gjavah.c (print_cxx_classname): New function.
14681         (super_class_name): Likewise.
14682         (print_super_fields): Removed.
14683         (in_super): Removed.
14684         (print_field_info): Never generate #defines.
14685         (print_c_decl): Changed generated types to match JNI.  No longer
14686         print class name before method name.
14687         (print_method_info): Print "static" before static methods.
14688         Print "virtual" before non-final methods.
14689         (usage): Use exit(1), not exit(-1).
14690         (main): Likewise.
14691         (print_field_info): Use %.17g to print a double.
14692         (last_access): New globals.
14693         (process_file): Initialize last_access.
14694         (usage): Now static.
14695         (ACC_VISIBILITY): New define.
14696         (generate_access): New function.
14697         (print_field_info): Call it.
14698         (print_method_info): Likewise.  Also, generate information for all
14699         methods, not just native methods.  Return void.
14700         (print_c_decl): Return void.
14701         (print_field_info): Return void.
14702
14703 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14704
14705         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
14706         processing the jc1 grammar file. Prefix bison functions and
14707         variables with java_.
14708         (parse.c): Dependencies on parse.h and lex.h
14709         * expr.c (build_java_arrayaccess): Function now global.
14710         * java-tree.h: Comment reorganized to carry on previous
14711         classification effort.
14712         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
14713         RESOLVE_TYPE_NAME_P): New flags on WFLs.
14714         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
14715         java_parse (new prefix java_ generated by bison).
14716         (java_layout_parsed_class, java_register_parsed_class): Function
14717         call removed.
14718         (yyparse): Removed unnecessary call to init_outgoing_cpool.
14719         * lex.c (static tree wfl_op): Variable deleted.
14720         (java_init_lex): Initialize kw_super and kw_this. Initialize more
14721         ctxp fields to NULL_TREE.
14722         (java_lex): No longer create WFL for operators. Filename caching
14723         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
14724         created as STRING_CST and later expanded. Removed extra argument
14725         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
14726         and SUPER.
14727         (build_wfl_node): Removed code in comments.
14728         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
14729         store token and location data in the current bison token.
14730         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
14731         static/extern function declaration at the beginning of the file.
14732         (struct qualification): Data structure definition deleted.
14733         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
14734         (qualify_ambiguous_name): Function declaration modified. Function
14735         now returns nothing.
14736         (build_array_ref, patch_array_ref, make_qualified_name,
14737         resolve_qualified_expression_name, maybe_generate_clinit,
14738         resolve_field_access): New static function declarations.
14739         (build_java_arrayaccess): New extern function declaration.
14740         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
14741         (CALL_EXPR_PRIMARY): Macro deleted.
14742         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
14743         (struct parser_ctxt): Field initialized_final
14744         removed. non_static_initialized, static_initialized: New fields.
14745         * parse.y (static tree kw_super, static tree kw_this): New global
14746         static.
14747         (%union): tree wfl field of operator member replaced by int
14748         location. WFLs are non longer created for operators.
14749         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
14750         (qualified_name:): Now calls make_qualified_name to build the
14751         identifier.
14752         (type_declaration:): Consider generating <clinit> when class
14753         parsing completed.
14754         (variable_declarator:): Directly build an assignment node when the
14755         variable is initialized when declared.
14756         (this_or_super:): Build a WFL and set current location when THIS
14757         or SUPER are parsed.
14758         (expression_statement:): Wrap statement around a WFL.
14759         (primary_no_new_array:): Fixed typo. Changed value returned by
14760         THIS_TK because of its new type (temporary).
14761         (dim_exprs:): Temporary fix because of OSB_TK's new type.
14762         (field_access:): Build qualified name with SUPER.
14763         (method_invocation:): Fixed returned value because of SUPER's new
14764         type.
14765         (array_access:): Use OSB_TK location information.
14766         (post_increment_expression:, post_decrement_expression:,
14767         unary_expression:, pre_increment_expression:,
14768         pre_decrement_expression:, unary_expression_not_plus_minus:,
14769         cast_expression:, multiplicative_expression:,
14770         additive_expression:, shift_expression:, relational_expression:,
14771         equality_expression:, and_expression:, exclusive_or_expression:,
14772         inclusive_or_expression:, conditional_and_expression:,
14773         conditional_or_expression:, assignment:): Use new location/token
14774         information available on operators.
14775         (create_class): Set super_decl_type to NULL_TREE when processing
14776         java.lang.Object.
14777         (register_fields): Field initialization is now a MODIFY_EXPR
14778         node. Chain initialization code to the matching lists (according
14779         to the field declaration modifiers).
14780         (maybe_generate_clinit): New function.
14781         (method_header): Don't set method's DECL_NAME to a WFL when adding
14782         methods to java.lang.Object.
14783         (resolve_and_layout): Now can return NULL_TREE if the type
14784         resolution fails. Otherwise, return the class DECL instead of its
14785         TYPE.
14786         (check_method_redefinition): Don't patch method DECL_NAME if it
14787         belongs to java.lang.Object.
14788         (process_imports): Simply assign error_found to the value returned
14789         by check_pkg_class_access.
14790         (declare_local_variables): Don't use their init statements (if
14791         any) when parsing error were previously found. Reuse MODIFY_EXPR
14792         build during parsing as an init statement.
14793         (java_method_add_stmt): Now return the current method body.
14794         (java_layout_parsed_class, java_register_parsed_class): Functions
14795         removed.
14796         (java_complete_expand_methods): Initialize the constant pool on a
14797         per class basis. Layout the classes before expanding their method
14798         bodies. Don't try expand artificial constructor code if error were
14799         found. Make the classes data and register them if no error were
14800         found.
14801         (java_complete_expand_method): Retrieve an artificial constructor
14802         argument list before entering its body. Assign the top block to
14803         the artificial constructor function body and set types of declared
14804         blocks and compound statements to void. Walk method body if not an
14805         artificial constructor.
14806         (make_qualified_name, cut_identifier_in_qualified): New functions.
14807         (resolve_expression_name): Fixed comments. Save/restore the
14808         current class CLASS_LOADED_P flag value. Build non qualified
14809         static field access and handle qualified expression names.
14810         (resolve_field_access, resolve_qualified_expression_name): New
14811         functions.
14812         (patch_method_invocation_stmt): Use the new expression resolution
14813         scheme, calling resolve_field_access when the function call is
14814         resolved as an expression.
14815         (qualify_ambiguous_name): Function rewritten to work on qualified
14816         expression produced by make_qualified_name.
14817         (java_complete_tree): Promote type when function's argument are
14818         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
14819         the assignment to discover further errors if RHS is a expression
14820         name that fails to evaluate. Declare LHS initialized even though
14821         the assignment failed. Don't use the location variable and removed
14822         extra argument in patch function calls. Now handle the ARRAY_REF
14823         case and build internal string representation when STRING_CSTs are
14824         walked.
14825         (build_method_invocation): Don't wrap function call around a WFL.
14826         (build_assignment): Likewise. Use the operator location
14827         information.
14828         (patch_assignment): Handle array access LHSs. Handle error
14829         provenance, resulting in a better error report.
14830         (build_binop): Use op_location from operator as binop location
14831         information.
14832         (build_unaryop, build_incdec, build_cast): Likewise.
14833         (patch_binop): Extract location information from the node. Fixed
14834         typo in error message.
14835         (patch_unary_op): Extract location information from the node.
14836         (build_array_ref, patch_array_ref): New functions.
14837
14838 1998-07-01  Tom Tromey  <tromey@cygnus.com>
14839
14840         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
14841         match _Jv_IsInstanceOf.
14842         * decl.c (init_decl_processing): Use _Jv_NewArray, not
14843         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
14844
14845 1998-06-30  Tom Tromey  <tromey@cygnus.com>
14846
14847         * decl.c (init_decl_processing): Functions are now named
14848         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
14849
14850 1998-06-29  Per Bothner  <bothner@cygnus.com>
14851
14852         * java-tree.h (load_class):  Add prototype.
14853         * class.c (is_compiled_class):  Add missing arg to load_class.
14854         * expr.c (expand_java_NEW):  Call load_class.
14855         * parse.y (process_import):  Removed bogus use of void return value.
14856
14857 1998-06-25  Per Bothner  <bothner@cygnus.com>
14858
14859         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
14860         Function name is "_Jv_Throw" instead of "soft_athrow".
14861         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
14862         Function name is "_Jv_AllocObject" instead of "soft_new".
14863         Takes an extra parameter (object size).
14864         * expr.c:  Update calls.
14865
14866 1998-06-24  Per Bothner  <bothner@cygnus.com>
14867
14868         * lex.c (java_get_line_col):  Handle end-of-file.
14869         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
14870
14871 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
14872
14873         * lang.c (lang_init): Make -fexceptions the default.
14874         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
14875         exception handling is not turned on.
14876
14877 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14878
14879         * lang.c (flag_new_exceptions): Make this this default.
14880         * decl.c (end_java_method): Call emit_handlers.
14881         * except.c (method_init_exceptions): Set language code and version.
14882         (expand_start_java_handler): Enable exception, and call
14883         expand_eh_region_start.
14884         (expand_end_java_handler): Enable exception, and set up catch blocks.
14885         (emit_handlers): New routine to generate the saved handlers.
14886         * java-except.h (emit_handlers): Add prototype.
14887
14888 1998-06-12  Per Bothner  <bothner@cygnus.com>
14889
14890         We used to have three different representations of the constant pool:
14891         the CPool structure, the tree_constant_pool, and the constructures
14892         used to build the Class object (which may need class and string
14893         constants) in compiled code.  None were appropriate for compiling
14894         to .class files, so I did a major overhaul.
14895
14896         First, the tree_constant_pool array was removed.  Things were
14897         modified to the CPool structure in the JCF could be used.
14898         Second, a "capacity" field was added to the CPool, and functions
14899         written to search for a matching constant, adding one if not found.
14900         The code that generated the Class object was changed to use a CPool.
14901         The actual TREE_LISTs used to build the CONSTRUCTORs used for
14902         the static Class object are now only in build_constants_constructor.
14903         Finally, I wrote code which can generate a .class file (including its
14904         constant pool) from the RECORD_TYPE of a class.  This is a big step
14905         on the way to compiling Java source into .class files.
14906
14907         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
14908         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
14909
14910         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
14911         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
14912         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
14913         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
14914         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
14915         (lang_type):  Removed constant_pool field.
14916         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
14917         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
14918         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
14919         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
14920
14921         * constants.c (current_constant_pool_tags, current_constant_pool_data,
14922         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
14923         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
14924         (set_constant_entry, find_constant1, find_constant2,
14925         find_class_constant, count_constant_pool_bytes, write_constant_pool,
14926         find_utf8_constant, find_class_or_string_constant):  New functions.
14927
14928         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
14929         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
14930         (give_name_to_class, get_class_constant):  Likewise.
14931         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
14932         (get_name_and_type_constant, get_ref_constant):  Removed.
14933         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
14934         * parse.y:  Don't save/restore tree_constant_pool.
14935         * verify.c (verify_jvm_instructions):  Update for new approach.
14936         * expr.c (expand_invoke, expand_java_field_op): Likewise.
14937
14938         * lang-options.h:  Added -femit-class-file, -femit-class-files.
14939         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
14940         (lang_f_options):  Added "emit-class-file(s)".
14941
14942         * expr.c (build_java_arrayaccess):  Generate more efficient array
14943         bounds checking, by using unsigned compare.
14944
14945         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
14946
14947 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14948
14949         * parse.h: New comment on the handling of unresolved type
14950         identifiers. JDEPs are now part of the jdep_code enum.
14951         (typedef struct jdep): Now use enum jdep_code or int, depending on
14952         availability. Both are narrowed down to an 8 bits bitfield.
14953         (CALL_EXPR_PRIMARY): Fixed comment.
14954
14955 1998-06-10  Tom Tromey  <tromey@cygnus.com>
14956
14957         * Make-lang.in (java): Added gjavac and jvgenmain.
14958         (java.start.encap): Depend on gjavac.
14959         (java.rest.encap): Depend on jvgenmain.
14960
14961         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
14962         (JAVA_CROSS_NAME): Likewise.
14963         (java.all.build): Depend on jvgenmain and gjavac.
14964         (java.all.cross): Depend on jvgenmain and gjavac-cross.
14965         (jvgenmain$(exeext)): New target.
14966         (java.install-common): Wrote.
14967         * config-lang.in (compilers, stagestuff): Added gjavac and
14968         jvgenmain.
14969
14970 1998-06-10  Dave Brolley  <brolley@cygnus.com>
14971
14972         * lang.c (lang_decode_option): New argc/argv interface.
14973
14974 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14975
14976         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
14977         * decl.c (build_decl_no_layout): New function.
14978         * expr.c (java_lang_expand_expr): Layout declarations found in
14979         blocks before they're pushed.
14980         * jcf-parse.c (load_class): Save current line when parsing class
14981         file.
14982         (parse_source_file): Register class before expanding their
14983         methods.
14984         * lang.c (put_decl_node): Produce `null' when `void *' is
14985         processed.
14986         * lex.c (static tree wfl_op): New static global, for error report
14987         on casts.
14988         (java_init_lex): wfl_operator and wfl_op initialized
14989         here. Filename caching added for wfl_op. Return wfl_op when `(' is
14990         parsed.
14991         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
14992         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
14993         build_unresolved_array_type): New static function definitions.
14994         (build_decl_no_layout): New extern function declared.
14995         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
14996         faulty modifier exists.
14997         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
14998         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
14999         (UNARY_PLUS_EXPR): New fake operator.
15000         (struct parser_ctxt): New field osb_number.
15001         * parse.y (static tree wfl_operator): New static WFL for operator
15002         bound error messages.
15003         (DECR_TK, INCR_TK): Moved.
15004         (OP_TK): Tagged <operator>.
15005         (array_type:): Now call build_unresolved_array_type.
15006         (dim_expr:): Count the number of '[' seen.
15007         (post_increment_expression, post_decrement_expression,
15008         pre_increment_expression, pre_decrement_expression,
15009         unary_expression_not_plus_minus, unary_expression:): Actions are
15010         now building the corresponding unary expressions.
15011         (cast_expression:): Actions are now building cast expressions.
15012         (build_unresolved_array_type): New function.
15013         (create_interface): Reset the number of declared interfaces.
15014         (create_class): Likewise.
15015         (method_header): Methods declared within the scope of an interface
15016         are now implicitly set public and abstract.
15017         (java_complete_class): Variable's and parameter's type are patched
15018         with a promoted type.
15019         (declare_local_variables): Resolved non builtin types are promoted
15020         before being used to build a variable decl. Removed type patch
15021         posted on variable initialization statement.
15022         (source_start_java_method): Use build_decl_no_layout to build the
15023         decl of a parameter of incomplete type.
15024         (java_register_parsed_class): Process interfaces too. Call
15025         rest_of_decl_compilation on each processed class declarations.
15026         (java_complete_expand_methods): Don't attempt to expand things in
15027         interfaces.
15028         (java_complete_tree): Process CONVERT_EXPR, even though it always
15029         has a type. Propagate error_mark_node to node's type too. Promote
15030         method's call argument type and return error_mark_node if
15031         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15032         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15033         handle unary operator nodes.
15034         (build_assignment): Added comment.
15035         (print_int_node): New function.
15036         (patch_assignment): New second argument. New error handling. Use
15037         print_int_node. Handle references. Use can_cast_to_p to issue
15038         different error message according to the context and check upon
15039         the initialization of the RHS.
15040         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15041         (operator_string): Handle more operators.
15042         (patch_binop): No longer use a function static
15043         wfl_operator. Improved error message on shift distance.
15044         (build_unaryop, build_incdec, build_cast, patch_unaryop,
15045         patch_cast): New functions.
15046
15047 1998-06-05  Per Bothner  <bothner@cygnus.com>
15048
15049         * jvspec.c:  New file.
15050         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
15051
15052         * java-tree.h (identifier_subst):  Add declaration.
15053
15054 1998-06-04  Tom Tromey  <tromey@cygnus.com>
15055
15056         * jvgenmain.c (main): Generate call to JvRunMain.
15057
15058         * class.c (make_class_data): Push value for "sync_info" field.
15059         * decl.c (init_decl_processing): Push "sync_info" field.
15060
15061 1998-06-03  Per Bothner  <bothner@cygnus.com>
15062
15063         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
15064         Java (source) name, not signature.
15065         Set TYPE_ALIGN to (at least) that of element_type.
15066
15067 1998-06-02  Per Bothner  <bothner@cygnus.com>
15068
15069         * class.c:  Moved classname-mangling-rekated code to ...
15070         * mangle.c:  ... this new file.
15071         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
15072         * Makefile.in:  Update for above changes.
15073
15074 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15075
15076         * expr.c (truthvalue_conversion): Convert integer and floating
15077         point value to their truth value.
15078         * lex.c (java_lex): Handle the `null' literal.
15079         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15080         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15081         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15082         New macros.
15083
15084         * parse.y: Reorganization/documentation on token declaration.
15085         (binop_lookup[]): New added new tree codes.
15086         (relational_expression): Build corresponding binary operators.
15087         (equality_expression, conditional_and_expression,
15088         conditional_or_expression): Likewise.
15089         (java_complete_class): Fix crash in debug message.
15090         (java_complete_tree): Check initialization of method call
15091         arguments. Further bogus node evaluation to detect more error
15092         during assignments. Handles more binary operators.
15093         (patch_assignment): Use DECL_P.
15094         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15095         code.
15096         (operator_string): Handle more case. Compacted source.
15097         (patch_binop): Changed function comment. Checking for
15098         uninitialized first operand takes the compound assignment into
15099         account and uses DECL_P. Checking for uninitialized second operand
15100         delayed to routine's end. Use macros to issue type bound error
15101         messages and issue messages on both operands if their types are
15102         different. Force fixed type into node. Handle all binary
15103         operators.
15104
15105 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15106
15107         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15108         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15109         build operator node and return tokens.
15110         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15111         * parse.h (java_complete_tree): Changed returned type in prototype.
15112         (build_method_invocation, build_assignment, patch_assignment,
15113         patch_binop): New static function declarations.
15114         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15115         BUILD_EXPR_WFL): New macros.
15116         * parse.y (enum tree_code binop_lookup[]): New static for token to
15117         TREE_CODE lookup.
15118         (%union): Parser union has new sub-structure `operator'.
15119         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15120         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15121         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15122         ASSIGN_ANY_TK): Tokens tagged `operator'.
15123         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15124         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15125         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15126         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15127         (assignment_operator:): Rule tagged `operator'.
15128         (expression_statement:): Re-installed default rule.
15129         (method_invocation:): Sub rules call build_method_invocation.
15130         (postfix_expression:): Don't attempt to resolve name here. Just
15131         return an ID.
15132         (multiplicative_expression:): Sub-rules build corresponding binop
15133         expression node.
15134         (additive_expression:, shift_expression:, and_expression:,
15135         exclusive_or_expression:, inclusive_or_expression:): Likewise.
15136         (assignment:): Sub rule invoke build_assignment.
15137         (assignment_operator:): Default rules on sub rules.
15138         (force_error): Added documentation on this variable.
15139         (declare_local_variables): Build initialization calling
15140         build_assignment.
15141         (expand_start_java_method): Removed unused rtx declaration. Mark
15142         arguments as already initialized.
15143         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15144         (java_complete_expand_methods): Don't process next method if
15145         completion of the previous one triggered errors.
15146         (java_complete_expand_method): Call source_end_java_method if no
15147         error were found during completion.
15148         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15149         locals declaratilon. Handle names found within a class. Return
15150         error_mark_node when things aren't found.
15151         (patch_method_invocation_stmt): Return error_mark_node on failures.
15152         (patch_invoke): Removed unused local. Return the correct node.
15153         (java_complete_tree): Now returns a value. The BLOCK section binds
15154         local identifiers and the type of a BLOCK is now void. Assign the
15155         result of operand completion on COMPOUND_EXPR. Assign the
15156         encapsulated node of a WFL to the result of its completion, except
15157         when the node is an identifier. Now handle MODIFY_EXPR and several
15158         binary operators. Return error_mark_node on errors.
15159         (build_method_invocation, build_assignment, patch_assignment,
15160         build_binop, operator_string, patch_binop): New functions.
15161         * typeck.c (binary_numeric_promotion): New function.
15162
15163 1998-05-21  Per Bothner  <bothner@cygnus.com>
15164
15165         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
15166         Replace most uses of ident_subst by identifier_subst.
15167
15168         * class.c (push_class_static_dummy_field):  Removed function.
15169         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
15170         instead of looking got "class" static field.  Create that decl here.
15171         (class_identifier_node):  Removed;  no longer needed.
15172         (init_class_processing):  Don't init class_identifier_node.
15173         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
15174         Do nreverse 0 times (instead of twice) for Object and Class.
15175         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15176
15177 1998-05-20  Per Bothner  <bothner@cygnus.com>
15178
15179         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
15180         while initializing linenumber_count and linenumber_table.
15181         Do it before init_function_start (which calls emit_line_note).
15182         * expr.c (expand_byte_code):  Don't need to clear lineno here.
15183
15184 1998-05-18  Tom Tromey  <tromey@cygnus.com>
15185
15186         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15187         then mangle number as _N_.
15188
15189         * class.c (mangle_class_field): New function.
15190         (build_class_ref): Set assembler name of class reference using
15191         mangle_class_field.
15192         (push_class_static_dummy_field): Likewise.
15193
15194 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
15195
15196         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15197         of assigning to TREE_CODE.  The latter method exploits a feature
15198         of GCC that is not ANSI compliant.
15199
15200 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15201
15202         * decl.c (pushdecl_force_head): New function.
15203         (pushlevel): Removed conditional printf.
15204         (complete_start_java_method): Don't enter local variable scope if
15205         function is compiled from source code.
15206         * expr.c: parse.h now included
15207         (java_lang_expand_expr): New function.
15208         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15209         printf. Terminate buffer when doing directories.
15210         * jcf-parse.c (parse_source_file): Call lang_init_source before
15211         parsing and before code generation.
15212         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15213         use printf if the macro is defined.
15214         * lang.c (lang_init): Install lang_expand_expr hook on
15215         java_lang_expand_expr.
15216         (java_dummy_print): New function.
15217         (lang_init_source): New function.
15218         * lex.c (java_lex): Remember location of an opening brace at the
15219         second nesting level.
15220         (java_is_eol): Unget character seen after a CR if it is EOF.
15221         * parse.h: Now includes lex.h
15222         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15223         printf if the macro is defined.
15224         (expand_start_java_method, build_expr_block, enter_block,
15225         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15226         New static function declarations.
15227         (pushdecl_force_head): New extern function declaration.
15228         (INCOMPLETE_TYPE_P): New macro.
15229         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15230         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15231         BLOCK_EXPR_ORIGIN): New macros.
15232         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15233         DECL_SOURCE_LINE_LAST): New macros.
15234         (struct parser_ctxt): Removed field current_method_decl, redundant
15235         with the field current_function_decl. Added fields
15236         first_ccb_indent1 and pending_block.
15237         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15238         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15239         tagged <node>
15240         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15241         (compilation_unit:): Cosmetic on sub rule.
15242         (type_declaration:): Cosmetic on sub rules. Added an error rule.
15243         (variable_initializer:): Installed default rule on expression:.
15244         (method_declaration:): method_header: starts a new
15245         method. method_body: installs the function body, absorbs blocks
15246         emitted for temporary variable scopings, pops function's body block
15247         and merges function's last statement lineno in DECL_SOURCE_LINE.
15248         (method_body:): Installed default rules.
15249         (block:): Call enter_block when an opening brace is seen.  Absorb
15250         scoping blocks and call exit_block when a closing brace is seen.
15251         (block_statement:): Cosmetic changes.
15252         (method_invocation:): Create WFL around CALL_EXPR node.
15253         (patch_stage): Added comment around definition.
15254         (method_header): Try to use first_ccb_indent1 as the first line of
15255         the method, so BP debug info are emitted at the first opening
15256         brace of the function. If the function has no body, use the
15257         location of the function's name. Override currently defined method
15258         name with the matching WFL so we can point redefinition errors
15259         using the location where the function's name was declared.
15260         (check_abstract_method_header): Interprets DECL_NAME as an
15261         identifier or as a WFL, accordingly.
15262         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15263         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15264         location and name information out of it and reinstall DECL_NAME to
15265         its original identifier node value.
15266         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15267         function's source code).
15268         (read_import_dir): Test the value returned by find_class and issue
15269         a fatal accordingly.
15270         (declare_local_variables): Push a new block for the scope of the
15271         new variable(s) if code has been already generated at that nesting
15272         level. Pinpoint redefinition errors using the variable id
15273         WFLs. Generate initialization code if necessary. If the variable
15274         type is incomplete, register a patch on its decl.
15275         (source_start_java_method): Rewritten. Define a new block for the
15276         function's parameters. Build parameter decl out of function's
15277         arguments and register them for a patch if their types are
15278         incomplete.
15279         (expand_start_java_method): Includes the part of
15280         source_start_java_method that was pushing the parameter decls and
15281         completing the method start code.
15282         (source_end_java_method): Removed call the expand_end_bindings and
15283         poplevel (already taken care of). Reinstall function's arguments
15284         and get function's last line of code before calling
15285         expand_function_end.
15286         (java_method_add_stmt): New comment before the function's
15287         code. Complement the second operand of the current COMPOUND_EXPR
15288         if necessary.
15289         (java_complete_expand_methods): Don't generate debug info on line
15290         zero when expanding a generated constructor.
15291         (java_complete_expand_method): Set start and end line numbers for
15292         a artificially generated constructor to one and manually call
15293         enter_block and exit_block when defining it. For all methods:
15294         expand function's start calling the new expand_start_java_method
15295         and invoke java_complete_tree on the effective method's body, if
15296         any.
15297         (resolve_expression_name): Now use lookup_name_in_blocks to search
15298         local variable decls and print out an error when variables are
15299         undefined.
15300         (patch_method_invocation_stmt): Inserted comment before the
15301         function's code.
15302         (lookup_method_invoke): Chain method's arguments using chainon
15303         with the current arg list as a second argument. Inserted missing
15304         IDENTIFIER_POINTER when reporting an error on methods not found.
15305         (refine_accessible_methods_list): Don't retain constructors.
15306         (patch_arguments): Function removed.
15307         (java_complete_tree): Inserted comment before the function's
15308         code. New case for BLOCKs. Moved the WFL case a bit
15309         further. Complete function's arguments.
15310         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15311         maybe_absorb_scoping_blocks): New functions.
15312
15313 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15314
15315         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15316         previously set.
15317         * jcf-parse.c (parse_source_file, java_error_count): New forward
15318         and extern declarations.
15319         (java_parse_abort_on_error): Macro moved.
15320         (jcf_parse_source): fatal called if fopen fails. Now calls
15321         parse_source_file.
15322         (parse_source_file): New parse_only parameter. Reflects the
15323         elimination of the second pass.
15324         (yyparse): parse_source_file called with argument set to 0.
15325         * jcf.h (JCF_ZERO): Sets java_source to zero.
15326         * lex.c (java_init_lex): pass argument is gone. Function modified
15327         to be called once during the analysis of a file.
15328         (java_unget_unicode): Fixed typo in fatal message.
15329         (java_get_line_col): Likewise.
15330         (java_lval): Likewise. String literals no longer built during
15331         second pass.
15332         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15333         account.
15334         * parse.h (MODIFIER_WFL): New macro.
15335         (parse_check_super, parser_check_super_interface): Now return int.
15336         (parser_chain_incomplete_item, not_builtin_p,
15337         complete_method_decl): Declarations removed.
15338         (build_method_invocation_stmt, build_invoke): Renamed using the
15339         `patch' instead of `build'
15340         (register-incomplete_type, obtain_incomplete_type,
15341         java_complete_tree, java_complete_expand_method,
15342         unresolved_type_p, create_jdep_list): New function declarations.
15343         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15344         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15345         (jdep): New typedef on new struct _jdep.
15346         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15347         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15348         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15349         JDEP_RESOLVED_P): New macros.
15350         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15351         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15352         JDEP_VARIABLE): New enum values and jdep kinds.
15353         (jdeplist): New typedef on struct _jdeplist.
15354         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15355         macros.
15356         (CALL_EXPR_PRIMARY): New macro.
15357         (struct parser_ctxt): Fields java_pass, current_method_decl,
15358         method_decl_list deleted. New field jdeplist.
15359         (INCOMPLETE_P): Macro deleted.
15360         * parse.y (single_type_import_declaration:): Removed pass switch.
15361         (type_import_on_demand_declaration): Likewise.
15362         (field_declaration:): Removed pass switch on all sub rules.
15363         (class_declaration:): Call the complete_class_decl removed on
15364         class_body rules.
15365         (method_declaration:): Removed second pass switch. No longer chain
15366         methods decl when method_header reduced.
15367         (method_header:): Sub rules no longer depend on pass switch.
15368         (method_declarator:): Likewise.
15369         (method_body:): Likewise.
15370         (abstract_method_declaration:): Likewise.
15371         (block_statement:): Likewise.
15372         (local_variable_declaration:): Likewise.
15373         (argument_list:): Likewise.
15374         (method_invocation:): Likewise. Call to build_method_invocation_stmt
15375         removed. Partial CLASS_EXPR tree node built instead.
15376         (postfix_expression:): Removed pass switch on all sub rules.
15377         (java_pop_parser_context): Free classd_list content.
15378         (yyerror): Call obstrack_grow0 to finalize error message.
15379         (check_class_interface_creation): Comment modified to reflect new
15380         returned value meaning. Removed second pass switch. Return 1 if an
15381         error was found, 0 otherwise. Adjust pointer on filename if a
15382         leading path separator was found.
15383         (maybe_create_class_interface_decl): Removed first pass switch
15384         when linking the class decl to the class_list. Install a new
15385         jdep_list for the class.
15386         (add_superinterfaces): List of unresolved interfaces is
15387         gone. Unresolved interfaces are directly added to the current
15388         dependencies list.
15389         (create_interface): Second pass shortcut removed.
15390         ctpx->modifier_ctx access through MODIFIER_WFL.
15391         (create_class): Second pass shortcut removed. Call to
15392         register_incomplete_type replaces the call to
15393         parser_chain_incomplete_item.
15394         (complete_class_decl): Function removed.
15395         (duplicate_declaration_error): New way of retrieving redeclared
15396         item type.
15397         (register_fields): Call to lookup_modifier_cl replaced by
15398         MODIFIER_WFL. New way of handling unresolved type, using
15399         unresolved_type_p and obtain_incomplete_type.
15400         register_incomplete_type replaces call to parser_chain_incomplete_item.
15401         (patch_stage): New static global variable.
15402         (method_header): New way of handling unresolved type, using
15403         unresolved_type_p and obtain_incomplete_type. patch_stage used to
15404         indicates that the method decl needs to be patched.
15405         (check_abstract_method_header): Call to lookup_modifier_cl
15406         replaced by MODIFIER_WFL.
15407         (method_declarator): Incomplete argument type are registered
15408         calling register_incomplete_type. Patch on the declared method is
15409         issued in that case.
15410         (unresolved_type_p): New function.
15411         (parser_check_super_interface): New comment to reflect function's
15412         modified returned type (int). Function and has a new argument
15413         this_wfl. Call to parse_error_context uses this_wfl instead of
15414         relying on lookup_cl.
15415         (parser_check_super): Comment reflects function's new returned
15416         type (int). Function returns nonzero value on error.
15417         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15418         register_incomplete_type, jdep_resolve_class): New functions to
15419         handle incomplete types in declarations.
15420         (java_complete_class): Rewritten to work with the new incomplete
15421         type handling scheme.
15422         (complete_class_report_errors): Likewise.
15423         (complete_method_decl): Removed: it jobs is now handled by
15424         java_complete_class.
15425         (do_resolve_class): Class loaded in not already loaded and not
15426         found in Java source code.
15427         (java_check_regular_methods, java_check_abstract_methods): Don't
15428         call complete_method_decl anymore.
15429         (lookup_modifier_cl, not_builtin_p): Functions deleted.
15430         (read_import_dir): Got rid of the pass number dependency.
15431         (declare_local_variables): New handling of unresolved types (patch
15432         issued).
15433         (source_start_java_method): New parameter level. Function called
15434         with level set to 1 when argument types are potentially
15435         unresolved.  Called to complete the job with level set to 2 once
15436         types are complete.
15437         (source_end_java_method): Call to permanent_allocation
15438         removed. Waiting to be replaced by a more suitable obstack
15439         management.
15440         (java_complete_expand_methods, java_complete_expand_method,
15441         java_expand_finals): New functions.
15442         (build_method_invocation_stmt): Renamed
15443         patch_method_invocation_stmt. Extracts function call expression
15444         (wfl) and arguments (args) from CALL_EXPR tree operands.
15445         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15446         call. Patch the function and argument operand of the CALL_EXPR
15447         tree argument.
15448         (patch_argument, java_complete_tree): New functions.
15449
15450 1998-04-20  Per Bothner  <bothner@cygnus.com>
15451
15452         Recover from missing fields and methods (i.e. error instead of fatal).
15453         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
15454         * expr.c (expand_invoke):  Recover from missing method.
15455         (expand_java_field_op):  Recover from missing field.
15456         Inline references to java.lang.{Integer,Char,...}.TYPE.
15457         * typeck.c (get_type_from_signature), java-tree.h:  New function.
15458         * class.c (add_method):  Use get_type_from_signature.
15459         (build_class_ref):  Handle a class that was not found.
15460         * typeck.c (convert):  Handle conversion to pointers (for convenience).
15461         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
15462         instead of lookup_field to handle missing fields.
15463
15464         * jcf-parse.c (process_zip_dir):  Set java_source.
15465
15466 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
15467
15468         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15469
15470 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15471
15472         * jcf-parse.c (load_class): Don't change input_filename before
15473         calling jcf_parse_source (but still do it before calling
15474         jcf_parse).
15475         (jcf_parse_source): Assign input_filename after having saved the
15476         parser context.
15477         * lex.c (java_init_lex): Chain a WFL node to the import on demand
15478         list. ctxp->modifier_ctx zeroed according to its new
15479         definition. ctxp->filename initialized. Removed
15480         JAVA_MODIFIER_CTX_UNMARK.
15481         (java_unget_unicode): Update the character based column position.
15482         (java_allocate_new_line): ref_count not used anymore. Always free
15483         ctxp->p_line. Initialize c_line->char_col to 0.
15484         (java_get_unicode): Update the character based column position.
15485         (java_lex): Use ctxp->elc to store current position in source
15486         file, at the beginning of the parsed token. Set modifier_ctx entry
15487         corresponding to the parse modifier to a WFL node. Return a WFL
15488         node when an identifier is parsed.
15489         (java_lex_error): Now uses ctxp->elc to store current position in
15490         source.
15491         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15492         * lex.h (build_wfl_node): New function definitions.
15493         (struct java_line): ref_count and next fields are gone. New field
15494         char_col.
15495         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15496         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15497         (JAVA_COLUMN_DELTA): New macro.
15498         (java_lc): New typedef on new struct _java_lc.
15499         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15500         (parse_error_context, parse_warning_context): Changed prototypes.
15501         (java_get_line_col): Added as an available global function.
15502         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15503         (IC_DECL): Replaced by macro IC_TYPE
15504         (DEPEND_WFL): New macro.
15505         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15506         wrong modifier.
15507         (exit_java_complete_class): Removed a commented out statement.
15508         (struct parser_ctxt): Added comments on fields. modifier_ctx is
15509         now an array of tree nodes. Deleted fields line_list and
15510         e_line. New field elc, to replace e_line.
15511         * parse.y (array_type:): Build WFL node.
15512         (qualified_name:): Build a single WFL node out of two. Retain
15513         the location information of the first node in the resulting node.
15514         (package_declaration:): Use package name as a WFL node
15515         (single_type_import_declaration:): Use imported name as a WFL node.
15516         (type_import_on_demand_declaration:): Use root of the imported
15517         packages as a WFL node.
15518         (field_declaration:): Removed unused local variable cl.
15519         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15520         (yyerror): New static elc. Removed static error_line, error_pos.
15521         New local code_from_source. Save ctxp->elc into elc at the first
15522         pass. Call java_get_line_col to get a string of the line where
15523         the error occurred.
15524         (debug_line): Removed static function.
15525         (parse_error_context, parse_warning_context): Parameter cl is now
15526         a WFL node. Use its value to initialize ctxp->elc.
15527         (redefinition_error): Parameter cl is now a WFL node.
15528         (parse_add_interface): New parameter wfl. No longer call
15529         lookup_cl, use wfl instead.
15530         (check_class_interface_creation): Parameter cl is now a WFL node.
15531         (maybe_create_class_interface_decl): Likewise.
15532         (add_superinterfaces): New function.
15533         (create_interface): Removed local cl, node, super_decl,
15534         super_decl_type.  Function now uses id as a WFL node. Better
15535         warning/error report on obsolete or forbidden mix of
15536         modifiers. Now calls add_superinterfaces to register interfaces.
15537         (create_class): Removed local cl, node. Local variable id is used
15538         as a WFL node. Better error report on forbidden modifier
15539         mix. Uses add_superinterfaces to register interfaces.
15540         (find_field): Argument cl is now a WFL node. Now store the WFL
15541         node of a fields that needs to be checked for their
15542         initialization.
15543         (method_header): Local variable node non longer used. Local
15544         variable id replaces cl.
15545         (check_modifiers_consistency): Local variable cl is now a WFL
15546         node.
15547         (method_declarator): Local variable cl replaced by parameter id.
15548         (parser_qualified_name): Now uses parameter name as a WFL node.
15549         (parser_check_super_interface): New parameter wfl, for achieve
15550         greater accuracy during error reports.
15551         (parser_chain_incomplete_item): New parameter named location. Used,
15552         along the decl, to construct the incomplete item node.
15553         (java_complete_class): resolve_class now uses WFL node extracted
15554         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15555         where appropriate.
15556         (complete_method_decl): Unresolved function's argument types are WFL.
15557         (resolve_class): Parameter cl is now a WFL node.
15558         (resolve_and_layout): Likewise.
15559         (do_resolve_class): Likewise. Try first to use cl and then do the
15560         lookup on the decl when calling check_pkg_class_access.
15561         (complete_class_report_errors): Use IC_TYPE in place of
15562         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15563         instead of doing a lookup over the decl.
15564         (java_check_final): Use WFL info from field tree list.
15565         (lookup_cl): Rewritten and returns a statically defined WFL node.
15566         (lookup_modifier_cl): Now uses information from WFL nodes.
15567         (process_imports): Likewise.
15568         (read_import_dir): name and cl arguments replaced by a single WFL
15569         node. Function modified accordingly.
15570         (find_in_imports_on_demand): Now uses WFL node.
15571         (check_pkg_class_access): cl argument is now a WFL node.
15572         (declare_local_variables): Fixed to use WFL nodes.
15573         (resolve_expression_name): Likewise.
15574         (build_method_invocation_stmt): name_combo argument renamed
15575         wfl. Function modified to use WFL nodes.
15576         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15577         (lookup_method_invoke): cl is now a WFL node. Added missing
15578         IDENTIFIER_POINTER to class type decl name.
15579
15580 1998-04-14  Dave Brolley  <brolley@cygnus.com>
15581
15582         * lang.c (init_parse): Now returns char* containing the filename.
15583
15584 1998-04-10  Per Bothner  <bothner@cygnus.com>
15585
15586         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
15587
15588         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
15589         * class.c (make_class_data):  If flag_assume_compiled, initial class
15590         state is CSTATE_PREPARED; make superclass and interfaces direct
15591         references, rather than constant pool indexes.
15592
15593 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15594
15595         * parser.y: Include flags.h. Removed debug variable pl.
15596         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15597         (block:): Likewise.
15598         (labeled_statement_nsi:): Generate debug info when reducing
15599         expression_statement:.
15600         (check_pkg_class_access): get_access_flags_from_decl invocation
15601         fixed for new CLASS_* flags location.
15602         (source_end_java_method): Save/restore parser context when
15603         entering/leaving this routine. Restore lineno to its right value
15604         before calling expand_end_bindings.
15605         (build_method_invocation_stmt): build_invoke called with the
15606         current line information.
15607         (build_invoke): New argument cl. Wrap the function call around a
15608         wfl node.
15609         (refine_accessible_methods_list): Changed comment, removed
15610         unnecessary code.
15611         * parse.h: Fixed typo in comments.
15612         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15613         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15614         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15615         parser_ccb_indent.
15616         * lex.c (java_lex): Record the last closing curly bracket of a
15617         function.
15618         * jcf-parse.c (jcf_parse_source): Now calls
15619         java_check_methods. Clarified comment, fixed typo.
15620
15621 1998-04-09  Dave Brolley  <brolley@cygnus.com>
15622
15623         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15624         (finish_parse): Expose for non USE_CPPLIB builds.
15625
15626 1998-04-08  Jeffrey A Law  (law@cygnus.com)
15627
15628         * lang.c (lang_print_xnode): New function.
15629
15630 1998-04-03  Per Bothner  <bothner@cygnus.com>
15631
15632         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
15633         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
15634         used to build a class's dispatch table.
15635         (make_class_data):  Generate dispatch table if flag_assume_compiled.
15636         Set dtable of class object to address of class_dtable_decl.
15637
15638         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
15639         be volatile and have side effects - generates better code.
15640
15641         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
15642         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
15643
15644         * expr.c (expand_invoke):  If class is final, method is
15645         effectively final, so can call it directly.
15646
15647         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
15648
15649         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
15650
15651 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15652
15653         * parse.y (build_method_invocation_stmt): Removed extra argument
15654         to build_invoke.
15655
15656 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15657
15658         * expr.c (dtable_indent): Now static global.
15659         (expand_invoke): Now call invoke_build_dtable and
15660         build_invokevirtual.
15661         (invoke_build_dtable, build_invokevirtual): New functions.
15662         * jcf-io.c (find_class): Defer issuing a warning by setting
15663         jcf->outofsynch to 1.
15664         * jcf-parse.c (jcf_out_of_synch): New function.
15665         (load_class): Test this_jcf.outofsynch flag and call
15666         jcf_out_of_synch accordingly.
15667         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
15668         comment indentation.
15669         * lex.c (java_get_unicode): Fixed code indentation.
15670         (java_lex): Create string literal. Fixed typo. Removed several
15671         premature obstack_free.
15672         * parse.h: New enums for name resolution and invocation mode.
15673         (struct qualification): New data structure.
15674         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
15675         (do_resolve_class, build_method_invocation_stmt,
15676         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
15677         debug_line, identical_subpath_p, invocation_mode,
15678         refine_accessible_methods_list, build_invoke,
15679         lookup_method_invoke): New functions declared.
15680         (build_invokevirtual, invoke_build_dtable, match_java_method,
15681         build_field_ref, jcf_out_of_synch): New references to external
15682         functions.
15683         (struct parse_ctxt): Removed artificial_constructor field.
15684         * parse.y: (array_type:): Type defined for this rule.
15685         (class_type:): Installed default rule for interface_type:.
15686         (array_type:): Now build Java array type.
15687         (qualified_name:): Now use obstack_grow0.
15688         (method_declaration:): Skip the artificial constructor added to
15689         the list, if any.
15690         (abstract_method_declaration:): Execute the code only during pass 1.
15691         (block:): Installed default rule in block_statements:.
15692         (block_statement:): Add the statement to the method during pass 2.
15693         (statement_expression): Installed default rule for
15694         method_invocation:.
15695         (argument_list:): Added code to build the argument list.
15696         (method_invocation:): Added call to create the method invocation
15697         node.
15698         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
15699         (debug_line): New function for debug.
15700         (complete_class_decl): No longer do something during pass 1.
15701         (method_header): Use BUILD_PTR_FROM_NAME.
15702         (parser_qualified_classname): Use obstack_grow0. Removed bogus
15703         obstack_free.
15704         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
15705         function's main comment.
15706         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
15707         classes.
15708         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
15709         (resolve_class): Now works with arrays.
15710         (do_resolve_class, resolve_and_layout): New functions.
15711         (java_check_regular_methods): Reverse method list before and after
15712         having processed it. No longer set ctxp->artificial_constructor.
15713         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
15714         accordingly. Fixed typo in issued error message. Now use
15715         obstack_grow0.
15716         (find_in_imports_on_demand): Now use obstack_grow0.
15717         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
15718         (source_end_java_method): Call expand_expr_stmt instead of
15719         expand_expr. Calls it before calling expand_function_end.
15720         (java_method_add_stmt): Do nothing if errors were found during
15721         parsing.
15722         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
15723         (build_method_invocation_stmt, build_invoke, invocation_mode,
15724         lookup_method_invoke, refine_accessible_methods_list,
15725         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
15726         New functions.
15727         * typeck.c (build_java_signature): Properly end method signature
15728         if return type skipped.
15729         (match_java_method): New function.
15730
15731 1998-03-16  Per Bothner  <bothner@cygnus.com>
15732
15733         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
15734
15735 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15736
15737         * expr.c (build_invoke_non_interface): New function.
15738         (methods_ident, ncode_ident): Now static globals.
15739         (expand_invoke): Use build_invoke_non_interface.
15740         * java-tree.h (struct lang_decl): New field function_decl_body.
15741         (DECL_FUNCTION_BODY): New macro.
15742         * jcf-parse.c (jcf_parse_source): Deeper check before setting
15743         CLASS_FROM_SOURCE_P.
15744         (parse_source_file): Fixed typos. Call java_layout_parsed_class
15745         before starting pass 2. Call to java_generate_parsed_class replaced
15746         by java_register_parsed_class.
15747         * lex.c: Fixed typo in header. Some line width related formating.
15748         * lex.h: Some line width related formating.
15749         * parse.h (source_end_java_method, resolve_expression_name,
15750         complete_class_decl, maybe_create_class_interface_decl,
15751         check_class_interface_creation): New static function declarations.
15752         (java_layout_parsed_class, java_method_add_stmt): New function
15753         declarations.
15754         (struct parser_ctxt): Field mark_class_generate removed. New
15755         fields class_list and artificial_constructor.
15756         * parse.y: Fixed typo in header.
15757         (class_declaration:): Call complete_class_decl when class body
15758         parsed.
15759         (method_declaration:): Call source_end_java_method in pass 2 when
15760         the method body is defined.
15761         (postfix_expression:): Do expression name resolution on sub-rule
15762         name during pass 2.
15763         (create_class, create_interface): Merged common pieces.
15764         (check_class_interface_creation, maybe_create_class_interface_decl):
15765         New functions.
15766         (complete_class_decl): New function.
15767         (register_fields): Fixed line width related typo.
15768         (method_header): Correctly skip first argument when fixing
15769         argument line. Changed the loop.
15770         (java_check_circular_reference): Now use ctxp->class_list.
15771         (java_complete_class): Removed start/stop marking.
15772         (java_check_regular_methods): Now takes a class decl as an
15773         argument.  Add default constructor if none were encountered.
15774         (java_check_methods): Now use ctxp->class_list. Changed call to
15775         java_check_regular_methods.
15776         (source_start_java_method): Set DECL_ARG_TYPE for each function
15777         arguments.
15778         (source_end_java_method, java_method_add_stmt): New functions.
15779         (java_generate_parsed_class): No longer exists.
15780         (java_layout_parsed_class, java_register_parsed_class): New functions.
15781         (resolve_expression_name): New function.
15782
15783 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15784
15785         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
15786         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
15787         until pass initializations are done. Call read_import_dir with
15788         pass set to 0.
15789         * parse.h: (lookup_modifier_cl): New function declared.
15790         (INTERFACE_FIELD_MODIFIERS): New macro.
15791         (OBSOLETE_MODIFIER_WARNING): New macro.
15792         * parse.y: (register_fields): Class type and current field name in
15793         local variables. Check modifier(s) if adding field(s) to an interface.
15794         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
15795         and report errors using the faulty modifier line context.
15796         (lookup_modifier_cl): New function.
15797         (read_import_dir): Detect and report default import processing
15798         failure.
15799
15800 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
15801
15802         Add a pair of -fassume-compiled/-fno-assume-compiled options.
15803         * class.c (is_compiled_class): Return 1 after making sure it
15804         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
15805         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
15806         * java-tree.h (flag_assume_compiled): Add decl.
15807         * lang.c (lang_f_options): Add the flag.
15808         (flag_assume_compiled): Add decl, default to 0.
15809
15810 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15811
15812         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
15813         (is_compiled_class): Likewise.
15814         (layout_class): Likewise.
15815         (layout_class): Detect and lay out classes defined in source code.
15816         (interface_of_p, add_interface_do, may_add_interface): New
15817         function.
15818         (add_interface): Now use add_interface_do.
15819         (add_method_1): New function.
15820         (add_method): Now use add_method_1.
15821         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
15822         (complete_start_java_method): New function.
15823         (start_java_mehod): Now call complete_start_java_method.
15824         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
15825         (expand_invoke): Likewise and fixed typo.
15826         *gjava.c: (print_super_field): Use new argument to find_class
15827         DO_CLASS_FILE.
15828         (main): Likewise.
15829         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
15830         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
15831         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
15832         IDENTIFIER_NODE.
15833         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
15834         (add_method_1, push_class): New prototypes.
15835         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
15836         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
15837         directory where the class was found.
15838         (find_class): New argument DO_CLASS_FILE. Function find_class
15839         modified accordingly.
15840         *jcf-parse.c: (fix_class_path): New function.
15841         (load_class): Use new VERBOSE argument. load_class now finds and
15842         loads/parses .class/.java files. Save read_state of current_jcf
15843         if necessary.
15844         (java_parser_abort_on_error): New macro.
15845         (jcf_parse_source, parse_source_file): New function.
15846         (jcf_parse): Fixed typo.
15847         (yyparse): Call parse_source_file () only.
15848         (process_zip_dir): Fixed typo, fix zdir->filename_length when
15849         writing the real class name back in the zip directory entry.
15850         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
15851         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
15852         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
15853         (find_class): Prototype fixed.
15854         *lex.c: Added 1998 time stamp.
15855         Removed all static global variables, moved into the parser
15856         context data structure.. Now include unistd.h if SEEK_SET not
15857         defined.
15858         (java_init_lex): Rewritten.
15859         (java_sneak_unicode): Modified current unicode access in current line.
15860         (java_unget_unicode): Likewise.
15861         (java_allocate_new_line): New allocation management.
15862         (java_read_char): Modified access and storage of unget_utf8_value.
15863         New way of processing current unicode.
15864         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
15865         (java_get_unicode): Now use the parser context.
15866         (java_lineterminator): Likewise.
15867         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
15868         of the reentrant parser implementation. Function now use the
15869         parser context data structure and java_lval. Fixed production of
15870         the float and double constant "out of range" error message. Fixed
15871         obstack use. Return integer value when hitting a modifier. Now
15872         return type for TRUE, FALSE and other predefined types. Return
15873         identifier as a TREE_LIST list containing the current line context
15874         as the TREE_VALUE sub-node.
15875         (java_unicode_2_utf8): Fixed typo in declaration.
15876         (java_lex_error): Now use the parser context data structure.
15877         *lex.h: Added 1998 time stamp.
15878         (struct java_line): New fields ref_count and next.
15879         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15880         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
15881         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
15882         *parse.h: Added 1998 time stamp.
15883         (java_parse_source_file): Renamed from parse_source_file.
15884         (YYERROR_NOW, YYNOT_TWICE): Fixed.
15885         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
15886         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
15887         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
15888         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
15889         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
15890         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
15891         (struct parser_ctxt): New data structure to keep the parser context.
15892         *parse.y: Added 1998 time stamp, got rid of static global variables.
15893         (java_error_count, ctxp): New global variables.
15894         (%union): New value field.
15895         (numeric_type, integral_type): Rules removed.
15896         (primitive_type): Rule defined to handle integral, float, double and
15897         boolean types.
15898         (qualified_name, package_declaration,
15899         single_type_import_declaration, type_import_on_demand_declaration,
15900         modifiers, class_declaration, super, interfaces,
15901         interface_type_list, class_body, field_declaration,
15902         field_declaration, variable_declarators, variable_declarator,
15903         variable_declarator_id, method_declaration, method_header,
15904         formal_parameter_list, formal_parameter, method_body, block,
15905         static, interface_declaration, extends_interfaces,
15906         abstract_method_declaration, local_variable_declarators): Rules now
15907         define actions.
15908         (force_error, do_warning): New global statics.
15909         (push_parser_context, parser_context_save_global,
15910         parser_context_restore_global, pop_parser_context): New functions.
15911         (yyerror): Now uses the global parser context. Fixed use of obstack.
15912         (parse_error, parse_error_context, parse_warning_context,
15913         java_accstring_lookup, redefinition_error, check_modifiers,
15914         parser_add_interface, create_interface, create_class, find_field,
15915         duplicate_declaration_error, register_fields, method_header,
15916         check_modifiers_consistency, check_abstract_method_header,
15917         method_declarator, parser_qualified_classname,
15918         parser_check_super_interface, parser_check_super,
15919         parser_chain_incomplete_item, java_check_circular_reference,
15920         layout_class_from_source, java_complete_class,
15921         complete_method_decl, resolve_class, complete_class_report_errors,
15922         java_check_final, check_method_redefinition,
15923         java_check_regular_methods, java_check_abstract_methods,
15924         java_check_methods, lookup_java_interface_method2,
15925         lookup_java_method2, lookup_cl, find_name_in_single_imports,
15926         process_imports, find_in_imports, read_import_entry,
15927         read_import_dir, find_in_imports_on_demand,
15928         check_pkg_class_access, not_builtin_p, declare_local_variables,
15929         source_start_java_method, java_generate_parsed_class): New
15930         functions.
15931         *typeck.c: (signature_include_return): New global variable.
15932         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
15933         to add the function returned type in the signature.
15934
15935 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
15936
15937         * jcf-io.c (open_in_zip): Use strncmp and LEN.
15938
15939 1998-01-29  Dave Brolley  <brolley@cygnus.com>
15940
15941         * Make-lang.in (java.info): Added.
15942         (java.install-info): Added
15943
15944 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
15945
15946         * Makefile.in (clean): Also remove java/parse.c.
15947
15948 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
15949
15950         Add a pair of -fbounds-check/-fno-bounds-check options.
15951         * lang.c (lang_decode_option): Add code to grok arguments.
15952         (flag_bounds_check): Add decl.
15953         (lang_f_options): New array w/ the option in it.
15954         * java-tree.h (flag_bounds_check): Add decl.
15955         * lang-options.h: New file.
15956         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
15957         of a static macro value.
15958         (JAVA_ARRAY_EXCEPTION): Delete macro.
15959
15960 1998-01-23  Per Bothner  <bothner@cygnus.com>
15961
15962         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
15963         * expr.c (build_anewarray):  Add missing promote_type.
15964
15965 1998-01-22  Per Bothner  <bothner@cygnus.com>
15966
15967         Add array types with known length to optimize bounds checking.
15968         * typeck.c (build_java_array_type):  Take length parameter.
15969         (java_array_type_length, build_prim_array_type):  New functions.
15970         * java-tree.h:  Update for new functions.
15971         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
15972         * class.c:  Use build_prim_array_type.
15973         * expr.c (can_widen_reference_to):  Handle known-length array types.
15974         (verify_jvm_instructions):  Keep track of integer push instructions
15975         followed by newarray/anewarray, so we can build known-length arrays.
15976         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
15977         (java_array_data_offset):  New function.
15978         (build_java_array_length_access):  New function.  Optimize if constant.
15979         (build_java_arrayaccess):  Constant fold bounds check.
15980         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
15981         (build_newarray, build_anewarray):  New functions.
15982         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
15983         * verify.c (merge_types):  Handle known-lengh array types.
15984
15985 1998-01-19  Per Bothner  <bothner@cygnus.com>
15986
15987         * expr.c (expand_byte_code):  Fix performace bug, which caused
15988         searching linenumber_table to be linear rather than constant.
15989
15990 1997-12-12  Per Bothner  <bothner@cygnus.com>
15991
15992         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
15993
15994         * decl.c, java-tree.h (soft_fmod_node):  New global.
15995         * decl.c (init_decl_processing):  Define __builtin_fmod.
15996         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
15997         using __builtin_fmod.
15998
15999 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16000
16001         * keyword.h: New file, output of keyword.gperf as processed by
16002         gperf.
16003         * lex.c (java_lex_init): Initialize java_error_flag.
16004         * parse.c (YYERROR_NOW): Uses java_error_flag.
16005         * parse.y: New static java_error_flag. Useless definition of
16006         buffer_error gone.
16007         * parse.y (java_error): Portable error recovery using
16008         java_error_flag (not yet completely tuned).
16009
16010 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
16011
16012         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16013
16014 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16015
16016         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16017         (parse.c, lex.c, keyword.h): New rules for Java source code
16018         front-end.
16019         * parse.c: Renamed into jcf-parse.c.
16020         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16021         * keyword.gperf: New file, Java keywords.
16022         * parse.y: New file, Java language grammar.
16023         * parse.h: New file, Java language grammar definitions.
16024         * lex.c: New file, Java language lexer.
16025         * lex.h: New file, Java language lexer definitions.
16026
16027 1997-12-03  Per Bothner  <bothner@cygnus.com>
16028
16029         * decl.c (clinit_identifier_node), java-tree.h:  New global.
16030         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
16031         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
16032         * expr.c (expand_java_field_op):  Check for invalid assignment
16033         to final field.
16034
16035         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
16036
16037 1997-10-27  Per Bothner  <bothner@cygnus.com>
16038
16039         * verify.c (verify_jvm_instructions):  When processing a handler,
16040         attempt to set the current_subr to the right value.
16041         (More complicated code combines Sep 17 and Oct 22 versions.)
16042
16043 1997-10-24  Per Bothner  <bothner@cygnus.com>
16044
16045         * class.c (push_class):  Figure out (guess) name of source file.
16046         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
16047         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
16048         (parse_class_file):  Change return type from int to void.
16049         Call debug_start_source_file/debug_end_source_file.
16050
16051         * expr.c (build_java_binop):  Fix masking 2nd operand.
16052         * decl.c (init_decl_processing):  Set sizetype first.
16053
16054 1997-10-22  Per Bothner  <bothner@cygnus.com>
16055
16056         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
16057         (Revert Sep 17 change.)
16058
16059 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16060
16061         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16062         .class extension in their name and fix thing so we don't process
16063         them parse_zip_file_entries().
16064         (parse_zip_file_entries): Cleaned unused local variables.
16065
16066 1997-10-20  Per Bothner  <bothner@cygnus.com>
16067
16068         * expr.c (can_widen_reference_to):  Allows equal array element types.
16069         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
16070         * jcf-dump.c (RET):  Get (and print) index.
16071
16072         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16073         Promote element type to POINTER_TYPE.
16074
16075 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16076
16077         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16078         find_in_current_zip, jcf_figure_file_type): Moved from
16079         jcf-reader.c to parse.c.
16080         * zextract.c: (read_zip_archive): takes file_comment_length possible
16081         field into account.
16082
16083 1997-10-20  Per Bothner  <bothner@cygnus.com>
16084
16085         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
16086
16087         * verify.c (merge_types):  Handle array types even better ...
16088
16089 1997-10-17  Per Bothner  <bothner@cygnus.com>
16090
16091         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
16092
16093         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
16094         * class.c (make_class_data):  Don't build fields_decl if no fields.
16095         When building fields_decl, skip if DECL_ARTIFICIAL.
16096
16097         * expr.c (java_stack_swap):  Update stack_type_map.
16098         * verify.c (merge_types):  Handle array types better.
16099
16100 1997-10-15  Per Bothner  <bothner@cygnus.com>
16101
16102         * class.c (add_field):  Don't promote short integral fields to
16103         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16104         * expr.c (push_value):  Promote and convert short integral values.
16105
16106         * decl.c, java-tree.h (integer_two_node):  New constant node.
16107         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
16108
16109 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16110
16111         * class.c (append_gpp_mangled_type): Use function argument
16112         unpromoted type to generate mangled name.
16113
16114 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16115
16116         * constants.c (build_constant_data_ref): Now uses current_class
16117         instead of main_class.
16118         (build_constants_constructor): Now uses current_class instead of
16119         main_class.
16120         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16121         of the global variable SeepZipFiles done here.
16122         * zextract.c (read_zip_archive): extra_field optional field taken
16123         into account while computing the position of the class file in the
16124         archive.
16125         * verify.c (verify_jvm_instructions): Use current_jcf to search
16126         the constant pool.
16127         * parse.c (load_class): First search for the class to load in the
16128         current zip file. Saves current_jcf (restored before returning
16129         from that function). Don't call JCF_FINISH in the class was found
16130         in the current ZIP file.
16131         (jcf_parse): If the class was found in the current ZIP file, save
16132         its tree_constant_pool (for later reuse).
16133         (parse_class_file): New function. Process each method defined in
16134         the current class and record the class as to be later registered.
16135         (yyparse): Rewritten. Figure the type of the current file and switch
16136         accordingly.
16137         * lang.c: New global variable current_jcf.
16138         (lang_init): Removed compiling_from_source test (done later, in
16139         yyparse). Removed call the jcf_parse ().
16140         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16141         (typedef struct JCF): New fields seen_in_zip (to mark a class found
16142         in the current ZIP file) and zip_offset (offset to the class data in
16143         the current zip file).
16144         * jcf-reader.c: zipfile.h included.
16145         localToFile: New ZipFileCache static global variable
16146         (parse_zip_file_entries): New function. Browse the current ZIP
16147         file directory and process each class found.
16148         (process_zip_dir): New function. Register each class found in the
16149         ZIP file directory. The class aren't parsed but a valid JCF is
16150         link to each of them.
16151         (find_in_current_zip): New function. Search for a class in the
16152         current ZIP file directory. If found, prepare the class so that it
16153         can be loaded.
16154         (jcf_figure_file_type): New function. Examine the file structure
16155         to figure a class file, a ZIP file. If none of these categories are
16156         matched, a source file is assumed.
16157         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16158         SeenZipFile: New global variable.
16159         (open_in_zip): Use zipmember's length to accelerate the search for
16160         a member. If zipmember was NULL and zip file successfully read,
16161         return 0.
16162         * java-tree.h: New global variable current_jcf declared.  Added
16163         declaration for current_constant_pool_tags, current_constant_pool_data,
16164         current_constant_pool_length, current_constant_pool_data_ref.
16165         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16166         store the JCF of classes seen in a zip file) and tree *constant_pool
16167         (to save a loaded class constant pool). current_class declared here.
16168         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16169         retrieve method_ref_constant.
16170         (PUSHC): java_push_constant_from_pool now uses current_jcf.
16171         (OBJECT): get_class_constant now uses current_jcf.
16172         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16173         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16174         (expand_invoke): Now uses current_class instead of main_class
16175         (build_class_init): Now uses current_class instead of main_class
16176         * class.c: New static global variable registered_class.
16177         (register_class): New function.
16178         (emit_register_class): Modified to use registered_class instead of
16179         main_class
16180         (is_compiled_class): Now take into account class seen in the archive.
16181
16182 1997-10-06  Per Bothner  <bothner@cygnus.com>
16183
16184         * except.h:  Renamed to: java-except.h.
16185         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
16186         * except.c:  Add semi-working (commented out) implementation.
16187
16188         * expr.c (expand_iinc):  Add needed flush_quick_stack.
16189         * parse.c (set_source_filename):  New function.
16190         (give_name_to_class):  Set input_filename from package.classname.java.
16191
16192         * jcf-io.c (find_class):  Don't look first in ".".
16193
16194 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16195
16196         * zextract.c (read_zip_archive): Now takes into account the
16197         extra_field field.
16198         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16199
16200 1997-09-20  Per Bothner  <bothner@cygnus.com>
16201
16202         * constants.c, java-tree.h (build_internal_class_name):  New function.
16203         (alloc_class_constant):  Re-implement using build_internal_class_name.
16204         * class.c (make_class_data):  Likewise.
16205         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
16206
16207 1997-09-17  Per Bothner  <bothner@cygnus.com>
16208
16209         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
16210         to NULL before pushing an exception handler target.
16211
16212         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
16213         (java_stack_swap, java_stack_dup):  Re-write to be safe from
16214         clobbering registers.
16215         (build_class_init):  New function.
16216
16217 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16218
16219         * typeck.c (build_java_array_type): Temporary use
16220         permanent_obstack to create the array 'length' field.
16221         * expr.c (lookup_label): Temporay use permanent_obstack to create
16222         label if not found.
16223         * class.c (push_super_field): Tempory use permanent_obstack.
16224
16225 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16226
16227         * typeck.c (type_for_mode): Now handles double_type_node and
16228         float_type_node.
16229         * verify.c (verify_jvm_instructions): The instruction following
16230         the wide bytecode is checked. OPCODE_ret added to the list of
16231         wide.
16232
16233 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16234
16235         * class.c (make_class): Temporary use permanent_obstack. Set the
16236         class CLASS_P field to 1.
16237         (push_class): Temporary use permanent_obstack.
16238         (set_super_info): Temporary use permanent_obstack.
16239         (add_method): Temporary use permanent_obstack, set
16240         METHOD_TRANSIENT().
16241         (add_field): Temporary use permanent_obstack. Sets
16242         FIELD_VOLATILE() and FIELD_TRANSIENT().
16243         (build_class_ref): Temporary use permanent_obstack if the class
16244         isn't compiled.
16245         (build_static_field_ref): Temporary use permanent_obstack when
16246         creating field's rtl.
16247         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16248         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16249         and fields. Function finalized, as far as flag handling.
16250         (push_class_static_dummy_field): Temporary use permanent_obstack.
16251         (emit_register_class): Force generation of class registration at
16252         -O3 or deeper.
16253         * decl.c (end_java_method): Call permanent_allocation() before
16254         returning.
16255         * expr.c (can_widen_reference_to): Added comment to interface
16256         handling, fixed typo.
16257         (lookup_field): Now uses CLASS_P() to correct FIXME
16258         (expand_invoke): Verification on public && !static &&
16259         !abstract moved into soft_lookupinterfacemethod (kaffe).
16260         Use Object class dtable if objectref is an array when expanding
16261         invokeinterface.
16262         (java_push_constant_from_pool): Temporary use permanent_obstack
16263         for CONSTANT_string
16264         * parse.c (get_ref_constant): Temporary use permanent_obstack to
16265         create constant references.
16266         (get_constant): Temporary use permanent_obstack to create constant.
16267         (load_class): Temporary use permanent_obstack to load class.
16268         (jcf_parse): Temporary use permanent_obstack to perform class
16269         layout.
16270         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16271         (build_java_signature): Temporary use permanent_obstack.
16272         * verify.c: (verify_jvm_instruction): removed unnecessary verification
16273         on ACC_SUPER flag.
16274         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16275         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16276         (CLASS_P): Defined
16277
16278 1997-09-11  Per Bothner  <bothner@cygnus.com>
16279
16280         * class.c (append_gpp_mangled_type):  Fix typo.
16281         (emit_register_class):  Use main_class to get class object, rather
16282         than looking for no-longer-existing static decl starting with _CL.
16283         * typeck.c (parse_signature_type):  Promote array element type
16284         if it is a RECORD_TYPE.
16285
16286 1997-09-10  Per Bothner  <bothner@cygnus.com>
16287
16288         * class.c (push_class_static_dummy_field):  New function.
16289         (mangle_static_field):  New. Do G++-style mangling of static fields.
16290         (layout_class):  Mandle static fields here, not in add_field.
16291         (build_class_ref):  The class object is now a dummy static field.
16292         * decl.c (find_local_variable):  Look for best, instead of first match.
16293         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
16294         (build_java_athrow):  Don't check here if exception is Throwable.
16295         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
16296         (TYPE_USED):  Removed.  No longer used ...
16297         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
16298         * verify.c (push_pending_label):  New function.
16299         (push_pending_block):  Renamed to check_pending_block.
16300         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
16301         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
16302         re-checking possible handlers) after a store (less wasted work).
16303         Check for null handler (finally) before calling add_handler.
16304         Various changes to (finally?) correctly handle try/finally.
16305
16306 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16307
16308         * class.c: Include stdio.h.
16309
16310 1997-09-04  Per Bothner  <bothner@cygnus.com>
16311
16312         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16313         to make sure class is initialized before static/special invoke.
16314
16315         * verify.c (verify_jvm_instructions):  On a store instruction,
16316         call find_local_variable to force pre-allocation of decl and rtx.
16317         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
16318
16319 1997-09-03  Per Bothner  <bothner@cygnus.com>
16320
16321         * class.c (build_class_ref):   Strip off "promoted_" if need be.
16322         (make_field_value): Call build_java_signature when needed.
16323         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
16324         * expr.c (build_java_athrow):  Don't push_value of exception.
16325         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16326         match specification of [fd]cmp[lg] for NaNs.
16327         (expand_byte_code):  Add support for exception handler ranges.
16328         * except.c:  Add skeleton for EH code-generation.
16329         * verify.c (merge_types):  Treat all promoted integral types as equal.
16330         * constants.c (build_constants_constructor):  To force creation of
16331         current_constant_pool_data_ref, call build_constant_data_ref.
16332
16333         * javaop.def (lload):  Fix typo.
16334         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
16335
16336 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
16337
16338         * parse.c: Don't include function.h.
16339
16340 1997-08-27  Per Bothner  <bothner@cygnus.com>
16341
16342         * except.[ch]:  New files.
16343         * Makefile.in (JAVA_OBJS):  Add except.o
16344         * expr.c:  Temporary warning about unimplemented exceptions.
16345         * verify.c:  Verify exception handlers.
16346
16347         * jcf-dump.c (disassemble_method):  Print exception table.
16348
16349 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16350
16351         * expr.c (verify_jvm_instructions): Started a thorough
16352         verification of invoke* bytecodes.
16353         (expand_byte_code): flush quick stack if PC is the target of a
16354         branch.  and undef RET (conflicting with config/i386/i386.h).
16355         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16356         used.
16357         (expand_invoke): Now handles invokeinterface and do more
16358         verification according to the bytecode.
16359         (lookup_field): Don't try to load the class if processing
16360         dtable_type.
16361         (can_widen_reference_to): Now handles interfaces.
16362         * decl.c (init_decl_processing): New global variable
16363         soft_lookupinterfacemethod_node, declared in java-tree.h.
16364         Call set_super_info on string_type_node.
16365         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16366         defined.
16367         * class.c (set_super_info): Fills the CLASS_* flags according to
16368         access_flags.
16369         (get_access_flags_from_decl): Handles all class flags.
16370
16371 1997-08-26  Per Bothner  <bothner@cygnus.com>
16372
16373         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
16374         * parse.c (yyparse):  Check for abstract method, and missing code.
16375         * expr.c (expand_byte_code):  Change interface.
16376         * lang.c (put_decl_node):  Print promoted types prettier.
16377         * verify.c (verify_jvm_instruction):  Change interface.
16378         Partial support for scanning exception table.
16379         For load instructions, handle promoted integral types.
16380
16381 1997-08-21  Per Bothner  <bothner@cygnus.com>
16382
16383         * verify.c:  New file, with contents moved from expr.c.
16384         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
16385         * typeck.c (is_array_type_p):  Moved here from expr.c.
16386         * java-tree.h:  Add some now-needed function declarations.
16387         * Makefile.in (JAVA_OBJS): Added verify.o.
16388
16389 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16390
16391         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16392         METHOD_ABSTRACT flag.
16393
16394         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16395         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16396         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16397
16398         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16399         variables.
16400         (start_java_method): Hook for SYNCHRONIZED methods.
16401
16402         * expr.c (build_java_jsr, build_java_ret): New functions
16403         (JSR,PRE): New macros
16404         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16405         (verify_jvm_instructions): tableswitch, lookupswitch,
16406         monitorenter, monitorexit, goto_w: verified.
16407         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16408         (build_java_monitor): New function.
16409         (MONITOR_OPERATION): Modified to call build_java_monitor()
16410         (verify_jvm_instructions): Started a thorough verification of
16411         invoke* bytecodes.
16412
16413 1997-08-19  Per Bothner  <bothner@cygnus.com>
16414
16415         Support verification of jsr/ret subroutines (used for try/finally).
16416         * decl.c (return_address_type_node):  New type node.
16417         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16418         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16419         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
16420         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16421         TYPE_USED):  New macros for special types in type_map.
16422
16423         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
16424         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
16425         BCODE_JUMP_TARGET.
16426         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
16427
16428         * expr.c (can_widen_reference_to):  New function.
16429         (pop_type):  Use it.
16430         (merge_type_state):  Support handling start of subroutine.
16431         (push_pending_block):  Return char* error message, instead of calling
16432         fatal on an error.  Also handle subroutines.
16433         (verify_jvm_instructions):  Handle errors from push_poending_block.
16434         Support jsr and ret instructions.
16435
16436 1997-08-19  Per Bothner  <bothner@cygnus.com>
16437
16438         * jcf-io.c (find_classfile):  Fix thinko.
16439         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
16440
16441 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
16442
16443         * Makefile.in (BISON): Remove.
16444
16445 1997-08-07  Per Bothner  <bothner@cygnus.com>
16446
16447         * Makefile.in:  Convert to autoconf.
16448         * config-lang.in (outputs):  Added java/Makefile.
16449
16450         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16451         Rename cc1java to jc1.
16452
16453         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
16454         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
16455
16456         * class.c (class_depth):  Do load_class if needed.
16457
16458         Mostly better verification.
16459         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
16460         (init_decl_processing):  Change return type of soft_checkcast.
16461         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
16462         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16463         lang_print_error):  New functions.
16464         (lang_init):  Set global hook print_error_function to lang_print_error.
16465         * expr.c:  In the type_map ptr_type_node is only used for null now.
16466         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
16467         (merge_types):  Dererence pointer to record types before comparing.
16468         (decode_newarray_type, merge_types):  On error just return NULL.
16469         (build_java_binop):  Add preliminary implementation (with warning)
16470         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16471         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
16472         (expand_compare, expand_java_goto, expand_java_call):  Don't
16473         push_pending_block, since that only makes sense when verifying.
16474         (merge_type_state):  Different return codes.
16475         (push_pending_block):  A block may need to be verified more than once.
16476         (expand_byte_code):  Warn about unused code at code generation time.
16477         (verify_jvm_instruction):  Changed logic, since code may need to be
16478         re-verified if type-state has changed.  Also, better error handling.
16479         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16480         Improve newarray, anewarray, ?aload, athrow,
16481         * java-tree.h (LABEL_CHANGED):  New macro.
16482
16483 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16484
16485         * decl.c (soft_athrow_node): New global variable initialized.
16486         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16487         * typeck.c (convert): Added support for REAL_TYPE.
16488         (convert_to_char): New function.
16489         (convert): Handle CHAR_TYPE.
16490         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16491         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16492         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16493         promoted type.
16494         (verify_jvm_instructions): Added break a the end of bogus unop: label.
16495         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16496         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16497         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16498         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16499         to Use The Right Things.
16500         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16501         compatible with INT. BOOLEAN is made equivalent to BYTE.
16502         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16503         OPCODE_ifnonnull): Now supported.
16504         (build_java_athrow): New function.
16505
16506 1997-08-04  Per Bothner  <bothner@cygnus.com>
16507
16508         Rename method name <init> to match G++ (and fix mangling).
16509         * class.c (layout_class):  Replace method name of <init> by class name.
16510         (make_method_value):  Do inverse renaming of constructor from <init>.
16511         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
16512         * typeck.c (lookup_java_constructor):  New function.
16513         * expr.c (expand_invoke):  If method_name is <init>, call
16514         lookup_java_constructor to find constructor.
16515
16516         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
16517
16518 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16519
16520         * parse.c (get_class_constant): Modified to handle array "classes"
16521         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16522         wide type.
16523         (convert): Modified to handle real type.
16524         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16525         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16526         variables declared.
16527         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16528         soft_multianewarray, soft_newarray_node, soft_throw_node): New
16529         global variables initialized.
16530         (find_local_variable): Handles the case of a pointer
16531         (end_java_method): Restore the use of one more scope
16532         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16533         build_java_array_length_access, expand_java_arrayload,
16534         expand_java_arraystore, expand_java_array_length,
16535         expand_java_multianewarray, expand_java_anewarray,
16536         build_java_check_indexed_type, is_array_type_p,
16537         build_java_throw_out_of_bound_exception): New functions.
16538         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16539         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16540         OPCODE_<t>aload): Implemented code for verification.
16541         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16542         ARRAY_NEW_MULTI): Macro defined.
16543         (CONVERT): Modified to invoke convert().
16544         (case OPCODE_aload2): Fixed index typo from 2 to 1.
16545
16546 1997-07-31  Per Bothner  <bothner@cygnus.com>
16547
16548         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
16549         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
16550         (make_class_data):  Field name needs '/' as package prefix.
16551         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
16552
16553 1997-07-25  Per Bothner  <bothner@cygnus.com>
16554
16555         Implement debug information for local variables.
16556         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16557         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16558         DECL_LOCAL_SLOT_CHAIN):  New macros.
16559         (struct lang_decl_var):  New type.
16560         * parse.c (give_name_to_locals):  Move to decl.c.
16561         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
16562         (start_java_method):  Re-write parameter handling.
16563         (pending_local_decls):  New global variable.
16564         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
16565         (find_local_variable):  Accept pc so we can skips decls not in range.
16566         (struct binding_level):  Add end_pc field.
16567         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16568         (various):  Change so current pc gets passed to find_local_variable.
16569
16570         * decl.c (init_decl_processing):  Re-arrange fields in
16571         class_type_node and and method_type_node to match kaffe 0.9.1.
16572         * class.c (make_method_value, make_class_data):  Update
16573         initializations to match.
16574
16575 1997-07-16  Per Bothner  <bothner@cygnus.com>
16576
16577         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16578         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
16579         (push_super_field):  New function.
16580         (make_class_data):  Handle inheritance of class static initializer.
16581         (layout_class):  New name mangling.
16582         * constants.c (build_constant_data_ref):  Init type of data array
16583         to a one-element array.
16584         (build_constants_constructor):  Set DECL_SIZE from complete array type.
16585         * decl.c:  Rename class_type, object_type etc to class_type_node,
16586         object_type_node etc.  Make former inherit from latter.
16587         * expr.c (expand_invoke):  Add cast of function address.
16588         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
16589         * parse.c (yyparse):  Don't call layout_class here.
16590         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
16591
16592 1997-06-14  Per Bothner  <bothner@cygnus.com>
16593
16594         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
16595         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
16596         (alloc_class_constant):  New.
16597         * expr.c (expand_invoke):  Make sure method's class is initialized.
16598         * class.c (interits_from_p, emit_register_class):  New functions.
16599         * parse.c (yyparse):  Call emit_register_class.
16600
16601 1997-06-09  Per Bothner  <bothner@cygnus.com>
16602
16603         * constants.c:  New file, to handle constant pool.
16604         * Makefile.in (JAVA_OBJS):  Add constants.o.
16605         * decl.c (init_decl_processing):  Update, fix, finish various structs.
16606         (pushdecl_top_level):  New.
16607         * parse.c (layout_class):  Moved to class.c.
16608         * expr.c (java_push_constant_from_pool):  New function.
16609         * class.c (build_class_ref):  Make work fully
16610         (make_class_data):  Emit super-class, constant pool, interface vector.
16611
16612 1997-06-03  Per Bothner  <bothner@cygnus.com>
16613
16614         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
16615         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
16616         * class.c (class_depth):  New function.
16617         (lookup_named_class):  Replaced by new function lookup_class.
16618         * decl.c (object_type_node, string_type_node):  New.
16619         Remove various types that we no longer need.
16620         * expr.c (verify_jvm_instructions):  New separate verifier pass.
16621         (push_type, pop_type):  New functions for verifier.
16622         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
16623         (expand_byte_code):  Simplify, since we assume already verified.
16624         (expand_invoke):  Now mostly works.
16625         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16626         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
16627         * parse.c:  Wait to allocate class object until we know its name.
16628         (layout_class):  Calculate DECL_VINDEX for each virtual method.
16629         * typeck.c (get_array_type):  Rename to ...
16630         (build_java_array_type):  ... and provide working implementation.
16631         (build_java_signature):  New function - build Java signature of type.
16632         (set_java_signature):  New function - cache signature with type.
16633         (lookup_java_method):  New function.
16634
16635 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
16636
16637         * class.c (ident_subst):  Take extra SUFFIX parameter.
16638         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
16639         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
16640         (build_class_ref):  Actually implement.
16641         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
16642         * decl.c (builtin_function):  New.
16643         (init_decl_processing):  Update for current Kaffe.  Declare some
16644         builtin Kaffe functions.
16645         * expr.c (build_address_of):  New.
16646         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
16647         Renamed (from expand_java_new etc), and added working implementations.
16648         (build_field_ref):  Now also handle static fields.
16649         (expand_invoke):  Implement invokestatic, and start implement rest.
16650         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
16651         * javaop.def:  Rename invokevirt -> invokevirtual.
16652         * lang.c (use_handles):  Removed.
16653         * parse.c:  Add support for ConstantValue attribute.
16654         Handle nested loading of a class.  (JPOOL_UTF):  New.
16655
16656 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
16657
16658         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
16659
16660 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
16661
16662         * Make-lang.in (java.install-man):  New empty rule.
16663         * typeck.c (set_local_type):  New function.
16664         * expr.c (STORE_INTERNAL):  Call find_local_variable,
16665         not find_stack_slot.  Call set_local_type.
16666
16667 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
16668
16669         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
16670         and building RECORD_TYPE CONSTRUCTORs.
16671         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
16672
16673         * lang.c (use_handles):  Change the default to 0.
16674         * decl.c:  Define and build class_type, field_type, utf8const_type.
16675         * class.c (make_class_data, make_field_value,
16676         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
16677         hashUtf8String, strLengthUtf8, mangled_classname:
16678         Functions to build reflective data structures.
16679         * parse.c (yyparse):  Call make_class_data.
16680
16681         * jcf-io.c (open_class, find_classfile):  New functions.
16682         * jcf-dump.c:  Support reading classfile from explicitly-named
16683         class file (without CLASSPATH searching).
16684
16685 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16686
16687         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
16688         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
16689         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
16690         (get_constant):  Now trivial for CONSTANT_Utf8.
16691
16692         * jcf.h:  Make NEW_CPOOL the default.
16693         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
16694
16695 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
16696
16697         New directory.