OSDN Git Service

2003-11-12 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2003-11-12  Andrew Haley  <aph@redhat.com>
2
3         PR java/11533
4         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5         init_test_decls being inlined.
6
7         PR java/12890:
8         * parse.y (do_resolve_class): Check return value from
9         breakdown_qualified().
10
11 2003-11-11  Tom Tromey  <tromey@redhat.com>
12
13         PR java/12915:
14         * parse.y (merge_string_cste): Handle case where we have a
15         pointer that happens to be zero, not null_pointer_node.
16
17 2003-11-10  Tom Tromey  <tromey@redhat.com>
18
19         * jcf-parse.c (classify_zip_file): Correctly compare
20         filename_length against length of manifest file's name.
21
22 2003-11-08  Tom Tromey  <tromey@redhat.com>
23
24         PR java/12894:
25         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
26
27 2003-11-06  Andrew Haley  <aph@redhat.com>
28
29         * expr.c (java_stack_swap): Make sure destination stack slots are
30         of the correct type.
31
32 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
33
34         * Make-lang.in (dvi): Move targets to $(docobjdir).
35         (gcj.dvi): Simplify rule and adjust target.
36         (gcj.info): Simplify rule.
37         (gcj.pod): New intermediate rule.
38         (gcjh.pod): Likewise.
39         (jv-scan.pod): Likewise.
40         (jcf-dump.pod): Likewise.
41         (gij.pod): Likewise.
42         (jv-convert.pod): Likewise.
43         (rmic.pod): Likewise.
44         (rmiregistry.pod): Likewise.
45         (gcj.1): Delete.
46         (gcjh.1): Delete.
47         (jv-scan.1): Delete.
48         (jcf-dump.1): Delete.
49         (gij.1): Delete.
50         (jv-convert.1): Delete.
51         (rmic.1): Delete.
52         (rmiregistry.1): Delete.
53
54 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
55
56         Fixes PR java/12866.
57         * parse.y (resolve_qualified_expression_name): Move test
58         for outer field access methods from here...
59         (check_thrown_exceptions) ...to here.
60
61 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
62
63         * .cvsignore: Delete.
64
65 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
66
67         * verify.c (verify_jvm_instructions): Don't warn about legal
68         eh binding regions generated for example by jdk 1.4.1.
69
70 2003-10-24  David S. Miller  <davem@redhat.com>
71
72         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
73
74 2003-10-22  Andrew Haley  <aph@redhat.com>
75
76         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
77         (java_get_callee_fndecl): New.
78
79         * jcf-parse.c (java_parse_file): Call emit_catch_table().
80
81         * java-tree.h (ctable_decl): New.
82         (catch_classes):  New.
83         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
84
85         * decl.c (java_init_decl_processing): Add catch_class_type.
86         Add ctable_decl.
87         Add catch_classes field.
88
89         * class.c (build_indirect_class_ref): Break out from
90         build_class_ref.
91         (make_field_value): Check flag_indirect_dispatch.
92         (make_class_data): Ditto.
93         Tidy uses of PUSH_FIELD_VALUE.
94         Add field catch_classes.
95         (make_catch_class_record): New.
96
97         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
98
99 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
100
101         * jcf-write.c: Follow spelling conventions.
102         * parse.y: Likewise.
103
104 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
105
106         * ChangeLog: Fix typos.
107         * expr.c: Fix comment typos.
108         * jcf-write.c: Likewise.
109         * lang.c: Likewise.
110         * lex.c: Likewise.
111         * mangle.c: Likewise.
112         * parse-scan.y: Likewise.
113         * parse.y: Likewise.
114
115 2003-10-22  Tom Tromey  <tromey@redhat.com>
116
117         * expr.c (expand_byte_code): Only warn about dead bytecode when
118         extra_warnings is set.
119
120 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
121
122         Fix for PR java/12586.
123         * mangle.c (find_compression_record_match): Don't iterate through
124         package namespace elements unless they all match compression_table
125         entries.
126
127 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
128
129         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
130         (generate-manpages): Likewise.
131         (java.maintainer-clean): Likewise.
132         (gcj.info): Likewise.
133         (gcj.1): Likewise.
134         (gcjh.1): Likewise.
135         (jv-scan.1): Likewise.
136         (jcf-dump.1): Likewise.
137         (gij.1): Likewise.
138         (jv-convert.1): Likewise.
139         (rmic.1): Likewise.
140         (rmiregistry.1): Likewise.
141         (java.install-man): Likewise.
142         (parse-scan.o): Move and define complete compile line.
143         (parse.o): Likewise.
144         (jcf-tree-inline.o): Move.
145
146 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
147
148         * Make-lang.in (info): Update dependencies.
149         (java.install-info): Remove.
150         ($(srcdir)/java/gcj.info): Replace with ...
151         ($(docobjdir)/gcj.info): ... this.
152
153 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
154
155         * Make-lang.in: Replace uses of $(target_alias) with
156         $(target_noncanonical).
157
158 2003-10-09  Tom Tromey  <tromey@redhat.com>
159
160         * decl.c (java_init_decl_processing): Declare signers field.
161         * class.c (make_class_data): Set signers field.
162
163 2003-10-09  Jason Merrill  <jason@redhat.com>
164
165         * parse.y (patch_assignment): Use make_node to create a BLOCK.
166         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
167         POINTER_TYPE.
168
169 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
170
171         * Make-lang.in (java.info): Replace with ...
172         (info): ... this.
173         (java.dvi): Replace with ...
174         (dvi): ... this.
175         (java.generated-manpages): Replace with ...
176
177 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
178
179         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
180
181 2003-10-01  Andrew Haley  <aph@redhat.com>
182
183         * jcf-parse.c (java_parse_file): Write otable and atable.
184         * java-tree.h (atable_methods): New.
185         (atable_decl): New.
186         (atable_syms_decl): New.
187         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
188         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
189         (symbol_*type): Rename method_symbol* to symbol*type.   
190         (emit_offset_symbol_table): Delete.
191         (emit_symbol_table): New.
192         (get_symbol_table_index): New.
193         (atable_type): New.
194         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
195         (build_known_method_ref): Likewise.
196         (get_symbol_table_index): Rename from get_offset_table_index.
197         Parameterize to allow re-use by differing types of symbol table.
198         (build_invokevirtual): Pass table to get_offset_table_index.
199         * decl.c (java_init_decl_processing): Push types and decls for
200         atable and atable_syyms.
201         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
202         (make_class_data): Add new fields atable and atable_syms.
203         (emit_symbol_table): Rename from emit_offset_symbol_table.
204         Parameterize to allow re-use by different types of symbol table.
205         (build_symbol_entry): Renamed from build_method_symbols_entry.
206         
207 2003-09-30  Roger Sayle  <roger@eyesopen.com>
208
209         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
210         semantics for SAVE_EXPR, by caching the result in a temporary.
211
212 2003-09-28  Richard Henderson  <rth@redhat.com>
213
214         * check-init.c (check_init): Save and restore input_location
215         instead of file and line separately.
216         * decl.c (java_expand_body): Likewise.
217         * jcf-write.c (generate_bytecode_insns): Likewise.
218         * parse.y (safe_layout_class): Likewise.
219         * jcf-parse.c (read_class, parse_class_file): Likewise.
220         (java_parse_file): Use %H for warning locator.
221
222 2003-09-28  Roger Sayle  <roger@eyesopen.com>
223
224         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
225         with void-type branches instead of using a COMPOUND_EXPR.
226
227 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
228
229         * decl.c (java_optimize_inline, dump_function): Remove.
230         * java-tree.h (java_optimize_inline): Remove declaration.
231         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
232         * parse.y (source_end_java_method, java_expand_classes):
233         Likewise.  Remove dead code.
234
235 2003-09-27  Roger Sayle  <roger@eyesopen.com>
236
237         * lang.c (java_init_options): Set flag_evaluation_order.
238         * expr.c (force_evaluation_order): Don't attempt to force
239         evaluation order of binary operations using save_expr.
240         * parse.y (java_complete_lhs): No longer need to call
241         force_evaluation_order when constructing binary operators.
242
243 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
244             Bryce McKinlay  <bryce@mckinlay.net.nz>
245
246         PR java/1333:
247         * parse.y (not_accessible_field_error): New function.
248         (resolve_expression_name): Check field access permissions.
249         (resolve_qualified_expression_name): Use
250         not_accessible_field_error.
251         (resolve_qualified_expression_name): Likewise.
252
253 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
254
255         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
256
257 2003-09-23  Roger Sayle  <roger@eyesopen.com>
258
259         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
260         with equal operands without side-effects.
261
262 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
263
264         * decl.c (java_init_decl_processing): Don't emit otable decls
265         if flag_indirect_dispatch is not set.
266
267 2003-09-21  Richard Henderson  <rth@redhat.com>
268
269         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, 
270         resource.c: Revert.
271
272 2003-09-21  Richard Henderson  <rth@redhat.com>
273
274         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, 
275         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
276
277 2003-09-20  Richard Henderson  <rth@redhat.com>
278
279         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
280
281 2003-09-18  Roger Sayle  <roger@eyesopen.com>
282
283         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
284         * check-init.c (check_init): Likewise.
285
286 2003-09-18  Roger Sayle  <roger@eyesopen.com>
287
288         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
289
290 2003-09-16  Andrew Haley  <aph@redhat.com>
291
292         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
293
294 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
295
296         Fixes PR java/9577
297         * mangle.c (find_compression_record_match): Skip
298         over a "6JArray" (the array template mangled string)
299         IDENTIFIER_NODE.
300         (mangle_array_type): Correct minor typo.
301         (atms): Move definition to the beginning.
302
303 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
304
305         * class.c (add_miranda_methods): Ensure super-interfaces are laid 
306         out. Fix for PR java/12254.
307
308 2003-09-11  Richard Henderson  <rth@redhat.com>
309
310         * parse.y (source_end_java_method): Update for new
311         cgraph_finalize_function argument.
312
313 2003-09-09  Richard Henderson  <rth@redhat.com>
314
315         * parse.y (source_end_java_method): Update call to
316         cgraph_finalize_function.
317
318 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
319
320         * decl.c (java_expand_body): New function.
321         * expr.c (build_class_init): Set DECL_IGNORED_P.
322         * java-tree.h (start_complete_expand_method,
323         java_expand_body): Declare.
324         * jcf-parse.c (cgraph.h): Include.
325         (java_parse_file): Handle flag_unit_at_a_time.
326         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
327         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
328         (java_estimate_num_insns): Use walk_tree_without_duplicates.
329         (java_start_inlining): New function.
330         * parse.h (java_finish_classes): Declare.
331         * parse.y: Include cgraph.h.
332         (block): Don't special-case empty block production.
333         (craft_constructor): Set DECL_INLINE.
334         (source_end_java_method): Handle flag_unit_at_a_time.
335         Replace inline code with call to java_expand_body.
336         (start_complete_expand_method): Remove static modifier.
337         (java_expand_method_bodies): Patch function tree for
338         class initialization and/or synchronization as needed.
339         Don't begin RTL expansion yet.
340         (java_expand_classes): Check flag_unit_at_a_time before
341         calling finish_class.
342         (java_finish_classes): New function.
343         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
344         (patch_assignment): Set DECL_CONTEXT on temporary variable.
345         (emit_test_initialization): Set DECL_IGNORED_P.
346
347 2003-09-03  Roger Sayle  <roger@eyesopen.com>
348
349         * builtins.c (enum builtin_type): Delete unused enumeration.
350         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
351
352 2003-08-28  Tom Tromey  <tromey@redhat.com>
353
354         * gcj.texi (Extensions): Document gcjlib URLs.
355
356 2003-08-20  Tom Tromey  <tromey@redhat.com>
357
358         * gcj.texi (Extensions): Added xref.
359         (libgcj Runtime Properties): Document
360         gnu.gcj.runtime.VMClassLoader.library_control.
361
362 2003-08-20  Andrew Haley  <aph@redhat.com>
363
364         * except.c (prepare_eh_table_type): Use new encoding for exception
365         handlers when using -fno-assume-compiled.
366
367 2003-08-13  Tom Tromey  <tromey@redhat.com>
368
369         * gcj.texi (Invoking gij): Document -X and -?.
370
371 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
372
373         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
374         GCJH_OBJS, JCFDUMP_OBJS
375         * win32-host.c: Removed the unnecessary and broken dependency
376         on jcf.h
377
378 2003-08-11  Tom Tromey  <tromey@redhat.com>
379
380         * parse.y (java_check_regular_methods): Typo fixes.  Call
381         check_interface_throws_clauses.  Use
382         check_concrete_throws_clauses.
383         (check_interface_throws_clauses): New function.
384         (check_concrete_throws_clauses): New function.
385         (hack_is_accessible_p): New function.
386         (find_most_specific_methods_list): Added FIXME.
387         * typeck.c (lookup_do): Use `flags' argument to decide what to
388         do.  Reimplemented.
389         (lookup_argument_method_generic): New function.
390         (lookup_argument_method2): Removed.
391         * jcf.h (ACC_INVISIBLE): New define.
392         * jcf-write.c (generate_classfile): Skip invisible methods.
393         * class.c (add_miranda_methods): New function.
394         (layout_class_methods): Use it.
395         (get_access_flags_from_decl): Use ACC_INVISIBLE.
396         * java-tree.h (METHOD_INVISIBLE): New define.
397         (lang_decl_func) [invisible]: New field.
398         (lookup_argument_method_generic): Declare.
399         (SEARCH_INTERFACE): New define.
400         (SEARCH_SUPER): Likewise.
401         (SEARCH_ONLY_INTERFACE): Likewise.
402         (SEARCH_VISIBLE): Likewise.
403         (lookup_argument_method2): Removed declaration.
404
405 2003-08-05  Tom Tromey  <tromey@redhat.com>
406
407         Fix for PR java/11600:
408         * parse.y (java_complete_lhs): See whether we're calling a method
409         on an array.
410         (check_thrown_exceptions): Added `is_array_call' argument;
411         fixed `clone' checking; updated all callers.
412
413 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
414
415         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
416
417 2003-08-03  Tom Tromey  <tromey@redhat.com>
418
419         * java-tree.h (METHOD_TRANSIENT): Removed.
420         * decl.c (pushdecl): Removed some dead code.
421         * class.c (get_access_flags_from_decl): Can't have transient
422         method.
423         (add_method_1): Can't have a transient method.
424
425 2003-07-28  Andreas Jaeger  <aj@suse.de>
426
427         * jvspec.c: Convert to ISO C90 prototypes.
428
429 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
430
431         * decl.c (force_poplevels): Fix warning call.
432
433 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
434
435         * expr.c (expand_java_field_op): Don't use xxx_with_decl
436         (expand_java_field_op): Likewise.
437         * class.c (layout_class_method): Likewise
438         (emit_register_classes): Likewise.
439         * decl.c (pushdecl): Likewise.
440         (poplevel): Likewise.
441         (force_poplevels): Likewise.
442         (give_name_to_locals): Likewise.
443         * check-init.c (check_for_initialization): Likewise.
444
445 2003-07-24  Jason Merrill  <jason@redhat.com>
446
447         * java-tree.h: Move boolean_type_node et al to the back end.
448
449 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
450
451         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
452         casts.
453
454 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
455
456         * lang.opt: Don't show -MD_ and -MDD_.
457
458 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
459
460         * lang-options.h: Remove.
461         * lang.opt: Add help text.
462
463 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
464
465         * expr.c: Remove the last argument to expand_assignment().
466
467 2003-07-09  Jan Hubicka  <jh@suse.cz>
468
469         * java-tree.h (DECL_NUM_STMTS): Rename to...
470         (DECL_ESTIMATED_INSNS): ... this.
471         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
472         New static functions.
473         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
474         * parser.y (add_stmt_to_compound): Do not account statements.
475
476 2003-07-08  Mark Wielaard  <mark@klomp.org>
477
478         * gcj.texi: CNI now expands to Compiled Native Interface.
479
480 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
481
482         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
483
484 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
485
486         * expr.c (expand_byte_code): Adjist emit_line_note call.
487
488 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
489
490         * lang.c (java_handle_option): Don't handle filenames.
491
492 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
493
494         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
495         DIR_SEPARATOR.
496         Use FILENAME_CMP.
497         * jcf-write.c: Don't default-define DIR_SEPARATOR.
498         * jcf.h: Delete COMPARE_FILENAMES definition.
499
500 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
501
502         * lang.c (java_init_options): Update prototype.
503
504 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
505
506         * decl.c (poplevel): Adjust define_label call.
507
508 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
509
510         * gjavah.c (flag_jni): Make non-static.
511         * parse-scan.y (ctxp): Make non-static.
512
513         * class.c (build_method_symbols_entry)
514         * expr.c (get_offset_table_index)
515         * jcf-parse.c (jcf_parse):
516         Mark the definition static, matching the forward declaration.
517
518 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
519
520         * lang.c (java_handle_option): Don't check for missing arguments.
521
522 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
523
524         * class.c (push_class): Use a location_t to save place.
525         (emit_register_classes): Set input_location. Adjust
526         expand_function_end call.
527         * resource.c (write_resource_constructor): Likewise.
528         * decl.c (end_java_method): Adjust expand_function_end call.
529         * parse.y (source_end_java_method): Likewise.
530
531 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
532
533         * lang.c (java_handle_option): Likewise.
534
535 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
536
537         * lang.c (java_handle_option): Special-casing of optional
538         joined arguments no longer needed.
539         * lang.opt: Update switches that take optional argument.
540
541 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
542
543         * lang.opt: Declare Java.
544         * lang.c (java_init_options): Update.
545
546 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
547
548         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
549
550 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
551
552         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
553         * lang.c (java_handle_option): -MD and -MMD have an underscore.
554         * lang.opt: -MD and -MMD have an underscore.
555
556 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
557
558         * class.c (emit_register_classes): Adjust init_function_start
559         call.
560         * decl.c (complete_start_java_method): Likewise.
561         * resource.c (write_resource_constructor): Likewise.
562
563 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
564
565         * Make-lang.in: Update to use options.c and options.h.
566         * lang.c: Include options.h not j-options.h.
567         (java_handle_option): Abort on unrecognized option.
568         (java_init_options): Request Java switches.
569
570 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
571
572         * Make-lang.in: Handle mostlyclean.
573
574 2003-06-11  Tom Tromey  <tromey@redhat.com>
575
576         * lang.c (java_handle_option): Update dependency_tracking for
577         OPT_MF case.
578
579         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
580         empty argument.
581
582 2003-06-10  Andrew Haley  <aph@redhat.com>
583
584         * resource.c (write_resource_constructor): Use expand_expr to
585         generate the address of the label attached to a resource.
586         * Make-lang.in (java/resource.o): Add expr.h
587
588 2003-06-10  Andrew Haley  <aph@redhat.com>
589
590         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
591         (java_decl_ok_for_sibcall): New.
592
593 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
594
595         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
596         (java/j-options.c, java/j-options.h): New.
597         * java-tree.h (resource_name, compile_resource_file,
598         compile_resource_data): Constify.
599         * jcf-write.c (jcf_write_base_directory): Similarly.
600         * jcf.h (jcf_write_base_directory): Similarly.
601         * lang.c: Include j-options.h.
602         (cl_options_count, cl_options, string_option, java_decode_option,
603         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
604         process_option_with_no): Remove.
605         (resource_name): Constify.
606         (LANG_HOOKS_HANDLE_OPTION): Override.
607         (java_handle_option): New.
608         (java_init): Don't call jcf_path_init.
609         (java_init_options): Call jcf_path_init.
610         * lang.opt: New.
611         * resource.c (compile_resource_data, compile_resource_file): Constify.
612
613 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
614
615         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
616         (struct lang_decl_func): Add last_line field.
617         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
618         DECL_SOURCE_LINE_LAST): Remove.
619         * parse.y (missing_return_error, finish_method_declaration,
620         lookup_cl, start_artificial_method_body, source_end_java_method,
621         start_complete_expand_method): Adjust.
622
623 2003-06-08  Tom Tromey  <tromey@redhat.com>
624
625         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
626         fno-assume-compiled.
627
628 2003-06-08  Roger Sayle  <roger@eyesopen.com>
629
630         * builtins.c (define_builtin_type, builtin_types): Delete.
631         (define_builtin): Rewritten to take just the built-in code,
632         the function's name, type and fallback library function name.
633         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
634         (initialize_builtins): Overhaul to define the GCC builtins
635         used by gcj manually, providing the Java run-time's
636         implementations as the fallback library function.
637
638 2003-06-08  Anthony Green  <green@redhat.com>
639
640         * parse.y (patch_cast): Fix conversions from floating-point to
641         integral types.
642
643 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
644
645         * Make-lang.in: Update.
646         * lang.c: Include opts.h. Define cl_options_count and cl_options.
647
648 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
649
650         * lang.c (java_init_options): Update.
651
652 2003-06-05  Jan Hubicka  <jh@suse.cz>
653
654         * Make-lang.in:  Add support for stageprofile and stagefeedback
655
656 2003-05-31  Roger Sayle  <roger@eyesopen.com>
657
658         * lang.c (java_init_options): Prescribe wrap-around two's
659         complement arithmetic overflow by setting flag_wrapv.
660
661 2003-05-29  Roger Sayle  <roger@eyesopen.com>
662
663         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
664         (builtin_record): Add an additional builtin_code field to
665         record which GCC built-in corresponds to the Java function.
666         (java_builtins):  Add new entries for atan, atan2, exp, log,
667         pow and tan.
668         (max_builtin, min_builtin, abs_builtin): Perform constant
669         folding on the resulting tree.
670         (java_build_function_call_expr): Likewise, perform constant
671         folding on the resulting tree.
672         (initialize_builtins): The NULL creators are now allowed in
673         the java_builtins table, which is now terminated by an entry
674         with builtin_code == END_BUILTINS.
675         (check_for_builtin): Likewise.  If the matching creator is
676         NULL, construct the call using java_build_function_call_expr
677         directly with the decl for the corresponding builtin_code.
678
679 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
680
681         * win32-host.c: Normalize copyright boilerplate.
682
683 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
684
685         * parse.y (print_int_node): Use string concatentation on
686         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
687         function calls into one.
688
689 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
690
691         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
692         fatal_io_error with calls to fatal_error; add ": %m" to the end of
693         all the affected error messages.
694
695 2003-05-13  Richard Henderson  <rth@redhat.com>
696
697         * class.c (layout_class_method): Set DECL_EXTERNAL.
698         * decl.c (java_mark_decl_local, java_mark_class_local): New.
699         * java-tree.h (java_mark_class_local): Declare.
700         * jcf-parse.c (parse_class_file): Use it.
701         * parse.y (java_expand_classes): Likewise.
702
703 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
704
705         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
706         * lex.h: #include input.h.
707         * jv-scan.c (input_filename): Remove.
708
709 2003-05-02  Tom Tromey  <tromey@redhat.com>
710
711         PR java/10491:
712         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
713         (handle_inner_classes): New function.
714
715 2003-05-01  Tom Tromey  <tromey@redhat.com>
716
717         PR java/10459:
718         * parse.y (finish_for_loop): Do nothing if update expression is a
719         EXPR_WFL_NODE wrapping nothing.
720         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
721
722 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
723
724         * lex.h (input_lineno): Remove declaration.
725         * parse-scan.y: #include input.h.
726         (input_filename): Remove declaration.
727         (input_location): Add definition.
728         (input_line): Remove definition.
729
730 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
731
732         * lex.h (lineno): Rename to ...
733         (input_line): ... here
734         * parse-scan.y (lineno): Rename to ...
735         (input_line): ... here.
736         (reset_report): Rename lineno to input_line.
737         * check-init.c (check_init): Likewise.
738         * class.c (push_class): Likewise.
739         * decl.c (complete_start_java_method, end_java_method): Likewise.
740         * expr.c (expand_byte_code): Likewise.
741         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
742         * jcf-write.c (generate_bytecode_insns): Likewise.
743         * lex.c (java_init_lex, java_allocate_new_line,
744         do_java_lex): Likewise.
745         * parse.h (YYNOT_TWICE): Likewise.
746         * parse.y (empty_statement, expression_statement,
747         java_pop_parser_context, java_parser_context_save_global,
748         yyerror, register_fields, method_header, safe_layout_class,
749         find_in_imports_on_demand, create_artificial_method,
750         source_end_java_method, start_complete_expand_method,
751         build_thisn_assign, java_complete_lhs,
752         maybe_absorb_scoping_block): Likewise.
753
754 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
755
756         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
757         '/' when computing java source filename
758
759 2003-04-13  Tom Tromey  <tromey@redhat.com>
760
761         * gjavah.c (print_c_decl): Indentation fix.
762
763 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
764
765         * class.c (make_field_value, make_method_value, get_dispatch_table)
766         (make_class_data, emit_offset_symbol_table)
767         * constants.c (build_constants_constructor)
768         * java-tree.h (START_RECORD_CONSTRUCTOR)
769         * parse.y (maybe_build_array_element_wfl):
770         Use build_constructor.
771
772 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
773
774         PR java/10253:
775         * parse.y (string_convert_int_cst): Always use at least one digit
776         in string conversion. Remove ASCII dependence.
777         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
778
779 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
780
781         * Make-lang.in: added win32-host.c
782         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
783         resolves to open() on non-Win32 platforms and
784         Win32-specific jcf_open_exact_case() on Win32
785         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
786         when trying .java and .class files
787         * win32-host.c: added to repository. Defines
788         Win32-specific jcf_open_exact_case()
789
790 2003-04-10  Andrew Haley  <aph@redhat.com>
791
792         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
793         (maybe_free_localvar): Renamed from localvar_free.
794         Add new arg, really.
795         (generate_bytecode_insns): Set new variable, jsrs.
796         Only free local vars if no jsr insns have been emittted.
797         Call maybe_free_localvar, not localvar_free.
798
799 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
800
801         * gcj.texi: Remove @ at start of file.
802
803 2003-03-25  Tom Tromey  <tromey@redhat.com>
804
805         * parse.y (create_interface): Call CHECK_DEPRECATED.
806
807 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
808
809         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
810
811 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
812
813         * javaop.h (jfloat, jdouble): Make them structures mirroring
814         the bit fields of IEEE float and double respectively.
815         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
816         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
817         (union Word, union DWord): Delete.
818         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
819
820         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
821         D_NAN_MASK): Delete.
822         (jni_print_float, jni_print_double): New.  Generate
823         hexadecimal floating constants.
824         (print_field_info): Use jni_print_float/double.
825
826         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
827         finite floating point numbers for output; special case
828         non-finite floats.
829
830 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
831
832         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
833         Replace 0 and 1 with true and false in return statements.
834
835 2003-03-19  Tom Tromey  <tromey@redhat.com>
836
837         * lex.c (do_java_lex): Renamed from java_lex.
838         (java_lex): New function.
839         Include timevar.h.
840
841 2003-03-13  Tom Tromey  <tromey@redhat.com>
842
843         * parse.y (resolve_inner_class): Error if qualifier is a primitive
844         type.
845
846 2003-03-04  Andrew Haley  <aph@redhat.com>
847
848         * gjavah.c (is_first_data_member): New global variable.
849         (print_c_decl): If it's the first data member, align it as the
850         superclass.
851         (process_file): Set is_first_data_member.
852
853 2003-03-11  Tom Tromey  <tromey@redhat.com>
854
855         * parse.y (resolve_field_access): Initialize class if field is
856         found in another static field.
857         * expr.c (build_class_init): Don't optimize out initialization of
858         implemented interface.
859
860 2003-03-11  Andrew Haley  <aph@redhat.com>
861
862         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
863         warning.
864
865 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
866
867         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
868         and DIR_SEPARATOR_2 for a target.
869         Correct minor typos.
870
871         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
872         and DIR_SEPARATOR_2 for a target into account.
873
874 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
875
876         * lang.c (java_init): Update prototype, move code to java_post_options.
877         (java_post_options): Similarly.
878
879 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
880
881         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
882         compare file name components depending on the case-sensitivity
883         or otherwise of the host file system.
884
885         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
886         "strcmp" to compare file name components.
887         Use IS_DIR_SEPARATOR instead of comparing directly against
888         DIR_SEPARATOR.
889         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
890         comparing directly against DIR_SEPARATOR.
891
892 2003-03-04  Tom Tromey  <tromey@redhat.com>
893
894         * Make-lang.in (java.tags): New target.
895
896 2003-03-01  Roger Sayle  <roger@eyesopen.com>
897
898         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
899         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
900
901 2003-03-01  Tom Tromey  <tromey@redhat.com>
902
903         * parse.y (jdep_resolve_class): Only check deprecation if we found
904         a decl.
905
906 2003-02-28  Tom Tromey  <tromey@redhat.com>
907
908         PR java/9695:
909         * class.c (maybe_layout_super_class): Always pass a WFL to
910         do_resolve_class.
911         * parse.y (do_resolve_class): Updated comment to explain
912         parameters.
913
914 2003-02-26  Tom Tromey  <tromey@redhat.com>
915
916         * jcf-write.c (generate_classfile): Check whether class is
917         deprecated before writing attribute count.
918
919 2003-02-25  Roger Sayle  <roger@eyesopen.com>
920
921         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
922         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
923
924 2003-02-23  Tom Tromey  <tromey@redhat.com>
925
926         * lang-options.h: Added -Wdeprecated.
927         * gcj.texi (Warnings): Document -Wdeprecated.
928         * java-tree.h (flag_deprecated): Declare.
929         * lang.c (lang_W_options): Added deprecated.
930         (flag_deprecated): New global.
931         * chartables.h: Rebuilt.
932         * gen-table.pl (process_one): Look at whitespace.
933         (print_tables): Define LETTER_SPACE, LETTER_MASK.
934         * parse.h (CLEAR_DEPRECATED): New macro.
935         (CHECK_DEPRECATED_NO_RESET): New macro.
936         * jcf-parse.c (handle_deprecated): New function.
937         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
938         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
939         * parse.y (resolve_type_during_patch): Check deprecation.
940         (jdep_resolve_class): Likewise.
941         (process_imports): Likewise.
942         (resolve_expression_name): Likewise.
943         (check_deprecation): Strip arrays from decl.  Check
944         flag_deprecated.
945         (patch_method_invocation): Also check the particular constructor
946         for deprecation.
947         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
948         * jcf-write.c (append_deprecated_attribute): New function.
949         (generate_classfile): Generate deprecated attribute when
950         appropriate.
951         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
952         (java_lex) [case '*']: Simplify logic.
953         (java_start_char_p): Use LETTER_MASK.
954         (java_part_char_p): Likewise.
955         (java_space_char_p): New function.
956
957 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
958
959         Change base class access representation.
960         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
961         (add_interface_do): Likewise.
962
963 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
964
965         * decl.c (java_init_decl_processing): Change
966         soft_lookupjnimethod_node to reflect the change in
967         signature of _Jv_LookupJNIMethod in libjava/jni.cc
968         * expr.c (build_jni_stub): Calculate and pass the size
969         on the stack of the arguments to a JNI function. Use
970         new target macro MODIFY_JNI_METHOD_CALL to allow a
971         target to modify the call to a JNI method.
972
973 2003-02-08  Roger Sayle  <roger@eyesopen.com>
974
975         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
976         instead of basename to avoid compiler warnings on Tru64.
977
978 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
979
980         * gcj.texi: Update to GFDL 1.2.
981
982 2003-01-31  Andrew Haley  <aph@redhat.com>
983
984         * parse.y (java_expand_classes): Scan the whole class list looking
985         for access methods that haven't yet been expanded.
986
987 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
988
989         Fix for java/4269:
990
991         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
992         to fix bootstrap on sparc-unknown-netbsdelf1.5.
993         * jcf-parse.c: Likewise.
994
995 2003-01-31  Mark Wielaard  <mark@klomp.org>
996
997         * gjavah.c (throwable_p): Allocate 1 more byte for string.
998
999 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1000
1001         * class.c (make_class): Use BINFO_ELTS.
1002         (set_super_info): Likewse.
1003         (add_interface_do): Likewise.
1004
1005 2003-01-30  Tom Tromey  <tromey@redhat.com>
1006
1007         * jcf-parse.c (read_class): Update identifier's class value if it
1008         changed during parsing.
1009
1010 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
1011
1012         * Make-lang.in (po-generated): Find the targets in $(parsedir).
1013         Propagate change to all other rules as required.
1014         (java/parse-scan.o): Add explicit dependency on
1015         $(parsedir)/java/parse-scan.c .
1016
1017 2003-01-29  Tom Tromey  <tromey@redhat.com>
1018
1019         * parse.y (patch_assignment): Only transform the rhs of an
1020         assignment when compiling to native.
1021
1022 2003-01-28  Tom Tromey  <tromey@redhat.com>
1023
1024         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
1025
1026 2003-01-28  Tom Tromey  <tromey@redhat.com>
1027
1028         * lex.c (java_lex): Don't include UEOF as part of token.
1029         (java_read_unicode): Error if \u sequence prematurely terminated.
1030
1031 2003-01-27  Tom Tromey  <tromey@redhat.com>
1032
1033         * parse.y (java_check_regular_methods): Check for construct after
1034         checking types in throws clause.
1035
1036 2003-01-24  Tom Tromey  <tromey@redhat.com>
1037
1038         * class.c (build_static_field_ref): Only a String or numeric field
1039         can fold to a constant.
1040
1041 2003-01-23  Tom Tromey  <tromey@redhat.com>
1042
1043         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
1044         file name in resource buffer.
1045
1046 2003-01-23  Tom Tromey  <tromey@redhat.com>
1047
1048         * expr.c (build_known_method_ref): Use method's context to find
1049         method table index.
1050
1051 2003-01-23  Tom Tromey  <tromey@redhat.com>
1052
1053         * constants.c (set_constant_entry): Allocated cleared memory.
1054
1055 2003-01-22  Tom Tromey  <tromey@redhat.com>
1056
1057         * java-tree.h: Don't use PARAMS.
1058         * resource.c: Add prototypes for all functions.
1059         (write_resource_constructor): Use `const char *' to avoid
1060         warning.
1061
1062 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
1063
1064         * jcf-parse.c (process_zip_dir): Remove unused variable.
1065
1066 2003-01-22  Tom Tromey  <tromey@redhat.com>
1067
1068         * expr.c (build_invokeinterface): Abort if method's context is not
1069         an interface.
1070
1071 2003-01-22  Tom Tromey  <tromey@redhat.com>
1072
1073         * gcj.texi (Input and output files): Mention non-class entries.
1074         * decl.c (java_init_decl_processing): Call
1075         init_resource_processing.
1076         * java-tree.h (compile_resource_data, write_resource_constructor,
1077         compile_resource_file, init_resource_processing): Declare.
1078         * config-lang.in (gtfiles): Added resource.c.
1079         * Make-lang.in (gt-java-resource.h): New target.
1080         (JAVA_OBJS): Added resource.o.
1081         (java/resource.o): New target.
1082         * resource.c: New file.
1083         * class.c (compile_resource_file): Moved to resource.c.
1084         (registerResource_libfunc): Likewise.
1085         (utf8_decl_list): Mark with GTY; now static.
1086         * jcf-parse.c (classify_zip_file): New function.
1087         (parse_zip_file_entries): Use it; compile .properties files.
1088         (process_zip_dir): Use classify_zip_file and compute_class_name.
1089         Don't write class name into zip directory.
1090         (java_parse_file): Call write_resource_constructor.
1091         (compute_class_name): New function.
1092         * jcf-io.c (read_zip_member): Reindented.
1093
1094 2003-01-21  Tom Tromey  <tromey@redhat.com>
1095
1096         * class.c (supers_all_compiled): New function.
1097         (make_class_data): Use it.
1098
1099 2003-01-21  Tom Tromey  <tromey@redhat.com>
1100
1101         * parse.y (method_header): Native method can't be strictfp.
1102         No method can be transient or volatile.
1103
1104 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1105
1106         Make-lang.in (jvspec.o-warn): Add -Wno-error.
1107
1108 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1109
1110         * check-init.c: Fix comment typos.
1111         * class.c: Likewise.
1112         * constants.c: Likewise.
1113         * decl.c: Likewise.
1114         * except.c: Likewise.
1115         * expr.c: Likewise.
1116         * java-except.h: Likewise.
1117         * java-tree.h: Likewise.
1118         * javaop.h: Likewise.
1119         * jcf-dump.c: Likewise.
1120         * jcf-io.c: Likewise.
1121         * jcf-parse.c: Likewise.
1122         * jcf-write.c: Likewise.
1123         * lang.c: Likewise.
1124         * mangle.c: Likewise.
1125         * typeck.c: Likewise.
1126         * verify.c: Likewise.
1127
1128 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1129
1130         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
1131         * jcf-write.c: Include "tm_p.h".
1132
1133 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1134
1135         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
1136
1137 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1138
1139         * builtins.c (java_build_function_call_expr): Renamed from
1140         build_function_call_expr.  All callers changed.
1141
1142         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
1143         * jcf-parse.c: Include tm_p.h.
1144
1145         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
1146         warning.
1147
1148 2003-01-14  Tom Tromey  <tromey@redhat.com>
1149
1150         * class.c (make_class_data): Check that super is compiled before
1151         building class reference to it.
1152
1153 2003-01-14  Andrew Haley  <aph@redhat.com>
1154
1155         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1156         varargs function -- correct.
1157
1158 2003-01-14  Andrew Haley  <aph@redhat.com>
1159
1160         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
1161
1162 2003-01-14  Andrew Haley  <aph@redhat.com>
1163
1164         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1165         varargs function -- correct.
1166
1167         * parse.y (patch_assignment): Copy the rhs of an assignment into a
1168         temporary if the RHS is a reference.
1169
1170 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1171
1172         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
1173         * keyword.h: Regenerated.
1174
1175         * All Files: Convert to ISO C style function definitions.
1176
1177 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1178
1179         * parse.y (check_pkg_class_access): ANSIfy definition.
1180
1181 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1182
1183         * decl.c, parse-scan.y, parse.y: Don't cast return value of
1184         xmalloc et al.
1185
1186         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
1187
1188 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1189
1190         Merge from pch-branch:
1191
1192         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
1193
1194         * Make-lang.in (java/gjavah.o): Update dependencies.
1195         * gjavah.c: Include ggc.h.
1196
1197         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
1198
1199         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
1200         (JCFDUMP_OBJS): Add ggc-none.o.
1201         (java/jcf-dump.o): Depend on GGC_H.
1202         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
1203         CPool substructures.
1204         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
1205         * jcf-dump.c: Include ggc.h.
1206
1207         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
1208
1209         * jcf.h (union cpool_entry): New.
1210         (struct CPool): Use gengtype to mark.  Change field 'data' to be
1211         an array of unions.
1212         (struct JCF): Use gengtype to mark.
1213         (CPOOL_UINT): Update for new cpool_entry type.
1214         (CPOOL_USHORT1): Likewise.
1215         (CPOOL_USHORT2): Likewise.
1216         (CPOOL_FINISH): Use GC to free cpool subfields.
1217         * parse.h (struct parser_ctxt): Mark field current_jcf.
1218         * lex.c (java_init_lex): Use GC to allocate struct JCF.
1219         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
1220         (main_jcf): Use gengtype to mark.
1221         (ggc_mark_jcf): Delete.
1222         (get_constant): Update for new cpool_entry type.
1223         (give_name_to_class): Likewise.
1224         (get_class_constant): Likewise.
1225         (init_outgoing_cpool): Use GGC to allocate struct CPool.
1226         (java_parse_file): Use GGC to allocate struct JCF.
1227         (init_jcf_parse): Don't call ggc_add_root.
1228         * jcf-reader.c (jcf_parse_constant_pool): Update for new
1229         cpool_entry type.
1230         * java-tree.h (current_jcf): Use gengtype to mark.
1231         (CPOOL_UTF): Update for new cpool_entry type.
1232         (outgoing_cpool): Use gengtype to mark.
1233         (struct lang_type): GC struct JCF and struct CPool.
1234         * config-lang.in (gtfiles): Add jcf.h.
1235         * constants.c (find_tree_constant): New.
1236         (set_constant_entry): Allocate cpool subfields using GGC.  Update
1237         for new cpool_entry type.
1238         (find_constant1): Update for new cpool_entry type.
1239         (find_constant2): Likewise.
1240         (find_utf8_constant): Use find_tree_constant.
1241         (find_class_or_string_constant): Remove unnecessary cast to jword.
1242         Update for new cpool_entry type.
1243         (count_constant_pool_bytes): Update for new cpool_entry type.
1244         (write_constant_pool): Likewise.
1245         (alloc_name_constant): Use find_tree_constant.
1246         (build_constants_constructor): Update for new cpool_entry type.
1247
1248         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
1249
1250         * parse.y (mark_parser_ctxt): Delete.
1251         (goal): Don't use ggc_add_root.
1252         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
1253         (java_pop_parser_context): Let GC free parser_ctxt.
1254         (java_parser_context_resume): Likewise.
1255         * parse.h (struct parser_ctxt): Use gengtype to mark.
1256         (ctxp): Likewise.
1257         (ctxp_for_generation): Likewise.
1258         * lex.h (struct java_lc_s): Mark for gengtype.
1259         (java_lexer): Rearrange for gengtype.
1260         * config-lang.in (gtfiles): Add lex.h, parse.h.
1261
1262 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1263
1264         * All Files: Remove PARAMS macro.
1265
1266         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
1267         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
1268         `__STDC__' macros.
1269
1270         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
1271         VA_CLOSE.
1272
1273 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1274
1275         * Make-lang.in (java.install-common, java.uninstall,
1276         java.install-info, java.install-man): Prepend $(DESTDIR)
1277         to destination paths in all (un)installation commands.
1278         (java.install-common): Rewrite $(LN) command to support
1279         DESTDIR with "ln" as well as with "ln -s".
1280
1281 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1282
1283         * java-tree.h: Protect against multiple inclusion.
1284
1285 2003-01-07  Tom Tromey  <tromey@redhat.com>
1286
1287         * class.c (add_assume_compiled): Don't adjust parent if we're
1288         already at the root of tree.
1289
1290 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1291
1292         * lang.c (dump_compound_expr): Prototype.
1293
1294 2003-01-03  Tom Tromey  <tromey@redhat.com>
1295
1296         Fix for PR java/8712:
1297         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
1298         when simply checking against `null'.
1299
1300 2003-01-03  Tom Tromey  <tromey@redhat.com>
1301
1302         * gcj.texi (Standard Properties): Document http.proxyHost and
1303         http.proxyPort.
1304
1305         * gcj.texi (GNU Classpath Properties): Document new properties.
1306
1307 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1308
1309         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
1310         java/lang-options.h, java/mangle.c, java/mangle_name.c,
1311         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
1312
1313 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1314
1315         * Make-lang.in, boehm.c, buffer.c,
1316           buffer.h, builtins.c, class.c,
1317           config-lang.in, constants.c,
1318           convert.h, decl.c, except.c,
1319           expr.c, java-except.h,
1320           java-tree.h, javaop.def,
1321           jcf-parse.c, jcf-write.c,
1322           jv-scan.c, jvgenmain.c,
1323           jvspec.c, keyword.gperf,
1324           keyword.h, lang-options.h,
1325           lang-specs.h, lang.c, lex.c,
1326           lex.h, mangle.c, mangle_name.c,
1327           parse-scan.y, parse.h, parse.y,
1328           typeck.c, verify.c, xref.c,
1329           xref.h: Replace "GNU CC" with
1330           "GCC" in the copyright header.
1331
1332         * check-init.c, gjavah.c, javaop.h,
1333           jcf-depend.c, jcf-dump.c, jcf-io.c,
1334           jcf-path.c, jcf-reader.c, jcf.h,
1335           zextract.c, zipfile.h: These files are
1336           "part of GCC". Also say "GCC" not "GNU CC".
1337
1338 2002-12-30  DJ Delorie  <dj@redhat.com>
1339
1340         * Make-lang.in: Protect against texi2pod/pod2man failing.
1341
1342 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
1343
1344         * gcj.texi: Use @copying.
1345
1346 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1347
1348         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
1349         print_cxx_classname.
1350         (print_cxx_classname): Add add_scope parameter.
1351         (print_class_decls): Do not emit a semicolon after the extern
1352         "Java" block.
1353         (process_file): Adjust calls to print_cxx_classname.
1354
1355 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
1356
1357         * gcj.texi: Include Cover Texts in man page.
1358
1359 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
1360
1361         * class.c (build_static_field_ref): Check FIELD_FINAL.
1362
1363         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
1364         instead of current_constant_pool_data_ref.
1365         * java-tree.h (current_constant_pool_data_ref): Undefine.
1366         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
1367         * jcf-parse.c (init_outgoing_cpool): Don't initialize
1368         current_constant_pool_data_ref.
1369
1370         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
1371         not build_internal_class_name.
1372
1373         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
1374         Use it when class ref isn't certain to be compiled.
1375
1376 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
1377
1378         * gcj.texi: Include gcc-common.texi.
1379         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
1380         $(srcdir)/doc/include/gcc-common.texi.
1381
1382 2002-12-22  Anthony Green  <green@redhat.com>
1383
1384         * gcj.texi (Limitations): Add note about org.xml.sax and
1385         org.w3c.dom.
1386
1387 2002-12-20  Tom Tromey  <tromey@redhat.com>
1388
1389         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
1390         where minimum case value is Integer.MIN_VALUE.
1391         Fixes PR java/8955.
1392
1393 2002-12-18  Andrew Haley  <aph@redhat.com>
1394
1395         * parse.y (patch_invoke): Force evaluation order when `check' is
1396         set.  For PR libgcj/8945.
1397
1398 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
1399
1400         * gcj.texi: Change version number to 3.4.
1401
1402 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
1403         Andrew Haley <aph@redhat.com>
1404
1405         * parse.y (source_end_java_method): Remove custom encoding of line
1406         numbers for a function decl before passing it to the back end.
1407
1408 2002-12-03  Andrew Haley  <aph@redhat.com>
1409
1410         * class.c (make_class_data): New field, "chain".
1411         * decl.c (java_init_decl_processing): Likewise.
1412
1413 2002-12-02  Tom Tromey  <tromey@redhat.com>
1414
1415         For PR java/8740:
1416         * parse.y (do_resolve_class): Handle qualified name via
1417         recursion.
1418
1419 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1420
1421         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
1422         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
1423         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
1424         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
1425         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
1426         Include coretypes.h and tm.h.
1427         * Make-lang.in: Update dependencies.
1428
1429 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1430
1431         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
1432
1433 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
1434
1435         * jcf-reader.c: Don't expand JCF_readu4 inside the
1436         expansion of JCF_SKIP.
1437
1438 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
1439
1440         * jcf-reader.c: Don't expand JCF_readu4 inside the
1441         expansion of JCF_SKIP.
1442
1443 2002-11-22  Tom Tromey  <tromey@redhat.com>
1444
1445         * parse.y (patch_binop): Cast right hand side of shift expression
1446         to `int'.  Fixes PR java/8676.
1447
1448 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
1449             Andrew Haley <aph@redhat.com>
1450
1451         * gcc/java/jcf-write.c (write_classfile): Remove target
1452         class file, if it exists, before renaming the temporary
1453         class file to it.
1454
1455 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1456
1457         * jvspec.c (lang_specific_spec_functions): New.
1458
1459 2002-11-18  Tom Tromey  <tromey@redhat.com>
1460
1461         Fix for PR java/7912:
1462         * expr.c (can_widen_reference_to): Allow cast of array to
1463         Cloneable or Serializable.
1464         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
1465         (java_io_serializable_identifier_node): Likewise.
1466         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
1467         (valid_ref_assignconv_cast_p): Use new identifier nodes.
1468         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
1469         java_io_serializable.
1470         * decl.c (java_init_decl_processing): Initialize
1471         java_lang_cloneable_identifier_node and
1472         java_io_serializable_identifier_node.
1473         (java_lang_cloneable_identifier_node): New global.
1474         (java_io_serializable_identifier_node): Likewise.
1475
1476 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
1477
1478         * buffer.c: Remove unnecessary casts.
1479         * check-init.c: Likewise.
1480         * class.c: Likewise.
1481         * constants.c: Likewise.
1482         * decl.c: Likewise.
1483         * except.c: Likewise.
1484         * gjavah.c: Likewise.
1485         * jcf-io.c: Likewise.
1486         * jcf-parse.c: Likewise.
1487         * jcf-path.c: Likewise.
1488         * jvspec.c: Likewise.
1489         * lang.c: Likewise.
1490         * lex.c: Likewise.
1491         * verify.c: Likewise.
1492
1493 2002-11-06  Tom Tromey  <tromey@redhat.com>
1494
1495         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
1496         a JNI header.
1497
1498 2002-11-05  Tom Tromey  <tromey@redhat.com>
1499
1500         Fix for PR java/6388.
1501         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
1502         * java-tree.h (enum java_tree_index): New values
1503         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
1504         (decimal_int_max, decimal_long_max): New defines.
1505         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
1506         (error_if_numeric_overflow): Rewrote range checking.
1507         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
1508         decimal_long_max.
1509
1510 2002-11-02  Tom Tromey  <tromey@redhat.com>
1511
1512         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
1513
1514         * class.c (make_method_value): Put class name, not signature, into
1515         `throws' field.  For PR java/8415.
1516
1517 2002-10-24  Tom Tromey  <tromey@redhat.com>
1518
1519         * gcj.texi (Invoking gij): Document --showversion.
1520         (Standard Properties): java.library.path now set.
1521
1522 2002-10-23  Tom Tromey  <tromey@redhat.com>
1523
1524         * gjavah.c (decode_signature_piece): In JNI mode, print
1525         `jobjectArray' when array depth is nonzero.
1526         Fixes PR java/8296.
1527
1528 2002-10-15  Andrew Haley  <aph@redhat.com>
1529
1530         * parse.y (patch_invoke): Call force_evaluation_order on a static
1531         arg list.
1532         (resolve_qualified_expression_name): Call force_evaluation_order
1533         on a arg list that is part of a Qualified Expression Name.
1534
1535         * lang.c (dump_compound_expr): New.
1536         (java_dump_tree): New.
1537
1538 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
1539
1540         * gcj.texi: Added item describing the GCJ runtime property
1541         "gnu.gcj.progname".
1542
1543 2002-10-15  Richard Henderson  <rth@redhat.com>
1544
1545         * jcf-parse.c (get_constant): Fix type warning.
1546
1547 2002-10-15  Andrew Haley  <aph@redhat.com>
1548
1549         * java-tree.h (java_inlining_merge_static_initializers): Declare.
1550         (java_inlining_map_static_initializers): Declare.
1551
1552 2002-10-14  Andrew Haley  <aph@redhat.com>
1553
1554         * tree-inline.c (remap_block): All local class initialization
1555         flags go in the outermost scope.
1556         (expand_call_inline): Call java_inlining_map_static_initializers.
1557         (expand_call_inline): Call java_inlining_merge_static_initializers.
1558         * java/lang.c (merge_init_test_initialization): New.
1559         (java_inlining_merge_static_initializers): New.
1560         (inline_init_test_initialization): New.
1561         (java_inlining_map_static_initializers): New.
1562
1563 2002-10-11  Mark Wielaard  <mark@klomp.org>
1564
1565         * gcj.texi (Compatibility): Add Limitations and Extensions section.
1566
1567 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1568
1569         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
1570
1571 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1572
1573         * parse.y (merge_string_cste): Add parentheses around & within |.
1574
1575 2002-10-08  Tom Tromey  <tromey@redhat.com>
1576
1577         * parse.y (variable_declarator_id): Simplify error path for
1578         array declarator error.  For PR java/8003.
1579
1580 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
1581
1582         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
1583         bug_report_url.
1584
1585 2002-10-08  Andrew Haley  <aph@redhat.com>
1586
1587         * parse.y (attach_init_test_initialization_flags): Check for
1588         error_mark_node.
1589
1590 2002-10-07  Anthony Green  <green@redhat.com>
1591
1592         * parse.y (merge_string_cste): Fix bug in string concatenation.
1593
1594 2002-10-03  Michael Koch  <konqueror@gmx.de>
1595
1596         * gcj.texi (Standard properties):
1597         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
1598
1599 2002-10-02  Roger Sayle  <roger@eyesopen.com>
1600
1601         PR optimization/6627
1602         * lang.c (java_init): If storing the vbit in function
1603         pointers, ensure that force_align_functions_log is atleast
1604         one to aid compatability with g++ vtables.
1605
1606 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
1607
1608         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
1609         foul of type-based aliasing.
1610
1611 2002-09-30  Anthony Green  <green@redhat.com>
1612
1613         * gcj.texi (Invoking jv-scan): Fix texinfo.
1614
1615 2002-09-28  Anthony Green  <green@redhat.com>
1616
1617         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
1618         (Code Generation): Add -fno-assert documentation.
1619         * jv-scan.c (flag_assert): New global.
1620         (options): Add assert option.
1621         (help): Add --no-assert documentation.
1622         * parse-scan.y (flag_assert): New global.
1623         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
1624         (flag_assert): New global.
1625         * java-tree.h (flag_assert): New global.
1626         * lex.c (java_lex): Obey flag_assert.
1627         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
1628         calling cc1.
1629
1630 2002-09-26  Andrew Haley  <aph@redhat.com>
1631
1632         * expr.c (build_java_array_length_access): Check for null pointer.
1633         * expr.c (expand_java_arrayload): Likewise.
1634
1635 2002-09-21  Richard Henderson  <rth@redhat.com>
1636
1637         * jcf-parse.c (get_constant): Decode from IEEE no matter
1638         what the target format.
1639
1640 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
1641
1642         * ChangeLog: Follow spelling conventions.
1643         * class.c: Likewise.
1644         * decl.c: Likewise.
1645         * expr.c: Likewise.
1646         * gjavah.c: Likewise.
1647         * java-tree.h: Likewise.
1648         * jcf-dump.c: Likewise.
1649         * jcf-parse.c: Likewise.
1650         * jvspec.c: Likewise.
1651         * lang.c: Likewise.
1652         * mangle.c: Likewise.
1653         * parse.y: Likewise.
1654
1655 2002-09-17  Tom Tromey  <tromey@redhat.com>
1656
1657         * lex.c (java_read_unicode_collapsing_terminators): Handle case
1658         where \r appears at EOF.  Fixes PR java/7950.
1659
1660 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1661
1662         * jvspec.c (lang_specific_driver): Remove unused variable.
1663
1664 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1665
1666         * java-tree.h (union lang_tree_node): Add chain_next option.
1667
1668 2002-09-16  Richard Henderson  <rth@redhat.com>
1669
1670         * jcf-parse.c (get_constant): Runtime check for IEEE format;
1671         use new real.h interface.
1672         * jcf-write.c (find_constant_index): Use new real.h interface.
1673         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
1674
1675 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1676
1677         * lang.c: Follow spelling conventions.
1678
1679 2002-09-11  Per Bothner  <per@bothner.com>
1680
1681         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
1682         constant to the type of the field.
1683         (java_complete_tree):  Remove now-redundant code.
1684
1685         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
1686
1687 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
1688
1689         For PR java/5794:
1690         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
1691         return label if a ret instruction for the jsr has been reached.
1692
1693 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
1694
1695         * parse.y (DIR_SEPARATOR): Don't define.
1696         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
1697
1698 2002-08-28  Andrew Haley  <aph@redhat.com>
1699
1700         * verify.c (verify_jvm_instructions): Allow exception handler
1701         inside code that is being protected, but generate a warning.
1702         * except.c (link_handler): Initialize `expanded' in new eh_range.
1703         (binding_depth, is_class_level, current_pc): Declare extern.
1704
1705 2002-09-01  Mark Wielaard <mark@klomp.org>
1706
1707         * gcj.texi: Add chapter about system properties.
1708         Fixed some typos.
1709
1710 2002-08-26  Tom Tromey  <tromey@redhat.com>
1711
1712         * parse.y (try_builtin_assignconv): Allow narrowing primitive
1713         conversion if RHS_TYPE is byte, short, or char.
1714
1715 2002-08-22  Tom Tromey  <tromey@redhat.com>
1716
1717         * gcj.texi (Invoking gij): Document -cp and -classpath.
1718
1719 2002-08-21  Tom Tromey  <tromey@redhat.com>
1720
1721         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
1722         $(prefix)/share.  For PR libgcj/7633.
1723
1724         For PR java/6005 and PR java/7611:
1725         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
1726         (java_can_use_bit_fields_p): New function.
1727
1728 2002-08-16  Tom Tromey  <tromey@redhat.com>
1729
1730         * gcj.texi (Class Initialization): Mention class initialization of
1731         arrays.
1732
1733 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
1734
1735         * Make-lang.in (java-tree-inline.o): New.
1736         (JAVA_OBJS): Add java-tree-inline.o.
1737         * parse.y (source_end_java_method): Call java_optimize_inline.
1738         (java_expand_method_bodies): Save method's tree in
1739         DECL_SAVED_TREE.
1740         (add_stmt_to_compound): Keep track of the number of statments.
1741         * lang.c (java_init): Enable flag_inline_trees.
1742         (java_post_options): If flag_inline_functions is on, enable
1743         flag_inline_trees instread.
1744         (decl_constant_value): New.
1745         (java_tree_inlining_walk_subtrees): New.
1746         * java-tree.h (DECL_NUM_STMTS): New macro.
1747         (java_optimize_inline): Declare.
1748         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
1749         Handle a LABEL_EXPR.
1750         * decl.c (build_result_decl): If we already have a DECL_RESULT
1751         don't make another.
1752         (dump_function): New.
1753         (java_optimize_inline): New.
1754         (dump_function): New.
1755
1756 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
1757
1758         For PR java/7483:
1759         * parse.y (build_assertion): Invert return from
1760         desiredAssertionStatus.
1761
1762 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1763
1764         * jcf-write.c (get_access_flags): Return correct access flags for
1765         private and protected inner classes.
1766
1767 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1768
1769         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
1770
1771 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
1772
1773         * mangle_name.c: Don't include obstack.h twice.
1774         * xref.c: Don't include obstack.h.
1775
1776 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
1777
1778         * class.c: (permanent_obstack): Delete declaration.
1779         * constants.c: (permanent_obstack): Delete declaration.
1780         * except.c: (permanent_obstack): Delete declaration.
1781         * expr.c: (permanent_obstack): Delete declaration.
1782         * jcf-parse.c: (permanent_obstack): Delete declaration.
1783         (saveable_obstack): Delete declaration.
1784         * parse.h: (permanent_obstack): Delete declaration.
1785         * typeck.c: (permanent_obstack): Delete declaration.
1786
1787 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
1788
1789         * gcj.texi (version-gcc): Increase to 3.3.
1790
1791 2002-07-22  Tom Tromey  <tromey@redhat.com>
1792
1793         * lex.c (java_lex): Check for `e' or `E' after 0.
1794
1795 2002-07-21  Richard Henderson  <rth@redhat.com>
1796
1797         * lang.c (java_unsafe_for_reeval): New.
1798         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
1799
1800 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
1801
1802         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
1803         (jcf_path_init): Use GET_ENVIRONMENT.
1804
1805 2002-07-10  Roger Sayle  <roger@eyesopen.com>
1806             Zack Weinberg <zack@codesourcery.com>
1807
1808         * builtins.c (initialize_builtins): Remove defines that
1809         handled C/C++ specific junk hereby removed from builtins.def.
1810
1811 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
1812
1813         * lang.c (java_post_options): Update prototype.
1814
1815 2002-07-05  Roger Sayle  <roger@eyesopen.com>
1816
1817         * builtins.c (initialize_builtins): Ignore the additional
1818         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
1819         the builtins.def file.
1820
1821 2002-07-01  Tom Tromey  <tromey@redhat.com>
1822
1823         For PR libgcj/7073:
1824         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
1825         specially.
1826
1827 2002-07-01  Roger Sayle  <roger@eyesopen.com>
1828
1829         * java/decl.c (builtin_function): Accept additional parameter.
1830         (java_init_decl_processing): Pass an additional NULL_TREE
1831         argument to builtin_function.
1832
1833 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
1834
1835         * gcj.texi: Fixed gcj invocation example so that it compiles.
1836
1837 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1838
1839         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
1840         * parse.y (mark_parser_ctxt): Likewise.
1841         (check_modifiers, declare_local_variables): Avoid incorrect
1842         hardcoded constant 10.
1843
1844         * lex.c (java_read_char): Avoid "comparison is always true"
1845         warning.
1846
1847 2002-06-25  Andreas Schwab  <schwab@suse.de>
1848
1849         * expr.c (JSR): Avoid undefined operation on PC.
1850
1851 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1852
1853         * decl.c (clear_binding_level): Const-ify.
1854
1855 2002-06-13  Akim Demaille  <akim@epita.fr>
1856
1857         * parse.y (class_declaration, interface_declaration): Make sure
1858         all their rules have an action, in order to avoid meaningless `$$
1859         = $1' and their type clashes.
1860
1861 2002-06-11  Tom Tromey  <tromey@redhat.com>
1862
1863         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
1864         * parse-scan.y (statement_without_trailing_substatement): Added
1865         assert_statement.
1866         (assert_statement): New rule.
1867         * java-tree.h (struct lang_type) [assertions]: New field.
1868         (TYPE_USES_ASSERTIONS): New macro.
1869         (CLASS_USES_ASSERTIONS): Likewise.
1870         (FIELD_SYNTHETIC): New define.
1871         * lex.c (java_lval;): Added ASSERT_TK.
1872         * parse.y (ASSERT_TK): Added.
1873         (statement_without_trailing_substatement): Added assert_statement.
1874         (assert_statement): New rule.
1875         (build_assertion): New function.
1876         (maybe_generate_pre_expand_clinit): Create and initialize
1877         $assertionsDisabled.
1878         (lookup_package_type): Removed decl.
1879         * keyword.h: Rebuilt.
1880         * keyword.gperf (assert): New token.
1881
1882 2002-06-10  Akim Demaille  <akim@epita.fr>
1883
1884         * parse.y (interface_type_list, class_member_declaration)
1885         (unary_expression_not_plus_minus): Remove duplicate %type.
1886         Whitespace changes.
1887
1888 2002-06-09  Tom Tromey  <tromey@redhat.com>
1889
1890         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
1891
1892         * parse.y (method_header): Give error message in all cases.
1893         Fixes PR java/6865.
1894
1895 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1896
1897         Don't use RTL inlining. Fix for PR java/6820.
1898         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
1899         (flag_really_inline): New.
1900         (java_decode_option): Set flag_really_inline if -finline-functions
1901         is seen.
1902         (java_post_options): New function. Turn off inlining unless
1903         flag_really_inline is set.
1904
1905 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1906
1907         * gjavah.c (throwable_p): Accept argument as either a classname or
1908         signature fragment. Create null-terminated classname string for super
1909         when calling itself recursively.
1910         (decode_signature_piece): Skip first character from class name
1911         signature when calling throwable_p.
1912
1913 2002-06-08  H.J. Lu  (hjl@gnu.org)
1914
1915         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
1916
1917 2002-06-04  Tom Tromey  <tromey@redhat.com>
1918
1919         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
1920
1921 2002-06-04  Michael Koch  <konqueror@gmx.de>
1922
1923         * gcj.texi (Input Options): Fixed typo.
1924
1925 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
1926
1927         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
1928         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
1929         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
1930         and all now-pointless local variables.  Rename other local
1931         variables to reflect their not being handles.
1932
1933         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
1934         #if JCF_USE_STDIO blocks.
1935
1936         * parse.y: Add missing semicolon at end of rule.
1937
1938 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
1939
1940         * check-init.c (attach_initialized_static_class): Delete, unused.
1941         * parse.y: Use htab_t instead of struct hashtable, update
1942         all uses.
1943         * java-tree.h: Include hashtab.h instead of hash.h.
1944         (struct lang_decl_func): Use htab_t, set up for gengtype.
1945         (struct init_test_hash_entry): Delete.
1946         (struct treetreehash_entry): New.
1947         (java_treetreehash_find): New
1948         (java_treetreehash_new): New prototype.
1949         (java_treetreehash_create): New prototype.
1950         (java_mark_tree): Delete prototype.
1951         (java_hash_hash_tree_node): Delete prototype.
1952         (java_hash_compare_tree_node): Delete prototype.
1953         (attach_initialized_static_class): Delete prototype.
1954         * expr.c (build_class_init): Update to use java_treetreehash
1955         functions.
1956         (java_expand_expr): Update to use htab_t.
1957         (emit_init_test_initialization): Likewise.
1958         * decl.c (java_mark_tree): Delete.
1959         * class.c (init_test_hash_newfunc): Delete.
1960         (java_hash_hash_tree_node): Delete.
1961         (java_hash_compare_tree_node): Delete.
1962         (add_method_1): Update to use java_treetreehash functions.
1963         (JAVA_TREEHASHHASH_H): New macro.
1964         (java_treetreehash_hash): New function.
1965         (java_treetreehash_compare): New function.
1966         (java_treetreehash_find): New function.
1967         (java_treetreehash_new): New function.
1968         (java_treetreehash_create): New function.
1969         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
1970
1971         * Make-lang.in (java/parse.o): Depend on debug.h.
1972         * java-tree.h (struct lang_identifier): Use gengtype.
1973         (union lang_tree_node): New.
1974         (struct lang_decl_func): Use gengtype.
1975         (struct lang_decl_var): Likewise.
1976         (struct lang_decl): Likewise.
1977         * parse.y: Include debug.h.
1978         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
1979
1980         * lang.c (struct language_function): New dummy structure.
1981
1982         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
1983         descriminator for DECL_LANG_SPECIFIC.
1984         (struct lang_decl_func): Rename from struct lang_decl.
1985         (enum lang_decl_desc): New.
1986         (struct lang_decl): Make it a union.  Update all the accessor macros.
1987         (struct lang_type): Use gengtype.
1988         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
1989         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
1990         are now the same size.
1991         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
1992         use discriminator to mark DECL_LANG_SPECIFIC.
1993
1994         * Make-lang.in (gt-java-builtins.h): New rule.
1995         (java/builtins.o): Add dependency on gt-<filename>.h.
1996         * builtins.c: Use gengtype for roots.
1997         (union string_or_tree): Use gengtype.
1998         (struct builtin_record): Use gengtype.
1999         * config-lang.in (gtfiles): Add builtins.c.
2000
2001         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
2002         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
2003         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
2004         gt-java-parse.h, gtype-java.h): Add rules to generate.
2005         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
2006         (class.o): Add dependency on gt-*.h.
2007         (constants.o): Likewise.
2008         (decl.o): Likewise.
2009         (expr.o): Likewise.
2010         (jcf-parse.o): Likewise.
2011         (jcf-write.o): Likewise.
2012         (lang.o): Likewise.
2013         * config-lang.in (gtfiles): New.
2014         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2015         * constants.c: Replace uses of ggc_add_* with GTY markers.
2016         Include gt-*.h.
2017         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2018         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2019         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
2020         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
2021         Include gt-*.h.
2022         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
2023         Include gt-*.h.
2024         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2025         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
2026         gt-*.h.
2027         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
2028         Include gtype-java.h.
2029
2030 2002-06-02  Tom Tromey  <tromey@redhat.com>
2031
2032         Fix for PR java/5913:
2033         * parse.y (patch_binop): Call patch_string on op1.
2034
2035 2002-06-02  Tom Tromey  <tromey@redhat.com>
2036
2037         Fix for PR java/1343, PR java/6336:
2038         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
2039         formatting.  Changed return type.
2040         (anonymous_class_counter): Moved to top of file.
2041         (maybe_make_nested_class_name): Append number to class name for
2042         function-local classes.
2043
2044 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2045
2046         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
2047         * Make-lang.in: Update dependency lists.
2048
2049 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
2050
2051         * gjavah.c (throwable_p): Do not free the name of the class after
2052         passing it to find_class.
2053         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
2054         * jcf-io.c (dirent.h): Include it.
2055         (fnmatch.h): Likewise.
2056         (compare_path): New function.
2057         (java_or_class_file): Likewise.
2058         (memoized_dirlist_entry): New type.
2059         (memoized_dirlist_lookup_eq): New function.
2060         (memoized_dirlists): New variable.
2061         (caching_stat): New function.
2062         (memoized_class_lookup_eq): New function.
2063         (memoized_class_lookups): Likewise.
2064         (find_class): Use memoized_class_lookups and caching_stat.
2065         * jcf.h (JCF_USE_SCANDIR): Define.
2066         * parse.y (java_expand_classes): Write the class files in reverse
2067         order.
2068
2069 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2070
2071         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2072
2073 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
2074
2075         * jcf-write.c (write_classfile): Unlink the temporary file if it
2076         cannot be renamed.  Use concat to build up the name of the
2077         temporary file.
2078
2079 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
2080
2081         * jcf-write.c (write_classfile): Write the file to a
2082         temporary file and then rename it.
2083
2084 2002-05-07  Tom Tromey  <tromey@redhat.com>
2085
2086         * gjavah.c (throwable_p): Use xstrdup, not strdup.
2087
2088         Fix for PR java/1200:
2089         * gjavah.c (throwable_p): New function.
2090         (decode_signature_piece): Use it.  A `WeakReference' isn't the
2091         same as a `jweak'.
2092         Include hashtab.h.
2093         (gcjh_streq): New function.
2094
2095 2002-05-07  Andreas Jaeger  <aj@suse.de>
2096
2097         * parse.y (finish_for_loop): Fix if statement.
2098
2099 2002-05-06  Tom Tromey  <tromey@redhat.com>
2100
2101         Fix for PR java/5941:
2102         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
2103         loop update expression.
2104         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
2105         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2106
2107 2002-05-04  Mark Wielaard  <mark@klomp.org>
2108
2109         For PR java/6519:
2110         * parse.y (build_string_concatenation): Return just op1 only when op2
2111         is null and op1 is a STRING_CST, otherwise always construct a
2112         StringBuffer.
2113
2114 2002-04-27  Tom Tromey  <tromey@redhat.com>
2115
2116         For PR java/6382:
2117         * parse.y (string_convert_int_cst): New function.
2118         (merge_string_cste): Use it.
2119
2120 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2121
2122         * java-tree.h (java_parse_file): Update.
2123         (java_set_yydebug): Remove.
2124         * jcf-parse.c (yydebug): Remove.
2125         (java_set_yydebug): Die.
2126         (java_parse_file): Update.
2127         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2128
2129 2002-04-24  Tom Tromey  <tromey@redhat.com>
2130
2131         For PR java/6425:
2132         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
2133         EXPR_WFL_QUALIFICATION of qual_wfl.
2134
2135 2002-04-23  Per Bothner  <per@bothner.com>
2136
2137         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
2138         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
2139         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
2140
2141 2002-04-23  Tom Tromey  <tromey@redhat.com>
2142
2143         For PR java/6314:
2144         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
2145         recognize `-fcompile-resource='.
2146         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
2147         a bit.
2148
2149 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
2150
2151         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
2152         paths. Fixes PR java/2791.
2153
2154 2002-04-19  Andrew Haley  <aph@redhat.com>
2155
2156         * jcf-write.c (push_long_const): lo, hi: New variables.
2157         Use rshift_double to extract the high part of a 64-bit long.
2158         Use WORD_TO_INT to extract the low part.
2159
2160         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
2161         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
2162         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
2163
2164 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2165
2166         * typeck.c (incomplete_type_error): Remove.
2167
2168 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2169
2170         * class.c (make_class_data): Set DECL_ALIGN on static class data,
2171         for hash synchronization.
2172         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
2173         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
2174         class_type_node.
2175
2176 2002-04-16  Mark Wielaard  <mark@klomp.org>
2177
2178         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
2179         negative zero.
2180
2181 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2182
2183         Fix for PR java/6294:
2184         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
2185         interfaces.
2186
2187 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2188
2189         Fix for PR java/6085:
2190         * parse.y (patch_method_invocation): Always use build_access_to_thisn
2191         to get enclosing "this" argument for inner-class constructor
2192         invocation. Pass correct arguments to build_access_to_thisn.
2193
2194 2002-04-10  Andreas Jaeger  <aj@suse.de>
2195
2196         * gcj.texi (Input Options): Fix extdirs patch.
2197
2198 2002-04-10  Anthony Green  <green@redhat.com>
2199
2200         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
2201
2202 2002-04-09  Anthony Green  <green@redhat.com>
2203
2204         * gcj.texi (Input Options): Add --extdirs documentation.
2205         * jcf-dump.c (OPT_extdirs): New macro.
2206         (options): Add extdirs option.
2207         (help): Describe --extdirs.
2208         (main): Handle OPT_extdirs.
2209         * gjavah.c (OPT_extdirs): New macro.
2210         (options): Add extdirs option.
2211         (help): Describe --extdirs.
2212         (main): Handle OPT_extdirs.
2213         * jcf-path.c (jcf_path_init): Add extdirs support.
2214         (jcf_path_extdirs_arg): New function.
2215         (extensions): New variable to hold extensions path entries.
2216         * jvspec.c: Remove -fextdirs= when compiling main().
2217         * lang.c (java_decode_option): Handle -fextdirs=.
2218         * jcf.h (jcf_path_extdirs_arg): Declare new function.
2219         * Make-lang.in: Compile jcf-path with version info for use in
2220         identifying the appropriate libgcj.jar.
2221
2222 2002-04-08  Tom Tromey  <tromey@redhat.com>
2223
2224         For PR libgcj/5303:
2225         * .cvsignore: Added rmic.1 and rmiregistry.1.
2226         * gcj.texi (Top): Link to new nodes.
2227         (Invoking rmic): New node.
2228         (Invoking rmiregistry): Likewise.
2229         * Make-lang.in (java.generated-manpages): Added rmic.1 and
2230         rmiregistry.1.
2231         (java.maintainer-clean): Likewise.
2232         ($(srcdir)/java/rmic.1): New target.
2233         ($(srcdir)/java/rmiregistry.1): Likewise.
2234         (java.install-man): Handle rmic.1 and rmiregistry.1.
2235
2236 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2237
2238         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
2239         Add note about handling uncaught exceptions. Add an exception handler
2240         to example.
2241
2242 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2243
2244         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
2245         after using it to patch CALL_EXPR.
2246
2247 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2248
2249         * gcj.texi (Invocation): Document CNI invocation API.
2250
2251 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
2252
2253         * expr.c (truthvalue_conversion): Rename.  Update.
2254         (expand_compare): Update.
2255         * java-tree.h (java_truthvalue_conversion): New.
2256         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2257
2258 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2259
2260         * java-tree.h (java_mark_addressable): New.
2261         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
2262         * typeck.c (mark_addressable): Rename, update.
2263
2264 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2265
2266         * expr.c (build_java_binop): Update.
2267         * java-tree.h (java_signed_type, java_unsigned_type,
2268         java_signed_or_unsigned_type): Update.
2269         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2270         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
2271         * parse.y (patch_binop): Update.
2272         * typeck.c (signed_or_unsigned_type, unsigned_type,
2273         signed_type): Update.
2274
2275 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
2276
2277         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
2278         (java_dummy_print): Remove.
2279         (lang_print_error): Rename.  Exit early if inhibiting output.
2280         (inhibit_error_printing_function): New.
2281         (java_init): Don't set hook.
2282         (lang_init_source): Use new boolean.
2283
2284 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
2285
2286         * parse.y (do_resolve_class): Fix infinite recursion.
2287
2288 2002-03-29  Tom Tromey  <tromey@redhat.com>
2289
2290         * parse.y (check_inner_circular_reference): Ignore incomplete
2291         types.
2292
2293 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
2294
2295         * Make-lang.in (builtins.o): Update.
2296         * boehm.c (get_boehm_type_descriptor): Update.
2297         * builtins.c: Include langhooks.h.
2298         * decl.c (java_init_decl_processing): Update.
2299         * java-tree.h (java_type_for_mode, java_type_for_size): New.
2300         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
2301         Redefine.
2302         * typeck.c (type_for_mode, type_for_size): Update.
2303
2304 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
2305
2306         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
2307
2308 2002-03-28  Tom Tromey  <tromey@redhat.com>
2309
2310         * except.c (expand_end_java_handler): If the handler type is NULL,
2311         use java.lang.Throwable.  Fixes PR java/5986.
2312
2313 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2314
2315         Fix for PR java/4715:
2316         * jcf-parse.c (parse_source_file_3): New function.
2317         (read_class): Call it.
2318         (java_parse_file): Likewise.
2319
2320 2002-03-28  Jan Hubicka  <jh@suse.cz>
2321
2322         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
2323
2324 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2325
2326         * parse.y (resolve_package): Initialize "decl".
2327         (lookup_package_type): Remove unused function.
2328
2329 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2330
2331         Fix for PR java/5993:
2332         * parse.y (resolve_package): Return the decl if resolution was
2333         successful. Don't special case "java.lang" and "java.lang.reflect"
2334         packages. Set type_name to the merged identifier.
2335         (resolved_qualified_expression_name): Print error using "name" if
2336         resolve_package returns NULL_TREE.
2337
2338 2002-03-27  Tom Tromey  <tromey@redhat.com>
2339
2340         * expr.c (expand_invoke): Don't generate null pointer check if
2341         we're calling <init>.
2342
2343 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
2344
2345         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
2346         fix prototype.
2347         * java-tree.h (java_lang_expand_expr): Similarly.
2348         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
2349         (java_init): Don't set hook.
2350
2351 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2352
2353         Fix for PR java/5850:
2354         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
2355         context if field was not found in the current scope.
2356         * expr.c (lookup_field): Don't look in enclosing contexts.
2357
2358 2002-03-26  Tom Tromey  <tromey@redhat.com>
2359
2360         Fix for PR java/5942:
2361         * parse.y (init_src_parse): Added sanity check.
2362         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
2363         elements, not 11.
2364
2365 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
2366
2367         * decl.c (lang_mark_tree): Rename java_mark_tree.
2368         * java-tree.h (java_mark_tree): New.
2369         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2370
2371 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
2372
2373         * lex.c: Change java_perform_atof to take normal parameters
2374         instead of a pointer to a parameter block.  Call it directly
2375         from java_lex.
2376
2377 2002-03-22  Mark Wielaard  <mark@klomp.org>
2378
2379         Fix for PR java/5368:
2380         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
2381         when printing error message.
2382
2383 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2384
2385         * decl.c (maybe_build_cleanup): Remove.
2386
2387 2002-03-22  Tom Tromey  <tromey@redhat.com>
2388
2389         Andrew Haley  <aph@cambridge.redhat.com>
2390
2391         * expr.c (build_field_ref): Don't build a check if the field is a
2392         member of `this'.
2393
2394 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
2395
2396         Fix for PR java/6026:
2397         * lex.c (java_lex): Fix parsing of consecutive floats.
2398
2399 2002-03-21  Tom Tromey  <tromey@redhat.com>
2400
2401         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
2402         class.
2403
2404 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
2405
2406         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
2407         insert_block, getdecls, kept_level_p, global_bindings_p): New.
2408
2409 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
2410
2411         * gcj.texi: @code{gcj} becomes @command{gcj}.
2412         @code{gcc} becomes @command{gcc}.
2413         GcjRaw changed to gnu.gcc.RawData.
2414
2415 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
2416
2417         * decl.c (start_java_method): Use new hook.
2418         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
2419         (java_init): Remove old hook.
2420
2421 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
2422
2423         * builtins.c (define_builtin): Do nothing if `type' is null.
2424         Fixes PR java/5876.
2425
2426 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2427
2428         * parse.y (parser_check_super_interface): Fix error message
2429         grammar/order.
2430
2431 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2432
2433         * jcf-parse.c (get_constant): Delete unused variables.
2434
2435 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
2436
2437         * java-tree.h (java_parse_file): New.
2438         * jcf-parse.c (yyparse): Rename java_parse_file.
2439         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2440
2441 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2442
2443         * parse.y (craft_constructor): Return the constructor decl.
2444         (java_expand_classes): Update comments.
2445         (lookup_method_invoke): Call fix_constructors immediately for
2446         anonymous class. Fixes PR java/5935.
2447
2448 2002-03-15  Anthony Green  <green@redhat.com>
2449
2450         * jcf-parse.c (yyparse): Don't emit class registration
2451         constructor when compiling resource files.
2452
2453 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2454
2455         * lang.c (java_tree_code_type, java_tree_code_length,
2456         tree_code_name): Delete.
2457         (tree_code_type, tree_code_length, tree_code_name): Define.
2458         (java_init): Don't try to copy into the various tree_code
2459         arrays.
2460
2461 2002-03-12  Tom Tromey  <tromey@redhat.com>
2462
2463         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
2464         UTF-8, not UCS-2.  Fixes PR java/5923.
2465
2466         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
2467         a call_expr wrapped in a convert.  Fixes PR java/5848.
2468
2469 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2470
2471         * jcf-write.c (write_classfile): Improve error strings.
2472
2473 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
2474
2475         * lex.c: Adjust comments to GNU standards.
2476
2477 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
2478
2479         Fix for PR java/5902:
2480         * lex.c (java_lex): Fix parsing of literals.
2481
2482 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2483
2484         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
2485         to prevent it getting evaluated twice in the store checking case.
2486         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
2487         examining OBJECT.
2488
2489 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2490
2491         * decl.c (java_init_decl_processing): Make sure class_type_node
2492         alignment is not less than 64 bits if hash synchronization is enabled.
2493
2494 2002-03-08  Per Bothner  <per@bothner.com>
2495
2496         * parse.y (java_complete_lhs):  Check if patch_assignment
2497         returned an error-mark.
2498
2499         * parse.y (try_builtin_assignconv):  Don't special-case zero.
2500
2501 2002-03-08  Per Bothner  <per@bothner.com>
2502
2503         Fix for PR java/5812.
2504         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
2505         here instead of in JSR macro.  Likewise with load_type_state call.
2506         Do the latter on if the return_pc has been verified (the jsr returns).
2507         (JSR):  Now just call build_java_jsr.
2508
2509 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
2510
2511         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
2512         (java.install-common): Link native driver to
2513         JAVA_TARGET_INSTALL_NAME.
2514
2515 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
2516
2517         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
2518         * builtins.c(sin_builtin): Likewise
2519         * builtins.c(sqrt_builtin): Likewise
2520
2521 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
2522
2523         * java/expr.c, java/jcf-parse.c, java/lex.c:
2524         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
2525         REAL_ARITHMETIC blocks unconditional.  Delete some further
2526         #ifdef blocks predicated on REAL_ARITHMETIC.
2527
2528 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2529
2530         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
2531         explicit sizeof/sizeof.
2532         * decl.c (java_init_decl_processing): Likewise.
2533         * jcf-parse.c (init_jcf_parse): Likewise.
2534         * parse.y (init_src_parse): Likewise.
2535
2536 2002-03-02  Per Bothner  <per@bothner.com>
2537
2538         Make --CLASSPATH by a synonym for --classpath and -classpath.
2539         Implement --bootclasspath.
2540         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
2541         (classpath_l):  Remove.
2542         (jcf_path_CLASSPATH_arg):  Remove.
2543         (jcf_path_bootclasspath_arg):  New function.
2544         (jcf_path_seal):  Simplify accordingly.
2545
2546         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
2547         (jcf_path_CLASSPATH):  Remove declaration.
2548         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
2549         (lang_specific_driver):  Translate -bootclasspath.
2550         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
2551         * lang.c (decode_lang_options):  Do jcf_path_init first.
2552         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
2553         * gjavah.c:  Also handle --bootclasspath.
2554         Handle --CLASSPATH as a synonum for --classpath.
2555         * jcf-dump.c: Likewise.
2556
2557         "." is not part of system path, but is the default for --classpath.
2558         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
2559         (jcf_path_seal):  Add "." if no CLASSPATH specified.
2560
2561         * gcj.texi:  Document changes.
2562
2563 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2564
2565         * expr.c (build_java_arraystore_check): Fix formatting.
2566
2567 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
2568
2569         Fix for PR java/5758, java/5632:
2570         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
2571         inner-class separator too.
2572         * parse.y (do_resolve_class): New local `decl_result.'
2573         Progressively build a name for what can have been loaded.
2574
2575 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2576
2577         * expr.c (java_array_data_offset): Removed function.
2578         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
2579         (build_java_array_length_access): Obtain "length" value using a
2580         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
2581         (build_java_arrayaccess): Correct comment. Access "data" using a
2582         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
2583         (build_java_arraystore_check): New function.
2584         (expand_java_arraystore): Use build_java_arraystore_check.
2585         * parse.y (patch_assignment): Simplify code to insert a store check
2586         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
2587         * check-init.c (check_init): Update to reflect that an array length
2588         access is now a COMPONENT_REF.
2589         * gcj.texi (Code Generation): Improve documentation of
2590         -fno-bounds-check. Add documentation for -fno-store-check.
2591         * java-tree.h (flag_store_check): Declare.
2592         (build_java_arraystore_check): Declare.
2593         * lang.c (flag_store_check): Initialize to 1.
2594         (lang_f_options): Add store-check option.
2595         * jvspec.c: Don't pass store-check option to jvgenmain.
2596         * lang-options.h: Add help string for -fno-store-check.
2597
2598 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
2599
2600         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
2601         * java-tree.h (java_dup_lang_specific_decl): New.
2602         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2603
2604 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
2605
2606         * builtins.c, decl.c: Delete traditional-mode-related code
2607         copied from the C front end but not used, or used only to
2608         permit the compiler to link.
2609
2610 2002-02-22  Tom Tromey  <tromey@redhat.com>
2611
2612         Fix for PR java/2369:
2613         * jvspec.c (verify_class_name): New function.
2614         (lang_specific_driver): Call it.
2615         (JAVA_START_CHAR_P): New macro.
2616         (JAVA_PART_CHAR_P): Likewise.
2617
2618 2002-02-22  Per Bothner  <per@bothner.com>
2619
2620         * class.c:  Change vtable to be more compatible with g++ v3 abi.
2621         (get_dispatch_table):  Prepend offset-to-top (always 0) and
2622         type_info pointer (currently unimplemented hence NULL) to vtable.
2623         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
2624         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
2625         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
2626         (build_dtable_decl):  Add declarations for new fields.
2627
2628 2002-02-20  Per Bothner  <per@bothner.com>
2629
2630         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
2631         to finit$ (otherwise generate_bytecode_insns drops it). However, we
2632         don't need to set it on the COMPOUND_EXPR - the caller does that.
2633
2634 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
2635
2636         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
2637         `--CLASSPATH' becomes `--classpath.'
2638         * gjavah.c: Likewise.
2639         * jcf-dump.c: Likewise.
2640         * lang-options.h: Likewise.
2641         * lang.c: Likewise.
2642         * jcf-path.c: Updated comment.
2643         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
2644         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
2645         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
2646         (jcf_path_CLASSPATH_arg): Ditto.
2647         (classpath_u): Updated leading comment.
2648
2649 2002-02-20  Per Bothner  <per@bothner.com>
2650
2651         * builtins.c (check_for_builtin):  New function.
2652         (build_call_or_builtin):  Remove.
2653         * java-tree.h:  Update accordingly.
2654         * expr.c (expand_invoke):  Use build + check_for_builtin instead
2655         of build_call_or_builtin.
2656         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
2657         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
2658         flag (which had caused jcf-write to incorrectly emit invokevirtual).
2659
2660 2002-02-17  Tom Tromey  <tromey@redhat.com>
2661
2662         * java-tree.h (TYPE_STRICTFP): New macro.
2663         (struct lang_type) [strictfp]: New field.
2664         (CLASS_STRICTFP): New macro.
2665         (METHOD_STRICTFP): New macro.
2666         (struct lang_decl) [strictfp]: New field.
2667         * parse.y (method_header): Disallow strictfp constructor or
2668         abstract method.
2669         (STRICT_TK): Move before MODIFIER_TK.
2670         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
2671         (METHOD_MODIFIERS): Likewise.
2672         (INTERFACE_MODIFIERS): Likewise.
2673         * jcf-write.c (get_access_flags): Likewise.
2674         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
2675         (add_method_1): Likewise.
2676         (get_access_flags_from_decl): Likewise.
2677         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
2678         recognize strictfp flag.
2679         * jcf.h (ACC_STRICT): New define.
2680
2681 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
2682
2683         * class.c(build_utf8_ref): Move declaration of decl_size
2684
2685 2002-02-07  Tom Tromey  <tromey@redhat.com>
2686
2687         * gcj.texi (Input Options): --CLASSPATH does not suppress system
2688         path.
2689
2690 2002-02-04  Anthony Green  <green@redhat.com>
2691
2692         * class.c (build_utf8_ref): Put UTF-8 constants into merged
2693         sections if available.
2694
2695 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2696
2697         * parse.y (java_expand_classes): Fix typo in static field loop.
2698
2699 2002-02-02  Richard Henderson  <rth@redhat.com>
2700
2701         * class.c (add_field): Mark static fields external.
2702         (build_class_ref): Remove redundant set.
2703         * parse.y (java_expand_classes): Mark static fields of classes
2704         to be compiled as local.
2705         * jcf-parse.c (parse_class_file): Likewise.
2706
2707 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
2708
2709         * gcj.texi (About CNI): New node.
2710
2711 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
2712
2713         PR java/5080
2714         * jcf-parse.c : Check for HAVE_LOCALE_H before using
2715         setlocale() with LC_CTYPE as a parameter.
2716         * jv-scan.c: Same.
2717
2718 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
2719
2720         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
2721         Follow GNU Coding Standards for --version.
2722
2723 2002-01-28  Tom Tromey  <tromey@redhat.com>
2724
2725         * expr.c (build_jni_stub): Ensure storage for `meth' is
2726         generated.
2727         * parse.y (java_complete_expand_methods): Set
2728         current_function_decl before building JNI stub.
2729
2730 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
2731
2732         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
2733         BUILT_IN_SQRTF.
2734
2735 2002-01-22  Tom Tromey  <tromey@redhat.com>
2736
2737         * decl.c (java_init_decl_processing): Use add_predefined_file.
2738         Predefine RawData.java.
2739         (predef_filenames): Removed.
2740         (java_init_decl_processing): Don't register predef_filenames.
2741         * jcf-parse.c (add_predefined_file): New function.
2742         (predefined_filename_p): Rewrote.
2743         (predefined_filename_p): No longer static.
2744         * decl.c (java_init_decl_processing): Call initialize_builtins.
2745         * Make-lang.in (JAVA_OBJS): Added builtins.o.
2746         (java/builtins.o): New target.
2747         * builtins.c: New file.
2748         * parse.y (patch_invoke): Use build_call_or_builtin.
2749         * java-tree.h (build_call_or_builtin): Declare.
2750         (initialize_builtins): Declare.
2751         (java_set_exception_lang_code): Removed unused declaration.
2752         (PREDEF_FILENAMES_SIZE): Removed.
2753         (java_tree_index): Added JTI_PREDEF_FILENAMES.
2754         (predef_filenames): New define.
2755         (add_predefined_file): Declare.
2756         (predefined_filename_p): Declare.
2757         * expr.c (expand_invoke): Use build_call_or_builtin.
2758
2759 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2760
2761         * parse.y (patch_switch_statement): Fix format specifier.
2762
2763 2002-01-16  Tom Tromey  <tromey@redhat.com>
2764
2765         More for PR java/5365:
2766         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
2767         default.
2768         (process_file): Generate include for
2769         java.lang.UnsupportedOperationExceptions.
2770
2771 2002-01-15  Andreas Jaeger  <aj@suse.de>
2772
2773         * .cvsignore: Add man pages.
2774
2775 2002-01-15  Tom Tromey  <tromey@redhat.com>
2776
2777         Fix for PR java/5365:
2778         * gjavah.c (process_file): Turn class name into a file name.
2779
2780 2002-01-14  Matthias Klose  <doko@debian.org>
2781
2782         * gcj.texi: Fix whitespace and formatting errors in the
2783         synopsis of the man pages. Update copyright.
2784
2785 2002-01-14  Tom Tromey  <tromey@redhat.com>
2786
2787         For PR libgcj/5303:
2788         * Make-lang.in (java.install-man): Handle jv-convert man page.
2789         (java.generated-manpages): Added jv-convert.1.
2790         (java.uninstall): Remove jv-convert.1.
2791         (java.maintainer-clean): Likewise.
2792         ($(srcdir)/java/jv-convert.1): New target.
2793         * gcj.texi (Top): Link to jv-convert node.
2794         (Individual utilities): Likewise.
2795         (Invoking jv-convert): New node.
2796
2797 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
2798             Martin Kahlert  <martin.kahlert@infineon.com>
2799
2800         * jcf-parse.c (get_constant): Don't swap lo/hi for big
2801         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
2802
2803 2002-01-03  Graham Stott  <grahams@redhat.com>
2804
2805         * class.c (compile_resource_file): Update copyright date.
2806         Constify filename parameter.
2807         (java-tree.h): Update copyright date.
2808         (compile_resource_file): Constify filename parameter.
2809
2810 2002-01-03  Graham Stott  <grahams@redhat.com>
2811
2812         * gcc/jcf-parse.c: Update copyright date.
2813         (yyparse): Constify resource_filename.
2814
2815 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2816
2817         * parse.y (src_parse_roots): Don't needlessly zero init.
2818
2819 2001-12-31  Tom Tromey  <tromey@redhat.com>
2820
2821         * parse.y (dump_java_tree): New function.
2822         (source_end_java_method): Call it.
2823         (end_class_declaration): Likewise.
2824         * lang.c (java_decode_option): Call dump_switch_p.
2825
2826 2001-12-28  Tom Tromey  <tromey@redhat.com>
2827
2828         * gen-table.pl: Don't process characters after \uffff.  Added
2829         comment pointing to input file.
2830
2831 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2832
2833         * gen-table.pl: Const-ify output.  Document the location of a
2834         suitable unicode input file.
2835
2836         * chartables.h: Regenerate.
2837
2838 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2839
2840         * chartables.h: Const-ify.
2841         * gjavah.c (options): Likewise.
2842         * jcf-dump.c (options): Likewise.
2843         * jv-scan.c (options): Likewise.
2844         * lex.c (java_start_char_p, java_part_char_p): Likewise.
2845         * parse.y (binop_lookup): Likewise.
2846
2847 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2848
2849         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
2850         the static arrays that are output.
2851         * jvspec.c (jvgenmain_spec): Make static.
2852         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
2853         * keyword.h: Regenerate.
2854         * lang.c (string_option, process_option_with_no, lang_f_options,
2855         lang_W_options): Const-ify.
2856         * lex.c (java_lex): Likewise.
2857
2858 2001-12-21  Richard Henderson  <rth@redhat.com>
2859
2860         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
2861         (get_boehm_type_descriptor): ... here.  Arrange for the
2862         TREE_TYPE to get set properly.
2863
2864 2001-12-21  Richard Henderson  <rth@redhat.com>
2865
2866         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
2867         only if the target requires collect2.
2868
2869         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
2870
2871 2001-12-20  Tom Tromey  <tromey@redhat.com>
2872
2873         For PR java/4509:
2874         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
2875         CAN_COMPLETE_NORMALLY for the node.
2876         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
2877         generate code for second branch if first branch can't complete
2878         normally.
2879         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
2880         the loop head if the loop body can't complete normally.
2881
2882 2001-12-20  Tom Tromey  <tromey@redhat.com>
2883
2884         For PR java/4766:
2885         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
2886         case where `finally' clause can't complete normally.
2887
2888 2001-12-20  Tom Tromey  <tromey@redhat.com>
2889
2890         Fixes PR java/5057:
2891         * parse.y (analyze_clinit_body): Added this_class parameter.
2892         Check for more cases where we must keep <clinit>.
2893         (maybe_yank_clinit): Cleaned up flow control.
2894
2895 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2896
2897         * decl.c (java_init_decl_processing): Don't initialize
2898         finit_leg_identifier_node.
2899         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
2900         (finit_leg_identifier_node): Remove.
2901         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
2902
2903 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2904
2905         * mangle.c (mangle_member_name): Don't special-case for
2906         NO_DOLLAR_IN_LABEL.
2907         * mangle_name.c (unicode_mangling_length): Likewise.
2908         (append_unicode_mangled_name): Likewise.
2909         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
2910         code.
2911
2912 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2913
2914         * expr.c (build_java_array_length_access): Don't force null pointer
2915         check unless flag_check_references is set.
2916
2917 2001-12-20  Tom Tromey  <tromey@redhat.com>
2918
2919         Fix for PR java/3417:
2920         * parse.y (patch_assignment): Added special processing for
2921         `return'.
2922         (patch_return): Don't convert booleans to integers, and don't
2923         special-case `null'.
2924
2925 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
2926
2927         * config-lang.in (diff_excludes): Remove.
2928
2929 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
2930
2931         * gcj.texi: Update link to GCC manual.
2932
2933 2001-12-17  Tom Tromey  <tromey@redhat.com>
2934
2935         * parse.y (link_nested_class_to_enclosing): Removed useless
2936         statement.
2937
2938 2001-12-16  Tom Tromey  <tromey@redhat.com>
2939
2940         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
2941         Fixes PR java/5088.
2942
2943 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
2944
2945         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
2946         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
2947         spelling errors.
2948
2949 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2950
2951         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
2952
2953 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2954
2955         * decl.c (java_init_decl_processing): Build otable_type correctly.
2956         otable_decl is an otable_type.
2957
2958 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2959
2960         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
2961         otable_type, otable_ptr_type, method_symbol_type,
2962         method_symbols_array_type, method_symbols_array_ptr_type): New
2963         field/global tree definitions.
2964         (flag_indirect_dispatch): New flag.
2965         * decl.c (java_init_decl_processing): Initialize new otable and
2966         otable_syms type nodes and decls. Add new field "index" to
2967         method_type_node.
2968         * class.c (build_method_symbols_entry): New function.
2969         (make_method_value): Set "index" to to method's vtable index for
2970         virtual methods when indirect-dispatch is not used.
2971         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
2972         and set vtable_method_count to -1. Set otable and otable_syms field
2973         if indirect-dispatch is used and there was something to put in them.
2974         (build_method_symbols_entry): New function.
2975         (emit_offset_symbol_table): New function.
2976         * expr.c (get_offset_table_index): New function.
2977         (build_invokevirtual): Build array reference to otable at the index
2978         returned by get_offset_table_index, and use the result as the vtable
2979         offset.
2980         (build_invokeinterface): Similar.
2981         * jcf-parse.c (yyparse): If indirect-dispatch, call
2982         emit_offset_symbol_table at the end of compilation, after all classes
2983         have been generated.
2984         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
2985         * lang.c (flag_indirect_dispatch): Define.
2986         (lang_f_options): Add indirect-dispatch flag.
2987
2988 2001-12-14  Matthias Klose  <doko@debian.org>
2989
2990         * gcj.texi: Markup for man page generation. Document missing
2991         options printed by <tool> --help.
2992         Terminate description of gij's -ms option with a dot.
2993         * Make-lang.in ($(srcdir)/java/*.1): New targets.
2994         (java.generated-manpages java.install-man, java.uninstall,
2995         java-maintainer-clean) Updated.
2996
2997 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
2998
2999         * class.c (get_dispatch_table): Fix java vtable layout
3000         for TARGET_VTABLE_USES_DESCRIPTORS.
3001         * decl.c (java_init_decl_processing): Initialize
3002         alloc_no_finalizer_node, finalize_identifier_node.
3003         * expr.c (class_has_finalize_method): New function.
3004         (expand_java_NEW): Generate calls for finalizer-free allocation.
3005         (build_invokevirtual): Fix java vtable layout for
3006         TARGET_VTABLE_USES_DESCRIPTORS.
3007         * java-tree.h (enum java_tree_index): New entries:
3008         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
3009         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
3010         (class_has_finalize_method): declare.
3011         (HAS_FINALIZER_P): New macro.
3012         * parse.y (patch_invoke): Generate calls for finalizer-free
3013         allocation.
3014
3015 2001-12-12  Matthias Klose  <doko@debian.org>
3016
3017         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
3018         whitespace at end of line.
3019
3020 2001-12-11  Tom Tromey  <tromey@redhat.com>
3021
3022         * lex.c (java_init_lex): Define wfl_to_string as
3023         gnu.gcj.runtime.StringBuffer unless generating bytecode.
3024
3025 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
3026
3027         * class.c (make_method_value): Use null_pointer_node to
3028         represent empty exception table.
3029
3030 2001-12-10  Tom Tromey  <tromey@redhat.com>
3031
3032         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
3033
3034 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
3035
3036         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
3037
3038 2001-12-09  Per Bothner  <per@bothner.com>
3039
3040         * check-init.c (current_switch_has_default):  New static field.
3041         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
3042         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
3043         DEFAULT_EXPR seen, simulate a default alternative that copies state.
3044
3045 2001-12-09  Tom Tromey  <tromey@redhat.com>
3046
3047         * check-init.c (check_init): Don't allow pre- or post- increment
3048         or decrement of final variable.
3049         (final_assign_error): Minor error message rewording.
3050
3051 2001-12-08  Tom Tromey  <tromey@redhat.com>
3052
3053         * java-tree.h: Fixed typo.
3054
3055         * gjavah.c (decompile_method): Don't decompile to `return this'
3056         for static methods.
3057
3058         * gjavah.c (cxx_keywords): Re-sorted.
3059         * lex.c (cxx_keywords): Re-sorted.
3060
3061         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
3062         else.
3063
3064         * gjavah.c (print_namelet): Clear subnamelets.
3065         (HANDLE_METHOD): Set `method_printed' earlier.
3066
3067 2001-12-07  Tom Tromey  <tromey@redhat.com>
3068
3069         * lang.c (lang_f_options): Added
3070         optimize-static-class-initialization.
3071         (java_decode_option): Removed special case.
3072
3073 2001-12-07  Per Bothner  <per@bothner.com>
3074
3075         * check-init.c (check_init):  Fix typo freeing memory twice.
3076
3077 2001-12-05  Per Bothner  <per@bothner.com>
3078
3079         Restore support for static class initialization optimization.
3080         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
3081         * check-init.c (check_int):  At end of BLOCK handle initialization
3082         blocks, which used to be done in java_complete_expand_method but did
3083         not handle the case where check_for_initialization might allocate
3084         more than a word of bits.
3085         * decl.c (lang_make_tree):  The smic field is now a tree.
3086         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
3087         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
3088
3089         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
3090
3091         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
3092         Change from a hash table to a list.
3093         (struct_lang_decl):  Change field 'smic' to match.
3094         * class.c (add_method_1):  Initialize
3095         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
3096         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
3097         (java_expand_method_bodies): -here, since 'smic' is now a list.
3098         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
3099
3100         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
3101
3102         * class.c (java_hash_compare_tree_node):  Fix casts.
3103
3104 2001-12-04  Per Bothner  <per@bothner.com>
3105
3106         * check-init.c:   Handle definite unassignment to finals in addition
3107         to definite assignment.
3108         (loop_current_locals):  New field.
3109         (num_current_locals, int start_current_locals, num_current_words):
3110         Make static.
3111         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
3112         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
3113         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
3114         (get_variable_decl, check_final_reassigned):  New functions.
3115         (check_init, check_bool_init):  Modify as needed for checking finals.
3116         (check_for_initialization):  Take extra parameter and return void.
3117         Do extra start-up logic to check final fields for assignment.
3118         * parse.y (check_static_final_variable_assignment_flag,
3119         reset_static_final_variable_assignment_flag, check_final_assignment,
3120         check_final_variable_local_assignment_flag,
3121         reset_final_variable_indirect_assignment_flag,
3122         reset_final_variable_global_assignment_flag):  Remove functions.
3123         (java_complete_expand_methods, outer_field_access_fix,
3124         patch_assignment): Remove no-longer used logic.
3125         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
3126         * parse.y (register_fields, java_complete_tree):  Update accordingly.
3127
3128         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
3129         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
3130         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
3131
3132         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
3133
3134         * java-tree.h (DECL FINAL):  New bit-field.
3135         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
3136         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
3137         (DECL_INIT_CALLS_THIS):  New macro.
3138         (struct lang_decl):  New bit-field init_calls_this.
3139         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
3140         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
3141         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
3142         use it for both local variables and final fields.
3143         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
3144         and local_final.
3145         (struct lang_type):  Remove hfv bit-field.
3146         (check_for_initialization):  Change to return void.
3147
3148         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
3149         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
3150         * check-init.c (final_assign_error):  New helper function.
3151         (check_final_reassigned, check_init):  Use it.
3152         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
3153
3154         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
3155         bit-fields to unsigned.
3156
3157 2001-12-03  Per Bothner  <per@bothner.com>
3158
3159         * parse.y (patch_binop):  Minor constant folding.
3160
3161         * parse.y (build_current_thisn):  Shorter 'buffer'.
3162
3163 2001-12-03  Per Bothner  <per@bothner.com>
3164
3165         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
3166         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
3167         * jcf-write.c (generate_bytecode_insns):  Remove support for
3168         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
3169         * check-init.c (check_init):  Likewise.
3170
3171 2001-12-03  Per Bothner  <per@bothner.com>
3172
3173         * verify.c (subroutine_nesting):  New function.
3174         (verify_jvm_instructions):  Use it to fix logic for checking that
3175         we're done with the current subroutine.
3176
3177         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
3178         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
3179
3180 2001-12-03  Per Bothner  <per@bothner.com>
3181
3182         * jcf.h:  Fix obvious typo in comment.
3183         * typeck.c (build_null_signature):  Add comment.
3184
3185 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3186
3187         * expr.c: Remove leading capital from diagnostic messages, as
3188         per GNU coding standards.
3189         * jcf-io.c: Similarly.
3190         * jcf-parse.c: Similarly.
3191         * jv-scan.c: Similarly.
3192         * jvspec.c: Similarly.
3193         * mangle.c: Similarly.
3194
3195 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
3196             Alexandre Petit-Bianco  <apbianco@redhat.com>
3197
3198         * expr.c (build_java_arrayaccess): Call save_expr on array for
3199         correct evaluation order, modified comment, fixed indentation.
3200         * parse.y: (patch_assignment): Correctly extract the array base
3201         from the tree generate by build_java_arrayaccess, added comments.
3202         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
3203         Fixes PR java/3096, PR java/3803, PR java/3965.
3204
3205 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3206
3207         * expr.c (expand_byte_code): Remove trailing periods from messages.
3208         * jcf-parse.c (load_class, jcf_parse): Similarly.
3209         * jcf-write.c (generate_classfile): Similarly.
3210         * lex.c (java_lex): Similarly.
3211
3212 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3213
3214         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
3215
3216 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3217
3218         * Make-lang.in (java.generated-manpages): New dummy target.
3219
3220 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3221
3222         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3223         ASM_FINAL_SPEC.
3224         (lang_specific_pre_link): Use set_input to set input_filename.
3225         Append `main' here.
3226         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3227         (main): Fix definition.
3228         Strip `main' from classname.
3229         Fixes PR java/227.
3230
3231 2001-11-18  Roger Sayle <roger@eyesopen.com>
3232
3233         * parse.h (java_expand_switch): Remove old prototype.
3234
3235 2001-11-18  Tom Tromey  <tromey@redhat.com>
3236
3237         Fix for PR java/1401:
3238         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
3239         arg0 is null.
3240         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
3241         correctly.
3242
3243 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3244
3245         * lang.c (finish_parse): Rename to java_finish.
3246         (LANG_HOOKS_FINISH, java_finish): New.
3247
3248 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
3249
3250         * decl.c (init_decl_processing): Rename java_init_decl_processing.
3251         * java-tree.h: New prototype.
3252         * lang.c (java_init): Update prototype.  Combine with old init_parse.
3253
3254 2001-11-13  Tom Tromey  <tromey@redhat.com>
3255
3256         * gjavah.c (method_signature): New global.
3257         (HANDLE_METHOD): Set it.
3258         (decompile_return_statement): New function.
3259         (decompile_method): Use it.
3260         (print_method_info): Removed `synth' argument.
3261
3262 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3263
3264         * java-tree.h (java_set_yydebug): New.
3265         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
3266         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
3267         (print_lang_decl, print_lang_type, print_lang_identifier,
3268         print_lang_statistics, lang_print_xnode): Remove.
3269
3270 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3271
3272         * jcf-parse.c (init_lex): Remove.
3273         * lang.c (language_string, lang_identify): Remove.
3274         (struct lang_hooks): Constify.
3275         (LANG_HOOKS_NAME): Override.
3276         (init_parse): Update.
3277
3278 2001-11-08  Andreas Franck  <afranck@gmx.de>
3279
3280         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
3281         program_transform_name the way suggested by autoconf.
3282         (java.install-common): Also transform auxiliary program names with
3283         program_transform_name.
3284
3285 2001-11-08  Tom Tromey  <tromey@cygnus.com>
3286
3287         * parse.y (trap_overflow_corner_case): New rule.
3288         (unary_expression): Use it.
3289         * lex.c (java_init_lex): Don't set minus_seen.
3290         (yylex): Don't use minus_seen.  Communicate overflow to parser for
3291         it to handle.
3292         (error_if_numeric_overflow): New function.
3293         * parse.h (minus_seen): Removed field.
3294         (JAVA_RADIX10_FLAG): New define.
3295
3296 2001-11-07  Tom Tromey  <tromey@redhat.com>
3297
3298         Patch for PR java/1414:
3299         * parse.y (case_label_list): New global.
3300         (goal): Register case_label_list with GC.
3301         (java_complete_lhs): Save new case on case_label_list.
3302         (patch_switch_statement): Check for duplicate case labels.
3303
3304 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
3305
3306         * parse.y (patch_assignment): Removed unused third argument.
3307         (java_complete_lhs): Removed unused third argument to patch_assignment.
3308
3309 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3310
3311         * lang.c: Include langhooks-def.h.
3312         * Make-lang.in: Update.
3313
3314 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
3315
3316         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3317
3318 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3319
3320         * mangle.c (find_compression_record_match): Don't match compression
3321         records for package name elements unless they occur at the start of
3322         the name. Fix for PR java/4717.
3323
3324 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3325
3326         * expr.c (expand_java_field_op): Don't special-case references to
3327         java.lang.PRIMTYPE.TYPE.
3328         (build_primtype_type_ref): Removed.
3329         * java-tree.h (build_primtype_type_ref): Remove prototype.
3330         * parse.y (maybe_build_primttype_type_ref): Removed.
3331         (complete_function_arguments): Don't special-case references to
3332         java.lang.PRIMTYPE.TYPE.
3333         (patch_assignment): Likewise.
3334         (array_constructor_check_entry): Likewise.
3335
3336 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
3337
3338         * mangle.c (static tree compression_table): Fixed leading comment.
3339         * parse.h (struct parser_ctxt): Fixed field comment.
3340         * parse.y (check_pkg_class_access): New prototype, fixed leading
3341         comment, new parameter used to emit error only if passed as true.
3342         (parse_check_super): Pass extra argument to check_pkg_class_access.
3343         (do_resolve_class): Likewise.
3344         (process_imports): Likewise.
3345         (read_import_dir): Fixed indentation.
3346         (find_in_imports_on_demand): New local class_type_name. Local
3347         node_to_use deleted. while loop changed into for loop. Report
3348         multiple definition only for accessible classes. Improved error
3349         message.
3350         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
3351         assigned to parameter list, fixed indentation. while loop changed
3352         into for loop, restore TREE_CHAIN on local `tem' before the next
3353         iteration.
3354
3355 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3356
3357         * lang.c (lang_get_alias_set): Deleted.
3358
3359 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3360
3361         * gjavah.c (jni_print_char): Fix thinko in last change.
3362
3363         * gjavah.c (jni_print_char, decode_signature_piece): Use
3364         safe-ctype macros and/or fold extra calls into fewer ones.
3365         * lex.c (java_read_unicode, java_lex): Likewise.
3366         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
3367         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
3368         * mangle_name.c (append_unicode_mangled_name,
3369         unicode_mangling_length): Likewise.
3370
3371 2001-10-17  Richard Henderson  <rth@redhat.com>
3372
3373         * Make-lang.in (java/lang.o): Depend on langhooks.h.
3374
3375 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
3376
3377         * lang.c (langhooks.h): Included.
3378         (LANG_HOOKS_INIT): Redefined.
3379         (LANG_HOOKS_INIT_OPTIONS): Likewise.
3380         (LANG_HOOKS_DECODE_OPTION): Likewise.
3381         (struct lang_hooks lang_hooks): New initialization.
3382
3383 2001-10-11  Per Bothner  <per@bothner.com>
3384
3385         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
3386         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
3387         The former is simpler, and jcf-write.c handles it better.
3388         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
3389         or WITH_CLEANUP_EXPR.
3390         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
3391         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
3392
3393         * parse.y (patch_if_else_statement):  If the condition is constant,
3394         optimize away the test.
3395
3396 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3397
3398         * parse.y (patch_cast): Call patch_string on the first operand of
3399         the incoming node, update it if necessary. Fixes PR java/4510.
3400
3401 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3402
3403         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
3404         when name qualifier matches a package name.
3405
3406 2001-10-08  Tom Tromey  <tromey@redhat.com>
3407
3408         Fix for PR java/4489:
3409         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
3410         force a new label when computing `body_block'.
3411
3412 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3413
3414         * jcf-io.c (format_uint): Const-ify.
3415         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
3416         * lex.c (java_get_line_col): Likewise.
3417         * parse.y (build_incdec): Likewise.
3418
3419 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
3420
3421         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
3422         a NULL enclosing context if appropriate. Fixes PR java/4466.
3423
3424 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
3425
3426         * parse.y (patch_assignment): Use lvalue's original TYPE when
3427         building the final COMPOUND_EXPR.
3428         (try_reference_assignconv): Fixed leading comment.
3429
3430 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
3431
3432         * parse.y (check_final_variable_indirect_assignment): For
3433         COMPOUND_EXPR, return only if finals were found initialized
3434         properly, if not, keep on checking.
3435         (check_final_variable_global_assignment_flag): New local
3436         error_found, set when appropriate and used to decide whether to
3437         report uninitialized finals. Fixed typo in comment.
3438
3439 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3440
3441         * decl.c (init_decl_processing): Fixed typo in predef_filenames
3442         last three initializations. Fixes PR java/4360.
3443
3444 2001-09-21  Richard Henderson  <rth@redhat.com>
3445
3446         * class.c (get_dispatch_table): Handle function descriptors.
3447         (build_dtable_decl): Likewise.
3448         * expr.c (build_invokevirtual): Likewise.
3449
3450 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
3451
3452         * parse.y (patch_method_invocation): Build class initialization
3453         when static finals are used to qualify method invocation.
3454         Fixes PR java/4366.
3455
3456 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
3457
3458         * parse.h: (WFL_STRIP_BRACKET): Re-written using
3459         build_type_name_from_array_name.
3460         (STRING_STRIP_BRACKETS): New macro.
3461         * parse.y (build_type_name_from_array_name): New function.
3462         (array_creation_expression:): Accumulate []s instead of [s.
3463         (cast_expression:): Accumulate []s instead of [s after cast type
3464         name.
3465         (build_array_from_name): Local string deleted, use
3466         build_type_name_from_array_name.
3467         (build_unresolved_array_type): Accumulate []s instead of [s after
3468         type name.
3469         (register_fields): Fixed comment.
3470         (resolve_class): Local name, base deleted, new locals tname and
3471         array_dims. Use build_type_name_from_array_name. Use array_dims to
3472         build array type.
3473         (purify_type_name): Use STRING_STRIP_BRACKETS.
3474
3475 2001-09-18  Andreas Jaeger  <aj@suse.de>
3476
3477         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
3478         * jv-scan.c: Likewise.
3479
3480 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
3481
3482         * parse.y (patch_method_invocation): Inner class creation context
3483         check not enforced within constructors. Fixes PR java/1873.
3484
3485 2001-09-16  Tom Tromey  <tromey@redhat.com>
3486
3487         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
3488         NOTE_PUSH for single-case push.  Fixes PR java/4189.
3489
3490 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
3491
3492         * java-tree.h (TYPE_IMPORT_LIST): New macro.
3493         (TYPE_IMPORT_DEMAND_LIST): Likewise.
3494         (struct lang_type): New fields import_list and import_demand_list.
3495         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
3496         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
3497         (do_resolve_class): New local saved_enclosing_type, initialized,
3498         passed as parameter to find_in_imports and find_in_imports_on_demand.
3499         (find_in_imports): Added paramater enclosing_type, use its
3500         TYPE_IMPORT_LIST when applicable.
3501         (find_in_imports_on_demand): Added parameter enclosing_type, use
3502         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
3503         declaration and initialization.
3504         (fold_constant_for_init): Switch/restore current_class to the
3505         appropriate context.
3506
3507 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
3508
3509         * verify.c (verify_jvm_instructions): Fix typo.
3510
3511 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3512
3513         * expr.c (expand_invoke): Const-ification.
3514         * parse.y (patch_method_invocation): Likewise.
3515
3516 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3517
3518         * gjavah.c (cxx_keywords): Const-ification.
3519         * keyword.gperf (java_keyword): Likewise.
3520         * lang.c (java_tree_code_name): Likewise.
3521         * lex.c (cxx_keywords): Likewise.
3522         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
3523
3524 2001-09-11  Richard Henderson  <rth@redhat.com>
3525
3526         * parse.h (ctxp_for_generation): Mark extern.
3527
3528 2001-09-10  Richard Henderson  <rth@redhat.com>
3529
3530         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
3531
3532 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
3533
3534         * typeck.c (java_array_type_length, build_prim_array_type):
3535         Represent empty arrays by NULL index.
3536
3537 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
3538
3539         * java-tree.h (compile_resource_file): Grouped with other prototypes.
3540         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
3541
3542 2001-09-06  Anthony Green  <green@redhat.com>
3543
3544         * class.c (O_BINARY): Define if necessary.
3545         (registerResource_libfunc): Declare.
3546         (init_class_processing): Initilize registerResource_libfunc.
3547         (compile_resource_file): New function.
3548         * java-tree.h (resource_name): Declare.
3549         (compile_resource_file): Declare.
3550         * jcf-parse.c (yyparse): Handle compiling java resource files.
3551         * lang.c (java_decode_option): Handle -fcompile-resource option.
3552         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
3553         resource files.
3554         * gcj.texi (Code Generation): Add documentation for -R flag.
3555
3556 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
3557
3558         * jcf-write.c (generate_classfile): Issue an error in case of
3559         field/initial value mismatch.
3560         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
3561         being initialized and we're generating bytecode.
3562         (java_complete_lhs): In MODIFY_EXPR section: added comments,
3563         set DECL_INITIAL properly when appropriate.
3564         Fixes PR java/4230
3565         Fixes PR java/4204
3566
3567 2001-09-01  Per Bothner  <per@bothner.com>
3568
3569         * parse.y (maybe_yank_clinit):  A field without an initializer is not
3570         relevant.  All initializers except static final and constant require
3571         <clinit>, regardless of flag_emit_class_files.
3572
3573 2001-08-31  Per Bothner  <per@bothner.com>
3574
3575         * class.c (set_constant_value):  When not emitting class files, then a
3576         String ConstantValue is a utf8const_ptr_type.
3577
3578 2001-08-30  Per Bothner  <per@bothner.com>
3579
3580         * jcf-write.c (generate_classfile):  Check that field is primitive
3581         or string before emitting ConstantValue attribute.
3582
3583 2001-08-30  Per Bothner  <per@bothner.com>
3584
3585         * parse.y (resolve_qualified_expression_name):  If creating a
3586         COMPOUND_EXPR, set it's type correctly.
3587
3588 2001-08-30  Per Bothner  <per@bothner.com>
3589
3590         * jcf-io.c (open_class):  Set filename field.
3591
3592         * jcf-parse,c (parse_class_file):  Set current_function_decl
3593         for better error message when Code attribute is missing.
3594
3595         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
3596         better diagnostics, especially for constructors.
3597
3598 2001-08-30  Per Bothner  <per@bothner.com>
3599
3600         * jcf-write.c (generate_classfile):  Don't write ConstantValue
3601         attribute if field is not final, for compatibility with jdk.
3602
3603         * jcf-write.c (generate_classfile):  Convert ConstantValue values
3604         to correct type.  Work-around for front-end bug.
3605         * class.c (set_constant_value):  Error if constant has wrong type.
3606
3607 2001-08-30  Per Bothner  <per@bothner.com>
3608
3609         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
3610         "Double" are printed at verbosity 1.
3611
3612         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
3613
3614         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
3615
3616 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
3617
3618         * parse.y (patch_assignment): Don't verify final re-assignment here.
3619         (java_complete_lhs): Verify assignments to finals calling
3620         patch_assignment. Verify re-assignments to finals before calling
3621         patch_assignment.
3622
3623 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
3624
3625         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
3626         Fixes PR java/1413
3627
3628 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
3629
3630         * lex.c (java_lex): new local found_hex_digits. Set and then used
3631         in test to reject invalid hexadecimal numbers.
3632         * parse.y (java_complete_tree): Prevent unwanted cast with
3633         initialized floating point finals.
3634         (patch_binop): Emit a warning when detecting a division by zero,
3635         mark result not constant, don't simplify non integer division.
3636
3637 2001-08-28  Per Bothner  <per@bothner.com>
3638
3639         * jcf-write.c  (generate_bytecode_insns):  For increments and
3640         decrements just recurse to push constant.  Improvement on Mark's patch.
3641
3642 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
3643
3644         * jcf-write.c (generate_bytecode_insns): Generate an integer to
3645         real conversion for increments and decrements of reals.
3646
3647 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
3648
3649         * parse.y (resolve_qualified_expression_name): Handle unresolved
3650         qualified expressions, prevent numerical qualifiers, fixed typo.
3651         Fixes PR java/4141
3652
3653 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
3654
3655         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
3656         don't report anything but deprecated class when marked so. Handle
3657         VAR_DECL.
3658         (patch_method_invocation): Check deprecation on methods and types.
3659         (patch_binop): code becomes an enum tree_code, added default: to
3660         switch to handle that. Detect division by zero, try to fold and
3661         return before using a subroutine.
3662
3663 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
3664
3665         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
3666         file smaller than 4 bytes.
3667         * parse.y (check_inner_circular_reference): New function.
3668         (check_circular_reference): Likewise.
3669         (array_initializer:): Accept {,}.
3670         (java_check_circular_reference): Rewritten using
3671         check_circular_reference and check_inner_circular_reference.
3672         (java_complete_expand_method): Unconditionally save and restore
3673         the unpurged exception list.
3674         (build_dot_class_method_invocation): Unmangle signature parameter.
3675
3676 2001-08-21  Tom Tromey  <tromey@redhat.com>
3677
3678         * decl.c (init_decl_processing): Add `throws' field to method
3679         descriptor.
3680         * class.c (make_method_value): Compute `throws' field for method.
3681
3682 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3683
3684         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
3685         circularity is detected.
3686         (ctors_unchecked_throws_clause_p): Fixed leading comment.
3687
3688 2001-08-17  Richard Henderson  <rth@redhat.com>
3689
3690         * class.c (emit_register_classes): Add align parameter to
3691         call to assemble_integer.
3692
3693 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
3694
3695         * jcf-parse.c (load_class): New locals saved and class_loaded. If
3696         loading a class_or_name fails, try considering an innerclass name
3697         and load the enclosing context.
3698         * parse.y (resolve_inner_class): New function.
3699         (find_as_inner_class): Added leading comment.
3700         (register_incomplete_type): Keep the current context as enclosing
3701         context for JDEP_FIELD dependencies.
3702         (do_resolve_class): Locals new_class_decl and super initialized to
3703         NULL. Call resolve_inner_class, explore the enclosing context
3704         superclass if necessary.
3705         Fixes PR java/4007
3706
3707 2001-08-16  Tom Tromey  <tromey@redhat.com>
3708
3709         * jcf-dump.c (main): Updated for change to jcf_path_seal.
3710         * gjavah.c (main): Updated for change to jcf_path_seal.
3711         * lang.c (version_flag): New global.
3712         (java_decode_option): Recognize `-version'.
3713         (java_init): Update for change to jcf_path_seal.
3714         * jcf.h (jcf_path_seal): Added `print' argument.
3715         * jcf-path.c (jcf_path_seal): Added `print' argument.
3716
3717 2001-08-13  Zack Weinberg  <zackw@panix.com>
3718
3719         * Make-lang.in (java/decl.o): Update dependencies.
3720         * decl.c: Include libfuncs.h, don't include toplev.h.
3721
3722 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
3723
3724         * decl.c (init_decl_processing): exception_type_node,
3725         class_not_found_type_node, and no_class_def_found_type_node
3726         initialized. predef_filenames augmented accordingly.
3727         instinit_identifier_node initialized.
3728         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
3729         * java-tree.h (enum java_tree_index): New entries
3730         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
3731         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
3732         (exception_type_node): New macro.
3733         (class_not_found_type_node): Likewise.
3734         (no_class_def_found_type_node): Likewise.
3735         (instinit_identifier_node): Likewise.
3736         (PREDEF_FILENAMES_SIZE): Adjusted.
3737         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
3738         (struct lang_type): Fixed typo in bitfield name.
3739         (DECL_INSTINIT_P): New macro.
3740         (ID_INSTINIT_P): Likewise.
3741         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
3742         attribute.
3743         * parse.y (encapsulate_with_try_catch): New function.
3744         (generate_instinit): Likewise.
3745         (build_instinit_invocation): Likewise.
3746         (ctors_unchecked_throws_clause_p): Likewise.
3747         (add_instance_initializer): Deleted.
3748         (build_instance_initializer): Likewise.
3749         (in_instance_initializer): Likewise.
3750         (check_method_redefinition): instinit$ not to be verified.
3751         (java_complete_expand_methods): Generate instinit$, simplified code.
3752         (build_dot_class_method): Eliminated unnecessary locals. Use
3753         encapsulate_with_try_catch, removed unnecessary code.
3754         (fix_constructors): New local iii. Use build_instinit_invocation.
3755         (patch_method_invocation): Added comment.
3756         (maybe_use_access_method): Don't consider instinit$.
3757         (find_applicable_accessible_methods_list): Shorten the search for
3758         instinit$ too.
3759         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
3760         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
3761         (patch_throw_statement): Likewise. Fixed typo.
3762
3763 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
3764
3765         Revert:
3766         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3767         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3768         ASM_FINAL_SPEC.
3769         (lang_specific_pre_link): Use set_input to set input_filename.
3770         Append `main' here.
3771         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3772         (main): Fix definition.
3773         Strip `main' from classname.
3774         Fixes PR java/227.
3775
3776 2001-08-11  Zack Weinberg  <zackw@panix.com>
3777
3778         * lex.h: Don't include setjmp.h.  Don't define
3779         SET_FLOAT_HANDLER or prototype set_float_handler.
3780
3781 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3782
3783         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
3784         `poplevel' in the right order.
3785
3786 2001-08-09  Richard Henderson  <rth@redhat.com>
3787
3788         * Make-lang.in (class.o): Depend on TARGET_H.
3789         * class.c (emit_register_classes): Use target hooks instead of
3790         assemble_constructor and assemble_destructor.
3791
3792 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
3793
3794         * check-init.c (flags.h): Include
3795         (check_init): Don't report uninitialized static class
3796         initialization flags, don't free bit index when doing static class
3797         initialization optimization.
3798         (check_for_initialization): Return type changed to `unsigned int.'
3799         (attach_initialized_static_class): New function.
3800         * class.c (add_method_1): Create the initialized static class
3801         table if necessary.
3802         (finish_class): Always emit deferred inline methods.
3803         * decl.c (emit_init_test_initialization): Moved to expr.c
3804         (complete_start_java_method): Don't traverse
3805         DECL_FUNCTION_INIT_TEST_TABLE.
3806         (lang_mark_tree): Mark hash tables in function decls.
3807         * expr.c (emit_init_test_initialization): Moved from decl.c.
3808         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
3809         initialization flag, set DECL_CONTEXT and
3810         LOCAL_CLASS_INITIALIZATION_FLAG.
3811         (java_lang_expand_expr): Emit initialization code for static class
3812         initialized flags when entering block, if necessary.
3813         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
3814         * java-tree.h (flag_optimize_sci): New global variable declaration.
3815         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
3816         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
3817         (LOCAL_FINAL_P): Fixed typo in comment.
3818         (FINAL_VARIABLE_P): Likewise.
3819         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
3820         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
3821         (struct lang_decl): New fields `ict', `smic' and `cif.'
3822         (check_for_initialization): New returned value for global.
3823         (attach_initialized_static_class): New global function.
3824         (STATIC_CLASS_INIT_OPT_P): New macro.
3825         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
3826         * lang.c (java_decode_option): Handle
3827         `-fno-optimize-static-class-initialization'
3828         * parse.y (start_complete_expand_method): New function.
3829         (java_expand_method_bodies): Likewise.
3830         (attach_init_test_initialization_flags): Likewise.
3831         (adjust_init_test_initialization): Likewise.
3832         (emit_test_initialization): Likewise.
3833         (java_complete_expand_methods): Nullify abstract and native method
3834         bodies.
3835         (java_complete_expand_method): New locals `fbody', `block_body'
3836         and `exception_copy.' Reorganized: directly return on empty method
3837         bodies, call `start_complete_expand_method', remember definitely
3838         initialized static class in function, don't expand method bodies.
3839         (java_expand_classes): Call `java_expand_method_bodies' before
3840         `finish_class' when compiling to native.
3841         (resolve_expression_name): Use `orig' after building outer class
3842         field access.
3843         (patch_invoke): Remember static method invocations.
3844
3845 2001-08-06  Richard Henderson  <rth@redhat.com>
3846
3847         * class.c (emit_register_classes): Pass a symbol_ref and priority
3848         to assemble_constructor.
3849
3850 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
3851
3852         * java-tree.h (all_class_filename): New macro.
3853         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
3854         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
3855         newly created IDENTIFIER_NODE to `all_class_filename.'
3856
3857 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
3858
3859         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
3860         Use ggc_add_tree_root to register roots.
3861
3862 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
3863
3864         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
3865         second operand calling check_init.
3866         * decl.c (complete_start_java_method): Swaped second and third
3867         arguments while creating WITH_CLEANUP_EXPR node.
3868         * jcf-write.c (generate_bytecode_insns): Use second operand
3869         instead of third when handling WITH_CLEANUP_EXPR.
3870         * parse.y (java_complete_lhs): Expand second operand of
3871         WITH_CLEANUP_EXPR nodes.
3872         (patch_synchronized_statement): Swaped second and third arguments
3873         while creating WITH_CLEANUP_EXPR node.
3874
3875 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
3876
3877         * parse.y (create_interface): Avoid cyclic inheritance report when
3878         syntax error encountered during class definition.
3879         Fixes PR java/2956
3880
3881 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3882
3883         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3884         ASM_FINAL_SPEC.
3885         (lang_specific_pre_link): Use set_input to set input_filename.
3886         Append `main' here.
3887         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3888         (main): Fix definition.
3889         Strip `main' from classname.
3890         Fixes PR java/227.
3891
3892 2001-07-18  Tom Tromey  <tromey@redhat.com>
3893
3894         For PR java/2812:
3895         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
3896         * lex.c (java_new_lexer): Use ICONV_CONST.
3897         (java_read_char): Likewise.
3898         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
3899         (jv-scan$(exeext)): Likewise.
3900
3901 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
3902
3903         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
3904         * parse.y (check_class_interface_creation): Allow `private' if the
3905         enclosing is not an interface.
3906         (create_interface): Interface tagged public if the enclosing
3907         context is an interface.
3908         (create_class): Class tagged public if the enclosing context
3909         is an interface.
3910         Fixes PR java/2959
3911
3912 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
3913
3914         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
3915         Fixes PR java/2665
3916
3917 2001-07-14  Tim Josling  <tej@melbpc.org.au>
3918
3919         * check-init.c (check_init): Remove references to EXPON_EXPR.
3920
3921 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
3922
3923         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
3924         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
3925         Fixes PR java/3602
3926
3927 2001-07-13  Tom Tromey  <tromey@redhat.com>
3928
3929         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
3930         invocation.
3931
3932 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
3933
3934         * parse.y (patch_method_invocation): Don't override primary if one
3935         is already provided, but let this$<n> be built. Fixed comment.
3936
3937 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
3938
3939         * parse.y (empty_statement:): Report empty statement error only
3940         when found at class declaration level.
3941         Fixes PR java/3635
3942
3943 2001-07-12  Tom Tromey  <tromey@redhat.com>
3944
3945         * expr.c (expand_load_internal): New function.
3946         (LOAD_INTERNAL): Use it.
3947
3948 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
3949
3950         * parse.y (verify_constructor_super): Compare anonymous class ctor
3951         args with `valid_method_invocation_conversion_p.'
3952         Fixes PR java/3285
3953
3954 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
3955
3956         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
3957         `-fsyntax-only.' Fixes PR java/3248
3958
3959 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
3960
3961         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
3962
3963 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
3964
3965         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
3966         current function is static. Fixes PR java/1970
3967
3968 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3969
3970         * parse.y (patch_method_invocation): Add enclosing context to ctor
3971         calls if necessary. Fixes PR java/2953
3972
3973 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
3974
3975         * parse.y (resolve_package): Abort if qualified expression member
3976         isn't right.
3977         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
3978         Fixes PR java/1391
3979
3980 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
3981
3982         * verify.c: Don't use // comments.
3983
3984 2001-07-05  Tom Tromey  <tromey@redhat.com>
3985
3986         * lang.c (flag_assume_compiled): Removed.
3987         * java-tree.h (flag_assume_compiled): Removed.
3988         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
3989         -fhash-synchronization, -fuse-divide-subroutine,
3990         -fcheck-references, -femit-class-file, -femit-class-files,
3991         -fassume-compiled.  Updated --encoding information.  Changed
3992         -foutput-class-dir to `-d'.
3993
3994 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
3995
3996         * jcf-parse.c (parse_class_file): Add lineno parameter to
3997         debug_start_source_file call.
3998
3999 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4000
4001         * gcj.texi: Use gpl.texi.
4002         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
4003         dependencies and use doc/include in search path.
4004
4005 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
4006
4007         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
4008         `this'.  If so, don't build instance initializers.
4009
4010 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
4011
4012         * parse.y (resolve_expression_name): Improved error message for
4013         inner class cases. Fixes PR java/1958
4014
4015 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4016
4017         * lang.c: #include diagnostic.h
4018         (lang_print_error): Add a `diagnostic_context *' parameter.
4019         (java_dummy_print): Likewise.
4020         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
4021
4022 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4023
4024         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
4025         * jcf.h (typedef struct JCF): New bitfield `finished.'
4026         (JCF_FINISH): Set `finished.'
4027         (JCF_ZERO): Reset `finished.'
4028         Fixes PR java/2633
4029
4030 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4031
4032         * parse.y (class_body_declaration:): Don't install empty instance
4033         initializers.
4034         Fixes PR java/1314
4035
4036 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4037
4038         * class.c (set_super_info): Call `set_class_decl_access_flags.'
4039         (set_class_decl_access_flags): New function.
4040         * java-tree.h (set_class_decl_access_flags): New prototype.
4041         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
4042         (parse_class_file): New local `decl_max_locals.' Take wide types
4043         into account to compute DECL_MAX_LOCALS.
4044         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
4045         imports on demand.
4046
4047 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
4048
4049         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
4050
4051 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4052
4053         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
4054         * parse.y (do_resolve_class): Moved comments out to leading comment
4055         section. Removed local `start', New local `_ht' and
4056         `circularity_hash.'  Record `enclosing' in hash table and search
4057         it to detect circularity.  Use `enclosing' as an argument to
4058         `lookup_cl.' Free the hash table when done.
4059
4060 2001-06-19  Tom Tromey  <tromey@redhat.com>
4061
4062         * lex.c (java_read_char): Disallow invalid and overlong
4063         sequences.  Fixes PR java/2319.
4064
4065 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
4066
4067         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
4068
4069 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4070
4071         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
4072         arguments accordingly.
4073
4074 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
4075
4076         * gcj.texi: Move contents to just after title page.
4077
4078 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
4079
4080         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
4081         builtin type.
4082         (patch_incomplete_class_ref): Build the class ref, build the class
4083         init if necessary, complete the tree.
4084         Fixes PR java/2605
4085
4086 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4087
4088         * parse.y (lookup_field_wrapper): Test `name' code.
4089         (resolve_qualified_expression_name): Test `qual_wfl' code.
4090         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
4091         handle `qual_wfl' by code.
4092         (maybe_build_primttype_type_ref): Test `wfl' code.
4093
4094 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4095
4096         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
4097         fdl.texi.
4098         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
4099         the dvi file in the java directory.
4100
4101 2001-05-25  Sam TH  <sam@uchicago.edu>
4102
4103         * gen-table.pl javaop.h jcf.h lex.h,
4104         parse.h: Fix header include guards.
4105
4106 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
4107
4108         * jv-scan.c (version): Update copyright year.
4109
4110 2001-05-21  Per Bothner  <per@bothner.com>
4111
4112         * jcf-parse.c (read_class):  If class is from .class or .zip file
4113         and it's already been read, don't push/pop parser context.
4114
4115 2001-05-18  Per Bothner  <per@bothner.com>
4116
4117         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
4118         command line so the jvgenmain-generated main program comes first.
4119
4120 2001-05-15  Tom Tromey  <tromey@redhat.com>
4121
4122         * class.c (build_utf8_ref): Don't generate identifier based on
4123         utf8const contents.
4124
4125 2001-05-12  Richard Henderson  <rth@redhat.com>
4126
4127         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
4128         * expr.c (java_lang_expand_expr): Expand it.
4129         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
4130         calling build_exception_object_ref.
4131         * parse.y (catch_clause_parameter): Likewise.
4132         (build_dot_class_method): Likewise.
4133         (try_reference_assignconv): Likewise.
4134         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
4135         * jcf-write.c (generate_bytecode_insns): Likewise.
4136
4137 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4138
4139         * parse.y (build_unresolved_array_type): Set
4140         EXPR_WFL_QUALIFICATION on the newly created wfl.
4141         Fixes PR java/2538. Fixes PR java/2535.
4142
4143 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
4144
4145         * parse.y (fix_constructors): Removed unnecessary assignment to
4146         local. Moved assignment to `this$<n>', fixed comments and
4147         indentation.
4148         (build_wfl_wrap): Fixed indentation.
4149         Fixes PR java/2598, java/2579 and java/2658.
4150
4151 2001-05-03  Mo DeJong  <mdejong@redhat.com>
4152
4153         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4154         check for byte swap.
4155
4156 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
4157
4158         * expr.c (build_class_init): Move MODIFY_EXPR
4159         outside of COND_EXPR.  Remove variable `call'.
4160
4161 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4162
4163         * decl.c: NULL_PTR -> NULL.
4164         * jcf-write.c: Likewise.
4165
4166 2001-05-01  Tom Tromey  <tromey@redhat.com>
4167
4168         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
4169         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
4170         * gcj.texi: Updated copyright text.  Include fdl.texi.
4171         (Top): Link to new node.
4172
4173 2001-05-01  Per Bothner  <per@bothner.com>
4174
4175         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
4176
4177 2001-05-01  Per Bothner  <per@bothner.com>
4178
4179         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
4180         import_list contains the name, not the TREE_PURPOSE.
4181
4182 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4183
4184         * jcf-io.c (read_zip_member): Cast to long in comparison with
4185         signed value.
4186
4187         * jvspec.c (lang_specific_driver): Initialize variables.
4188
4189         * mangle.c (find_compression_record_match): Likewise.
4190
4191         * typeck.c (build_null_signature): Provide static prototype.  Mark
4192         parameter with ATTRIBUTE_UNUSED.
4193
4194         * verify.c (verify_jvm_instructions): Initialize variable.
4195
4196 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4197
4198         * parse.y (do_resolve_class): Check for cyclic inheritance during
4199         inner class resolution.
4200
4201 2001-04-27  Per Bothner  <per@bothner.com>
4202
4203         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
4204         while iterating, since that could cause gc to lose stuff.
4205
4206 2001-04-26  Per Bothner  <per@bothner.com>
4207
4208         Fix method search wrt scope of inner classes to match JLS2.
4209         * typeck.c (build_null_signature):  New static function.
4210         (has_method):  New function.  Uses build_null_signature and lookup_do.
4211         * java-tree.h (has_method):  New declaration.
4212         * parse.y (find_applicable_accessible_methods_list):  Do not search
4213         context of inner classes here.
4214         (patch_method_invocation):  Search scope, ie. current and outer clases,
4215         for method matching simple name, to find class.
4216
4217 2001-04-26  Per Bothner  <per@bothner.com>
4218
4219         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
4220         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
4221
4222         * constants.c (find_methodref_with_class_index):  New function.
4223         (find_methodref_index):  Use find_methodref_with_class_index.
4224         * java-tree.h (find_methodref_with_class_index):  New declaration.
4225         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
4226         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
4227         If context changed from interface to class, don't use invokeinterface.
4228
4229 2001-04-25  Per Bothner  <per@bothner.com>
4230
4231         * verify.c (verify_jvm_instructions):  For field instructions,
4232         check that field index is valid.  For invoke instructions, check that
4233         method index is valid.
4234
4235 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
4236
4237         * config-lang.in (target_libs): Copy from $libgcj_saved.
4238
4239 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4240
4241         * decl.c (init_decl_processing): Add new class "protectionDomain"
4242         field.
4243         * class.c (make_class_data): Set initial value for "protectionDomain".
4244
4245 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4246
4247         * jvspec.c (lang_specific_driver): Fix memory allocation
4248         deficit, by using concat in lieu of xmalloc/sprintf.
4249
4250 2001-04-20  Per Bothner  <per@bothner.com>
4251
4252         Fixes to compile multiple .class files at once.
4253         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
4254         * java-tree.h (CLASS_PARSED_P):  New macro.
4255         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
4256         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
4257         (read_class):  Avoid some code duplication.
4258         Don't call JCF_FINISH for a .class file - might be needed later.
4259         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
4260         rather than CLASS_LOADED_P, since latter implies class laid out.
4261         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
4262         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
4263
4264 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4265
4266         * Make-lang.in (java/boehm.o): Depend on toplev.h.
4267
4268         * boehm.c: Include toplev.h.
4269
4270 2001-04-06  Tom Tromey  <tromey@redhat.com>
4271             Alexandre Petit-Bianco  <apbianco@redhat.com>
4272
4273         Fix for PR gcj/1404 and PR gcj/2332:
4274         * parse.y (build_array_from_name): If we use the type_wfl then
4275         accumulate dimensions from the original type as well.
4276         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
4277
4278 2001-04-06  Tom Tromey  <tromey@redhat.com>
4279
4280         * parse.y (analyze_clinit_body): Return true if the second operand
4281         of a METHOD_EXPR is nonzero.
4282
4283 2001-04-06  Tom Tromey  <tromey@redhat.com>
4284
4285         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
4286         directory.
4287         ($(srcdir)/java/parse.c): Likewise.
4288
4289 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
4290
4291         * gcj.texi: Use `which-gcj' instead of `which-g77.'
4292         (version-gcc): Initialized.
4293         (which-gcj): Likewise.
4294
4295 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4296
4297         * java-tree.h (struct lang_decl): New macro
4298         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
4299         * parse.y (build_instance_initializer): New function.
4300         (add_instance_initializer): Use it.
4301         (java_fix_constructors): Set `current_class' before fix pass.
4302         (fix_constructors): Just return if already fixed. Move `super()'
4303         invocation ahead. Use `build_instance_initializer.'
4304         Fixes PR java/1315.
4305
4306 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
4307
4308         * parse.y (resolve_qualified_expression_name): Pass field's
4309         DECL_CONTEXT to `not_accessible_p.'
4310         (not_accessible_p): Changed parameters order in `inherits_from_p'
4311         invocation.
4312
4313 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
4314
4315         * lang-options.h: Add flag_check_references.
4316
4317 2001-04-04  Per Bothner  <per@bothner.com>
4318
4319         * java-tree.h (CONSTANT_VALUE_P):  New macro.
4320         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
4321         * parse.y (maybe_build_class_init_for_field):  New static function.
4322         (resolve_expression_name, resolve_field_access):  Use
4323         maybe_build_class_init_for_field instead of build_class_init
4324         This does not do the init if the field is compile-time-constant.
4325         (resolve_field_access):  Simplify.
4326
4327         * parse.y (fold_constant_for_init):  Merge test into switch.
4328
4329 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
4330
4331         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
4332         on gansidecl.h.
4333         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
4334
4335 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
4336
4337         * expr.c (pop_type_0): Save the result of the first
4338         lang_printable_name call in a scratch buffer, so it
4339         won't be clobbered by the second call.
4340
4341 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
4342
4343         * parse-scan.y (array_type:): Rewritten.
4344         (type_declaration:): `empty_statement' replaces `SC_TK.'
4345         (class_member_declaration:): `empty statement' added.
4346         (method_body:): Simplified.
4347         (static_initializer:): Likewise.
4348         (primary_no_new_array:): Use `type_literals.'
4349         (type_literals:): New rule.
4350         (dims:): Set and update `bracket_count.'
4351         Fixes PR java/1074. Fixes PR java/2412.
4352
4353 2001-03-28  Hans Boehm  <boehm@acm.org>
4354
4355         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
4356         (get_boehm_type_descriptor): Set type on returned value to be a
4357         pointer length integer.
4358
4359 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4360
4361         * expr.c (pop_type_0): Call `concat' rather than building the
4362         string manually.
4363         (pop_type): Add format specifier in call to `error'.
4364
4365         * parse.y (patch_method_invocation): Avoid casting away
4366         const-ness.
4367
4368 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
4369
4370         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
4371
4372 2001-03-28  Richard Henderson  <rth@redhat.com>
4373
4374         IA-64 ABI Exception Handling:
4375         * Make-lang.in (except.o): Don't depend on eh-common.h.
4376         * check-init.c (check_init): Handle EXC_PTR_EXPR.
4377         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
4378         [soft_exceptioninfo_call_node]: Remove.
4379         [eh_personality_libfunc, lang_eh_runtime_type]: New.
4380         (end_java_method): No emit_handlers.
4381         * except.c (java_set_exception_lang_code): Remove.
4382         (method_init_exceptions): Don't call it.
4383         (prepare_eh_table_type): No CATCH_ALL_TYPE.
4384         (build_exception_object_ref): New.
4385         (expand_end_java_handler): Update for except.h name changes.
4386         (emit_handlers, expand_resume_after_catch): Remove.
4387         * expr.c (java_lang_expand_expr): Update for except.h name changes.
4388         (process_jvm_instruction): Use build_exception_object_ref.
4389         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
4390         (soft_exceptioninfo_call_node): Remove.
4391         (build_exception_object_ref): Declare.
4392         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
4393         soft_exceptioninfo_call_node.  Move processing ...
4394         [EXC_PTR_EXPR]: ... here.
4395         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
4396         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
4397         (source_end_java_method): No java_set_exception_lang_code or
4398         emit_handlers.
4399         (build_dot_class_method): Use build_exception_object_ref.
4400         (try_reference_assignconv): Check EXC_PTR_EXPR not
4401         soft_exceptioninfo_call_node.
4402
4403 2001-03-28  Richard Henderson  <rth@redhat.com>
4404
4405         * java-tree.h (throw_node): Define as a single member of
4406         java_global_trees instead of a separate array.
4407         (JTI_THROW_NODE): New.
4408         * decl.c (throw_node): Don't declare.
4409         (init_decl_processing): Init a scalar throw_node.
4410         Don't register it for gc.
4411         * check-init.c (check_init): Reference scalar throw_node.
4412         * expr.c (build_java_athrow): Likewise.
4413         * jcf-write.c (generate_bytecode_insns): Likewise.
4414         * parse.h (BUILD_THROW): Likewise.
4415
4416 2001-03-28  Richard Henderson  <rth@redhat.com>
4417
4418         * decl.c (end_java_method): Do not save and restore
4419         flag_non_call_exceptions.
4420         * parse.y (source_end_java_method): Likewise.
4421         * lang.c (flag_exceptions): Don't declare.
4422         (java_init_options): Set flag_non_call_exceptions.  Set
4423         flag_exceptions here ...
4424         (java_init): ... not here.
4425
4426 2001-03-27  Richard Henderson  <rth@redhat.com>
4427
4428         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
4429         exceptions_via_longjmp.
4430
4431         * lang.c (flag_new_exceptions): Don't declare it.
4432         (java_init_options): Or set it.
4433
4434 2001-03-27  Richard Henderson  <rth@redhat.com>
4435
4436         * decl.c (end_java_method): Rename asynchronous_exceptions to
4437         flag_non_call_exceptions.
4438         * parse.y (source_end_java_method): Likewise.
4439
4440 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4441
4442         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
4443
4444 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
4445
4446         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
4447
4448 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
4449
4450         * parse.y (find_as_inner_class): Follow current package
4451         indications not to mistakingly load an unrelated class.
4452
4453 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4454
4455         * constants.c (PUTN): Use memcpy, not bcopy.
4456
4457         * lex.c (java_read_char): Use memmove, not bcopy.
4458
4459         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
4460
4461 2001-03-23  Per Bothner  <per@bothner.com>
4462
4463         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
4464         macro for better error pin-pointing.
4465         * java-tree.h:  Fix typo in comment.
4466
4467         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
4468         Don't include jsr/goto in exception range.
4469         Check if start and end of exception range are the same (also TRY_EXPR).
4470         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
4471         However, do emit the following goto even if try_block is empty.
4472         Defer freeing exception_decl until after the finalizer, to make
4473         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
4474
4475         * parse.y (java_complete_lhs):  If the try-clause is empty, just
4476         return the finally-clause and vice versa.
4477
4478 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
4479
4480         * gcj.texi (Input Options): documented the check for attribute
4481         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
4482         * java-tree.h (flag_force_classes_archive_check): Declared extern.
4483         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
4484         (jcf_parse): Check for the right classes archive if necessary.
4485         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
4486         (jcf_parse_fields): Fixed indentation.
4487         * jcf-write.c (append_gcj_attribute): New function.
4488         (generate_classfile): Compute the attribute count, invoke
4489         `append_gcj_attribute'.
4490         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
4491         turned into bit-fields. New bit-field `right_zip.'
4492         (JCF_ZERO): Set `right_zip' to zero.
4493         * lang-options.h (-fforce-classes-archive-check): Added flag.
4494         * lang.c (flag_force_classes_archive_check): New flag.
4495         (lang_f_options): New entry `force-classes-archive-check.'
4496         Fixes PR java/1213.
4497
4498 2001-02-07  Andrew Haley  <aph@redhat.com>
4499
4500         * gcj.texi (Configure-time Options): Add -fcheck-references.
4501         * expr.c (build_java_indirect_ref): New function.
4502         (java_check_reference): New function.
4503         (build_java_array_length_access): Use build_java_indirect_ref to
4504         check for null references.
4505         (build_java_arrayaccess): Likewise.
4506         (build_get_class): Likewise.
4507         (build_field_ref): Likewise.
4508         (invoke_build_dtable): Likewise.
4509         (build_invokeinterface): Likewise.
4510         * lang.c (lang_f_options): Add flag_check_references.
4511         * jvspec.c (jvgenmain_spec): Add flag_check_references.
4512         * java-tree.h (flag_check_references): New variable.
4513         * lang.c (flag_check_references): Likewise.
4514         * parse.y (patch_invoke): Use java_check_reference.
4515         (patch_assignment): Allow for extra nesting in
4516         _Jv_CheckArrayStore.
4517
4518 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
4519
4520         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
4521         * lex.c (cxx_keywords): Likewise.
4522
4523 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
4524
4525         * parse.y (qualify_ambiguous_name): Broaden `length'
4526         recognition. Help MODIFY_EXPR be resolved as expression names.
4527         Fixes PR java/2066. Fixes PR java/2400.
4528
4529 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
4530
4531         * gjavah.c (process_file): Mark interface definitions with
4532         "__attribute__ ((java_interface))".
4533
4534 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
4535
4536         * class.c (layout_class): Fixed push_super_field's second
4537         argument. Fixes PR java/2333.
4538         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
4539         too early to lay innerclasses out.
4540
4541 2001-03-20  Tom Tromey  <tromey@redhat.com>
4542             Alexandre Petit-Bianco <apbianco@redhat.com>
4543
4544         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
4545         inside an array reference. Insertion of the array store check
4546         rewritten. Fixes PR java/2299.
4547
4548 2001-03-20  Tom Tromey  <tromey@redhat.com>
4549
4550         * lex.c (java_read_unicode): Only accept leading `u's.
4551
4552 2001-03-20  Tom Tromey  <tromey@redhat.com>
4553
4554         * jcf-parse.c (read_class): Initialize `class'.
4555
4556 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4557
4558         * jcf_parse.c (jcf_parse): Eliminate unused variable.
4559
4560 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4561
4562         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
4563         (layout_class): Likewise.
4564         (layout_class_method): Likewise.
4565         (emit_register_classes): Likewise.
4566         * decl.c (builtin_function): Likewise.
4567         (give_name_to_locals): Likewise.
4568
4569 2001-03-19  Per Bothner  <per@bothner.com>
4570
4571         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
4572         before trying to load an inner class.
4573
4574         Fixes to process to command-line .class files in two passes.
4575         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
4576         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
4577         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
4578         * class.c (is_compiled_class):  Fix for renamed flag.
4579         * parse.y (maybe_create_class_interface_decl):  Likewise.
4580         * jcf-parse.c (yyparse):  Also set if compiling .class files.
4581         * jcf-parse.c (read_class);  Read current_class.
4582         (jcf_parse):  Make static.
4583         (load_inner_classes):  New function, with code moved from jcf_parse,
4584         because we need to inner classes after the command-line files are read.
4585         (yyparse):  Set finput to NULL when it doesn't need to be closed.
4586         Reduce use of main_jcf (basically only for archive) and
4587         use finput instead of main_jcf->read_state.
4588         Inline jcf_figure_file_type into yyparse.
4589         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
4590         Defer load_inner_classes and parse_class_file to a second pass,
4591         after we've correctly mapped command-line .clas fiels to classes.
4592         (jcf_figure_file_type):  Removed.
4593         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
4594         (JCF_ZERO):  Also clear zipd field.
4595         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
4596
4597 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
4598
4599         * jcf-parse.c (yyparse): Change ch from char * to char.
4600
4601 2001-03-19  Per Bothner  <per@bothner.com>
4602
4603         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
4604         Add constructed filelist-file at end, following -xjava.  Thus any .o
4605         and library files are not affected by the -xjava.  Also wrap
4606         explicit @FILE with -xjava and -xnone.
4607
4608 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
4609
4610         * class.c (build_static_field_ref): Call make_decl_rtl() after
4611         setting the DECL_EXTERNAL flag.
4612
4613 2001-03-17  Per Bothner  <per@bothner.com>
4614
4615         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
4616
4617         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
4618         when result is is needed (target is STACK_TARGET).
4619
4620         * parse.h (JDEP_SOLV):  Removed.
4621         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
4622
4623         * parse.y (incomplete_class_list): Removed.
4624         (obtain_incomplete_type): Don't use or set incomplete_class_list.
4625         It doesn't work if resolve_class changes the name of an array type
4626         that is on the list and then someone else looks for the modified name.
4627         Also, seems liable to break when compiling multiple source files at
4628         once.  So the simplest is to just remove incomplete_class_list -
4629         it is only a minor space win and it is not even clear it saves time.
4630
4631         * parse.y (resolve_class):  Remove unneeded promote_type.
4632
4633 2001-03-15  Per Bothner  <per@bothner.com>
4634
4635         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
4636         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
4637         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
4638         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
4639
4640         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
4641         * parse.y (java_expand_classes):  Likewise.
4642
4643         * parse.y (expand_start_java_method):  Was only called once and had a
4644         misleading name, so inline in caller java_complete_expand_method.
4645         (enter_a_block):  Likewise inline in enter_block and remove.
4646
4647         Remove junk from when gcc/java was created (by copying from C/C++).
4648         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
4649         (struct binding_level):  Remove fields keep, keep_if_subblocks,
4650         more_cleanups_ok, have_cleanups (which have never been used).
4651         (pushlevel, poplevel):  Remove related useless code.
4652
4653         * class.c (make_class_data):  The class_dtable_decl (i.e. the
4654         vtable for Class) should be external, except when compiling Class.
4655
4656         * jvspec.c (lang_specific_driver):  Fix -C handling.
4657         Check -save-temps to see if temp @FILE should be deleted.
4658         Follow-up to/fix for February 16 patch.
4659
4660         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
4661         (type_stack_dup):  Remove no-longer neded error check.
4662
4663 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
4664
4665         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
4666         to 'for_pointer'. If this type is for a pointer (argument) mangling,
4667         don't surround the element with 'N..E' if the type name is
4668         unqualified.
4669
4670 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4671
4672         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
4673         DECL_RTL_SET_P, etc.
4674         (make_method_value): Likewise.
4675         (get_dispatch_table): Likewise.
4676
4677         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4678
4679 2001-03-07  Tom Tromey  <tromey@redhat.com>
4680
4681         * config-lang.in (lang_requires): Define.
4682
4683 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
4684
4685         * typeck.c (convert): Check flag_unsafe_math_optimizations,
4686         not flag_fast_math.
4687
4688 2001-03-05  Per Bothner  <per@bothner.com>
4689
4690         Fix a problem where rest_of_decl_compilation applied to
4691         class_dtable_decl causes problems because it was done too early,
4692         before output file was opened.
4693         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
4694         * class.c (class_dtable_decl):  Add macro - element of class_roots.
4695         (make_class_data):  Define class_dtable_decl.
4696         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
4697
4698 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4699
4700         * java/class.c, java/decl.c, java/java-tree.h: Replace all
4701         uses of 'boolean' with 'bool'.
4702
4703 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4704
4705         * lang-specs.h: Add zero initializer for cpp_spec field to all
4706         array elements.
4707
4708 2001-02-16  Per Bothner  <per@bothner.com>
4709
4710         Handle compiling multiple input files at once, and @FILE syntax.
4711         * gcj.texi:  Updated documentation to match.
4712         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
4713         * jcf-parse.c (parse_source_file):  Split into ...
4714         (parse_source_file_1):  New function - and:
4715         (parse_source_file_2):  New function.
4716         (yyparse):  On -ffilelist-file, open and scan named file.
4717         On first pass over files, only do parse_source_file_1.
4718         A new second pass calls parse_source_file_2 for each file to compile.
4719         (init_jcf_parse):  Call init_src_parse.
4720         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
4721         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
4722         as multiple input file combined in one compilation.
4723         * lang-options.h:  Add -ffilelist-file
4724         * lang.c (flag_filelist_file):  New flag variable.
4725         (lang_f_options):  Handle -ffilelist-file.
4726         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
4727         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
4728         gclass_list - use global fields of src_parse_roots instead.
4729         * parse.y (src_parse_roots):  New array.
4730         (incomplete_class_list, gclass_list):  New macros.
4731         (push_parser_context, java_pop_parser_context,
4732         java_parser_context_resume):  Don't fiddle with deleted fields.
4733         (various):  Use incomplete_class gclass_list and global macros
4734         instead of parse_ctxt fields - the lists are global.
4735         (init_src_parse):  New function.
4736
4737 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4738
4739         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
4740
4741 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
4742
4743         * parse.y (check_inner_class_access): Moved declaration of local
4744         `enclosing_decl_type' to the right location.
4745
4746 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
4747
4748         * parse.y (parser_check_super_interface): Don't call
4749         check_pkg_class_access for an inner interface.
4750         (parser_check_super): Don't call check_pkg_class_access for inner
4751         class.
4752         (do_resolve_class): Simplify enclosing type loop. Don't call
4753         check_pkg_class_access if CL and DECL are not set.
4754         (find_in_imports_on_demand): Set DECL if class_type needed to be
4755         loaded. Don't call check_pkg_class_access for an inner class.
4756         (check_inner_class_access): Rewritten to implement member access
4757         rules as per spec 6.6.1.
4758         (check_pkg_class_access): Handle the empty package correctly.
4759         (in_same_package): New function. Determine if two classes are in the
4760         same package.
4761
4762 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
4763
4764         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
4765         method into array types.
4766         * parse.y (patch_method_invocation): Bypass access check on clone call
4767         to array instance.
4768
4769 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
4770
4771         * expr.c (build_instanceof): Check for arrays when trying fold to
4772         false.
4773
4774 2001-02-15  Jim Meyering  <meyering@lucent.com>
4775
4776         * Make-lang.in (java.install-common): Depend on `installdirs'.
4777         (java.install-info): Likewise.
4778
4779 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
4780
4781         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
4782
4783 2001-02-14  Tom Tromey  <tromey@redhat.com>
4784             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4785
4786         Fix for PR java/1261.
4787         * typeck.c (build_java_array_type): Add public `clone' method to
4788         arrays.
4789         * parse.y (resolve_qualified_expression_name): Use current_class
4790         when checking for inaccessibility.
4791         (patch_method_invocation): Fixed error message when accessibility
4792         denied.  Added `from_super' argument.
4793
4794 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
4795
4796         * parse.y (resolve_class): Don't build a fake decl. Use the one
4797         already built.
4798         * typeck.c (build_java_array_type): Build and assign decl to array
4799         type.
4800
4801 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
4802
4803         * parse.y (not_accessible_p): Changed leading comment. Added extra
4804         `where' argument. Use it to enforce protected access rules.
4805         (resolve_qualified_expression_name): Added extra argument to
4806         not_accessible_p.
4807         (patch_method_invocation): Use argument `primary' to provide
4808         not_accessible_p with an extra argument.
4809         (lookup_method_invoke): Added extra argument to not_accessible_p.
4810         (search_applicable_method_list): Likewise.
4811
4812 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
4813
4814         * parse.y (resolve_qualified_expression_name): Try to resolve as
4815         an inner class access only if `decl' is a TYPE_DECL.
4816
4817 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4818
4819         * decl.c (classdollar_identifier_node): Initialize.
4820         * java-tree.h (enum java_tree_index): New entry
4821         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
4822         (classdollar_identifier_node): New macro.
4823         (ID_CLASSDOLLAR_P): Likewise.
4824         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
4825         (build_dot_class_method_invocation): Likewise.
4826         (find_applicable_accessible_methods_list): `class$' can't be
4827         inherited.
4828
4829 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
4830
4831         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
4832
4833 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4834
4835         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
4836         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
4837         gone.
4838
4839 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4840
4841         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
4842         outside of the `__U' sequence too.
4843         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
4844         sequence too.
4845
4846 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
4847
4848         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
4849
4850 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4851
4852         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
4853         (JVGENMAIN_OBJS): Likewise.
4854         * java-tree.h (append_gpp_mangled_name): New prototype.
4855         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
4856         Removed cast calling `gcc_add_root.'
4857         * jvgenmain.c (mangle_obstack): New global, initialized.
4858         (main): Use it.
4859         (do_mangle_class): Constify local `ptr.'
4860         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
4861         append_gpp_mangle_name and update `count' if necessary.
4862         Use `mangle_obstack.'
4863         * mangle.c (append_unicode_mangled_name): Removed.
4864         (append_gpp_mangled_name): Likewise.
4865         (unicode_mangling_length): Likewise.
4866         (mangle_member_name): Return type set to `void.'
4867         (mangle_field_decl): Don't append `U' in escaped names.
4868         (mangle_method_decl): Likewise.
4869         (mangle_member_name): Just use `append_gpp_mangled_name.'
4870         * mangle_name.c: New file.
4871
4872 2001-02-07  Per Bothner  <per@bothner.com>
4873
4874         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
4875
4876         * check-init.c (check_init):  Don't call done_alternative after
4877         processing loop code, as a LOOP_EXPR never terminates normally.
4878
4879 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
4880
4881         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
4882
4883 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4884
4885         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
4886         DECLs.
4887
4888 2001-02-06  Tom Tromey  <tromey@redhat.com>
4889
4890         * lex.c (java_new_lexer): Longer error message.
4891
4892 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
4893             Alexandre Petit-Bianco  <apbianco@cygnus.com>
4894
4895         * typeck.c (build_prim_array_type): Added leading comment.
4896         (build_java_array_type): Moved locals out of
4897         block. Always create the `data' field, fixed alignment to match
4898         C++.
4899
4900 2001-02-04  Tom Tromey  <tromey@redhat.com>
4901
4902         * expr.c (java_lang_expand_expr): Don't bother recomputing
4903         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
4904         Fixes PR java/1866.
4905
4906 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4907
4908         * parse.y (process_imports): Save the original name of the import
4909         for better error report.
4910
4911 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
4912
4913         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
4914         of macros used when compiling jvspec.c.
4915         * jvspec.c (lang_specific_driver): Link with the shared
4916         libgcc by default.
4917
4918 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4919
4920         * check-init.c (check_init): Call internal_error instead of fatal.
4921         * expr.c (java_lang_expand_expr): Likewise.
4922         * jcf-parse.c (get_constant): Likewise.
4923         * mangle.c (java_mangle_decl): Likewise.
4924         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
4925         (operator_string): Likewise.
4926         * check-init.c (check_init): Call abort instead of fatal.
4927         * class.c (build_class_ref): Likewise.
4928         * constants.c (write_constant_pool): Likewise.
4929         * decl.c (start_java_method): Likewise.
4930         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
4931         (java_stack_dup, encode_newarray_type): Likewise.
4932         (build_java_array_length_access): Likewise.
4933         (build_java_check_indexed_type, expand_java_pushc): Likewise.
4934         (build_java_soft_divmod, build_invokeinterface): Likewise.
4935         * java-tree.h (INNER_CLASS_P): Likewise.
4936         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
4937         (give_name_to_class, get_class_constant): Likewise.
4938         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
4939         (find_constant_index, generate_bytecode_conditional): Likewise.
4940         (generate_bytecode_insns, perform_relocations): Likewise.
4941         * lex.c (java_unget_unicode, java_lex): Likewise.
4942         * mangle.c (mangle_type, mangle_record_type): Likewise.
4943         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
4944         (finish_mangling): Likewise.
4945         * parse.h (MARK_FINAL_PARMS): Likewise.
4946         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
4947         (obtain_incomplete_type, java_complete_class): Likewise.
4948         (java_check_regular_methods, java_complete_expand_method): Likewise.
4949         (cut_identifier_in_qualified, check_deprecation): Likewise.
4950         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
4951         (java_complete_lhs, lookup_name_in_blocks): Likewise.
4952         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
4953         * typeck.c (set_local_type, parse_signature_type): Likewise.
4954         (parse_signature_string, build_java_signature): Likewise;
4955         (set_java_signature): Likewise.
4956         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
4957         * class.c (add_method): Call fatal_error instead of fatal.
4958         (build_static_field_ref): Likewise.
4959         * expr.c (build_known_method_ref, expand_invoke): Likewise.
4960         * jcf-parse.c (get_constant, jcf_parse): Likewise.
4961         * lex.c (java_new_new_lexer): Likewise.
4962         * jv-scan.c (main): Likewise.
4963         (fatal_error): Renamed from fatal.
4964         * jcf-parse.c (yyparse): Call fatal_io_error instead of
4965         pfatal_with_name.
4966         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
4967         (yyparse): Likewise.
4968         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
4969         * lex.c (java_get_line_col): Likewise.
4970         * jcf-parse.c (load_class): Make errors non-fatal.
4971         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
4972
4973 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
4974
4975         * jvgenmain.c (class_mangling_suffix): Remove unused string.
4976         (error): Remove unused function.
4977         (main): Don't use "__attribute__ alias" on generated class symbol.
4978
4979 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4980
4981         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
4982         argument.
4983         * parse.y (finish_method_declaration): Code accounting for WFLed
4984         method DECL_NAMEs deleted.
4985         (check_abstract_method_definitions): Likewise.
4986         (resolve_type_during_patch): Layout resolved type.
4987         * typeck.c (lookup_do): Removed unused local.
4988
4989 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
4990
4991         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
4992         * decl.c (init_decl_processing): Use integer_minus_one_node, not
4993         integer_negative_one_node.
4994         * expr.c (build_java_binop): Likewise.
4995
4996 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
4997
4998         * zextract.c (read_zip_archive): Read file_offset before writing
4999         zipd and consequently clobbering the header contents.
5000
5001 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5002
5003         * Make-lang.in: Remove all dependencies on defaults.h.
5004         * decl.c: Don't include defaults.h.
5005         * expr.c: Likewise.
5006         * parse.y: Likewise.
5007
5008 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5009
5010         * ChangeLog (2001-01-21): Fixed typo.
5011         * class.c (layout_class_method): Code accounting for WFLed
5012         method DECL_NAMEs deleted.
5013         * constant.c (find_methodref_index): Likewise.
5014         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
5015         * java-tree.h (DECL_FUNCTION_WFL): New macro.
5016         (struct lang_decl): New field `wfl'.
5017         (java_get_real_method_name): Prototype deleted.
5018         * mangle.c (mangle_method_decl): Code accounting for WFLed
5019         method DECL_NAMEs deleted.
5020         * parse.h (GET_METHOD_NAME): Macro deleted.
5021         * parse.y (reset_method_name): Deleted.
5022         (method_header): Set DECL_FUNCTION_WFL.
5023         (check_abstract_method_header): Code accounting for WFLed method
5024         DECL_NAMEs deleted.
5025         (java_get_real_method_name): Deleted.
5026         (check_method_redefinition): Code accounting for WFLed method
5027         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
5028         (java_check_regular_methods): Likewise.
5029         (java_check_abstract_methods): Likewise.
5030         (java_expand_classes): Don't call `reset_method_name.'
5031         (search_applicable_method_list): Use DECL_NAMEs instead of
5032         GET_METHOD_NAME.
5033         * typeck.c (lookup_do): Code accounting for WFLed method
5034         DECL_NAMEs deleted.
5035
5036 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
5037
5038         * lex.c (java_read_char): Check for EOF from getc first.
5039
5040 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5041
5042         * class.c (layout_class): Don't lay the superclass out if it's
5043         already being laid out.
5044         * jcf-parse.c (handle_innerclass_attribute): New function.
5045         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
5046         handle_innerclasses_attribute.
5047         (jcf_parse): Don't load an innerclasses if it's already being
5048         laid out.
5049         * jcf-write.c (append_innerclass_attribute_entry): Static
5050         `anonymous_name' and its initialization deleted. `ocii' and `ini'
5051         to be zero for anonymous classes.
5052
5053 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5054
5055         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
5056         necessary.
5057         * jcf-parse.c (set_source_filename): Use
5058         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
5059
5060 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5061
5062         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
5063         gets a unique asm name.
5064
5065 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5066
5067         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
5068         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5069         if necessary.
5070         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
5071         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
5072         * parse.y (lookup_package_type_and_set_next): Deleted.
5073         (resolve_package): Removed unnecessary code.
5074         (find_applicable_accessible_methods_list): `finit$' can't be
5075         inherited.
5076         * verify.c (pop_argument_types): Added missing prototype.
5077
5078 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
5079
5080         * config-lang.in: Disable java by default.
5081
5082 2001-01-23  Tom Tromey  <tromey@redhat.com>
5083
5084         * gcj.texi (Copying): New node.
5085         Added copyright information.
5086
5087 2001-01-21  Per Bothner  <per@bothner.com>
5088
5089         Various fixes to allow compiling a compressed .jar/.zip archive.
5090         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
5091         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
5092         (struct ZipDirectory):  New field zipf points to owning ZipFile.
5093         * jcf.h (struct ZipDirectory):  Add forward declaration.
5094         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
5095         Remove seen_in_zip and zip_offset fields.
5096         (JCF_SEEN_IN_ZIP):  New macro.
5097         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
5098         * jcf-io.c:  Change all ZipFileCache to ZipFile.
5099         (read_zip_member):  New function.
5100         (open_in_zip):  Call read_zip_member.
5101         * jcf-parse.c (find_in_current_zip):  Remove function.
5102         (read_class):  Merge in find_in_current_zip functionality.
5103         Call read_zip_member if needed.
5104         (parse_zip_file_entries):  Use read_zip_member.
5105         (process_zip_dir):  Update for removed and added JCF fields.
5106         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
5107
5108 2001-01-21  Per Bothner  <per@bothner.com>
5109
5110         Minor optimization of static ggc roots.
5111         * jcf-parse.c (parse_roots):  New static field.
5112         (current_field, current_method, current_file_list):  Replace by macros
5113         naming fields of parse_roots.
5114         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
5115         * class.c (class_roots):  New static field.
5116         (registered_class, fields_ident, info_ident, class_list):
5117         New macros naming fields of parse_roots.
5118         (build_static_field_ref):  Don't register roots here.
5119         (layout_class):  Static field list replaced by macro class_list.
5120         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
5121         Initialize fields_ident and info_ident here.
5122
5123 2001-01-21  Per Bothner  <per@bothner.com>
5124
5125         * jcf-parse.c (ggc_mark_jcf):  New function.
5126         (init_jcf_parse):  Register current_jcf as ggc root.
5127
5128 2001-01-21  Per Bothner  <per@bothner.com>
5129
5130         * lang.c (put_decl_node):  Print method's name.
5131
5132 2001-01-21  Per Bothner  <per@bothner.com>
5133
5134         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
5135         (verify_jvm_instructions):  Use it, for better error messages on loads.
5136
5137 2001-01-21  Per Bothner  <per@bothner.com>
5138
5139         * verify.c (merge_type_state):  Still may have to merge even if
5140         LABEL_VERIFIED (label).
5141
5142 2001-01-21  Per Bothner  <per@bothner.com>
5143
5144         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
5145         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
5146
5147 2001-01-19  Per Bothner  <per@bothner.com>
5148
5149         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
5150         if expeting an interface type.  Refines Tom's change of 2000-09-12.
5151
5152 2001-01-18  Per Bothner  <per@bothner.com>
5153
5154         * gcj.texi (Input Options): Mention .java files.
5155
5156 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5157
5158         * lang-options.h (-Wunsupported-jdk11): Removed.
5159         * lang.c (flag_not_overriding): Deleted.
5160         (flag_static_local_jdk1_1): Likewise.
5161         (lang_W_options): Removed "unsupported-jdk11" entry.
5162         * parse.y (java_check_methods): Removed dead code.
5163
5164 2001-01-17  Tom Tromey  <tromey@redhat.com>
5165
5166         Changes suggested by Per Bothner:
5167         * gcj.texi (Input Options): Don't mention input files.
5168         (Code Generation): Updated --main information.
5169         (Invoking jcf-dump): Mention that --javap is incomplete.
5170         From Alexandre Petit-Bianco:
5171         (Warnings): Don't mention -Wunsupported-jdk11.
5172         My stuff:
5173         (Compatibility): Mention JDK 1.2-ness of libraries.
5174         (Resources): Mention resources used when writing gcj.
5175
5176 2001-01-17  Tom Tromey  <tromey@redhat.com>
5177
5178         * gcj.texi: New file.
5179         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
5180         (java.info): Depend on gcj.info.
5181         (java/gcj.dvi): New target.
5182         (java.dvi): Depend on gcj.dvi.
5183         (java.install-info): Wrote.
5184
5185 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
5186
5187         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
5188         having called make_decl_rtl.
5189
5190 2001-01-14  Per Bothner  <per@bothner.com>
5191
5192         Various patches to emit better messages on verification errors.
5193         * expr.c (push_type_0):  Return error indication on stack overflow,
5194         instead of callinfg fatal.
5195         (push_type):  Now just call push_type_0 (nd fatal on overflow).
5196         (pop_type_0):  Return detailed error message (in a char** argument).
5197         (pop_type):  If pop_type_0 fails, print error message.
5198         (pop_argument_types):  Moved to verify.c.
5199         * verify.c (pop_argument_types):  Moved from expr.c.
5200         Return a (possible) error message, rather than void.
5201         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
5202         (verify_jvm_instruction):  Use new macros, improving error messages.
5203         For case OPCODE_astore use object_ptr_type_node.
5204         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
5205         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
5206
5207         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
5208         constant, return body without wrapper.  (Improves constant folding.)
5209         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
5210
5211 2001-01-13  Per Bothner  <per@bothner.com>
5212
5213         * expr.c (expand_java_field_op):  Assigning to a final field outside
5214         an initializer does not violate JVM spec, so should be warning, not
5215         error.  (Sun's verifier does not complain - though MicroSoft's does.)
5216
5217 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
5218
5219         * gjavah.c (version), jcf-dump.c (version): Update copyright year
5220         to 2001.
5221
5222 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
5223
5224         * parse.y (resolve_expression_name): Permit instance variables from
5225         enclosing context in super constructor call.
5226         (resolve_qualified_expression_name): Permit enclosing class's qualified
5227         "this" in super constructor call.
5228
5229 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5230
5231         * class.c (build_utf8_ref): Remove last argument in call to
5232         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5233         (build_class_ref): Likewise.
5234         (build_static_field_ref): Likewise.
5235         (get_dispatch_table): Likewise.
5236         (layout_class_method): Likewise.
5237         (emit_register_classes): Likewise.
5238         * constants.c (build_constant_data_ref): Likewise.
5239         * decl.c (builtin_function): Likewise.
5240         (create_primitive_vtable): Likewise.
5241         * expr.c (build_known_method_def): Likewise.
5242         (build_jni_stub): Likewise.
5243         (java_lang_expand_expr): Likewise.
5244
5245 2001-01-10  Tom Tromey  <tromey@redhat.com>
5246
5247         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
5248
5249 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5250
5251         * java-tree.h (lang_printable_name_wls): New prototype.
5252         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
5253         rather than `current_class' to print type name. Don't prepend type
5254         names when printing constructor names.
5255         (lang_printable_name_wls): New function.
5256         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
5257         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
5258         * parse.y (patch_method_invocation): Message tuned for constructors.
5259         (not_accessible_p): Grant `private' access from within
5260         enclosing contexts.
5261
5262 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5263
5264         All files with updated copyright when applicable.
5265         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
5266         * class.c (mangle_class_field): Function removed.
5267         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
5268         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
5269         (build_class_ref): Call `java_mangle_class_field' instead of
5270         `mangle_class_field.'
5271         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
5272         (layout_class): Call `java_mangle_decl' instead of
5273         `mangle_static_field.'
5274         (cxx_keywords): Initialized static array moved to `lex.c.'
5275         (layout_class_method): Changed leading comment. Simplified to
5276         call `java_mangle_decl.' Local `ptr' moved in for loop body.
5277         * decl.c (lang_mark_tree): Mark field `package_list.'
5278         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
5279         (struct lang_type): New field `package_list.'
5280         (unicode_mangling_length): Prototype removed.
5281         (append_gpp_mangled_name, append_gpp_mangled_classtype,
5282         emit_unicode_mangled_name): Likewise.
5283         (cxx_keyword_p): New prototype.
5284         (java_mangle_decl, java_mangle_class_field,
5285         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
5286         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
5287         `build_expr_wfl.'
5288         * jvgenmain.c (main_method_prefix): Global variable removed.
5289         (main_method_suffix): Likewise.
5290         (do_mangle_classname): New function.
5291         (main): Call it. Format changed to accommodate new mangling scheme.
5292         * lex.c: (utf8_cmp): Conditionally prototyped.
5293         (cxx_keywords): Moved from class.c, conditionally defined.
5294         (utf8_cmp, cxx_keyword_p): Likewise.
5295         * mangle.c (obstack.h, ggc.h): Included.
5296         (mangle_field_decl): New function.
5297         (mangle_method_decl, mangle_type, mangle_pointer_type,
5298         mangle_array_type, mangle_record_type,
5299         find_compression_pointer_match, find_compression_array_match,
5300         find_compression_record_match,
5301         find_compression_array_template_match, set_type_package_list,
5302         entry_match_pointer_p, emit_compression_string, init_mangling,
5303         finish_mangling, compression_table_add, mangle_member_name): Likewise.
5304         (mangle_obstack): New global.
5305         (MANGLE_RAW_STRING): New macro.
5306         (unicode_mangling_length): Turned static.
5307         (append_unicode_mangled_name): Renamed from
5308         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
5309         replaces `obstack', removed from the parameter list.
5310         (append_gpp_mangled_name): Turned static. `mangle_obstack'
5311         replaces parameter `obstack', removed from the parameter list. Call
5312         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
5313         (append_gpp_mangled_classtype): Removed.
5314         (compression_table, compression_next): New static variables.
5315         * parse.y (temporary_obstack): Extern declaration removed.
5316
5317 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5318
5319         * parse.y (patch_binop): Compute missing type in error situations.
5320
5321 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
5322
5323         * class.c (make_class_data): Push initial value for "arrayclass".
5324         * decl.c (init_decl_processing): Add new class field "arrayclass".
5325
5326 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
5327
5328         From patha@softlab.ericsson.se:
5329         * parse.y (switch_label): Use build, not build1, to construct
5330         DEFAULT_EXPR.
5331
5332 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5333
5334         * lang.c (lang_decode_option): Change -MA to -MP.
5335         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
5336         Update to new prototype; do quote targets.
5337         (jcf_dependency_write): Update.
5338
5339 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
5340
5341         Shorten primitive array allocation path:
5342         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
5343         to create new primitive arrays.
5344         * expr.c (build_newarray): If generating native code, call
5345         soft_newarray_node with a reference to the primitive TYPE identifier
5346         instead of type_value.
5347
5348 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
5349
5350         Fix for PRs gcj/312 and gcj/253:
5351         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
5352         dest if they arn't already.
5353         * class.c (layout_class): Call maybe_layout_super_class on
5354         superinterfaces also, but only if compiling from bytecode.
5355
5356         Fix for PR gcj/373:
5357         * parse.y (create_class): Set ACC_STATIC if class is declared in an
5358         interface.
5359
5360 2000-12-15  Tom Tromey  <tromey@redhat.com>
5361
5362         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
5363         set.
5364
5365 2000-12-14  Andrew Haley  <aph@redhat.com>
5366
5367         * boehm.c (mark_reference_fields): Change test to correctly detect
5368         bitmap overflow.
5369
5370 2000-12-15  Andreas Jaeger  <aj@suse.de>
5371
5372         * config-lang.in (lang_dirs): Added.
5373
5374 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5375
5376         * parse.y (end_artificial_method_body): Fixed undefined behavior.
5377         Credits go to rth for finding it.
5378
5379 2000-12-13  Mike Stump  <mrs@wrs.com>
5380
5381         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
5382
5383 2000-11-07  Tom Tromey  <tromey@cygnus.com>
5384
5385         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
5386         * lex.c (java_ignorable_control_p): Removed.
5387         (java_letter_or_digit_p): Removed.
5388         (java_start_char_p): New function.
5389         (java_read_char): Return `int', not `unicode_t'.  Changed
5390         callers.
5391         (java_read_unicode): Likewise.
5392         (java_read_unicode_collapsing_terminators): Likewise.
5393         (java_get_unicode): Likewise.
5394         (java_new_lexer): Initialize hit_eof.
5395         (java_parse_end_comment): Take `int' argument.
5396         (java_parse_doc_section): Likewise.
5397         (java_parse_escape_sequence): Don't allow backlash-newline.
5398         Return `int'.
5399         * lex.h (JAVA_DIGIT_P): Removed.
5400         (_JAVA_LETTER_OR_DIGIT_P): Removed.
5401         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
5402         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
5403         (JAVA_PART_CHAR_P): New macro.
5404         (UEOF): Now -1.
5405         (JAVA_CHAR_ERROR): Now -2.
5406         (java_lexer): New field `hit_eof'.
5407         * chartables.h: New file.
5408         * gen-table.pl: new file.
5409
5410 2000-11-20  Tom Tromey  <tromey@cygnus.com>
5411             Alexandre Petit-Bianco  <apbianco@cygnus.com>
5412
5413         * parse.y (java_complete_lhs): Only allow compound assignment of
5414         reference type if type is String.
5415
5416 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5417
5418         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
5419         jcf-path.c: Likewise.
5420
5421 2000-12-09  Anthony Green  <green@redhat.com>
5422
5423         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
5424         filestart and filename_length as int values.
5425
5426 2000-12-07  Mo DeJong  <mdejong@redhat.com>
5427
5428         * jcf-io.c (find_class): Correct the logic that tests to see if a
5429         .java file is newer than its .class file. The compiler was
5430         incorrectly printing a warning when file mod times were equal.
5431
5432 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
5433
5434         * jvgenmain.c: Use ISPRINT not isascii.
5435
5436 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5437
5438         * parse.y (end_artificial_method_body): Fixed typo.
5439
5440 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5441
5442         * parse.y (patch_method_invocation): Pick the correct enclosing
5443         context when creating inner class instances.
5444         Fixes gcj/332.
5445
5446 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
5447
5448         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5449         Update copyright year to 2000.
5450
5451 2000-11-23  Anthony Green  <green@redhat.com>
5452
5453         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
5454         Move current_file_list out of yyparse and make it static.
5455
5456         * expr.c: Declare quick_stack and tree_list_free_list as static
5457         (init_expr_processing): Register quick_stack and
5458         tree_list_free_list roots.
5459
5460 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5461
5462         * parse.y (build_outer_field_access): New local `decl_ctx', use
5463         it. Check for field's context and current class immediate outer
5464         context inheritance.
5465         (outer_field_access_p): Consider fields inherited from the last
5466         enclosing context.
5467         (build_access_to_thisn): Stop at the last enclosing context if
5468         necessary.
5469         Fixes gcj/367.
5470
5471 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
5472
5473         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
5474
5475 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
5476
5477         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
5478         scratch buffer.
5479
5480 2000-11-20  Tom Tromey  <tromey@cygnus.com>
5481
5482         * jv-scan.c (help): Document --complexity.
5483         (options): Added --complexity.
5484         (flag_complexity): New global.
5485         (main): Call `report'.
5486         * parse-scan.y (complexity): New global.
5487         (if_then_statement, if_then_else_statement,
5488         if_then_else_statement_nsi, switch_block_statement_group,
5489         while_expression, do_statement, for_begin, continue_statement,
5490         throw_statement, catch_clause, finally, method_invocation,
5491         conditional_and_expression, conditional_or_expression,
5492         conditional_expression): Update complexity.
5493         (reset_report): Reset complexity.
5494         (report): New function.
5495
5496 2000-11-20  Tom Tromey  <tromey@cygnus.com>
5497
5498         * lex.c (yylex): Added STRICT_TK case.
5499         * parse.y (STRICT_TK): Added.
5500         * parse-scan.y (STRICT_TK): Added.
5501         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
5502         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
5503         file.
5504         * keyword.h: Rebuilt.
5505         * keyword.gperf (strictfp): Added.
5506
5507 2000-11-20  Tom Tromey  <tromey@cygnus.com>
5508
5509         * lex.c (yylex): Recognize floating point constants with leading
5510         0.
5511
5512 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5513
5514         * java-tree.h (cyclic_inheritance_report): Constify.
5515         * parse.y (cyclic_inheritance_report): Likewise.
5516
5517 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
5518
5519         * parse.y (goal): Remove call to ggc_add_string_root.
5520
5521 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
5522
5523         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
5524         Create string in scratch buffer, then pass to build_string.
5525
5526 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5527
5528         * parse.y (issue_warning_error_from_context): Add
5529         ATTRIBUTE_PRINTF.
5530
5531 2000-11-11  Anthony Green  <green@redhat.com>
5532
5533         * jcf-parse.c (process_zip_dir): Add finput parameter.
5534         (jcf_figure_file_type): Call process_zip_dir with appropriate
5535         argument.
5536
5537 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5538
5539         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
5540         * jcf-parse.c (jcf_figure_file_type): Likewise.
5541
5542 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5543
5544         * parse.y (create_new_parser_context): Use memset () instead of
5545         bzero ().
5546
5547 2000-11-08  Tom Tromey  <tromey@cygnus.com>
5548
5549         * gjavah.c (process_file): Only include gcj/cni.h when generating
5550         CNI stubs.
5551
5552 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5553
5554         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
5555         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
5556         instead of bzero ().
5557
5558 2000-11-05  Tom Tromey  <tromey@cygnus.com>
5559
5560         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
5561         * lex.c (IS_ZERO): New define.
5562         (java_perform_atof): Error on floating point underflow.
5563
5564 2000-11-04  Tom Tromey  <tromey@cygnus.com>
5565
5566         * lex.c (java_parse_escape_sequence): Only read two octal
5567         characters if the first one is greater than 3.  Don't allow
5568         "octal" numbers to include the digits 8 or 9.
5569
5570 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
5571
5572         * Make-lang.in (java.distdir): Remove.
5573
5574 2000-11-03  Tom Tromey  <tromey@cygnus.com>
5575
5576         * Make-lang.in (java.dvi): New target.
5577         Partial fix for PR other/567.
5578
5579         * lang-options.h: Mention -Wout-of-date.
5580         * jcf-dump.c (flag_newer): New global.
5581         * gjavah.c (flag_newer): New global.
5582         * jcf-io.c (find_class): Only warn when flag_newer set.
5583         * lang.c (flag_newer): New global.
5584         (struct string_option): New declaration.
5585         (lang_W_options): New global.
5586         (process_option_with_no): New function.
5587         (lang_decode_option): Use it.
5588
5589         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
5590         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
5591         `$'.
5592
5593         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
5594         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
5595         * lex.c (java_read_unicode): Removed `term_context' argument.
5596         Recognize any number of `u' in `\u'.
5597         (java_read_unicode_collapsing_terminators): New function.
5598         (java_get_unicode): Use it.
5599         (java_lineterminator): Removed.
5600         (yylex): Produce error if character literal is newline or single
5601         quote.  Return if eof found in middle of `//' comment.  EOF in
5602         `//' comment is only an error if pedantic.
5603         (java_ignorable_control_p): New function.
5604         (java_parse_end_comment): Return if eof found in middle of
5605         comment.
5606         Include flags.h.
5607         * jv-scan.c (pedantic): New global.
5608
5609 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5610
5611         * parse.y (outer_field_access_p): Inherited fields aren't
5612         consider outer fields.
5613         (maybe_build_thisn_access_method): Use
5614         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
5615         (resolve_expression_name): Trigger an error if a static field
5616         is being accessed as an outer field.
5617
5618 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5619
5620         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
5621         Fixes gcj/365.
5622
5623 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
5624
5625         * Make-lang.in: Move all build rules here from Makefile.in,
5626         adapt to new context.  Wrap all rules that change the current
5627         directory in parentheses.  Expunge all references to $(P).
5628         When one command depends on another and they're run all at
5629         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
5630         all object-file generation rules.  Delete obsolete variables.
5631
5632         * Makefile.in: Delete.
5633         * config-lang.in: Delete outputs= line.
5634
5635 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5636
5637         * parse.y (patch_method_invocation): NULLify this_arg when already
5638         inserted.
5639         (maybe_use_access_method): Handle call to methods unrelated to the
5640         current class. Fixed comment.
5641         Fixes gcj/361.
5642
5643 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5644
5645        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
5646        scope.
5647
5648 2000-10-24  Tom Tromey  <tromey@cygnus.com>
5649
5650         * lex.c (java_new_lexer): Initialize new fields.  Work around
5651         broken iconv() implementations.
5652         (java_read_char): Swap bytes if required.  Use fallback decoder if
5653         required.
5654         (byteswap_init, need_byteswap): New globals.
5655         (java_destroy_lexer): Only close iconv handle if it is in use.
5656         * lex.h (java_lexer): New fields read_anything, byte_swap,
5657         use_fallback.
5658         Made out_buffer unsigned.
5659
5660 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5661
5662         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
5663         where an enclosing context can be set on the jdep.
5664         (do_resolve_class): Fixed identation.
5665
5666 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5667
5668         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
5669
5670         * jcf-reader.c (peek_attribute, skip_attribute): Only define
5671         when requested.
5672
5673         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
5674
5675         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
5676
5677 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5678
5679         * jcf-write.c (OP1): Update `last_bc'.
5680         (struct jcf_block): Fixed indentation and typo in comments.  New
5681         field `last_bc'.
5682         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
5683         follows `monitorenter'.
5684         * parse.y (patch_synchronized_statement): New local `tmp'. Call
5685         `patch_string'.
5686         Fixes gcj/232.
5687
5688 2000-10-16  Tom Tromey  <tromey@cygnus.com>
5689
5690         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
5691         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
5692         * lang-options.h: Added -MA, -MT, -MF..
5693         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
5694         (DEPEND_TARGET_SET): New macro.
5695         (DEPEND_FILE_ALREADY_SET): Likewise.
5696         (init_parse): Handle new flags.
5697         * jcf.h (jcf_dependency_print_dummies): Declare.
5698         * Make-lang.in (s-java): Added mkdeps.o.
5699         * Makefile.in (BACKEND): Added mkdeps.o.
5700         (../gcjh$(exeext)): Added mkdeps.o.
5701         (../jcf-dump$(exeext)): Added mkdeps.o.
5702         * jcf-depend.c: Include mkdeps.h.
5703         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
5704         add_entry): Removed.
5705         (jcf_dependency_reset): Rewrote.
5706         (dependencies): New global.
5707         (jcf_dependency_set_target): Rewrote.
5708         (jcf_dependency_add_target): Likewise.
5709         (jcf_dependency_add_file): Likewise.
5710         (munge): Removed.
5711         (print_ents): Removed.
5712         (jcf_dependency_write): Rewrote.
5713         (print_dummies): New global.
5714         (jcf_dependency_print_dummies): New function
5715         (jcf_dependency_write): Call deps_dummy_targets if required.
5716
5717 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5718
5719         * gjavah.c (add_class_decl): Removed unused variables `tname',
5720         `tlen' and `name_index'.
5721         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
5722         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
5723         in `wfl_operator' with value.
5724         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
5725         (jcf_figure_file_type): Fixed identation.
5726         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
5727         * parse.y (analyze_clinit_body): New function.
5728         (static_initializer:): Reset `current_static_block'.
5729         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
5730         `wfl_operator' with new value.
5731         (lookup_cl): Use EXPR_WFL_FILENAME.
5732         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
5733         analyze_clinit_body.
5734         (build_outer_field_access): Access to this$<n> built from
5735         current_class, not its outer context.
5736         (build_access_to_thisn): Fixed leading comment. Tidied things up.
5737         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
5738         (patch_method_invocation): Use `is_static_flag' when already
5739         initialized.
5740         (patch_newarray): Removed assignment in ternary operator.
5741
5742 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5743
5744         * except.c (free_eh_ranges): Don't free `whole_range'.
5745
5746 2000-10-15  Anthony Green  <green@redhat.com>
5747
5748         * decl.c (init_decl_processing): Call init_class_processing before
5749         anything else.
5750
5751 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5752
5753         * check-init.c (check_init): Fixed leading comment. Use
5754         LOCAL_FINAL_P.
5755         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5756         (give_name_to_locals): Likewise.
5757         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
5758         fields in lang_decl_var.
5759         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
5760         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
5761         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
5762         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
5763         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
5764         (LOCAL_FINAL): Rewritten.
5765         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
5766         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
5767         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
5768         `init_final' fields.
5769         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
5770         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
5771         (TYPE_HAS_FINAL_VARIABLE): New macro.
5772         (struct lang_type): Added `afv' field.
5773         * parse.y (check_static_final_variable_assignment_flag): New function.
5774         (reset_static_final_variable_assignment_flag): Likewise.
5775         (check_final_variable_local_assignment_flag): Likewise.
5776         (reset_final_variable_local_assignment_flag): Likewise.
5777         (check_final_variable_indirect_assignment): Likewise.
5778         (check_final_variable_global_assignment_flag): Likewise.
5779         (add_inner_class_fields): Use LOCAL_FINAL_P.
5780         (register_fields): Handle local finals and final variables.
5781         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
5782         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5783         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5784         on local finals.
5785         (java_complete_expand_methods): Loop to set
5786         TYPE_HAS_FINAL_VARIABLE. Call
5787         `reset_final_variable_local_assignment_flag' and
5788         `check_final_variable_local_assignment_flag' accordingly before
5789         and after constructor expansion. Call
5790         `reset_static_final_variable_assignment_flag'
5791         before expanding <clinit> and after call
5792         `check_static_final_variable_assignment_flag' if the
5793         current_class isn't an interface. After all methods have been
5794         expanded, call `check_final_variable_global_assignment_flag' and
5795         `check_static_final_variable_assignment_flag' if the current class
5796         is an interface.
5797         (maybe_yank_clinit): Fixed typo in comment.
5798         (build_outer_field_access_methods): Removed old sanity check. Use
5799         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5800         Don't create access methods for finals.
5801         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
5802         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
5803         existing DECL_INIT has been processed.
5804         (java_complete_lhs): Likewise.
5805         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
5806         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
5807         logic.
5808         (patch_assignment): Use LOCAL_FINAL_P.
5809         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
5810         DECL_INITIAL is nullified.
5811         Fixes gcj/163.
5812
5813 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5814
5815         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
5816
5817         * Makefile.in (parse.c, parse-scan.c): Likewise.
5818
5819 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
5820
5821         * class.c (temporary_obstack): Remove.
5822         (make_class): Don't mess with obstascks.
5823         (push_class): Likewise.
5824         (set_super_info): Likewise.
5825         (add_method_1): Likewise.
5826         (add_method): Likewise.
5827         (add_field): Likewise.
5828         (build_utf8_ref): Likewise.
5829         (build_class_ref): Likewise.
5830         (build_static_field_ref): Likewise.
5831         (finish_class): Likewise.
5832         (push_super_field): Likewise.
5833         (layout_class): Likewise.
5834         (layout_class_methods): Likewise.
5835         (init_class_processing): Likewise.
5836         * constants.c (get_tag_node): Likewise.
5837         (build_constant_data_ref): Likewise.
5838         * decl.c (ggc_p): Remove.
5839         (copy_lang_decl): Use ggc_alloc.
5840         (complete_start_java_method): Don't mess with obstacks.
5841         (start_java_method): Likewise.
5842         (end_java_method): Likewise.
5843         * except.c (link_handler): Use xmalloc.
5844         (free_eh_ranges): New function.
5845         (method_init_exceptions): Use it.
5846         (add_handler): Use xmalloc.
5847         (expand_start_java_handler): Don't mess with obstacks.
5848         (prepare_eh_table_type): Likewise.
5849         (expand_end_java_handler): Likewise.
5850         * expr.c (push_value): Likewise.
5851         (create_label_decl): Likewise.
5852         (build_jni_stub): Likewise.
5853         (java_lang_expand_expr): Likewise.
5854         (note_instructions): Use xrealloc.
5855         (java_push_constant_from_pool): Don't mess with obstacks.
5856         (process_jvm_instruction): Likewise.
5857         * java-tree.h (cyclic_inheritance_report): Remove duplicate
5858         declaration.
5859         * jcf-parse.c (get_constant): Don't mess with obstacks.
5860         (read_class): Likewise.
5861         (jcf_parse): Likewise.
5862         * lex.c (expression_obstack): Remove.
5863         (java_lex): Don't use obstack_free.
5864         * parse.h (exit_java_complete_class): Don't mess with obstacks.
5865         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
5866         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
5867         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
5868         * parse.y (gaol): Add more GC roots.
5869         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
5870         (lookup_field_wrapper): Likewise.
5871         (obtain_incomplete_type): Don't mess with obstacks.
5872         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
5873         macros.
5874         (craft_constructor): Don't mess with obstacks.
5875         (safe_layout_class): Likewise.
5876         (java_complete_class): Likewise.
5877         (source_end_java_method): Likewise.
5878         (build_outer_field_access_methods): Likewise.
5879         (build_outer_method_access_method): Likewise.
5880         (maybe_build_thisn_access_method): Likewise.
5881         (build_dot_class_method_invocation): Likewise.
5882         (java_complete_tree): Likewise.
5883         (java_complete_lhs): Likewise.
5884         (do_merge_string_cste): Likewise.
5885         (patch_string_cst): Likewise.
5886         (array_constructor_check_entry): Likewise.
5887         * typeck.c (build_java_array_type): Likewise.
5888         (parse_signature_string): Likewise.
5889         (build_java_signature): Likewise.
5890
5891 2000-10-12  Tom Tromey  <tromey@cygnus.com>
5892
5893         Fix for PR gcj/356:
5894         * gjavah.c (add_class_decl): Don't special-case inner classes.
5895         (add_namelet): Likewise.
5896
5897 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
5898
5899         * java-tree.h: Constify current_encoding.
5900         * lang.c: Constify current_encoding.
5901
5902 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
5903
5904         * jvgenmain.c (class_mangling_suffix): Omit `.'.
5905         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
5906
5907 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5908
5909         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
5910         patch. Fixes gcj/340.
5911
5912 2000-10-10  Tom Tromey  <tromey@cygnus.com>
5913
5914         * lex.c (java_new_lexer): Initialize out_first and out_last
5915         fields.
5916         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
5917
5918 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5919
5920         * parse.y (pop_current_osb): New function.
5921         (array_type:): Use `dims:', changed actions
5922         accordingly. Suggested by Anthony Green.
5923         (array_creation_expression:): Used pop_current_osb.
5924         (cast_expression:): Likewise.
5925         (search_applicable_method_list): Fixed indentation.
5926
5927 2000-10-08  Anthony Green  <green@redhat.com>
5928
5929         * parse.y (array_type_literal): Remove production.
5930         (type_literals): Refer to array_type, not array_type_literal.
5931
5932 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5933
5934         Patch contributed by Corey Minyard.
5935         * decl.c (check_local_named_variable): New function.
5936         (tree check_local_unnamed_variable): Likewise.
5937         (find_local_variable): Splitted. Call check_local_{un}named_variable.
5938
5939 2000-10-07  Anthony Green  <green@redhat.com>
5940
5941         * class.c (layout_class): Handle case where superclass can't be
5942         layed out yet.
5943
5944 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5945
5946         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
5947         gperf.
5948
5949 2000-10-05  Tom Tromey  <tromey@cygnus.com>
5950
5951         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
5952         * jvgenmain.c (class_mangling_prefix): Removed.
5953         (class_mangling_suffix): New global.
5954         (main): Use it.
5955         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
5956         `$'.
5957         (print_method_info): Handle overrides for static and final
5958         methods.
5959         (process_file): Generate declaration for class object field.
5960         * class.c (cxx_keywords): New array.
5961         (utf8_cmp): New function.
5962         (cxx_keyword_p): New function.
5963         (layout_class_method): Mangle C++ keywords by appending `$'.
5964         (mangle_field): New function.
5965         (mangle_class_field): Use mangle_field.  Mangle class name as
5966         `class$'.
5967         (mangle_static_field): Use mangle_field.
5968
5969 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5970
5971         * decl.c (find_local_variable): Removed uncessary type check and
5972         fixed range check typo. From Corey Minyard.
5973
5974 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5975
5976         * decl.c (give_name_to_locals): New local `code_offset'. Call
5977         `maybe_adjust_start_pc'.
5978         * expr.c (note_instructions): New function.
5979         (expand_byte_code): Don't collect insn starts here.
5980         (peek_opcode_at_pc): New function.
5981         (maybe_adjust_start_pc): Likewise.
5982         * java-tree.h (maybe_adjust_start_pc): Declare.
5983         (note_instructions): Likewise.
5984         * jcf-parse.c (parse_class_file): Call `note_instructions'.
5985
5986 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5987
5988         * parse.y (field_access:): Fixed indentation.
5989         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
5990
5991 2000-09-07  Tom Tromey  <tromey@cygnus.com>
5992
5993         Fix for PR gcj/307:
5994         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
5995         JPRIMITIVE_TYPE_P, for arithmetic operators.
5996         (patch_method_invocation): Indentation fix.
5997         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
5998         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
5999         (do_unary_numeric_promotion): Cleaned up code.
6000         (valid_cast_to_p): Handle boolean correctly.
6001
6002 2000-09-27  Tom Tromey  <tromey@cygnus.com>
6003
6004         * lex.c (java_read_unicode): Reset bs_count when finished with
6005         `\u' sequence.
6006
6007 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6008
6009         Convert to GC.
6010         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
6011         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
6012         (typeck.o): Depend on ggc.h.
6013         * class.c (add_method_1): Use GC functions for allocation.
6014         (init_class_processing): Register roots.
6015         * decl.c (ggc_p): Set to 1.
6016         (pending_local_decls): Make it static.
6017         (push_jvm_slot): Use GC functions for allocation.
6018         (init_decl_processing): Register roots.
6019         (give_name_to_locals): Use GC functions for allocation.
6020         (lang_mark_tree): New function.
6021         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
6022         functions for allocation.
6023         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
6024         * lex.c (java_lex): Use build_string, rather than replicating it
6025         inline.
6026         * parse.y (goal): Add more roots.
6027         (mark_parser_ctxt): New function.
6028         * typeck.c: Include ggc.h.
6029
6030 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6031
6032         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
6033         contains something else than MODIFY_EXPR.
6034
6035 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
6036
6037         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
6038         * Makefile.in (parse.o): Depend on ggc.h.
6039         (class.o): Likewise.
6040         (constants.o): Likewise.
6041         (decl.o): Likewise.
6042         (expr.o): Likewise.
6043         (jcf-parse.o): Likewise.
6044         (jcf-write.o): Likewise.
6045         (mangle.o): Likewise.
6046         * class.c: Include ggc.h.
6047         (build_static_field_ref): Register GC roots.
6048         (layout_class): Likewise.
6049         (init_class_processing): Likewise.
6050         * constants.c: Include ggc.h.
6051         (current_constant_pool_data_ref): Remove.
6052         (tag_nodes): Move it to ...
6053         (get_tag_node): ... here.  Register GC roots.
6054         * decl.c: Include ggc.h.  Remove many global tree definitions.
6055         (throw_node): Define.
6056         (java_global_trees): Likewise.
6057         (predef_filenames): Make the size a constant.
6058         (init_decl_processing): Adjust accordingly.
6059         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
6060         * expr.c: Include ggc.h.
6061         (init_expr_processing): Register GC roots.
6062         (build_invokeinterface): Likewise.
6063         * java-tree.h: Replace extern tree declarations with macros.
6064         (java_global_trees): New variable.
6065         (java_tree_index): New enumeration.
6066         (init_jcf_parse): Declare.
6067         * jcf-parse.c: Include ggc.h.
6068         (current_class): Remove declaration.
6069         (main_class): Likewise.
6070         (all_class_list): Likewise.
6071         (predefined_filename_p): Adjust for constant size of
6072         predef_filenames.
6073         (init_jcf_parse): New function.
6074         * jcf-write.c: Include ggc.h.
6075         (generate_classfile): Register GC roots.
6076         (append_synthetic_attribute): Likewise.
6077         (append_innerclass_attribute_entry): Likewise.
6078         * lang.c: Include ggc.h.
6079         (lang_print_error): Register GC roots.
6080         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
6081         with macros.
6082         * parse.y: Include ggc.h.
6083         (wfl_operator): Remove.
6084         (goal): Register GC roots.
6085         (java_pop_parser_context): Adjust for new field names.
6086         (java_parser_context_save_global): Likewse.
6087         (java_parser_context_restore_global): Likewise.
6088         (java_parser_context_suspend): Likewise.
6089         (java_parser_context_resume): Likewise.
6090         (verify_constructor_circularity): Register GC roots.
6091         (lookup_cl): Likewise.
6092         (java_reorder_fields): Likewise.
6093         (build_current_this): Likewise.
6094         (class_in_current_package): Likewise.
6095         (argument_types_convertible): Likewise.
6096         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
6097
6098 2000-09-14  Tom Tromey  <tromey@cygnus.com>
6099
6100         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
6101
6102 2000-09-13  Tom Tromey  <tromey@cygnus.com>
6103
6104         * jcf-parse.c: Include <locale.h>.
6105         * jv-scan.c: Include <locale.h>.
6106
6107 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6108
6109         * expr.c (pop_type_0): Return `Object' if trying to merge two
6110         interface types.
6111         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
6112         interface types; `Object' is always a valid supertype.
6113
6114 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6115
6116         Fix for PR gcj/33:
6117         * jv-scan.c (help): Document --encoding.
6118         (options): Added `encoding' entry.
6119         (OPT_ENCODING): New define.
6120         (main): Handle --encoding.
6121         Include <langinfo.h> if nl_langinfo exists.
6122         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
6123         --encoding.
6124         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
6125         (parse_source_file): Correctly call java_init_lex.  Added `finput'
6126         argument.  Use nl_langinfo to determine default encoding.
6127         * java-tree.h (current_encoding): Declare.
6128         * parse.y (java_parser_context_restore_global): Don't restore
6129         `finput'.
6130         (java_parser_context_save_global): Don't set `finput' field.
6131         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
6132         if required.
6133         * lang.c (current_encoding): New global.
6134         (lang_decode_option): Recognize `-fencoding='.
6135         (finish_parse): Don't close finput.
6136         * parse.h (struct parser_ctxt): Removed `finput' and
6137         `unget_utf8_value' fields.  Added `lexer' field.
6138         (java_init_lex): Fixed declaration.
6139         * lex.c (java_new_lexer): New function.
6140         (java_destroy_lexer): Likewise.
6141         (java_read_char): Added `lex' argument.  Handle iconv case.
6142         (java_read_unicode): Added `lex' argument.  Count backslashes in
6143         lexer structure.
6144         (java_init_lex): Added `finput' and `encoding' arguments.  Set
6145         `lexer' field in ctxp.
6146         (BAD_UTF8_VALUE): Removed.
6147         (java_lex): Handle seeing UEOF in the middle of a string literal.
6148         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
6149         (java_lexer): New structure.
6150         (UNGETC): Removed.
6151         (GETC): Removed.
6152         (DEFAULT_ENCODING): New define.
6153         (java_destroy_lexer): Declare.
6154
6155 2000-09-12  Tom Tromey  <tromey@cygnus.com>
6156
6157         Fix for PR gcj/343:
6158         * lex.c (java_init_lex): Initialize java_io_serializable.
6159         * parse.y (java_io_serializable): New global.
6160         (valid_ref_assignconv_cast_p): An array can be cast to
6161         serializable.
6162
6163 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6164
6165         * decl.c, expr.c: Include defaults.h if not already included.
6166         Don't define the *_TYPE_SIZE macros.
6167
6168 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
6169
6170         * typeck.c (build_java_array_type): Correct first parameter
6171         in ADJUST_FIELD_ALIGN invocation.
6172
6173 2000-09-06  Tom Tromey  <tromey@cygnus.com>
6174
6175         * lang-specs.h: Also recognize `-femit-class-files'.
6176
6177 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6178
6179         * verify.c (merge_types): Load the types to merge if necessary.
6180
6181 2000-09-02  Anthony Green  <green@redhat.com>
6182
6183         * jcf-io.c: Include zlib.h.
6184         (open_in_zip): Read compressed class file archives.
6185         * zipfile.h (ZipDirectory): Add uncompressed_size and
6186         compression_method fields.
6187         * zextract.c (read_zip_archive): Collect file compression info.
6188
6189 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
6190
6191         * parse.y (do_resolve_class): Also explore superclasses of
6192         intermediate enclosing contexts when searching for inner classes.
6193
6194 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6195
6196         * parse.y (variable_declarator_id:): Better error message.
6197         (expression_statement:): Use YYNOT_TWICE.
6198         (cast_expression:): Likewise.
6199         (assignment:): Likewise.
6200
6201 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6202
6203         * parse.y (do_merge_string_cste): New locals. Create new
6204         STRING_CSTs each time, use memcpy. Fixes gcj/311.
6205
6206 2000-08-07  Hans Boehm  <boehm@acm.org>
6207
6208         * boehm.c (mark_reference_fields): Set marking bits for all words in
6209         a multiple-word record.
6210         (get_boehm_type_descriptor): Use the procedure marking descriptor for
6211         java.lang.Class.
6212
6213 2000-08-31  Mike Stump  <mrs@wrs.com>
6214
6215         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
6216         jcf-dump$(exeext)): Make parallel safe.
6217
6218 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6219
6220         * jcf-parse.c (set_source_filename): Constify a char *.
6221         * jcf-write.c (append_innerclasses_attribute,
6222         make_class_file_name): Constify a char *.  Don't recycle a
6223         variable for an unrelated purpose.
6224         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
6225         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
6226
6227 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6228
6229         * expr.c (can_widen_reference_to): Fixed indentation.
6230         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
6231         * parse.y: `finit$' replaces `$finit$' in comments.
6232         (try_builtin_assignconv): Fixed leading comment.
6233
6234 2000-08-25  Greg McGary  <greg@mcgary.org>
6235
6236         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
6237
6238 2000-08-24  Greg McGary  <greg@mcgary.org>
6239
6240         * lang.c (lang_decode_option): Use ARRAY_SIZE.
6241         * parse.y (BINOP_LOOKUP): Likewise.
6242
6243 2000-08-22  Andrew Haley  <aph@cygnus.com>
6244
6245         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
6246         sign extending. Fixes gcj/321.
6247         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
6248         combining to make a jlong. Fixes gcj/321.
6249
6250 2000-08-21  Nix  <nix@esperi.demon.co.uk>
6251
6252         * lang-specs.h: Do not process -o or run the assembler if
6253         -fsyntax-only.
6254
6255 2000-08-16  Andrew Haley  <aph@cygnus.com>
6256
6257         * typeck.c (build_java_array_type): Rewrite code to do array
6258         alignment.  Take into account back-end macros when aligning array
6259         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
6260         user to set alignment. Fixes gcj/252 and 160.
6261
6262 2000-08-09  Tom Tromey  <tromey@cygnus.com>
6263
6264         * parse.y (check_abstract_method_definitions): Now return `int'.
6265         Check implemented interfaces.  Fixes PR gcj/305.
6266
6267         * parse.y (patch_switch_statement): Disallow `long' in switch
6268         expressions.  Fixes PR gcj/310.
6269
6270 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6271
6272         * decl.c (finit_leg_identifier_node): New global.
6273         (init_decl_processing): Use `finit$' to initialize
6274         finit_identifier_node. Use `$finit$' to initialize
6275         finit_leg_identifier_node.
6276         * expr.c (expand_java_field_op): Use ID_FINIT_P.
6277         * java-tree.h (finit_identifier_node): Changed attached comment.
6278         (finit_leg_identifier_node): New declaration.
6279         (ID_FINIT_P): Take finit_identifier_node and
6280         finit_leg_identifier_node into account. This is a backward
6281         compatibility hack.
6282
6283 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6284
6285         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
6286         Jan 6 2000 patch.
6287         (generate_bytecode_insns): Check `nargs' before emitting it.
6288         * verify.c (merge_type_state): Fixed typo.
6289         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
6290         generate_bytecode_{conditional,insns}.
6291
6292 2000-08-13  Anthony Green  <green@redhat.com>
6293
6294         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
6295         for -pg builds).
6296
6297 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6298
6299         * class.c (maybe_layout_super_class): Fixed indentation.
6300         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
6301         (java_check_methods): New function declaration.
6302         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
6303         instead of `str_ptr'.
6304         * jcf-write.c (generate_bytecode_insns): Emit number the of args
6305         of a `invokeinterface' at the right time.
6306         * parse.h (WFL_STRIP_BRACKET): New macro.
6307         (SET_TYPE_FOR_RESOLUTION): Use it.
6308         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
6309         (check_class_interface_creation): Don't check for cross package
6310         innerclass name clashes.
6311         (method_header): Behave properly if MDECL is `error_mark_node'.
6312         (method_declarator): Return `error_mark_node' if bogus current
6313         class.
6314         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
6315         (resolve_and_layout): New local `decl_type', set and used. Call
6316         java_check_methods.
6317         (java_check_methods): New method.
6318         (java_layout_classes): Use it.
6319         (resolve_qualified_expression_name): No EH check necessary in
6320         access$<n>.
6321         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
6322         `case' statement.
6323         (patch_assignment): Set DECL_INITIAL on integral final local.
6324
6325 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6326
6327         * java-tree.h (flag_extraneous_semicolon): New extern.
6328         * lang-options.h: (-Wextraneous-semicolon): New option.
6329         * lang.c (flag_redundant): Fixed typo in leading comment.
6330         (flag_extraneous_semicolon): New global.
6331         (lang_decode_option): Set `flag_extraneous_semicolon' when
6332         -Wall. Decode `-Wextraneous-semicolon'.
6333         * parse.y (type_declaration:): Removed `SC_TK' hack, added
6334         `empty_statement' rule.
6335         (class_body_declaration): Likewise.
6336         (method_body:): Accept `;' as a method body.
6337         (static_initializer:): Removed `SC_TK' hack.
6338         (constructor_block_end:): Likewise.
6339         (empty_statement:): Report deprecated empty declaration. Fixes
6340         gcj/295
6341
6342 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6343
6344         * parse.y (build_dot_class_method_invocation): Changed parameter
6345         name to `type'. Build signature from `type' and convert it to a
6346         STRING_CST if it's an array.
6347         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
6348         to use `ref_type' directly.
6349
6350 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
6351
6352         * lang-options.h: Added a comma after the last element to avoid
6353         syntax errors when other languages define additional options.
6354
6355 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
6356
6357         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
6358         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
6359         (jc1): Link with $(BACKEND).
6360         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
6361
6362 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
6363
6364         * jvspec.c: Adjust type of second argument to
6365         lang_specific_driver, and update code as necessary.
6366
6367         * class.c (build_dtable_decl): Initialize dummy.
6368
6369 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6370
6371         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
6372         method bodies not to rule out discarding `<clinit>'; don't use
6373         <clinit> to initialize static fields with constant initializers.
6374
6375 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6376
6377         * gjavah.c (print_method_info): Added `synth' parameter. Skip
6378         synthetic methods.
6379         (method_synthetic): New global.
6380         (HANDLE_METHOD): Recognize synthetic method and tell
6381         `print_method_info' about it.
6382         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
6383         processing a synthetic method.
6384         * jcf-reader.c (skip_attribute): New function.
6385         ( skip_attribute): Likewise.
6386
6387 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6388
6389         * parse.y (build_outer_field_access): Fixed comments.
6390         (fix_constructors): Emit the initialization of this$<n> before
6391         calling $finit$.
6392         (resolve_qualified_expression_name): Build an access to `decl' if
6393         necessary.
6394
6395 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6396
6397         * parse-scan.y (curent_class): Non longer const.
6398         (inner_qualifier, inner_qualifier_length): Deleted.
6399         (current_class_length): New global.
6400         (bracket_count): Fixed typo in leading comment.
6401         (anonymous_count): New global.
6402         (class_instance_creation_expression:): Handle anonymous classes.
6403         (anonymous_class_creation:): New rule.
6404         (push_class_context): Rewritten.
6405         (pop_class_context): Likewise.
6406         (INNER_QUALIFIER): Macro deleted.
6407         (report_class_declaration): call `push_class_context' when
6408         entering the function. `fprintf' format modified not to use
6409         INNER_QUALIFIER.
6410         (report_class_declaration): Assign `package_name' and
6411         `current_class' to NULL separately.
6412
6413 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6414
6415         * expr.c (build_invokeinterface): Call layout_class_methods on
6416         target interface.
6417
6418 2000-07-27  Tom Tromey  <tromey@cygnus.com>
6419             Anthony Green  <green@cygnus.com>
6420             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6421
6422         * class.c (make_class_data): Create vtable for abstract classes.
6423         (get_dispatch_table): Changed to cope with abstract classes.
6424
6425 2000-07-27  Tom Tromey  <tromey@cygnus.com>
6426
6427         * parse.y (patch_method_invocation): Don't reverse the argument
6428         list when dealing with anonymous class constructors. Fixed typo in
6429         comment.
6430
6431 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6432
6433         * parse.y (build_alias_initializer_parameter_list): Reverse
6434         crafted list when building aliases for anonymous class
6435         constructors.
6436
6437 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6438
6439         * parse.y (jdep_resolve_class): Don't bother checking potential
6440         innerclass access if `decl' is NULL.
6441         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
6442         WFL.
6443
6444 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6445
6446         * parse.c: Remove (again.)
6447
6448 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6449
6450         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
6451         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
6452         outside the `if' statement, alias to innerclass removed, `decl'
6453         used to mark the class complete.
6454
6455 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6456
6457         * parse.y (simple_name:): Fixed typo in error message.
6458
6459 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6460
6461         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
6462         or its first operand can be error marks.
6463
6464 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6465
6466         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
6467         * parse.y (method_header): Likewise.
6468
6469 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6470
6471         * parse.y (process_imports): Consider that one might be trying to
6472         import an innerclass. Fixes gcj/254
6473
6474 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6475
6476         * parse.y (find_as_inner_class): Handle the case where the
6477         enclosing context of an innerclass has been loaded as bytecode.
6478
6479 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6480
6481         * parse.y (simple_name:): Reject `$' in type names.
6482         (resolve_type_during_patch): Use `type' as a second
6483         argument to resolve_no_layout. Fixes gcj/257.
6484
6485 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
6486
6487         * parse.y (find_most_specific_methods_list): Select the only
6488         non-abstract method even if max has been set.
6489         Fixes gcj/285, gcj/298.
6490
6491 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
6492
6493         * lang-specs.h: Added %(jc1) to java compiler options.
6494
6495 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
6496
6497         * .cvsignore: New file.
6498
6499 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6500
6501         * parse.y (not_accessible_p): Access granted to innerclasses
6502         (indirectly) extending the reference type. Fixes gcj/249.
6503
6504 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6505
6506         * parse.y (patch_method_invocation): Fixed comment.
6507         (maybe_use_access_method): Build this$<n>s to the context of the
6508         target method, or a type that extends it. Fixes gcj/242.
6509
6510 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
6511
6512         * parse.c: Remove.
6513
6514 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6515
6516         * parse.y (fold_constant_for_init): Avoid bullish conversion.
6517
6518 2000-07-13  Tom Tromey  <tromey@cygnus.com>
6519
6520         * lang-specs.h: Added %{I*}.
6521
6522 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
6523
6524         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
6525
6526 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
6527
6528         * parse-scan.c: Remove.
6529
6530 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6531
6532         * class.c (set_super_info): Handled protected inner classes.
6533         (common_enclosing_context_p): Bail early if arguments aren't both
6534         inner classes.
6535         (get_access_flags_from_decl): Handle private and protected inner
6536         classes.
6537         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
6538         (CLASS_PROTECTED): Likewise.
6539         (struct lang_type): New bitfield `poic'.
6540         * parse.y (jdep_resolve_class): Call check_inner_class_access on
6541         inner classes only.
6542         (check_inner_class_access): Renamed arguments, added
6543         comments. Handles protected inner classes (fixes gcj/225)
6544         (not_accessible_p): Fixed comments. Avoid handling inner classes.
6545
6546 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6547
6548         * parse.y (resolve_qualified_expression_name): Verify qualified
6549         access to `this'. Fixes gcj/239.
6550
6551 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6552
6553         * jcf-write.c (generate_classfile): Don't install ConstantValue
6554         for null pointers.
6555
6556 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6557
6558         * parse.y (resolve_qualified_expression_name): Handle inner class
6559         access. Fixes gcj/256.
6560
6561 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6562
6563         * jcf-write.c (generate_classfile): Properly install the
6564         ConstantValue attribute and the initial value constant pool index
6565         on string constants.
6566         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
6567         class files.
6568
6569 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6570
6571         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
6572         construct.
6573         * parse.y (find_as_inner_class): Fixed typo.
6574         (do_resolve_class): Explore enclosing contexts when searching for
6575         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
6576         (check_inner_class_access): Check `decl' which can be null in case
6577         of previous errors.
6578
6579 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6580
6581         * java-tree.h (java_debug_context): Declared `extern'.
6582         (safe_layout_class): Likewise.
6583         * parse.y (resolve_field_access): Field must be `static' in order
6584         to be replaced by its initial value. Added comments.
6585         (find_applicable_accessible_methods_list): Fixed typo.
6586         (find_most_specific_methods_list): Methods found in innerclasses
6587         take over methods founds in the enclosing contexts.
6588         (java_complete_tree): Loosen restrictions on the type of DECLs
6589         that can be replaced by their initialization values.
6590         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
6591
6592 2000-07-05  Tom Tromey  <tromey@cygnus.com>
6593
6594         * Make-lang.in (PARSE_DIR): New macro.
6595         (PARSE_RELDIR): Likewise.
6596         (PARSE_C): Likewise.
6597         (PARSE_SCAN_C): Likewise.
6598         ($(PARSE_C)): New target.
6599         ($(PARSE_SCAN_C)): Likewise.
6600         (SET_BISON): New macro.
6601         (BISONFLAGS): Likewise.
6602         (JAVABISONFLAGS): Likewise.
6603
6604 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
6605
6606         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
6607         argument on the first pass for CNI as well as JNI.
6608         (print_method_info): Set up method name on the first pass only.
6609
6610 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6611
6612         * parse.y (parser_qualified_classname): Removed parameter
6613         `is_static'.
6614         (create_interface): Removed first passed parameter to
6615         parser_qualified_classname.
6616         (create_class): Likewise. Don't install alias on static
6617         innerclasses. Fixes gcj/275.
6618
6619 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6620
6621         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
6622         debugable statement with empty_stmt_node. Fixes gcj/272
6623
6624 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6625
6626         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
6627         gcj/271.
6628
6629 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6630
6631         * jcf-write.c (push_long_const): Appropriately cast short negative
6632         constant to jword.
6633
6634 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6635
6636         * parse.y (verify_constructor_super): Use loop variable
6637         `m_arg_type' initialized with `mdecl_arg_type'.
6638
6639 2000-06-29  Tom Tromey  <tromey@cygnus.com>
6640
6641         * parse.y (resolve_field_access): Handle case where `type_found'
6642         is NULL.
6643
6644 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6645
6646         * expr.c (lookup_field): The same field can be found through two
6647         different interface. Don't declare it ambiguous in that case.
6648
6649 2000-06-27  Tom Tromey  <tromey@cygnus.com>
6650
6651         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
6652         follows \r, then unget it at a lower level.
6653
6654 2000-06-26  Tom Tromey  <tromey@cygnus.com>
6655
6656         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
6657         java_complete_tree.
6658
6659 2000-06-25  Tom Tromey  <tromey@cygnus.com>
6660
6661         * parse.y (for_statement): Wrap expression in a WFL if it is a
6662         constant.  For PR gcj/268.
6663
6664 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6665
6666         * parse.y (do_resolve_class): Minor optimiztion in the package
6667         list search. Removed unnecessary test and return statement.
6668         (valid_ref_assignconv_cast_p): Order of arguments to
6669         enclosing_context_p fixed.
6670
6671 2000-06-24  Tom Tromey  <tromey@cygnus.com>
6672
6673         * expr.c (lookup_field): Print error and return error_mark_node if
6674         field reference is ambiguous.
6675
6676         * parse.y (check_abstract_method_definitions): Also check if
6677         `other_method' is abstract.
6678
6679 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6680
6681         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
6682         classes.
6683         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
6684         (struct lang_type): New field `pic'.
6685         (CLASS_PRIVATE): New macro.
6686         * parse.y (check_inner_class_access): New function.
6687         (jdep_resolve_class): Call it.
6688
6689 2000-06-23  Tom Tromey  <tromey@cygnus.com>
6690
6691         * parse.y (patch_incomplete_class_ref): Initialize the returned
6692         class.  For PR gcj/260.
6693
6694 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6695
6696         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
6697
6698 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6699
6700         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
6701         Java specific checks.
6702         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
6703         screened by DECL_P.
6704         * java-tree.def (CASE_EXPR): Marked 'e'.
6705         (DEFAULT_EXPR): Likewise.
6706         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
6707         screened by DECL_P.
6708         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
6709         Java specific checks.
6710         (generate_bytecode_insns): Test try_block for BLOCK before using
6711         BLOCK_EXPR_BODY.
6712         * parse.y (build_wfl_wrap): Added `location' argument. Set
6713         EXPR_WFL_LINECOL accordingly.
6714         (dim_expr:): Wrap constants with WFLs.
6715         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
6716         (resolve_package): Check for `stmt' not being a BLOCK before
6717         building a debuggable statement with it.
6718         (make_qualified_primary): Added extra parameter to build_wfl_wrap
6719         invocation.
6720         (resolve_field_access): Make sure `decl' is a DECL before treating
6721         it as such.
6722         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
6723         IDENTIFIER_NODE before treating it as such.
6724         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
6725         treating it as such.
6726         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
6727         to be applied only on non array types.
6728
6729 2000-06-16  Per Bothner  <per@bothner.com>
6730
6731         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
6732         define in terms of DECL_RESULT, as that fails when --enable-checking.
6733
6734 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6735
6736         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
6737         types the same in comparison.
6738         (CHECK_OP): Add static prototype.
6739
6740 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
6741
6742         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
6743         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
6744         * parse.c: Rebuilt.
6745
6746 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6747
6748         * decl.c (create_primitive_vtable): Prototype.
6749
6750         * jcf-write.c (generate_bytecode_insns): Initialize variable
6751         `saved_context'.
6752
6753         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
6754
6755 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
6756
6757         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
6758         to track searched classes, and do not search the same class more than
6759         once. Call find_applicable_accessible_methods_list on immediate
6760         superclass, instead of search_applicable_method_list on all ancestors.
6761         Fix for PR gcj/238.
6762
6763 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
6764
6765         * parse.y (register_fields): Permit static fields in inner classes
6766         if they are final. Fix for PR gcj/255.
6767
6768 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6769
6770         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
6771         * parse.y (find_in_imports): Returned type changed to void,
6772         leading comment fixed.
6773         (register_package): New function.
6774         (qualify_and_find): Likewise.
6775         (package_declaration:): Use `register_package'.
6776         (single_type_import_declaration:): Removed local variable
6777         `node'. Added missing `;' for consistency.
6778         (type_import_on_demand_declaration:): Use `chainon' to link new
6779         entries.
6780         (lookup_field_wrapper): Lookup local variables defined in outer
6781         contexts first.
6782         (java_complete_class): Don't reverse the list of imported on demand.
6783         (do_resolve_class): Reorganized. Removed local variable
6784         `original_name'. Call `qualify_and_find' with the current package
6785         name, invoke `find_in_imports_on_demand' right after. Call
6786         `qualify_and_find' with the packages we've seen so far. Fixed
6787         operations numbering in comments.
6788         (java_expand_class): Don't reverse `package_list'.
6789         (find_most_specific_methods_list): New local variables `abstract'
6790         and `candidates'. Use them to pick the right method.
6791
6792 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
6793
6794         * parse.y (check_modifiers_consistency): Don't subtract out
6795         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
6796
6797 2000-06-04  Philipp Thomas  <pthomas@suse.de>
6798
6799         * Makefile.in (INTLLIBS): New.
6800         (LIBS): Add above.
6801         (DEPLIBS): Ditto.
6802
6803 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6804
6805         * class.c (get_dispatch_table): Build the vtable dummy entry list
6806         element with a null purpose. Fixed leading comment.
6807         (build_dtable_decl): Build an accurate dtable type when appropriate
6808         and use it.
6809
6810 2000-06-02  Richard Henderson  <rth@cygnus.com>
6811
6812         * lang.c (lang_get_alias_set): New.
6813
6814 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6815
6816         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
6817         before using it as the accessed field.
6818
6819 2000-05-31  Tom Tromey  <tromey@cygnus.com>
6820
6821         * java-tree.h (boolean_array_vtable, byte_array_vtable,
6822         char_array_vtable, short_array_vtable, int_array_vtable,
6823         long_array_vtable, float_array_vtable, double_array_vtable):
6824         Declare.
6825         * expr.c (get_primitive_array_vtable): New function.
6826         (create_primitive_vtable): New function.
6827         (java_lang_expand_expr): Enable code to statically generate
6828         arrays.
6829         * decl.c (init_decl_processing): Create primitive vtables.
6830         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
6831         short_array_vtable, int_array_vtable, long_array_vtable,
6832         float_array_vtable, double_array_vtable): Define.
6833
6834 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
6835
6836         * java/parse.y (find_applicable_accessible_methods_list):
6837         Don't add an uninitialized value to the list.
6838
6839 2000-05-25  Tom Tromey  <tromey@cygnus.com>
6840
6841         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
6842         when trying to see if field's class should be initialized.  Always
6843         initialize field's declaring class, not qualified class.
6844         For PR gcj/162.
6845
6846         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
6847         `wfl_operator', to maybe_build_primttype_type_ref.
6848         Fixes PR gcj/235.
6849
6850 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
6851
6852        * parse.y (patch_method_invocation): Don't try to lookup methods
6853        in primitive types.
6854
6855 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6856
6857         * parse.y (resolve_field_access): Call the appropriate <clinit>
6858         before accessing the length of a static array. Craft a decl for
6859         the field while its time. Fixes PR gcj/129.
6860
6861 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6862
6863         * parse.y (resolve_package): Correctly set `*next' (was off by
6864         one.)
6865         (resolve_qualified_expression_name): Fixed comment.
6866
6867 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6868
6869         * jcf-parse.c (jcf_parse_source): Reset current_class and
6870         current_function_decl to NULL before parsing a new file.
6871
6872 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6873
6874         * parse.y (block_end:): If the collected block doesn't feature a
6875         statement, insert an empty statement.
6876
6877 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6878
6879         * parse.y (maybe_yank_clinit): New function.
6880         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
6881         end of the list of methods belonging to a class.
6882         (java_complete_expand_method): Check whether <clinit> is really
6883         necessary and expand it accordingly.
6884
6885 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6886
6887         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
6888         processed by the method's switch statement.
6889
6890 2000-05-19  Tom Tromey  <tromey@cygnus.com>
6891
6892         * java-tree.h: Added init state enum.
6893         * decl.c (emit_init_test_initialization): Initialize class
6894         initialization check variable by looking at class' state.
6895
6896 2000-05-19  Tom Tromey  <tromey@cygnus.com>
6897
6898         * java-tree.h (build_instanceof): Declare.
6899         (build_get_class): Declare.
6900         * parse.y (patch_binop): Use build_instanceof.
6901         * expr.c (build_instanceof): New function.  If class is final,
6902         don't make a function call.
6903         (expand_java_INSTANCEOF): Use it.
6904         (build_get_class): New function.
6905
6906 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6907
6908         * jcf-write.c (generate_classfile): Scan the source_file for
6909         slashes with the right pointer variable.
6910
6911 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
6912
6913         * lang.c (lang_decode_option): Update -Wunused flags by calling
6914         set_Wunused.
6915         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
6916
6917 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
6918
6919         * check_init.c (check_init): Constify local char *.
6920         * class.c (push_class): Constify local char *.
6921         * java_tree.h: Update prototypes.
6922         * jcf-io.c (open_class): Constify filename parameter and
6923         return value.
6924         (find_class): Remove redundant string copy.  Cast return from
6925         open_class.
6926         * jcf-parse.c (read_class, parse_class_file, yyparse):
6927         Constify local char *.
6928         * jcf-write.c (generate_bytecode_insns, generate_classfile):
6929         Constify local char *.
6930         * jcf.h (JCF): Constify filename and classname.
6931         (JCF_FINISH): Cast args to FREE to char * when appropriate.
6932         * lang.c (init_parse): Constify parameter and return value.
6933         * lex.c (java_get_line_col): Constify filename parameter.
6934         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
6935         * parse.y (java_parser_context_suspend,
6936         issue_warning_error_from_context, safe_layout_class): Constify
6937         local char *.
6938         * parse.c: Regenerate.
6939
6940 2000-05-08  Tom Tromey  <tromey@cygnus.com>
6941
6942         * expr.c (build_jni_stub): Cache the result of
6943         _Jv_LookupJNIMethod.
6944
6945 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6946
6947         * decl.c (predef_filenames_size): Now 7.
6948         (predef_filenames): New seventh entry.
6949
6950 2000-05-04  Tom Tromey  <tromey@cygnus.com>
6951
6952         * boehm.c (mark_reference_fields): Don't mark RawData fields.
6953         Keep track of when we've seen a reference field after a
6954         non-reference field.
6955         (get_boehm_type_descriptor): Handle case where we see
6956         non-reference fields but no trailing reference field.
6957         * decl.c (rawdata_ptr_type_node): Define.
6958         (init_decl_processing): Initialize rawdata_ptr_type_node.
6959         * java-tree.h (rawdata_ptr_type_node): Declare.
6960
6961 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6962
6963         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
6964         specifiers in calls to fprintf.
6965
6966 2000-05-03  Andrew Haley  <aph@cygnus.com>
6967
6968         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
6969
6970         * javaop.h (WORD_TO_INT): New function.
6971         (IMMEDIATE_s4): Use WORD_TO_INT.
6972         * jcf.h (JPOOL_INT): Ditto.
6973
6974         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
6975         separator.
6976
6977 2000-04-19  Tom Tromey  <tromey@cygnus.com>
6978
6979         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
6980         on native function.
6981         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
6982         JNI methods.
6983         * expr.c (build_jni_stub): New function.
6984         * lang-specs.h: -fjni and -femit-class-file are incompatible.
6985         * parse.c: Rebuilt.
6986         * parse.y (java_complete_expand_methods): Expand a native method
6987         and call build_jni_stub if -fjni given.
6988         * lang-options.h: Document -fjni.
6989         * lang.c (flag_jni): New global.
6990         (lang_f_options): Added `jni' entry.
6991         * java-tree.h (soft_lookupjnimethod_node,
6992         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
6993         Declare.
6994         (flag_jni): Declare.
6995         (build_jni_stub): Declare.
6996         (struct lang_decl): Added `native' flag.
6997         (METHOD_NATIVE): Redefined to use `native' field of lang specific
6998         structure.
6999         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
7000         soft_jnipopsystemframe_node): New globals.
7001         (init_decl_processing): Set them.  _Jv_InitClass only takes one
7002         argument.
7003
7004         * java-tree.def: Put into `C' mode.
7005
7006 2000-04-27  Tom Tromey  <tromey@cygnus.com>
7007
7008         Fix for PR gcj/2:
7009         * expr.c (expand_invoke): Generate check to see if object pointer
7010         is null in nonvirtual invocation case.
7011         * java-tree.h (soft_nullpointer_node): Declare.
7012         * decl.c (soft_nullpointer_node): New global.
7013         (init_decl_processing): Initialize soft_nullpointer_node.
7014         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7015         or `private' methods.
7016         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7017
7018 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7019
7020         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
7021         from <clinit>
7022
7023 2000-04-26  Tom Tromey  <tromey@cygnus.com>
7024
7025         * zextract.c (find_zip_file_start): New function.
7026         (read_zip_archive): Use it.
7027
7028 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7029
7030         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
7031
7032 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7033
7034         * class.c (common_enclosing_context_p): New function.
7035         * java-tree.h (common_enclosing_context_p): Added prototype.
7036         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
7037         classes sharing an outer context with the current instance.
7038         * parse.y (build_access_to_thisn): Fixed leading comment.
7039         (verify_constructor_super): New local `supper_inner'. Skip
7040         enclosing context argument in the case of inner class constructors.
7041         (patch_method_invocation): Insert proper context as second
7042         parameter to pure inner class constructor super invocations.
7043
7044 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7045
7046         * parse.y (end_class_declaration): Reset the interface number
7047         counter.
7048
7049 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7050
7051         * parse.y (source_start_java_method): Deleted unnecessary code.
7052         (patch_method_invocation): Fixed comment.
7053
7054 2000-04-24  Robert Lipe <robertlipe@usa.net>
7055
7056         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
7057
7058 2000-04-23  Tom Tromey  <tromey@cygnus.com>
7059
7060         * boehm.c (mark_reference_fields): Use int_byte_position.
7061
7062 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7063
7064         * boehm.c (mark_reference_fields): Only call byte_position on
7065         non-static fields.
7066
7067 2000-04-22  Tom Tromey  <tromey@cygnus.com>
7068
7069         * boehm.c (mark_reference_fields): Added `last_view_index'
7070         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
7071
7072 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
7073
7074         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
7075         * parse.y (check_class_interface_creation): Fixed comments. Select
7076         permitted modifiers for (inner) interfaces. Changed error message
7077         to report rejected modifiers used with local classes.
7078
7079 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7080
7081         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
7082         of directly inherited type considered in scope.
7083         * parse.y (do_resolve_class): Search inherited classes for inner
7084         classes.
7085
7086 2000-04-20  Tom Tromey  <tromey@cygnus.com>
7087
7088         * parse.y (not_accessible_p): Use member's class, not current
7089         class, when doing inheritance check for protected reference.
7090         Fixes PR gcj/124.
7091
7092 2000-04-20  Jason Schroeder  <shrode@subnature.com>
7093
7094         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
7095
7096 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7097
7098         * parse.y (lookup_field_wrapper): Search for final local aliases.
7099         (resolve_expression_name): Let lookup_field_wrapper search for
7100         final local aliases. Force the value of `name' if one is found.
7101         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
7102         an expression name. Fixed comments.
7103
7104 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7105
7106         * parse.y (yyerror): `msg' can be null, don't use it in that case.
7107
7108 2000-04-19  Tom Tromey  <tromey@cygnus.com>
7109
7110         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
7111
7112 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7113
7114         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
7115
7116 2000-04-18  Tom Tromey  <tromey@cygnus.com>
7117
7118         PR gcj/211:
7119         * gjavah.c (utf8_cmp): Changed return value.
7120         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
7121         result.
7122         (cxx_keywords): New global.
7123         (get_field_name): Handle new result of cxx_keyword_subst.
7124         (print_method_info): Likewise.
7125
7126 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
7127
7128         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
7129         with a newline, for CNI.
7130         (print_stub_or_jni): Print a space or newline before method name for
7131         CNI as well as JNI.
7132         (print_cxx_classname): Don't write leading "::" in CNI stub method.
7133         (process_file): Include gcj/cni.h if generating CNI stubs.
7134
7135 2000-04-16  Tom Tromey  <tromey@cygnus.com>
7136
7137         * gjavah.c (decompile_method): Use print_field_name.
7138         Fixes PR gcj/205.
7139
7140 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7141
7142         * parse.y (java_expand_classes): Reverse the package list once.
7143         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
7144         reduction.
7145         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
7146         the `==' and `!=' operators.
7147
7148 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7149
7150         * jcf-write.c (generate_bytecode_insns): At invocation time,
7151         always relate an interface method to the type of its selector.
7152
7153 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7154
7155         Fix for PR gcj/2:
7156         * expr.c (expand_invoke): Generate check to see if object pointer
7157         is null in nonvirtual invocation case.
7158         * java-tree.h (soft_nullpointer_node): Declare.
7159         * decl.c (soft_nullpointer_node): New global.
7160         (init_decl_processing): Initialize soft_nullpointer_node.
7161         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7162         or `private' methods.
7163         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7164
7165 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7166
7167         Fix for PR gcj/140:
7168         * parse.y (check_final_assignment): Recognize assignments to the
7169         `length' field of an array when generating class files.
7170
7171 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7172
7173         * class.c (decl_hash): Prototype removed.
7174         (decl_compare): Likewise.
7175
7176 2000-04-05  Tom Tromey  <tromey@cygnus.com>
7177
7178         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
7179         * parse.y (check_modifiers_consistency): Check for final/volatile
7180         clash.  Fixes PR gcj/164.
7181
7182 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7183
7184         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
7185         made global.
7186         (java_hash_compare_tree_node): Renamed from `decl_compare, made
7187         global.
7188         (add_method_1): Use `java_hash_hash_tree_node' and
7189         `java_hash_compare_tree_node'.
7190         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
7191         (java_hash_compare_tree_node): Likewise.
7192         * parse.y (find_applicable_accessible_methods_list): Create,
7193         delete and use a hash table to remember already searched interfaces.
7194
7195 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
7196
7197         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
7198         with latest entry.
7199
7200 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7201
7202         * boehm.c (mark_reference_fields, set_bit): Prototype.
7203         (set_bit): Un-ANSI-fy definition.
7204
7205         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
7206         Prototype.
7207
7208         * decl.c (emit_init_test_initialization): Likewise.
7209
7210         * gjavah.c (jni_print_char): Likewise.
7211
7212         * parse.y (create_new_parser_context): Likewise.
7213
7214 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7215
7216         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
7217         patch missing hunk. Fixed indentation.
7218
7219 2000-03-30  Tom Tromey  <tromey@cygnus.com>
7220
7221         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
7222         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
7223
7224 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7225
7226         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
7227         when negative *before* using it as an array index.
7228         * ChangeLog: Fixed typo.
7229
7230 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7231
7232         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
7233         to 0 when it reaches -1.
7234
7235 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7236
7237         * jcf-parse.c (get_constant): Properly cast `num' during the
7238         invocation of `add_double'.
7239         * jcf-write.c (push_long_const): Properly cast `lo' before
7240         comparing it to short bounds.
7241         * parse-scan.y (interface_declaration:): Rule re-arrange so that
7242         `interface_body:' is reduced after the current interface is
7243         pushed.
7244
7245 2000-03-26  Tom Tromey  <tromey@cygnus.com>
7246
7247         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
7248         Java-specific `-f' option.
7249
7250 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7251
7252         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
7253         Adjust order of making types.
7254         Make bitsize_*_node values.
7255
7256 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7257
7258         * class.c (make_field_value): Use byte_position.
7259         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
7260         (java_array_data_offset): Likewise.
7261         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
7262         bzero call.
7263
7264 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7265
7266         * parse.y (check_abstract_method_definitions): New local
7267         `end_type_reached'. Make sure we also consider `end_type'.
7268         (java_check_abstract_method_definitions): Make sure we eventually
7269         consider `java.lang.Object'.
7270         (maybe_use_access_method): Don't use access method if not in the
7271         context of a pure inner class or if the method's context is right.
7272         (find_applicable_accessible_methods_list): New static flag
7273         `object_done'. Don't search abstract classes as interfaces. Fixed
7274         indentation. Fixed the `java.lang.Object' only search. Search
7275         class interface(s) first, then fully search enclosing contexts.
7276         (find_most_specific_methods_list): Pick the closest candidate when
7277         they're all abstract.
7278
7279 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7280
7281         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
7282         properly initialize `finished_label'. Don't emit gotos for empty
7283         try statements.
7284
7285 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7286
7287         * except.c (emit_handlers): Clear catch_clauses_last.
7288
7289 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7290
7291         * parse.y (check_method_types_complete): New function.
7292         (create_class): Reset anonymous class counter only when seeing an
7293         non inner classe.
7294         (java_complete_class): JDEP_METHOD: Don't recompute signature
7295         if incomplete.
7296
7297 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7298
7299         * class.c (build_static_ref): Fixed indentation in comment.
7300         * java-tree.def (TRY_EXPR): Fixed typo in name.
7301         (CLASS_LITERAL): Likewise.
7302         * java-tree.h: (TYPE_DOT_CLASS): New macro.
7303         (struct lang_type): New field `dot_class'.
7304         * jcf-write.c (generate_bytecode_insns): Fixed error message.
7305         (generate_classfile): Method `class$' is synthetic.
7306         * parse.y (build_do_class_method): New function.
7307         (build_dot_class_method_invocation): Likewise.
7308         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
7309         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
7310         (qualify_ambiguous_name): Likewise.
7311         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
7312         (build_try_statement): Fixed leading comment.
7313
7314 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7315
7316         * class.c (make_field_value): Properly handle sizes.
7317         (get_dispatch_vector): Use tree_low_cst and host_integerp.
7318         (layout_class_method): Count using trees.
7319         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
7320         * expr.c (java_array_data_offset): Use int_bit_position.
7321         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
7322         (build_invokevirtual): Use tree_low_cst and do computations with trees.
7323
7324 2000-03-16  Tom Tromey  <tromey@cygnus.com>
7325
7326         * lang.c (flag_hash_synchronization): New global.
7327         (lang_f_options): Added `hash-synchronization'.
7328         * lang-options.h: Mention -fhash-synchronization.
7329         * java-tree.h (flag_hash_synchronization): Declare.
7330         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
7331         hash table synchronization is disabled.
7332         * decl.c (init_decl_processing): Only push `sync_info' value when
7333         hash table synchronization is disabled.
7334         * class.c (make_class_data): Only push `sync_info' field when hash
7335         table synchronization is disabled.  Removed dead code.
7336
7337 2000-03-16  Tom Tromey  <tromey@cygnus.com>
7338
7339         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
7340
7341 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7342
7343         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
7344         classes.
7345         * parse.y (patch_method_invocation): Handle anonymous classes
7346         creation in static context.
7347
7348 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7349
7350         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
7351         * parse.y (resolve_qualified_expression_name): Use it.
7352         (patch_method_invocation): Likewise.
7353
7354 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7355
7356         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
7357         depending on the type of dependency which dictates what the
7358         current class is.
7359         (unresolved_type_p): Resolved types limited to the current class.
7360
7361 2000-03-15  Tom Tromey  <tromey@cygnus.com>
7362
7363         * decl.c (init_decl_processing): Set type of `sync_info' to be
7364         pointer to Object.
7365
7366         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
7367         Correctly compute bit number for current slot.  Zero `high' and
7368         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
7369         mark_reference_fields.
7370         (mark_reference_fields): New function.
7371
7372 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7373
7374         * parse.y (register_incomplete_type): Fixed initialization of
7375         JDEP_ENCLOSING.
7376
7377 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7378
7379         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
7380         static globals.
7381         (push_class_context, pop_class_context): New function.
7382         (class_body:): Call pop_class_context.
7383         (interface_body:): Likewise.
7384         (INNER_QUALIFIER): New macro.
7385         (report_class_declaration): Changed output format and use
7386         INNER_QUALIFIER. Call push_class_context.
7387
7388 2000-02-14  Andrew Haley  <aph@cygnus.com>
7389
7390         * check-init.c (check_init): Add new cases for unary and binary
7391         tree nodes.
7392
7393 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7394
7395         * parse.y (resolve_package): Set `next' once a type name has been
7396         progressively discovered.
7397         (resolve_qualified_expression_name): Propagate resolution only if
7398         there are remaining qualifiers. Take into account `q' might have
7399         been cleared after re-qualification.
7400         * parse.y (patch_method_invocation): New local `resolved'.
7401         Section dealing with qualified expression rewritten to use
7402         resolve_field_access.
7403
7404 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7405
7406         * parse.h (PUSH_CPC): Fixed indentation.
7407         (DEBUG_CPC): New macro.
7408         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
7409         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
7410         * parse.y (class_body_declaration:): Use
7411         SET_CPC_INSTANCE_INITIALIZER_STMT.
7412         (method_declaration:): Check for null current_function_decl.
7413         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
7414         (java_parser_context_pop_initialized_field): Better handling of
7415         empty lists.
7416         (maybe_make_nested_class_name): Mark nested class name as
7417         qualified when necessary.
7418         (end_class_declaration): Don't call java_parse_context_resume when
7419         one or more error occurred.
7420         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
7421         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
7422         SET_CPC_INITIALIZER_STMT.
7423         (method_header): Check for inner classes declaring static methods.
7424         (resolve_qualified_expression_name): Handle situation where `this'
7425         is implied.
7426
7427 2000-03-13  Hans Boehm <boehm@acm.org>
7428
7429         * typeck.c (build_prim_array_type): Correctly set the high word too.
7430
7431 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7432
7433         * parse.y (java_complete_expand_methods): Leave <clinit> out of
7434         ordinary methods.
7435         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
7436         list of methods for interfaces.
7437
7438 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7439
7440         * parse.y (qualify_ambiguous_name): Properly handle expressions
7441         using `null'.
7442
7443 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7444
7445         * parse.y (check_final_assignment): Extended to process
7446         COMPOUND_EXPR.
7447         (patch_assignment): Have check_final_assignment called only once.
7448
7449 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7450
7451         * java-tree.h (IS_INIT_CHECKED): New flag.
7452         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
7453         * parse.y (patch_string): Call force_evaluation_order on the
7454         completed string concatenation tree.
7455         * expr.c (force_evaluation_order): Call force_evaluation_order on
7456         function's arguments too.
7457
7458 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7459
7460         * decl.c (emit_init_test_initialization): Mark KEY as unused.
7461         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7462         (build_anewarray): Likewise.
7463         * parse.y (patch_newarray): Likewise.
7464         * parse.c: Regenerated.
7465
7466 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
7467
7468         * decl.c (init_decl_processing): Added new class fields `depth',
7469         `ancestors', and `idt' to class_type_node. Use
7470         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
7471         * class.c (make_class_data): Push initial values for new fields.
7472         * java-tree.h: Updated prototype for `build_invokeinterface'.
7473         * expr.c (build_invokeinterface): Changed parameters to accept
7474         `method' tree. Calculate index of `method' in its declaring
7475         interface. Build call to _Jv_LookupInterfaceMethodIdx.
7476         (expand_invoke): Call `build_invokeinterface' with new parameters.
7477         * parse.y (patch_invoke): Call `build_invokeinterface' with new
7478         parameters.
7479
7480 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
7481
7482         * typeck.c (lookup_do): Search superinterfaces first
7483         when looking up an interface method. From Godmar Back
7484         <gback@cs.utah.edu>
7485
7486 2000-03-06  Tom Tromey  <tromey@cygnus.com>
7487
7488         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
7489
7490 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7491
7492         * java-tree.h (lookup_argument_method2): Declared.
7493         (safe_layout_class): Prototype moved from parse.h.
7494         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
7495         * parse.y (java_check_regular_methods): Local `super_class' gone.
7496         Call lookup_argument_method2 instead of lookup_argument_method.
7497         Perform modifier match for methods found declared in implemented
7498         interfaces. Fixed indentation problem. Overriding/hiding error
7499         report to take place only for methods found in classes.
7500         * typeck.c (lookup_argument_method): Changed leading
7501         comment. Re-written by calling lookup_do.
7502         (lookup_argument_method2): New function.
7503         (lookup_java_method): Re-written by calling lookup_do.
7504         (lookup_do): New function.
7505
7506 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7507
7508         * check-init.c (check_init): Removed dead code. Handle (blank)
7509         final variables.
7510         * parse.y (declare_local_variables): New local `final_p', set it
7511         and use it to initialize LOCAL_FINAL.
7512         (check_final_assignment): Only check FIELD_DECLs.
7513
7514 2000-02-17  Tom Tromey  <tromey@cygnus.com>
7515
7516         * Makefile.in (JAVA_OBJS): Added boehm.o.
7517         (boehm.o): New target.
7518         * Make-lang.in (JAVA_SRCS): Added boehm.c.
7519         * java-tree.h (flag_use_boehm_gc): Declare.
7520         (get_boehm_type_descriptor): Declare.
7521         * lang.c (lang_f_options): Added `use-boehm-gc'.
7522         (flag_use_boehm_gc): New global.
7523         * lang-options.h: Added -fuse-boehm-gc.
7524         * boehm.c: New file.
7525         * class.c (get_dispatch_table): If class uses a Boehm type
7526         descriptor, put it in the vtable.
7527         (make_class_data): Removed dead code.
7528
7529 2000-03-03  Per Bothner  <per@bothner.com>
7530
7531         * decl.c (init_decl_processing):  Initialize sizetype properly.
7532
7533 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7534
7535         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
7536         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
7537         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7538         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
7539         (jcf_parse): New local `current'. Load innerclasses seen in outer
7540         context being processed.
7541         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7542         * jcf-write.c (append_innerclasses_attribute): New function.
7543         (append_innerclasses_attribute_entry): Likewise.
7544         (get_access_flags): Handle static classes. Set anonymous and local
7545         classes to be private.
7546         (generate_classfile): Attribute count adjusted. Call
7547         append_innerclasses_attribute.
7548         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
7549         PURE_INNER_CLASS_TYPE_P.
7550         * parse.y (parser_qualified_classname): New parameter `is_static',
7551         produce non qualified name accordingly.
7552         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
7553         (create_interface): Added argument to parser_qualified_classname.
7554         (create_class): Added argument to parser_qualified_classname. Setup
7555         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
7556         (add_inner_class_fields): Fixed indentation.
7557         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
7558         (method_declarator): Fixed typo in comment.
7559         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
7560         (build_current_thisn): Likewise.
7561         (patch_method_invocation): Likewise.
7562
7563 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7564
7565         * decl.c (current_function_decl): Move to toplev.c.
7566
7567 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7568
7569         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
7570         (DECL_BIT_INDEX): Use underlying representation.
7571         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
7572
7573 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7574
7575         * expr.c (build_java_ret): Pass proper type to size_binop.
7576
7577 2000-02-25  Anthony Green  <green@cygnus.com>
7578
7579         * expr.c (build_class_init): Mark the decl to be ignored by
7580         check_init.
7581         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
7582         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
7583         * class.c (init_test_hash_newfunc): New function.
7584         (decl_hash): New function.
7585         (decl_compare): New function.
7586         * decl.c (emit_init_test_initialization): New function.
7587         (complete_start_java_method): Traverse the init test hashtable,
7588         calling emit_init_test_initialization.
7589         (always_initialize_class_p): Define.
7590         * expr.c (build_class_init): Use initialization tests when
7591         emitting class initialization code.
7592         (always_initialize_class_p): Declare.
7593         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
7594         1.
7595         * java-tree.h: Include hash.h.
7596         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
7597         (struct lang_decl): Add init_test_table field.
7598         (init_test_hash_entry): Define.
7599
7600 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7601
7602         * gjavah.c (main): Avoid using `argi' to report unimplemented
7603         options.
7604
7605 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7606
7607         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
7608         initialize locals to avoid warnings. Local `exception_type' moved
7609         into if statement.
7610
7611 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7612
7613         * parse.y (resolve_expression_name): Use `orig' as a second
7614         argument to resolve_field_access.
7615         (resolve_field_access): Removed unnecessary code when dealing with
7616         static fields.
7617
7618 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7619
7620         * class.c (push_super_field): Don't push the field twice.
7621         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
7622         * parse.h (java_reorder_fields): Prototyped.
7623         * parse.y (java_reorder_fields): New function.
7624         (java_layout_class): Simplified not to worry about re-ordering.
7625
7626 2000-02-23  Tom Tromey  <tromey@cygnus.com>
7627
7628         * gjavah.c (print_name): In JNI case, correctly quote string.
7629         (print_method_info): Don't handle overrides in JNI mode.
7630
7631 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7632
7633         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
7634         value type set to `boolean_type_node'.
7635
7636 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
7637
7638         * jcf-dump.c (main): Test for correct condition after
7639         output file creation.
7640
7641 2000-02-19  Anthony Green  <green@cygnus.com>
7642
7643         * jcf-depend.c (add_entry): Fix test for first list entry.
7644
7645 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7646
7647         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
7648         * constants.c (build_constants_constructor): Likewise.
7649
7650 2000-02-19  Anthony Green  <green@cygnus.com>
7651
7652         * jcf-depend.c (add_entry): Add entries to the end of the list.
7653
7654 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
7655
7656         * decl.c (INT_TYPE_SIZE): Define if necessary.
7657         (expand_java_return): Handle the case of a native integer smaller
7658         than a JVM integer.
7659
7660 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7661
7662         * gjavah.c (help): Use GCCBUGURL.
7663         * jv-scan.c (help): Likewise.
7664         * jcf-dump.c (help): Likewise.
7665
7666 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7667
7668         * jcf-write.c (generate_bytecode_insns): Don't generate empty
7669         `finally' clauses.
7670
7671 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7672
7673         * jcf-parse.c (load_class): Call `fatal' if no file containing
7674         the target class are found.
7675
7676 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
7677
7678         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
7679         lex.c, lex.h, and PARSE_H to...
7680         (parse.o, parse-scan.o): ...here, respectively.
7681
7682         * lex.c: Split out code that may trigger SIGFPE from yylex()
7683         to its own function.
7684         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
7685
7686 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7687
7688         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
7689
7690 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7691
7692         * parse.y (outer_field_access_p): Stop in time when outer contexts
7693         are exhausted.
7694         (resolve_qualified_expression_name): Properly qualify *everything*
7695         after a package.type to be resoled as expression names.
7696         (find_applicable_accessible_methods_list): Save/restore `class' to
7697         isolate it from a possible outer context search.
7698
7699 2000-02-15  Tom Tromey  <tromey@cygnus.com>
7700
7701         * gjavah.c (jni_print_char): New function.
7702         (print_full_cxx_name): Use it.
7703         (decode_signature_piece): Likewise.
7704         (print_cxx_classname): Likewise.
7705
7706 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7707
7708         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
7709         version.o.
7710         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
7711
7712         * gjavah.c: Include version.h.
7713
7714         * jcf-dump.c: Likewise.
7715
7716         * jv-scan.c: Likewise.
7717
7718 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7719
7720         * parse.y (outer_field_access_fix): First parameter now a tree
7721         node. Check for assignment to final. First argument to
7722         build_outer_field_access_fix modified to accommodate prototype.
7723         (build_outer_field_access): Don't check for assignment to final
7724         here.
7725         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
7726         possibly returned by outer_field_access_fix. Changed
7727         outer_field_access_fix's first argument.
7728         (check_final_assignment): $finit$'s context is OK.
7729         (patch_unaryop): Use node instead of its line/column value when
7730         calling outer_field_access_fix.
7731
7732 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7733
7734         * parse.y (interface_declaration:): No longer tagged
7735         <node>. Re-installed default action.
7736         (class_member_declaration:): Handle inner interfaces.
7737         (interface_member_declaration): Handle inner interfaces and
7738         classes.
7739         (create_interface): Push error if one seen. Suspend parsing
7740         context when processing an inner interface.
7741         (register_fields): Inner class static field limitations not to
7742         apply to inner interfaces.
7743
7744 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7745
7746         * jcf-parse.c (load_class): Update `java_error_count' when a
7747         class' file can't be found.
7748         (parse.y): Avoid (byte)code generation when errors seen.
7749
7750 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7751
7752         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
7753         decodes a valid node.
7754         (patch_binop): Handle TRUNC_DIV_EXPR.
7755
7756 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7757
7758         * parse.y (resolve_package): New local `acc'. Try to progressively
7759         build and guess a package and type name.
7760
7761 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7762
7763         * parse.y (find_applicable_accessible_methods_list): Load and
7764         layout the search class if necessary.
7765         (java_complete_tree): Keep to original type of the folded initial
7766         value.
7767
7768 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7769
7770         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
7771         Generate error message if circularity is detected. New static
7772         local `list'.
7773         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
7774         * jcf-write.c (generate_bytecode_insns): Very simply handle
7775         SAVE_EXPR.
7776         * parse.y (java_check_circular_reference): Use
7777         `cyclic_inheritance_report' during report, if necessary.
7778         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
7779         walking NEW_ARRAY_INIT twice.
7780
7781 2000-02-09  Tom Tromey  <tromey@cygnus.com>
7782
7783         * parse.y (check_class_interface_creation): Allow inner classes to
7784         be `private' or `protected', check modifiers' consistency. Prevent
7785         block local classes from bearing any modifiers.
7786
7787 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7788
7789         * except.c (check_start_handlers): Re-add prototype lost in last
7790         patch.
7791         (maybe_start_try): Remove excess argument to `check_start_handlers'.
7792
7793 2000-02-09  Andrew Haley  <aph@cygnus.com>
7794
7795         * decl.c (clear_binding_level): Remove excess initializer.
7796         (maybe_poplevels): Remove unused variable.
7797         (force_poplevels): Ditto.
7798         (struct binding_level): Add comment.
7799
7800 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7801
7802         * jcf-write.c (generate_classfile): Don't consider
7803         pre-initialization with reference value (use <clinit> instead.)
7804         * parse.y (java_fix_constructors): No generated constructor for
7805         interfaces.
7806         (build_outer_field_access): Removed debug message.
7807         (outer_field_expanded_access_p): Adapted to bytecode generation.
7808         (build_outer_field_access_method): Use fix_method_argument_names.
7809         (build_outer_method_access_method): Fixed indentation. Added
7810         comment. Handle access method generation for static and also void
7811         methods.
7812         (build_access_to_thisn): Inserted debug message.
7813         (maybe_build_thisn_access_method): Use fix_method_argument_names.
7814         (resolve_qualified_expression_name): Fixed comment.
7815         (not_accessible_p): Adapted to bytecode generation. Added comment.
7816         (patch_method_invocation): Added comment.
7817         (maybe_use_access_method): Fixed leading comment. Handle static
7818         methods.
7819         (java_complete_lhs): Don't shortcut handling of initialized upon
7820         declaration String type static fields when generating bytecode.
7821         (patch_unaryop): Handle outer field access when generating
7822         bytecode.
7823
7824 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7825
7826         * java-tree.h (FIELD_THISN): New macro.
7827         * jcf-write.c (append_synthetic_attribute): New function.
7828         (generate_classfile): Set "Synthetic" attribute on this$<n>,
7829         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
7830         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
7831         this$<n> fields.
7832         (build_outer_field_access): Turned on access functions usage and
7833         generation when compiling to bytecode.
7834         (maybe_use_access_method): Likewise.
7835
7836 2000-01-25  Andrew Haley  <aph@cygnus.com>
7837
7838         * java-except.h (struct eh_range): Add `expanded' field.
7839         (maybe_start_try): Add end_pc arg.
7840         (maybe_end_try): Ditto.
7841         * java-tree.h (force_poplevels): new function.
7842         * expr.c (expand_byte_code): Don't call maybe_start_try or
7843         maybe_end_try.
7844         * except.c (add_handler): Reset expanded.
7845         (expand_start_java_handler): Set expanded.
7846         (check_start_handlers): Don't expand a start handler that's
7847         already been expanded.
7848         (maybe_start_try): Add end_pc arg.  Only expand a handler which
7849         ends after end_pc.
7850         (expand_end_java_handler): call force_poplevels.
7851         (force_poplevels): new function.
7852         * decl.c (binding_level): Add start_pc of binding level.
7853         (maybe_pushlevels): Call maybe_start_try when pushing binding
7854         levels.
7855         (maybe_poplevels): Call maybe_end_try when popping binding levels.
7856         (LARGEST_PC): Define.
7857         (clear_binding_level): Use LARGEST_PC.
7858
7859         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
7860         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
7861         (binding_depth, is_class_level, current_pc): new variables.
7862         (struct binding_level): ditto.
7863         (indent): new function.
7864         (push_jvm_slot): add debugging info.
7865         (maybe_pushlevels): ditto.
7866         (maybe_poplevels): ditto.
7867         (pushlevel): ditto.
7868         (poplevel): ditto.
7869         (start_java_method): ditto.
7870         (give_name_to_locals): comment only.
7871         * except.c (binding_depth, is_class_level, current_pc):
7872         new variables.
7873         (expand_start_java_handler): add debugging info.
7874         (expand_end_java_handler): ditto.
7875
7876 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7877
7878         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
7879         (print_name_for_stub_or_jni, process_file): Constify a char*.
7880
7881 2000-02-03  Tom Tromey  <tromey@cygnus.com>
7882
7883         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
7884
7885 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
7886
7887         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
7888         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
7889         defined to be 1.
7890
7891 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7892
7893         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
7894         * java-tree.h (TYPE_II_STMT_LIST): New macro.
7895         (struct lang_type): New field `ii_block'.
7896         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
7897         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
7898         * parse.h (struct parser_ctxt): New field `instance_initializers'.
7899         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
7900         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
7901         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
7902         macros.
7903         * parse.y (add_instance_initializer): New function.
7904         (in_instance_initializer): New static global.
7905         (class_body_declaration:): Link instance initializer block.
7906         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
7907         (array_creation_expression:): Remove unused local.
7908         (java_parser_context_push_initialized_field): Fixed leading
7909         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
7910         CPC_INSTANCE_INITIALIZER_LIST.
7911         (java_parser_context_pop_initialized_field): Likewise.
7912         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
7913         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
7914         CPC_INITIALIZER_STMT.
7915         (fix_constructors): New local `class_type'. Use it. Call
7916         add_instance_initializer.
7917         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
7918         (patch_return): Forbid return in instance initializers.
7919         (patch_throw_statement): Enforce exception handling in the context
7920         of instance initializers.
7921
7922 2000-02-03  Tom Tromey  <tromey@cygnus.com>
7923
7924         * Make-lang.in (java.mostlyclean): Remove executables in
7925         `mostlyclean'.
7926
7927 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
7928
7929         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
7930         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
7931         (java_float_finite): Convert to use union Word from javaop.h.
7932         (java_double_finite): Convert to use union DWord from javaop.h.
7933
7934 2000-02-02  Tom Tromey  <tromey@cygnus.com>
7935
7936         * gjavah.c (options): Added `jni' entry.
7937         (help): Document -jni.
7938         (flag_jni): New global.
7939         (process_file): Handle JNI output.  Don't print text from
7940         -prepend, -add, etc, when generating stubs.  Only remove `.class'
7941         suffix if it actually exists.
7942         (main): Create a `.c' file when run with `--jni --stubs'.  Create
7943         correct output file name with `--jni'.
7944         (print_include): Mangle header name differently in JNI case.
7945         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
7946         method list.
7947         (print_method_info): Handle JNI case.  Put signature info into
7948         method name.  Handle case when STREAM is NULL.
7949         (print_name_for_stub_or_jni): New function.
7950         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
7951         (print_cxx_classname): Handle JNI.
7952         (print_full_cxx_name): Likewise.
7953         (decode_signature_piece): Likewise.
7954         (overloaded_jni_method_exists_p): New function.
7955         (struct method_name): Added `signature' and `sig_length' fields.
7956         (HANDLE_END_FIELD): Do nothing in JNI mode.
7957
7958 2000-02-02  Tom Tromey  <tromey@cygnus.com>
7959
7960         * jv-scan.c: Include version.c, <getopt.h>.
7961         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
7962         (options): New array.
7963         (usage): New function.
7964         (version): New function.
7965         (main): Use getopt_long to parse command line.
7966         * jcf-dump.c: Include version.c, <getopt.h>.
7967         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
7968         OPT_JAVAP): New macros.
7969         (options): New array.
7970         (usage): Return `void'.  Changed message.
7971         (help): New function.
7972         (version): New function.
7973         (main): Use getopt_long_only to parse command line.
7974         * gjavah.c: Include <getopt.h>.
7975         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
7976         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
7977         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
7978         (options): New array.
7979         (java_no_argument): Removed.
7980         (help): Updated with missing options.
7981         (main): Use getopt_long_only to parse command line.
7982         (usage): Changed message.
7983
7984 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7985
7986         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
7987         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
7988         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
7989         * parse.y (array_creation_expression:): Handle anonymous arrays.
7990         (build_array_from_name): Don't set `ret_name' if null.
7991         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
7992         (qualify_ambiguous_name): Likewise.
7993         (java_complete_expand_class): Likewise.
7994
7995 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7996
7997         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
7998         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
7999         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
8000         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
8001         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
8002         AIPL_FUNCTION_COMPLETED_INVOCATION.
8003         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
8004         AIPL_FUNCTION_INVOCATION_READY.
8005         (AIPL_FUNCTION_DECLARATION): New enum entry.
8006         * parse.y (reorder_static_initialized): New function.
8007         (java_parser_context_pop_initialized_field): Use it.
8008         (add_inner_class_fields): Use
8009         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
8010         augmented. Install marker after last alias initializer, if any.
8011         (generate_finit): Fixed typo. Don't try to retain only the used
8012         fields.
8013         (method_header): Compute and set DECL_FUNCTION_NAP.
8014         (method_declarator): Fixed comment. Insert alias initializer in
8015         parameter list.
8016         (build_alias_initializer_parameter_list): Fixed leading
8017         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
8018         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
8019         (java_complete_expand_class): Code to retain only used aliases
8020         removed.
8021         (java_complete_expand_methods): New local `first_decl'. Generate
8022         $finit$ first, then expand the constructors, regular methods and
8023         <clinit>.
8024         (java_complete_expand_method): Don't report error on missing
8025         return statement if previously detected bogus.
8026         (fix_constructors): Don't patch constructor parameters list.
8027         (patch_method_invocation): Use new AIPL enum values. Reverse
8028         alias initializer list for anonymous classes.
8029
8030 2000-01-30  Anthony Green  <green@redhat.com>
8031
8032         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
8033         determine how many stack slots to pop.
8034
8035 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8036
8037         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
8038         error handling/recovery.
8039         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
8040
8041 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8042
8043         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
8044         FIELD_LOCAL_ALIAS_USED): New macros.
8045         (DECL_FUNCTION_NAP): New macro.
8046         (struct lang_decl): New field `nap'.
8047         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
8048         (struct lang_type): New fields `finit_stmt_list' and
8049         `clinit_stmt_list'.
8050         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
8051         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
8052         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
8053         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
8054         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
8055         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
8056         (BUILD_THROW): Macro line separator re-indented.
8057         * parse.y (end_class_declaration): New function.
8058         (maybe_generate_pre_expand_clinit): New name for
8059         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
8060         pre-expand static fields.
8061         (maybe_generate_clinit): Function deleted.
8062         (check_for_static_method_reference): Prototype's parameter list
8063         indented.
8064         (generate_finit): New name for maybe_generate_finit. Changed
8065         leading comment. Function rewritten to use
8066         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
8067         (build_alias_initializer_parameter_list): New function.
8068         (java_parser_context_pop_initialized_field): Likewise.
8069         (add_inner_class_fields): Likewise.
8070         (type_declaration:): Call end_class_declaration.
8071         (class_member_declaration:): Likewise.
8072         (formal_parameter_list:): Fixed typos.
8073         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
8074         element. Improved error handling.
8075         (block_statement:): Call end_class_declaration.
8076         (anonymous_class_creation:): Likewise.
8077         (create_anonymous_class): Fixed comments.
8078         (create_class): Call add_inner_class_fields.
8079         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
8080         (method_header): Use MARK_FINAL_PARMS.
8081         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
8082         (method_declarator): Propagate final argument flag.
8083         (craft_constructor): New local `artificial'. Call
8084         build_alias_initializer_parameter_list. Use
8085         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
8086         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
8087         necessary.
8088         (complete_expand_class): Get rid of unused outer context local
8089         alias fields.
8090         (java_complete_expand_methods): Fixed leading
8091         comment. Generate/pre-expand <clinit> first. Changed method
8092         expansion order to regular, $finit$, constructors, <clinit>.
8093         (java_complete_expand_method): Set current_function_decl.
8094         (fix_constructors): Fix constructor parameter list to account for
8095         outer context local alias initializers.
8096         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8097         (resolve_expression_name): Lookup outer context local aliases. New
8098         local `access', use it.
8099         (patch_method_invocation): Patch inner class ctor invocation with
8100         outer context local aliases initialization values. $finit$
8101         invocation patching now includes things generated with
8102         build_alias_initializer_parameter_list.
8103         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8104         (build_super_invocation): Likewise.
8105         (patch_assignment): Changed comment.
8106
8107 2000-01-27  Andrew Haley  <aph@cygnus.com>
8108
8109         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
8110         (emit_if): Ditto.
8111         (emit_jsr): Ditto.
8112
8113 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8114
8115         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
8116         concatenation.
8117         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
8118
8119         * parse.y (register_fields): Don't pass a format specifier to
8120         OBSOLETE_MODIFIER_WARNING.
8121         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
8122         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
8123         specifier.
8124         (check_modifiers): Change function into a macro.
8125         (check_class_interface_creation): Pass a literal format string.
8126
8127 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8128
8129         * buffer.h: PROTO -> PARAMS.
8130         * check-init.c: Likewise.
8131         * class.c: Likewise.
8132         * constants.c: Likewise.
8133         * convert.h: Likewise.
8134         * decl.c: Likewise.
8135         * except.c: Likewise.
8136         * expr.c: Likewise.
8137         * gjavah.c: Likewise.
8138         * java-except.h: Likewise.
8139         * java-tree.h: Likewise.
8140         * jcf-depend.c: Likewise.
8141         * jcf-dump.c: Likewise.
8142         * jcf-parse.c: Likewise.
8143         * jcf-path.c: Likewise.
8144         * jcf-reader.c: Likewise.
8145         * jcf-write.c: Likewise.
8146         * jcf.h: Likewise.
8147         * jv-scan.c: Likewise.
8148         * jvgenmain.c: Likewise.
8149         * jvspec.c: Likewise.
8150         * lang.c: Likewise.
8151         * lex.c: Likewise.
8152         * lex.h: Likewise.
8153         * parse-scan.y: Likewise.
8154         * parse.h: Likewise.
8155         * parse.y: Likewise.
8156         * typeck.c: Likewise.
8157         * verify.c: Likewise.
8158         * xref.c: Likewise.
8159         * xref.h: Likewise.
8160         * zextract.c: Likewise.
8161         * zipfile.h: Likewise.
8162
8163 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8164
8165         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8166         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
8167         * constants.c (build_constant_data_ref): Check for cached
8168         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
8169         in TYPE_CPOOL_DATE_REF.
8170         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
8171         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
8172         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
8173         (LOCAL_FINAL): New macro.
8174         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
8175         constant pool -- don't try to reuse.
8176         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
8177         TYPE_LANG_SPECIFIC.
8178         (find_in_current_zip): Use TYPE_JCF.
8179         * parse.h (java_check_final): Prototype removed.
8180         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
8181         (maybe_create_class_interface_decl,
8182         check_class_interface_creation): Likewise.
8183         (java_expand_finals): Function removed.
8184         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
8185         (block_statement:): Fixed comment.
8186         (anonymous_class_creation:): Likewise.
8187         (check_class_interface_creation): Reversed Jan 12, 2000 extra
8188         argument patch.
8189         (check_class_interface_creation): Loosened error report on (inner)
8190         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
8191         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
8192         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
8193         argument patch.
8194         (create_interface): Likewise.
8195         (anonymous_class_counter): New static global.
8196         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
8197         patch. Fixed comments.
8198         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
8199         anonymous_class_counter when declaring a toplevel class.
8200         (craft_constructor): Fixed constructor name when handling
8201         anonymous classes. Anonymous class constructors to feature hidden
8202         this$<n> parameter.
8203         (java_fix_constructors): Added comment.
8204         (java_check_final): Function removed.
8205         (java_complete_expand_methods): Fixed comment. Don't generate
8206         class data, save its outgoing constant pool instead.
8207         (verify_constructor_super): Skip anonymous class constructor
8208         hidden this$<n> parameter.
8209         (java_expand_classes): New local `saved_ctxp'. Removed call to
8210         java_expand_finals and java_check_final. Expand anonymous class
8211         constructors. Generate class data.
8212         (build_super_invocation): Skip anonymous class hidden this$<n>
8213         parameter.
8214         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
8215         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8216         (set_java_signature): Likewise.
8217
8218 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8219
8220         * gjavah.c: Delete ACC_VISIBILITY define.
8221         * jcf.h: Add ACC_VISIBILITY define.
8222         * parse.y: final: rule tagged <value>.
8223         (java_check_regular_methods): Use ACC_VISIBILITY define for
8224         default package access check.
8225         (local_variable_declaration_statement): Use final: rule.
8226
8227 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
8228
8229         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
8230         (final:): New rule.
8231
8232 2000-01-17  Tom Tromey  <tromey@cygnus.com>
8233
8234         * gjavah.c (print_field_info): Allow non-static final fields.
8235
8236 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8237
8238         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
8239         * parse.y (patch_anonymous_class): New function.
8240         (create_anonymous_class): Register incomplete type when the
8241         class/interface to extends/implement isn't known yet.
8242         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
8243         (verify_constructor_super): Tuned error message.
8244
8245 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8246
8247         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
8248         (ANONYMOUS_CLASS_P): New macro.
8249         (TYPE_SIGNATURE, TYPE_JCF): New macros.
8250         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
8251         * parse.y (create_class): Added leading argument.
8252         (maybe_create_class_interface_decl,
8253         check_class_interface_creation): Likewise.
8254         (craft_constructor): New function.
8255         (verify_constructor_super): Added argument in prototype.
8256         (class_declaration:): Inserted leading argument.
8257         (for_begin:): Use FOR_LOOP_P.
8258         (anonymous_class_creation): Create WFL of the anonymous class to
8259         instantiate. Call build_new_invocation. Added comments.
8260         (check_class_interface_creation): Handle parameter `anonymous' in
8261         verbose mode class creation announce.
8262         (link_nested_class_to_enclosing): Exclude anonymous classes.
8263         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
8264         anonymous class, even though they appear to have an enclosing
8265         context.
8266         (create_interface): Pass extra argument to
8267         check_class_interface_creation.
8268         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
8269         (create_class): Call check_class_interface_creation and
8270         maybe_create_class_interface_decl with extra new argument. Don't
8271         add private this$<n> to anonymous classes.
8272         (method_declarator): Insert hidden this$<n> to anonymous class
8273         constructors.
8274         (java_fix_constructors): Deleted code creating default
8275         constructor. Call craft_constructor instead.
8276         (java_check_regular_methods): Set `saw_constructor' to 1 for
8277         anonymous classes.
8278         (fix_constructors): Pass extra argument to verify_constructor_super.
8279         (verify_constructor_super): New local `sdecl', use it. Search for
8280         matching constructor (possibly featuring arguments) in super
8281         class.
8282         (lookup_method_invoke): Craft constructor according to arguments
8283         list when dealing with anonymous class constructors.
8284         (build_super_invocation): Pass arguments to anonymous class super
8285         constructors.
8286         (search_loop): Use FOR_LOOP_P.
8287         (labeled_block_contains_loop_p): Likewise.
8288
8289 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8290
8291         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
8292         (enclosing_context_p): New function.
8293         (get_access_flags_from_decl): Handle CLASS_STATIC.
8294         (maybe_layout_super_class): Extra first argument passed to
8295         do_resolve_class.
8296         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
8297         ID_INIT_P.
8298         * decl.c (access0_identifier_node): New global.
8299         (init_decl_processing): access0_identifier_node initialized.
8300         (pushdecl): Set DECL_CONTEXT only on non type decls.
8301         * expr.c (lookup_field): Lookup inner class fields in enclosing
8302         contexts.
8303         (expand_invoke): Use ID_INIT_P.
8304         (expand_java_field_op): Use DECL_CLINIT_P.
8305         * java-tree.def (CLASS_LITERAL): New tree code.
8306         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
8307         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
8308         (struct lang_decl): New field `inner_access'.
8309         (enclosing_context_p): Prototyped.
8310         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
8311         ID_CLINIT_P): New macros.
8312         (CLASS_STATIC): New macro.
8313         (CLASS_ACCESS0_GENERATED_P): New macro.
8314         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
8315         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
8316         INNER_CLASS_P): New macros.
8317         (DECL_INNER_CLASS_LIST): New macro.
8318         * jcf-parse.c (yyparse): Avoid the use of ANSI string
8319         concatenation.
8320         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
8321         the shift value to int. Fixed typo in comment.
8322         * lex.c (inst_id, wpv_id): Initialize.
8323         * mangle.c (unicode_mangling_length): Take `$' into account.
8324         * parse.h (DRECOVER, RECOVER): Terminate properly.
8325         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
8326         (typedef struct _jdep): New field `enclosing'.
8327         (JDEP_ENCLOSING): New macro.
8328         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
8329         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
8330         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
8331         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
8332         GET_ENCLOSING_CPC_CONTEXT): New macros.
8333         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
8334         (do_resolve_class): Added extra argument in prototype.
8335         * parse.y (resolve_class): Added extra argument in prototype.
8336         (maybe_create_class_interface_decl): Likewise.
8337         (maybe_use_access_method, build_wfl_wrap): New functions.
8338         (java_complete_expand_classes, java_complete_expand_class):
8339         Likewise.
8340         (java_parser_context_push_initialized_field,
8341         java_parser_context_suspend, java_parser_context_resume):
8342         Likewise.
8343         (maybe_make_nested_class_name, make_nested_class_name,
8344         set_nested_class_simple_name_value,
8345         link_nested_class_to_enclosing, find_as_inner_class,
8346         find_as_inner_class_do, check_inner_class_redefinition,
8347         build_thisn_assign, build_current_thisn, build_access_to_thisn,
8348         maybe_build_thisn_access_method, build_outer_field_access,
8349         build_outer_field_access_methods, build_outer_field_access_expr,
8350         build_outer_method_access_method, build_new_access_id,
8351         build_outer_field_access_method, outer_field_access_p,
8352         outer_field_expanded_access_p, outer_field_access_fix,
8353         build_incomplete_class_ref, patch_incomplete_class_ref,
8354         create_anonymous_class): Likewise.
8355         (inst_id, wpv_id): New static global variables.
8356         (synchronized:): New rule, tagged <node>.
8357         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
8358         rules.
8359         (anonymous_class_creation:): New rule, tagged <node>.
8360         (NEW_TK): Tagged <node>.
8361         (type_literals, array_type_literal): New rules, tagged <node>.
8362         (class_declaration:): Removed action when reducing by class_body:
8363         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
8364         using GET_CPC in sub-rules.
8365         (class_member_declaration): Handle inner classes.
8366         (method_declaration): When reducing method_header:, reset
8367         current_function_decl when appropriate.
8368         (method_declarator:): Set the number of formal parameter to 0 for
8369         method declared without arguments.
8370         (constructor_declarator:): Likewise.
8371         (static_initializer:): List of elements kept in a list.
8372         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
8373         use of the keyword `static' for type declarations.
8374         (block_statement:): Handle inner class declarations.
8375         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
8376         type qualified `this'.
8377         (class_instance_creation_expression): Use anonymous_class_creation:
8378         to handle inner class instances creation. Handle qualified `new'.
8379         (something_dot_new): Added appropriate actions.
8380         (create_new_parser_context): New function.
8381         (java_push_parser_context, java_parser_context_save_global,
8382         java_parser_context_suspend): Use create_new_parser_context.
8383         (check_modifiers): Changed leading comment.
8384         (check_class_interface_creation): Handle interclasses.
8385         (add_superinterfaces): Fixed comment.
8386         (create_interface): Build qualified name from the raw_name instead
8387         of its matching WFL. Push the initialized fields list. raw_name added
8388         as an extra argument to maybe_create_class_interface_decl.
8389         (create_class): Build qualified name from the raw_name instead of
8390         its matching WFL. Removed assignment to current_parsed_class_un.
8391         Call PUSH_ERROR before returning an error. Suspend the current
8392         parser context when processing an inner class. Push the
8393         initialized fields list. raw_name added as an extra argument to
8394         maybe_create_class_interface_decl. Add the private this$<n>
8395         field.
8396         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
8397         (register_fields): Get the class type from GET_CPC and handle
8398         previous errors.  Added code to handle the creation of static
8399         fields in inner classes. Initialized fields initialization
8400         statements kept in a list of lists.
8401         (maybe_generate_finit): Initialized fields initialization
8402         statements kept in a list of lists. Use GET_CPC.
8403         (maybe_generate_clinit): Likewise.
8404         (method_header): Use GET_CPC and GET_CPC_UN.
8405         (parser_qualified_classname): Handle inner classes.
8406         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
8407         (java_fix_constructors): Hide pointer to enclosing context
8408         instance in constructor list when dealing with inner classes.
8409         (jdep_resolve_class): Call resolve_class with extra first argument
8410         JDEP_ENCLOSING.
8411         (resolve_class): Add enclosing context as a first extra argument
8412         to do_resolve_class.
8413         (do_resolve_class): Call find_as_inner_class. Handle WFLs
8414         properly.
8415         (resolve_no_layout): Extra argument added to resolve_class
8416         invocation.
8417         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
8418         (java_get_real_method_name): Use GET_CPC_UN.
8419         (check_abstract_method_definitions): Use DECL_CLINIT_P.
8420         (java_check_abstract_methods): Handle static method declared in
8421         inner classes by an error.
8422         (java_check_regular_methods): Use DECL_CLINIT_P.
8423         (source_start_java_method): Also set DECL_MAX_LOCALS.
8424         (create_artificial_method): Call java_parser_context_save_global
8425         and java_parser_context_restore_global instead of saving/restoring
8426         the context by hand.
8427         (expand_start_java_method): Improved verbose mode message.
8428         (java_complete_expand_methods): Fixed leading comment. Use
8429         DECL_CLINIT_P.
8430         (fix_constructors): Added assignment to this$<n> if necessary.
8431         (java_expand_classes): Call java_complete_expand_classes instead
8432         of java_complete_expand_methods.
8433         (make_qualified_primary): Simplified.
8434         (merge_qualified_name): Optimized for missing left or right parts.
8435         (resolve_expression_name): Handle access to outer class fields from
8436         interclasses.
8437         (resolve_qualified_expression_name): New macro
8438         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
8439         classes. Report error on non appropriate qualification of
8440         `new'. Handle qualified `this'.
8441         (not_accessible_p): Allow access to outer class private fields from
8442         inner classes.
8443         (patch_method_invocation): Handle method invocations through
8444         access methods and inner class constructor invocations.
8445         (find_applicable_accessible_methods_list): Search enclosing
8446         contexts of an inner class.
8447         (search_applicable_methods_list): Fixed typo.
8448         (argument_types_convertible): Handle inner class constructors'
8449         hidden outer context reference argument.
8450         (qualify_ambiguous_name): Handle qualified `this'.
8451         (java_complete_lhs): Handle use of field accessed through
8452         artificial access methods in various cases of assignments. Handle
8453         CLASS_LITERAL node.
8454         (check_final_assignment): Use DECL_CLINIT_P.
8455         (valid_ref_assignconv_cast_p): Handle the destination being an
8456         enclosing context of the source.
8457         (patch_unaryop): Handle use of field accessed through artificial
8458         access methods.
8459         (patch_return): Use DECL_CLINIT_P.
8460         (patch_throw_statement): Use DECL_CLINIT_P.
8461         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
8462         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
8463         ID_INIT_P.
8464
8465 2000-01-16  Anthony Green  <green@cygnus.com>
8466
8467         * parse.y (build_string_concatenation): Only use
8468         StringBuffer(String) shortcut if String arg is constant.
8469
8470 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8471
8472         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
8473         the shift value to int. Fixed typo in comment.
8474
8475 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
8476
8477         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
8478         * jcf-write.c: Likewise.
8479         * parse.y: Likewise.
8480         * parse.c: Regenerate.
8481
8482 2000-01-09  Anthony Green  <green@cygnus.com>
8483
8484         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
8485         bytecodes in the correct order.
8486
8487 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8488
8489         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
8490
8491 2000-01-06  Anthony Green  <green@cygnus.com>
8492
8493         * expr.c (java_lang_expand_expr): Switch to permanent obstack
8494         before building constant array decl.
8495
8496 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8497
8498         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
8499         method invocation and typo in conditional expression.
8500         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
8501         the appropriate NOTE_POP.
8502         * parse.y (patch_binop): Shift value mask to feature the right
8503         type.
8504
8505 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8506
8507         * class.c (assume_compiled, assume_compiled_node): Add static
8508         prototype.
8509         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
8510
8511         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
8512
8513         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
8514
8515         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
8516         to `__modifier' to avoid stringifying it.
8517
8518         * parse.y (verify_constructor_circularity): Don't call a variadic
8519         function with a non-literal format string.
8520         (java_check_abstract_methods): Move unreachable code inside
8521         `continue' statement.
8522         (lookup_method_invoke): Call xstrdup, not strdup.
8523
8524         * expr.c (expand_java_field_op): Avoid the use of ANSI string
8525         concatenation.
8526
8527         * jcf-parse.c (yyparse): Likewise.
8528
8529         * jv-scan.c (main): Likewise.
8530
8531 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8532
8533         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
8534         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
8535         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
8536         concatenation.
8537
8538         * parse.y (synchronized, variable_redefinition_error,
8539         check_class_interface_creation, create_interface, create_class,
8540         method_header, finish_method_declaration,
8541         check_modifiers_consistency, method_declarator,
8542         complete_class_report_errors, check_abstract_method_definitions,
8543         java_check_regular_methods, check_throws_clauses,
8544         java_check_abstract_methods, read_import_dir,
8545         check_pkg_class_access, declare_local_variables, fix_constructors,
8546         cut_identifier_in_qualified, resolve_expression_name,
8547         resolve_qualified_expression_name, patch_method_invocation,
8548         java_complete_lhs, patch_assignment, try_builtin_assignconv,
8549         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
8550         patch_exit_expr, patch_exit_expr, patch_switch_statement,
8551         patch_try_statement, patch_synchronized_statement,
8552         patch_throw_statement, check_thrown_exceptions,
8553         patch_conditional_expr): Likewise.
8554
8555 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8556
8557         * Makefile.in (LIBDEPS): Added gcc's errors.o
8558         (../jcf-dump$(exeext):): Link with gcc's errors.o
8559         (../gcjh$(exeext):): Likewise.
8560         * expr.c (expand_java_NEW): Layout the entire target type instead of
8561         laying out its methods only.
8562         (lookup_field): Layout the class after having loaded it.
8563         * java-tree.h (java_debug_context): Declared.
8564         * jcf-io.c (toplev.h): Included.
8565         (find_class): Removed assignment to jcf's outofsynch
8566         field. Force source file to be read if newer than its matching
8567         class file. Tweaked debug messages.
8568         * jcf-parse.c (jcf_out_of_synch): Deleted.
8569         (read_class): Call to jcf_out_of_synch removed.
8570         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
8571         (jcf_out_of_synch): Prototype deleted.
8572         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
8573         `deprecated' and `class_err': integer turned into bit-fields.
8574         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
8575         * parse.y (package_list): New global.
8576         (package_declaration:): Record newly parsed package name.
8577         (extra_ctxp_pushed_p): Static global deleted.
8578         (java_parser_context_save_global): Create buffer context for the
8579         purpose of saving globals, if necessary.
8580         (java_parser_context_restore_global): Pop context pushed for the
8581         purpose of saving globals, if necessary.
8582         (java_debug_context_do): New prototype and function.
8583         (java_debug_context): Likewise.
8584         (do_resolve_class): Use already parsed package names to qualify
8585         and lookup class candidate.
8586         (java_pre_expand_clinit): Removed unnecessary local variable.
8587
8588 1999-12-17  Tom Tromey  <tromey@cygnus.com>
8589
8590         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
8591         fixes PR gcj/119.
8592         (process_file): Use `\n\' at end of each line in string.
8593
8594 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8595
8596         * expr.c (expand_invoke): Layout the loaded class before
8597         attempting to use it.
8598         (expand_java_field_op): Allow final field assignments to take
8599         place in $finit$.
8600         * typeck.c (convert): Return error_mark_node if expr is null.
8601
8602 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8603
8604         * class.c (class_depth): Return -1 if the class doesn't load
8605         properly.
8606         * expr.c (can_widen_reference_to): Check for errors during depth
8607         computation and return 0 accordingly.
8608         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
8609         create default constructors and add an other error check.
8610         * parse.h (java_fix_constructors): Prototyped.
8611         * parse.y (java_pre_expand_clinit): Likewise.
8612         (build_super_invocation): Re-prototyped to feature one argument.
8613         (java_check_circular_reference): Directly use `current'.
8614         (java_fix_constructors): New function.
8615         (java_check_regular_methods): Don't create default constructors
8616         here, but abort if none were found.
8617         (java_complete_expand_methods): Pre-process <clinit> calling
8618         java_pre_expand_clinit.
8619         (java_pre_expand_clinit): New function.
8620         (fix_constructors): build_super_invocation invoked with the
8621         current method declaration as an argument.
8622         (build_super_invocation): Use the context of the processed method
8623         decl argument instead of current_class.
8624         * typeck.c (lookup_java_method): Take WFLs in method names into
8625         account.
8626
8627 1999-12-14  Per Bothner  <per@bothner.com>
8628
8629         * class.c (make_class_data): flag_keep_inline_functions to keep
8630         private methods in the method array.
8631
8632 1999-12-15  Anthony Green  <green@cygnus.com>
8633
8634         * check-init.c (check_init): Take into account both types of
8635         `throw's when checking for uninitialized variables.
8636
8637 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8638
8639         * parse.y (java_complete_lhs): Force conversion of array
8640         dimensions to int_type_node, that's what runtime's ABI expects.
8641
8642 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8643
8644         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
8645         operand of a WFL, until the Java front-end gets fixed with regard
8646         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
8647
8648 1999-12-10  Andrew Haley  <aph@cygnus.com>
8649
8650         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
8651         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
8652         expr.c (build_java_athrow): Add support for sjlj-exceptions.
8653         java-tree.h: Ditto.
8654         jcf-write.c: Ditto.
8655
8656 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8657
8658         * expr.c (java_lang_expand_expr): Switch to permanent obstack
8659         before calling expand_eh_region_start and expand_start_all_catch.
8660         * except.c (expand_start_java_handler): Switch to permanent
8661         obstack before calling expand_eh_region_start.
8662         (expand_end_java_handler): Switch to permanent obstack before
8663         calling expand_start_all_catch.
8664
8665 1999-12-5  Anthony Green  <green@cygnus.com>
8666
8667         * decl.c (init_decl_processing): Mark throw_node as a noreturn
8668         function with side effects.
8669         (init_decl_processing): Mark all memory allocating DECLs with
8670         DECL_IS_MALLOC.
8671
8672 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8673
8674         * except.c (expand_end_java_handler): Call
8675         expand_resume_after_catch and end_catch_handler.
8676
8677 1999-11-30  Anthony Green  <green@cygnus.com>
8678
8679         * verify.c (verify_jvm_instructions): Create new return label
8680         chain if non existent (don't rely on the verified state of the jsr
8681         target.)
8682
8683 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8684
8685         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
8686         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
8687
8688         * parse.y (patch_assignment): Removed bogus final class test on
8689         lhs when checking on whether to emit an ArrayStoreException runtime
8690         check.
8691         * expr.c (expand_java_arraystore): Likewise.
8692
8693 1999-11-28 Anthony Green <green@cygnus.com>
8694
8695         * decl.c (find_local_variable): Reuse single slot decls when
8696           appropriate.
8697
8698 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8699
8700         * jcf-parse.c (saw_java_source): Global variable removed.
8701         (read_class): Don't use `saw_java_source'. Added extra braces.
8702         (yyparse): Code setting `saw_java_source' removed.
8703
8704 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
8705
8706         * except.c (emit_handlers): Zero catch_clauses after emitting them.
8707
8708 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8709
8710         * verify.c (merge_type_state): Non verified subroutines being
8711         considered more than once to trigger passive type merge.
8712
8713 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8714
8715         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
8716         in case of error. Error message tuned.
8717
8718 1999-11-21  Anthony Green  <green@cygnus.com>
8719
8720         * constants.c (find_methodref_index): Unwrap method names before
8721         inserting them in the constant pool.
8722
8723         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
8724
8725         * class.c (assume_compiled_node): New typedef.
8726         (assume_compiled_tree): New static data.
8727         (find_assume_compiled_node): New function.
8728         (add_assume_compiled): New function.
8729         (assume_compiled): New function.
8730         * class.c (make_class_data): Use assume_compiled.
8731         (is_compiled_class): Use assume_compiled.
8732
8733         * java-tree.h (add_assume_compiled): Declare.
8734
8735         * lang.c (lang_decode_option): Parse new options.
8736
8737 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8738
8739         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
8740         int_type_node: that's what `_Jv_AllocObject' expects.
8741
8742 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8743
8744         * parse.y (lookup_method_invoke): Use lang_printable_name to
8745         reliably build the type name during error report. Fixes PR gcj/97.
8746
8747 1999-11-09  Tom Tromey  <tromey@cygnus.com>
8748
8749         * jcf-path.c: Include <sys/stat.h>.
8750         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
8751         (DIR_UP): New macro.
8752
8753 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8754
8755         * parse.y (source_end_java_method): Resume permanent allocation,
8756         reversing Apr 27 1998 patch.
8757         (patch_string_cst): Pop obstacks after having pushed the permanent
8758         ones.
8759
8760 1999-11-05  Tom Tromey  <tromey@cygnus.com>
8761
8762         * class.c (finish_class): Emit inlined methods if any native
8763         methods exist in the class.  Fixes PR gcj/85.
8764
8765 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8766
8767         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
8768         (qualify_ambiguous_name): Likewise.
8769
8770 1999-11-03  Godmar Back <gback@cs.utah.edu>
8771
8772         * typeck.c: (lookup_java_method):  search all inherited
8773         interfaces when looking up interface method.
8774
8775 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8776
8777         * parse.y (method_header:): Issue error message for rule `type
8778         error'.
8779         (synchronized:): Error report when not using synchronized.
8780
8781 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8782
8783         * parse.y (resolve_qualified_expression_name): Prevent `this' from
8784         being used before the superclass constructor has been called.
8785         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
8786         instead of `CALL_THIS_CONSTRUCTOR_P'.
8787
8788 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
8789
8790         * check-init.c: Fix typo in comment.
8791
8792 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8793
8794         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
8795         and final method.
8796
8797 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8798
8799         * parse.y (expression_statement:): Call function to report
8800         improper invocation of a constructor.
8801         (parse_ctor_invocation_error): New function.
8802
8803 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
8804
8805         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
8806         remember_end_note.
8807
8808 1999-10-21  Tom Tromey  <tromey@cygnus.com>
8809
8810         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
8811         in generated `main'.
8812
8813 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8814
8815         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
8816         (qualify_ambiguous_name): Likewise.
8817
8818 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8819
8820         * parse.y (java_complete_tree): fold_constant_for_init to work on
8821         permanent_obstack.
8822         (java_complete_lhs): Likewise.
8823         (array_constructor_check_entry): Complete an initializer element
8824         on permanent_obstack.
8825
8826 1999-10-19  Tom Tromey  <tromey@cygnus.com>
8827
8828         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
8829         From Mike Moreton <mike@pillim.demon.co.uk>.
8830
8831 1999-10-15  Greg McGary  <gkm@gnu.org>
8832
8833         * java-tree.h (flag_bounds_check): Remove extern decl.
8834         * lang.c (flag_bounds_check): Remove global variable.
8835         (lang_f_options): Remove "bounds-check" entry.
8836         (lang_init_options): Default flag_bounds_check to "on".
8837
8838 1999-10-14  Tom Tromey  <tromey@cygnus.com>
8839
8840         * jvgenmain.c (usage): New function.
8841         (main): Use it.  Also, handle `-D' options.
8842         * jvspec.c (lang_specific_driver): Recognize -D.
8843         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
8844
8845         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
8846
8847 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8848
8849         * jcf-dump.c (print_constant, disassemble_method): Don't call a
8850         variadic function with a non-literal format string.
8851
8852         * parse-scan.y (report_main_declaration): Likewise.
8853
8854         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
8855
8856         * parse.y (read_import_dir, patch_assignment, patch_binop,
8857         patch_array_ref): Likewise.
8858
8859         * typeck.c (build_java_array_type): Likewise.
8860
8861         * verify.c (verify_jvm_instructions): Likewise.
8862
8863 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8864
8865         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
8866
8867 1999-10-07  Anthony Green  <green@cygnus.com>
8868
8869         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
8870         where CHECK_PUT may fail for valid reasons.
8871
8872         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
8873         UNSAFE_PUTN): New macros.
8874
8875 1999-10-04  Tom Tromey  <tromey@cygnus.com>
8876
8877         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
8878         well.  Fixes Java PR gcj/59.
8879         * parse-scan.y (yyerror): Report errors.
8880
8881 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
8882
8883         * decl.c (insert_block): Remove unconditional `abort'.
8884
8885 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
8886
8887         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
8888         FUNCTION_CODE now of type int.  All callers changed.
8889         Set the builtin's DECL_BUILT_IN_CLASS.
8890
8891 1999-09-23  Tom Tromey  <tromey@cygnus.com>
8892
8893         * jvspec.c (lang_specific_driver): Don't read spec file if
8894         -fsyntax-only given.
8895
8896 1999-09-22  Tom Tromey  <tromey@cygnus.com>
8897
8898         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
8899
8900         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
8901         (WORDS_TO_LONG): Likewise.
8902         (WORDS_TO_DOUBLE): Likewise.
8903
8904 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8905
8906         * jcf-write.c (RELOCATION_VALUE_0): New macro.
8907         (RELOCATION_VALUE_1): Likewise.
8908         (emit_iinc, emit_reloc, push_constant1, push_constant2,
8909         push_in_const, push_long_const): Prototyped.
8910         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
8911         (push_constant2): Likewise.
8912         (push_int_const): Cast find_constant1's integer arguments to `jword'.
8913         (find_constant_wide): Cast find_constant2's integer arguments to
8914         `jword'.
8915         (find_constant_index): Cast find_constant2's and find_constant2's
8916         integer arguments to `jword'.
8917         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
8918         (emit_switch_reloc): Use RELOCATION_VALUE_0.
8919         (emit_if): Use RELOCATION_VALUE_1.
8920         (emit_goto): Likewise.
8921         (emit_jsr): Likewise.
8922         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
8923         argument to push_long_const to HOST_WIDE_INT.
8924
8925 1999-09-15  Andreas Schwab  <schwab@suse.de>
8926
8927         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
8928
8929 1999-09-20  Nick Clifton  <nickc@cygnus.com>
8930
8931         * lang.c (lang_decode_option): Extend comment.
8932
8933 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8934
8935         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
8936         instead of fndecl.
8937
8938 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8939
8940         * gjavah.c (get_field_name, print_method_info, print_include,
8941         add_namelet): Use xmalloc, not malloc.
8942
8943         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
8944         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
8945         NULL pointer.
8946
8947         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
8948
8949         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
8950
8951         * jcf-path.c (add_entry): Likewise.
8952
8953         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
8954
8955         * jv-scan.c (xmalloc): Remove definition.
8956
8957         * jvgenmain.c (xmalloc): Likewise.
8958
8959         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
8960
8961         * lex.c (java_store_unicode): Use xrealloc, not realloc.
8962
8963         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
8964         concat, not xmalloc/sprintf.
8965         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
8966         (xstrdup): Remove definition.
8967
8968         * parse.y (duplicate_declaration_error_p,
8969         constructor_circularity_msg, verify_constructor_circularity,
8970         check_abstract_method_definitions, java_check_regular_methods,
8971         java_check_abstract_methods, patch_method_invocation,
8972         check_for_static_method_reference, patch_assignment, patch_binop,
8973         patch_cast, array_constructor_check_entry, patch_return,
8974         patch_conditional_expr): Use xstrdup, not strdup.
8975
8976         * zextract.c (ALLOC): Use xmalloc, not malloc.
8977
8978 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8979
8980         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
8981
8982         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
8983         (do_spec, lang_specific_pre_link, lang_specific_driver,
8984         input_filename, input_filename_length): Don't declare.
8985         (main_class_name, jvgenmain_spec, lang_specific_driver):
8986         Constify a char*.
8987         (lang_specific_driver): All calls to the function pointer
8988         parameter now explicitly call `fatal'.
8989
8990 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8991
8992         * parse.y (find_applicable_accessible_methods_list): Search
8993         abstract classes as interfaces.
8994
8995 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8996
8997         * class.c (finish_class): We're now outside a valid method
8998         declaration. Tell the rest of gcc so.
8999
9000 1999-09-08  Bruce Korb  autogen@linuxbox.com
9001
9002         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
9003
9004 1999-09-07  Tom Tromey  <tromey@cygnus.com>
9005
9006         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
9007         java-array.h.
9008         (decode_signature_piece): Don't emit "::" in JArray<>.
9009         (print_namelet): Only print trailing `;' when printing a class.
9010
9011 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
9012
9013         * java-tree.h: Delete declarations for all tree nodes now moved to
9014         global_trees.
9015         * decl.c: Delete their definitions.
9016
9017 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
9018
9019         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
9020         * Makefile.in (OBJS): Add ggc-callbacks.o.
9021         (OBJDEPS): Likewise.
9022
9023 1999-09-03  Tom Tromey  <tromey@cygnus.com>
9024
9025         * parse.y (strip_out_static_field_access_decl): Return operand if
9026         it satisfies JDECL_P.
9027
9028 1999-09-02  Tom Tromey  <tromey@cygnus.com>
9029
9030         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
9031         Handle nested arrays, like `[[I'.
9032
9033 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9034
9035         * class.c (finish_class): Remove unused parameter, all callers
9036         changed.
9037
9038         * expr.c (build_java_athrow): Change return type to void.
9039         (java_lang_expand_expr): Make sure each case in switch returns a
9040         value.
9041
9042         * java-tree.h (finish_class): Fix prototype to take void args.
9043
9044         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
9045         (main): Issue return from main, not exit.
9046
9047         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
9048
9049         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
9050
9051         * jv-scan.c (main): Issue return from main, not exit.
9052
9053         * parse.y (check_abstract_method_definitions,
9054         java_check_abstract_method_definitions): Add static prototypes.
9055         (java_complete_expand_methods): Fix call to `finish_class'.
9056
9057         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
9058         and `prevpc'.
9059
9060 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9061
9062         * lang.c (language_string): Constify.
9063
9064 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9065
9066         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
9067         Remove hacks for stuff which comes from libiberty.
9068
9069         * Make-lang.in: Likewise.
9070
9071 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
9072
9073         * Makefile.in (xref.o): Depend on xref.c explicitly.
9074
9075 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9076
9077         * java-tree.h (lang_printable_name): Constify a char*.
9078
9079         * lang.c (lang_printable_name): Likewise.
9080
9081 1999-08-27  Jeffrey A Law  (law@cygnus.com)
9082
9083         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
9084         comments in C code.
9085
9086 1999-08-26  Tom Tromey  <tromey@cygnus.com>
9087
9088         * gjavah.c (print_cxx_classname): Print "::" before qualified
9089         name.
9090
9091 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9092
9093         * parse.y (lookup_cl): Changed leading comment. Now does its best
9094         to set the column number.
9095         (qualify_ambiguous_name): Take WFL wrappers into account.
9096
9097 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
9098
9099         * verify.c (verify_jvm_instructions): Don't check instruction
9100         validity beyond end of method.
9101
9102 1999-08-25  Tom Tromey  <tromey@cygnus.com>
9103
9104         * jvspec.c (lang_specific_driver): Correctly handle --help again.
9105
9106 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9107
9108         * gjavah.c (print_name, print_base_classname, utf8_cmp,
9109         cxx_keyword_subst, generate_access, name_is_method_p,
9110         get_field_name, print_field_name, super_class_name, print_include,
9111         decode_signature_piece, print_class_decls, usage, help,
9112         java_no_argument, version, add_namelet, print_namelet): Add static
9113         prototype.
9114         (print_base_classname, utf8_cmp, cxx_keyword_subst,
9115         name_is_method_p): Constify a char*.
9116         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
9117         Provide a final else clause in an if-else-if.
9118         (print_field_info): Add missing final arg in function call to
9119         `print_field_name'.
9120         (print_method_info, decompile_method, decode_signature_piece,
9121         print_c_decl, print_full_cxx_name, print_stub,
9122         print_mangled_classname, super_class_name, print_include,
9123         add_namelet, add_class_decl, print_class_decls, process_file,
9124         help): Constify a char*.
9125
9126         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
9127         push_int_const, find_constant_wide, find_constant_index,
9128         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
9129         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
9130         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
9131         emit_if, emit_goto, emit_jsr, call_cleanups,
9132         make_class_file_name): Add static prototypes.
9133         (generate_bytecode_return, generate_bytecode_insns): Pass a
9134         NULL_PTR, not a NULL_TREE.
9135
9136         * jv-scan.c: Include "jcf.h".
9137         (main): Declare using DEFUN macro.
9138
9139         * jvspec.c (find_spec_file, lang_specific_pre_link,
9140         lang_specific_driver): Add prototypes.
9141         (find_spec_file): Constify a char*.
9142
9143         * keyword.gperf (hash, java_keyword): Add prototypes.
9144
9145         * lang.c (lang_print_error): Add static prototype.
9146         (lang_init): Prefer memcpy over bcopy to avoid casts.
9147
9148         * lex.c (yylex): Add static prototype.
9149
9150         * parse-scan.y: Include "lex.c" earlier.
9151
9152         * parse.h: Remove redundant declaration for `yylex'.
9153
9154         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
9155         labeled_block_contains_loop_p): Add static prototypes.
9156         (not_accessible_p): Make static to match prototype.
9157
9158         * verify.c (start_pc_cmp): Don't needlessly cast away const.
9159
9160 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9161
9162         * parse.y (check_method_redefinition): Changed leading comment.
9163         (check_abstract_method_definitions): New function.
9164         (java_check_abstract_method_definitions): New function.
9165         (java_check_regular_methods): Call it.
9166         (verify_constructor_super): Fixed indentation.
9167         (lookup_method_invoke): Likewise.
9168
9169 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9170
9171         * parse.y (method_header): Return a null pointer if the current
9172         class node is null.
9173         (finish_method_declaration): Return if the current function decl
9174         is null.
9175         (source_start_java_method): Likewise.
9176         (java_method_add_stmt): Likewise.
9177
9178 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9179
9180         * class.c (emit_register_class): Removed unnecessary call to
9181         start_sequence.
9182         * parse.y (labeled_block_contains_loop_p): Removed unused local
9183         variable.
9184
9185 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9186
9187         * parse.y (java_refold): Added prototype.
9188
9189 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9190
9191         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
9192         (java_stabilize_reference): Removed unnecessary `else'.
9193         (java_complete_lhs): Set flag to remember boolean. Call
9194         java_refold. Added comments.
9195         (java_decl_equiv): New function.
9196         (binop_compound_p): Likewise.
9197         (java_refold): Likewise.
9198         (patch_unaryop): Striped static field access assigned to decl and
9199         op. Changed promotion scheme for ++/-- operators.
9200         (search_loop): New function.
9201         (labeled_block_contains_loop_p): Likewise.
9202         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
9203         comment.
9204         (patch_bc_statement): Call search_loop. Fixed comment.
9205
9206 1999-08-14  Anthony Green  <green@cygnus.com>
9207
9208         * expr.c (java_lang_expand_expr): Mark static array data as
9209         referenced.
9210
9211 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9212
9213         * jvgenmain.c (main): NUL-terminate name_obstack.
9214
9215 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9216
9217         * check-init.c (check_bool2_init, done_alternative): Add static
9218         prototypes.
9219
9220         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
9221         (add_method, build_utf8_ref, build_class_ref,
9222         append_gpp_mangled_type, layout_class_method): Constify a char*.
9223
9224         * decl.c (push_promoted_type, make_binding_level): Add static
9225         prototypes.
9226         (push_promoted_type, pushdecl): Constify a char*.
9227
9228         * except.c (find_handler_in_range, link_handler,
9229         check_start_handlers): Add static prototypes.
9230
9231         * expr.c (process_jvm_instruction): Constify a char*.
9232
9233         * gjavah.c (main): Constify a char*.
9234
9235         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
9236         Constify a char*.
9237
9238         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
9239         static prototypes.
9240         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
9241         munge, print_ents): Constify a char*.
9242
9243         * jcf-dump.c (disassemble_method): Constify a char*.
9244         (print_constant_pool, print_exception_table): Add static prototypes.
9245         (print_constant, print_exception_table, main, disassemble_method):
9246         Constify a char*.
9247
9248         * jcf-io.c (find_classfile, find_class): Likewise.
9249
9250         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
9251         (set_source_filename, predefined_filename_p): Add static prototypes.
9252         (set_source_filename, get_constant, get_class_constant,
9253         find_in_current_zip): Constify a char*.
9254
9255         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
9256         static prototypes.
9257         (add_entry, add_path, jcf_path_classpath_arg,
9258         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
9259
9260         * jcf-reader.c (get_attribute, jcf_parse_preamble,
9261         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
9262         jcf_parse_one_method, jcf_parse_methods,
9263         jcf_parse_final_attributes): Add static prototypes.
9264         (get_attribute): Constify a char*.
9265
9266         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
9267         jcf_dependency_add_target, jcf_path_classpath_arg,
9268         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
9269
9270         * jv-scan.c (main): Constify a char*.
9271         (gcc_obstack_init): Add prototype arguments.
9272
9273         * jvgenmain.c (gcc_obstack_init): Likewise.
9274         (main): Constify a char*.
9275
9276         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
9277         static prototypes.
9278         (put_decl_string, lang_print_error): Constify a char*.
9279         (lang_init): Remove redundant extern prototype.
9280
9281         * mangle.c (emit_unicode_mangled_name): Constify a char*.
9282
9283         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
9284         Add static prototypes.
9285         (get_type_from_signature): Constify a char*.
9286
9287         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
9288         Add static prototypes.
9289         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
9290         (verify_jvm_instructions): Constify a char*.
9291
9292         * xref.c (xref_flag_value): Likewise.
9293
9294         * xref.h (xref_flag_value): Likewise.
9295
9296         * zextract.c (makeword, makelong): Add static prototypes.
9297         (makeword, makelong): Constify a uch*.
9298
9299 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9300
9301         * lang.c (java_dummy_print): Constify a char*.
9302         (lang_print_error): Likewise.
9303         (lang_init): Remove redundant prototype for `print_error_function'.
9304         (lang_init_source): Likewise.
9305         (lang_identify): Constify a char*.
9306
9307 1999-08-09  Tom Tromey  <tromey@cygnus.com>
9308
9309         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
9310         (WORDS_TO_LONG): Likewise.
9311         (WORDS_TO_DOUBLE): Likewise.
9312
9313 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9314
9315         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
9316
9317         * expr.c (java_stack_pop, java_array_data_offset,
9318         build_java_throw_out_of_bounds_exception, case_identity,
9319         build_java_check_indexed_type): Add static prototypes.
9320         (linenumber_table, expand_invoke, expand_java_field_op,
9321         build_primtype_type_ref, expand_byte_code): Constify a char*.
9322
9323         * java-tree.h (build_primtype_type_ref, linenumber_table):
9324         Constify a char*.
9325         (java_lang_expand_expr): Add prototype.
9326
9327         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
9328         `java_lang_expand_expr'.
9329
9330         * lex.c (java_lex_error): Constify a char*.
9331         (java_get_unicode, java_read_char, java_allocate_new_line,
9332         java_unget_unicode, java_sneak_unicode): Prototype.
9333
9334         * parse-scan.y (current_class, package_name, method_declarator,
9335         report_class_declaration, yyerror): Constify a char*.
9336
9337         * parse.h (java_report_errors): Prototype.
9338         (yyerror): Constify a char*.
9339
9340         * parse.y (classitf_redefinition_error, check_modifiers,
9341         parse_jdk1_1_error, lookup_package_type,
9342         lookup_package_type_and_set_next, get_printable_method_name,
9343         purify_type_name): Constify a char*.
9344         (build_super_invocation, maybe_generate_finit,
9345         verify_constructor_super, parser_add_interface,
9346         add_superinterfaces, jdep_resolve_class, note_possible_classname,
9347         java_complete_expand_methods, java_expand_finals,
9348         cut_identifier_in_qualified, java_stabilize_reference,
9349         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
9350         merge_string_cste): Prototype.
9351         (single_type_import_declaration, yyerror,
9352         variable_redefinition_error, build_array_from_name,
9353         build_unresolved_array_type, check_class_interface_creation,
9354         resolve_class, complete_class_report_errors,
9355         note_possible_classname, read_import_dir,
9356         find_in_imports_on_demand, resolve_package, fix_constructors,
9357         check_deprecation, lookup_method_invoke,
9358         maybe_build_primttype_type_ref, array_constructor_check_entry):
9359         Constify a char*.
9360         (java_complete_expand_methods, java_expand_finals): Make static.
9361         (convert_narrow): Remove static prototype.
9362
9363 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
9364
9365         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
9366
9367 1999-08-02  Richard Henderson  <rth@cygnus.com>
9368
9369         * decl.c: Include defaults.h instead of expr.h.
9370         * parse.y: Likewise.
9371
9372 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
9373
9374         * java/decl.c (start_java_method): Change all uses of
9375         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
9376         Ensure expr.h is included.
9377         * java/expr.c (pop_arguments): Ditto.
9378         * java/parse.y (expand_start_java_method): Ditto.
9379
9380 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9381
9382         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9383
9384 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
9385
9386         * decl.c: Include "function.h".
9387         * except.c: Likewise.
9388         * parse.y: Likewise.
9389         * Makefile.in: Update dependencies.
9390
9391 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9392
9393         * expr.c (build_java_soft_divmod): Provide a default case in switch.
9394         (java_lang_expand_expr): Mark parameters `target', `tmode' and
9395         `modifier' with ATTRIBUTE_UNUSED.
9396
9397         * gjavah.c (process_file): Add braces around ambiguous `else'.
9398
9399         * jcf-dump.c (print_access_flags, localvar_free): Change return
9400         type to void.
9401
9402         * parse.y (java_complete_expand_method): Initialize variable
9403         `exception_copy'.
9404         (resolve_qualified_expression_name): Likewise for `field_decl'.
9405         (patch_method_invocation): Likewise for `class_to_search'.
9406         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
9407         (patch_assignment): Likewise for `lhs_type'.
9408
9409         * verify.c (verify_jvm_instructions): Remove unused variable
9410         `caller'.
9411
9412 1999-07-25  Richard Henderson  <rth@cygnus.com>
9413
9414         * decl.c (va_list_type_node): New.
9415
9416 1999-07-25  Anthony Green  <green@cygnus.com>
9417
9418         * gjavah.c (print_stub): New function.
9419         (METHOD_IS_NATIVE): New macro.
9420         (print_mangled_classname): Make static.
9421         (HANDLE_END_FIELD): Don't emit fields during stub generation.
9422         (process_file): Perform stub generation.
9423         (HANDLE_METHOD): Don't emit class decls during stub
9424         generation.
9425         (HANDLE_END_METHOD): Take into account stub generation.
9426         (print_method_info): Handle stub generation.
9427         (print_stub): New function.
9428         (print_cxx_classname): Make signature consistant with others.
9429         (help): Describe -stubs option.
9430         (main): Create stub file.
9431         (version): Use version.c.
9432         (print_full_cxx_name): New function.
9433         (print_c_decl): Use print_full_cxx_name.
9434
9435 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9436
9437         * check-init.c (check_init): Handle MAX_EXPR.
9438
9439 1999-07-15  Andrew Haley  <aph@cygnus.com>
9440
9441         * lang.c (flag_use_divide_subroutine): New variable.
9442         * typeck.c: (convert_ieee_real_to_integer): Bounds check
9443         fp-to-integer conversion.
9444         (convert): Call convert_ieee_real_to_integer when flag_fast_math
9445         is not set.
9446
9447         * expr.c (build_java_soft_divmod): New function.
9448         (build_java_binop): Call build_java_soft_divmod if
9449         flag_use_divide_subroutine is set.
9450         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
9451         soft_lrem_node: new builtin functions.
9452         (init_decl_processing) Initialize the new builtins.
9453         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
9454         soft_lrem_node: new builtin functions.
9455         (build_java_soft_divmod): New function.
9456         * parse.y: Call build_java_soft_divmod if
9457         flag_use_divide_subroutine is set.
9458         * parse.c: Rebuilt.
9459
9460         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
9461         a --specs= arg) even if not linking.
9462         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
9463         -fuse-divide-subroutine
9464
9465 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9466
9467         * parse.y (resolve_and_layout): Check methods only once.
9468         (resolve_qualified_expression_name): Verify thrown exceptions
9469         compatibility.
9470         (check_thrown_exceptions): Reject exceptions thrown in
9471         initializer. Error message tuned.
9472
9473 1999-07-14  Andrew Haley  <aph@cygnus.com>
9474
9475         * expr.c (expand_expr): Do not return the last statement in a
9476         block as the block's value.
9477
9478 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9479
9480         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
9481         CALL_EXPR, to avoid order of evaluation changes.
9482
9483 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9484
9485         * parse.y (qualify_ambiguous_name): Do not use
9486         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
9487
9488 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9489
9490         * check-init.c (check_init): Handle MAX_EXPR.
9491         * expr.c (force_evaluation_order): Force method call arguments to
9492         be evaluated in left-to-right order.
9493         * parse.y (qualify_ambiguous_name): Loop again to qualify
9494         NEW_ARRAY_EXPR properly.
9495
9496 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9497
9498         * parse.y (patch_invoke): Resolve unresolved invoked method
9499         returned type.
9500         (qualify_ambiguous_name): STRING_CST to qualify expression for
9501         type name resolution.
9502
9503 1999-06-24  Andrew Haley  <aph@cygnus.com>
9504
9505         * class.c (finish_class): Whenever a deferred method is
9506         output, rescan the list of methods to see if a new candidate for
9507         output can be found.
9508
9509 1999-06-28  Tom Tromey  <tromey@cygnus.com>
9510
9511         * jvspec.c (lang_specific_driver): Recognize --help.
9512
9513 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9514
9515         * parse.y (resolve_package): Fixed bogus return statement.
9516         (patch_method_invocation): Resolve method invocation beginning with
9517         a package name qualifier.
9518
9519 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9520
9521         * Make-lang.in (java.stage1): Depend on stage1-start.
9522         (java.stage2): Likewise for stage2-start.
9523         (java.stage3): Likewise for stage3-start.
9524         (java.stage4): Likewise for stage4-start.
9525
9526 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9527
9528         * parse.y (java_complete_lhs): When doing cross referencing, don't
9529         try to keep file location on a WFL expanded as a CALL_EXPR.
9530
9531 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9532
9533         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
9534         compiling to class file a void method with an empty method body.
9535         As a side effect, the bytecode backend will generate the
9536         appropriate `return' instruction.
9537
9538 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9539
9540         * parse.y (lookup_package_type_and_set_next): New function prototype.
9541         (resolve_package): Search current and imported packages.
9542         (lookup_package_type_and_set_next): New function.
9543
9544 1999-06-22  Andrew Haley  <aph@cygnus.com>
9545
9546         * verify.c (verify_jvm_instructions): Check for pending blocks
9547         before invalid PC test and opcode switch, not after.
9548
9549 1999-06-21  Andrew Haley  <aph@cygnus.com>
9550
9551         * except.c (find_handler_in_range): The upper limit for exception
9552         ranges is exclusive, not inclusive: (start <= pc < end).
9553         (link_handler): find child pointer which points to outer by
9554         searching sibling list: previous code incorrectly assumed that
9555         outer->outer->first_child must point to outer.
9556         * verify.c (verify_jvm_instructions): FIXME added to code for
9557         `athrow'.
9558         (verify_jvm_instructions): Do not assume that the last block
9559         processed in a subroutine is a block which ends with a `ret'
9560         instruction.  With some control flows it is possible that the last
9561         block ends with an `athrow'.
9562
9563 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9564
9565         * parse.y (qualify_ambiguous_name): Reorganized the post
9566         evaluation of non WFL leading expression nodes.
9567
9568 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9569
9570         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
9571         CONVERT_EXPR.
9572
9573 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9574
9575         * parse.y (qualify_ambiguous_name): Handle qualified expression
9576         beginning with a STRING_CST.
9577
9578 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9579
9580         * parse.y (register_fields): Set DECL_INITIAL on both
9581         pre-initialized static and public fields.
9582         (resolve_field_access): Static field access expressions to always
9583         use pointer types.
9584         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
9585         qualification. CONVERT_EXPR to be resolved as an expression name.
9586         (java_complete_lhs): Identify and access qualified final
9587         initialized field in switch statement case expression.
9588         (fold_constant_for_init): Pre-initialized field decl constant to
9589         be folded.
9590
9591 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9592
9593         * parse.y (note_possible_classname): Mark returned node with
9594         QUALIFIED_P only if the original class name contained a '/'.
9595
9596 1999-06-05  Anthony Green  <green@cygnus.com>
9597
9598         * Make-lang.in (gcjh): More parallel build fixes.
9599
9600 1999-06-03  Mike Stump  <mrs@wrs.com>
9601
9602         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
9603
9604 1999-06-02  Anthony Green  <green@cygnus.com>
9605
9606         * except.c (link_handler): Chain exception handlers in order.
9607
9608 1999-06-02  Anthony Green  <green@cygnus.com>
9609
9610         * expr.c (expand_byte_code): Fill unreachable bytecode regions
9611         with nops and process as usual in order to always set correct EH
9612         ranges.  Emit detailed warnings about unreachable bytecodes.
9613
9614 1999-06-02  Anthony Green  <green@cygnus.com>
9615
9616         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
9617         constant.
9618
9619 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9620
9621         * parse.y (lookup_field_wrapper): Unified returned value to NULL
9622           or the searched field decl.
9623
9624 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9625
9626         * parse.y (fold_constant_for_init): Convert numerical constant
9627         values to the type of the assigned field.
9628
9629 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9630
9631         * expr.c (lookup_field): Relaxed the test on class loading error
9632         detection.
9633         * parse.y (fold_constant_for_init): Enabeled old code.
9634
9635 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9636
9637         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
9638         decide the validity of the cast of a java.lang.Cloneable reference
9639         to an array.
9640         (patch_conditional_expr): Fixed first argument passed to
9641         binary_numeric_promotion.
9642
9643 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9644
9645         * parse.y (qualify_ambiguous_name): Take into account that a
9646         CONVERT_EXPR might specify a type as a WFL.
9647
9648 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9649
9650         * parse.y (patch_assignment): Save the rhs before using it as an
9651         argument to _Jv_CheckArrayStore.
9652
9653 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9654
9655         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
9656
9657 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9658
9659         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
9660         floating point literal only when the exponent indicator has been
9661         parsed.
9662
9663 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9664
9665         * parse.y (formal_parameter:): Construct argument tree list
9666         element even if a yet unsupported final parameter was encountered.
9667
9668 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9669
9670         * parse.y (finish_method_declaration): Issue errors for native or
9671         abstract methods declared with a method body, as well as for non
9672         native or non abstract methods with no method body.
9673
9674 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9675
9676         * class.c (build_utf8_ref): Initialize variable `field'.
9677
9678         * decl.c (init_decl_processing): Initialize variable `field'.
9679
9680         * expr.c (build_known_method_ref): Mark parameters `method_type',
9681         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
9682         (process_jvm_instruction): Likewise for parameter `length'.
9683
9684         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
9685         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
9686         ATTRIBUTE_UNUSED.
9687
9688         * parse.y (maybe_generate_clinit): Remove unused variable
9689         `has_non_primitive_fields'.
9690         (find_in_imports_on_demand): Initialize variables `node_to_use'
9691         and `cl'.
9692         (patch_binop): Likewise for variable `prom_type'.
9693         (patch_unaryop): Likewise for variable `prom_type'.
9694
9695         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
9696
9697         * xref.c (xref_table): Add missing initializer.
9698
9699 1999-05-14  Tom Tromey  <tromey@cygnus.com>
9700
9701         * java-except.h (struct eh_range): Removed unused `next' member.
9702         * verify.c (verify_jvm_instructions): Call check_nested_ranges
9703         after adding all exception handlers.  Sort exception ranges in
9704         order of start PC.
9705         (struct pc_index): New structure.
9706         (start_pc_cmp): New function.
9707         * except.c (add_handler): Return `void'.  Don't call link_handler;
9708         instead construct an ordinary linked list and do range
9709         coalescing.
9710         (check_nested_ranges): New function.
9711         (link_handler): Changed interface to allow merging of eh_ranges.
9712         Split overlapping ranges.  Return `void'.
9713
9714 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9715
9716         * parse.y (constructor_block_end:): New rule, tagged <node>.
9717         (constructor_body:): Use `constructor_block_end' instead of
9718         `block_end'.
9719
9720 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9721
9722         * parse.y (statement_nsi:): Pop `for' statement block.
9723         (java_complete_lhs): Labeled blocks containing no statement are
9724         marked as completing normally.
9725
9726 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9727
9728         * xref.c (xref_set_current_fp): New function, defined.
9729         * xref.h (xref_set_current_fp): New function, prototyped.
9730
9731 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9732
9733         * check-init.c (check_init): Take into account that
9734         LABELED_BLOCK_STMT can be empty.
9735
9736 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9737
9738         * parse.y (java_check_regular_methods): Warning check on not
9739         overriding methods with default access in other packages does not
9740         apply to `<clinit>'.
9741         (java_complete_lhs): If block body is an empty_stmt_node, replace
9742         it by NULL_TREE. This prevents gcc from generating an irrelevant
9743         warning.
9744
9745 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9746
9747         * check-init.c (check_init): Removed code accepting to see things
9748         falling through default:, when doing xrefs.
9749         * java-tree.h (do_not_fold): New global variable, declared.
9750         * parse.y (do_not_fold): New global variable, defined.
9751         (java_complete_expand_method): Set `do_not_fold' to the value of
9752         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
9753         and reinstall them after them have been purged; do not check for
9754         initializations; do not issue missing return errors.
9755         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
9756         when doing xrefs.
9757         (patch_binop): Skip the fold part when doing xrefs.
9758         (build_string_concatenation): Skip the concatenation part when
9759         doing xrefs.
9760         (patch_synchronized_statement): Do not generate a try-finally when
9761         doing xrefs.
9762         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
9763         and keep the location where the throw was seen.
9764         * typeck.c (convert): When `do_not_fold' is set, do not attempt
9765         any treatment on the converted node an simply return a NOP_EXPR of
9766         the targeted type.
9767         * xref.c (xref_get_data): New function, defined.
9768         * xref.h (xref_get_data): New function, declared.
9769         (XREF_GET_DATA): Use xref_get_data.
9770
9771 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9772
9773         * gjavah.c (print_include): Cast the result of `strlen' to int
9774         when comparing against a signed value.
9775         (add_namelet): Likewise.
9776
9777 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9778
9779         * expr.c (expand_invoke): Mark parameter `nargs' with
9780         ATTRIBUTE_UNUSED.
9781         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
9782
9783         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
9784         ATTRIBUTE_UNUSED.
9785
9786         * jcf-reader.c (get_attribute): Cast a value to long
9787         when comparing against a signed expression.  Likewise.
9788
9789         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
9790         HOST_BITS_PER_CHAR.
9791
9792 1999-05-11  Andrew Haley  <aph@cygnus.com>
9793
9794         * parse.y (source_end_java_method): If the current method contains
9795         any exception handlers, force asynchronous_exceptions: this is
9796         necessary because signal handlers in libjava may throw exceptions.
9797         * decl.c (end_java_method): Ditto.
9798
9799 1999-05-11  Tom Tromey  <tromey@cygnus.com>
9800
9801         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
9802         flags.
9803         * jvspec.c (THREAD_NAME): Removed.
9804         (GC_NAME): Likewise.
9805         (MATHLIB): Likewise.
9806         (WITHLIBC): Likewise.
9807         (GCLIB): Likewise.
9808         (THREADLIB): Likewise.
9809         (MATH_LIBRARY): Likewise.
9810         (lang_specific_driver): Don't add `-l' options to command line.
9811         Instead, add a single --specs option.  Recognize `-L' options and
9812         use them to search for spec file.
9813         (find_spec_file): New function.
9814         (SPEC_FILE): New define.
9815
9816 1999-05-11  Dave Brolley  <brolley@cygnus.com>
9817
9818         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
9819         cpplib-enabled build.
9820
9821 1999-05-05  Per Bothner  <bothner@cygnus.com>
9822
9823         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
9824         temporarily zero it while calling rest_of_decl_compilation.
9825
9826         * java-tree.h (string_ptr_type_node):  Add declaration.
9827         * decl.c:  Define and initialize string_ptr_type_node.
9828         * parse.y (patch_string_cst):  Use string_ptr_type_node.
9829
9830         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
9831         * parse.y (for_statement):  Now unconditionally exit_block.
9832         (finish_labeled_statement):  No longer exit_block if for-loop.
9833         (patch_loop_statement):  Check harder if the loop is already labeled.
9834
9835         * parse.y (patch_initialized_static_field):  Removed function.
9836         (maybe_generate_clinit):  Removed special handling for interfaces.
9837         (java_complete_expand_methods):  Do a preliminary java_complete_tree
9838         on <clinit> to determine if it can be removed.
9839         (java_complete_expand_method):  Remove special handling for <clinit>.
9840         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
9841         optimize if we get back empty_stmt_node.
9842         For MODIFY_EXPR, re-do checking of static initializers.
9843         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
9844         For VAR_DECL, pass correct context.
9845
9846         * verify.c (verify_jvm_instructions):  Better error messages.
9847
9848 1999-05-03  Tom Tromey  <tromey@cygnus.com>
9849
9850         * parse-scan.y (interface_declaration): Call
9851         report_class_declaration for interfaces.
9852
9853 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
9854
9855         * Makefile.in: Remove -v from bison command lines.
9856
9857 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9858
9859         * check-init.c (check_init): Exclude a case of error when doing
9860         xrefs.
9861         * class.c (layout_class_method): Don't generate the error message
9862         twice when compiling from source.
9863         * lang-options.h: Added `-Wredundant-modifers' and
9864         `-Wunusupported-jdk11' flags and help text.
9865         * lang.c (lang_decode_option): Added support for
9866         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
9867         flag_static_local_jdk11 and flag_redundant set accordingly.
9868         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
9869         * parse.h (EXPR_WFL_ADD_COL): New macro.
9870         (DECL_END_SOURCE_LINE): Likewise.
9871         (DECL_INHERITED_SOURCE_LINE): Likewise.
9872         * parse.y (static_ref_err): New function, prototyped.
9873         (CCB_TK): Now tagged <operator>.
9874         (class_body:): Remember the location of the closing '}' of a class
9875         definition when doing xrefs.
9876         (block:): Likewise.
9877         (block_end:): Likewise.
9878         (create_class): Remember the location of the inherited class
9879         identifier when doing xrefs.
9880         (register_fields): Added test on first operand of `init' before
9881         testing it TREE_CODE.
9882         (method_header): Store the location of the class identifier in the
9883         class decl when doing xrefs.
9884         (finish_method_declaration): Don't combine first/last method line
9885         when doing xref.
9886         (java_check_regular_methods): Warning check on not overriding
9887         methods with default access on other packages move before check on
9888         static methods. Initialization of `aflags' also moved up.
9889         (resolve_expression_name): Call static_ref_err to report the error.
9890         (static_ref_err): New function, implemented.
9891         (resolve_field_access): Returned simplified static field access
9892         when doing xrefs.
9893         (resolve_qualified_expression_name): Check for illegal use of
9894         static fields in a non static context. Call static_ref_err to
9895         report error in various places.
9896         (java_complete_tree): Do not fold initialized static fields when
9897         doing xrefs.
9898         (java_complete_lhs): Likewise.
9899
9900 1999-04-29  Anthony Green  <green@cygnus.com>
9901
9902         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
9903         create internal labels.
9904         (lookup_label): Ditto.
9905
9906 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9907
9908         * class.c (layout_class_method): Generate <clinit>'s rtl for
9909         interfaces.
9910         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9911         for interfaces' <clinit>.
9912         * expr.c (lookup_field): Search for fields in interfaces.
9913         (expand_invoke): Fixed indentation.
9914         (expand_java_field_op): Likewise. Use IS_CLINIT.
9915         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
9916         (IS_CLINIT): New macro.
9917         * parse.y (type_declaration:): Call maybe_generate_clinit after an
9918         interface was parsed.
9919         (maybe_generate_clinit): Don't generate if the current class is an
9920         interface with only fields of primitive types.
9921         (reset_method_name): Use IS_CLINIT.
9922         (java_complete_expand_method): Expand <clinit> when it exists for
9923         interfaces. Use IS_CLINIT.
9924         (resolve_expression_name): Use DECL_CONTEXT instead of
9925         current_class to build static field references.
9926         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
9927         ARRAY_REF when doing xreferencing.
9928         (check_final_assignment): Fixed typo in leading comment. Use
9929         IS_CLINIT.
9930         (patch_array_ref): Don't fully expand array references when
9931         xreferencing.
9932         (patch_return): Use IS_CLINIT.
9933         (patch_throw_statement): Likewise.
9934
9935 1999-04-22  Tom Tromey  <tromey@cygnus.com>
9936
9937         * Make-lang.in (JAVA_SRCS): Added check-init.c.
9938
9939 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9940
9941         * decl.c (predef_filenames, predef_filenames_size): New globals
9942         (init_decl_processing): predef_filenames and predef_filenames_size
9943         initialized.
9944         * java-tree.h (predef_filenames, predef_filenames_size): Declared
9945         extern.
9946         * jcf-parse.c (predefined_filename_p): New function.
9947         (yyparse): Check that files on the command line are specified only
9948         once and issue a warning otherwise.
9949         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
9950         * parse.y (source_end_java_method): Nullify NOP method bodies, to
9951         avoid a gcc warning with -W -Wall turned on.
9952         (java_expand_classes): Abort if errors were encountered.
9953         (java_complete_lhs): If the cross reference flag is set, wrap
9954         field DECL node around a WFL when resolving expression name.
9955
9956 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9957
9958         * lang.c (lang_decode_option): Fixed returned value when parsing
9959         `-fxref=...' and `-Wall'.
9960         * parse.y (source_end_java_method): Do not generate code when
9961         flag_emit_xref is set.
9962         (resolve_expression_name): Do not build static field access when
9963         flag_emit_xref is set.
9964         (resolve_field_access): No special treatment on `length' when
9965         flag_emit_xref is set. Do not build qualified static field access
9966         when flag_emit_xref is set.
9967         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
9968         when flag_emit_xref is set.
9969         (patch_assignment): Do not generate array store runtime check when
9970         flag_emit_xref is set.
9971         * xref.c (xref_flag_value): Fixed function declaration
9972         indentation.
9973         (xset_set_data): New function.
9974         * xref.h (xref_set_data): Added prototype for new function.
9975         (typedef struct xref_flag_table): New field data.
9976         (XREF_GET_DATA): New macro.
9977
9978 1999-04-19  Tom Tromey  <tromey@cygnus.com>
9979
9980         * xref.h (enum): Removed trailing comma.
9981
9982         * parse.y (resolve_qualified_expression_name): Added missing
9983         `break'.
9984
9985 1999-04-15  Anthony Green  <green@cygnus.com>
9986
9987         * gjavah.c: New prototypes for java_float_finite and
9988         java_double_finite.
9989
9990 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9991
9992         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
9993         references.
9994
9995 1999-04-06  Jeffrey A Law  (law@cygnus.com)
9996
9997         * Makefile.in (TREE_H): Add tree-check.h.
9998         (RTL_H): Add genrtl.h.
9999
10000 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10001
10002         * parse.y (patch_assignment): Added ArrayStoreException runtime
10003         check.
10004
10005 1999-04-06  Per Bothner  <bothner@cygnus.com>
10006
10007         * expr.c (pop_type_0):  New function.
10008         (pop_type):  Use pop_type_0.
10009         * java-tree.h (pop_type_0):  New declaration.
10010         * verify.c (verify_jvm_instructions):  Check return instructions.
10011
10012         * parse.y (patch_binop):  Don't fold if non-constant and emiting
10013         class files.
10014
10015 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10016
10017         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
10018
10019         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
10020         (main_jcf): Don't define.
10021         (process_file): Don't set `main_jcf'.
10022
10023         * java-tree.h (main_jcf): Don't declare.
10024
10025         * jcf-parse.c (main_jcf): Add static definition.
10026
10027         * lang.c (main_jcf): Don't define.
10028
10029 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10030
10031         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
10032
10033         * decl.c (copy_lang_decl): Likewise for `bcopy'.
10034
10035         * jcf-depend.c: Include "config.h", not <config.h>.
10036
10037         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
10038         `bcopy' to PTR.
10039
10040         * jcf-path.c: Include "config.h", not <config.h>.
10041
10042         * lex.c: Don't include various system header files.
10043         (java_init_lex): Cast the argument of `bzero' to PTR
10044
10045         * parse-scan.y (java_push_parser_context): Likewise.
10046
10047         * parse.y (java_push_parser_context): Likewise.
10048         (patch_bc_statement): Match format specifier to variable argument.
10049
10050         * xref.c: Don't include <stdio.h>.
10051
10052 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10053
10054         * parse.y (struct parser_ctxt *ctxp): Now global.
10055         (declare_local_variables): Use WFL compound value for the
10056         declaration source line value, when doing cross-referencing.
10057
10058 1999-03-31  Tom Tromey  <tromey@cygnus.com>
10059
10060         * gjavah.c (print_field_info): Allow constants of other types.
10061         (print_include): Generate include when new name is proper prefix
10062         of already printed name.
10063         (add_namelet): Likewise.
10064         (cxx_keyword_subst): New function.
10065         (print_method_info): Use it.
10066         (print_field_name): New function.
10067         (get_field_name): New function.
10068         (print_field_info): Use get_field_name and print_field_name.
10069
10070 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10071
10072         * Makefile.in (keyword.h): Generate using gperf language 'C', not
10073         'KR-C', so gperf uses the `const' keyword on strings.
10074
10075         * keyword.gperf (java_keyword): Const-ify a char*.
10076
10077 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10078
10079         * parse.y (patch_bc_statement): Fixed identation and a bogus
10080         `printf' format.
10081
10082 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10083
10084         * parse.y (patch_assignment): Allow static variables in other
10085         classes to be assigned.
10086
10087 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10088
10089         * class.c (maybe_add_interface): Remove unused variable
10090         `interface_binfo'.
10091         (make_class_data): Use = for assignment, not ==.  Likewise.
10092         (emit_register_classes): Remove unused variable `decl'.
10093
10094         * lex.c: Fix comment so as not to contain an embedded `/*'.
10095
10096         * verify.c (verify_jvm_instructions): Remove unused variable
10097         `self_type'.
10098
10099 1999-03-27  Per Bothner  <bothner@cygnus.com>
10100
10101         * parse.y (complete_loop_body):  Rename to finish_loop_body.
10102         (complete_labeled_statement):  Rename to finish_labeled_statement.
10103         (complete_for_loop):  Rename to finish_for_loop.
10104         (complete_method_declaration):  Rename to finish_method_declaration.
10105
10106         * java-tree.h (continue_identifier_node):  New global node.
10107         * decl.c:  Define and initialize continue_identifier_node.
10108         * parse.y (generate_labeled_block):  Remove - no longer needed.
10109         (build_loop_body):  Use continue_identifier_node for continue block.
10110         (finish_labeled_statement):  Also do pop_labeled_block actions.
10111         (java_complete_lhs):  POP_LOOP even if error.
10112         (build_labeled_block):  Special handling for continue_identifier_node.
10113         (patch_loop_statement):  Re-organize.
10114         (patch_bc_statement):  Re-write.
10115
10116 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10117
10118         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
10119         using a WFL compound value.
10120         * parse.y (xref.h): Include.
10121         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
10122         WFL compound value.
10123         (register_fields): Set WFL compound value to lineno if doing
10124         xrefs.
10125         (java_complete_expand_method): Call expand_xref if flag_emit_xref
10126         is set.
10127         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
10128         * xref.h (expand_xref): Prototype renamed from xref_generate.
10129
10130 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10131
10132         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
10133         (GET_CURRENT_BLOCK): New macro.
10134         * parse.y (current_static_block): New global variable.
10135         (method_body:): Define action.
10136         (complete_method_declaration): Set current_function_decl to NULL
10137         when work on the current method is done.
10138         (declare_local_variables): Use GET_CURRENT_BLOCK.
10139         (java_method_add_stmt): Likewise.
10140         (java_complete_expand_method): Disable the use of `this' when
10141         expanding <clinit>.
10142         (enter_a_block): If no current method exist, use
10143         current_static_block to link static initializer blocks.
10144         (exit_block): Rewritten to use current_static_block when no current
10145         method decl exists.
10146         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
10147         (patch_return): Forbid the use of `return' in static initializers.
10148         (patch_throw_statement): Fixed indentation. Issue specific error
10149         for uncaught thrown checked exception in static initializer
10150         blocks. Removed FIXME.
10151
10152 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
10153
10154         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
10155         Link gcj from gcc.o.
10156
10157 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10158
10159         * parse.y (find_applicable_accessible_methods_list): When dealing
10160         with interface: ensure that a given interface or java.lang.Object
10161         are searched only once.
10162
10163 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10164
10165         * gjavah.c (print_c_decl): Remove unused argument `flags'.
10166
10167         * jcf-dump.c (print_access_flags): Add braces around if-else.
10168
10169         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
10170         COMBINE_INPUTS.
10171
10172         * lex.c (build_wfl_node): Add static prototype.
10173
10174         * lex.h (build_wfl_node): Remove static prototype.
10175
10176         * parse.y: Include lex.c early enough to declare everything needed.
10177         Ensure calls to `build_wfl_node' pass the proper arguments.
10178         (create_class): Remove unused variable `super_decl'.
10179         (get_printable_method_name): Initialize variable `name'.
10180
10181 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10182
10183         * Changelog: Fixed 1999-03-22 typos.
10184         * lang.c (lang_decode_option): Fixed typo in error string in the
10185         XARG section.
10186
10187 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10188
10189         * Makefile.in (JAVA_OBJS): Added entry xref.o.
10190         (xref.o): New rule.
10191         * java-tree.h (flag_emit_xref): Declared extern.
10192         * lang.c (xref.h): Included.
10193         (flag_emit_xref): New global variable.
10194         (lang_decode_option): Added support for -fxref.
10195         * xref.c: Created.
10196         * xref.h: Likewise.
10197
10198 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
10199
10200         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
10201         linked with.
10202
10203 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10204
10205         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
10206         $(srcdir)/../system.h and $(JAVA_TREE_H).
10207         (jcf-io.o): Depend on $(JAVA_TREE_H).
10208         (mangle.o): Likewise.
10209
10210         * check-init.c (check_cond_init): Add static prototype.
10211
10212         * class.c (build_java_method_type, hashUtf8String,
10213         make_field_value, get_dispatch_vector, get_dispatch_table,
10214         append_gpp_mangled_type, mangle_static_field): Likewise.
10215         (strLengthUtf8): Hide unused definition.
10216         (hashUtf8String): Const-ify.
10217         (make_field_value): Un-ANSI-fy.
10218
10219         * constants.c: Move inclusion of jcf.h above java-tree.h.
10220         (set_constant_entry, find_class_or_string_constant,
10221         find_name_and_type_constant, get_tag_node,
10222         build_constant_data_ref): Add static prototype.
10223
10224         * decl.c (push_jvm_slot, builtin_function,
10225         lookup_name_current_level): Likewise.
10226         (builtin_function): Const-ify.
10227
10228         * except.c (expand_start_java_handler, expand_end_java_handler):
10229         Add static prototype.
10230
10231         * expr.c (flush_quick_stack, push_value, pop_value,
10232         java_stack_swap, java_stack_dup, build_java_athrow,
10233         build_java_jsr, build_java_ret, expand_java_multianewarray,
10234         expand_java_arraystore, expand_java_arrayload,
10235         expand_java_array_length, build_java_monitor, expand_java_pushc,
10236         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
10237         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
10238         expand_compare, expand_test, expand_cond, expand_java_goto,
10239         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
10240         expand_java_field_op, java_push_constant_from_pool): Likewise.
10241
10242         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
10243         (build_java_arraynull_check): Mark parameters `node' and `type'
10244         with ATTRIBUTE_UNUSED.
10245         (note_label): Likewise for parameter `current_pc'.
10246         (expand_java_call, expand_java_ret): Hide unused definition.
10247
10248         * java-tree.h (make_class, build_constants_constructor,
10249         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
10250         init_outgoing_cpool, register_class, emit_register_classes,
10251         java_layout_seen_class_methods): Prototype.
10252         (unicode_mangling_length): Const-ify.
10253         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10254         emit_unicode_mangled_name, format_int, format_uint,
10255         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
10256         jcf_print_utf8_replace, open_class): Prototype.
10257
10258         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
10259         <stdio.h>.  Include tree.h/java-tree.h.
10260         (utf8_equal_string usage, process_class): Add static prototype.
10261         (open_class): Don't prototype this here.
10262         (utf8_equal_string): Match arguments to format specifiers.
10263         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
10264         TABLE_SWITCH, disassemble_method): Likewise.
10265
10266         * jcf-io.c: Include tree.h/java-tree.h.
10267         (open_class, find_classfile, jcf_print_utf8,
10268         jcf_print_utf8_replace): Const-ify.
10269
10270         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
10271         parse_class_file): Add static prototype.
10272         (find_in_current_zip): Match definition to existing static
10273         prototype.
10274
10275         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
10276         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
10277         finish_jcf_block, define_jcf_label, get_jcf_label_here,
10278         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
10279         write_chunks, adjust_typed_op, generate_bytecode_conditional,
10280         generate_bytecode_return, perform_relocations, init_jcf_state,
10281         init_jcf_method, release_jcf_state, generate_classfile):
10282         Add static prototype.
10283         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
10284         (make_class_file_name): Const-ify.
10285
10286         * jcf.h (find_classfile): Const-ify.
10287
10288         * jv-scan.c (reset_report): Remove prototype.
10289
10290         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
10291         (error): Rewrite to allow varargs.
10292
10293         * lang.c (lang_f_options): Const-ify.
10294
10295         * lex.c (java_parse_escape_sequence): Add static prototype.
10296         (java_allocate_new_line): Match definition to existing static
10297         prototype.
10298
10299         * mangle.c Include tree.h/java-tree.h.
10300         (unicode_mangling_length, emit_unicode_mangled_name,
10301         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
10302
10303         * parse.h (jdep_code): Remove trailing comma in enumeration.
10304         (java_get_line_col): Move prototype outside of !JC1_LITE test.
10305         (reset_report): Add prototype.
10306
10307         * verify.c (push_pending_label, merge_types): Add static
10308         prototypes.
10309
10310         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
10311
10312 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10313
10314         * parse.y (find_applicable_accessible_methods_list): Extend the
10315         search to superinterfaces when relevant.
10316         (search_applicable_methods_list): New function.
10317
10318 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10319
10320         * class.c (unmangle_classname): Implemented stricter testing
10321         before setting the QUALIFIED_P flag on an identifier.
10322
10323 1999-03-16  Per Bothner  <bothner@cygnus.com>
10324
10325         * parse.y (java_complete_lhs):  Call force_evaluation_order
10326         after patch_newarray.
10327         (patch_binop):  Don't call fold if there are side effects.
10328
10329 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10330
10331         * parse.y (java_stabilize_reference): Use save_expr instead of
10332         building a SAVE_EXPR node.
10333         (java_complete_lhs): Patch the resulting string of the `+='
10334         operator (if necessary) and complete the RHS after having built
10335         the cast.
10336
10337 1999-03-15  Per Bothner  <bothner@cygnus.com>
10338
10339         * class.c (make_class):  Don't set CLASS_P here (because
10340         this function is also called by build_java_array_type).
10341         (push_class):  Set CLASS_P here instead.
10342         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
10343
10344         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
10345         context.  If the context is class, perfer "super" over "synchronized".
10346         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
10347
10348         * parse.y (create_class):  Don't call parser_check_super here;
10349         it is not robust.  Always wait until later.
10350
10351         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
10352         match what JDK 1.2 does), but don't set ACC_PUBLIC.
10353
10354 1999-03-13  Per Bothner  <bothner@cygnus.com>
10355
10356         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
10357         * lex.h (UNGETC):  Change misleading macro.
10358
10359 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10360
10361         * parse.y (java_stabilize_reference): Return NODE when patching a
10362         COMPOUND_EXPR.
10363         (java_complete_lhs): Put parenthesis around truth values.
10364
10365 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10366
10367         * class.c (layout_class_method): Don't make rtl for interface
10368         methods.
10369         * parse.h (GET_TYPE_NAME): New macro.
10370         * parse.y (if_then_statement:): Fixed indentation.
10371         (if_then_else_statement:): Likewise.
10372         (for_statement:): Fixed spacing.
10373         (try_statement:): Fixed indentation.
10374         (create_interface): Don't force interfaces to be abstract.
10375         (method_header): Abstract methods are OK in interfaces.
10376         (declare_local_variables): Fixed typo in comment.
10377         (java_complete_expand_method): Fixed indentation.
10378         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
10379         non accessible fields.
10380         (java_stabilize_reference): New function.
10381         (java_complete_lhs): Fixed indentation. Use
10382         java_stabilize_reference in compound assignment. Insert the
10383         cast. If not processing `+' fix string constants before processing
10384         binop.
10385
10386 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10387
10388         * constants.c (find_class_or_string_constant): Cast variable `j'
10389         to a `jword' when comparing against one.
10390
10391         * expr.c (java_lang_expand_expr): Remove unused variables
10392         `has_finally_p' and `op0'.
10393
10394         * gjavah.c (print_field_info): Cast a value to jint when comparing
10395         against one.  Likewise for a jlong.
10396         (add_namelet): Likewise cast a `sizeof' to an int when comparing
10397         against a signed quantity.
10398
10399         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
10400         (print_signature): Don't needlessly dereference variable `str'
10401
10402         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
10403         `max_locals' with ATTRIBUTE_UNUSED.
10404         (jcf_parse_class): Likewise for variable `index'.
10405
10406         * parse.h (reverse_jdep_list): Remove static prototype.
10407
10408         * parse.y (build_jump_to_finally): Remove prototype and definition.
10409         (reverse_jdep_list): Add static prototype.
10410
10411         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
10412         `assignment' and `expr_decl'.
10413
10414         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
10415
10416 1999-03-12  Andrew Haley  <aph@cygnus.com>
10417
10418         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
10419         we'll need a directory separator and a null character.
10420
10421 1999-03-10  Per Bothner  <bothner@cygnus.com>
10422
10423         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
10424
10425   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10426
10427         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
10428         interfaces.
10429
10430 1999-03-05  Per Bothner  <bothner@cygnus.com>
10431
10432         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
10433
10434         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
10435
10436         * class.c (layout_class_method):  A static method in a base class
10437         is never overridden, so treat it like it doesn't exist.
10438         However, do complain about private non-static method overriding
10439         public static method.
10440
10441         * parse.y:  Don't set unused INITIALIZED_P flag.
10442         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
10443
10444         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
10445         (build_array_from_name):  Re-order &index[string] to &string[index].
10446
10447         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
10448         error_mark (it might catch more errors, but it is more likely to lose).
10449
10450 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10451
10452         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
10453         (parse-scan.o): Depend on toplev.h.
10454
10455         * class.c (make_method_value): Add prototype.  Make it static.
10456         Remove unused second argument, caller changed.
10457
10458         * expr.c (java_lang_expand_expr): Remove unused variable
10459         `return_label'.
10460
10461         * java-tree.h: Don't prototype find_in_current_zip.
10462         Add prototypes for verify_constant_pool, start_java_method,
10463         end_java_method, give_name_to_locals, expand_byte_code,
10464         open_in_zip, set_constant_value, find_constant1, find_constant2,
10465         find_utf8_constant, find_string_constant, find_class_constant,
10466         find_fieldref_index, find_methodref_index, write_constant_pool,
10467         count_constant_pool_bytes and encode_newarray_type.
10468
10469         * jcf-dump.c: Remove unused variable `LONG_temp'.
10470
10471         * jcf-parse.c: Include parse.h.
10472         (jcf_parse_source): Remove unused parameter, all callers changed.
10473         (jcf_figure_file_type): Add static prototype.
10474         (find_in_current_zip): Likewise.  Also remove unused parameter,
10475         all callers changed.
10476         (read_class): Initialize variable `saved_pos'.
10477
10478         * jcf-reader.c (jcf_parse_preamble): Mark variables
10479         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
10480
10481         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
10482         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
10483         (java_parse_doc_section): Initialize variable `seen_star'.
10484         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
10485         (java_lex_error): Mark parameters `msg' and `forward' with
10486         ATTRIBUTE_UNUSED.
10487         (java_get_line_col): Mark parameters `filename' and `line' with
10488         ATTRIBUTE_UNUSED.
10489
10490         * parse-scan.y: Include toplev.h.
10491         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
10492
10493         * parse.h: use `struct JCF', not plain `JCF'.
10494         (java_parser_context_save_global, java_expand_classes
10495         java_parser_context_restore_global, java_parse): Add prototypes.
10496
10497         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
10498         `node'.
10499
10500 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
10501
10502         *  check-init.c (check_init):  COPYN takes word count, not bit count.
10503
10504 1999-02-26  Per Bothner  <bothner@cygnus.com>
10505
10506         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
10507         explicit build_decl.  (Avoids crash in reload when optimizing.)
10508
10509 1999-02-25  Per Bothner  <bothner@cygnus.com>
10510
10511         * decl.c (complete_start_java_method):  Handle synchronized method
10512         even when compiling from bytecode.
10513
10514 1999-02-26  Tom Tromey  <tromey@cygnus.com>
10515
10516         * gjavah.c (add_class_decl): Only generate `#include' if outer
10517         class is not the name of the class we are processing.  Correctly
10518         append `.h' in #include.
10519         (process_file): Clean up newlines around generated `#include's.
10520         (decode_signature_piece): Correctly handle inner classes.
10521         (struct include): New structure.
10522         (all_includes): New global.
10523         (print_include): New function.
10524         (add_class_decl): Use it.
10525         (process_file): Likewise.
10526         (add_class_decl): Generate include for java-array.h if array
10527         seen.
10528         (process_file): Don't generate java-array.h include.
10529
10530         * gjavah.c (add_namelet): Check for standard package names here.
10531         (add_class_decl): Don't check for standard package names here.
10532
10533 1999-02-25  Tom Tromey  <tromey@cygnus.com>
10534
10535         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
10536         When reading a zip file, only use strncmp if both strings are
10537         bigger than the buffer length.  Initialize `k' when looping
10538         through zip file.
10539
10540 1999-02-24  Tom Tromey  <tromey@cygnus.com>
10541
10542         * gjavah.c (struct namelet): New structure.
10543         (add_namelet): New function.
10544         (print_namelet): New function.
10545         (print_class_decls): Use add_namelet and print_namelet to generate
10546         namespaces and not classes.
10547         (method_printed): New global.
10548         (HANDLE_END_METHOD): Examine method_printed.
10549         (print_method_info): Set method_printed when required.  Print
10550         error if function to be ignored is marked virtual.  Handle $finit$
10551         method.
10552         (METHOD_IS_FINAL): New macro.
10553         (print_field_info): Use it.
10554         (HANDLE_METHOD): Clear method_printed.
10555         (method_pass): New global.
10556         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
10557         (process_file): Do two passes over both fields and methods.
10558         (HANDLE_METHOD): Examine method_pass.
10559         (root): New global.
10560         (add_class_decl): New function.
10561         (print_class_decls): Don't scan over entire constant pool.
10562
10563 1999-02-23  Tom Tromey  <tromey@cygnus.com>
10564
10565         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
10566         disable linking in that case.
10567
10568 1999-02-20  Tom Tromey  <tromey@cygnus.com>
10569
10570         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
10571         not 0x1f.
10572
10573 1999-02-21  Per Bothner  <bothner@cygnus.com>
10574
10575         * decl.c (build_result_decl), java-tree.h:  New method.
10576         (complete_start_java_method):  Handle synchronized methods.
10577         Don't build DECL_RESULT here.  (Ordering dependency problem.)
10578         (start_java_method):  Call build_result_decl here instead  ...
10579         * parse.y (java_complete_expand_method):  ... and here.
10580         (expand_start_java_method): Don't call complete_start_java_method here.
10581         (java_complete_expand_method):  Call it here instead.
10582         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
10583         * java-tree.h:  ... here.
10584
10585         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
10586         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
10587         for ARRAY_REF - it doesn't work when array bounds are checked.
10588         (patch_array_ref):  Handle it here instead.
10589
10590         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
10591
10592 1999-02-19  Per Bothner  <bothner@cygnus.com>
10593
10594         Force left-to-right evaluation of binary operations etc.
10595         * expr.c (force_evaluation_order), java-tree.h:  New function.
10596         * parse.y (java_complete_lhs):  Pass binary operations, procedure
10597         calls, and ARRAY_REFs to force_evaluation_order.
10598         (various):  Set TREE_SIDE_EFFECTS more carefully.
10599
10600         Tolerate random (non-UTF8) encoding in comments without complaining.
10601         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
10602         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
10603
10604         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
10605         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
10606
10607         * parse.y (java_complete_lhs):  Ignore an empty statement in a
10608         COMPOUND_EXPR.  Don't complain about empty statement after return.
10609
10610 1999-02-19  Per Bothner  <bothner@cygnus.com>
10611
10612         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
10613         in TREE_LIST - just chain the POINTER_TYPEs together.
10614         (resolve_class):  If type already resolved, return decl.
10615         After resolving, update TREE_TYPE(class_type), and name (if array).
10616         * parse.h (do_resolve_class), parse.y:  Make non-static.
10617         * class.c (maybe_layout_super_class):  Take this_class argument.
10618         Do do_resolve_class if necessary.
10619         (layout_class, layout_class_methods): Adjust calls appropriately.
10620         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
10621         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
10622         * typeck.c (build_java_array_type):  Don't call layout_class.
10623
10624 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10625
10626         * parse.y (check_pkg_class_access): Allow private class access
10627         within the same package.
10628         (strip_out_static_field_access_decl): New function.
10629         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
10630         operator argument before testing its nature.
10631
10632 1999-02-03  Per Bothner  <bothner@cygnus.com>
10633
10634         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
10635         (TRY_EXPR):  Simplify - it no longer has a finally clause.
10636         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
10637         Simpler handling of TRY_EXPR, which no longer has a finally clause.
10638         * expr.c (java_lang_expand_expr):  Likewise.
10639         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
10640         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
10641         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
10642         (build_try_statement):  Remove finally parameter and handling.
10643         (build_try_finally_statement):  New function.
10644         (patch_try_statement):   No longer need to support finally clause.
10645         (try_statement):  Update grammar action rules.
10646         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
10647         Simpler handling of TRY_EXPR, which no longer has a finally clause.
10648
10649 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
10650
10651         * jcf-parse.c (get_constant): Add braces around computation of 'd'
10652         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
10653
10654 1999-02-17  Andrew Haley  <aph@cygnus.com>
10655
10656         * class.c (build_utf8_ref): Back out broken patch which was
10657         intended to to output signatures using '.' as a separator.
10658
10659         * class.c (make_class_data): Output signatures using '.' as a
10660         separator, rather than '/'.
10661         (mangled_classname): Likewise.
10662         (make_field_value): Likewise.
10663         (make_method_value): Likewise.
10664         * constants.c (alloc_class_constant): Likewise.
10665         * expr.c (build_invokeinterface): Likewise.
10666
10667 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10668
10669         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
10670         of an ancient workaround.
10671
10672 1999-02-10  Jeffrey A Law  (law@cygnus.com)
10673
10674         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
10675         here anymore.
10676
10677 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10678
10679         * lex.c (yylex): Encode \0 as UTF8.
10680
10681 1999-02-10  Tom Tromey  <tromey@cygnus.com>
10682
10683         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
10684         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
10685         (libgcj_zip): Renamed.
10686         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
10687         LIBJAVA_ZIP_FILE.
10688         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
10689
10690         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
10691         (GC_NAME): Renamed -lgc to -lgcjgc.
10692
10693 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10694
10695         * lex.c (java_lang_cloneable): Initialize.
10696         * parse.y (java_lang_cloneable): New static variable.
10697         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
10698         doing one more qualification round.
10699         (valid_ref_assignconv_cast_p): Reject null source or
10700         destination. Allow an array to be cast into java.lang.Cloneable.
10701         (patch_cast): Swapped two first arguments to first call to
10702         valid_ref_assignconv_cast_p.
10703
10704 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10705
10706         * parse.h: DECL_P renamed JDECL_P.
10707         * parse.y: DECL_P replaced by JDECL_P.
10708         (build_array_from_name): Always use pointer's type.
10709         (patch_bc_statement): Extra code to search continue target in a
10710         for loop. Fixed comments. Continue target is current loop when
10711         unlabeled.
10712
10713 1999-02-05  Andrew Haley  <aph@cygnus.com>
10714
10715         * class.c (make_class_data): The superclass of an interface should
10716         be null, not class Object.
10717
10718         * lex.c (java_lex): Sign extend hex literals.
10719
10720 1999-02-04  Andrew Haley  <aph@cygnus.com>
10721
10722         * class.c (build_utf8_ref): Output signatures using '.' as a
10723         separator, rather than '/'.
10724         (make_class_data): Likewise.
10725
10726 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
10727
10728         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
10729         mkstemp.o.  Get them from libiberty now.
10730
10731 1999-02-02  Jeffrey A Law  (law@cygnus.com)
10732
10733         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
10734
10735 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10736
10737         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
10738         from libiberty.h
10739
10740 1999-02-02  Per Bothner  <bothner@cygnus.com>
10741
10742         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
10743         * jcf-write.c (generate_bytecode_return):  New function.
10744         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
10745
10746         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
10747         generate special [fd]const_[01] instructions.
10748
10749         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
10750
10751         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
10752         handling OPCODE_lookupswitch or OPCODE_tableswitch.
10753
10754 1999-02-01  Per Bothner  <bothner@cygnus.com>
10755
10756         * parse.y (patch_method_invocation):  Handle calling static methods,
10757         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
10758
10759         * parse.y (java_complete_lhs):  Don't complain about unreachable
10760         exit condition in a do-while statement.
10761
10762 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10763
10764         * lex.c (java_read_char): Fixed utf8 decoding.
10765         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
10766         range.
10767         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
10768         comments. Local variable `all_primitive' is gone. Broadened
10769         acceptance of `0' to floating point targets. `long' can now be
10770         widened to `double' or `float'.
10771         (valid_method_invocation_conversion_p): Added leading
10772         comment. Fixed tabulation.
10773         (build_string_concatenation): Optimize out left or right empty
10774         string constants.
10775
10776 1999-01-28  Per Bothner  <bothner@cygnus.com>
10777
10778         * jcf-write.c (localvar_alloc):  Only emit entry for
10779         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
10780         (generate_bytecode_insns):  Only call put_linenumber if
10781         debug_info_level > DINFO_LEVEL_NONE.
10782         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
10783         is specified, add -g1 (for compatibility wih javac).
10784
10785 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
10786
10787         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
10788         gjavah.o, check-init.o, jv-scan.o
10789
10790 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10791
10792         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
10793
10794         * gjavah.c: Include config.h and system.h.
10795
10796         * javaop.h (inline): Don't define, its handled by system.h.
10797         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
10798         from `inline' to `static inline'.
10799
10800         * jcf.h (inline): Don't define, its handled by system.h.
10801
10802         * lex.c (inline): Likewise.
10803
10804 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
10805
10806         * lang-specs.h: Map -Qn to -fno-ident.
10807
10808 1999-01-29  Richard Henderson  <rth@cygnus.com>
10809
10810         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
10811
10812 1999-01-29  Tom Tromey  <tromey@cygnus.com>
10813
10814         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
10815         then cast it to Object before calling `append' method.
10816
10817 1999-01-28  Per Bothner  <bothner@cygnus.com>
10818
10819         * check-init.c (check_bool2_init, check_bool_init, check_init):
10820         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
10821         * jcf-write.c (generate_bytecode_insns):  Likewise.
10822
10823 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10824
10825         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
10826         * parse.y (patch_cast): Allow a boolean to be cast into a
10827         boolean.
10828
10829 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10830
10831         * parse.y: (class_declaration:): Fixed indentation.
10832         (class_member_declaration:): Extra `;' after field declaration now
10833         accepted.
10834         (interface_declaration:): Removed debug messages in error reports.
10835         (patch_binop): Nodes created and returned inherit the orignal
10836         node's COMPOUND_ASSIGN_P flag value.
10837         (patch_cast): Fix cast from char to floating point.
10838
10839 1999-01-25  Andrew Haley  <aph@cygnus.com>
10840
10841         * except.c, java-except.h (expand_resume_after_catch): new
10842         function.
10843         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
10844         to branch back to main flow of control after a catch block.
10845
10846 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10847
10848         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
10849         $(srcdir)/../system.h.
10850         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
10851         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
10852         (jcf-write.o): Likewise.
10853         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10854         (mangle.o): Depend on $(srcdir)/../toplev.h.
10855         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10856         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10857
10858         * class.c: Include output.h and parse.h.
10859         (mangled_classname): Add the `const' keyword to a char*.
10860         (find_named_method): Hide unused function definition.
10861         (build_utf8_ref): Change type of variable `c' to unsigned char.
10862         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
10863         (build_class_ref): Add the `const' keyword to a char*.
10864         (layout_class_method): Remove unused variable `buf'.
10865
10866         * decl.c (find_local_variable): Remove unused variable `rtl'.
10867         (pushdecl): Likewise for variables `different_binding_level' and
10868         `oldglobal'.
10869         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
10870         (maybe_build_cleanup): Likewise for parameter `decl'.
10871
10872         * except.c (expand_start_java_handler): Mark parameter `range'
10873         with ATTRIBUTE_UNUSED.
10874
10875         * expr.c: Include except.h.
10876         (pop_type): Remove unused variable `i'.
10877         (pop_value): Likewise for variables `n_words' and `i'.
10878         (expand_java_arrayload): Likewise for variable `convert'.
10879         (java_lang_expand_expr): Likewise for variables `op0', `type',
10880         `mode', `unsignedp', `node' and `elements'.
10881         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
10882         `eh_ranges'.
10883         (process_jvm_instruction): Add a `const' qualifier to a char*.
10884
10885         * gjavah.c (output_directory): Add the `const' keyword to a char*.
10886         (temp_directory): Likewise.
10887         (print_c_decl): Likewise.
10888         (print_method_info): Likewise.
10889         (decode_signature_piece): Likewise.
10890         (print_mangled_classname): Likewise.
10891
10892         * java-except.h: Provide prototypes for maybe_start_try,
10893         maybe_end_try and add_handler.
10894
10895         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
10896         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
10897         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
10898         init_expr_processing, push_super_field, init_class_processing,
10899         can_widen_reference_to, class_depth, verify_jvm_instructions,
10900         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
10901         set_local_type, merge_type_state, push_type, load_type_state,
10902         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
10903         emit_unicode_mangled_name): Add prototypes.
10904
10905         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
10906         (print_signature_type): Use ISDIGIT, not isdigit.
10907         (print_signature): Remove unused variable `j'.
10908
10909         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
10910         int when comparing against one.
10911
10912         * jcf-parse.c: Include toplev.h.
10913
10914         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
10915         (localvar_free): Remove unused variable `i'.
10916         (generate_bytecode_conditional): Likewise for variable `kind'.
10917
10918         * jv-scan.c: Include config.h and system.h.  Remove redundant
10919         OS header and gansidecl.h includes.
10920         (warning): Add the `const' keyword to a char*.  Also add
10921         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
10922         __STDC__, when determining whether to use ANSI-isms.
10923         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
10924         (xmalloc): Don't redundantly prototype here.
10925         (main): Remove unused parameter `envp'.  Also fix the arguments
10926         passed to function `fatal' to match the format specifier.
10927
10928         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
10929
10930         * mangle.c: Include toplev.h.
10931         (emit_unicode_mangled_name): Declare parameter `len'.
10932
10933         * parse.y (parse_warning_context): Add the `const' keyword to a
10934         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
10935         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
10936         (issue_warning_error_from_context): Add the `const' keyword to
10937         a char*.
10938         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
10939         not `__STDC__' for whether to use ANSI-isms.
10940
10941         * typeck.c (incomplete_type_error): Mark parameters `value' and
10942         `type' with ATTRIBUTE_UNUSED.
10943         (parse_signature_type): Use ISDIGIT, not isdigit.
10944
10945         * verify.c (check_pending_block): Add the `const' keyword to a char*.
10946         (verify_jvm_instructions): Likewise.  Remove unused variables
10947         `field_name' and `default_val'.
10948
10949         * zextract.c: Include config.h and system.h.  Remove redundant
10950         OS header includes.
10951
10952         * zipfile.h: Prototype `read_zip_archive'.
10953
10954 1999-01-21  Andrew Haley  <aph@cygnus.com>
10955
10956         * typeck.c (convert): Allow conversions to void type: some
10957         optimizations in gcc do this.
10958
10959 1999-01-21  Andrew Haley  <aph@cygnus.com>
10960
10961         * typeck.c (convert_ieee_real_to_integer): New function.
10962         (convert): When not using fast-math and using hardware fp, convert
10963         an IEEE NaN to zero.
10964
10965 1999-01-18  Andrew Haley  <aph@cygnus.com>
10966
10967         * parse.y (patch_binop): Do a type conversion from signed to
10968         unsigned and then back to signed when a ">>>" is found.
10969
10970 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10971
10972         * java-tree.h: (check_for_initialization): Added prototype.
10973         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
10974         * parse.y (do_resolve_class): Removed unused locals.
10975         (read_import_dir): Likewise.
10976         (resolve_qualified_expression_name): Array creation
10977         expressions are valid primary expressions.
10978         (qualify_ambiguous_name): Likewise.
10979         (patch_synchronized_statement): Removed unused local.
10980
10981 1999-01-17  Jeffrey A Law  (law@cygnus.com)
10982
10983         * Makefile.in (zextract.o): Add dependencies.
10984
10985         * Makefile.in: Do not put ^Ls at the start of a line.
10986
10987 1999-01-15  Per Bothner  <bothner@cygnus.com>
10988
10989         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
10990         sub-type the result of the call that gets the exception value.
10991
10992         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
10993         don't call finish_class.
10994
10995         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
10996         clear found before continuing.
10997
10998         * verify.c (verify_jvm_instructions):  On an array load, allow
10999         and handle top of stack to be TYPE_NULL.
11000
11001         * gjavah.c (generate_access):  Translate Java package private or
11002         protected access to C++ public, but with a comment.
11003
11004 1999-01-13  Andrew Haley  <aph@cygnus.com>
11005
11006         * expr.c (generate_name): Name prefix changed to avoid clashes
11007         with assembler temp labels.
11008
11009         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
11010         MODIFY_EXPR.  Without this, code for the assignment may not be
11011         generated at all and the synchronized statement will read an
11012         uninitialized variable.
11013
11014 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11015
11016         * class.c (maybe_layout_super_class): Fixed returned value.
11017         * lex.c: Added 1999 to the copyright.
11018         (java_init_lex): Initialize java_lang_imported.
11019         * lex.h: Added 1999 to the copyright.
11020         * parse.h: Added 1999 to the copyright.
11021         (REGISTER_IMPORT): Fixed typo in trailing macro.
11022         (CURRENT_OSB): New macro.
11023         (struct parser_ctxt): New fields osb_depth, osb_limit.
11024         * parse.y (java_lang_id): New global variable.
11025         (type_import_on_demand_declaration): Don't import java.lang.* twice.
11026         (array_creation_expression:): Use CURRENT_OSB.
11027         (dims:): Uses a stack to keep track of array dimensions.
11028         (cast_expression:): Use CURRENT_OSB.
11029         (find_expr_with_wfl): Return NULL if node found doesn't meet the
11030         conditions.
11031         (register_fields): Fixed typos in comment.
11032         (check_method_redefinition): Fixed comment indentation.
11033         (java_check_regular_methods): Set saved found wfl to NULL after
11034         having reinstalled it in the previously found DECL_NAME.
11035
11036 1999-01-10  Richard Henderson  <rth@cygnus.com>
11037
11038         * gjavah.c (java_float_finite): Use a union to do type punning.
11039         (java_double_finite): Likewise.
11040
11041 1999-01-09  Per Bothner  <bothner@cygnus.com>
11042
11043         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
11044         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
11045         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
11046         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
11047         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
11048         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
11049
11050 1999-01-08  Per Bothner  <bothner@cygnus.com>
11051
11052         * check-init.c (check_init):  If compiling to native, we don't
11053         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
11054
11055 1999-01-08  Tom Tromey  <tromey@cygnus.com>
11056
11057         * parse-scan.y (variable_declarator_id): Set or increment
11058         bracket_count.
11059         (bracket_count): New global.
11060         (formal_parameter): Handle case where bracket pairs trail variable
11061         declarator id.
11062
11063 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
11064
11065         * jcf-parse.c (yyparse): variable len changed from a char to an
11066         int to prevent overflow.
11067
11068 1999-01-06  Per Bothner  <bothner@cygnus.com>
11069
11070         * java-tree.h:  Declare read_class.
11071         * jcf-parse.c (read_class):  New function.
11072         (load_class):  Now just call read_class.
11073
11074         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
11075         * jcf-parse.c (parse_source_file):  Declare save_error_count,
11076         which is needed by java_parse_abort_on_error macro,
11077         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
11078
11079         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
11080         constructor, if initializing a static field.
11081         (patch_new_array_init):  Set TREE_CONSTANT if it is.
11082         * expr.c (java_lang_expand_expr):  For a static array constructor
11083         of primitive elements, allocate the array itself statically.
11084         Disabled until we can set the vtable field statically.
11085
11086         * check-init.c:  New file.  Checks for definite assignment.
11087         * Makefile.in (JAVA_OBJS):  Add check-init.o.
11088         * parse.y (java_complete_expand_method): Call check_for_initialization.
11089         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
11090
11091 1999-01-06  Graham <grahams@rcp.co.uk>
11092
11093         * parse.y : include system.h instead of including
11094         standard headers directly with the exception of <dirent.h>.
11095
11096 1999-01-06  Per Bothner  <bothner@cygnus.com>
11097
11098         * lex.h:  Moved static function declarations to lex.c,
11099         to shut up some -Wall warnings.
11100         * lex.c:  Static function declarations moved here.
11101         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
11102
11103 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11104
11105         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
11106
11107 1998-12-22  Per Bothner  <bothner@cygnus.com>
11108
11109         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
11110         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
11111
11112         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
11113         (localvar_alloc):  Change return type to void,
11114         (emit_unop):  Remove unused variable size.
11115
11116         * jcf-write.c (struct jcf_block):  Add new union.
11117         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
11118         (call_cleanups):  New functions.
11119         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
11120         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
11121         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
11122         * lang.c (lang_init):  Call using_eh_for_cleanups.
11123         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
11124         completing operands to patch_synchronized_statement.
11125         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
11126         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
11127         WITH_CLEANUP_EXPR instead of TRY_EXPR.
11128
11129 1998-12-20  John F. Carr  <jfc@mit.edu>
11130
11131         * Make-lang.in: Comment out control-Ls; they upset some makes.
11132
11133 1998-12-18  Tom Tromey  <tromey@cygnus.com>
11134
11135         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
11136         consistently.
11137
11138 1998-12-17  Tom Tromey  <tromey@cygnus.com>
11139
11140         * parse.y (DIR_SEPARATOR): New define.
11141         (check_class_interface_creation): Use it.
11142
11143         * parse-scan.y (report_main_declaration): Recognize
11144         `java.lang.String' in argument to main.
11145
11146 1998-12-16  Per Bothner  <bothner@cygnus.com>
11147
11148         * parse.y (create_interface):  Remove bogus test.
11149
11150 1998-12-16  Per Bothner  <bothner@cygnus.com>
11151
11152         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
11153         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
11154
11155 1998-12-16  Tom Tromey  <tromey@cygnus.com>
11156
11157         * parse-scan.y (qualified_name): Use correct sprintf format.
11158
11159 1998-12-15  Tom Tromey  <tromey@cygnus.com>
11160
11161         * gjavah.c (print_field_info): Changed how most negative number is
11162         printed.
11163
11164 1998-12-14  Per Bothner  <bothner@cygnus.com>
11165
11166         * parse.y (fold_constant_for_init):  New function.
11167         (resolve_expression_name):  Don't replace static final
11168         constant-initialized fields by its value.
11169         (java_complete_lhs):  New.  Same as java_complete_tree, except does
11170         not replace static final constant-initialized fields by their values.
11171         (register_fields):  If there is an initializer, set DECL_INITIAL and
11172         MODIFY_EXPR_FROM_INITIALIZATION_P.
11173         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
11174         Only call patch_initialized_static_field if
11175         MODIFY_EXPR_FROM_INITIALIZATION_P.
11176         (patch_initialized_static_field):  If not valid constant, clear
11177         DECL_INITIAL.
11178
11179         * parse.y (lookup_field_wrapper):  Fix thinko.
11180
11181         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
11182         set and restore global lineno.
11183
11184 1998-12-14  Tom Tromey  <tromey@cygnus.com>
11185
11186         * gjavah.c (print_field_info): If value to print is the smallest
11187         value of its size, then print as hex to avoid later warnings from
11188         C++ compiler.
11189
11190 1998-12-14  Tom Tromey  <tromey@cygnus.com>
11191
11192         * gjavah.c (decompile_method): Decompile `return null'.
11193         (process_file): Generate `#pragma interface'.
11194         (method_declared): New global.
11195         (print_method_info): Set it.
11196         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
11197         (print_method_info): Handle abstract methods.
11198
11199 1998-12-13  Per Bothner  <bothner@cygnus.com>
11200
11201         * parse.y (patch_method_invocation):  If class_decl is null
11202         (e.g. an array type), use original type.
11203
11204         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
11205         errors about uncaught exception from clone (of array, specifically).
11206
11207 1998-12-13  Tom Tromey  <tromey@cygnus.com>
11208
11209         * gjavah.c (decompile_method): Handle all types of `return'
11210         opcode.  Decompile `return this' and `return'.
11211         (method_access): New global.
11212         (print_method_info): Set it.
11213         (decompile_method): Don't decompile a synchronized method.
11214
11215 1998-12-13  Tom Tromey  <tromey@cygnus.com>
11216
11217         * jcf-reader.c (jcf_parse_one_method): Recognize
11218         HANDLE_END_METHOD.
11219         * gjavah.c (HANDLE_END_METHOD): New macro.
11220         (HANDLE_CODE_ATTRIBUTE): New macro.
11221         (decompile_method): New function.
11222         (print_method_info): Don't print `;\n' at end of function decl.
11223         Include java-opcodes.h.
11224         (decompiled): New global.
11225
11226 1998-12-12  Per Bothner  <bothner@cygnus.com>
11227
11228         * class.c (build_class_ref):  Handle PRIMTYPE.class if
11229         flag_emit_class_files.
11230         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
11231         if flag_emit_class_files.
11232         * parse.y (java_complete_tree):  Pre-liminary support for
11233         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
11234
11235         * parse.y (patch_synchronized_statement):   Don't call monitorexit
11236         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
11237
11238         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
11239
11240         * zipfile.h (opendir_in_zip):  New declaration.
11241         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
11242         (opendir_in_zip):  New function, using code from open_in_zip.
11243         (open_in_zip):  Call opendir_in_zip.
11244         (find_class):  Remove no-longer-used do_class_file parameter,
11245         but add source_ok parameter.  Change logic so if we find a .java file,
11246         we don't look for .class in later classpath emtries.
11247         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
11248         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
11249         * gjavah.c: Update call to find_class.
11250         * jcf-dump.c:  Likewise.
11251
11252         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
11253         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
11254         nothing if body is empty_stmt_node.
11255         Various little fixes so SP gets correctly adjusted.
11256         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
11257         For CALL_EXPR, test if static first.
11258         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
11259         such as the ones we create for Object and Class.
11260         Set and restore current_function_decl.
11261         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
11262         (note_possible_classname):  New function.
11263         (read_import_entry):  Removed.  Merged with read_import_dir.
11264         (read_import_dir):  Don't call find_class - that only gives us
11265         the first classpath entry having the needed package.
11266         Use the struct buffer data structure from buffer.h.
11267         (read_import_dir, find_in_imports_on_demand):  The remembered
11268         class names now use '.' (not '/') as package separator.
11269
11270         * parse.y (java_complete_expand_methods):  Call write_classfile
11271         here, and not in java_expand_classes (which only gets first class).
11272
11273 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11274
11275         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
11276         (register_fields):  If a static fields has an initializer, just
11277         chain it on ctxp->static_initialized, and handle later.
11278         (java_complete_expand_methods):  Force <clinit> first.
11279         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
11280         - it's already been completed.
11281         (patch_initialized_static_field):  New function.
11282         (java_complete_field):  Call it.
11283
11284 1998-12-12  Per Bothner  <bothner@cygnus.com>
11285
11286         * expr.c (encode_newarray_type, build_new_array):  New functions.
11287         * java-tree.h:  Declare build_new_array.
11288         * jcf-write.c (patch_newarray):  Use build_new_array.
11289
11290         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
11291         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
11292
11293         * parse.y (patch_new_array_init):  Re-organize.
11294         Now is passed the actual array (pointer) type of the value.
11295         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
11296         (patch_array_constructor):  Removed - merged into patch_new_array_init.
11297         (java_complete_tree):  Update patch_new_array_init.
11298
11299         * jcf-write.c (find_constant_index):  New function.
11300         (generate_bytecode_insns):  Use find_constant_index.
11301         (generate_classfile):  Use find_constant_index for ConstantValue.
11302
11303 1998-12-11  Tom Tromey  <tromey@cygnus.com>
11304
11305         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
11306         * decl.c (init_decl_processing): Renamed dtable -> vtable.
11307         * class.c (make_class_data): Renamed dtable -> vtable, and
11308         dtable_method_count -> vtable_method_count.
11309
11310 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11311
11312         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
11313         global variables, initialized.
11314         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
11315         Declared new global variables.
11316         * lex.c (java_lex): Return long_zero_node, float_zero_node,
11317         double_zero_node, integer_zero_node upon direct matching.
11318         * parse.y (purify_type_name): Added function prototype.
11319         (duplicate_declaration_error_p): Consider new_type as potentially
11320         being a incomplete type. Use purify_type_name on type string.
11321         (method_header): saved_type: unused variable removed. Don't figure
11322         return type if method name is invalid.
11323         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
11324         processed by patch_unaryop.
11325         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
11326         increment/decrement node into its original type after binary
11327         numeric promotion on its operands.
11328
11329 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11330
11331         * parse.y (array_initializer:): Array init operand is NULL_TREE
11332         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
11333         now an error. Fixed indentation problems.
11334         (patch_string): Handle error_mark_node as an argument.
11335         (patch_new_array_init): Fixed indentation problems.
11336         (array_constructor_check_entry): Removed check on null wfl_value.
11337         Return an error if wfl_value's walk returns an error.
11338
11339 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11340
11341         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
11342         * lex.c (java_lex): Remember column position before advancing one
11343         token. Retain location information on OCB_TK.
11344         * lex.h (typedef struct java_lc): Added new field.
11345         * parse.h (GET_SKIP_TYPE): New macro.
11346         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
11347         * parse.y (build_new_array_init, patch_new_array_init,
11348         patch_array_constructor, maybe_build_array_element_wfl,
11349         array_constructor_check_entry): New function prototypes.
11350         (switch_block:): Tagged <node>.
11351         (OCB_TK): Tagged <operator>.
11352         (array_initializer:): Installed actions.
11353         (variable_initializer): Build location information on element if
11354         necessary.
11355         (switch_statement:): Fixed indentation typo.
11356         (switch_block:): Redefined default action.
11357         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
11358         (patch_assignment): Removed duplicate code.
11359         (maybe_build_array_element_wfl, build_new_array_init,
11360         patch_new_array_init, patch_array_constructor,
11361         array_constructor_check_entry): New functions.
11362
11363 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11364
11365         * parse.y (array_initializer): Tagged <node>.
11366         (variable_initializer:): Use default rule.
11367         (array_initializer:): Defined actions.
11368         (variable_initializers:): Likewise.
11369         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
11370         non-static field accesses.
11371         (patch_invoke): Fixed indentation typo.
11372         (java_complete_tree): Likewise.
11373         (build_labeled_block): Changed leading comment. Generate an error
11374         in case of duplicate loop labels.
11375         (patch_conditional_expr): Patch results of string concatenation
11376         operations.
11377
11378 1998-12-06  Per Bothner  <bothner@cygnus.com>
11379
11380         * constants.c (find_methodref_index):  When the class is an interface,
11381         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
11382
11383         * decl.c (finit_identifier_node):  Use "$finit$", rather than
11384         "<finit>" (which Sun's verifier rejects).
11385         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
11386         (generate_field_initialization_code):  Removed.
11387         (fix_constructors)  Don't add call to $finit$ here (wrong order).
11388         (patch_method_invocation):  Add $finit$ call here.
11389
11390         * java-tree.h (CALL_USING_SUPER):  New macro.
11391         * parse.y (patch_invoke):  Remove im local variable.
11392         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
11393         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
11394         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
11395
11396         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
11397
11398         * parse.y (java_complete_tree):  Don't complain about unreachable
11399         statement if it is empty_stmt_node.
11400
11401         * jcf-write.c (find_constant_wide):  New function.
11402         (push_long_const):  Use find_constant_wide.
11403
11404         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
11405         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
11406         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
11407         Emit invokeinterface when calling an interface method.
11408         Emit invokespecial also when calling super or private methods.
11409
11410         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
11411
11412 1998-12-06  Per Bothner  <bothner@cygnus.com>
11413
11414         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
11415
11416 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11417
11418         * java-tree.h (java_layout_seen_class_methods): New function
11419         prototype.
11420         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
11421         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
11422         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
11423         * parse.y (method_declarator:): Defined action.
11424         (issue_warning_error_from_context): input_filename saved, set to
11425         the appropriate value and restored after java_error is called.
11426         (build_unresolved_array_type): Fixed comment.
11427         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
11428         (method_header): Deal with return type the same way type are
11429         handled for fields and method's parameters and local variables
11430         types are handled.
11431         (check_method_redefinition): Removed extra CR.
11432         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
11433         (java_layout_seen_class_methods): New function.
11434         (java_layout_classes): Call java_layout_seen_class_methods.
11435
11436 1998-12-03  Per Bothner  <bothner@cygnus.com>
11437
11438         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
11439
11440 1998-12-03  Per Bothner  <bothner@cygnus.com>
11441
11442         * jcf-dump.c (main):  Fix error message.
11443         * jcf-path.c (add_entry):  Style fix.
11444
11445 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11446
11447         * class.c (layout_class_method): Call build_java_argument_signature
11448         on constructors too.
11449         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
11450         (patch_method_invocation): Define a primary when resolving an
11451         expression name. Augmented comment on code checking illegal `this'
11452         usage. Loosened it test by accepting NEW_CLASS_EXPR.
11453
11454 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11455
11456         * class.c (layout_class_method): Don't report error on non-static
11457         overriding static if the method is private.
11458         * java-tree.h (finish_class): Prototype added.
11459         * lex.c (java_get_line_col): Handle col argument -2 value.
11460         * parse.h: All static method declarations moved to parse.y.
11461         * parse.y: Now contains all static method declarations previously
11462         found in parse.h.
11463         (find_expr_with_wfl, missing_return_error,
11464         unreachable_stmt_error): New functions.
11465         (java_get_real_method_name): Identify constructors bearing class
11466         names in source code compiled classes only.
11467         (java_complete_expand_methods): Call missing_return_error.
11468         (invocation_mode): Private methods invoked as static methods.
11469         (java_complete_tree): Call unreachable_stmt_error.
11470
11471 1998-12-01  Tom Tromey  <tromey@cygnus.com>
11472
11473         * Makefile.in (+target): Removed.
11474         (+xmake_file): Likewise.
11475         (+tmake_file): Likewise.
11476         (.NOEXPORT): Removed duplicate.
11477
11478 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11479
11480         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
11481
11482         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
11483
11484         * jvgenmain.c: Remove the xmalloc prototype, we get it from
11485         libiberty.h.  Provide an xmalloc definition.
11486
11487         * jvspec.c: Remove the xmalloc prototype.
11488
11489         * parse-scan.y: Include config.h and system.h.  Don't include
11490         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
11491         Provide an xstrdup definition.
11492
11493 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
11494
11495         * jcf-path.c (add_entry): Recognize ".jar" too.
11496         * lang-specs.h: Likewise.
11497
11498 1998-11-26  Per Bothner  <bothner@cygnus.com>
11499
11500         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
11501         soft_monitorenter_node, soft_monitorexit_node, throw_node.
11502
11503         * jcf-write.c (generate_bytecode_insns):
11504         Handle pre/post-increment/decrement of long.
11505
11506         * jcf-write.c (generate_bytecode_insns):
11507         Handle missing exception handler (finally for synchronized).
11508
11509 1998-11-25  Per Bothner  <bothner@cygnus.com>
11510
11511         * java-tree.h (end_params_node):  Declare global.
11512         * decl.c (end_params_node):  New global.
11513         (init_decl_processing, start_java_method):  Use end_params_node for
11514         end of list of parameter types.  Follows correct gcc conventions.
11515         * expr.c (pop_argument_types, pop_arguments):  Likewise.
11516         * lang.c (put_decl_node):  Likewise.
11517         * typeck.c (various places):  Likewise.
11518         * class.y (various places):  Likewise.
11519         * parse.y (various places):  Likewise.
11520
11521         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
11522         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
11523
11524         * class.c:  Add #include flags.h, remove no-longer needed declaration.
11525
11526         * class.c (layout_class_method):  Remove commented-out code, re-format.
11527         Don't add vtable entry (or index) for private methods.
11528         * expr.c (expand_invoke):  A private method is implicitly final.
11529         * class.c (make_class_data):  If inlining or optimizing,
11530         skip private methods.
11531
11532         * class.c (finish_class):  New function.  Calls existing methods,
11533         but alls emits deferred inline functions.
11534         * jcf-parse.c (parse_class_file):  Call finish_class.
11535         * parse.y (java_complete_expand_methods):  Likewise.
11536
11537         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
11538
11539         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
11540
11541 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
11542
11543         * jcf-write.c (generate_bytecode_conditional): Fix typo.
11544
11545 1998-11-24  Per Bothner  <bothner@cygnus.com>
11546
11547         * (generate_classfile): Always write class access flag with
11548         ACC_SUPER set.
11549
11550 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11551
11552         * class.c (maybe_layout_super_class): New function.
11553         (layout_class): Reorganized. Loop on class methods dispatched into
11554         a new function. Call maybe_layout_super_class.
11555         (layout_class_methods, layout_class_method): New functions.
11556         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
11557         class.
11558         (expand_invoke): Likewise.
11559         * java-tree.h (all_class_list): New global variable declared.
11560         (layout_class_methods, layout_class_method): New function
11561         prototypes.
11562         (LAYOUT_SEEN_CLASS_METHODS): New macro.
11563         * jcf-parse.c (all_class_list): New global variable.
11564         (load_class): Extended what class_or_name can be. Use parser
11565         context mechanism to save globals before calling jcf_parse.
11566         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
11567         is set on the file name.
11568         (jcf_parse): Layout class methods when Object is loaded, otherwise
11569         record class in all_class_list for delayed method layout.
11570         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
11571         * lang.c (put_decl_node): Decode <init> into the decl context
11572         class name.
11573         * lex.c (java_allocate_new_line): Use xmalloc.
11574         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
11575         pointers, not TREE_LIST elements.
11576         (struct parser_ctxt): Fixed comment indentations, added comments
11577         and reordered some fields.
11578         (java_check_methods): Function prototype removed.
11579         * parse.y (java_push_parser_context): Use xmalloc.
11580         (java_parser_context_restore_global): Pop extra pushed ctxp only
11581         when there's nothing next.
11582         (maybe_create_class_interface_decl): Fixed comment, add new
11583         created class decl to all_class_list.
11584         (method_header): Use GET_REAL_TYPE on argument's types.
11585         (method_declarator): Use GET_REAL_TYPE, change type to the real
11586         type in TREE_LIST dependency node. Build argument list with the
11587         real type.
11588         (create_jdep_list): Use xmalloc. Removed allocation error message.
11589         (obtain_incomplete_type): Fixed leading comment. Broadened
11590         incoming argument meaning.
11591         (register_incomplete_type): Use xmalloc. Removed allocation error
11592         message.
11593         (safe_layout_class): Fixed leading comment.
11594         (jdep_resolve_class): Reversed if statement condition and switch
11595         if and else bodies.
11596         (resolve_and_layout): Fixed leading comment. Broadened incoming
11597         argument meaning.
11598         (complete_class_report_errors): New local variable name, for
11599         clarity. purify_type_name used for all error cases.
11600         (java_get_real_method_name): Stricter check on constructors.
11601         (java_check_regular_methods): Reverse methods list only if not
11602         already laid out. Layout artificial constructor.
11603         (java_check_methods): Deleted.
11604         (source_start_java_method): Obtain incomplete type for patchable
11605         method arguments.
11606         (java_layout_classes): Fixed leading comment. Use
11607         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
11608         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
11609         before returning. Fixed comments.
11610         (java_expand_classes): Check for errors up front.
11611         (patch_method_invocation): Class to search is resolved and laid
11612         out.
11613
11614 1998-11-24  Per Bothner  <bothner@cygnus.com>
11615
11616         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
11617
11618         * javaop.h (int8):  Removed - not used.
11619         (jbyte):  Redefine portably with correct signedness.
11620
11621         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
11622
11623         * jcf-write.c (generate_bytecode_insns):  Fix typo
11624         OPCODE_getstatic to OPCODE_getfield.
11625
11626         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
11627         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
11628         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
11629
11630 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11631
11632         * jcf-parse.c (jcf_parse_source): Function returned type is
11633         void. Added prototype.
11634         (jcf_parse): Function returned type is void.
11635         (yyparse): Remove call to fclose on the last parsed file.
11636
11637         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
11638
11639 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11640
11641         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
11642         (layout_class): Cope with methods featuring WFL in decl names.
11643         * decl.c (unqualified_object_id_node): New global variable,
11644         initialized.
11645         (build_decl_no_layout): Removed.
11646         * expr.c (build_primtype_type_ref): Handle Double.
11647         (java_lang_expand_expr): Fixed indentations.
11648         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
11649         (flag_wall, flag_redundant, flag_not_overriding,
11650         flag_static_local_jdk1_1, unqualified_object_id_node): Global
11651         variable declarations.
11652         (build_decl_no_layout): Removed prototype.
11653         (java_get_real_method_name): Added prototype.
11654         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
11655         (java_parse_abort_on_error): Macro now just returns.
11656         * jcf-parse.c (jcf_parse_source): Check fclose returned
11657         value. Call emit_register_classes if java_report_errors returns
11658         zero.
11659         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
11660         flag_static_local_jdk1_1): New integer flags.
11661         (lang_decode_option): New flags set here.
11662         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
11663         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
11664         the flag_redundant variable.
11665         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
11666         when parsing java.lang.Object class.
11667         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
11668         NULL_TREE to build.
11669         (resolve_qualified_expression_name): Fixed indentation.
11670         (patch_array_ref): Changed prototype.
11671         (not_initialized_as_it_should_p): Prototype removed.
11672         (java_report_errors): Added function prototype.
11673         * parse.y (formal_parameter:): Changed error message for not yet
11674         supported final parameters.
11675         (class_type_list:): Set both PURPOSE and VALUE of created
11676         TREE_LIST to be class_type.
11677         (primary_no_new_array:): Handle class literals on primitive types.
11678         (parse_warning_context): Reinstalled correct force_error and
11679         do_warning flags setups.
11680         (java_report_errors): Changed prototype. Return java_error_count
11681         value.
11682         (variable_redefinition_error): Consider treating variable type as
11683         a fake pointer.
11684         (create_interface): Warn about redundant abstract modifier if
11685         flag_redundant is set. Changed error message.
11686         (lookup_field_wrapper): Save/restore globals before/after looking
11687         up field.
11688         (duplicate_declaration_error_p): Consider treating declaration
11689         type as a fake pointer.
11690         (register_fields): Extract real type from dependency node. Check
11691         for duplicate field declaration after type adjustment. Use
11692         DECL_INITIAL to store static final initialized values.
11693         (method_header): Extract real function type from dependency node.
11694         (check_abstract_method_header): Use GET_METHOD_NAME.
11695         (obtain_incomplete_type): Layout fake pointer type.
11696         (safe_layout_class): Don't try to check for methods before layout.
11697         (java_complete_class): Don't check for correct throws clause
11698         elements inheritance here.
11699         (resolve_and_layout): Broadened name parameter meaning.
11700         (reset_method_name): Use GET_METHOD_NAME.
11701         (java_get_real_method_name): New function.
11702         (java_check_regular_methods): Don't check methods in
11703         java.lang.Object.  Verify lineage of throws clause elements. Use
11704         flag_no_overriding in warning report.
11705         (check_throws_clauses): Don't check if class was from
11706         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
11707         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
11708         (declare_local_variables): Use flag_static_local_jdk1_1 to report
11709         warning on unsupported final local variables. Use build_decl
11710         instead of build_decl_no_layout. Get real local variable type from
11711         dependency node.
11712         (source_start_java_method): Get real parameter type from
11713         dependency node. Call build_decl instead of build_decl_no_layout.
11714         (java_layout_classes): Reverse tree and layout type and class as
11715         required. Mark class as loaded when done.
11716         (resolve_field_access): Fixed indentation. Restricted condition
11717         leading to static field access code generation. Set field_type
11718         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
11719         (resolve_qualified_expression_name): Initialize type_found to
11720         null. Handle static field resolved during qualification. Fixed
11721         layout on non primitive field decl types.
11722         (not_accessible_p): Fixed typo in comment.
11723         (patch_method_invocation): Resolve and layout class to search from
11724         type.
11725         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
11726         layout non primitive type, if necessary. Make method node only to
11727         report errors.
11728         (find_applicable_accessible_methods_list): Consider WFL'ed method
11729         decl names. Fixed indentation.
11730         (argument_types_convertible): Resolve and layout target type if
11731         necessary.
11732         (java_complete_tree): Fixed indentation problems. Rewrote
11733         CALL_EXPR thrown exceptions check. Re-installed further processing
11734         of the assignment in certain cases.
11735         (patch_assignment): Call maybe_build_primttype_type_ref to perform
11736         inlining on class literals.
11737         (valid_builtin_assignconv_identity_widening_p): Cope with constant
11738         0 literal.
11739         (valid_method_invocation_conversion_p): Likewise.
11740         (patch_string): Temporary disable forbidden use of `this' in
11741         explicit constructor invocations when doing string concatenation
11742         within their scope.
11743         (patch_unaryop): Added comment. Reinstalled code to disable
11744         further check on assignment operation with cast expression RHS.
11745         (patch_switch_statement): Fixed indentation.
11746         (build_try_statement): Call build_decl instead of
11747         build_decl_no_layout.
11748         (patch_synchronized_statement): Likewise.
11749         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
11750         IS_UNCHECKED_EXPRESSION_P.
11751         (check_thrown_exceptions_do): Changed leading comment. Resolve and
11752         layout argument exception type.
11753         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
11754         of IS_UNCHECKED_EXPRESSION_P.
11755
11756 1998-11-18  Anthony Green  <green@cygnus.com>
11757
11758         * jcf-parse.c (yyparse): Open class file in binary mode.
11759
11760 1998-11-15  Per Bothner  <bothner@cygnus.com>
11761
11762         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
11763
11764         * jcf-write.c (perform_relocations):  Move check out one loop.
11765
11766 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
11767
11768         * Make-lang.in: Fix reference to srcdir.
11769         * jv-scan.c: Add missing xmalloc prototype.
11770         * jvgenmain.c: Ditto.
11771
11772 1998-11-15  Per Bothner  <bothner@cygnus.com>
11773
11774         * decl.c (error_mark_node), java-tree.h:  New global.
11775         * parse.y:  Use empty_stmt_node instead of size_zero_node.
11776         (build_if_else_statement):  If missing else, use empty_stmt_node.
11777
11778         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
11779         (java_complete_expand_method):  Complain if return is missing.
11780         (java_check_regular_methods):  Comment out incorrect error check.
11781         (not_accessible_p):  Fix incorrect handling of protected methods.
11782         (patch_method_invocation):  Pass correct context to not_accessible_p.
11783         (find_applicable_accessible_methods_list):  Likewise.
11784         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
11785         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
11786         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
11787         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
11788
11789         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
11790         (push_int_const):  Remove reundant NOTE_PUSH.
11791         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
11792         (- case SWITCH_EXPR):  Fix code generation bug.
11793         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
11794         (generate_classfile):  More robust for abstract methods.
11795
11796 1998-11-15  Anthony Green  <green@cygnus.com>
11797
11798         * Makefile.in: jv-scan and jvgenmain all require libiberty.
11799         * Make-lang.in: Ditto.
11800
11801         * jv-scan.c: Remove xmalloc and xstrdup definitions.
11802         * jvgenmain: Ditto.
11803
11804 1998-11-15  Per Bothner  <bothner@cygnus.com>
11805
11806         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
11807
11808         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
11809
11810 1998-11-14  Per Bothner  <bothner@cygnus.com>
11811
11812         Allow uses of interface types to verify.  This is not really
11813         type-safe, but it matches what Sun does, and is OK as long as
11814         there are appropriate run-time checks.
11815         * verify.c (merge_types):  If merging two interface types,
11816         just set the result to java.lang.Object.
11817         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
11818
11819 1998-11-13  Tom Tromey  <tromey@cygnus.com>
11820
11821         * gjavah.c (main): Handle --output-class-directory argument.
11822         * jvspec.c (lang_specific_driver): Translate `-d' into
11823         -foutput-class-dir.
11824         * jcf.h (jcf_write_base_directory): Declare.
11825         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
11826         * lang-options.h: Mention -foutput-class-dir.
11827         * jcf-write.c (jcf_write_base_directory): New global.
11828         (make_class_file_name): Put generated .class file into `-d'
11829         directory, or into source directory if -d not given.  Function now
11830         static.
11831         (write_classfile): Free class file name.  Handle case where class
11832         file name is NULL.
11833         (DIR_SEPARATOR): New macro.
11834         Include <sys/stat.h>
11835
11836         * Makefile.in (prefix): New macro.
11837
11838 1998-11-12  Per Bothner  <bothner@cygnus.com>
11839
11840         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
11841         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
11842         here (done in patch_invoke instead).
11843         (case_identity):  Moved here from parse.y.
11844
11845         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
11846         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
11847         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
11848         so they can be efficiently scanned without recursion.
11849         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
11850         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
11851         in BLOCK iteratively, rather than recursively.
11852
11853         * parse.y (do_unary_numeric_promotion):  New function.
11854         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
11855
11856         * parse.y (patch_newarray):  Various fixes.
11857
11858         Re-do handling of switch statements (for proper block scoping).
11859         * parse.y:  Add just a single block for the enture switch block,
11860         but don't create any "case blocks".
11861         (group_of_labels):  Rmeoved unneeded non-terminal.
11862         CASE_EXPR and DEFAULT_EXPR are added to current block.
11863         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
11864         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
11865         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
11866         * parse.y (wfl_operator, print_int_node): Make non-static.
11867         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
11868         as part of recursive scan of block.
11869         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
11870         (patch_switch_statement):  Most tests move dinto java_complete_tree.
11871
11872         * parse.y:  Make various production be non-typed (void).
11873         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
11874         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
11875         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
11876
11877         * jcf-write.c (struct jcf_handler):  New type.
11878         (struct jcf_switch_state):  New type.
11879         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
11880         (alloc_handler, emit_unop, emit_reloc):  New functions.
11881         (adjust_typed_op):  Add extra parameter ("max type" offset).
11882         (emit_switch_reloc, emit_case-reloc):  New function.
11883         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
11884         (generate_bytecode_insns):  Support REAL_CST, switch statements,
11885         exception handling, method calls, object/array creation, and more.
11886
11887         * class.c:  Remove some unused variables.
11888         * constants.c (find_string_constant):  New function.
11889         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
11890         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
11891         if flag_emit_class_files.
11892
11893 1998-11-12  Tom Tromey  <tromey@cygnus.com>
11894
11895         * jcf-io.c (find_class): Added explanatory comment.
11896
11897         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
11898         trailing slash to `.zip' entries.
11899
11900         * jvspec.c (lang_specific_driver): Correctly handle case where
11901         GC_NAME not defined.
11902
11903 1998-11-11  Tom Tromey  <tromey@cygnus.com>
11904
11905         * jvspec.c (GC_NAME): New define.
11906         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
11907         if required.
11908         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
11909
11910 1998-11-11  Per Bothner  <bothner@cygnus.com>
11911
11912         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
11913
11914 1998-11-11  Tom Tromey  <tromey@cygnus.com>
11915
11916         * jcf-dump.c (main): Correctly recognize `--'-style long options.
11917
11918 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11919
11920         * class.c (is_compiled_class): Call safe_layout_class for class
11921         compiled from source.
11922         * conver.h (convert_to_integer, convert_to_real,
11923         convert_to_pointer): Added prototypes.
11924         * decl.c (init_decl_processing): Non longer push the decls of
11925         `methodtable', `constants', `Class', `Field', `dispatchTable'
11926         `jexception' and `Method'.
11927         * expr.c (build_invokeinterface): New function.
11928         (expand_invoke): static variable CLASS_IDENT now in
11929         build_invokeinterface. Use build_invokeinterface.
11930         (expand_java_field_op): Moved code to inline
11931         java.lang.PRIMTYPE.TYPE into a function.
11932         (build_primtype_type_ref): New function.
11933         * java-tree.def (INSTANCEOF_EXPR): New tree code.
11934         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
11935         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
11936         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
11937         (DECL_LOCAL_STATIC_VALUE): New macro.
11938         (build_invokeinterface, build_primtype_type_ref): New function
11939         prototypes.
11940         (java_parse_abort_on_error): Macro rewritten.
11941         * jcf-parse.c (current_method): Add comment to declaration.
11942         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
11943         Function prototypes fixed.
11944         (jcf_parse_source): push/pop parser context. save/restore global.
11945         (parse_source_file): Fixed leading comment. Now take a
11946         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
11947         classes and pop the parser context anymore.
11948         (yyparse): Push parser context, save globals, parse the source
11949         file, restore globals and pop the parser context when processing a
11950         source file.
11951         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
11952         * lex.c (java_parse_doc_section): New function.
11953         (java_lex): Call java_parse_doc_section when appropriate. Build an
11954         operator around INSTANCEOF_TK.
11955         * lex.h (java_lineterminator, java_sprint_unicode,
11956         java_unicode_2_utf8, java_lex_error, java_store_unicode):
11957         Prototypes rewritten.
11958         (java_parse_escape_sequence, java_letter_or_digit_p,
11959         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
11960         java_read_unicode, java_store_unicode, java_read_char,
11961         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
11962         Added function prototypes.
11963         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
11964         define.
11965         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
11966         New macros
11967         (struct parser_ctxt): New fields: deprecated,
11968         current_parsed_class_un, gclass_list.
11969         (fix_method_argument_names, issue_warning_error_from_context,
11970         resolve_package, lookup_package_type): New function prototypes.
11971         (resolve_expression_name): Fixed function prototype.
11972         (find_applicable_accessible_methods_list): Fixed indentation, added
11973         extra argument in prototype.
11974         (check_final_assignment, build_null_of_type, check_deprecation,
11975         check_method_redefinition, reset_method_name,
11976         java_check_regular_methods, java_check_abstract_methods,
11977         maybe_build_primttype_type_ref): New function prototype.
11978         * parse.y (conver.h): Include.
11979         (INSTANCEOF_TK): Tagged <operator>.
11980         (single_type_import_declaration): Use REGISTER_IMPORT macro.
11981         (relational_expression:): Build binop for instanceof.
11982         (java_push_parser_context): Remember ctxp->gclass_list across
11983         contexts.
11984         (java_pop_parser_context): Simply return if no context
11985         exists. Remember gclass_list across contexts.
11986         (issue_warning_error_from_context): New function.
11987         (parse_error_context): Don't setup ctxp->elc here. Call
11988         issue_warning_error_from_context instead.
11989         (parse_warning_context): Likewise.
11990         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
11991         setup. Link new class/interface to ctxp->gclass_list.
11992         (add_superinterfaces): Register interface as incomplete if not
11993         loaded.
11994         (create_class): Remember class unqualified name in
11995         ctxp->current_parsed_class_un. Check class deprecation.
11996         (register_fields): Check field deprecation. Remember static final
11997         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
11998         processing INIT.
11999         (method_header): New local variable ORIG_ARG. Use unqualified
12000         current class name for check on constructor errors. Promote return
12001         type if of record type. Argument list fix moved in
12002         fix_method_argument_names, called here. Check method deprecation.
12003         (fix_method_argument_names): New function.
12004         (method_declarator): Promote record typed arguments.
12005         (safe_layout_class): Check class methods before layout.
12006         (java_complete_class): Compute field layout when patched.
12007         (do_resolve_class): Try to load class after having it renamed
12008         after the package name.
12009         (get_printable_method_name): Use DECL_CONTEXT.
12010         (reset_method_name): New function.
12011         (check_method_redefinition): Use reset_method_name.
12012         (java_check_regular_methods): New local variable
12013         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
12014         names for error report. Check for compile-time error when method
12015         found has default (package) access.
12016         (java_check_abstract_methods): Now takes an interface DECL node as
12017         an argument. Also reinstall real name on unchecked
12018         overriding/hiding methods for error report.
12019         (java_check_methods): Fixed leading comment. Get classes to verify
12020         from ctxp->gclass_list. Use CHECK_METHODS macro and set
12021         CLASS_METHOD_CHECKED_P on class verification.
12022         (lookup_java_method2): Get real method name if necessary.
12023         (find_in_imports): Don't check package class access here.
12024         (resolve_package, lookup_package_type): New functions.
12025         (java_layout_classes): Fixed leading comment. Take classes to be
12026         laid out from ctxp->gclass_list.
12027         (java_complete_expand_methods): Don't expand native and abstract
12028         methods.
12029         (java_expand_classes): New function.
12030         (resolve_expression_name): Use additional argument ORIG.  Retrieve
12031         values of static final field of primitive types.
12032         (resolve_field_access): Handles static final field of promotive
12033         type.
12034         (resolve_qualified_expression_name): Handle STRING_CST as
12035         primaries and package name resolution. Check deprecation on found
12036         decls. Set where_found and type_found on non static field resolved
12037         during qualification. Layout non primitive field decl types.
12038         (check_deprecation): New function.
12039         (maybe_access_field): Simplified.
12040         (patch_method_invocation_stmt): Local variable CLASS_TYPE
12041         removed. Reverse method's argument when primary is a type. Don't
12042         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
12043         instead. Include abstract class in the list of class searchable
12044         for constructors. Use DECL_CONTEXT of found method for access
12045         checks. Check method deprecation.
12046         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
12047         converting arguments. Handle INVOKE_INTERFACE.
12048         (lookup_method_invoke): Search constructor using existing
12049         infrastructure (don't rely on lookup_java_constructor anymore).
12050         (find_applicable_accessible_methods_list): Extra argument flag
12051         LC. Now include constructor in the search.
12052         (qualify_ambiguous_name): Conditional expression are primaries.
12053         (not_initialized_as_it_should_p): static final are always
12054         initialized.
12055         (java_complete_tree): Pass extra NULL argument to
12056         resolve_expression_name. Stricter test to carry on patching
12057         assignments. New case for INSTANCEOF_EXPR.
12058         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
12059         (check_final_assignment, maybe_build_primttype_type_ref): New
12060         functions.
12061         (patch_assignment): Detect resolved static finals and carry normal
12062         assignment error check on them. Inline PRIMTYPE.TYPE read access.
12063         (try_builtin_assignconv): Access constant 0 on all primitive
12064         types.
12065         (valid_builtin_assignconv_identity_widening_p): Accept identical
12066         types. Accept all promoted type on int type.
12067         (valid_ref_assignconv_cast_p): Accept a null pointer to be
12068         assigned to a reference.
12069         (valid_method_invocation_conversion_p): Accept to check null
12070         pointers.
12071         (build_binop): Merge declaration and initialization of local
12072         variable BINOP.
12073         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
12074         numeric types. Improved validity test for qualify operators on
12075         references.
12076         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
12077         and PREINCREMENT_EXPR. Also detect resolved static finals of a
12078         primitive type and issue the appropriate error message.
12079         (resolve_type_during_patch): Mark class loaded when resolved.
12080         (patch_cast): Allow null to be cased to reference types.
12081         (build_null_of_type): New function.
12082         (patch_array_ref): Handle array on references correctly.
12083         (patch_return): Removed unused local variable MODIFY. Force
12084         boolean to be returned as integers. Allows null to be returned by
12085         a function returning a reference.
12086         * typeck.c (convert_to_integer, convert_to_real,
12087         convert_to_pointer): Prototypes moved to convert.h
12088         (lookup_argument_method): Use method real name, if necessary.
12089
12090 1998-10-30  Tom Tromey  <tromey@cygnus.com>
12091
12092         * class.c (build_class_ref): Changed name of primitive classes to
12093         start with `_Jv_'.
12094
12095         * class.c (make_class_data): Renamed fields: nmethods to
12096         method_count, method_count to dtable_method_count.  Always set
12097         `state' field to 0.
12098         * decl.c (init_decl_processing): Likewise.
12099
12100 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12101
12102         * class.c (layout_class): Don't mangle <finit>, produce
12103         __finit<class> instead. Don't verify artificial methods.
12104         * decl.c (finit_identifier_node): New declared global.
12105         (init_decl_processing): finit_identifier_node initialized.
12106         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
12107         * java-tree.h (finit_identifier_node): Declared as extern.
12108         (struct lang_decl): New field called_constructor.
12109         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
12110         (CLASS_HAS_FINIT_P): New macro.
12111         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
12112         explicit constructor invocation.
12113         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
12114         CALL_SUPER_CONSTRUCTOR_P): New macros.
12115         (write_classfile): Added prototype.
12116         * jcf-parse.c (jcf_parse_source): Parse and remember for
12117         generation if the file was seen on the command line.
12118         (parse_source_file): Don't write the class file here.
12119         (yyparse): Loop on files rewritten. Set current_jcf.
12120         (parse_zip_file_entries): Parse class file only if it was found.
12121         * lang.c (init_parse): Don't open command line provided filename
12122         here.
12123         (lang_parse): Don't set main_jcf anymore.
12124         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
12125         (JCONSTRUCTOR_CHECK): New macro.
12126         (JBSC_TYPE_P): New macro.
12127         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
12128         (COMPLETE_CHECK_OP_2): New macro.
12129         (struct parse_ctxt): New field explicit_constructor_p.
12130         (check_class_interface_creation): Fixed prototype indentation.
12131         (patch_method_invocation_stmt): Prototype reflects added argument.
12132         (patch_invoke): Likewise.
12133         (complete_method_declaration, build_super_invocation,
12134         verify_constructor_circularity,
12135         build_this_super_qualified_invocation, get_printable_method_name,
12136         patch_conditional_expr, maybe_generate_finit, fix_constructors,
12137         verify_constructor_super, create_artificial_method,
12138         start_artificial_method_body, end_artificial_method_body,
12139         generate_field_initialization_code): New function prototypes.
12140         * parse.y: Fixed leading comment
12141         (constructor_header:, constructor_body:, block_end:): Rules tagged
12142         <node>.
12143         (type_declaration:): Call maybe_generate_finit.
12144         (method_declaration:): Action for method_body: placed in new
12145         function complete_method_declaration, called here.
12146         (constructor_declaration:): Defined actions. Removed leading
12147         FIXME.
12148         (constructor_header:): New rule with action.
12149         (constructor_body:): Rule rewritten using block_begin: and
12150         block_end:. Defined actions.
12151         (constructor_declarator:, explicit_constructor_invocation:):
12152         Defined actions.
12153         (block:): Use new rules block_begin: block_end:.
12154         (block_begin:, block_end:): New rules and actions.
12155         (block_statements:): Fixed error message for explicit
12156         constructors.
12157         (method_invocation:): Call build_this_super_qualified_invocation
12158         if primary is `this' or `super' was seen.
12159         (conditional_expression:): Action defined.
12160         (extra_ctxp_pushed_p): New static global flag.
12161         (java_parser_context_save_global): Create parser context if
12162         necessary. Use extra_ctxp_pushed_p to remember it.
12163         (java_parser_context_restore_global): Pop extra parser context if
12164         one exists.
12165         (build_array_from_name): Array on primitive types are marked
12166         loaded.
12167         (register_fields): Restore new name in field initializer
12168         expression if type was altered. Non static fields initialized upon
12169         declaration marked initialized.
12170         (maybe_generate_finit): New function.
12171         (maybe_generate_clinit): Use create_artificial_method,
12172         start_artificial_method_body, end_artificial_method_body. Generate
12173         debug info for enclosed initialization statements.
12174         (method_header): Fixed leading comment. Check constructor
12175         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
12176         accordingly.
12177         (complete_method_declaration, constructor_circularity_msg,
12178         verify_constructor_circularity): New functions.
12179         (get_printable_method_name): New function.
12180         (check_method_redefinition): Don't rename <finit> methods. Fix
12181         declared constructor names. Error message for
12182         constructors modified.
12183         (java_check_regular_methods): Local variable seen_constructor
12184         renamed saw_constructor. Skip verification on constructors. Create
12185         default constructor with create_artificial_method.
12186         (java_check_methods): Removed unnecessary empty line.
12187         (create_artificial_method, start_artificial_method_body,
12188         end_artificial_method_body): New functions.
12189         (java_layout_classes): Changed leading comment. Reverse fields
12190         list if necessary. Always layout java.lang.Object if being
12191         defined.
12192         (java_complete_expand_methods): Verify constructor circularity.
12193         (java_complete_expand_method): Call fix_constructor on
12194         constructors.  Local variable no_ac_found removed. Restore
12195         bindings if method body expansion failed.
12196         (fix_constructors, verify_constructor_super,
12197         generate_field_initialization_code): New function.
12198         (java_expand_classes): Fixed leading comment. Write class file
12199         here.
12200         (resolve_expression_name): Check for illegal instance variable
12201         usage within the argument scope of an explicit constructor
12202         invocation.
12203         (resolve_qualified_expression_name): Pass extra from_super flag
12204         when invoking patch_method_invocation_stmt. New case for
12205         conditional expression when used as a primary. Check for error
12206         when acquiring super.
12207         (patch_method_invocation_stmt): Added extra argument super. New
12208         local variable is_static_flag. Set class_to_search according to
12209         the nature of the constructor invocation. Don't add `this'
12210         argument when expanding NEW_CLASS_EXPR. Check for illegal method
12211         invocation within the argument scope of explicit constructor
12212         invocation. Set is_static according to is_static_flag. Provide
12213         extra `super' argument to patch_invoke invocation.
12214         (patch_invoke): New argument from_super. Loop on arguments
12215         indentation fixed. Pass from_super to invocation_mode. New switch
12216         case INVOKE_SUPER. Fixed error message in switch default case.
12217         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
12218         value.
12219         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
12220         (lookup_method_invoke): Fixed prototypes in candidates list. Error
12221         message takes constructors into account.
12222         (find_applicable_accessible_methods_list): Fixed indentation.
12223         (qualify_ambiguous_name): Take explicit constructor invocation
12224         into account. Deal with a conditional expression as a primary to
12225         a method call.
12226         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
12227         case. Added extra argument to patch_method_invocation_stmt.
12228         Register calls made to explicit constructor `this'. Don't call
12229         save_expr in ARRAY_REF case when emitting class files. Check for
12230         illegal use of this when expanding explicit constructor invocation
12231         arguments.
12232         (complete_function_arguments): Set and reset parser context
12233         explicit_constructor_p field value when appropriate.
12234         (build_super_invocation, build_this_super_qualified_invocation):
12235         New functions.
12236         (patch_assignment): Fixed typo.
12237         (patch_unaryop): Check on final fields occurs only when a decl
12238         exits.
12239         (patch_return): Take constructors into account.
12240         (patch_conditional_expr): New function.
12241         * typeck.c (build_java_signature): Removed unnecessary empty line.
12242
12243 1998-10-28  Jeffrey A Law  (law@cygnus.com)
12244
12245         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
12246
12247 1998-10-28  Tom Tromey  <tromey@cygnus.com>
12248
12249         * decl.c (init_decl_processing): Renamed fields.
12250         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
12251         interface_len, msize fields.
12252
12253         * class.c (make_class_data): Removed subclass_head and
12254         subclass_next fields.
12255         * decl.c (init_decl_processing): Removed subclass_head and
12256         subclass_next fields.
12257
12258 1998-10-28  Jeffrey A Law  (law@cygnus.com)
12259
12260         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
12261         * mangle.c (emit_unicode_mangled_name): Similarly.
12262
12263 1998-10-26  Nick Clifton  <nickc@cygnus.com>
12264
12265         * jcf-parse.c (get_constant): Place braces around code to compute
12266         'd' when REAL_ARITHMETIC is not defined.
12267
12268 1998-10-25  H.J. Lu  (hjl@gnu.org)
12269
12270         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
12271         dependency.
12272
12273 1998-10-23  Tom Tromey  <tromey@cygnus.com>
12274
12275         * lang-specs.h: `.zip' files are input to jc1.
12276
12277 1998-10-22  Per Bothner  <bothner@cygnus.com>
12278
12279         * jvspecs.c:  Add (but don't enable) support for combining multiple
12280         .class and .java input filenames to a single jc1 invocation.
12281         Add support for -C flag (copile to .class files).
12282         Translate -classpath and -CLASSPATH arguments.
12283         * lang-specs.h:  Don't set %2 spec.
12284
12285 1998-10-22  Tom Tromey  <tromey@cygnus.com>
12286
12287         * jcf-path.c (add_entry): Don't add trailing separator if entry is
12288         a .zip file.
12289         (add_path): Don't add trailing separator to non-empty path
12290         elements.
12291
12292         * lang.c (lang_decode_option): Check for -fclasspath and
12293         -fCLASSPATH before examining other `-f' options.
12294
12295         * java-tree.h (finalize_identifier_node): Don't declare.
12296         * class.c (make_class_data): Don't push "final" field.
12297         * decl.c (init_decl_processing): Don't push "final" field.
12298         (finalize_identifier_node): Removed.
12299         (init_decl_processing): Don't set finalize_identifier_node.
12300
12301         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
12302
12303 1998-10-11  Anthony Green  <green@cygnus.com>
12304
12305         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
12306         (JV_SCAN_SOURCES): New macro.
12307         (JCF_DUMP_SOURCES): Likewise.
12308         (jcf-dump$(exeext)): New target.
12309         (jv-scan$(exeext)): New target.
12310
12311 1998-10-22  Tom Tromey  <tromey@cygnus.com>
12312
12313         * Makefile.in (LEX): Removed.
12314         (LEXFLAGS): Likewise.
12315         (SET_BISON): New macro.
12316         (BISON): Removed.
12317         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
12318         spurious diffs in parse.c.
12319         ($(PARSE_SCAN_C)): Likewise.
12320         (PARSE_DIR): New macro.
12321         (PARSE_C): Use it.
12322         (PARSE_SCAN_C): Likewise.
12323         (PARSE_RELDIR): New macro.
12324
12325         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
12326
12327         * jcf-io.c (find_class): Use saw_java_source to determine when to
12328         look for `.java' file.
12329         * jcf-parse.c (saw_java_source): New global.
12330         (yyparse): Set it if `.java' file seen.
12331
12332         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
12333         (GCJH_SOURCES): Likewise.
12334         * Makefile.in (datadir): New macro.
12335         (libjava_zip): Likewise.
12336         (JAVA_OBJS): Added jcf-path.o.
12337         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
12338         (../gcjh$(exeext)): Likewise.
12339         (jcf-path.o): New target.
12340         * java-tree.h (fix_classpath): Removed decl.
12341         * jcf-parse.c (fix_classpath): Removed.
12342         (load_class): Don't call fix_classpath.
12343         * parse.y (read_import_dir): Don't call fix_classpath.
12344         * lex.h: Don't mention classpath.
12345         * lex.c (java_init_lex): Don't initialize classpath.
12346         * jcf-io.c (classpath): Removed global.
12347         (find_class): Use jcf_path iteration functions.  Correctly search
12348         class path for .java file.
12349         (open_in_zip): New argument `is_system'.
12350         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
12351         classpath-related options.
12352         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
12353         and -I.
12354         (lang_init): Call jcf_path_init.
12355         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
12356         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
12357         Correctly put braces around second string in each entry.
12358         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
12359         classpath-related options.
12360         (help): Updated for new options.
12361         * jcf.h: Declare functions from jcf-path.c.  Don't mention
12362         `classpath' global.
12363         * jcf-path.c: New file.
12364
12365         * jcf-depend.c: Include jcf.h.
12366
12367         * jcf-write.c (localvar_alloc): Returns `void'.
12368         (localvar_free): Removed unused variable.
12369
12370         * lang.c (OBJECT_SUFFIX): Define if not already defined.
12371         (init_parse): Use OBJECT_SUFFIX, not ".o".
12372
12373 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12374
12375         * class.c (emit_register_classes): Renamed from
12376         emit_register_class.
12377         * java-tree.h (emit_register_classes): Prototype renamed from
12378         emit_register_class.
12379         * jcf-parse.c (yyparse): Call emit_register_classes once before
12380         returning.
12381         * parse.y (java_expand_classes): No longer register classes.
12382
12383 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12384
12385         * class.c (is_compiled_class): New local variable
12386         seen_in_zip. Identify classes found in currently compiled source
12387         file(s).
12388         * decl.c (complete_start_java_method): Fixed typo.
12389         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
12390         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
12391         (CLASS_P): Moved around.
12392         (java_parse_abort_on_error): Macro moved from jcf-parse.c
12393         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
12394         java-parse.h
12395         (jcf_parse_source): Changed leading comment. Removed unnecessary
12396         fclose and CLASS_FROM_SOURCE_P marking.
12397         (parse_source_file): New local variables remember_for_generation
12398         and filename. Mark parsed file name identifier node. Removed block
12399         executed when parse_only was null. Set remember_for_generation.
12400         Use it as an argument to java_pop_parser_context.
12401         (yyparse): New local variables several_files, list, next node and
12402         current_file_list. Split ampersand separated file names into
12403         current_file_list. Iterate through the list and parse accordingly.
12404         * parse.h (java_pop_parser_context): New function prototype.
12405         * parse.y (ctxp_for_generation): New static global variable.
12406         (java_pop_parser_context): New argument generate. Link popped ctxp
12407         to ctxp_for_generation list accordingly.
12408         (java_complete_expand_methods): Fixed indentation.
12409         (java_expand_classes): New function.
12410
12411 1998-10-17  Per Bothner  <bothner@cygnus.com>
12412
12413         * Makefile.in:  Link with libiberty.a instead of memmove.o.
12414
12415 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12416
12417         * lex.c (setjmp.h): No longer included.
12418         * lex.h (setjmp.h): Included.
12419         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
12420         (duplicate_declaration_error_p): Renamed from
12421         duplicate_declaration_error.
12422         (build_array_from_name): New function prototype.
12423         * parse.y (setjmp.h): No longer included.
12424         (variable_declarator_id): Define action.
12425         (build_array_from_name): New function.
12426         (duplicate_declaration_error_p): Renamed from
12427         duplicate_declaration_error.  Fixed leading comment.
12428         (register_fields): Main `for' loop reorganized. Uses
12429         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
12430         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
12431         build_array_from_name.
12432         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
12433         types.
12434         (read_import_dir): Don't try to skip `.' and `..'.
12435         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
12436         build_array_from_name. Main `for' loop reorganized.
12437         (resolve_qualified_expression_name): When building access to a
12438         field, use the type where the field was found, not its own type.
12439         (maybe_access_field): Use field DECL_CONTEXT if the type where the
12440         field was found is null.
12441         (qualify_ambiguous_name): Sweep through all successive array
12442         dimensions.
12443
12444 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12445
12446         * java-tree.h (pop_labeled_block, lang_printable_name,
12447         maybe_add_interface, set_super_info, get_access_flags_from_decl,
12448         interface_of_p, inherits_from_p, fix_classpath,
12449         complete_start_java_method, emit_handlers, init_outgoing_cpool,
12450         make_class_data, register_class, alloc_name_constant): New
12451         function prototypes.
12452         * lang.c (lang_decode_option): Set argc argument unused. Fixed
12453         indentation. Added cast to remove warning.
12454         (lang_printable_name): Set v argument unused.
12455         (lang_print_error): Added argument to lang_printable_name call.
12456         (java_dummy_print, print_lang_decl, print_lang_type,
12457         print_lang_identifier, lang_print_xnode): All argument marked
12458         unused.
12459         * lex.c (java_unget_unicode): Removed unnecessary argument.
12460         (java_allocate_new_line): Unused local variable is gone.
12461         (java_read_char): Added parenthesis in expressions to remove
12462         warnings.  Added final return statement.
12463         (java_read_unicode): Added parenthesis in expression to remove
12464         warning.
12465         (java_parse_end_comment): Fixed java_unget_unicode invocation.
12466         (java_parse_escape_sequence): Likewise.
12467         (java_lex): Unused local variables are gone. Fixed
12468         java_unget_unicode invocation.
12469         * lex.h (set_float_handler): Prototype added when JC1_LITE not
12470         defined.
12471         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
12472         lang_printable_name invocation in macro.
12473         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
12474         Likewise.
12475         (duplicate_declaration_error): Suppressed unused argument in
12476         prototype.
12477         (identical_subpath_p): Function declaration is gone.
12478         (patch_invoke): Suppressed unused argument in prototype.
12479         (patch_cast, build_labeled_block, check_thrown_exceptions):
12480         Likewise.
12481         * parse.y (setjmp.h): Included
12482         (toplev.h): Likewise.
12483         (field_declaration:): Suppressed unused local
12484         (label_decl:): Fixed build_labeled_block invocation.
12485         (java_pop_parser_context): Put extra parenthesis around assignment
12486         in if.
12487         (yyerror): Suppressed unused local variables.
12488         (variable_redefinition_error): Fixed lang_printable_name
12489         invocation.
12490         (create_interface): Suppressed unused local variables.
12491         (create_class): Likewise.
12492         (duplicate_declaration_error): Suppressed unused argument. Fixed
12493         lang_printable_name invocation.
12494         (register_fields): Suppressed unused local variable. Fixed
12495         duplicate_declaration_error invocation.
12496         (method_header): Suppressed unused local variable.
12497         (method_declarator, parser_check_super): Likewise.
12498         (java_complete_class): Suppressed unused local variable. Fixed
12499         fatal error message.
12500         (complete_class_report_errors): Added default: in switch.
12501         (java_check_regular_methods): Fixed lang_printable_name
12502         invocations.
12503         (check_throws_clauses): Likewise.
12504         (java_check_abstract_methods): Suppressed unused local
12505         variable. Fixed lang_printable_name invocation.
12506         (read_import_entry): Added supplemental return statement.
12507         (read_import_dir): Suppressed unused local variables.
12508         (check_pkg_class_access, declare_local_variables): Likewise.
12509         (source_start_java_method): Suppressed unused extern variable
12510         declarations
12511         (expand_start_java_method): Suppressed unused extern and local
12512         variable declarations.
12513         (java_complete_expand_methods): Likewise.
12514         (java_complete_expand_method): Suppressed unused local variables.
12515         (make_qualified_name): Likewise.
12516         (resolve_qualified_expression_name): Added default: in
12517         switch. Fixed lang_printable_name invocation.
12518         (class_instance_creation_expression): Added parenthesis around
12519         expressions.
12520         (patch_method_invocation_stmt): Fixed lang_printable_name and
12521         patch_invoke invocations.
12522         (check_for_static_method_reference): Fixed lang_printable_name
12523         invocation.
12524         (patch_invoke): Suppressed unused arguments and local variables.
12525         (lookup_method_invoke): Suppressed unused local variables.
12526         (qualify_ambiguous_name): Added default: in switch.
12527         (identical_subpath_p): Function removed.
12528         (patch_assignment): Suppressed unused local variables. Suppressed
12529         unnecessary if statement. Fixed lang_printable_name invocations.
12530         (try_builtin_assignconv): Fixed lang_printable_name invocations.
12531         (valid_ref_assignconv_cast_p): Parenthesis around
12532         expression. Suppressed unused local variables.
12533         (build_binop): Suppressed unused local variables. fixed
12534         lang_printable_name invocations.
12535         (string_constant_concatenation): Suppressed unused local
12536         variables.
12537         (patch_unaryop): Fixed lang_printable_name invocation.
12538         (patch_cast): Suppressed unnecessary argument. Fixed
12539         lang_printable_name invocation.
12540         (patch_array_ref): Fixed lang_printable_name invocation.
12541         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
12542         (build_labeled_block): Suppressed unused argument.
12543         (generate_labeled_block): Fixed build_labeled_block invocation.
12544         (build_loop_body): Suppressed unused local variables.
12545         (patch_loop_statement): Likewise.
12546         (patch_exit): Fixed lang_printable_name invocation.
12547         (patch_switch_statement): Likewise.
12548         (case_identity): First argument marked unused.
12549         (patch_try_statement): Fixed lang_printable_name invocations.
12550         (patch_synchronized_statement, patch_throw_statement): Likewise.
12551         (check_thrown_exceptions): Fixed check_thrown_exceptions and
12552         lang_printable_name invocations.
12553         (check_thrown_exceptions_do): Suppressed unused argument.
12554
12555 1998-10-14  Tom Tromey  <tromey@cygnus.com>
12556
12557         * jcf-write.c (write_classfile): Add output class file as target.
12558         * lang-options.h: Added -MD, -MMD, -M, and -MM.
12559         * jcf.h: Added declarations for dependency-tracking functions.
12560         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
12561         * lang.c (lang_decode_option): Recognize -MD and -MMD.
12562         (finish_parse): Call jcf_dependency_write.
12563         (dependency_tracking): New global.
12564         (DEPEND_SET_FILE): New define.
12565         (DEPEND_ENABLE): New define.
12566         (init_parse): Enable dependency tracking if required.
12567         Include "flags.h".
12568         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
12569         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
12570         (../gcjh$(exeext)): Likewise.
12571         (jcf-depend.o): New target.
12572         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
12573         (GCJH_SOURCES): Likewise.
12574         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
12575         dep_name argument.
12576         (find_classfile): Added dep_name argument.
12577         (find_class): Compute name of dependency.
12578         (open_in_zip): Call jcf_dependency_add_file.
12579         * gjavah.c (output_file): No longer global.
12580         (usage): Don't mention "gjavah".
12581         (help): Likewise.
12582         (java_no_argument): Likewise.
12583         (version): Likewise.
12584         (main): Recognize and handle -M family of options.
12585         (print_mangled_classname): Return is void.
12586         (process_file): Handle case where output is suppressed.
12587         (HANDLE_END_FIELD): Likewise.
12588         (HANDLE_METHOD): Likewise.
12589         * jcf-depend.c: New file.
12590
12591 1998-10-13  Jeffrey A Law  (law@cygnus.com)
12592
12593         * java-tree.def: Add missing newline at EOF.
12594
12595 1998-10-13  Tom Tromey  <tromey@cygnus.com>
12596
12597         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
12598         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
12599         function.
12600         Include <config.h> and "system.h".
12601         (disassemble_method): Undefine RET to avoid clash with
12602         config/i386/i386.h.
12603
12604 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12605
12606         * decl.c (runtime_exception_type_node, error_exception_type_node):
12607         New global variables.
12608         (init_decl_processing): Initialized.
12609         * expr.c (java_lang_expand_expr): Set caught exception type to
12610         null if catch handler argument doesn't exit.
12611         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
12612         tree codes.
12613         * java-tree.h (runtime_exception_type_node,
12614         error_exception_type_node): Global variables declared.
12615         (DECL_FUNCTION_THROWS): New macro.
12616         (DECL_FUNCTION_BODY): Modified comment.
12617         (DECL_SPECIFIC_COUNT): Likewise.
12618         (struct lang_decl): New field throws_list.
12619         (IS_UNCHECKED_EXPRESSION_P): New macro.
12620         * lex.c (java_lex): Generate location information for THROW_TK.
12621         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
12622         EXCEPTIONS_P): New macros.
12623         (enum jdep_code): New value JDEP_EXCEPTION.
12624         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
12625         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
12626         PATCH_METHOD_RETURN_ERROR): New macros.
12627         (patch_method_invocation_stmt): Added new argument to prototype.
12628         (patch_synchronized_statement, patch_throw_statement,
12629         check_thrown_exceptions, check_thrown_exceptions_do,
12630         purge_unchecked_exceptions, check_throws_clauses): New function
12631         prototypes.
12632         * parse.y Fixed typo in keyword section.
12633         (throw:): Rule tagged <node>.
12634         (THROW_TK): Keyword tagged <operator>.
12635         (method_header:): Last argument to call to method_header passed
12636         from throws: rule.
12637         (throws:, class_type_list:, throw_statement:,
12638         synchronized_statement:, synchronized:): Defined actions.
12639         (method_header): New local variable current. Register exceptions
12640         from throws clause.
12641         (java_complete_tree): Complete and verify exceptions from throws
12642         clause.
12643         (complete_class_report_errors): Error message on exceptions not
12644         found
12645         (java_check_regular_methods): Fixed typo. Shortcut on private
12646         overriding methods. Changed error message on method
12647         redefinition. Check for throws clause compatibility.
12648         (check_throws_clauses): New function.
12649         (java_check_abstract_methods): Use DECL_NAME for wfl or current
12650         method. Changed error message on method redefinition.
12651         (currently_caught_type_list): New static variable.
12652         (java_complete_expand_methods): Purge unchecked exceptions from
12653         throws clause list. Call PUSH_EXCEPTIONS before walk and
12654         POP_EXCEPTIONS after.
12655         (resolve_qualified_expression_name): Pass new argument as NULL to
12656         patch_method_invocation_stmt.
12657         (patch_method_invocation_stmt): New argument ref_decl. Invoke
12658         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
12659         argument list when appropriate. Use new argument if non null to
12660         store selected method decl.
12661         (patch_invoke): Convert if necessary args of builtin types before
12662         forming CALL_EXPR. Argument list no longer reversed here.
12663         (invocation_mode): Treat final methods as static methods.
12664         (java_complete_tree): New cases for THROW_EXPR: and
12665         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
12666         function call.
12667         (complete_function_arguments): No more RECORD_TYPE
12668         conversion. Function parameter nodes no longer saved.
12669         (valid_ref_assignconv_cast_p): Avoid handling null type.
12670         (patch_binop): Fixed null constant reference handling.
12671         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
12672         BUILD_THROW macros.
12673         (patch_try_statement): Fixed comments. Record caught types in
12674         list, push the list, expand try block and pop the list.
12675         (patch_synchronized_statement, patch_throw_statement,
12676         check_thrown_exceptions, check_thrown_exceptions_do,
12677         purge_unchecked_exceptions): New functions.
12678         * typeck.c (lookup_argument_method): Allow WFL in place of method
12679         DECL_NAME during method definition check
12680
12681 1998-10-09  Tom Tromey  <tromey@cygnus.com>
12682
12683         * gjavah.c (decode_signature_piece): New function.
12684         (print_c_decl): Use it.  Added `name_override' argument.
12685         (print_method_info): Use name_override argument to print_c_decl.
12686         (seen_fields): Removed.
12687         (print_field_info): Don't update seen_fields.
12688         (struct method_name): New structure.
12689         (method_name_list): New global.
12690         (print_method_info): Add new method to list of methods.
12691         (name_is_method_p): New function.
12692         (print_field_info): If field name has same name as method, then
12693         change field name.
12694         (process_file): Parse methods before fields.
12695         (field_pass): New global.
12696         (HANDLE_END_FIELD): Take field_pass into account.
12697
12698 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12699
12700         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
12701         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12702
12703 1998-10-03  Anthony Green  <green@cygnus.com>
12704
12705         * jvspec.c: Fix bug in jvgenmain_spec patch.
12706
12707 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12708
12709         * Makefile.in (lang.o:): Install dependency on java-tree.def.
12710         * decl.c (soft_exceptioninfo_call_node): New global variable.
12711         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
12712         takes extra integer argument. soft_exceptioninfo_call_node
12713         initialized.
12714         * except.c (java_set_exception_lang_code): New function
12715         (method_init_exceptions): Called here.
12716         (prepare_eh_table_type): New function.
12717         (expand_end_java_handler): Called here.
12718         * expr.c (build_java_throw_out_of_bounds_exception): Now features
12719         one argument. Modified generation of call to
12720         soft_badarrayindex_node to use new argument.
12721         (build_java_arrayaccess): Pass faulty index value to
12722         build_java_throw_out_of_bounds_exception.
12723         (generate_name): New function.
12724         (java_lang_expand_expr): New local variables node, current,
12725         has_finally_p. Expand TRY_EXPR node.
12726         (process_jvm_instruction): Replace top of the stack with thrown
12727         object reference when entering exception handler.
12728         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
12729         specific tree codes.
12730         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
12731         global.
12732         (DECL_SPECIFIC_COUNT): New macro.
12733         (prepare_eh_table_type, java_set_exception_lang_code,
12734         generate_name): New function declarations.
12735         (match_java_method): Declaration deleted.
12736         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
12737         macros.
12738         * lex.c (TRY_TK, CATCH_TK): Generate location information.
12739         * parse.h (redefinition_error, refine_accessible_methods_list,
12740         can_cast_to_p): Function declaration removed.
12741         (classitf_redefinition_error, variable_redefinition_error,
12742         parse_jdk1_1_error, find_applicable_accessible_methods_list,
12743         find_most_specific_methods_list, argument_types_convertible,
12744         enter_a_block, valid_builtin_assignconv_identity_widening_p,
12745         valid_cast_to_p, valid_method_invocation_conversion_p,
12746         try_reference_assignconv, add_stmt_to_compound,
12747         build_jump_to_finally, build_tree_list, patch_try_statement,
12748         java_get_catch_block): New function declarations.
12749         * parse.y (string_buffer_type): Global variable deleted.
12750         (group_of_labels, catches, catch_clause, catch_clause_parameter,
12751         finally): Rules tagged <node>.
12752         (TRY_TK, CATCH_TK): Token tagged <operator>.
12753         (class_body_declaration:, class_member_declaration:,
12754         formal_parameter:, explicit_constructor_invocation:,
12755         interface_member_declaration:, constant_declaration:,
12756         primary_no_new_array:, class_instance_creation_expression:,
12757         array_creation_expression:): Issue error on unsuported JDK1.1
12758         features.
12759         (try_statement:, catches:, finally:): Define actions.
12760         (catch_clause_parameter): New rule.
12761         (catch_clause:): Use new rule catch_clause_parameter.
12762         (parse_jdk1_1_error): New function.
12763         (redefinition_error): Renamed classitf_redefinition_error.
12764         (variable_redefinition_error): New function.
12765         (check_class_interface_creation): Call
12766         classitf_redefinition_error.
12767         (java_complete_tree): Added error message on JDEP_TYPE: case.
12768         (complete_class_report_errors): Fixed indentation.
12769         (declare_local_variables): Call variable_redefinition_error.
12770         (source_end_java_method): Call java_set_exception_lang_code and
12771         emit_handlers where appropriate.
12772         (java_method_add_stmt): Call add_stmt_to_block.
12773         (add_stmt_to_block): New function.
12774         (lookup_method_invoke): Fixed outside comment. new local variable
12775         candicates.  Call find_applicable_accessible_methods_list and
12776         find_most_specific_methods_list when searching for a
12777         method. Modified error report to list possible candidates when
12778         applicable.
12779         (find_applicable_accessible_methods_list,
12780         find_most_specific_methods_list, argument_types_convertible): New
12781         function.
12782         (refine_accessible_methods_list): Function deleted.
12783         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
12784         expr (if applicable) before calling patch_array_ref.
12785         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
12786         (enter_block): Fixed comment.
12787         (enter_a_block): New function.
12788         (patch_assignment): Reorganized. Call try_reference_assignconv for
12789         references. Call valid_cast_to_p instead of can_cast_to_p.
12790         (try_reference_assignconv,
12791         valid_builtin_assignconv_identity_widening_p): New functions.
12792         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
12793         (valid_cast_to_p, valid_method_invocation_conversion_p): New
12794         functions.
12795         (build_string_concatenation): Don't resolve StringBuffer.
12796         (patch_cast): Fixed inverted arguments.
12797         (patch_array_ref): Code to save array expr deleted. Call
12798         valid_cast_to_p instead of can_cast_to_p.
12799         (generate_labeled_block): Call generate_name.
12800         (build_jump_to_finally, build_try_statement, java_get_catch_block,
12801         patch_try_statement): New functions.
12802         * typeck.c (match_java_method): Function deleted.
12803
12804 1998-10-02  Anthony Green  <green@cygnus.com>
12805
12806         * jvspec.c: jvgenmain_spec uses different temporary file names.
12807
12808 1998-10-02  Anthony Green  <green@cygnus.com>
12809
12810         * jvspec.c (lang_specific_driver): Fail if user specifies
12811         --main= when not linking.
12812
12813 1998-09-28  Tom Tromey  <tromey@cygnus.com>
12814
12815         * class.c (make_class_data): Push value for `thread' field.
12816         * decl.c (init_decl_processing): Added `thread' field to class.
12817
12818         * class.c (add_field): Always make static fields externally
12819         visible.
12820
12821 1998-09-26  Anthony Green  <green@cygnus.com>
12822
12823         * expr.c (build_java_athrow,
12824         build_java_throw_out_of_bounds_exception, expand_invoke,
12825         build_newarray, expand_java_multianewarray, build_java_monitor):
12826         Update comments to reflect _Jv_* function names.
12827
12828 1998-09-25  Per Bothner  <bothner@cygnus.com>
12829
12830         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
12831         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
12832         * parse.y (expand_start_java_method):  Likewise.
12833
12834 1998-09-24  Per Bothner  <bothner@cygnus.com>
12835
12836         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
12837
12838         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
12839         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
12840         * expr.c:  Remove no-longer-needed calls to promote_type.
12841         * decl.c (give_name_to_locals):  Liekwise.
12842         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
12843         * parse.y:  Add/remove promote_type calls as appropriate.
12844         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
12845         (parse_signature_string):  Likewise.
12846         (build_java_array_type):  Fix for now signature convenions.
12847
12848         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
12849
12850 1998-09-23  Tom Tromey  <tromey@cygnus.com>
12851
12852         * class.c (init_class_processing): libjava function renamed to
12853         _Jv_RegisterClass.
12854
12855 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12856
12857         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
12858         * java-tree.def: Fixed DEFTREECODE third argument.
12859         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
12860         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
12861         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
12862         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12863         JAVA_THIS_EXPR): Now replaced by tree code definitions.
12864         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
12865         * lang.c (java_tree_code_type, java_tree_code_length,
12866         java_tree_code_name): New arrays.
12867         (lang_init): Append Java tree node definitions to Gcc ones.
12868         * lex.c (expression_obstack): Declared as extern when JC1_LITE
12869         defined.
12870         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
12871         wfl_to_string.
12872         (java_lex): Allow declaration of empty string constants. Retain
12873         location information on CASE_TK and DEFAULT_TK.
12874         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
12875         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
12876         Modified to be more robust.
12877         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
12878         (build_new_invocation, try_builtin_assignconv,
12879         patch_switch_statement, string_constant_concatenation,
12880         build_string_concatenation, patch_string_cst, patch_string,
12881         java_expand_switch): New function declarations.
12882         * parse.y: Rules related to switch and EH tagged <node>.
12883         (label_id): Set to NULL_TREE
12884         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
12885         tree nodes.
12886         (this_or_super:): Fixed indentation.
12887         (statement:, statement_nsi:, statement_without_trailing_substatement:,
12888         statement_expression:): Removed call to RULE on all sub-rules.
12889         (switch_expression:, switch_labels:): New rules.
12890         (switch_statement:, switch_block:, switch_block_statement_groups:,
12891         switch_block_statement_group:, switch_labels:, switch_label:):
12892         Defined actions.
12893         (throw_statement:, synchronized_statement:, try_statement:):
12894         Defined temporary actions.
12895         (class_instance_creation_expression:): Call
12896         build_new_invocation. Fixed indentation.
12897         (field_access): Fixed indentation.
12898         (method_invocation): Likewise.
12899         (make_qualified_primary): Use THIS_EXPR.
12900         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
12901         resolving from SUPER, set *type_found.
12902         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
12903         (java_complete_tree): Removed unused local variable `location'. Case
12904         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
12905         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
12906         on MODIFY_EXPR: and all binary operator tree code cases. Removed
12907         STRING_CST: case. default: checks for patchable strings.
12908         (complete_function_arguments): Transform string constant or
12909         crafted StringBuffer if necessary.
12910         (build_method_invocation): Fixed comments.
12911         (build_new_invocation): New function.
12912         (patch_assignment): Call try_builtin_assignconv to figure a valid
12913         assignment conversion between builtin types.
12914         (try_builtin_assignconv): New function.
12915         (build_binop): Use URSHIFT_EXPR directly to call build.
12916         (operator_string): Use UNARY_PLUS_EXPR.
12917         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
12918         operator.
12919         (do_merge_string_cste, merge_string_cste,
12920         string_constant_concatenation, build_string_concatenation,
12921         patch_string, patch_string_cst): New function.
12922         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
12923         (patch_unaryop): Likewise. New test of valid ++/-- operands.
12924         (build_newarray_node): Use NEW_ARRAY_EXPR.
12925         (build_this): Use THIS_EXPR.
12926         (build_return): Enable debug information on return statement.
12927         (build_if_else_statement): Likewise.
12928         (complete_labeled_statement): Fixed related comment.
12929         (build_loop_body): Fixed comment.
12930         (build_bc_statement): Enable debug information on break/continue
12931         statements.
12932         (patch_bc_statement): Fixed typos. Handle SWITCH statement
12933         context.
12934         (patch_switch_statement, case_identity, java_expand_switch): New
12935         functions.
12936
12937 1998-09-21  Per Bothner  <bothner@cygnus.com>
12938
12939         * buffer.h (BUFFER_INIT):  New macro.
12940         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
12941         Pass (struct jcf_partial *state) to most functions.
12942         (jcf_block, jcf_relocation):  New types.
12943         Support labels, branches, conditionals, loops.
12944
12945 1998-09-21  Tom Tromey  <tromey@cygnus.com>
12946
12947         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
12948
12949 1998-09-21  Per Bothner  <bothner@cygnus.com>
12950
12951         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
12952         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
12953         not integer_type_node (INT_TYPE_SIZ bits).
12954
12955         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
12956
12957         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
12958         * jcf-dump.c (print_exception_table):  New function.
12959         (disassemble_method):  Better handling of wide instructions.
12960         Make more robust for bad input.
12961
12962 1998-09-30  Jeffrey A Law  (law@cygnus.com)
12963
12964         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
12965         FreeBSD.
12966
12967 1998-09-17  Jeffrey A Law  (law@cygnus.com)
12968
12969         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
12970
12971 1998-09-17  Tom Tromey  <tromey@cygnus.com>
12972
12973         * Makefile.in ($(PARSE_H)): Removed target.
12974
12975 1998-09-17  Jeffrey A Law  (law@cygnus.com)
12976
12977         * Makefile.in (JAVA_OBJS): Add memmove.o
12978         (memmove.o): New target & rules.
12979
12980 1998-09-15  Tom Tromey  <tromey@cygnus.com>
12981
12982         * expr.c (expand_invoke): Don't generate a call to the class init
12983         code.
12984
12985 1998-09-14  Jeffrey A Law  (law@cygnus.com)
12986
12987         * Makefile.in: Add many missing dependencies.
12988         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
12989         as appropriate.
12990         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
12991         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
12992
12993 1998-09-11  Per Bothner  <bothner@cygnus.com>
12994
12995         * decl.c (complete_start_java_method):  If method is static (and
12996         not private) call _Jv_InitClass.
12997         * expr.c (expand_invoke):  Don't call build_class_init.
12998
12999         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
13000
13001 1998-09-10  Jeffrey A Law  (law@cygnus.com)
13002
13003         * Make-lang.in (GCJ): Define before using.
13004
13005 1998-09-09  Jeffrey A Law  (law@cygnus.com)
13006
13007         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
13008         losing due to namespace pollution in GNU getopt.h
13009
13010 1998-09-09  Tom Tromey  <tromey@cygnus.com>
13011
13012         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
13013         (java.all.cross): Likewise.
13014         (java.rest.encap): Likewise.
13015
13016 1998-09-08  Jeffrey A Law  (law@cygnus.com)
13017
13018         * gjavah.c (print_class_decls): Fix thinko in arglist
13019         * jcv-io.c (find_classfile): Similarly.
13020
13021 1998-09-07  Jeffrey A Law  (law@cygnus.com)
13022
13023         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
13024
13025 1998-09-05  Tom Tromey  <tromey@cygnus.com>
13026
13027         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
13028         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
13029         * Makefile.in (PARSE_C): New macro.
13030         (PARSE_H): Likewise.
13031         (PARSE_SCAN_C): Likewise.
13032         ($(PARSE_C)): Target renamed from parse.c.
13033         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
13034         (clean): Remove parse-scan.c as well.
13035         (parse.o): Depend on $(PARSE_C).
13036
13037 1998-09-05  Anthony Green  <green@cygnus.com>
13038
13039         * README, license.terms: Removed.
13040
13041         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
13042         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
13043         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
13044         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
13045         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
13046         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
13047         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
13048         and Java trademark attribution.
13049
13050 1998-09-04  Tom Tromey  <tromey@cygnus.com>
13051
13052         * Makefile.in: Use gcjh, not gjavah.
13053         * config-lang.in (stagestuff): Use gcjh, not gjavah.
13054         * Make-lang.in: Changed gjavah to gcjh everywhere.
13055
13056 1998-09-03  Per Bothner  <bothner@cygnus.com>
13057
13058         * gjavah.c:  Support new -prepend -add -append flags.
13059         (print_method_info):  Method is not virtual if class is final.
13060
13061 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13062
13063         * jv-scan.c: Fixed copyright assignment.
13064         * keyword.gperf: Likewise.
13065         * keyword.h: Likewise.
13066         * lex.c: Fixed copyright assignment.
13067         (java_lex): Push unicode back when parsing '<'.
13068         * lex.h: Fixed copyright assignment.
13069         * parse-scan.y: Likewise.
13070         * parse.h: Fixed copyright assignment.
13071         (build_debugable_stmt, complete_for_loop): New function prototypes.
13072         * parse.y: Fixed copyright assignment.
13073         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
13074         size_zero_node when completing a loop with no exit condition.
13075         (for_statement_nsi:): Define action.
13076         (for_init:, for_update:): Return size_zero_node when empty.
13077         (declare_local_variables): Call build_debugable_stmt.
13078         (build_debugable_stmt): New function.
13079         (build_loop_body): Build debugable statement around loop
13080         condition part.
13081         (complete_loop_body): Take into account the debugable statement
13082         around the EXIT_EXPR.
13083         (complete_loop_body): New function.
13084         (patch_exit_expr): Fixed condition inversion.
13085
13086 1998-09-02  Tom Tromey  <tromey@cygnus.com>
13087
13088         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
13089         name of thread define.
13090         * jvspec.c (THREAD_NAME): New macro.
13091         (GCLIB): Likewise.
13092         (THREADLIB): Likewise.
13093         (lang_specific_driver): Recognize attempt to link with thread
13094         library or gc library.  Recognize -ljava on command line so it
13095         isn't linked against more than once.
13096
13097 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13098
13099         * parse-scan.y (report_main_declaration): Name of the class
13100         containing `main' can be a qualified name.
13101
13102 1998-08-31  Tom Tromey  <tromey@cygnus.com>
13103
13104         * config-lang.in: Changed gjavac to gjc everywhere.
13105         * Make-lang.in: Changed gjavac to gjc everywhere.
13106
13107 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13108
13109         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
13110         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
13111         and install the files.
13112         * Makefile.in (JAVA_OBJS_LITE): New variable.
13113         (compiler:): Now include jv-scan as a dependency.
13114         (../jv-scan$(exeext), parse-scan.c): New targets.
13115         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
13116         * config-lang.in (compilers): Removed gcj, gjavah from the list.
13117         * jcf-parse.c (parse_source_file): Call java_layout_classes and
13118         check for errors even if parse_only.
13119         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
13120         defined.
13121         (yylex): New function. Uses java_lex body.
13122         (java_lex): Removed commented out statement. Remove local variable
13123         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
13124         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
13125         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
13126         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
13127         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
13128         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
13129         where appropriate.
13130         (java_lex_error): Empty if JC1_LITE is defined.
13131         (java_get_line_col): Return 0 if JC1_LITE is defined.
13132         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
13133         SET_MODIFIER_CTX): Moved into the section containing the macros
13134         conditionally defined by JC1_LITE.
13135         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
13136         argument if JC1_LITE is defined.
13137         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
13138         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
13139         is defined.
13140         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
13141         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
13142         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
13143         to different values according to JC1_LITE.
13144         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
13145         declared if JC1_LITE set.
13146         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
13147         defined if JC1_LITE not set.
13148         (struct parser_ctx): Reorganized and skip the jc1 front end part
13149         if JC1_LITE set.
13150         (java_layout_classes): New function definition.
13151         (java_push_parser_context, java_init_lex, yyparse, yylex,
13152         yyerror): Prototype always declared. All other static function
13153         prototypes declared only if JC1_LITE is not set.
13154         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
13155         declared in parse.h.
13156         (java_layout_classes): New function.
13157         (java_complete_expand_methods): No longer layout the class here.
13158         * parse-scan.y: New file.
13159         * jv-scan.c: New file.
13160
13161 1998-08-25  Tom Tromey  <tromey@cygnus.com>
13162
13163         * gjavah.c (main): Handle -friend option.
13164         (friend_specs): New global.
13165         (generate_access): Handle friend_specs.
13166         (process_file): Likewise.
13167         (MAX_FRIENDS): New macro.
13168         (friend_count): New global.
13169         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
13170         Changed all callers.
13171
13172 1998-08-24  Per Bothner  <bothner@cygnus.com>
13173
13174         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
13175         (main):  Handle processing all the entries of a named .zip archive.
13176         * jcf-io.c (jcf_trim_old_input):  New function.
13177         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
13178
13179 1998-08-24  Per Bothner  <bothner@cygnus.com>
13180
13181         * lang.c (flag_assume_compiled):  Make default be on.
13182
13183 1998-08-21  Per Bothner  <bothner@cygnus.com>
13184
13185         * jcf-dump.c:  Add bunches of flags to control output more.
13186         (process_class):  New function;  support printing more than one class.
13187         (main): Support new --print-main and --javap flags.
13188         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
13189         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
13190
13191 1998-08-20  Per Bothner  <bothner@cygnus.com>
13192
13193         Change mangling of dispatch table to match C++ vtable (w/thunks).
13194         * class.c (build_dtable_decl), java-tree.h:  New function.
13195         (make_class_data):  Call it.
13196         * decl.c (init_decl_processing):  Likewise.
13197
13198 1998-08-19  Warren Levy  <warrenl@cygnus.com>
13199
13200         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
13201         soft_anewarray; adjust args passed.
13202         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
13203         match _Jv_NewObjectArray.
13204
13205 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13206
13207         * decl.c (push_labeled_block, pop_labeled_block): New functions.
13208         * expr.c (loopup_label): Call create_label_decl.
13209         (create_label_decl): New function.
13210         (java_lang_expand_expr): Call expand_start_bindings with argument
13211         set to zero.
13212         * java-tree.h Added space after PROTO in function declarations
13213         when necessary.
13214         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
13215         (create_label_decl, push_labeled_block): New function
13216         declarations.
13217         * lex.c (label_id): Initialize.
13218         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
13219         switch.
13220         * parse.h Added space after PROTO in function declarations when
13221         necessary.
13222         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
13223         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
13224         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
13225         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
13226         macros.
13227         (struct parser_ctxt): New fields current_loop,
13228         current_labeled_block.
13229         (build_if_else_statement, patch_if_else_statement,
13230         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
13231         generate_labeled_block, complete_labeled_statement,
13232         build_bc_statement, patch_bc_statement, patch_loop_statement,
13233         build_new_loop, build_loop_body, complete_loop_body): New function
13234         declarations.
13235         * parse.y (java_warning_count): New global variable.
13236         (label_id): New static variable.
13237         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
13238         (block:): Return size_zero_node when block is empty.
13239         (empty_statement:): Return size_zero_node.
13240         (statement:): Implement supplemental action when for_statement: is
13241         reduced.
13242         (label_decl:): New rule.
13243         (labeled_statement:): Rewritten using label_decl. Actions
13244         implemented.
13245         (labeled_statement_nsi:): Likewise.
13246         (if_then_statement): Actions implemented.
13247         (while_expression): New rule.
13248         (while_statement:): Rewritten using while_expression. Actions
13249         implemented.
13250         (while_statement_nsi:): Likewise.
13251         (do_statement_begin:): New rule.
13252         (do_statement:): Rewritten using do_statement_begin. Actions
13253         implemented.
13254         (for_statement:): Rewritten using for_begin. Actions implemented.
13255         (for_statement_nsi:): Likewise.
13256         (for_header:, for_begin:): New rules.
13257         (for_init:): Actions implemented.
13258         (statement_expression_list:, break_statement:,
13259         continue_statement:): Likewise.
13260         (yyerror): Count number of issued warning(s).
13261         (java_report_errors): Report error(s) and/or warning(s).
13262         (java_complete_class): Use build_java_argument_signature to
13263         recompute completed method signature.
13264         (java_check_regular_methods): New locals method_wfl and aflags.
13265         Use method_wfl instead of lookup_cl during error reports. Fixed
13266         indentation and modified some error messages. Use
13267         lang_printable_name in method instead of the DECL_NAME. New code
13268         to issue warnings on methods not overriding corresponding methods
13269         private to a different package.
13270         (java_method_add_stmt): Call add_stmt_to_compound.
13271         (add_stmt_to_compound): New function.
13272         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
13273         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
13274         (build_if_else_statement, patch_if_else_statement,
13275         build_labeled_block, generate_labeled_block,
13276         complete_labeled_statement, build_new_loop, build_loop_body,
13277         complete_loop_body, patch_loop_statement, build_bc_statement,
13278         patch_bc_statement, patch_exit_expr): New functions.
13279         * typeck.c (build_java_signature): Build argument signature before
13280         enclosing it in between parenthesis.
13281
13282 1998-08-17  Warren Levy  <warrenl@cygnus.com>
13283
13284         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
13285         (JAVA_OBJS): Added reminder comment
13286
13287 1998-08-13  Nick Clifton  <nickc@cygnus.com>
13288
13289         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
13290         be interpreted as a long long.
13291
13292 1998-08-13  Warren Levy  <warrenl@cygnus.com>
13293
13294         * decl.c (init_decl_processing): Use _Jv_InitClass, not
13295         soft_initialise_class.  Use _Jv_NewMultiArray, not
13296         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
13297         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
13298         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
13299         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
13300
13301 1998-08-12  Per Bothner  <bothner@cygnus.com>
13302
13303         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
13304         length_identifier_node):  New global tree node constants.
13305         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
13306         Replace uses by super_identifier_node etc.
13307         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
13308
13309         * parse.y (resolve_field_access):  Don't special-case ".length" if
13310         flag_emit_class_files.
13311         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
13312         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
13313         and ARRAY.length.
13314
13315 1998-08-11  Per Bothner  <bothner@cygnus.com>
13316
13317         * decl.c (init_decl_processing): Remove unused method_type_node fields.
13318         * class.c (make_method_value):  Remove init for removed fields.
13319
13320         * class.c (layout_class):  Use build_java_argument_signature.
13321         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
13322
13323         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
13324         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
13325         (build_java_signature):  Don't use push_java_argument_signature.
13326
13327         * typeck.c (lookup_argument_method):  New function.
13328         * parse.y (java_check_regular_methods):  Use lookup_argument_method
13329         instead of lookup_java_method2 followed by lookup_java_method.
13330
13331         * parse.y (check_method_redefinition):  Minor optimization.
13332
13333         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
13334         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
13335
13336 1998-08-10  Tom Tromey  <tromey@cygnus.com>
13337
13338         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
13339         c-pragma.o.
13340
13341         * gjavah.c (java_float_finite): Use K&R-style definition.
13342         (java_double_finite): Likewise.
13343         (generate_access): Now returns void.  Changed all callers.
13344         (last_access_generated): Removed.
13345         (process_file): Only make a single pass over the .class file.
13346
13347 1998-07-29  Per Bothner  <bothner@cygnus.com>
13348
13349         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
13350         for compatibility for G++ (with -fvtable-thunks).
13351         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
13352
13353         * gjavah.c (process_file):  Use public inheritance for super-class.
13354
13355 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13356
13357         * lex.c (java_init_lex): Initialize ctxp->package.
13358         * parse.h (struct parser_ctxt): package and package_len replaced
13359         by tree package, an identifier node. Field method_decl_list is
13360         gone. Fixed comments.
13361         (lookup_field_wrapper, merge_qualified_name, not_accessible,
13362         class_in_current_package): New function prototypes.
13363         * parse.y (array_type:): Set class loaded flag on primitive type
13364         arrays.
13365         (package_declaration:): Assign ctxp->package to the
13366         identifier node.
13367         (method_invocation:): Handle invocation of method qualified by
13368         `super'.
13369         (single_type_import_declaration:): Removed ambiguity check.
13370         (java_pop_parser_context): New local variable `next'. Reset and
13371         set IMPORT_CLASSFILE_NAME flags on current and previous import
13372         list.
13373         (java_accstring_lookup): Use new local macro COPY_RETURN.
13374         (lookup_field_wrapper): New function.
13375         (parser_qualified_classname): Use merge_qualified_name.
13376         (parser_check_super_interface): Broaden error message.
13377         (do_resolve_class): Check for qualified class name in the current
13378         compilation unit if appropriate.
13379         (process_imports): Check for already defined classes.
13380         (check_pkg_class_access): Got rid of call to
13381         get_access_flags_from_decl.
13382         (java_complete_expand_methods): Call safe_layout_class based on
13383         the current class size.
13384         (make_qualified_primary): Build a WFL qualification on primary if
13385         none exists.
13386         (merge_qualified_name): New function.
13387         (make_qualified_name): Use merge_qualified_name.
13388         (resolve_expression_name): Use safe_lookup_field.
13389         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
13390         (resolve_qualified_expression_name): Likewise. Check on resolved
13391         element accessibility.
13392         (not_accessible_p, class_in_current_package): New functions.
13393         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
13394         (patch_method_invocation_stmt): Merged common pieces. Check
13395         accessibility of invoked method.
13396         (check_for_static_method_reference): Add returned type in error
13397         message.
13398         (invocation_mode): Get rid of bogus check on PRIVATE methods.
13399         (refine_accessible_methods_list): Merged two conditions in test.
13400         (java_complete_class): Sanity check on stabilize_ref gone.
13401         * zextract.c (read_zip_archive): Cast lseek second argument to long.
13402
13403 1998-07-28  Per Bothner  <bothner@cygnus.com>
13404
13405         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
13406
13407 1998-07-24  Tom Tromey  <tromey@cygnus.com>
13408
13409         * gjavah.c (F_NAN): Removed.
13410         (F_NAN_MASK): New macro.
13411         (F_POSITIVE_INFINITY): Removed.
13412         (F_NEGATIVE_INFINITY): Likewise.
13413         (java_float_finite): Rewrote.
13414         (D_NAN_MASK): Renamed.
13415         (java_double_finite): Rewrote.
13416         (D_POSITIVE_INFINITY): Removed.
13417         (D_NEGATIVE_INFINITY): Likewise.
13418
13419         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
13420         If verbose, print underlying representation of value in hex.
13421
13422 1998-07-24  Per Bothner  <bothner@cygnus.com>
13423
13424         * buffer.h, buffer.c:  New files.
13425         * Makefile.in (JAVA_OBJS):  Add buffer.o.
13426
13427         Support locals variables and writing their debug entries to .class.
13428         * jcf-write.c:  Simplify some by user new buffer type.
13429         (vode_buffer_grow):  Removed.
13430         (struct localvar_info):  New type.
13431         (localsvars, localvartable):  New buffers.
13432         (localvar_alloc, localvar_free):  New functions.
13433         (generate_bytecode_insns):  Handle local variables.
13434         (generate_classfile):  Write LocalVariableTable attribute.
13435
13436 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13437
13438         * jcf-io.c (open_in_zip): Check the zipfile magic number.
13439         * zipfile.h (ZIPMAGIC): New macro.
13440
13441 1998-07-24  Tom Tromey  <tromey@cygnus.com>
13442
13443         * Makefile.in (gjavah.o): Updated dependencies.
13444         (jcf-dump.o): Likewise.
13445         (all.indirect): Use ../gjavah.
13446         (../gjavah$(exeext)): Likewise.
13447         (clean): Don't remove gjavah.
13448         (clean): Remove parse.c, not java/parse.c.
13449         * Make-lang.in (java): Added gjavah.
13450         (gjavah$(exeext)): New target.
13451         (GJAVAH_SOURCES): New macro.
13452         (java.all.build): Added gjavah.
13453         (java.all.cross): Likewise.
13454         (java.rest.encap): Likewise.
13455         * config-lang.in (compilers, stagestuff): Added gjavah.
13456
13457 1998-07-23  Tom Tromey  <tromey@cygnus.com>
13458
13459         * gjavah.c (java_float_finite): New function.
13460         (java_double_finite): Likewise.
13461         (F_POSITIVE_INFINITY): New macro.
13462         (F_NEGATIVE_INFINITY): Likewise.
13463         (F_NAN): Likewise.
13464         (D_POSITIVE_INFINITY): Likewise.
13465         (D_NEGATIVE_INFINITY): Likewise.
13466         (D_NAN): Likewise.
13467         (print_field_info): Use java_float_finite and java_double_finite.
13468
13469 1998-07-23  Per Bothner  <bothner@cygnus.com>
13470
13471         * parse.y (method_header):  Name "this" implicit argument.
13472
13473 1998-07-22  Per Bothner  <bothner@cygnus.com>
13474
13475         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
13476         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
13477         (put_linenumber):  New function.
13478         (generate_bytecode_insns, generate_classfile):  Write line numbers.
13479
13480 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13481
13482         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
13483         (lookup_name, build_known_method_ref, build_class_init,
13484         build_invokevirtual, invoke_build_dtable, match_java_method,
13485         build_field_ref, pushdecl_force_head, build_java_binop,
13486         binary_numeric_promotion, build_decl_no_layout,
13487         build_java_arrayaccess, build_newarray, build_anewarray,
13488         build_java_array_length_access, build_java_arraynull_check): New
13489         extern function prototypes.
13490         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13491         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
13492         java-tree.h.
13493         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
13494         to NULL
13495         * jcf.h (jcf_out_of_synch): New extern function prototype.
13496         * parse.h: Static/global function implemented in parse.y
13497         prototyped and declarations moved at the end of the file.
13498         (DECL_P): Check that the argument isn't null.
13499         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13500         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
13501         (QUAL_DECL_TYPE): New macro.
13502         (PARAMS): Macro definition removed.
13503         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
13504         (return_statement:): Call build_return.
13505         (field_access:): Call make_qualified_primary in sub rule.
13506         (method_invocation:): Build method invocation and call
13507         make_qualified_primary when processing primaries.
13508         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
13509         get_type_from_signature.
13510         (java_check_regular_method): Extra integer 0 argument when calling
13511         lookup_java_method2.
13512         (lookup_java_interface_method2): Extra method DECL argument when
13513         calling lookup_java_interface_method2.
13514         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
13515         COMPOUND_EXPR node.
13516         (java_complete_expand_method): Layout current class iff not
13517         already done. Don't process interface's methods.
13518         (java_complete_expand_method): Use super class only if it
13519         exists. Use current class otherwise.
13520         (make_qualified_primary): New function.
13521         (resolve_expression_name): Process qualified expression or
13522         expression from primary the same way.
13523         (resolve_expression_name): Two last arguments to
13524         resolve_field_access are now NULL_TREEs.
13525         (resolve_field_access): New variable is_static. Local field must
13526         be DECLs. is_static computed on field DECLs only. Append code in
13527         where_found to the field access if necessary. Use QUAL_DECL_TYPE
13528         to initialize field_type.
13529         (resolve_qualified_expression_name): New local variable,
13530         previous_call_static and is_static. Handle primaries with function
13531         calls, casts, array references and `this'. `super' now handled as
13532         `(super_class)this'. Use is_static to clarify boolean expressions.
13533         Added code to handle case where a proper handle is required to
13534         access a field. Use QUAL_DECL_TYPE where applicable.
13535         (maybe_access_field): New function.
13536         (patch_method_invocation_stmt): New arguments primary, where,
13537         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
13538         deleted. Use `where' as a type to search from if specified. Check
13539         for static method reference where forbidden. Append primary or
13540         current_this to the argument list if not calling constructor nor
13541         static methods.
13542         (check_for_static_method_reference): New function.
13543         (patch_invoke): Layout the class on which new is done if
13544         necessary.
13545         (lookup_method_invoke): Changed format to report errors on
13546         methods.
13547         (qualify_ambiguous_name): New local variable this_found. Now
13548         handle things from primaries. Method call are considered
13549         expression names.
13550         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
13551         changed into NULLs.
13552         (not_initialized_as_it_should_p): Comply with the new DECL_P.
13553         (java_complete_tree): New case fo RETURN_EXPR. Process function
13554         call arguments in separate function.
13555         (complete_function_arguments): New function.
13556         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
13557         anymore.
13558         (patch_assignment): Take the return function slot into account as
13559         a RHS. Distinguish assignment from a return.
13560         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
13561         when checking methods in interfaces.
13562         (resolve_type_during_patch): NULL argument to unresolve_type_p
13563         instead of NULL_TREE.
13564         (patch_newarray): Fixed typo in comment.
13565         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
13566         (build_return, patch_return): New functions.
13567         * typeck.c (lookup_java_constructor): Fixed typo in comment.
13568
13569 1998-07-21  Per Bothner  <bothner@cygnus.com>
13570
13571         * constants.c (find_name_and_type_constant, find_fieldref_index,
13572         find_methodref_index):  New methods.
13573         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
13574         just return given method.  Also, rename to build_known_method_ref.
13575         (expand_invoke):  Rename call to build_invoke_non_interface.
13576         * java-tree.h, parse.h:  Update prototype.
13577         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
13578         (such as expand_expr_stmt) if flag_emit_class_files.
13579         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
13580         STACK_TARGET, IGNORE_TARGET):  New macros.
13581         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
13582         (generate_bytecode_insn):  New function to generate method's bytecode.
13583         (generate_classfile):  Node generate Code attribute for a method.
13584         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
13585         push_long_const, field_op, adjust_typed_op, maybe_wide):
13586         New functions used by generate_bytecode_insn.
13587
13588         * typeck.c (signature_include_return):  Remove variable.
13589         (push_java_argument_signature, build_java_argument_signature):  New.
13590         (build_java_signature):  Use push_java_argument_signature.
13591         * parse.y:  Use build_java_argument_signature instead of fiddling
13592         with signature_include_return.
13593
13594 1998-07-17  Tom Tromey  <tromey@cygnus.com>
13595
13596         * gjavah.c (print_c_decl): Always generate JArray<>* for array
13597         types.
13598
13599         * Makefile.in (all.indirect): Added gjavah$(exeext).
13600         (gjavah$(exeext)): Added $(exeext).
13601         (clean): Likewise.
13602
13603 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13604
13605         * class.c (layout_class): Call to java_layout_parsed_class replace
13606         by safe_layout_class.
13607         * expr.c (build_java_array_length_access): Removed static storage
13608         class in the function definition.
13609         (build_java_arraynull_check): Likewise.
13610         Also fixed typos in two comments.
13611         * lex.c (java_init_lex): Initialize static global kw_length.
13612         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
13613         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
13614         java_lex_error.
13615         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
13616         * parse.h (resolve_no_layout): New static function declaration.
13617         (get_identifier_in_static): Declaration removed.
13618         (java_layout_parsed_class): Function name declaration changed to
13619         safe_layout_class.
13620         (build_newarray_node, patch_newarray, resolve_type_during_patch,
13621         not_initialized_as_it_should_p, build_this): New static function
13622         declarations.
13623         (pushdecl_force_head, build_java_binop, int_fits_type_p,
13624         binary_numeric_promotion, stabilize_reference,
13625         build_decl_no_layout, build_java_arrayaccess): Extern function
13626         declarations moved into their own section.
13627         (build_newarray, build_anewarray, build_java_array_length_access,
13628         build_java_arraynull_check): New extern function declarations.
13629         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
13630         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
13631         fake tree codes.
13632         (CALL_CONSTRUCTOR_P): New macro.
13633         * parse.y (kw_length): New static global tree node.
13634         (return_statement): Tagged <node>.
13635         (RETURN_TK): Tagged <operator>.
13636         (variable_declarator_id:): Build variable declaration with an
13637         empty initialization value if a syntax error was found in the
13638         initialization part of the variable declaration.
13639         (statement_without_trailing_substatement:): return_statement: now
13640         uses the default rule.
13641         (return_statement:): Temporarily fixed to return NULL_TREE.
13642         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
13643         (class_instance_creation_expression:): Class creation rules now
13644         call build_method_invocation upon reduction.
13645         (array_creation_expression:): Rules call build_newarray_node upon
13646         reduction.
13647         (dim_exprs:): Build a list of dimension expressions.
13648         (dim_expr:): Store location of the OSB_TK in the dimension
13649         expression node.
13650         (method_invocation:): Added a new error rule.
13651         (build_unresolved_array_type): WFL argument may also be an array
13652         on a primitive type. Name of the argument changed to reflect this.
13653         (method_declarator): Insert argument type at the beginning of the
13654         argument type list and later reverse the list.
13655         (unresolved_type_p): Argument 'returned' may be optionally
13656         NULL_TREE.
13657         (java_layout_class_from_source): Function renamed
13658         safe_layout_class.
13659         (resolve_and_layout): Now call resolve_no_layout and
13660         safe_layout_class.
13661         (resolve_no_layout): New function.
13662         (purify_type_name): New function.
13663         (complete_class_report_errors): Call purify_type_name during error
13664         report on a type not found.
13665         (process_imports): error_found local variable doesn't need to be
13666         initialized to zero.
13667         (declare_local_variables): New local type_wfl. Fixed typo in error
13668         message. type_wfl assigned to unresolved type and used to register
13669         incomplete type. Build a WFL around the variable initialization
13670         statement so that debug info can be generated on it.
13671         (source_start_java_method): Reverse argument list after they've
13672         been processed.
13673         (current_this): New static global variable.
13674         (java_complete_expand_methods): Set current_this when appropriate.
13675         (resolve_expression_name): Build correct static and non static
13676         field access bearing a simple name.
13677         (resolve_field_access): Resolve the length field of arrays. Handle
13678         f.m() cases.
13679         (patch_method_invocation_stmt): Set the type of the method
13680         invocation to error_mark_node. This value is later overridden by a
13681         valid type, if any. Don't handle qualified constructor invocation
13682         as qualified method invocation. Call lookup_method_invoke with its
13683         new flag. It's no longer necessary to access the selected method
13684         as the value of a tree list. Handle constructor invocation.
13685         (patch_invoke): Reverse argument list when invoking non interface
13686         methods. Insert call to new as the first argument of the
13687         constructor.
13688         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
13689         defined within a final class. Return INVOKE_STATIC if the invoked
13690         method is a constructor.
13691         (lookup_method_invoke): New lc argument is a flag to indicate a
13692         constructor lookup. Now handle constructor lookup. Choose the most
13693         specific method in case several were matching the invocation
13694         requirements. Return a method decl instead of a tree list featuring
13695         one single method decl element.
13696         (refine_accessible_methods_list): New lc flag argument to
13697         indicate that a constructor is being looked up.
13698         (not_initialized_as_it_should_p): New function.
13699         (java_complete_tree): Now process fake tree codes
13700         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
13701         save_expr on resolved function call arguments. Case on
13702         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
13703         (patch_assignment): LHS can be a field access expression. When
13704         dealing with reference, lhs_type is the promoted type of the
13705         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
13706         applicable.
13707         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
13708         (patch_binop): Use not_initialized_as_it_should_p where
13709         applicable.
13710         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
13711         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
13712         where applicable.
13713         (resolve_type_during_patch): New function.
13714         (patch_cast): Call resolve_type_during_patch to resolve type and
13715         report error accordingly.
13716         (patch_array_ref): Use not_initialized_as_it_should_p where
13717         applicable. Array base expression is saved before being
13718         used. Promote the type of an array elements if it contains non
13719         builtin types.
13720         (build_newarray_node, patch_newarray, build_this): New functions.
13721
13722 1998-07-16  Tom Tromey  <tromey@cygnus.com>
13723
13724         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
13725         increment it in `for' statement.
13726         (print_field_info): If number is inf or nan, don't print it.
13727         (print_method_info): If method name is `delete', just ignore it.
13728         (print_c_decl): Special-case jstringArray.
13729
13730         * gjavah.c (help): New function.
13731         (no_argument): New function.
13732         (usage): Changed text.
13733         (main): Rewrote argument handling.  Now handles -v, --help,
13734         --version.
13735         (version): New function.
13736         (found_error): New global.
13737         (main): Return found_error.
13738         (generate_access): Set found_error.
13739         (print_c_decl): Likewise.
13740
13741 1998-07-15  Tom Tromey  <tromey@cygnus.com>
13742
13743         * gjavah.c (print_c_decl): Don't print "," when examining field.
13744         Skip type name when looking at "[L" types.
13745         (process_file): Now static.
13746         (generate_access): Now returns int.
13747         (last_access_generated): New global.
13748         (process_file): Clear last_access_generated; make multiple passes
13749         over the class.
13750         (print_field_info): Just return if generate_access returns true.
13751         (print_method_info): Likewise.  Also, allow <init> functions to
13752         pass through.
13753         (print_c_decl): Added is_init argument.  Print constructors
13754         properly.
13755         (print_cxx_classname): Use UTF8_GET to extract characters from
13756         string.
13757         (print_base_classname): New function.
13758         (print_class_decls): New function.
13759         (process_file): Use it.
13760         (utf8_cmp): New function.
13761
13762 1998-07-13  Nick Clifton  <nickc@cygnus.com>
13763
13764         * lang-options.h: Format changed to match changes in gcc/toplev.c
13765         to implement a --help option.
13766
13767 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
13768
13769         * decl.c (init_decl_processing): Revert change to dtable_type.
13770
13771 1998-07-09  Per Bothner  <bothner@cygnus.com>
13772
13773         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
13774
13775 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
13776
13777         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
13778
13779         * lang.c (lang_init): Default flag_exceptions to 1, without
13780         checking to see if it's 2 first.
13781
13782 1998-07-08  Jeffrey A Law  (law@cygnus.com)
13783
13784         * constants.c: Include "system.h".
13785         * decl.c: Likewise.
13786         * lang.c (flag_new_exceptions): Get via extern now.
13787         (lang_init_options): New functions.  Turn on flag_new_exceptions.
13788
13789 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13790
13791         * lex.c (java_lex): Return 0 when we see an invalid character in
13792         the input.
13793
13794         * lex.c (java_read_char): Specify extra argument when calling
13795         java_lex_error.
13796         (java_read_unicode, java_parse_end_comment,
13797         java_parse_escape_sequence): Likewise,
13798         (java_lex): Specify extra argument when calling
13799         java_lex_error. Test that IDs are beginning with a legal character
13800         for IDs. Handle invalid characters with an error message and a
13801         call to java_lex_error.
13802         (java_lex_error): Adjust column position by new argument
13803         `forward'. Issue an error even if in the middle of reporting an
13804         other error.
13805
13806 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
13807
13808         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
13809         we don't explicitly put a null pointer when we're copying it.
13810
13811 1998-07-07  Tom Tromey  <tromey@cygnus.com>
13812
13813         * gjavah.c (print_cxx_classname): New function.
13814         (super_class_name): Likewise.
13815         (print_super_fields): Removed.
13816         (in_super): Removed.
13817         (print_field_info): Never generate #defines.
13818         (print_c_decl): Changed generated types to match JNI.  No longer
13819         print class name before method name.
13820         (print_method_info): Print "static" before static methods.
13821         Print "virtual" before non-final methods.
13822         (usage): Use exit(1), not exit(-1).
13823         (main): Likewise.
13824         (print_field_info): Use %.17g to print a double.
13825         (last_access): New globals.
13826         (process_file): Initialize last_access.
13827         (usage): Now static.
13828         (ACC_VISIBILITY): New define.
13829         (generate_access): New function.
13830         (print_field_info): Call it.
13831         (print_method_info): Likewise.  Also, generate information for all
13832         methods, not just native methods.  Return void.
13833         (print_c_decl): Return void.
13834         (print_field_info): Return void.
13835
13836 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13837
13838         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
13839         processing the jc1 grammar file. Prefix bison functions and
13840         variables with java_.
13841         (parse.c): Dependencies on parse.h and lex.h
13842         * expr.c (build_java_arrayaccess): Function now global.
13843         * java-tree.h: Comment reorganized to carry on previous
13844         classification effort.
13845         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
13846         RESOLVE_TYPE_NAME_P): New flags on WFLs.
13847         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
13848         java_parse (new prefix java_ generated by bison).
13849         (java_layout_parsed_class, java_register_parsed_class): Function
13850         call removed.
13851         (yyparse): Removed unnecessary call to init_outgoing_cpool.
13852         * lex.c (static tree wfl_op): Variable deleted.
13853         (java_init_lex): Initialize kw_super and kw_this. Initialize more
13854         ctxp fields to NULL_TREE.
13855         (java_lex): No longer create WFL for operators. Filename caching
13856         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
13857         created as STRING_CST and later expanded. Removed extra argument
13858         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
13859         and SUPER.
13860         (build_wfl_node): Removed code in comments.
13861         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
13862         store token and location data in the current bison token.
13863         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
13864         static/extern function declaration at the beginning of the file.
13865         (struct qualification): Data structure definition deleted.
13866         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
13867         (qualify_ambiguous_name): Function declaration modified. Function
13868         now returns nothing.
13869         (build_array_ref, patch_array_ref, make_qualified_name,
13870         resolve_qualified_expression_name, maybe_generate_clinit,
13871         resolve_field_access): New static function declarations.
13872         (build_java_arrayaccess): New extern function declaration.
13873         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
13874         (CALL_EXPR_PRIMARY): Macro deleted.
13875         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
13876         (struct parser_ctxt): Field initialized_final
13877         removed. non_static_initialized, static_initialized: New fields.
13878         * parse.y (static tree kw_super, static tree kw_this): New global
13879         static.
13880         (%union): tree wfl field of operator member replaced by int
13881         location. WFLs are non longer created for operators.
13882         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
13883         (qualified_name:): Now calls make_qualified_name to build the
13884         identifier.
13885         (type_declaration:): Consider generating <clinit> when class
13886         parsing completed.
13887         (variable_declarator:): Directly build an assignment node when the
13888         variable is initialized when declared.
13889         (this_or_super:): Build a WFL and set current location when THIS
13890         or SUPER are parsed.
13891         (expression_statement:): Wrap statement around a WFL.
13892         (primary_no_new_array:): Fixed typo. Changed value returned by
13893         THIS_TK because of its new type (temporary).
13894         (dim_exprs:): Temporary fix because of OSB_TK's new type.
13895         (field_access:): Build qualified name with SUPER.
13896         (method_invocation:): Fixed returned value because of SUPER's new
13897         type.
13898         (array_access:): Use OSB_TK location information.
13899         (post_increment_expression:, post_decrement_expression:,
13900         unary_expression:, pre_increment_expression:,
13901         pre_decrement_expression:, unary_expression_not_plus_minus:,
13902         cast_expression:, multiplicative_expression:,
13903         additive_expression:, shift_expression:, relational_expression:,
13904         equality_expression:, and_expression:, exclusive_or_expression:,
13905         inclusive_or_expression:, conditional_and_expression:,
13906         conditional_or_expression:, assignment:): Use new location/token
13907         information available on operators.
13908         (create_class): Set super_decl_type to NULL_TREE when processing
13909         java.lang.Object.
13910         (register_fields): Field initialization is now a MODIFY_EXPR
13911         node. Chain initialization code to the matching lists (according
13912         the the field declaration modifiers).
13913         (maybe_generate_clinit): New function.
13914         (method_header): Don't set method's DECL_NAME to a WFL when adding
13915         methods to java.lang.Object.
13916         (resolve_and_layout): Now can return NULL_TREE if the type
13917         resolution fails. Otherwise, return the class DECL instead of its
13918         TYPE.
13919         (check_method_redefinition): Don't patch method DECL_NAME if it
13920         belongs to java.lang.Object.
13921         (process_imports): Simply assign error_found to the value returned
13922         by check_pkg_class_access.
13923         (declare_local_variables): Don't use their init statements (if
13924         any) when parsing error were previously found. Reuse MODIFY_EXPR
13925         build during parsing as an init statement.
13926         (java_method_add_stmt): Now return the current method body.
13927         (java_layout_parsed_class, java_register_parsed_class): Functions
13928         removed.
13929         (java_complete_expand_methods): Initialize the constant pool on a
13930         per class basis. Layout the classes before expanding their method
13931         bodies. Don't try expand artificial constructor code if error were
13932         found. Make the classes data and register them if no error were
13933         found.
13934         (java_complete_expand_method): Retrieve an artificial constructor
13935         argument list before entering its body. Assign the top block to
13936         the artificial constructor function body and set types of declared
13937         blocks and compound statements to void. Walk method body if not an
13938         artificial constructor.
13939         (make_qualified_name, cut_identifier_in_qualified): New functions.
13940         (resolve_expression_name): Fixed comments. Save/restore the
13941         current class CLASS_LOADED_P flag value. Build non qualified
13942         static field access and handle qualified expression names.
13943         (resolve_field_access, resolve_qualified_expression_name): New
13944         functions.
13945         (patch_method_invocation_stmt): Use the new expression resolution
13946         scheme, calling resolve_field_access when the function call is
13947         resolved as an expression.
13948         (qualify_ambiguous_name): Function rewritten to work on qualified
13949         expression produced by make_qualified_name.
13950         (java_complete_tree): Promote type when function's argument are
13951         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
13952         the assignment to discover further errors if RHS is a expression
13953         name that fails to evaluate. Declare LHS initialized even though
13954         the assignment failed. Don't use the location variable and removed
13955         extra argument in patch function calls. Now handle the ARRAY_REF
13956         case and build internal string representation when STRING_CSTs are
13957         walked.
13958         (build_method_invocation): Don't wrap function call around a WFL.
13959         (build_assignment): Likewise. Use the operator location
13960         information.
13961         (patch_assignment): Handle array access LHSs. Handle error
13962         provenance, resulting in a better error report.
13963         (build_binop): Use op_location from operator as binop location
13964         information.
13965         (build_unaryop, build_incdec, build_cast): Likewise.
13966         (patch_binop): Extract location information from the node. Fixed
13967         typo in error message.
13968         (patch_unary_op): Extract location information from the node.
13969         (build_array_ref, patch_array_ref): New functions.
13970
13971 1998-07-01  Tom Tromey  <tromey@cygnus.com>
13972
13973         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
13974         match _Jv_IsInstanceOf.
13975         * decl.c (init_decl_processing): Use _Jv_NewArray, not
13976         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
13977
13978 1998-06-30  Tom Tromey  <tromey@cygnus.com>
13979
13980         * decl.c (init_decl_processing): Functions are now named
13981         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
13982
13983 1998-06-29  Per Bothner  <bothner@cygnus.com>
13984
13985         * java-tree.h (load_class):  Add prototype.
13986         * class.c (is_compiled_class):  Add missing arg to load_class.
13987         * expr.c (expand_java_NEW):  Call load_class.
13988         * parse.y (process_import):  Removed bogus use of void return value.
13989
13990 1998-06-25  Per Bothner  <bothner@cygnus.com>
13991
13992         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
13993         Function name is "_Jv_Throw" instead of "soft_athrow".
13994         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
13995         Function name is "_Jv_AllocObject" instead of "soft_new".
13996         Takes an extra parameter (object size).
13997         * expr.c:  Update calls.
13998
13999 1998-06-24  Per Bothner  <bothner@cygnus.com>
14000
14001         * lex.c (java_get_line_col):  Handle end-of-file.
14002         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
14003
14004 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
14005
14006         * lang.c (lang_init): Make -fexceptions the default.
14007         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
14008         exception handling is not turned on.
14009
14010 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
14011
14012         * lang.c (flag_new_exceptions): Make this this default.
14013         * decl.c (end_java_method): Call emit_handlers.
14014         * except.c (method_init_exceptions): Set language code and version.
14015         (expand_start_java_handler): Enable exception, and call
14016         expand_eh_region_start.
14017         (expand_end_java_handler): Enable exception, and set up catch blocks.
14018         (emit_handlers): New routine to generate the saved handlers.
14019         * java-except.h (emit_handlers): Add prototype.
14020
14021 1998-06-12  Per Bothner  <bothner@cygnus.com>
14022
14023         We used to have three different representations of the constant pool:
14024         the CPool structure, the tree_constant_pool, and the constructures
14025         used to build the Class object (which may need class and string
14026         constants) in compiled code.  None were appropriate for compiling
14027         to .class files, so I did a major overhaul.
14028
14029         First, the tree_constant_pool array was removed.  Things were
14030         modified to the CPool structure in the JCF could be used.
14031         Second, a "capacity" field was added to the CPool, and functions
14032         written to search for a matching constant, adding one if not found.
14033         The code that generated the Class object was changed to use a CPool.
14034         The actual TREE_LISTs used to build the CONSTRUCTORs used for
14035         the static Class object are now only in build_constants_constructor.
14036         Finally, I wrote code which can generate a .class file (including its
14037         constant pool) from the RECORD_TYPE of a class.  This is a big step
14038         on the way to compiling Java source into .class files.
14039
14040         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
14041         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
14042
14043         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
14044         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
14045         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
14046         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
14047         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
14048         (lang_type):  Removed constant_pool field.
14049         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
14050         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
14051         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
14052         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
14053
14054         * constants.c (current_constant_pool_tags, current_constant_pool_data,
14055         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
14056         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
14057         (set_constant_entry, find_constant1, find_constant2,
14058         find_class_constant, count_constant_pool_bytes, write_constant_pool,
14059         find_utf8_constant, find_class_or_string_constant):  New functions.
14060
14061         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
14062         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
14063         (give_name_to_class, get_class_constant):  Likewise.
14064         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
14065         (get_name_and_type_constant, get_ref_constant):  Removed.
14066         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
14067         * parse.y:  Don't save/restore tree_constant_pool.
14068         * verify.c (verify_jvm_instructions):  Update for new approach.
14069         * expr.c (expand_invoke, expand_java_field_op): Likewise.
14070
14071         * lang-options.h:  Added -femit-class-file, -femit-class-files.
14072         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
14073         (lang_f_options):  Added "emit-class-file(s)".
14074
14075         * expr.c (build_java_arrayaccess):  Generate more efficient array
14076         bounds checking, by using unsigned compare.
14077
14078         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
14079
14080 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14081
14082         * parse.h: New comment on the handling of unresolved type
14083         identifiers. JDEPs are now part of the jdep_code enum.
14084         (typedef struct jdep): Now use enum jdep_code or int, depending on
14085         availability. Both are narrowed down to an 8 bits bitfield.
14086         (CALL_EXPR_PRIMARY): Fixed comment.
14087
14088 1998-06-10  Tom Tromey  <tromey@cygnus.com>
14089
14090         * Make-lang.in (java): Added gjavac and jvgenmain.
14091         (java.start.encap): Depend on gjavac.
14092         (java.rest.encap): Depend on jvgenmain.
14093
14094         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
14095         (JAVA_CROSS_NAME): Likewise.
14096         (java.all.build): Depend on jvgenmain and gjavac.
14097         (java.all.cross): Depend on jvgenmain and gjavac-cross.
14098         (jvgenmain$(exeext)): New target.
14099         (java.install-common): Wrote.
14100         * config-lang.in (compilers, stagestuff): Added gjavac and
14101         jvgenmain.
14102
14103 1998-06-10  Dave Brolley  <brolley@cygnus.com>
14104
14105         * lang.c (lang_decode_option): New argc/argv interface.
14106
14107 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14108
14109         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
14110         * decl.c (build_decl_no_layout): New function.
14111         * expr.c (java_lang_expand_expr): Layout declarations found in
14112         blocks before they're pushed.
14113         * jcf-parse.c (load_class): Save current line when parsing class
14114         file.
14115         (parse_source_file): Register class before expanding their
14116         methods.
14117         * lang.c (put_decl_node): Produce `null' when `void *' is
14118         processed.
14119         * lex.c (static tree wfl_op): New static global, for error report
14120         on casts.
14121         (java_init_lex): wfl_operator and wfl_op initialized
14122         here. Filename caching added for wfl_op. Return wfl_op when `(' is
14123         parsed.
14124         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
14125         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
14126         build_unresolved_array_type): New static function definitions.
14127         (build_decl_no_layout): New extern function declared.
14128         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
14129         faulty modifier exists.
14130         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
14131         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
14132         (UNARY_PLUS_EXPR): New fake operator.
14133         (struct parser_ctxt): New field osb_number.
14134         * parse.y (static tree wfl_operator): New static WFL for operator
14135         bound error messages.
14136         (DECR_TK, INCR_TK): Moved.
14137         (OP_TK): Tagged <operator>.
14138         (array_type:): Now call build_unresolved_array_type.
14139         (dim_expr:): Count the number of '[' seen.
14140         (post_increment_expression, post_decrement_expression,
14141         pre_increment_expression, pre_decrement_expression,
14142         unary_expression_not_plus_minus, unary_expression:): Actions are
14143         now building the corresponding unary expressions.
14144         (cast_expression:): Actions are now building cast expressions.
14145         (build_unresolved_array_type): New function.
14146         (create_interface): Reset the number of declared interfaces.
14147         (create_class): Likewise.
14148         (method_header): Methods declared within the scope of an interface
14149         are now implicitly set public and abstract.
14150         (java_complete_class): Variable's and parameter's type are patched
14151         with a promoted type.
14152         (declare_local_variables): Resolved non builtin types are promoted
14153         before being used to build a variable decl. Removed type patch
14154         posted on variable initialization statement.
14155         (source_start_java_method): Use build_decl_no_layout to build the
14156         decl of a parameter of incomplete type.
14157         (java_register_parsed_class): Process interfaces too. Call
14158         rest_of_decl_compilation on each processed class declarations.
14159         (java_complete_expand_methods): Don't attempt to expand things in
14160         interfaces.
14161         (java_complete_tree): Process CONVERT_EXPR, even though it always
14162         has a type. Propagate error_mark_node to node's type too. Promote
14163         method's call argument type and return error_mark_node if
14164         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
14165         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
14166         handle unary operator nodes.
14167         (build_assignment): Added comment.
14168         (print_int_node): New function.
14169         (patch_assignment): New second argument. New error handling. Use
14170         print_int_node. Handle references. Use can_cast_to_p to issue
14171         different error message according to the context and check upon
14172         the initialization of the RHS.
14173         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
14174         (operator_string): Handle more operators.
14175         (patch_binop): No longer use a function static
14176         wfl_operator. Improved error message on shift distance.
14177         (build_unaryop, build_incdec, build_cast, patch_unaryop,
14178         patch_cast): New functions.
14179
14180 1998-06-05  Per Bothner  <bothner@cygnus.com>
14181
14182         * jvspec.c:  New file.
14183         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
14184
14185         * java-tree.h (identifier_subst):  Add declaration.
14186
14187 1998-06-04  Tom Tromey  <tromey@cygnus.com>
14188
14189         * jvgenmain.c (main): Generate call to JvRunMain.
14190
14191         * class.c (make_class_data): Push value for "sync_info" field.
14192         * decl.c (init_decl_processing): Push "sync_info" field.
14193
14194 1998-06-03  Per Bothner  <bothner@cygnus.com>
14195
14196         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
14197         Java (source) name, not signature.
14198         Set TYPE_ALIGN to (at least) that of element_type.
14199
14200 1998-06-02  Per Bothner  <bothner@cygnus.com>
14201
14202         * class.c:  Moved classname-mangling-rekated code to ...
14203         * mangle.c:  ... this new file.
14204         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
14205         * Makefile.in:  Update for above changes.
14206
14207 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14208
14209         * expr.c (truthvalue_conversion): Convert integer and floating
14210         point value to their truth value.
14211         * lex.c (java_lex): Handle the `null' literal.
14212         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
14213         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14214         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
14215         New macros.
14216
14217         * parse.y: Reorganization/documentation on token declaration.
14218         (binop_lookup[]): New added new tree codes.
14219         (relational_expression): Build corresponding binary operators.
14220         (equality_expression, conditional_and_expression,
14221         conditional_or_expression): Likewise.
14222         (java_complete_class): Fix crash in debug message.
14223         (java_complete_tree): Check initialization of method call
14224         arguments. Further bogus node evaluation to detect more error
14225         during assignments. Handles more binary operators.
14226         (patch_assignment): Use DECL_P.
14227         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
14228         code.
14229         (operator_string): Handle more case. Compacted source.
14230         (patch_binop): Changed function comment. Checking for
14231         uninitialized first operand takes the compound assignment into
14232         account and uses DECL_P. Checking for uninitialized second operand
14233         delayed to routine's end. Use macros to issue type bound error
14234         messages and issue messages on both operands if their types are
14235         different. Force fixed type into node. Handle all binary
14236         operators.
14237
14238 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14239
14240         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
14241         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
14242         build operator node and return tokens.
14243         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
14244         * parse.h (java_complete_tree): Changed returned type in prototype.
14245         (build_method_invocation, build_assignment, patch_assignment,
14246         patch_binop): New static function declarations.
14247         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
14248         BUILD_EXPR_WFL): New macros.
14249         * parse.y (enum tree_code binop_lookup[]): New static for token to
14250         TREE_CODE lookup.
14251         (%union): Parser union has new sub-structure `operator'.
14252         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
14253         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
14254         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
14255         ASSIGN_ANY_TK): Tokens tagged `operator'.
14256         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
14257         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
14258         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
14259         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
14260         (assignment_operator:): Rule tagged `operator'.
14261         (expression_statement:): Re-installed default rule.
14262         (method_invocation:): Sub rules call build_method_invocation.
14263         (postfix_expression:): Don't attempt to resolve name here. Just
14264         return an ID.
14265         (multiplicative_expression:): Sub-rules build corresponding binop
14266         expression node.
14267         (additive_expression:, shift_expression:, and_expression:,
14268         exclusive_or_expression:, inclusive_or_expression:): Likewise.
14269         (assignment:): Sub rule invoke build_assignment.
14270         (assignment_operator:): Default rules on sub rules.
14271         (force_error): Added documentation on this variable.
14272         (declare_local_variables): Build initialization calling
14273         build_assignment.
14274         (expand_start_java_method): Removed unused rtx declaration. Mark
14275         arguments as already initialized.
14276         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
14277         (java_complete_expand_methods): Don't process next method if
14278         completion of the previous one triggered errors.
14279         (java_complete_expand_method): Call source_end_java_method if no
14280         error were found during completion.
14281         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
14282         locals declaratilon. Handle names found within a class. Return
14283         error_mark_node when things aren't found.
14284         (patch_method_invocation_stmt): Return error_mark_node on failures.
14285         (patch_invoke): Removed unused local. Return the correct node.
14286         (java_complete_tree): Now returns a value. The BLOCK section binds
14287         local identifiers and the type of a BLOCK is now void. Assign the
14288         result of operand completion on COMPOUND_EXPR. Assign the
14289         encapsulated node of a WFL to the result of its completion, except
14290         when the node is an identifier. Now handle MODIFY_EXPR and several
14291         binary operators. Return error_mark_node on errors.
14292         (build_method_invocation, build_assignment, patch_assignment,
14293         build_binop, operator_string, patch_binop): New functions.
14294         * typeck.c (binary_numeric_promotion): New function.
14295
14296 1998-05-21  Per Bothner  <bothner@cygnus.com>
14297
14298         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
14299         Replace most uses of ident_subst by identifier_subst.
14300
14301         * class.c (push_class_static_dummy_field):  Removed function.
14302         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
14303         instead of looking got "class" static field.  Create that decl here.
14304         (class_identifier_node):  Removed;  no longer needed.
14305         (init_class_processing):  Don't init class_identifier_node.
14306         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
14307         Do nreverse 0 times (instead of twice) for Object and Class.
14308         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
14309
14310 1998-05-20  Per Bothner  <bothner@cygnus.com>
14311
14312         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
14313         while initializing linenumber_count and linenumber_table.
14314         Do it before init_function_start (which calls emit_line_note).
14315         * expr.c (expand_byte_code):  Don't need to clear lineno here.
14316
14317 1998-05-18  Tom Tromey  <tromey@cygnus.com>
14318
14319         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
14320         then mangle number as _N_.
14321
14322         * class.c (mangle_class_field): New function.
14323         (build_class_ref): Set assembler name of class reference using
14324         mangle_class_field.
14325         (push_class_static_dummy_field): Likewise.
14326
14327 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
14328
14329         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
14330         of assigning to TREE_CODE.  The latter method exploits a feature
14331         of GCC that is not ANSI compliant.
14332
14333 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14334
14335         * decl.c (pushdecl_force_head): New function.
14336         (pushlevel): Removed conditional printf.
14337         (complete_start_java_method): Don't enter local variable scope if
14338         function is compiled from source code.
14339         * expr.c: parse.h now included
14340         (java_lang_expand_expr): New function.
14341         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
14342         printf. Terminate buffer when doing directories.
14343         * jcf-parse.c (parse_source_file): Call lang_init_source before
14344         parsing and before code generation.
14345         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
14346         use printf if the macro is defined.
14347         * lang.c (lang_init): Install lang_expand_expr hook on
14348         java_lang_expand_expr.
14349         (java_dummy_print): New function.
14350         (lang_init_source): New function.
14351         * lex.c (java_lex): Remember location of an opening brace at the
14352         second nesting level.
14353         (java_is_eol): Unget character seen after a CR if it is EOF.
14354         * parse.h: Now includes lex.h
14355         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
14356         printf if the macro is defined.
14357         (expand_start_java_method, build_expr_block, enter_block,
14358         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
14359         New static function declarations.
14360         (pushdecl_force_head): New extern function declaration.
14361         (INCOMPLETE_TYPE_P): New macro.
14362         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
14363         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
14364         BLOCK_EXPR_ORIGIN): New macros.
14365         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
14366         DECL_SOURCE_LINE_LAST): New macros.
14367         (struct parser_ctxt): Removed field current_method_decl, redundant
14368         with the field current_function_decl. Added fields
14369         first_ccb_indent1 and pending_block.
14370         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
14371         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
14372         tagged <node>
14373         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
14374         (compilation_unit:): Cosmetic on sub rule.
14375         (type_declaration:): Cosmetic on sub rules. Added an error rule.
14376         (variable_initializer:): Installed default rule on expression:.
14377         (method_declaration:): method_header: starts a new
14378         method. method_body: installs the function body, absorbs blocks
14379         emitted for temporary variable scopings, pops function's body block
14380         and merges function's last statement lineno in DECL_SOURCE_LINE.
14381         (method_body:): Installed default rules.
14382         (block:): Call enter_block when an opening brace is seen.  Absorb
14383         scoping blocks and call exit_block when a closing brace is seen.
14384         (block_statement:): Cosmetic changes.
14385         (method_invocation:): Create WFL around CALL_EXPR node.
14386         (patch_stage): Added comment around definition.
14387         (method_header): Try to use first_ccb_indent1 as the first line of
14388         the method, so BP debug info are emitted at the first opening
14389         brace of the function. If the function has no body, use the
14390         location of the function's name. Override currently defined method
14391         name with the matching WFL so we can point redefinition errors
14392         using the location where the function's name was declared.
14393         (check_abstract_method_header): Interprets DECL_NAME as an
14394         identifier or as a WFL, accordingly.
14395         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
14396         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
14397         location and name information out of it and reinstall DECL_NAME to
14398         its original identifier node value.
14399         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
14400         function's source code).
14401         (read_import_dir): Test the value returned by find_class and issue
14402         a fatal accordingly.
14403         (declare_local_variables): Push a new block for the scope of the
14404         new variable(s) if code has been already generated at that nesting
14405         level. Pinpoint redefinition errors using the variable id
14406         WFLs. Generate initialization code if necessary. If the variable
14407         type is incomplete, register a patch on its decl.
14408         (source_start_java_method): Rewritten. Define a new block for the
14409         function's parameters. Build parameter decl out of function's
14410         arguments and register them for a patch if their types are
14411         incomplete.
14412         (expand_start_java_method): Includes the part of
14413         source_start_java_method that was pushing the parameter decls and
14414         completing the method start code.
14415         (source_end_java_method): Removed call the expand_end_bindings and
14416         poplevel (already taken care of). Reinstall function's arguments
14417         and get function's last line of code before calling
14418         expand_function_end.
14419         (java_method_add_stmt): New comment before the function's
14420         code. Complement the second operand of the current COMPOUND_EXPR
14421         if necessary.
14422         (java_complete_expand_methods): Don't generate debug info on line
14423         zero when expanding a generated constructor.
14424         (java_complete_expand_method): Set start and end line numbers for
14425         a artificially generated constructor to one and manually call
14426         enter_block and exit_block when defining it. For all methods:
14427         expand function's start calling the new expand_start_java_method
14428         and invoke java_complete_tree on the effective method's body, if
14429         any.
14430         (resolve_expression_name): Now use lookup_name_in_blocks to search
14431         local variable decls and print out an error when variables are
14432         undefined.
14433         (patch_method_invocation_stmt): Inserted comment before the
14434         function's code.
14435         (lookup_method_invoke): Chain method's arguments using chainon
14436         with the current arg list as a second argument. Inserted missing
14437         IDENTIFIER_POINTER when reporting an error on methods not found.
14438         (refine_accessible_methods_list): Don't retain constructors.
14439         (patch_arguments): Function removed.
14440         (java_complete_tree): Inserted comment before the function's
14441         code. New case for BLOCKs. Moved the WFL case a bit
14442         further. Complete function's arguments.
14443         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
14444         maybe_absorb_scoping_blocks): New functions.
14445
14446 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14447
14448         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
14449         previously set.
14450         * jcf-parse.c (parse_source_file, java_error_count): New forward
14451         and extern declarations.
14452         (java_parse_abort_on_error): Macro moved.
14453         (jcf_parse_source): fatal called if fopen fails. Now calls
14454         parse_source_file.
14455         (parse_source_file): New parse_only parameter. Reflects the
14456         elimination of the second pass.
14457         (yyparse): parse_source_file called with argument set to 0.
14458         * jcf.h (JCF_ZERO): Sets java_source to zero.
14459         * lex.c (java_init_lex): pass argument is gone. Function modified
14460         to be called once during the analysis of a file.
14461         (java_unget_unicode): Fixed typo in fatal message.
14462         (java_get_line_col): Likewise.
14463         (java_lval): Likewise. String literals no longer built during
14464         second pass.
14465         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
14466         account.
14467         * parse.h (MODIFIER_WFL): New macro.
14468         (parse_check_super, parser_check_super_interface): Now return int.
14469         (parser_chain_incomplete_item, not_builtin_p,
14470         complete_method_decl): Declarations removed.
14471         (build_method_invocation_stmt, build_invoke): Renamed using the
14472         `patch' instead of `build'
14473         (register-incomplete_type, obtain_incomplete_type,
14474         java_complete_tree, java_complete_expand_method,
14475         unresolved_type_p, create_jdep_list): New function declarations.
14476         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
14477         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
14478         (jdep): New typedef on new struct _jdep.
14479         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
14480         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
14481         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
14482         JDEP_RESOLVED_P): New macros.
14483         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
14484         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
14485         JDEP_VARIABLE): New enum values and jdep kinds.
14486         (jdeplist): New typedef on struct _jdeplist.
14487         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
14488         macros.
14489         (CALL_EXPR_PRIMARY): New macro.
14490         (struct parser_ctxt): Fields java_pass, current_method_decl,
14491         method_decl_list deleted. New field jdeplist.
14492         (INCOMPLETE_P): Macro deleted.
14493         * parse.y (single_type_import_declaration:): Removed pass switch.
14494         (type_import_on_demand_declaration): Likewise.
14495         (field_declaration:): Removed pass switch on all sub rules.
14496         (class_declaration:): Call the complete_class_decl removed on
14497         class_body rules.
14498         (method_declaration:): Removed second pass switch. No longer chain
14499         methods decl when method_header reduced.
14500         (method_header:): Sub rules no longer depend on pass switch.
14501         (method_declarator:): Likewise.
14502         (method_body:): Likewise.
14503         (abstract_method_declaration:): Likewise.
14504         (block_statement:): Likewise.
14505         (local_variable_declaration:): Likewise.
14506         (argument_list:): Likewise.
14507         (method_invocation:): Likewise. Call to build_method_invocation_stmt
14508         removed. Partial CLASS_EXPR tree node built instead.
14509         (postfix_expression:): Removed pass switch on all sub rules.
14510         (java_pop_parser_context): Free classd_list content.
14511         (yyerror): Call obstrack_grow0 to finalize error message.
14512         (check_class_interface_creation): Comment modified to reflect new
14513         returned value meaning. Removed second pass switch. Return 1 if an
14514         error was found, 0 otherwise. Adjust pointer on filename if a
14515         leading path separator was found.
14516         (maybe_create_class_interface_decl): Removed first pass switch
14517         when linking the class decl to the class_list. Install a new
14518         jdep_list for the class.
14519         (add_superinterfaces): List of unresolved interfaces is
14520         gone. Unresolved interfaces are directly added to the current
14521         dependencies list.
14522         (create_interface): Second pass shortcut removed.
14523         ctpx->modifier_ctx access through MODIFIER_WFL.
14524         (create_class): Second pass shortcut removed. Call to
14525         register_incomplete_type replaces the call to
14526         parser_chain_incomplete_item.
14527         (complete_class_decl): Function removed.
14528         (duplicate_declaration_error): New way of retrieving redeclared
14529         item type.
14530         (register_fields): Call to lookup_modifier_cl replaced by
14531         MODIFIER_WFL. New way of handling unresolved type, using
14532         unresolved_type_p and obtain_incomplete_type.
14533         register_incomplete_type replaces call to parser_chain_incomplete_item.
14534         (patch_stage): New static global variable.
14535         (method_header): New way of handling unresolved type, using
14536         unresolved_type_p and obtain_incomplete_type. patch_stage used to
14537         indicates that the method decl needs to be patched.
14538         (check_abstract_method_header): Call to lookup_modifier_cl
14539         replaced by MODIFIER_WFL.
14540         (method_declarator): Incomplete argument type are registered
14541         calling register_incomplete_type. Patch on the declared method is
14542         issued in that case.
14543         (unresolved_type_p): New function.
14544         (parser_check_super_interface): New comment to reflect function's
14545         modified returned type (int). Function and has a new argument
14546         this_wfl. Call to parse_error_context uses this_wfl instead of
14547         relying on lookup_cl.
14548         (parser_check_super): Comment reflects function's new returned
14549         type (int). Function returns nonzero value on error.
14550         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
14551         register_incomplete_type, jdep_resolve_class): New functions to
14552         handle incomplete types in declarations.
14553         (java_complete_class): Rewritten to work with the new incomplete
14554         type handling scheme.
14555         (complete_class_report_errors): Likewise.
14556         (complete_method_decl): Removed: it jobs is now handled by
14557         java_complete_class.
14558         (do_resolve_class): Class loaded in not already loaded and not
14559         found in Java source code.
14560         (java_check_regular_methods, java_check_abstract_methods): Don't
14561         call complete_method_decl anymore.
14562         (lookup_modifier_cl, not_builtin_p): Functions deleted.
14563         (read_import_dir): Got rid of the pass number dependency.
14564         (declare_local_variables): New handling of unresolved types (patch
14565         issued).
14566         (source_start_java_method): New parameter level. Function called
14567         with level set to 1 when argument types are potentially
14568         unresolved.  Called to complete the job with level set to 2 once
14569         types are complete.
14570         (source_end_java_method): Call to permanent_allocation
14571         removed. Waiting to be replaced by a more suitable obstack
14572         management.
14573         (java_complete_expand_methods, java_complete_expand_method,
14574         java_expand_finals): New functions.
14575         (build_method_invocation_stmt): Renamed
14576         patch_method_invocation_stmt. Extracts function call expression
14577         (wfl) and arguments (args) from CALL_EXPR tree operands.
14578         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
14579         call. Patch the function and argument operand of the CALL_EXPR
14580         tree argument.
14581         (patch_argument, java_complete_tree): New functions.
14582
14583 1998-04-20  Per Bothner  <bothner@cygnus.com>
14584
14585         Recover from missing fields and methods (i.e. error instead of fatal).
14586         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
14587         * expr.c (expand_invoke):  Recover from missing method.
14588         (expand_java_field_op):  Recover from missing field.
14589         Inline references to java.lang.{Integer,Char,...}.TYPE.
14590         * typeck.c (get_type_from_signature), java-tree.h:  New function.
14591         * class.c (add_method):  Use get_type_from_signature.
14592         (build_class_ref):  Handle a class that was not found.
14593         * typeck.c (convert):  Handle conversion to pointers (for convenience).
14594         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
14595         instead of lookup_field to handle missing fields.
14596
14597         * jcf-parse.c (process_zip_dir):  Set java_source.
14598
14599 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
14600
14601         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
14602
14603 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14604
14605         * jcf-parse.c (load_class): Don't change input_filename before
14606         calling jcf_parse_source (but still do it before calling
14607         jcf_parse).
14608         (jcf_parse_source): Assign input_filename after having saved the
14609         parser context.
14610         * lex.c (java_init_lex): Chain a WFL node to the import on demand
14611         list. ctxp->modifier_ctx zeroed according to its new
14612         definition. ctxp->filename initialized. Removed
14613         JAVA_MODIFIER_CTX_UNMARK.
14614         (java_unget_unicode): Update the character based column position.
14615         (java_allocate_new_line): ref_count not used anymore. Always free
14616         ctxp->p_line. Initialize c_line->char_col to 0.
14617         (java_get_unicode): Update the character based column position.
14618         (java_lex): Use ctxp->elc to store current position in source
14619         file, at the beginning of the parsed token. Set modifier_ctx entry
14620         corresponding to the parse modifier to a WFL node. Return a WFL
14621         node when an identifier is parsed.
14622         (java_lex_error): Now uses ctxp->elc to store current position in
14623         source.
14624         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
14625         * lex.h (build_wfl_node): New function definitions.
14626         (struct java_line): ref_count and next fields are gone. New field
14627         char_col.
14628         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
14629         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
14630         (JAVA_COLUMN_DELTA): New macro.
14631         (java_lc): New typedef on new struct _java_lc.
14632         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
14633         (parse_error_context, parse_warning_context): Changed prototypes.
14634         (java_get_line_col): Added as an available global function.
14635         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
14636         (IC_DECL): Replaced by macro IC_TYPE
14637         (DEPEND_WFL): New macro.
14638         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
14639         wrong modifier.
14640         (exit_java_complete_class): Removed a commented out statement.
14641         (struct parser_ctxt): Added comments on fields. modifier_ctx is
14642         now an array of tree nodes. Deleted fields line_list and
14643         e_line. New field elc, to replace e_line.
14644         * parse.y (array_type:): Build WFL node.
14645         (qualified_name:): Build a single WFL node out of two. Retain
14646         the location information of the first node in the resulting node.
14647         (package_declaration:): Use package name as a WFL node
14648         (single_type_import_declaration:): Use imported name as a WFL node.
14649         (type_import_on_demand_declaration:): Use root of the imported
14650         packages as a WFL node.
14651         (field_declaration:): Removed unused local variable cl.
14652         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
14653         (yyerror): New static elc. Removed static error_line, error_pos.
14654         New local code_from_source. Save ctxp->elc into elc at the first
14655         pass. Call java_get_line_col to get a string of the line where
14656         the error occurred.
14657         (debug_line): Removed static function.
14658         (parse_error_context, parse_warning_context): Parameter cl is now
14659         a WFL node. Use its value to initialize ctxp->elc.
14660         (redefinition_error): Parameter cl is now a WFL node.
14661         (parse_add_interface): New parameter wfl. No longer call
14662         lookup_cl, use wfl instead.
14663         (check_class_interface_creation): Parameter cl is now a WFL node.
14664         (maybe_create_class_interface_decl): Likewise.
14665         (add_superinterfaces): New function.
14666         (create_interface): Removed local cl, node, super_decl,
14667         super_decl_type.  Function now uses id as a WFL node. Better
14668         warning/error report on obsolete or forbidden mix of
14669         modifiers. Now calls add_superinterfaces to register interfaces.
14670         (create_class): Removed local cl, node. Local variable id is used
14671         as a WFL node. Better error report on forbidden modifier
14672         mix. Uses add_superinterfaces to register interfaces.
14673         (find_field): Argument cl is now a WFL node. Now store the WFL
14674         node of a fields that needs to be checked for their
14675         initialization.
14676         (method_header): Local variable node non longer used. Local
14677         variable id replaces cl.
14678         (check_modifiers_consistency): Local variable cl is now a WFL
14679         node.
14680         (method_declarator): Local variable cl replaced by parameter id.
14681         (parser_qualified_name): Now uses parameter name as a WFL node.
14682         (parser_check_super_interface): New parameter wfl, for achieve
14683         greater accuracy during error reports.
14684         (parser_chain_incomplete_item): New parameter named location. Used,
14685         along the decl, to construct the incomplete item node.
14686         (java_complete_class): resolve_class now uses WFL node extracted
14687         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
14688         where appropriate.
14689         (complete_method_decl): Unresolved function's argument types are WFL.
14690         (resolve_class): Parameter cl is now a WFL node.
14691         (resolve_and_layout): Likewise.
14692         (do_resolve_class): Likewise. Try first to use cl and then do the
14693         lookup on the decl when calling check_pkg_class_access.
14694         (complete_class_report_errors): Use IC_TYPE in place of
14695         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
14696         instead of doing a lookup over the decl.
14697         (java_check_final): Use WFL info from field tree list.
14698         (lookup_cl): Rewritten and returns a statically defined WFL node.
14699         (lookup_modifier_cl): Now uses information from WFL nodes.
14700         (process_imports): Likewise.
14701         (read_import_dir): name and cl arguments replaced by a single WFL
14702         node. Function modified accordingly.
14703         (find_in_imports_on_demand): Now uses WFL node.
14704         (check_pkg_class_access): cl argument is now a WFL node.
14705         (declare_local_variables): Fixed to use WFL nodes.
14706         (resolve_expression_name): Likewise.
14707         (build_method_invocation_stmt): name_combo argument renamed
14708         wfl. Function modified to use WFL nodes.
14709         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
14710         (lookup_method_invoke): cl is now a WFL node. Added missing
14711         IDENTIFIER_POINTER to class type decl name.
14712
14713 1998-04-14  Dave Brolley  <brolley@cygnus.com>
14714
14715         * lang.c (init_parse): Now returns char* containing the filename.
14716
14717 1998-04-10  Per Bothner  <bothner@cygnus.com>
14718
14719         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
14720
14721         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
14722         * class.c (make_class_data):  If flag_assume_compiled, initial class
14723         state is CSTATE_PREPARED; make superclass and interfaces direct
14724         references, rather than constant pool indexes.
14725
14726 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14727
14728         * parser.y: Include flags.h. Removed debug variable pl.
14729         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
14730         (block:): Likewise.
14731         (labeled_statement_nsi:): Generate debug info when reducing
14732         expression_statement:.
14733         (check_pkg_class_access): get_access_flags_from_decl invocation
14734         fixed for new CLASS_* flags location.
14735         (source_end_java_method): Save/restore parser context when
14736         entering/leaving this routine. Restore lineno to its right value
14737         before calling expand_end_bindings.
14738         (build_method_invocation_stmt): build_invoke called with the
14739         current line information.
14740         (build_invoke): New argument cl. Wrap the function call around a
14741         wfl node.
14742         (refine_accessible_methods_list): Changed comment, removed
14743         unnecessary code.
14744         * parse.h: Fixed typo in comments.
14745         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
14746         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
14747         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
14748         parser_ccb_indent.
14749         * lex.c (java_lex): Record the last closing curly bracket of a
14750         function.
14751         * jcf-parse.c (jcf_parse_source): Now calls
14752         java_check_methods. Clarified comment, fixed typo.
14753
14754 1998-04-09  Dave Brolley  <brolley@cygnus.com>
14755
14756         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
14757         (finish_parse): Expose for non USE_CPPLIB builds.
14758
14759 1998-04-08  Jeffrey A Law  (law@cygnus.com)
14760
14761         * lang.c (lang_print_xnode): New function.
14762
14763 1998-04-03  Per Bothner  <bothner@cygnus.com>
14764
14765         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
14766         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
14767         used to build a class's dispatch table.
14768         (make_class_data):  Generate dispatch table if flag_assume_compiled.
14769         Set dtable of class object to address of class_dtable_decl.
14770
14771         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
14772         be volatile and have side effects - generates better code.
14773
14774         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
14775         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
14776
14777         * expr.c (expand_invoke):  If class is final, method is
14778         effectively final, so can call it directly.
14779
14780         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
14781
14782         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
14783
14784 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14785
14786         * parse.y (build_method_invocation_stmt): Removed extra argument
14787         to build_invoke.
14788
14789 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14790
14791         * expr.c (dtable_indent): Now static global.
14792         (expand_invoke): Now call invoke_build_dtable and
14793         build_invokevirtual.
14794         (invoke_build_dtable, build_invokevirtual): New functions.
14795         * jcf-io.c (find_class): Defer issuing a warning by setting
14796         jcf->outofsynch to 1.
14797         * jcf-parse.c (jcf_out_of_synch): New function.
14798         (load_class): Test this_jcf.outofsynch flag and call
14799         jcf_out_of_synch accordingly.
14800         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
14801         comment indentation.
14802         * lex.c (java_get_unicode): Fixed code indentation.
14803         (java_lex): Create string literal. Fixed typo. Removed several
14804         premature obstack_free.
14805         * parse.h: New enums for name resolution and invocation mode.
14806         (struct qualification): New data structure.
14807         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
14808         (do_resolve_class, build_method_invocation_stmt,
14809         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
14810         debug_line, identical_subpath_p, invocation_mode,
14811         refine_accessible_methods_list, build_invoke,
14812         lookup_method_invoke): New functions declared.
14813         (build_invokevirtual, invoke_build_dtable, match_java_method,
14814         build_field_ref, jcf_out_of_synch): New references to external
14815         functions.
14816         (struct parse_ctxt): Removed artificial_constructor field.
14817         * parse.y: (array_type:): Type defined for this rule.
14818         (class_type:): Installed default rule for interface_type:.
14819         (array_type:): Now build Java array type.
14820         (qualified_name:): Now use obstack_grow0.
14821         (method_declaration:): Skip the artificial constructor added to
14822         the list, if any.
14823         (abstract_method_declaration:): Execute the code only during pass 1.
14824         (block:): Installed default rule in block_statements:.
14825         (block_statement:): Add the statement to the method during pass 2.
14826         (statement_expression): Installed default rule for
14827         method_invocation:.
14828         (argument_list:): Added code to build the argument list.
14829         (method_invocation:): Added call to create the method invocation
14830         node.
14831         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
14832         (debug_line): New function for debug.
14833         (complete_class_decl): No longer do something during pass 1.
14834         (method_header): Use BUILD_PTR_FROM_NAME.
14835         (parser_qualified_classname): Use obstack_grow0. Removed bogus
14836         obstack_free.
14837         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
14838         function's main comment.
14839         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
14840         classes.
14841         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
14842         (resolve_class): Now works with arrays.
14843         (do_resolve_class, resolve_and_layout): New functions.
14844         (java_check_regular_methods): Reverse method list before and after
14845         having processed it. No longer set ctxp->artificial_constructor.
14846         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
14847         accordingly. Fixed typo in issued error message. Now use
14848         obstack_grow0.
14849         (find_in_imports_on_demand): Now use obstack_grow0.
14850         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
14851         (source_end_java_method): Call expand_expr_stmt instead of
14852         expand_expr. Calls it before calling expand_function_end.
14853         (java_method_add_stmt): Do nothing if errors were found during
14854         parsing.
14855         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
14856         (build_method_invocation_stmt, build_invoke, invocation_mode,
14857         lookup_method_invoke, refine_accessible_methods_list,
14858         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
14859         New functions.
14860         * typeck.c (build_java_signature): Properly end method signature
14861         if return type skipped.
14862         (match_java_method): New function.
14863
14864 1998-03-16  Per Bothner  <bothner@cygnus.com>
14865
14866         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
14867
14868 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14869
14870         * expr.c (build_invoke_non_interface): New function.
14871         (methods_ident, ncode_ident): Now static globals.
14872         (expand_invoke): Use build_invoke_non_interface.
14873         * java-tree.h (struct lang_decl): New field function_decl_body.
14874         (DECL_FUNCTION_BODY): New macro.
14875         * jcf-parse.c (jcf_parse_source): Deeper check before setting
14876         CLASS_FROM_SOURCE_P.
14877         (parse_source_file): Fixed typos. Call java_layout_parsed_class
14878         before starting pass 2. Call to java_generate_parsed_class replaced
14879         by java_register_parsed_class.
14880         * lex.c: Fixed typo in header. Some line width related formating.
14881         * lex.h: Some line width related formating.
14882         * parse.h (source_end_java_method, resolve_expression_name,
14883         complete_class_decl, maybe_create_class_interface_decl,
14884         check_class_interface_creation): New static function declarations.
14885         (java_layout_parsed_class, java_method_add_stmt): New function
14886         declarations.
14887         (struct parser_ctxt): Field mark_class_generate removed. New
14888         fields class_list and artificial_constructor.
14889         * parse.y: Fixed typo in header.
14890         (class_declaration:): Call complete_class_decl when class body
14891         parsed.
14892         (method_declaration:): Call source_end_java_method in pass 2 when
14893         the method body is defined.
14894         (postfix_expression:): Do expression name resolution on sub-rule
14895         name during pass 2.
14896         (create_class, create_interface): Merged common pieces.
14897         (check_class_interface_creation, maybe_create_class_interface_decl):
14898         New functions.
14899         (complete_class_decl): New function.
14900         (register_fields): Fixed line width related typo.
14901         (method_header): Correctly skip first argument when fixing
14902         argument line. Changed the loop.
14903         (java_check_circular_reference): Now use ctxp->class_list.
14904         (java_complete_class): Removed start/stop marking.
14905         (java_check_regular_methods): Now takes a class decl as an
14906         argument.  Add default constructor if none were encountered.
14907         (java_check_methods): Now use ctxp->class_list. Changed call to
14908         java_check_regular_methods.
14909         (source_start_java_method): Set DECL_ARG_TYPE for each function
14910         arguments.
14911         (source_end_java_method, java_method_add_stmt): New functions.
14912         (java_generate_parsed_class): No longer exists.
14913         (java_layout_parsed_class, java_register_parsed_class): New functions.
14914         (resolve_expression_name): New function.
14915
14916 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14917
14918         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
14919         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
14920         until pass initializations are done. Call read_import_dir with
14921         pass set to 0.
14922         * parse.h: (lookup_modifier_cl): New function declared.
14923         (INTERFACE_FIELD_MODIFIERS): New macro.
14924         (OBSOLETE_MODIFIER_WARNING): New macro.
14925         * parse.y: (register_fields): Class type and current field name in
14926         local variables. Check modifier(s) if adding field(s) to an interface.
14927         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
14928         and report errors using the faulty modifier line context.
14929         (lookup_modifier_cl): New function.
14930         (read_import_dir): Detect and report default import processing
14931         failure.
14932
14933 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
14934
14935         Add a pair of -fassume-compiled/-fno-assume-compiled options.
14936         * class.c (is_compiled_class): Return 1 after making sure it
14937         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
14938         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
14939         * java-tree.h (flag_assume_compiled): Add decl.
14940         * lang.c (lang_f_options): Add the flag.
14941         (flag_assume_compiled): Add decl, default to 0.
14942
14943 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14944
14945         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
14946         (is_compiled_class): Likewise.
14947         (layout_class): Likewise.
14948         (layout_class): Detect and lay out classes defined in source code.
14949         (interface_of_p, add_interface_do, may_add_interface): New
14950         function.
14951         (add_interface): Now use add_interface_do.
14952         (add_method_1): New function.
14953         (add_method): Now use add_method_1.
14954         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
14955         (complete_start_java_method): New function.
14956         (start_java_mehod): Now call complete_start_java_method.
14957         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
14958         (expand_invoke): Likewise and fixed typo.
14959         *gjava.c: (print_super_field): Use new argument to find_class
14960         DO_CLASS_FILE.
14961         (main): Likewise.
14962         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
14963         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
14964         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
14965         IDENTIFIER_NODE.
14966         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
14967         (add_method_1, push_class): New prototypes.
14968         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
14969         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
14970         directory where the class was found.
14971         (find_class): New argument DO_CLASS_FILE. Function find_class
14972         modified accordingly.
14973         *jcf-parse.c: (fix_class_path): New function.
14974         (load_class): Use new VERBOSE argument. load_class now finds and
14975         loads/parses .class/.java files. Save read_state of current_jcf
14976         if necessary.
14977         (java_parser_abort_on_error): New macro.
14978         (jcf_parse_source, parse_source_file): New function.
14979         (jcf_parse): Fixed typo.
14980         (yyparse): Call parse_source_file () only.
14981         (process_zip_dir): Fixed typo, fix zdir->filename_length when
14982         writing the real class name back in the zip directory entry.
14983         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
14984         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
14985         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
14986         (find_class): Prototype fixed.
14987         *lex.c: Added 1998 time stamp.
14988         Removed all static global variables, moved into the parser
14989         context data structure.. Now include unistd.h if SEEK_SET not
14990         defined.
14991         (java_init_lex): Rewritten.
14992         (java_sneak_unicode): Modified current unicode access in current line.
14993         (java_unget_unicode): Likewise.
14994         (java_allocate_new_line): New allocation management.
14995         (java_read_char): Modified access and storage of unget_utf8_value.
14996         New way of processing current unicode.
14997         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
14998         (java_get_unicode): Now use the parser context.
14999         (java_lineterminator): Likewise.
15000         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
15001         of the reentrant parser implementation. Function now use the
15002         parser context data structure and java_lval. Fixed production of
15003         the float and double constant "out of range" error message. Fixed
15004         obstack use. Return integer value when hitting a modifier. Now
15005         return type for TRUE, FALSE and other predefined types. Return
15006         identifier as a TREE_LIST list containing the current line context
15007         as the TREE_VALUE sub-node.
15008         (java_unicode_2_utf8): Fixed typo in declaration.
15009         (java_lex_error): Now use the parser context data structure.
15010         *lex.h: Added 1998 time stamp.
15011         (struct java_line): New fields ref_count and next.
15012         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15013         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
15014         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
15015         *parse.h: Added 1998 time stamp.
15016         (java_parse_source_file): Renamed from parse_source_file.
15017         (YYERROR_NOW, YYNOT_TWICE): Fixed.
15018         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
15019         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
15020         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
15021         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
15022         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
15023         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
15024         (struct parser_ctxt): New data structure to keep the parser context.
15025         *parse.y: Added 1998 time stamp, got rid of static global variables.
15026         (java_error_count, ctxp): New global variables.
15027         (%union): New value field.
15028         (numeric_type, integral_type): Rules removed.
15029         (primitive_type): Rule defined to handle integral, float, double and
15030         boolean types.
15031         (qualified_name, package_declaration,
15032         single_type_import_declaration, type_import_on_demand_declaration,
15033         modifiers, class_declaration, super, interfaces,
15034         interface_type_list, class_body, field_declaration,
15035         field_declaration, variable_declarators, variable_declarator,
15036         variable_declarator_id, method_declaration, method_header,
15037         formal_parameter_list, formal_parameter, method_body, block,
15038         static, interface_declaration, extends_interfaces,
15039         abstract_method_declaration, local_variable_declarators): Rules now
15040         define actions.
15041         (force_error, do_warning): New global statics.
15042         (push_parser_context, parser_context_save_global,
15043         parser_context_restore_global, pop_parser_context): New functions.
15044         (yyerror): Now uses the global parser context. Fixed use of obstack.
15045         (parse_error, parse_error_context, parse_warning_context,
15046         java_accstring_lookup, redefinition_error, check_modifiers,
15047         parser_add_interface, create_interface, create_class, find_field,
15048         duplicate_declaration_error, register_fields, method_header,
15049         check_modifiers_consistency, check_abstract_method_header,
15050         method_declarator, parser_qualified_classname,
15051         parser_check_super_interface, parser_check_super,
15052         parser_chain_incomplete_item, java_check_circular_reference,
15053         layout_class_from_source, java_complete_class,
15054         complete_method_decl, resolve_class, complete_class_report_errors,
15055         java_check_final, check_method_redefinition,
15056         java_check_regular_methods, java_check_abstract_methods,
15057         java_check_methods, lookup_java_interface_method2,
15058         lookup_java_method2, lookup_cl, find_name_in_single_imports,
15059         process_imports, find_in_imports, read_import_entry,
15060         read_import_dir, find_in_imports_on_demand,
15061         check_pkg_class_access, not_builtin_p, declare_local_variables,
15062         source_start_java_method, java_generate_parsed_class): New
15063         functions.
15064         *typeck.c: (signature_include_return): New global variable.
15065         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
15066         to add the function returned type in the signature.
15067
15068 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
15069
15070         * jcf-io.c (open_in_zip): Use strncmp and LEN.
15071
15072 1998-01-29  Dave Brolley  <brolley@cygnus.com>
15073
15074         * Make-lang.in (java.info): Added.
15075         (java.install-info): Added
15076
15077 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
15078
15079         * Makefile.in (clean): Also remove java/parse.c.
15080
15081 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
15082
15083         Add a pair of -fbounds-check/-fno-bounds-check options.
15084         * lang.c (lang_decode_option): Add code to grok arguments.
15085         (flag_bounds_check): Add decl.
15086         (lang_f_options): New array w/ the option in it.
15087         * java-tree.h (flag_bounds_check): Add decl.
15088         * lang-options.h: New file.
15089         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
15090         of a static macro value.
15091         (JAVA_ARRAY_EXCEPTION): Delete macro.
15092
15093 1998-01-23  Per Bothner  <bothner@cygnus.com>
15094
15095         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
15096         * expr.c (build_anewarray):  Add missing promote_type.
15097
15098 1998-01-22  Per Bothner  <bothner@cygnus.com>
15099
15100         Add array types with known length to optimize bounds checking.
15101         * typeck.c (build_java_array_type):  Take length parameter.
15102         (java_array_type_length, build_prim_array_type):  New functions.
15103         * java-tree.h:  Update for new functions.
15104         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
15105         * class.c:  Use build_prim_array_type.
15106         * expr.c (can_widen_reference_to):  Handle known-length array types.
15107         (verify_jvm_instructions):  Keep track of integer push instructions
15108         followed by newarray/anewarray, so we can build known-length arrays.
15109         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
15110         (java_array_data_offset):  New function.
15111         (build_java_array_length_access):  New function.  Optimize if constant.
15112         (build_java_arrayaccess):  Constant fold bounds check.
15113         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
15114         (build_newarray, build_anewarray):  New functions.
15115         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
15116         * verify.c (merge_types):  Handle known-lengh array types.
15117
15118 1998-01-19  Per Bothner  <bothner@cygnus.com>
15119
15120         * expr.c (expand_byte_code):  Fix performace bug, which caused
15121         searching linenumber_table to be linear rather than constant.
15122
15123 1997-12-12  Per Bothner  <bothner@cygnus.com>
15124
15125         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
15126
15127         * decl.c, java-tree.h (soft_fmod_node):  New global.
15128         * decl.c (init_decl_processing):  Define __builtin_fmod.
15129         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
15130         using __builtin_fmod.
15131
15132 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15133
15134         * keyword.h: New file, output of keyword.gperf as processed by
15135         gperf.
15136         * lex.c (java_lex_init): Initialize java_error_flag.
15137         * parse.c (YYERROR_NOW): Uses java_error_flag.
15138         * parse.y: New static java_error_flag. Useless definition of
15139         buffer_error gone.
15140         * parse.y (java_error): Portable error recovery using
15141         java_error_flag (not yet completely tuned).
15142
15143 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
15144
15145         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
15146
15147 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15148
15149         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
15150         (parse.c, lex.c, keyword.h): New rules for Java source code
15151         front-end.
15152         * parse.c: Renamed into jcf-parse.c.
15153         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
15154         * keyword.gperf: New file, Java keywords.
15155         * parse.y: New file, Java language grammar.
15156         * parse.h: New file, Java language grammar definitions.
15157         * lex.c: New file, Java language lexer.
15158         * lex.h: New file, Java language lexer definitions.
15159
15160 1997-12-03  Per Bothner  <bothner@cygnus.com>
15161
15162         * decl.c (clinit_identifier_node), java-tree.h:  New global.
15163         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
15164         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
15165         * expr.c (expand_java_field_op):  Check for invalid assignment
15166         to final field.
15167
15168         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
15169
15170 1997-10-27  Per Bothner  <bothner@cygnus.com>
15171
15172         * verify.c (verify_jvm_instructions):  When processing a handler,
15173         attempt to set the current_subr to the right value.
15174         (More complicated code combines Sep 17 and Oct 22 versions.)
15175
15176 1997-10-24  Per Bothner  <bothner@cygnus.com>
15177
15178         * class.c (push_class):  Figure out (guess) name of source file.
15179         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
15180         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
15181         (parse_class_file):  Change return type from int to void.
15182         Call debug_start_source_file/debug_end_source_file.
15183
15184         * expr.c (build_java_binop):  Fix masking 2nd operand.
15185         * decl.c (init_decl_processing):  Set sizetype first.
15186
15187 1997-10-22  Per Bothner  <bothner@cygnus.com>
15188
15189         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
15190         (Revert Sep 17 change.)
15191
15192 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15193
15194         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
15195         .class extension in their name and fix thing so we don't process
15196         them parse_zip_file_entries().
15197         (parse_zip_file_entries): Cleaned unused local variables.
15198
15199 1997-10-20  Per Bothner  <bothner@cygnus.com>
15200
15201         * expr.c (can_widen_reference_to):  Allows equal array element types.
15202         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
15203         * jcf-dump.c (RET):  Get (and print) index.
15204
15205         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
15206         Promote element type to POINTER_TYPE.
15207
15208 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15209
15210         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
15211         find_in_current_zip, jcf_figure_file_type): Moved from
15212         jcf-reader.c to parse.c.
15213         * zextract.c: (read_zip_archive): takes file_comment_length possible
15214         field into account.
15215
15216 1997-10-20  Per Bothner  <bothner@cygnus.com>
15217
15218         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
15219
15220         * verify.c (merge_types):  Handle array types even better ...
15221
15222 1997-10-17  Per Bothner  <bothner@cygnus.com>
15223
15224         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
15225
15226         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
15227         * class.c (make_class_data):  Don't build fields_decl if no fields.
15228         When building fields_decl, skip if DECL_ARTIFICIAL.
15229
15230         * expr.c (java_stack_swap):  Update stack_type_map.
15231         * verify.c (merge_types):  Handle array types better.
15232
15233 1997-10-15  Per Bothner  <bothner@cygnus.com>
15234
15235         * class.c (add_field):  Don't promote short integral fields to
15236         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
15237         * expr.c (push_value):  Promote and convert short integral values.
15238
15239         * decl.c, java-tree.h (integer_two_node):  New constant node.
15240         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
15241
15242 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15243
15244         * class.c (append_gpp_mangled_type): Use function argument
15245         unpromoted type to generate mangled name.
15246
15247 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15248
15249         * constants.c (build_constant_data_ref): Now uses current_class
15250         instead of main_class.
15251         (build_constants_constructor): Now uses current_class instead of
15252         main_class.
15253         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
15254         of the global variable SeepZipFiles done here.
15255         * zextract.c (read_zip_archive): extra_field optional field taken
15256         into account while computing the position of the class file in the
15257         archive.
15258         * verify.c (verify_jvm_instructions): Use current_jcf to search
15259         the constant pool.
15260         * parse.c (load_class): First search for the class to load in the
15261         current zip file. Saves current_jcf (restored before returning
15262         from that function). Don't call JCF_FINISH in the class was found
15263         in the current ZIP file.
15264         (jcf_parse): If the class was found in the current ZIP file, save
15265         its tree_constant_pool (for later reuse).
15266         (parse_class_file): New function. Process each method defined in
15267         the current class and record the class as to be later registered.
15268         (yyparse): Rewritten. Figure the type of the current file and switch
15269         accordingly.
15270         * lang.c: New global variable current_jcf.
15271         (lang_init): Removed compiling_from_source test (done later, in
15272         yyparse). Removed call the jcf_parse ().
15273         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
15274         (typedef struct JCF): New fields seen_in_zip (to mark a class found
15275         in the current ZIP file) and zip_offset (offset to the class data in
15276         the current zip file).
15277         * jcf-reader.c: zipfile.h included.
15278         localToFile: New ZipFileCache static global variable
15279         (parse_zip_file_entries): New function. Browse the current ZIP
15280         file directory and process each class found.
15281         (process_zip_dir): New function. Register each class found in the
15282         ZIP file directory. The class aren't parsed but a valid JCF is
15283         link to each of them.
15284         (find_in_current_zip): New function. Search for a class in the
15285         current ZIP file directory. If found, prepare the class so that it
15286         can be loaded.
15287         (jcf_figure_file_type): New function. Examine the file structure
15288         to figure a class file, a ZIP file. If none of these categories are
15289         matched, a source file is assumed.
15290         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
15291         SeenZipFile: New global variable.
15292         (open_in_zip): Use zipmember's length to accelerate the search for
15293         a member. If zipmember was NULL and zip file successfully read,
15294         return 0.
15295         * java-tree.h: New global variable current_jcf declared.  Added
15296         declaration for current_constant_pool_tags, current_constant_pool_data,
15297         current_constant_pool_length, current_constant_pool_data_ref.
15298         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
15299         store the JCF of classes seen in a zip file) and tree *constant_pool
15300         (to save a loaded class constant pool). current_class declared here.
15301         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
15302         retrieve method_ref_constant.
15303         (PUSHC): java_push_constant_from_pool now uses current_jcf.
15304         (OBJECT): get_class_constant now uses current_jcf.
15305         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
15306         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
15307         (expand_invoke): Now uses current_class instead of main_class
15308         (build_class_init): Now uses current_class instead of main_class
15309         * class.c: New static global variable registered_class.
15310         (register_class): New function.
15311         (emit_register_class): Modified to use registered_class instead of
15312         main_class
15313         (is_compiled_class): Now take into account class seen in the archive.
15314
15315 1997-10-06  Per Bothner  <bothner@cygnus.com>
15316
15317         * except.h:  Renamed to: java-except.h.
15318         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
15319         * except.c:  Add semi-working (commented out) implementation.
15320
15321         * expr.c (expand_iinc):  Add needed flush_quick_stack.
15322         * parse.c (set_source_filename):  New function.
15323         (give_name_to_class):  Set input_filename from package.classname.java.
15324
15325         * jcf-io.c (find_class):  Don't look first in ".".
15326
15327 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15328
15329         * zextract.c (read_zip_archive): Now takes into account the
15330         extra_field field.
15331         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
15332
15333 1997-09-20  Per Bothner  <bothner@cygnus.com>
15334
15335         * constants.c, java-tree.h (build_internal_class_name):  New function.
15336         (alloc_class_constant):  Re-implement using build_internal_class_name.
15337         * class.c (make_class_data):  Likewise.
15338         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
15339
15340 1997-09-17  Per Bothner  <bothner@cygnus.com>
15341
15342         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
15343         to NULL before pushing an exception handler target.
15344
15345         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
15346         (java_stack_swap, java_stack_dup):  Re-write to be safe from
15347         clobbering registers.
15348         (build_class_init):  New function.
15349
15350 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15351
15352         * typeck.c (build_java_array_type): Temporary use
15353         permanent_obstack to create the array 'length' field.
15354         * expr.c (lookup_label): Temporay use permanent_obstack to create
15355         label if not found.
15356         * class.c (push_super_field): Tempory use permanent_obstack.
15357
15358 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15359
15360         * typeck.c (type_for_mode): Now handles double_type_node and
15361         float_type_node.
15362         * verify.c (verify_jvm_instructions): The instruction following
15363         the wide bytecode is checked. OPCODE_ret added to the list of
15364         wide.
15365
15366 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15367
15368         * class.c (make_class): Temporary use permanent_obstack. Set the
15369         class CLASS_P field to 1.
15370         (push_class): Temporary use permanent_obstack.
15371         (set_super_info): Temporary use permanent_obstack.
15372         (add_method): Temporary use permanent_obstack, set
15373         METHOD_TRANSIENT().
15374         (add_field): Temporary use permanent_obstack. Sets
15375         FIELD_VOLATILE() and FIELD_TRANSIENT().
15376         (build_class_ref): Temporary use permanent_obstack if the class
15377         isn't compiled.
15378         (build_static_field_ref): Temporary use permanent_obstack when
15379         creating field's rtl.
15380         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
15381         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
15382         and fields. Function finalized, as far as flag handling.
15383         (push_class_static_dummy_field): Temporary use permanent_obstack.
15384         (emit_register_class): Force generation of class registration at
15385         -O3 or deeper.
15386         * decl.c (end_java_method): Call permanent_allocation() before
15387         returning.
15388         * expr.c (can_widen_reference_to): Added comment to interface
15389         handling, fixed typo.
15390         (lookup_field): Now uses CLASS_P() to correct FIXME
15391         (expand_invoke): Verification on public && !static &&
15392         !abstract moved into soft_lookupinterfacemethod (kaffe).
15393         Use Object class dtable if objectref is an array when expanding
15394         invokeinterface.
15395         (java_push_constant_from_pool): Temporary use permanent_obstack
15396         for CONSTANT_string
15397         * parse.c (get_ref_constant): Temporary use permanent_obstack to
15398         create constant references.
15399         (get_constant): Temporary use permanent_obstack to create constant.
15400         (load_class): Temporary use permanent_obstack to load class.
15401         (jcf_parse): Temporary use permanent_obstack to perform class
15402         layout.
15403         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
15404         (build_java_signature): Temporary use permanent_obstack.
15405         * verify.c: (verify_jvm_instruction): removed unnecessary verification
15406         on ACC_SUPER flag.
15407         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
15408         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
15409         (CLASS_P): Defined
15410
15411 1997-09-11  Per Bothner  <bothner@cygnus.com>
15412
15413         * class.c (append_gpp_mangled_type):  Fix typo.
15414         (emit_register_class):  Use main_class to get class object, rather
15415         than looking for no-longer-existing static decl starting with _CL.
15416         * typeck.c (parse_signature_type):  Promote array element type
15417         if it is a RECORD_TYPE.
15418
15419 1997-09-10  Per Bothner  <bothner@cygnus.com>
15420
15421         * class.c (push_class_static_dummy_field):  New function.
15422         (mangle_static_field):  New. Do G++-style mangling of static fields.
15423         (layout_class):  Mandle static fields here, not in add_field.
15424         (build_class_ref):  The class object is now a dummy static field.
15425         * decl.c (find_local_variable):  Look for best, instead of first match.
15426         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
15427         (build_java_athrow):  Don't check here if exception is Throwable.
15428         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
15429         (TYPE_USED):  Removed.  No longer used ...
15430         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
15431         * verify.c (push_pending_label):  New function.
15432         (push_pending_block):  Renamed to check_pending_block.
15433         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
15434         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
15435         re-checking possible handlers) after a store (less wasted work).
15436         Check for null handler (finally) before calling add_handler.
15437         Various changes to (finally?) correctly handle try/finally.
15438
15439 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
15440
15441         * class.c: Include stdio.h.
15442
15443 1997-09-04  Per Bothner  <bothner@cygnus.com>
15444
15445         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
15446         to make sure class is initialized before static/special invoke.
15447
15448         * verify.c (verify_jvm_instructions):  On a store instruction,
15449         call find_local_variable to force pre-allocation of decl and rtx.
15450         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
15451
15452 1997-09-03  Per Bothner  <bothner@cygnus.com>
15453
15454         * class.c (build_class_ref):   Strip off "promoted_" if need be.
15455         (make_field_value): Call build_java_signature when needed.
15456         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
15457         * expr.c (build_java_athrow):  Don't push_value of exception.
15458         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
15459         match specification of [fd]cmp[lg] for NaNs.
15460         (expand_byte_code):  Add support for exception handler ranges.
15461         * except.c:  Add skeleton for EH code-generation.
15462         * verify.c (merge_types):  Treat all promoted integral types as equal.
15463         * constants.c (build_constants_constructor):  To force creation of
15464         current_constant_pool_data_ref, call build_constant_data_ref.
15465
15466         * javaop.def (lload):  Fix typo.
15467         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
15468
15469 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
15470
15471         * parse.c: Don't include function.h.
15472
15473 1997-08-27  Per Bothner  <bothner@cygnus.com>
15474
15475         * except.[ch]:  New files.
15476         * Makefile.in (JAVA_OBJS):  Add except.o
15477         * expr.c:  Temporary warning about unimplemented exceptions.
15478         * verify.c:  Verify exception handlers.
15479
15480         * jcf-dump.c (disassemble_method):  Print exception table.
15481
15482 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15483
15484         * expr.c (verify_jvm_instructions): Started a thorough
15485         verification of invoke* bytecodes.
15486         (expand_byte_code): flush quick stack if PC is the target of a
15487         branch.  and undef RET (conflicting with config/i386/i386.h).
15488         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
15489         used.
15490         (expand_invoke): Now handles invokeinterface and do more
15491         verification according to the bytecode.
15492         (lookup_field): Don't try to load the class if processing
15493         dtable_type.
15494         (can_widen_reference_to): Now handles interfaces.
15495         * decl.c (init_decl_processing): New global variable
15496         soft_lookupinterfacemethod_node, declared in java-tree.h.
15497         Call set_super_info on string_type_node.
15498         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
15499         defined.
15500         * class.c (set_super_info): Fills the CLASS_* flags according to
15501         access_flags.
15502         (get_access_flags_from_decl): Handles all class flags.
15503
15504 1997-08-26  Per Bothner  <bothner@cygnus.com>
15505
15506         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
15507         * parse.c (yyparse):  Check for abstract method, and missing code.
15508         * expr.c (expand_byte_code):  Change interface.
15509         * lang.c (put_decl_node):  Print promoted types prettier.
15510         * verify.c (verify_jvm_instruction):  Change interface.
15511         Partial support for scanning exception table.
15512         For load instructions, handle promoted integral types.
15513
15514 1997-08-21  Per Bothner  <bothner@cygnus.com>
15515
15516         * verify.c:  New file, with contents moved from expr.c.
15517         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
15518         * typeck.c (is_array_type_p):  Moved here from expr.c.
15519         * java-tree.h:  Add some now-needed function declarations.
15520         * Makefile.in (JAVA_OBJS): Added verify.o.
15521
15522 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15523
15524         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
15525         METHOD_ABSTRACT flag.
15526
15527         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
15528         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
15529         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
15530
15531         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
15532         variables.
15533         (start_java_method): Hook for SYNCHRONIZED methods.
15534
15535         * expr.c (build_java_jsr, build_java_ret): New functions
15536         (JSR,PRE): New macros
15537         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
15538         (verify_jvm_instructions): tableswitch, lookupswitch,
15539         monitorenter, monitorexit, goto_w: verified.
15540         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
15541         (build_java_monitor): New function.
15542         (MONITOR_OPERATION): Modified to call build_java_monitor()
15543         (verify_jvm_instructions): Started a thorough verification of
15544         invoke* bytecodes.
15545
15546 1997-08-19  Per Bothner  <bothner@cygnus.com>
15547
15548         Support verification of jsr/ret subroutines (used for try/finally).
15549         * decl.c (return_address_type_node):  New type node.
15550         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
15551         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
15552         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
15553         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
15554         TYPE_USED):  New macros for special types in type_map.
15555
15556         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
15557         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
15558         BCODE_JUMP_TARGET.
15559         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
15560
15561         * expr.c (can_widen_reference_to):  New function.
15562         (pop_type):  Use it.
15563         (merge_type_state):  Support handling start of subroutine.
15564         (push_pending_block):  Return char* error message, instead of calling
15565         fatal on an error.  Also handle subroutines.
15566         (verify_jvm_instructions):  Handle errors from push_poending_block.
15567         Support jsr and ret instructions.
15568
15569 1997-08-19  Per Bothner  <bothner@cygnus.com>
15570
15571         * jcf-io.c (find_classfile):  Fix thinko.
15572         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
15573
15574 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
15575
15576         * Makefile.in (BISON): Remove.
15577
15578 1997-08-07  Per Bothner  <bothner@cygnus.com>
15579
15580         * Makefile.in:  Convert to autoconf.
15581         * config-lang.in (outputs):  Added java/Makefile.
15582
15583         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
15584         Rename cc1java to jc1.
15585
15586         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
15587         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
15588
15589         * class.c (class_depth):  Do load_class if needed.
15590
15591         Mostly better verification.
15592         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
15593         (init_decl_processing):  Change return type of soft_checkcast.
15594         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
15595         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
15596         lang_print_error):  New functions.
15597         (lang_init):  Set global hook print_error_function to lang_print_error.
15598         * expr.c:  In the type_map ptr_type_node is only used for null now.
15599         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
15600         (merge_types):  Dererence pointer to record types before comparing.
15601         (decode_newarray_type, merge_types):  On error just return NULL.
15602         (build_java_binop):  Add preliminary implementation (with warning)
15603         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
15604         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
15605         (expand_compare, expand_java_goto, expand_java_call):  Don't
15606         push_pending_block, since that only makes sense when verifying.
15607         (merge_type_state):  Different return codes.
15608         (push_pending_block):  A block may need to be verified more than once.
15609         (expand_byte_code):  Warn about unused code at code generation time.
15610         (verify_jvm_instruction):  Changed logic, since code may need to be
15611         re-verified if type-state has changed.  Also, better error handling.
15612         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
15613         Improve newarray, anewarray, ?aload, athrow,
15614         * java-tree.h (LABEL_CHANGED):  New macro.
15615
15616 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15617
15618         * decl.c (soft_athrow_node): New global variable initialized.
15619         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
15620         * typeck.c (convert): Added support for REAL_TYPE.
15621         (convert_to_char): New function.
15622         (convert): Handle CHAR_TYPE.
15623         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
15624         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
15625         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
15626         promoted type.
15627         (verify_jvm_instructions): Added break a the end of bogus unop: label.
15628         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
15629         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
15630         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
15631         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
15632         to Use The Right Things.
15633         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
15634         compatible with INT. BOOLEAN is made equivalent to BYTE.
15635         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
15636         OPCODE_ifnonnull): Now supported.
15637         (build_java_athrow): New function.
15638
15639 1997-08-04  Per Bothner  <bothner@cygnus.com>
15640
15641         Rename method name <init> to match G++ (and fix mangling).
15642         * class.c (layout_class):  Replace method name of <init> by class name.
15643         (make_method_value):  Do inverse renaming of constructor from <init>.
15644         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
15645         * typeck.c (lookup_java_constructor):  New function.
15646         * expr.c (expand_invoke):  If method_name is <init>, call
15647         lookup_java_constructor to find constructor.
15648
15649         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
15650
15651 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15652
15653         * parse.c (get_class_constant): Modified to handle array "classes"
15654         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
15655         wide type.
15656         (convert): Modified to handle real type.
15657         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
15658         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
15659         variables declared.
15660         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
15661         soft_multianewarray, soft_newarray_node, soft_throw_node): New
15662         global variables initialized.
15663         (find_local_variable): Handles the case of a pointer
15664         (end_java_method): Restore the use of one more scope
15665         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
15666         build_java_array_length_access, expand_java_arrayload,
15667         expand_java_arraystore, expand_java_array_length,
15668         expand_java_multianewarray, expand_java_anewarray,
15669         build_java_check_indexed_type, is_array_type_p,
15670         build_java_throw_out_of_bound_exception): New functions.
15671         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
15672         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
15673         OPCODE_<t>aload): Implemented code for verification.
15674         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
15675         ARRAY_NEW_MULTI): Macro defined.
15676         (CONVERT): Modified to invoke convert().
15677         (case OPCODE_aload2): Fixed index typo from 2 to 1.
15678
15679 1997-07-31  Per Bothner  <bothner@cygnus.com>
15680
15681         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
15682         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
15683         (make_class_data):  Field name needs '/' as package prefix.
15684         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
15685
15686 1997-07-25  Per Bothner  <bothner@cygnus.com>
15687
15688         Implement debug information for local variables.
15689         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
15690         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
15691         DECL_LOCAL_SLOT_CHAIN):  New macros.
15692         (struct lang_decl_var):  New type.
15693         * parse.c (give_name_to_locals):  Move to decl.c.
15694         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
15695         (start_java_method):  Re-write parameter handling.
15696         (pending_local_decls):  New global variable.
15697         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
15698         (find_local_variable):  Accept pc so we can skips decls not in range.
15699         (struct binding_level):  Add end_pc field.
15700         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
15701         (various):  Change so current pc gets passed to find_local_variable.
15702
15703         * decl.c (init_decl_processing):  Re-arrange fields in
15704         class_type_node and and method_type_node to match kaffe 0.9.1.
15705         * class.c (make_method_value, make_class_data):  Update
15706         initializations to match.
15707
15708 1997-07-16  Per Bothner  <bothner@cygnus.com>
15709
15710         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
15711         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
15712         (push_super_field):  New function.
15713         (make_class_data):  Handle inheritance of class static initializer.
15714         (layout_class):  New name mangling.
15715         * constants.c (build_constant_data_ref):  Init type of data array
15716         to a one-element array.
15717         (build_constants_constructor):  Set DECL_SIZE from complete array type.
15718         * decl.c:  Rename class_type, object_type etc to class_type_node,
15719         object_type_node etc.  Make former inherit from latter.
15720         * expr.c (expand_invoke):  Add cast of function address.
15721         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
15722         * parse.c (yyparse):  Don't call layout_class here.
15723         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
15724
15725 1997-06-14  Per Bothner  <bothner@cygnus.com>
15726
15727         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
15728         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
15729         (alloc_class_constant):  New.
15730         * expr.c (expand_invoke):  Make sure method's class is initialized.
15731         * class.c (interits_from_p, emit_register_class):  New functions.
15732         * parse.c (yyparse):  Call emit_register_class.
15733
15734 1997-06-09  Per Bothner  <bothner@cygnus.com>
15735
15736         * constants.c:  New file, to handle constant pool.
15737         * Makefile.in (JAVA_OBJS):  Add constants.o.
15738         * decl.c (init_decl_processing):  Update, fix, finish various structs.
15739         (pushdecl_top_level):  New.
15740         * parse.c (layout_class):  Moved to class.c.
15741         * expr.c (java_push_constant_from_pool):  New function.
15742         * class.c (build_class_ref):  Make work fully
15743         (make_class_data):  Emit super-class, constant pool, interface vector.
15744
15745 1997-06-03  Per Bothner  <bothner@cygnus.com>
15746
15747         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
15748         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
15749         * class.c (class_depth):  New function.
15750         (lookup_named_class):  Replaced by new function lookup_class.
15751         * decl.c (object_type_node, string_type_node):  New.
15752         Remove various types that we no longer need.
15753         * expr.c (verify_jvm_instructions):  New separate verifier pass.
15754         (push_type, pop_type):  New functions for verifier.
15755         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
15756         (expand_byte_code):  Simplify, since we assume already verified.
15757         (expand_invoke):  Now mostly works.
15758         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
15759         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
15760         * parse.c:  Wait to allocate class object until we know its name.
15761         (layout_class):  Calculate DECL_VINDEX for each virtual method.
15762         * typeck.c (get_array_type):  Rename to ...
15763         (build_java_array_type):  ... and provide working implementation.
15764         (build_java_signature):  New function - build Java signature of type.
15765         (set_java_signature):  New function - cache signature with type.
15766         (lookup_java_method):  New function.
15767
15768 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
15769
15770         * class.c (ident_subst):  Take extra SUFFIX parameter.
15771         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
15772         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
15773         (build_class_ref):  Actually implement.
15774         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
15775         * decl.c (builtin_function):  New.
15776         (init_decl_processing):  Update for current Kaffe.  Declare some
15777         builtin Kaffe functions.
15778         * expr.c (build_address_of):  New.
15779         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
15780         Renamed (from expand_java_new etc), and added working implementations.
15781         (build_field_ref):  Now also handle static fields.
15782         (expand_invoke):  Implement invokestatic, and start implement rest.
15783         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
15784         * javaop.def:  Rename invokevirt -> invokevirtual.
15785         * lang.c (use_handles):  Removed.
15786         * parse.c:  Add support for ConstantValue attribute.
15787         Handle nested loading of a class.  (JPOOL_UTF):  New.
15788
15789 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
15790
15791         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
15792
15793 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
15794
15795         * Make-lang.in (java.install-man):  New empty rule.
15796         * typeck.c (set_local_type):  New function.
15797         * expr.c (STORE_INTERNAL):  Call find_local_variable,
15798         not find_stack_slot.  Call set_local_type.
15799
15800 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
15801
15802         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
15803         and building RECORD_TYPE CONSTRUCTORs.
15804         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
15805
15806         * lang.c (use_handles):  Change the default to 0.
15807         * decl.c:  Define and build class_type, field_type, utf8const_type.
15808         * class.c (make_class_data, make_field_value,
15809         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
15810         hashUtf8String, strLengthUtf8, mangled_classname:
15811         Functions to build reflective data structures.
15812         * parse.c (yyparse):  Call make_class_data.
15813
15814         * jcf-io.c (open_class, find_classfile):  New functions.
15815         * jcf-dump.c:  Support reading classfile from explicitly-named
15816         class file (without CLASSPATH searching).
15817
15818 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
15819
15820         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
15821         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
15822         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
15823         (get_constant):  Now trivial for CONSTANT_Utf8.
15824
15825         * jcf.h:  Make NEW_CPOOL the default.
15826         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
15827
15828 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
15829
15830         New directory.